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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
39,000 | nglog::CapturedStream::Capture() | ng-log[P]ng-log/src/googletest.h | void Capture() {
// Keep original stream for later
CHECK(!uncaptured_fd_) << ", Stream " << fd_ << " already captured!";
uncaptured_fd_.reset(dup(fd_));
CHECK(uncaptured_fd_);
// Open file to save stream to
FileDescriptor cap_fd{open(filename_.c_str(), O_CREAT | O_TRUNC | O_WRONLY,
S_IRUSR | S_IWUSR)};
CHECK(cap_fd);
// Send stdout/stderr to this file
fflush(nullptr);
CHECK(dup2(cap_fd.get(), fd_) != -1);
CHECK(cap_fd.close() != -1);
} | O0 | c | nglog::CapturedStream::Capture():
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x238(%rbp)
addq $0x4, %rdi
callq 0xde50
xorb $-0x1, %al
xorb $-0x1, %al
movb $0x0, -0x71(%rbp)
testb $0x1, %al
jne 0xf284
jmp 0xf33b
leaq 0x41ec0(%rip), %rsi # 0x5114b
leaq -0x70(%rbp), %rdi
movq %rdi, -0x248(%rbp)
movl $0x146, %edx # imm = 0x146
callq 0x18db0
movq -0x248(%rbp), %rdi
movb $0x1, -0x71(%rbp)
callq 0x148e0
movq %rax, -0x240(%rbp)
jmp 0xf2b9
movq -0x240(%rbp), %rdi
leaq 0x41f54(%rip), %rsi # 0x5121b
callq 0x9700
movq %rax, -0x250(%rbp)
jmp 0xf2d5
movq -0x250(%rbp), %rdi
leaq 0x41f57(%rip), %rsi # 0x5123a
callq 0x9700
movq %rax, -0x258(%rbp)
jmp 0xf2f1
movq -0x258(%rbp), %rdi
movq -0x238(%rbp), %rax
movl (%rax), %esi
callq 0x9d10
movq %rax, -0x260(%rbp)
jmp 0xf30f
movq -0x260(%rbp), %rdi
leaq 0x41f27(%rip), %rsi # 0x51244
callq 0x9700
movq %rax, -0x268(%rbp)
jmp 0xf32b
movq -0x268(%rbp), %rsi
leaq -0x9(%rbp), %rdi
callq 0xec60
testb $0x1, -0x71(%rbp)
jne 0xf343
jmp 0xf36a
leaq -0x70(%rbp), %rdi
callq 0x18e20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x71(%rbp)
jne 0xf434
jmp 0xf43f
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x270(%rbp)
movl (%rax), %edi
callq 0x9ba0
movq -0x270(%rbp), %rdi
movl %eax, %esi
callq 0xf7a0
movq -0x238(%rbp), %rdi
addq $0x4, %rdi
callq 0xde50
xorb $-0x1, %al
movb $0x0, -0xe9(%rbp)
testb $0x1, %al
jne 0xf3b3
jmp 0xf41d
leaq 0x41d91(%rip), %rsi # 0x5114b
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x280(%rbp)
movl $0x148, %edx # imm = 0x148
callq 0x18db0
movq -0x280(%rbp), %rdi
movb $0x1, -0xe9(%rbp)
callq 0x148e0
movq %rax, -0x278(%rbp)
jmp 0xf3ee
movq -0x278(%rbp), %rdi
leaq 0x41e5b(%rip), %rsi # 0x51257
callq 0x9700
movq %rax, -0x288(%rbp)
jmp 0xf40a
movq -0x288(%rbp), %rsi
leaq -0x85(%rbp), %rdi
callq 0xec60
testb $0x1, -0xe9(%rbp)
jne 0xf428
jmp 0xf465
leaq -0xe8(%rbp), %rdi
callq 0x18e20
leaq -0x70(%rbp), %rdi
callq 0x18e20
jmp 0xf43f
jmp 0xf760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0xe9(%rbp)
jne 0xf530
jmp 0xf53e
movq -0x238(%rbp), %rdi
addq $0x8, %rdi
callq 0x92b0
movq %rax, %rdi
movl $0x241, %esi # imm = 0x241
movl $0x180, %edx # imm = 0x180
movb $0x0, %al
callq 0x9540
movl %eax, %esi
leaq -0xf0(%rbp), %rdi
callq 0xf7d0
leaq -0xf0(%rbp), %rdi
callq 0xde50
xorb $-0x1, %al
movb $0x0, -0x159(%rbp)
testb $0x1, %al
jne 0xf4b2
jmp 0xf517
leaq 0x41c92(%rip), %rsi # 0x5114b
leaq -0x158(%rbp), %rdi
movl $0x14d, %edx # imm = 0x14D
callq 0x18db0
jmp 0xf4cc
movb $0x1, -0x159(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x148e0
movq %rax, -0x290(%rbp)
jmp 0xf4e8
movq -0x290(%rbp), %rdi
leaq 0x41d7f(%rip), %rsi # 0x51275
callq 0x9700
movq %rax, -0x298(%rbp)
jmp 0xf504
movq -0x298(%rbp), %rsi
leaq -0xf1(%rbp), %rdi
callq 0xec60
testb $0x1, -0x159(%rbp)
jne 0xf522
jmp 0xf578
leaq -0x158(%rbp), %rdi
callq 0x18e20
jmp 0xf530
leaq -0xe8(%rbp), %rdi
callq 0x18e20
jmp 0xf53e
jmp 0xf760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x159(%rbp)
jne 0xf632
jmp 0xf640
xorl %eax, %eax
movl %eax, %edi
callq 0x98b0
jmp 0xf583
leaq -0xf0(%rbp), %rdi
callq 0xf7f0
movl %eax, %edi
movq -0x238(%rbp), %rax
movl (%rax), %esi
callq 0x9680
cmpl $-0x1, %eax
setne %al
xorb $-0x1, %al
movb $0x0, -0x1c1(%rbp)
testb $0x1, %al
jne 0xf5b4
jmp 0xf619
leaq 0x41b90(%rip), %rsi # 0x5114b
leaq -0x1c0(%rbp), %rdi
movl $0x151, %edx # imm = 0x151
callq 0x18db0
jmp 0xf5ce
movb $0x1, -0x1c1(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x148e0
movq %rax, -0x2a0(%rbp)
jmp 0xf5ea
movq -0x2a0(%rbp), %rdi
leaq 0x41c93(%rip), %rsi # 0x5128b
callq 0x9700
movq %rax, -0x2a8(%rbp)
jmp 0xf606
movq -0x2a8(%rbp), %rsi
leaq -0x15a(%rbp), %rdi
callq 0xec60
testb $0x1, -0x1c1(%rbp)
jne 0xf624
jmp 0xf666
leaq -0x1c0(%rbp), %rdi
callq 0x18e20
jmp 0xf632
leaq -0x158(%rbp), %rdi
callq 0x18e20
jmp 0xf640
jmp 0xf754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x1c1(%rbp)
jne 0xf705
jmp 0xf713
leaq -0xf0(%rbp), %rdi
callq 0xf800
cmpl $-0x1, %eax
setne %al
xorb $-0x1, %al
movb $0x0, -0x229(%rbp)
testb $0x1, %al
jne 0xf687
jmp 0xf6ec
leaq 0x41abd(%rip), %rsi # 0x5114b
leaq -0x228(%rbp), %rdi
movl $0x152, %edx # imm = 0x152
callq 0x18db0
jmp 0xf6a1
movb $0x1, -0x229(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x148e0
movq %rax, -0x2b0(%rbp)
jmp 0xf6bd
movq -0x2b0(%rbp), %rdi
leaq 0x41bed(%rip), %rsi # 0x512b8
callq 0x9700
movq %rax, -0x2b8(%rbp)
jmp 0xf6d9
movq -0x2b8(%rbp), %rsi
leaq -0x1c2(%rbp), %rdi
callq 0xec60
testb $0x1, -0x229(%rbp)
jne 0xf6f7
jmp 0xf72f
leaq -0x228(%rbp), %rdi
callq 0x18e20
jmp 0xf705
leaq -0x1c0(%rbp), %rdi
callq 0x18e20
jmp 0xf713
jmp 0xf754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x229(%rbp)
jne 0xf744
jmp 0xf752
leaq -0xf0(%rbp), %rdi
callq 0xde00
addq $0x2c0, %rsp # imm = 0x2C0
popq %rbp
retq
leaq -0x228(%rbp), %rdi
callq 0x18e20
jmp 0xf752
jmp 0xf754
leaq -0xf0(%rbp), %rdi
callq 0xde00
movq -0x80(%rbp), %rdi
callq 0x9d40
movq %rax, %rdi
callq 0xcb80
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN5nglog14CapturedStream7CaptureEv:
push rbp
mov rbp, rsp
sub rsp, 2C0h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_238], rdi
add rdi, 4
call _ZNK5nglog5tools14FileDescriptorcvbEv; nglog::tools::FileDescriptor::operator bool(void)
xor al, 0FFh
xor al, 0FFh
mov [rbp+var_71], 0
test al, 1
jnz short loc_F284
jmp loc_F33B
loc_F284:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_70]; this
mov [rbp+var_248], rdi
mov edx, 146h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, [rbp+var_248]; this
mov [rbp+var_71], 1
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_240], rax
jmp short $+2
loc_F2B9:
mov rdi, [rbp+var_240]
lea rsi, aCheckFailedUnc; "Check failed: !uncaptured_fd_ "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_250], rax
jmp short $+2
loc_F2D5:
mov rdi, [rbp+var_250]
lea rsi, aStream; ", Stream "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_258], rax
jmp short $+2
loc_F2F1:
mov rdi, [rbp+var_258]
mov rax, [rbp+var_238]
mov esi, [rax]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_260], rax
jmp short $+2
loc_F30F:
mov rdi, [rbp+var_260]
lea rsi, aAlreadyCapture; " already captured!"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_268], rax
jmp short $+2
loc_F32B:
mov rsi, [rbp+var_268]
lea rdi, [rbp+var_9]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_F33B:
test [rbp+var_71], 1
jnz short loc_F343
jmp short loc_F36A
loc_F343:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_71], 1
jnz loc_F434
jmp loc_F43F
loc_F36A:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 4
mov [rbp+var_270], rcx
mov edi, [rax]
call _dup
mov rdi, [rbp+var_270]; this
mov esi, eax; int
call _ZN5nglog5tools14FileDescriptor5resetEi; nglog::tools::FileDescriptor::reset(int)
mov rdi, [rbp+var_238]
add rdi, 4
call _ZNK5nglog5tools14FileDescriptorcvbEv; nglog::tools::FileDescriptor::operator bool(void)
xor al, 0FFh
mov [rbp+var_E9], 0
test al, 1
jnz short loc_F3B3
jmp short loc_F41D
loc_F3B3:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_E8]; this
mov [rbp+var_280], rdi
mov edx, 148h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, [rbp+var_280]; this
mov [rbp+var_E9], 1
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_278], rax
jmp short $+2
loc_F3EE:
mov rdi, [rbp+var_278]
lea rsi, aCheckFailedUnc_0; "Check failed: uncaptured_fd_ "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_288], rax
jmp short $+2
loc_F40A:
mov rsi, [rbp+var_288]
lea rdi, [rbp+var_85]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_F41D:
test [rbp+var_E9], 1
jnz short loc_F428
jmp short loc_F465
loc_F428:
lea rdi, [rbp+var_E8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_F434:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F43F:
jmp loc_F760
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_E9], 1
jnz loc_F530
jmp loc_F53E
loc_F465:
mov rdi, [rbp+var_238]
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
mov esi, 241h
mov edx, 180h
mov al, 0
call _open
mov esi, eax; int
lea rdi, [rbp+var_F0]; this
call _ZN5nglog5tools14FileDescriptorC2Ei; nglog::tools::FileDescriptor::FileDescriptor(int)
lea rdi, [rbp+var_F0]
call _ZNK5nglog5tools14FileDescriptorcvbEv; nglog::tools::FileDescriptor::operator bool(void)
xor al, 0FFh
mov [rbp+var_159], 0
test al, 1
jnz short loc_F4B2
jmp short loc_F517
loc_F4B2:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_158]; this
mov edx, 14Dh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
jmp short $+2
loc_F4CC:
mov [rbp+var_159], 1
lea rdi, [rbp+var_158]; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_290], rax
jmp short $+2
loc_F4E8:
mov rdi, [rbp+var_290]
lea rsi, aCheckFailedCap_0; "Check failed: cap_fd "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_298], rax
jmp short $+2
loc_F504:
mov rsi, [rbp+var_298]
lea rdi, [rbp+var_F1]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_F517:
test [rbp+var_159], 1
jnz short loc_F522
jmp short loc_F578
loc_F522:
lea rdi, [rbp+var_158]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F530:
lea rdi, [rbp+var_E8]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F53E:
jmp loc_F760
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
jmp loc_F754
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_159], 1
jnz loc_F632
jmp loc_F640
loc_F578:
xor eax, eax
mov edi, eax
call _fflush
jmp short $+2
loc_F583:
lea rdi, [rbp+var_F0]; this
call _ZNK5nglog5tools14FileDescriptor3getEv; nglog::tools::FileDescriptor::get(void)
mov edi, eax
mov rax, [rbp+var_238]
mov esi, [rax]
call _dup2
cmp eax, 0FFFFFFFFh
setnz al
xor al, 0FFh
mov [rbp+var_1C1], 0
test al, 1
jnz short loc_F5B4
jmp short loc_F619
loc_F5B4:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_1C0]; this
mov edx, 151h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
jmp short $+2
loc_F5CE:
mov [rbp+var_1C1], 1
lea rdi, [rbp+var_1C0]; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_2A0], rax
jmp short $+2
loc_F5EA:
mov rdi, [rbp+var_2A0]
lea rsi, aCheckFailedDup; "Check failed: dup2(cap_fd.get(), fd_) !"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_2A8], rax
jmp short $+2
loc_F606:
mov rsi, [rbp+var_2A8]
lea rdi, [rbp+var_15A]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_F619:
test [rbp+var_1C1], 1
jnz short loc_F624
jmp short loc_F666
loc_F624:
lea rdi, [rbp+var_1C0]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F632:
lea rdi, [rbp+var_158]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F640:
jmp loc_F754
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_1C1], 1
jnz loc_F705
jmp loc_F713
loc_F666:
lea rdi, [rbp+var_F0]; this
call _ZN5nglog5tools14FileDescriptor5closeEv; nglog::tools::FileDescriptor::close(void)
cmp eax, 0FFFFFFFFh
setnz al
xor al, 0FFh
mov [rbp+var_229], 0
test al, 1
jnz short loc_F687
jmp short loc_F6EC
loc_F687:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_228]; this
mov edx, 152h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
jmp short $+2
loc_F6A1:
mov [rbp+var_229], 1
lea rdi, [rbp+var_228]; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_2B0], rax
jmp short $+2
loc_F6BD:
mov rdi, [rbp+var_2B0]
lea rsi, aCheckFailedCap_1; "Check failed: cap_fd.close() != -1 "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_2B8], rax
jmp short $+2
loc_F6D9:
mov rsi, [rbp+var_2B8]
lea rdi, [rbp+var_1C2]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_F6EC:
test [rbp+var_229], 1
jnz short loc_F6F7
jmp short loc_F72F
loc_F6F7:
lea rdi, [rbp+var_228]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F705:
lea rdi, [rbp+var_1C0]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F713:
jmp short loc_F754
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_229], 1
jnz short loc_F744
jmp short loc_F752
loc_F72F:
lea rdi, [rbp+var_F0]; this
call _ZN5nglog5tools14FileDescriptorD2Ev; nglog::tools::FileDescriptor::~FileDescriptor()
add rsp, 2C0h
pop rbp
retn
loc_F744:
lea rdi, [rbp+var_228]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_F752:
jmp short $+2
loc_F754:
lea rdi, [rbp+var_F0]; this
call _ZN5nglog5tools14FileDescriptorD2Ev; nglog::tools::FileDescriptor::~FileDescriptor()
loc_F760:
mov rdi, [rbp+var_80]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::CapturedStream::Capture(nglog::CapturedStream *this, long long a2)
{
int v2; // eax
long long v3; // rax
unsigned int v4; // eax
long long v5; // rsi
unsigned int v6; // eax
int v7; // eax
long long v8; // [rsp+10h] [rbp-2B0h]
long long v9; // [rsp+20h] [rbp-2A0h]
long long v10; // [rsp+30h] [rbp-290h]
long long v11; // [rsp+48h] [rbp-278h]
long long v12; // [rsp+60h] [rbp-260h]
long long v13; // [rsp+68h] [rbp-258h]
long long v14; // [rsp+70h] [rbp-250h]
long long v15; // [rsp+80h] [rbp-240h]
char v16; // [rsp+97h] [rbp-229h]
_BYTE v17[102]; // [rsp+98h] [rbp-228h] BYREF
char v18; // [rsp+FFh] [rbp-1C1h]
_BYTE v19[102]; // [rsp+100h] [rbp-1C0h] BYREF
char v20; // [rsp+167h] [rbp-159h]
_BYTE v21[103]; // [rsp+168h] [rbp-158h] BYREF
int v22; // [rsp+1D0h] [rbp-F0h] BYREF
char v23; // [rsp+1D7h] [rbp-E9h]
_BYTE v24[99]; // [rsp+1D8h] [rbp-E8h] BYREF
char v25; // [rsp+24Fh] [rbp-71h]
_BYTE v26[103]; // [rsp+250h] [rbp-70h] BYREF
nglog::CapturedStream *v27; // [rsp+2B8h] [rbp-8h]
v27 = this;
v25 = 0;
if ( nglog::tools::FileDescriptor::operator bool((_DWORD *)this + 1) )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v26,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
326);
v25 = 1;
v15 = nglog::LogMessage::stream((nglog::LogMessage *)v26);
v14 = std::operator<<<std::char_traits<char>>(v15, "Check failed: !uncaptured_fd_ ");
v13 = std::operator<<<std::char_traits<char>>(v14, ", Stream ");
v12 = std::ostream::operator<<(v13, *(unsigned int *)this);
a2 = std::operator<<<std::char_traits<char>>(v12, " already captured!");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v25 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v26);
v2 = dup(*(unsigned int *)this, a2);
nglog::tools::FileDescriptor::reset((nglog::CapturedStream *)((char *)this + 4), v2);
v23 = 0;
if ( !nglog::tools::FileDescriptor::operator bool((_DWORD *)this + 1) )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v24,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
328);
v23 = 1;
v11 = nglog::LogMessage::stream((nglog::LogMessage *)v24);
std::operator<<<std::char_traits<char>>(v11, "Check failed: uncaptured_fd_ ");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v23 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v24);
v3 = std::string::c_str((char *)this + 8);
v4 = open(v3, 577LL, 384LL);
v5 = v4;
nglog::tools::FileDescriptor::FileDescriptor((nglog::tools::FileDescriptor *)&v22, v4);
v20 = 0;
if ( !nglog::tools::FileDescriptor::operator bool(&v22) )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v21,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
333);
v20 = 1;
v10 = nglog::LogMessage::stream((nglog::LogMessage *)v21);
v5 = std::operator<<<std::char_traits<char>>(v10, "Check failed: cap_fd ");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v20 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v21);
fflush(0LL, v5);
v6 = nglog::tools::FileDescriptor::get((nglog::tools::FileDescriptor *)&v22);
v7 = dup2(v6, *(unsigned int *)this);
v18 = 0;
if ( v7 == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v19,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
337);
v18 = 1;
v9 = nglog::LogMessage::stream((nglog::LogMessage *)v19);
std::operator<<<std::char_traits<char>>(v9, "Check failed: dup2(cap_fd.get(), fd_) != -1 ");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v18 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v19);
v16 = 0;
if ( (unsigned int)nglog::tools::FileDescriptor::close((nglog::tools::FileDescriptor *)&v22) == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v17,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
338);
v16 = 1;
v8 = nglog::LogMessage::stream((nglog::LogMessage *)v17);
std::operator<<<std::char_traits<char>>(v8, "Check failed: cap_fd.close() != -1 ");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v16 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v17);
nglog::tools::FileDescriptor::~FileDescriptor((nglog::tools::FileDescriptor *)&v22);
}
| Capture:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2c0
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x238],RDI
ADD RDI,0x4
CALL 0x0010de50
XOR AL,0xff
XOR AL,0xff
MOV byte ptr [RBP + -0x71],0x0
TEST AL,0x1
JNZ 0x0010f284
JMP 0x0010f33b
LAB_0010f284:
LEA RSI,[0x15114b]
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0x248],RDI
MOV EDX,0x146
CALL 0x00118db0
MOV RDI,qword ptr [RBP + -0x248]
MOV byte ptr [RBP + -0x71],0x1
LAB_0010f2ab:
CALL 0x001148e0
MOV qword ptr [RBP + -0x240],RAX
JMP 0x0010f2b9
LAB_0010f2b9:
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[0x15121b]
CALL 0x00109700
MOV qword ptr [RBP + -0x250],RAX
JMP 0x0010f2d5
LAB_0010f2d5:
MOV RDI,qword ptr [RBP + -0x250]
LEA RSI,[0x15123a]
CALL 0x00109700
MOV qword ptr [RBP + -0x258],RAX
JMP 0x0010f2f1
LAB_0010f2f1:
MOV RDI,qword ptr [RBP + -0x258]
MOV RAX,qword ptr [RBP + -0x238]
MOV ESI,dword ptr [RAX]
CALL 0x00109d10
MOV qword ptr [RBP + -0x260],RAX
JMP 0x0010f30f
LAB_0010f30f:
MOV RDI,qword ptr [RBP + -0x260]
LEA RSI,[0x151244]
CALL 0x00109700
LAB_0010f322:
MOV qword ptr [RBP + -0x268],RAX
JMP 0x0010f32b
LAB_0010f32b:
MOV RSI,qword ptr [RBP + -0x268]
LEA RDI,[RBP + -0x9]
CALL 0x0010ec60
LAB_0010f33b:
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0010f343
JMP 0x0010f36a
LAB_0010f343:
LEA RDI,[RBP + -0x70]
CALL 0x00118e20
LAB_0010f34c:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x80],RCX
MOV dword ptr [RBP + -0x84],EAX
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0010f434
JMP 0x0010f43f
LAB_0010f36a:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x270],RCX
MOV EDI,dword ptr [RAX]
CALL 0x00109ba0
MOV RDI,qword ptr [RBP + -0x270]
MOV ESI,EAX
CALL 0x0010f7a0
MOV RDI,qword ptr [RBP + -0x238]
ADD RDI,0x4
CALL 0x0010de50
XOR AL,0xff
MOV byte ptr [RBP + -0xe9],0x0
TEST AL,0x1
JNZ 0x0010f3b3
JMP 0x0010f41d
LAB_0010f3b3:
LEA RSI,[0x15114b]
LEA RDI,[RBP + -0xe8]
MOV qword ptr [RBP + -0x280],RDI
MOV EDX,0x148
CALL 0x00118db0
MOV RDI,qword ptr [RBP + -0x280]
MOV byte ptr [RBP + -0xe9],0x1
LAB_0010f3e0:
CALL 0x001148e0
MOV qword ptr [RBP + -0x278],RAX
JMP 0x0010f3ee
LAB_0010f3ee:
MOV RDI,qword ptr [RBP + -0x278]
LEA RSI,[0x151257]
CALL 0x00109700
LAB_0010f401:
MOV qword ptr [RBP + -0x288],RAX
JMP 0x0010f40a
LAB_0010f40a:
MOV RSI,qword ptr [RBP + -0x288]
LEA RDI,[RBP + -0x85]
CALL 0x0010ec60
LAB_0010f41d:
TEST byte ptr [RBP + -0xe9],0x1
JNZ 0x0010f428
JMP 0x0010f465
LAB_0010f428:
LEA RDI,[RBP + -0xe8]
CALL 0x00118e20
LAB_0010f434:
LEA RDI,[RBP + -0x70]
CALL 0x00118e20
LAB_0010f43d:
JMP 0x0010f43f
LAB_0010f43f:
JMP 0x0010f760
LAB_0010f465:
MOV RDI,qword ptr [RBP + -0x238]
ADD RDI,0x8
CALL 0x001092b0
MOV RDI,RAX
MOV ESI,0x241
MOV EDX,0x180
MOV AL,0x0
CALL 0x00109540
MOV ESI,EAX
LEA RDI,[RBP + -0xf0]
CALL 0x0010f7d0
LEA RDI,[RBP + -0xf0]
CALL 0x0010de50
XOR AL,0xff
MOV byte ptr [RBP + -0x159],0x0
TEST AL,0x1
JNZ 0x0010f4b2
JMP 0x0010f517
LAB_0010f4b2:
LEA RSI,[0x15114b]
LEA RDI,[RBP + -0x158]
MOV EDX,0x14d
CALL 0x00118db0
JMP 0x0010f4cc
LAB_0010f4cc:
MOV byte ptr [RBP + -0x159],0x1
LAB_0010f4d3:
LEA RDI,[RBP + -0x158]
CALL 0x001148e0
MOV qword ptr [RBP + -0x290],RAX
JMP 0x0010f4e8
LAB_0010f4e8:
MOV RDI,qword ptr [RBP + -0x290]
LEA RSI,[0x151275]
CALL 0x00109700
MOV qword ptr [RBP + -0x298],RAX
JMP 0x0010f504
LAB_0010f504:
MOV RSI,qword ptr [RBP + -0x298]
LEA RDI,[RBP + -0xf1]
CALL 0x0010ec60
LAB_0010f517:
TEST byte ptr [RBP + -0x159],0x1
JNZ 0x0010f522
JMP 0x0010f578
LAB_0010f522:
LEA RDI,[RBP + -0x158]
CALL 0x00118e20
JMP 0x0010f530
LAB_0010f530:
LEA RDI,[RBP + -0xe8]
CALL 0x00118e20
JMP 0x0010f53e
LAB_0010f53e:
JMP 0x0010f760
LAB_0010f578:
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001098b0
JMP 0x0010f583
LAB_0010f583:
LEA RDI,[RBP + -0xf0]
CALL 0x0010f7f0
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x238]
MOV ESI,dword ptr [RAX]
CALL 0x00109680
CMP EAX,-0x1
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x1c1],0x0
TEST AL,0x1
JNZ 0x0010f5b4
JMP 0x0010f619
LAB_0010f5b4:
LEA RSI,[0x15114b]
LEA RDI,[RBP + -0x1c0]
MOV EDX,0x151
CALL 0x00118db0
JMP 0x0010f5ce
LAB_0010f5ce:
MOV byte ptr [RBP + -0x1c1],0x1
LAB_0010f5d5:
LEA RDI,[RBP + -0x1c0]
CALL 0x001148e0
MOV qword ptr [RBP + -0x2a0],RAX
JMP 0x0010f5ea
LAB_0010f5ea:
MOV RDI,qword ptr [RBP + -0x2a0]
LEA RSI,[0x15128b]
CALL 0x00109700
MOV qword ptr [RBP + -0x2a8],RAX
JMP 0x0010f606
LAB_0010f606:
MOV RSI,qword ptr [RBP + -0x2a8]
LEA RDI,[RBP + -0x15a]
CALL 0x0010ec60
LAB_0010f619:
TEST byte ptr [RBP + -0x1c1],0x1
JNZ 0x0010f624
JMP 0x0010f666
LAB_0010f624:
LEA RDI,[RBP + -0x1c0]
CALL 0x00118e20
JMP 0x0010f632
LAB_0010f632:
LEA RDI,[RBP + -0x158]
CALL 0x00118e20
JMP 0x0010f640
LAB_0010f640:
JMP 0x0010f754
LAB_0010f666:
LEA RDI,[RBP + -0xf0]
CALL 0x0010f800
CMP EAX,-0x1
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x229],0x0
TEST AL,0x1
JNZ 0x0010f687
JMP 0x0010f6ec
LAB_0010f687:
LEA RSI,[0x15114b]
LEA RDI,[RBP + -0x228]
MOV EDX,0x152
CALL 0x00118db0
JMP 0x0010f6a1
LAB_0010f6a1:
MOV byte ptr [RBP + -0x229],0x1
LAB_0010f6a8:
LEA RDI,[RBP + -0x228]
CALL 0x001148e0
MOV qword ptr [RBP + -0x2b0],RAX
JMP 0x0010f6bd
LAB_0010f6bd:
MOV RDI,qword ptr [RBP + -0x2b0]
LEA RSI,[0x1512b8]
CALL 0x00109700
MOV qword ptr [RBP + -0x2b8],RAX
JMP 0x0010f6d9
LAB_0010f6d9:
MOV RSI,qword ptr [RBP + -0x2b8]
LEA RDI,[RBP + -0x1c2]
CALL 0x0010ec60
LAB_0010f6ec:
TEST byte ptr [RBP + -0x229],0x1
JNZ 0x0010f6f7
JMP 0x0010f72f
LAB_0010f6f7:
LEA RDI,[RBP + -0x228]
CALL 0x00118e20
JMP 0x0010f705
LAB_0010f705:
LEA RDI,[RBP + -0x1c0]
CALL 0x00118e20
JMP 0x0010f713
LAB_0010f713:
JMP 0x0010f754
LAB_0010f72f:
LEA RDI,[RBP + -0xf0]
CALL 0x0010de00
ADD RSP,0x2c0
POP RBP
RET
LAB_0010f754:
LEA RDI,[RBP + -0xf0]
CALL 0x0010de00
LAB_0010f760:
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x00109d40
|
/* nglog::CapturedStream::Capture() */
void __thiscall nglog::CapturedStream::Capture(CapturedStream *this)
{
bool bVar1;
int iVar2;
char *__file;
ostream *poVar3;
int1 auVar4 [12];
LogMessageFatal local_230 [102];
LogMessageVoidify local_1ca;
byte local_1c9;
LogMessageFatal local_1c8 [102];
LogMessageVoidify local_162;
byte local_161;
LogMessageFatal local_160 [103];
LogMessageVoidify local_f9;
FileDescriptor local_f8 [7];
byte local_f1;
LogMessageFatal local_f0 [99];
LogMessageVoidify local_8d;
int4 local_8c;
int8 local_88;
byte local_79;
LogMessageFatal local_78 [103];
LogMessageVoidify local_11;
CapturedStream *local_10;
local_10 = this;
bVar1 = tools::FileDescriptor::operator_cast_to_bool((FileDescriptor *)(this + 4));
local_79 = 0;
if (bVar1) {
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x146);
local_79 = 1;
/* try { // try from 0010f2ab to 0010f321 has its CatchHandler @ 0010f34c */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_78);
poVar3 = std::operator<<(poVar3,"Check failed: !uncaptured_fd_ ");
poVar3 = std::operator<<(poVar3,", Stream ");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(int *)this);
poVar3 = std::operator<<(poVar3," already captured!");
internal::LogMessageVoidify::operator&(&local_11,poVar3);
}
if ((local_79 & 1) == 0) {
iVar2 = dup(*(int *)this);
tools::FileDescriptor::reset((FileDescriptor *)(this + 4),iVar2);
bVar1 = tools::FileDescriptor::operator_cast_to_bool((FileDescriptor *)(this + 4));
local_f1 = 0;
if (((bVar1 ^ 0xffU) & 1) != 0) {
LogMessageFatal::LogMessageFatal
(local_f0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h"
,0x148);
local_f1 = 1;
/* try { // try from 0010f3e0 to 0010f400 has its CatchHandler @ 0010f444 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_f0);
poVar3 = std::operator<<(poVar3,"Check failed: uncaptured_fd_ ");
internal::LogMessageVoidify::operator&(&local_8d,poVar3);
}
if ((local_f1 & 1) == 0) {
__file = (char *)std::__cxx11::string::c_str();
iVar2 = open(__file,0x241,0x180);
tools::FileDescriptor::FileDescriptor(local_f8,iVar2);
bVar1 = tools::FileDescriptor::operator_cast_to_bool(local_f8);
local_161 = 0;
if (((bVar1 ^ 0xffU) & 1) != 0) {
/* try { // try from 0010f4b2 to 0010f4c9 has its CatchHandler @ 0010f543 */
LogMessageFatal::LogMessageFatal
(local_160,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x14d)
;
local_161 = 1;
/* try { // try from 0010f4d3 to 0010f4fa has its CatchHandler @ 0010f557 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_160);
poVar3 = std::operator<<(poVar3,"Check failed: cap_fd ");
internal::LogMessageVoidify::operator&(&local_f9,poVar3);
}
if ((local_161 & 1) == 0) {
/* try { // try from 0010f578 to 0010f5cb has its CatchHandler @ 0010f543 */
fflush((FILE *)0x0);
iVar2 = tools::FileDescriptor::get(local_f8);
iVar2 = dup2(iVar2,*(int *)this);
local_1c9 = 0;
if (iVar2 == -1) {
LogMessageFatal::LogMessageFatal
(local_1c8,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x151);
local_1c9 = 1;
/* try { // try from 0010f5d5 to 0010f5fc has its CatchHandler @ 0010f645 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_1c8);
poVar3 = std::operator<<(poVar3,"Check failed: dup2(cap_fd.get(), fd_) != -1 ");
internal::LogMessageVoidify::operator&(&local_162,poVar3);
}
if ((local_1c9 & 1) == 0) {
iVar2 = tools::FileDescriptor::close(local_f8);
if (iVar2 != -1) {
tools::FileDescriptor::~FileDescriptor(local_f8);
return;
}
/* try { // try from 0010f687 to 0010f69e has its CatchHandler @ 0010f543 */
LogMessageFatal::LogMessageFatal
(local_230,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x152);
/* try { // try from 0010f6a8 to 0010f6cf has its CatchHandler @ 0010f715 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_230);
poVar3 = std::operator<<(poVar3,"Check failed: cap_fd.close() != -1 ");
internal::LogMessageVoidify::operator&(&local_1ca,poVar3);
/* try { // try from 0010f6f7 to 0010f702 has its CatchHandler @ 0010f543 */
LogMessageFatal::~LogMessageFatal(local_230);
/* try { // try from 0010f705 to 0010f74f has its CatchHandler @ 0010f769 */
LogMessageFatal::~LogMessageFatal(local_1c8);
}
else {
/* try { // try from 0010f624 to 0010f62f has its CatchHandler @ 0010f543 */
LogMessageFatal::~LogMessageFatal(local_1c8);
/* try { // try from 0010f632 to 0010f63d has its CatchHandler @ 0010f769 */
LogMessageFatal::~LogMessageFatal(local_160);
}
tools::FileDescriptor::~FileDescriptor(local_f8);
auVar4._8_4_ = local_8c;
auVar4._0_8_ = local_88;
}
else {
/* try { // try from 0010f522 to 0010f52d has its CatchHandler @ 0010f543 */
LogMessageFatal::~LogMessageFatal(local_160);
/* try { // try from 0010f530 to 0010f53b has its CatchHandler @ 0010f769 */
LogMessageFatal::~LogMessageFatal(local_f0);
auVar4._8_4_ = local_8c;
auVar4._0_8_ = local_88;
}
goto LAB_0010f760;
}
LogMessageFatal::~LogMessageFatal(local_f0);
auVar4._8_4_ = local_8c;
auVar4._0_8_ = local_88;
}
else {
auVar4 = LogMessageFatal::~LogMessageFatal(local_78);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010f2ab with catch @ 0010f34c
*/
if ((local_79 & 1) == 0) goto LAB_0010f760;
}
/* try { // try from 0010f434 to 0010f43c has its CatchHandler @ 0010f769 */
local_8c = auVar4._8_4_;
local_88 = auVar4._0_8_;
LogMessageFatal::~LogMessageFatal(local_78);
auVar4._8_4_ = local_8c;
auVar4._0_8_ = local_88;
LAB_0010f760:
local_8c = auVar4._8_4_;
local_88 = auVar4._0_8_;
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_88);
}
| |
39,001 | nglog::CapturedStream::Capture() | ng-log[P]ng-log/src/googletest.h | void Capture() {
// Keep original stream for later
CHECK(!uncaptured_fd_) << ", Stream " << fd_ << " already captured!";
uncaptured_fd_.reset(dup(fd_));
CHECK(uncaptured_fd_);
// Open file to save stream to
FileDescriptor cap_fd{open(filename_.c_str(), O_CREAT | O_TRUNC | O_WRONLY,
S_IRUSR | S_IWUSR)};
CHECK(cap_fd);
// Send stdout/stderr to this file
fflush(nullptr);
CHECK(dup2(cap_fd.get(), fd_) != -1);
CHECK(cap_fd.close() != -1);
} | O1 | c | nglog::CapturedStream::Capture():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
cmpl $-0x1, 0x4(%rdi)
jne 0x9fde
leaq 0x4(%r14), %rbx
movl (%r14), %edi
callq 0x7890
movl %eax, %ebp
cmpl $-0x1, 0x4(%r14)
je 0x9f7e
movq %rbx, %rdi
callq 0x9bf0
movl %ebp, (%rbx)
cmpl $-0x1, %ebp
je 0xa04b
movq 0x8(%r14), %rdi
movl $0x241, %esi # imm = 0x241
movl $0x180, %edx # imm = 0x180
xorl %eax, %eax
callq 0x73b0
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xa08a
xorl %edi, %edi
callq 0x7640
movl (%r14), %esi
movl %ebp, %edi
callq 0x74c0
cmpl $-0x1, %eax
je 0xa0cb
movl %ebp, %edi
callq 0x7a60
cmpl $-0x1, %eax
je 0xa10c
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1917b(%rip), %rsi # 0x23160
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x146, %edx # imm = 0x146
callq 0xeff0
movq %rbx, %rdi
callq 0xb762
movq %rax, %r15
leaq 0x19227(%rip), %rsi # 0x23230
movl $0x1e, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x19232(%rip), %rsi # 0x2324f
movl $0x9, %edx
movq %r15, %rdi
callq 0x7600
movl (%r14), %esi
movq %r15, %rdi
callq 0x7990
leaq 0x1921d(%rip), %rsi # 0x23259
movl $0x12, %edx
movq %rax, %rdi
callq 0x7600
jmp 0xa080
leaq 0x1910e(%rip), %rsi # 0x23160
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x148, %edx # imm = 0x148
callq 0xeff0
movq %rbx, %rdi
callq 0xb762
leaq 0x191f9(%rip), %rsi # 0x2326c
movl $0x1d, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x8(%rsp), %rdi
callq 0xf034
leaq 0x190cf(%rip), %rsi # 0x23160
leaq 0x8(%rsp), %rdi
movl $0x14d, %edx # imm = 0x14D
callq 0xeff0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xb762
leaq 0x191d6(%rip), %rsi # 0x2328a
movl $0x15, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x8(%rsp), %rdi
callq 0xf034
leaq 0x1908e(%rip), %rsi # 0x23160
leaq 0x8(%rsp), %rdi
movl $0x151, %edx # imm = 0x151
callq 0xeff0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xb762
leaq 0x191ab(%rip), %rsi # 0x232a0
movl $0x2c, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x8(%rsp), %rdi
callq 0xf034
leaq 0x1904d(%rip), %rsi # 0x23160
leaq 0x8(%rsp), %rdi
movl $0x152, %edx # imm = 0x152
callq 0xeff0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xb762
leaq 0x19197(%rip), %rsi # 0x232cd
movl $0x23, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x8(%rsp), %rdi
callq 0xf034
jmp 0xa184
jmp 0xa17c
jmp 0xa17c
jmp 0xa17c
movq %rax, %rbx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0xa164
jmp 0xa161
movq %rax, %rbx
cmpl $-0x1, %ebp
je 0xa170
movl %ebp, %edi
callq 0x7a60
movq %rbx, %rdi
callq 0x79b0
jmp 0xa184
jmp 0xa17c
movq %rbx, %rdi
callq 0xf034
movq %rax, %rdi
callq 0x98b5
| _ZN5nglog14CapturedStream7CaptureEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
cmp dword ptr [rdi+4], 0FFFFFFFFh
jnz short loc_9FDE
lea rbx, [r14+4]
mov edi, [r14]
call _dup
mov ebp, eax
cmp dword ptr [r14+4], 0FFFFFFFFh
jz short loc_9F7E
mov rdi, rbx; this
call _ZN5nglog5tools14FileDescriptor12unsafe_closeEv; nglog::tools::FileDescriptor::unsafe_close(void)
loc_9F7E:
mov [rbx], ebp
cmp ebp, 0FFFFFFFFh
jz loc_A04B
mov rdi, [r14+8]
mov esi, 241h
mov edx, 180h
xor eax, eax
call _open
mov ebp, eax
cmp eax, 0FFFFFFFFh
jz loc_A08A
xor edi, edi
call _fflush
mov esi, [r14]
mov edi, ebp
call _dup2
cmp eax, 0FFFFFFFFh
jz loc_A0CB
mov edi, ebp
call _close
cmp eax, 0FFFFFFFFh
jz loc_A10C
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9FDE:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+88h+var_80]
mov rdi, rbx; this
mov edx, 146h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov r15, rax
lea rsi, aCheckFailedUnc; "Check failed: !uncaptured_fd_ "
mov edx, 1Eh
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aStream; ", Stream "
mov edx, 9
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aAlreadyCapture; " already captured!"
mov edx, 12h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_A080
loc_A04B:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+88h+var_80]
mov rdi, rbx; this
mov edx, 148h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedUnc_0; "Check failed: uncaptured_fd_ "
mov edx, 1Dh
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_A080:
lea rdi, [rsp+88h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A08A:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_80]; this
mov edx, 14Dh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_80]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedCap_0; "Check failed: cap_fd "
mov edx, 15h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+88h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A0CB:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_80]; this
mov edx, 151h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_80]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedDup; "Check failed: dup2(cap_fd.get(), fd_) !"...
mov edx, 2Ch ; ','
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+88h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A10C:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_80]; this
mov edx, 152h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_80]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedCap_1; "Check failed: cap_fd.close() != -1 "
mov edx, 23h ; '#'
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+88h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short loc_A184
jmp short loc_A17C
jmp short loc_A17C
jmp short loc_A17C
mov rbx, rax
mov ebp, 0FFFFFFFFh
jmp short loc_A164
jmp short $+2
loc_A161:
mov rbx, rax
loc_A164:
cmp ebp, 0FFFFFFFFh
jz short loc_A170
mov edi, ebp
call _close
loc_A170:
mov rdi, rbx
call __Unwind_Resume
jmp short loc_A184
jmp short $+2
loc_A17C:
mov rdi, rbx; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A184:
mov rdi, rax
call __clang_call_terminate
| long long nglog::CapturedStream::Capture(nglog::CapturedStream *this)
{
int v1; // ebp
unsigned int v2; // ebp
long long result; // rax
long long v4; // r15
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
_BYTE v10[128]; // [rsp+8h] [rbp-80h] BYREF
if ( *((_DWORD *)this + 1) != -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v10,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
326);
v4 = nglog::LogMessage::stream((nglog::LogMessage *)v10);
std::__ostream_insert<char,std::char_traits<char>>(v4, "Check failed: !uncaptured_fd_ ", 30LL);
std::__ostream_insert<char,std::char_traits<char>>(v4, ", Stream ", 9LL);
v5 = std::ostream::operator<<(v4, *(unsigned int *)this);
std::__ostream_insert<char,std::char_traits<char>>(v5, " already captured!", 18LL);
goto LABEL_11;
}
v1 = dup(*(unsigned int *)this);
if ( *((_DWORD *)this + 1) != -1 )
nglog::tools::FileDescriptor::unsafe_close((nglog::CapturedStream *)((char *)this + 4));
*((_DWORD *)this + 1) = v1;
if ( v1 == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v10,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
328);
v6 = nglog::LogMessage::stream((nglog::LogMessage *)v10);
std::__ostream_insert<char,std::char_traits<char>>(v6, "Check failed: uncaptured_fd_ ", 29LL);
LABEL_11:
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10);
}
v2 = open(*((_QWORD *)this + 1), 577LL, 384LL);
if ( v2 == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v10,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
333);
v7 = nglog::LogMessage::stream((nglog::LogMessage *)v10);
std::__ostream_insert<char,std::char_traits<char>>(v7, "Check failed: cap_fd ", 21LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10);
}
fflush(0LL);
if ( (unsigned int)dup2(v2, *(unsigned int *)this) == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v10,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
337);
v8 = nglog::LogMessage::stream((nglog::LogMessage *)v10);
std::__ostream_insert<char,std::char_traits<char>>(v8, "Check failed: dup2(cap_fd.get(), fd_) != -1 ", 44LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10);
}
result = close(v2);
if ( (_DWORD)result == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v10,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
338);
v9 = nglog::LogMessage::stream((nglog::LogMessage *)v10);
std::__ostream_insert<char,std::char_traits<char>>(v9, "Check failed: cap_fd.close() != -1 ", 35LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10);
}
return result;
}
| Capture:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
CMP dword ptr [RDI + 0x4],-0x1
JNZ 0x00109fde
LEA RBX,[R14 + 0x4]
MOV EDI,dword ptr [R14]
CALL 0x00107890
MOV EBP,EAX
CMP dword ptr [R14 + 0x4],-0x1
JZ 0x00109f7e
MOV RDI,RBX
CALL 0x00109bf0
LAB_00109f7e:
MOV dword ptr [RBX],EBP
CMP EBP,-0x1
JZ 0x0010a04b
MOV RDI,qword ptr [R14 + 0x8]
MOV ESI,0x241
MOV EDX,0x180
XOR EAX,EAX
CALL 0x001073b0
MOV EBP,EAX
CMP EAX,-0x1
JZ 0x0010a08a
XOR EDI,EDI
CALL 0x00107640
MOV ESI,dword ptr [R14]
MOV EDI,EBP
CALL 0x001074c0
CMP EAX,-0x1
JZ 0x0010a0cb
LAB_00109fc3:
MOV EDI,EBP
CALL 0x00107a60
LAB_00109fca:
CMP EAX,-0x1
JZ 0x0010a10c
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00109fde:
LEA RSI,[0x123160]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,0x146
CALL 0x0010eff0
LAB_00109ff7:
MOV RDI,RBX
CALL 0x0010b762
MOV R15,RAX
LEA RSI,[0x123230]
MOV EDX,0x1e
MOV RDI,RAX
CALL 0x00107600
LEA RSI,[0x12324f]
MOV EDX,0x9
MOV RDI,R15
CALL 0x00107600
MOV ESI,dword ptr [R14]
MOV RDI,R15
CALL 0x00107990
LEA RSI,[0x123259]
MOV EDX,0x12
MOV RDI,RAX
CALL 0x00107600
LAB_0010a049:
JMP 0x0010a080
LAB_0010a04b:
LEA RSI,[0x123160]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,0x148
CALL 0x0010eff0
LAB_0010a064:
MOV RDI,RBX
CALL 0x0010b762
LEA RSI,[0x12326c]
MOV EDX,0x1d
MOV RDI,RAX
CALL 0x00107600
LAB_0010a080:
LEA RDI,[RSP + 0x8]
CALL 0x0010f034
LAB_0010a08a:
LEA RSI,[0x123160]
LEA RDI,[RSP + 0x8]
MOV EDX,0x14d
CALL 0x0010eff0
LAB_0010a0a0:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b762
LEA RSI,[0x12328a]
MOV EDX,0x15
MOV RDI,RAX
CALL 0x00107600
LAB_0010a0c1:
LEA RDI,[RSP + 0x8]
CALL 0x0010f034
LAB_0010a0cb:
LEA RSI,[0x123160]
LEA RDI,[RSP + 0x8]
MOV EDX,0x151
CALL 0x0010eff0
LAB_0010a0e1:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b762
LEA RSI,[0x1232a0]
MOV EDX,0x2c
MOV RDI,RAX
CALL 0x00107600
LAB_0010a102:
LEA RDI,[RSP + 0x8]
CALL 0x0010f034
LAB_0010a10c:
LEA RSI,[0x123160]
LEA RDI,[RSP + 0x8]
MOV EDX,0x152
CALL 0x0010eff0
LAB_0010a122:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b762
LEA RSI,[0x1232cd]
MOV EDX,0x23
MOV RDI,RAX
CALL 0x00107600
LAB_0010a143:
LEA RDI,[RSP + 0x8]
CALL 0x0010f034
LAB_0010a14d:
JMP 0x0010a184
LAB_0010a184:
MOV RDI,RAX
CALL 0x001098b5
|
/* nglog::CapturedStream::Capture() */
void __thiscall nglog::CapturedStream::Capture(CapturedStream *this)
{
int iVar1;
int iVar2;
ostream *poVar3;
int8 uVar4;
LogMessageFatal local_80 [96];
if (*(int *)(this + 4) == -1) {
iVar1 = dup(*(int *)this);
if (*(int *)(this + 4) != -1) {
tools::FileDescriptor::unsafe_close((FileDescriptor *)(this + 4));
}
*(int *)(this + 4) = iVar1;
if (iVar1 == -1) {
LogMessageFatal::LogMessageFatal
(local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h"
,0x148);
/* try { // try from 0010a064 to 0010a07f has its CatchHandler @ 0010a17a */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80);
std::__ostream_insert<char,std::char_traits<char>>
(poVar3,"Check failed: uncaptured_fd_ ",0x1d);
goto LAB_0010a080;
}
iVar1 = open(*(char **)(this + 8),0x241,0x180);
if (iVar1 == -1) goto LAB_0010a08a;
fflush((FILE *)0x0);
iVar2 = dup2(iVar1,*(int *)this);
if (iVar2 != -1) {
/* try { // try from 00109fc3 to 00109fc9 has its CatchHandler @ 0010a14d */
iVar1 = close(iVar1);
if (iVar1 != -1) {
return;
}
goto LAB_0010a10c;
}
}
else {
LogMessageFatal::LogMessageFatal
(local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x146);
/* try { // try from 00109ff7 to 0010a048 has its CatchHandler @ 0010a17c */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: !uncaptured_fd_ ",0x1e)
;
std::__ostream_insert<char,std::char_traits<char>>(poVar3,", Stream ",9);
poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(int *)this);
std::__ostream_insert<char,std::char_traits<char>>(poVar3," already captured!",0x12);
LAB_0010a080:
LogMessageFatal::~LogMessageFatal(local_80);
LAB_0010a08a:
/* try { // try from 0010a08a to 0010a09f has its CatchHandler @ 0010a161 */
LogMessageFatal::LogMessageFatal
(local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x14d);
/* try { // try from 0010a0a0 to 0010a0c0 has its CatchHandler @ 0010a153 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: cap_fd ",0x15);
/* try { // try from 0010a0c1 to 0010a0ca has its CatchHandler @ 0010a161 */
LogMessageFatal::~LogMessageFatal(local_80);
}
/* try { // try from 0010a0cb to 0010a0e0 has its CatchHandler @ 0010a15f */
LogMessageFatal::LogMessageFatal
(local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x151);
/* try { // try from 0010a0e1 to 0010a101 has its CatchHandler @ 0010a151 */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80);
std::__ostream_insert<char,std::char_traits<char>>
(poVar3,"Check failed: dup2(cap_fd.get(), fd_) != -1 ",0x2c);
/* try { // try from 0010a102 to 0010a10b has its CatchHandler @ 0010a15f */
LogMessageFatal::~LogMessageFatal(local_80);
LAB_0010a10c:
/* try { // try from 0010a10c to 0010a121 has its CatchHandler @ 0010a155 */
LogMessageFatal::LogMessageFatal
(local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x152);
/* try { // try from 0010a122 to 0010a142 has its CatchHandler @ 0010a14f */
poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80);
std::__ostream_insert<char,std::char_traits<char>>
(poVar3,"Check failed: cap_fd.close() != -1 ",0x23);
/* try { // try from 0010a143 to 0010a14c has its CatchHandler @ 0010a155 */
uVar4 = LogMessageFatal::~LogMessageFatal(local_80);
/* catch(type#1 @ 00000000) { ... } // from try @ 00109fc3 with catch @ 0010a14d
*/
/* catch(type#1 @ 00000000) { ... } // from try @ 0010a17c with catch @ 0010a184
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar4);
}
| |
39,002 | nglog::CapturedStream::Capture() | ng-log[P]ng-log/src/googletest.h | void Capture() {
// Keep original stream for later
CHECK(!uncaptured_fd_) << ", Stream " << fd_ << " already captured!";
uncaptured_fd_.reset(dup(fd_));
CHECK(uncaptured_fd_);
// Open file to save stream to
FileDescriptor cap_fd{open(filename_.c_str(), O_CREAT | O_TRUNC | O_WRONLY,
S_IRUSR | S_IWUSR)};
CHECK(cap_fd);
// Send stdout/stderr to this file
fflush(nullptr);
CHECK(dup2(cap_fd.get(), fd_) != -1);
CHECK(cap_fd.close() != -1);
} | O2 | c | nglog::CapturedStream::Capture():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %r14
cmpl $-0x1, 0x4(%rdi)
jne 0xa916
leaq 0x4(%r14), %rbx
movl (%r14), %edi
callq 0x8920
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa478
movl %ebp, 0x4(%r14)
cmpl $-0x1, %ebp
je 0xa971
movq 0x8(%r14), %rdi
movl $0x241, %esi # imm = 0x241
movl $0x180, %edx # imm = 0x180
xorl %eax, %eax
callq 0x8420
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0xa9ab
movl %eax, %ebx
xorl %edi, %edi
callq 0x86c0
movl (%r14), %esi
movl %ebx, %edi
callq 0x8540
cmpl $-0x1, %eax
je 0xa9e7
leaq 0xc(%rsp), %rdi
callq 0xa482
cmpl $-0x1, %eax
je 0xaa23
leaq 0xc(%rsp), %rdi
callq 0xa478
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x15858(%rip), %rsi # 0x20175
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x146, %edx # imm = 0x146
callq 0xe426
movq %rbx, %rdi
callq 0xbd5e
leaq 0x15907(%rip), %rsi # 0x20245
movq %rax, %rdi
callq 0x8590
leaq 0x15917(%rip), %rsi # 0x20264
movq %rax, %rdi
callq 0x8590
movl (%r14), %esi
movq %rax, %rdi
callq 0x8a20
leaq 0x15907(%rip), %rsi # 0x2026e
movq %rax, %rdi
callq 0x8590
jmp 0xa9a1
leaq 0x157fd(%rip), %rsi # 0x20175
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x148, %edx # imm = 0x148
callq 0xe426
movq %rbx, %rdi
callq 0xbd5e
leaq 0x158e8(%rip), %rsi # 0x20281
movq %rax, %rdi
callq 0x8590
leaq 0x10(%rsp), %rdi
callq 0xe434
leaq 0x157c3(%rip), %rsi # 0x20175
leaq 0x10(%rsp), %rdi
movl $0x14d, %edx # imm = 0x14D
callq 0xe426
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xbd5e
leaq 0x158ca(%rip), %rsi # 0x2029f
movq %rax, %rdi
callq 0x8590
leaq 0x10(%rsp), %rdi
callq 0xe434
leaq 0x15787(%rip), %rsi # 0x20175
leaq 0x10(%rsp), %rdi
movl $0x151, %edx # imm = 0x151
callq 0xe426
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xbd5e
leaq 0x158a4(%rip), %rsi # 0x202b5
movq %rax, %rdi
callq 0x8590
leaq 0x10(%rsp), %rdi
callq 0xe434
leaq 0x1574b(%rip), %rsi # 0x20175
leaq 0x10(%rsp), %rdi
movl $0x152, %edx # imm = 0x152
callq 0xe426
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xbd5e
leaq 0x15895(%rip), %rsi # 0x202e2
movq %rax, %rdi
callq 0x8590
leaq 0x10(%rsp), %rdi
callq 0xe434
jmp 0xaa80
jmp 0xaa80
jmp 0xaa80
jmp 0xaa69
jmp 0xaa69
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0xa478
movq %rbx, %rdi
callq 0x8a40
jmp 0xaa80
movq %rbx, %rdi
callq 0xe434
movq %rax, %rdi
callq 0xa24f
| _ZN5nglog14CapturedStream7CaptureEv:
push rbp
push r14
push rbx
sub rsp, 70h
mov r14, rdi
cmp dword ptr [rdi+4], 0FFFFFFFFh
jnz loc_A916
lea rbx, [r14+4]
mov edi, [r14]
call _dup
mov ebp, eax
mov rdi, rbx; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov [r14+4], ebp
cmp ebp, 0FFFFFFFFh
jz loc_A971
mov rdi, [r14+8]
mov esi, 241h
mov edx, 180h
xor eax, eax
call _open
mov [rsp+88h+var_7C], eax
cmp eax, 0FFFFFFFFh
jz loc_A9AB
mov ebx, eax
xor edi, edi
call _fflush
mov esi, [r14]
mov edi, ebx
call _dup2
cmp eax, 0FFFFFFFFh
jz loc_A9E7
lea rdi, [rsp+88h+var_7C]; this
call _ZN5nglog5tools14FileDescriptor12unsafe_closeEv; nglog::tools::FileDescriptor::unsafe_close(void)
cmp eax, 0FFFFFFFFh
jz loc_AA23
lea rdi, [rsp+88h+var_7C]; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_A916:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+88h+var_78]
mov rdi, rbx; this
mov edx, 146h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedUnc; "Check failed: !uncaptured_fd_ "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aStream; ", Stream "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aAlreadyCapture; " already captured!"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short loc_A9A1
loc_A971:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rbx, [rsp+88h+var_78]
mov rdi, rbx; this
mov edx, 148h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedUnc_0; "Check failed: uncaptured_fd_ "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_A9A1:
lea rdi, [rsp+88h+var_78]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A9AB:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_78]; this
mov edx, 14Dh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_78]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedCap_0; "Check failed: cap_fd "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+88h+var_78]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_A9E7:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_78]; this
mov edx, 151h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_78]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedDup; "Check failed: dup2(cap_fd.get(), fd_) !"...
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+88h+var_78]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_AA23:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+88h+var_78]; this
mov edx, 152h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
lea rbx, [rsp+88h+var_78]
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedCap_1; "Check failed: cap_fd.close() != -1 "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+88h+var_78]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short loc_AA80
jmp short loc_AA80
jmp short loc_AA80
jmp short loc_AA69
jmp short $+2
loc_AA69:
mov rbx, rax
lea rdi, [rsp+88h+var_7C]; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov rdi, rbx
call __Unwind_Resume
jmp short $+2
loc_AA80:
mov rdi, rbx; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
| long long nglog::CapturedStream::Capture(nglog::CapturedStream *this)
{
int v1; // ebp
unsigned int v2; // eax
unsigned int v3; // ebx
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
unsigned int v13; // [rsp+Ch] [rbp-7Ch] BYREF
_BYTE v14[120]; // [rsp+10h] [rbp-78h] BYREF
if ( *((_DWORD *)this + 1) != -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v14,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
326);
v5 = nglog::LogMessage::stream((nglog::LogMessage *)v14);
v6 = std::operator<<<std::char_traits<char>>(v5, "Check failed: !uncaptured_fd_ ");
v7 = std::operator<<<std::char_traits<char>>(v6, ", Stream ");
v8 = std::ostream::operator<<(v7, *(unsigned int *)this);
std::operator<<<std::char_traits<char>>(v8, " already captured!");
goto LABEL_9;
}
v1 = dup(*(unsigned int *)this);
nglog::tools::FileDescriptor::safe_close((nglog::CapturedStream *)((char *)this + 4));
*((_DWORD *)this + 1) = v1;
if ( v1 == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v14,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
328);
v9 = nglog::LogMessage::stream((nglog::LogMessage *)v14);
std::operator<<<std::char_traits<char>>(v9, "Check failed: uncaptured_fd_ ");
LABEL_9:
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v14);
}
v2 = open(*((_QWORD *)this + 1), 577LL, 384LL);
v13 = v2;
if ( v2 == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v14,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
333);
v10 = nglog::LogMessage::stream((nglog::LogMessage *)v14);
std::operator<<<std::char_traits<char>>(v10, "Check failed: cap_fd ");
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v14);
}
v3 = v2;
fflush(0LL);
if ( (unsigned int)dup2(v3, *(unsigned int *)this) == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v14,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
337);
v11 = nglog::LogMessage::stream((nglog::LogMessage *)v14);
std::operator<<<std::char_traits<char>>(v11, "Check failed: dup2(cap_fd.get(), fd_) != -1 ");
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v14);
}
if ( (unsigned int)nglog::tools::FileDescriptor::unsafe_close((nglog::tools::FileDescriptor *)&v13) == -1 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v14,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
338);
v12 = nglog::LogMessage::stream((nglog::LogMessage *)v14);
std::operator<<<std::char_traits<char>>(v12, "Check failed: cap_fd.close() != -1 ");
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v14);
}
return nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)&v13);
}
| Capture:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDI
CMP dword ptr [RDI + 0x4],-0x1
JNZ 0x0010a916
LEA RBX,[R14 + 0x4]
MOV EDI,dword ptr [R14]
CALL 0x00108920
MOV EBP,EAX
MOV RDI,RBX
CALL 0x0010a478
MOV dword ptr [R14 + 0x4],EBP
CMP EBP,-0x1
JZ 0x0010a971
MOV RDI,qword ptr [R14 + 0x8]
MOV ESI,0x241
MOV EDX,0x180
XOR EAX,EAX
CALL 0x00108420
MOV dword ptr [RSP + 0xc],EAX
CMP EAX,-0x1
JZ 0x0010a9ab
MOV EBX,EAX
XOR EDI,EDI
CALL 0x001086c0
MOV ESI,dword ptr [R14]
MOV EDI,EBX
CALL 0x00108540
CMP EAX,-0x1
JZ 0x0010a9e7
LEA RDI,[RSP + 0xc]
CALL 0x0010a482
CMP EAX,-0x1
JZ 0x0010aa23
LEA RDI,[RSP + 0xc]
CALL 0x0010a478
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0010a916:
LEA RSI,[0x120175]
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
MOV EDX,0x146
CALL 0x0010e426
LAB_0010a92f:
MOV RDI,RBX
CALL 0x0010bd5e
LEA RSI,[0x120245]
MOV RDI,RAX
CALL 0x00108590
LEA RSI,[0x120264]
MOV RDI,RAX
CALL 0x00108590
MOV ESI,dword ptr [R14]
MOV RDI,RAX
CALL 0x00108a20
LEA RSI,[0x12026e]
MOV RDI,RAX
CALL 0x00108590
LAB_0010a96f:
JMP 0x0010a9a1
LAB_0010a971:
LEA RSI,[0x120175]
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
MOV EDX,0x148
CALL 0x0010e426
LAB_0010a98a:
MOV RDI,RBX
CALL 0x0010bd5e
LEA RSI,[0x120281]
MOV RDI,RAX
CALL 0x00108590
LAB_0010a9a1:
LEA RDI,[RSP + 0x10]
CALL 0x0010e434
LAB_0010a9ab:
LEA RSI,[0x120175]
LEA RDI,[RSP + 0x10]
MOV EDX,0x14d
CALL 0x0010e426
LAB_0010a9c1:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0010bd5e
LEA RSI,[0x12029f]
MOV RDI,RAX
CALL 0x00108590
LAB_0010a9dd:
LEA RDI,[RSP + 0x10]
CALL 0x0010e434
LAB_0010a9e7:
LEA RSI,[0x120175]
LEA RDI,[RSP + 0x10]
MOV EDX,0x151
CALL 0x0010e426
LAB_0010a9fd:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0010bd5e
LEA RSI,[0x1202b5]
MOV RDI,RAX
CALL 0x00108590
LAB_0010aa19:
LEA RDI,[RSP + 0x10]
CALL 0x0010e434
LAB_0010aa23:
LEA RSI,[0x120175]
LEA RDI,[RSP + 0x10]
MOV EDX,0x152
CALL 0x0010e426
LAB_0010aa39:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0010bd5e
LEA RSI,[0x1202e2]
MOV RDI,RAX
CALL 0x00108590
LAB_0010aa55:
LEA RDI,[RSP + 0x10]
CALL 0x0010e434
LAB_0010aa5f:
JMP 0x0010aa80
LAB_0010aa80:
MOV RDI,RBX
CALL 0x0010e434
LAB_0010aa88:
MOV RDI,RAX
CALL 0x0010a24f
|
/* nglog::CapturedStream::Capture() */
void __thiscall nglog::CapturedStream::Capture(CapturedStream *this)
{
int iVar1;
ostream *poVar2;
int8 uVar3;
int local_7c;
LogMessageFatal local_78 [96];
if (*(int *)(this + 4) == -1) {
iVar1 = dup(*(int *)this);
tools::FileDescriptor::safe_close((FileDescriptor *)(this + 4));
*(int *)(this + 4) = iVar1;
if (iVar1 == -1) {
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h"
,0x148);
/* try { // try from 0010a98a to 0010a9a0 has its CatchHandler @ 0010aa7e */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
std::operator<<(poVar2,"Check failed: uncaptured_fd_ ");
goto LAB_0010a9a1;
}
iVar1 = open(*(char **)(this + 8),0x241,0x180);
local_7c = iVar1;
if (iVar1 == -1) goto LAB_0010a9ab;
fflush((FILE *)0x0);
iVar1 = dup2(iVar1,*(int *)this);
if (iVar1 != -1) {
iVar1 = tools::FileDescriptor::unsafe_close((FileDescriptor *)&local_7c);
if (iVar1 != -1) {
tools::FileDescriptor::safe_close((FileDescriptor *)&local_7c);
return;
}
goto LAB_0010aa23;
}
}
else {
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x146);
/* try { // try from 0010a92f to 0010a96e has its CatchHandler @ 0010aa80 */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
poVar2 = std::operator<<(poVar2,"Check failed: !uncaptured_fd_ ");
poVar2 = std::operator<<(poVar2,", Stream ");
poVar2 = (ostream *)std::ostream::operator<<(poVar2,*(int *)this);
std::operator<<(poVar2," already captured!");
LAB_0010a9a1:
LogMessageFatal::~LogMessageFatal(local_78);
LAB_0010a9ab:
/* try { // try from 0010a9ab to 0010a9c0 has its CatchHandler @ 0010aa69 */
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x14d);
/* try { // try from 0010a9c1 to 0010a9dc has its CatchHandler @ 0010aa63 */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
std::operator<<(poVar2,"Check failed: cap_fd ");
/* try { // try from 0010a9dd to 0010a9e6 has its CatchHandler @ 0010aa69 */
LogMessageFatal::~LogMessageFatal(local_78);
}
/* try { // try from 0010a9e7 to 0010a9fc has its CatchHandler @ 0010aa67 */
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x151);
/* try { // try from 0010a9fd to 0010aa18 has its CatchHandler @ 0010aa61 */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
std::operator<<(poVar2,"Check failed: dup2(cap_fd.get(), fd_) != -1 ");
/* try { // try from 0010aa19 to 0010aa22 has its CatchHandler @ 0010aa67 */
LogMessageFatal::~LogMessageFatal(local_78);
LAB_0010aa23:
/* try { // try from 0010aa23 to 0010aa38 has its CatchHandler @ 0010aa65 */
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",
0x152);
/* try { // try from 0010aa39 to 0010aa54 has its CatchHandler @ 0010aa5f */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
std::operator<<(poVar2,"Check failed: cap_fd.close() != -1 ");
/* try { // try from 0010aa55 to 0010aa5e has its CatchHandler @ 0010aa65 */
LogMessageFatal::~LogMessageFatal(local_78);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010aa39 with catch @ 0010aa5f
*/
/* catch(type#1 @ 00000000) { ... } // from try @ 0010a92f with catch @ 0010aa80
try { // try from 0010aa80 to 0010aa87 has its CatchHandler @ 0010aa88 */
uVar3 = LogMessageFatal::~LogMessageFatal(local_78);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010aa80 with catch @ 0010aa88
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar3);
}
| |
39,003 | aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(std::shared_ptr<aimrt::channel::Context> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*, unsigned long) const | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/channel/channel_backend_tools.h | void DoSubscribeCallback(
const std::shared_ptr<aimrt::channel::Context>& ctx_ptr,
const std::string& serialization_type,
const void* data, size_t len) const {
bool need_cache_flag =
(require_cache_serialization_types_.find(serialization_type) != require_cache_serialization_types_.end());
if (!need_cache_flag) {
aimrt::util::BufferArrayView buffer_array_view(data, len);
DoSubscribeCallbackWithoutCache(ctx_ptr, serialization_type, buffer_array_view);
} else {
std::unique_ptr<std::vector<uint8_t>> buffer_ptr = std::make_unique<std::vector<uint8_t>>(len);
memcpy(buffer_ptr->data(), data, len);
auto* ptr = buffer_ptr.get();
auto buffer_array_view_ptr = std::shared_ptr<aimrt::util::BufferArrayView>(
new aimrt::util::BufferArrayView(ptr->data(), ptr->size()),
[buffer_ptr{std::move(buffer_ptr)}](const auto* ptr) { delete ptr; });
DoSubscribeCallbackWithCache(ctx_ptr, serialization_type, buffer_array_view_ptr);
}
} | O3 | c | aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(std::shared_ptr<aimrt::channel::Context> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*, unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x18, %rdi
movq %rdx, %rsi
callq 0x91ac0
testq %rax, %rax
je 0x1bad3a
movl $0x18, %edi
callq 0x926f0
movq %rax, %r12
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
movq %r13, %rsi
callq 0x93f70
movq %r12, 0x8(%rsp)
movq (%r12), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x91f00
movl $0x28, %edi
callq 0x926f0
movq %rax, %r13
movq (%r12), %rsi
movq 0x8(%r12), %rdx
subq %rsi, %rdx
movq %rax, %rdi
callq 0x115bf0
movq 0x8(%rsp), %rax
movq %rsp, %rdx
movq %rax, (%rdx)
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x1baf5a
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x1bacfa
movq %rsp, %rdi
callq 0x91bb0
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x115cb4
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1bad24
callq 0x91e40
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x1bad75
leaq 0x8(%rsp), %rdi
callq 0x91bb0
jmp 0x1bad75
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x115bf0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x1158e2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1bad75
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x927a0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1bae0b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0x1bae06
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1baddd
callq 0x91e40
jmp 0x1baddd
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x1badc3
movq %rsp, %rdi
callq 0x91bb0
movq $0x0, (%rsp)
jmp 0x1baddd
movq %rax, %rbx
movl $0x28, %esi
movq %r13, %rdi
callq 0x927a0
movq 0x8(%rsp), %r12
testq %r12, %r12
jne 0x1badec
jmp 0x1bae0b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x91bb0
jmp 0x1bae0b
movq %rax, %rbx
movl $0x18, %esi
movq %r12, %rdi
callq 0x927a0
movq %rbx, %rdi
callq 0x945e0
nop
| _ZNK5aimrt7runtime4core7channel13SubscribeTool19DoSubscribeCallbackERKSt10shared_ptrINS_7channel7ContextEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov rbp, rcx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
add rdi, 18h
mov rsi, rdx
call __ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&)
test rax, rax
jz loc_1BAD3A
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rdx, [rsp+68h+var_58]
mov rdi, rax
mov rsi, r13
call __ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
mov [rsp+68h+var_60], r12
mov rdi, [r12]
mov rsi, rbp
mov rdx, r13
call _memcpy
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rsi, [r12]; void *
mov rdx, [r12+8]
sub rdx, rsi; unsigned __int64
mov rdi, rax; this
call _ZN5aimrt4util15BufferArrayViewC2EPKvm; aimrt::util::BufferArrayView::BufferArrayView(void const*,ulong)
mov rax, [rsp+68h+var_60]
mov rdx, rsp
mov [rdx], rax
mov [rsp+68h+var_60], 0
lea rdi, [rsp+68h+var_58]
mov rsi, r13
call _ZNSt10shared_ptrIN5aimrt4util15BufferArrayViewEEC2IS2_ZNKS0_7runtime4core7channel13SubscribeTool19DoSubscribeCallbackERKS_INS0_7channel7ContextEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvmEUlPKT_E_vEEPSO_T0_; std::shared_ptr<aimrt::util::BufferArrayView>::shared_ptr<aimrt::util::BufferArrayView,aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(std::shared_ptr const&<aimrt::channel::Context>,std::string const&,void const*,ulong)::{lambda(aimrt::util::BufferArrayView const*)#1},void>(aimrt::util::BufferArrayView*,aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(std::shared_ptr const&<aimrt::channel::Context>,std::string const&,void const*,ulong)::{lambda(aimrt::util::BufferArrayView const*)#1})
mov rsi, [rsp+68h+var_68]
test rsi, rsi
jz short loc_1BACFA
mov rdi, rsp
call __ZNKSt14default_deleteISt6vectorIhSaIhEEEclEPS2_; std::default_delete<std::vector<uchar>>::operator()(std::vector<uchar>*)
loc_1BACFA:
mov [rsp+68h+var_68], 0
lea rcx, [rsp+68h+var_58]
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _ZNK5aimrt7runtime4core7channel13SubscribeTool28DoSubscribeCallbackWithCacheERKSt10shared_ptrINS_7channel7ContextEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_INS_4util15BufferArrayViewEE; aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallbackWithCache(std::shared_ptr<aimrt::channel::Context> const&,std::string const&,std::shared_ptr const&<aimrt::util::BufferArrayView>)
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_1BAD24
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_1BAD24:
mov rsi, [rsp+68h+var_60]
test rsi, rsi
jz short loc_1BAD75
lea rdi, [rsp+68h+var_60]
call __ZNKSt14default_deleteISt6vectorIhSaIhEEEclEPS2_; std::default_delete<std::vector<uchar>>::operator()(std::vector<uchar>*)
jmp short loc_1BAD75
loc_1BAD3A:
lea r12, [rsp+68h+var_58]
mov rdi, r12; this
mov rsi, rbp; void *
mov rdx, r13; unsigned __int64
call _ZN5aimrt4util15BufferArrayViewC2EPKvm; aimrt::util::BufferArrayView::BufferArrayView(void const*,ulong)
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov rcx, r12
call _ZNK5aimrt7runtime4core7channel13SubscribeTool31DoSubscribeCallbackWithoutCacheERKSt10shared_ptrINS_7channel7ContextEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4util15BufferArrayViewE; aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallbackWithoutCache(std::shared_ptr<aimrt::channel::Context> const&,std::string const&,aimrt::util::BufferArrayView const&)
mov rdi, [rsp+68h+var_58]; void *
test rdi, rdi
jz short loc_1BAD75
mov rsi, [rsp+68h+var_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BAD75:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_1BAE0B
mov rsi, [rsp+arg_18]
sub rsi, rdi
jmp short loc_1BAE06
mov rbx, rax
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_1BADDD
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_1BADDD
mov rbx, rax
mov rsi, [rsp+0]
test rsi, rsi
jz short loc_1BADC3
mov rdi, rsp
call __ZNKSt14default_deleteISt6vectorIhSaIhEEEclEPS2_; std::default_delete<std::vector<uchar>>::operator()(std::vector<uchar>*)
loc_1BADC3:
mov qword ptr [rsp+0], 0
jmp short loc_1BADDD
mov rbx, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_1BADDD:
mov r12, [rsp+arg_0]
test r12, r12
jnz short loc_1BADEC
jmp short loc_1BAE0B
mov rbx, rax
loc_1BADEC:
lea rdi, [rsp+arg_0]
mov rsi, r12
call __ZNKSt14default_deleteISt6vectorIhSaIhEEEclEPS2_; std::default_delete<std::vector<uchar>>::operator()(std::vector<uchar>*)
jmp short loc_1BAE0B
mov rbx, rax
mov esi, 18h; unsigned __int64
mov rdi, r12; void *
loc_1BAE06:
call __ZdlPvm; operator delete(void *,ulong)
loc_1BAE0B:
mov rdi, rbx
call __Unwind_Resume
| void aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(
long long **a1,
long long *a2,
_QWORD *a3,
const void *a4,
long long a5)
{
_QWORD *v8; // r12
aimrt::util::BufferArrayView *v9; // rax
int v10; // r13d
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // [rsp+0h] [rbp-68h] BYREF
_QWORD *v15; // [rsp+8h] [rbp-60h] BYREF
void *v16; // [rsp+10h] [rbp-58h] BYREF
long long v17; // [rsp+18h] [rbp-50h]
long long v18; // [rsp+20h] [rbp-48h]
if ( std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(
a1 + 3,
a3) )
{
v8 = (_QWORD *)operator new(0x18uLL);
std::vector<unsigned char>::vector(v8, a5, &v16);
v15 = v8;
memcpy(*v8);
v9 = (aimrt::util::BufferArrayView *)operator new(0x28uLL);
v10 = (int)v9;
aimrt::util::BufferArrayView::BufferArrayView(v9, (const void *)*v8, v8[1] - *v8);
v15 = 0LL;
std::shared_ptr<aimrt::util::BufferArrayView>::shared_ptr<aimrt::util::BufferArrayView,aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallback(std::shared_ptr const&<aimrt::channel::Context>,std::string const&,void const*,unsigned long)::{lambda(aimrt::util::BufferArrayView const*)#1},void>(
(unsigned int)&v16,
v10,
(unsigned int)&v14,
v11,
v12,
v13,
(long long)v8);
if ( v14 )
std::default_delete<std::vector<unsigned char>>::operator()(&v14);
v14 = 0LL;
aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallbackWithCache(a1, a2, (long long)a3, (long long)&v16);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::default_delete<std::vector<unsigned char>>::operator()(&v15);
}
else
{
aimrt::util::BufferArrayView::BufferArrayView((aimrt::util::BufferArrayView *)&v16, a4, a5);
aimrt::runtime::core::channel::SubscribeTool::DoSubscribeCallbackWithoutCache(a1, a2, a3, (long long)&v16);
if ( v16 )
operator delete(v16, v18 - (_QWORD)v16);
}
}
| _M_clear:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,qword ptr [RDI]
CMP R14,RDI
JZ 0x001bac7a
MOV RBX,RDI
LAB_001bac54:
MOV R15,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x001bac65
CALL 0x00191e40
LAB_001bac65:
MOV ESI,0x20
MOV RDI,R14
CALL 0x001927a0
MOV R14,R15
CMP R15,RBX
JNZ 0x001bac54
LAB_001bac7a:
POP RBX
POP R14
POP R15
RET
|
/* std::__cxx11::_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,
std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session> > >::_M_clear() */
void __thiscall
std::__cxx11::
_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
::_M_clear(_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
*this)
{
_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
*p_Var1;
_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
*p_Var2;
p_Var2 = *(_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
**)this;
while (p_Var2 != this) {
p_Var1 = *(_List_base<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>,std::allocator<std::shared_ptr<aimrt::common::net::AsioHttpServer::Session>>>
**)p_Var2;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(p_Var2 + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(p_Var2 + 0x18));
}
operator_delete(p_Var2,0x20);
p_Var2 = p_Var1;
}
return;
}
| |
39,004 | ma_send_connect_attr | eloqsql/libmariadb/libmariadb/mariadb_lib.c | char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer)
{
if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS)
{
buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0);
if (mysql->options.extension &&
ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
{
uint i;
for (i=0; i < mysql->options.extension->connect_attrs.records; i++)
{
size_t len;
uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= (len);
p+= (len + 1);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= len;
}
}
}
return (char *)buffer;
} | O3 | c | ma_send_connect_attr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb $0x10, 0x372(%rdi)
je 0x29c3c
movq %rdi, %rbx
movq 0x480(%rdi), %rax
testq %rax, %rax
je 0x29b92
movq 0x78(%rax), %rsi
jmp 0x29b94
xorl %esi, %esi
movq %r14, %rdi
callq 0x3042b
movq %rax, %r14
movq 0x480(%rbx), %rdi
testq %rdi, %rdi
je 0x29c3c
cmpq $0x0, 0x48(%rdi)
je 0x29c3c
cmpl $0x0, 0x38(%rdi)
je 0x29c3c
xorl %r15d, %r15d
addq $0x30, %rdi
movl %r15d, %esi
callq 0x42735
movq %rax, %r12
movq %rax, %rdi
callq 0x141c0
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x3042b
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x143a0
addq %r13, %r14
addq %r13, %r12
incq %r12
movq %r12, %rdi
callq 0x141c0
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x3042b
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x143a0
addq %r13, %r14
incl %r15d
movq 0x480(%rbx), %rdi
cmpl 0x38(%rdi), %r15d
jb 0x29bc3
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_send_connect_attr:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test byte ptr [rdi+372h], 10h
jz loc_29C3C
mov rbx, rdi
mov rax, [rdi+480h]
test rax, rax
jz short loc_29B92
mov rsi, [rax+78h]
jmp short loc_29B94
loc_29B92:
xor esi, esi
loc_29B94:
mov rdi, r14
call mysql_net_store_length
mov r14, rax
mov rdi, [rbx+480h]
test rdi, rdi
jz loc_29C3C
cmp qword ptr [rdi+48h], 0
jz loc_29C3C
cmp dword ptr [rdi+38h], 0
jz short loc_29C3C
xor r15d, r15d
loc_29BC3:
add rdi, 30h ; '0'
mov esi, r15d
call ma_hashtbl_element
mov r12, rax
mov rdi, rax
call _strlen
mov r13, rax
mov rdi, r14
mov rsi, rax
call mysql_net_store_length
mov r14, rax
mov rdi, rax
mov rsi, r12
mov rdx, r13
call _memcpy
add r14, r13
add r12, r13
inc r12
mov rdi, r12
call _strlen
mov r13, rax
mov rdi, r14
mov rsi, rax
call mysql_net_store_length
mov r14, rax
mov rdi, rax
mov rsi, r12
mov rdx, r13
call _memcpy
add r14, r13
inc r15d
mov rdi, [rbx+480h]
cmp r15d, [rdi+38h]
jb short loc_29BC3
loc_29C3C:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_send_connect_attr(long long a1, long long a2)
{
long long v4; // rax
long long v5; // rsi
long long v6; // rdi
unsigned int v7; // r15d
long long v8; // r12
long long v9; // r13
long long v10; // r14
long long v11; // r14
long long v12; // r12
long long v13; // r13
long long v14; // r14
if ( (*(_BYTE *)(a1 + 882) & 0x10) != 0 )
{
v4 = *(_QWORD *)(a1 + 1152);
if ( v4 )
v5 = *(_QWORD *)(v4 + 120);
else
v5 = 0LL;
a2 = mysql_net_store_length(a2, v5);
v6 = *(_QWORD *)(a1 + 1152);
if ( v6 && *(_QWORD *)(v6 + 72) && *(_DWORD *)(v6 + 56) )
{
v7 = 0;
do
{
v8 = ma_hashtbl_element(v6 + 48, v7);
v9 = strlen(v8);
v10 = mysql_net_store_length(a2, v9);
memcpy(v10, v8, v9);
v11 = v9 + v10;
v12 = v9 + v8 + 1;
v13 = strlen(v12);
v14 = mysql_net_store_length(v11, v13);
memcpy(v14, v12, v13);
a2 = v13 + v14;
++v7;
v6 = *(_QWORD *)(a1 + 1152);
}
while ( v7 < *(_DWORD *)(v6 + 56) );
}
}
return a2;
}
| ma_send_connect_attr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST byte ptr [RDI + 0x372],0x10
JZ 0x00129c3c
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x480]
TEST RAX,RAX
JZ 0x00129b92
MOV RSI,qword ptr [RAX + 0x78]
JMP 0x00129b94
LAB_00129b92:
XOR ESI,ESI
LAB_00129b94:
MOV RDI,R14
CALL 0x0013042b
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x480]
TEST RDI,RDI
JZ 0x00129c3c
CMP qword ptr [RDI + 0x48],0x0
JZ 0x00129c3c
CMP dword ptr [RDI + 0x38],0x0
JZ 0x00129c3c
XOR R15D,R15D
LAB_00129bc3:
ADD RDI,0x30
MOV ESI,R15D
CALL 0x00142735
MOV R12,RAX
MOV RDI,RAX
CALL 0x001141c0
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0013042b
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R13
CALL 0x001143a0
ADD R14,R13
ADD R12,R13
INC R12
MOV RDI,R12
CALL 0x001141c0
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0013042b
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R13
CALL 0x001143a0
ADD R14,R13
INC R15D
MOV RDI,qword ptr [RBX + 0x480]
CMP R15D,dword ptr [RDI + 0x38]
JC 0x00129bc3
LAB_00129c3c:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ma_send_connect_attr(long param_1,long param_2)
{
char *__s;
size_t __n;
void *pvVar1;
size_t __n_00;
int8 uVar2;
long lVar3;
uint uVar4;
if ((*(byte *)(param_1 + 0x372) & 0x10) != 0) {
if (*(long *)(param_1 + 0x480) == 0) {
uVar2 = 0;
}
else {
uVar2 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78);
}
param_2 = mysql_net_store_length(param_2,uVar2);
lVar3 = *(long *)(param_1 + 0x480);
if (((lVar3 != 0) && (*(long *)(lVar3 + 0x48) != 0)) && (*(int *)(lVar3 + 0x38) != 0)) {
uVar4 = 0;
do {
__s = (char *)ma_hashtbl_element(lVar3 + 0x30,uVar4);
__n = strlen(__s);
pvVar1 = (void *)mysql_net_store_length(param_2,__n);
memcpy(pvVar1,__s,__n);
__n_00 = strlen(__s + __n + 1);
pvVar1 = (void *)mysql_net_store_length((long)pvVar1 + __n,__n_00);
memcpy(pvVar1,__s + __n + 1,__n_00);
param_2 = (long)pvVar1 + __n_00;
uVar4 = uVar4 + 1;
lVar3 = *(long *)(param_1 + 0x480);
} while (uVar4 < *(uint *)(lVar3 + 0x38));
}
}
return param_2;
}
| |
39,005 | strxmov | eloqsql/strings/strxmov.c | char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
} | O3 | c | strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %eax, %r10d
movq %rdi, %rax
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %r10b, %r10b
je 0xd7258
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %rdi, -0x10(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movabsq $0x3000000010, %rcx # imm = 0x3000000010
movq %rcx, -0x20(%rbp)
testq %rsi, %rsi
je 0xd72c6
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rdi
movq %rdi, %r8
movb (%rsi), %r9b
movb %r9b, (%rax)
testb %r9b, %r9b
jne 0xd72be
cmpl $0x28, %edx
ja 0xd72a6
movq %r8, %r9
movl %edx, %r8d
addq %rcx, %r8
addl $0x8, %edx
movl %edx, -0x20(%rbp)
jmp 0xd72b1
leaq 0x8(%r8), %rdi
movq %rdi, -0x18(%rbp)
movq %rdi, %r9
movq (%r8), %rsi
movq %r9, %r8
testq %rsi, %rsi
jne 0xd7285
jmp 0xd72c6
incq %rax
incq %rsi
jmp 0xd7282
movb $0x0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
| strxmov:
push rbp
mov rbp, rsp
sub rsp, 50h
mov r10d, eax
mov rax, rdi
lea rdi, [rbp+var_D0]
mov [rdi+10h], rdx
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test r10b, r10b
jz short loc_D7258
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_D7258:
mov [rbp+var_10], rdi
lea rcx, [rbp+arg_0]
mov [rbp+var_18], rcx
mov rcx, 3000000010h
mov [rbp+var_20], rcx
test rsi, rsi
jz short loc_D72C6
mov rcx, [rbp+var_10]
mov edx, dword ptr [rbp+var_20]
mov rdi, [rbp+var_18]
loc_D7282:
mov r8, rdi
loc_D7285:
mov r9b, [rsi]
mov [rax], r9b
test r9b, r9b
jnz short loc_D72BE
cmp edx, 28h ; '('
ja short loc_D72A6
mov r9, r8
mov r8d, edx
add r8, rcx
add edx, 8
mov dword ptr [rbp+var_20], edx
jmp short loc_D72B1
loc_D72A6:
lea rdi, [r8+8]
mov [rbp+var_18], rdi
mov r9, rdi
loc_D72B1:
mov rsi, [r8]
mov r8, r9
test rsi, rsi
jnz short loc_D7285
jmp short loc_D72C6
loc_D72BE:
inc rax
inc rsi
jmp short loc_D7282
loc_D72C6:
mov byte ptr [rax], 0
add rsp, 50h
pop rbp
retn
| char *strxmov(char *a1, char *a2, ...)
{
char *result; // rax
char *reg_save_area; // rcx
unsigned int gp_offset; // edx
char *overflow_arg_area; // rdi
char *v6; // r8
char v7; // r9
char *v8; // r9
va_list va; // [rsp+B0h] [rbp-20h] BYREF
result = a1;
va_start(va, a2);
if ( a2 )
{
reg_save_area = (char *)va[0].reg_save_area;
gp_offset = va[0].gp_offset;
overflow_arg_area = (char *)va[0].overflow_arg_area;
while ( 1 )
{
v6 = overflow_arg_area;
while ( 1 )
{
v7 = *a2;
*result = *a2;
if ( v7 )
break;
if ( gp_offset > 0x28 )
{
overflow_arg_area = v6 + 8;
va[0].overflow_arg_area = v6 + 8;
v8 = v6 + 8;
}
else
{
v8 = v6;
v6 = ®_save_area[gp_offset];
gp_offset += 8;
va[0].gp_offset = gp_offset;
}
a2 = *(char **)v6;
v6 = v8;
if ( !a2 )
goto LABEL_11;
}
++result;
++a2;
}
}
LABEL_11:
*result = 0;
return result;
}
| strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV R10D,EAX
MOV RAX,RDI
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RDI + 0x10],RDX
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST R10B,R10B
JZ 0x001d7258
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_001d7258:
MOV qword ptr [RBP + -0x10],RDI
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,0x3000000010
MOV qword ptr [RBP + -0x20],RCX
TEST RSI,RSI
JZ 0x001d72c6
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x18]
LAB_001d7282:
MOV R8,RDI
LAB_001d7285:
MOV R9B,byte ptr [RSI]
MOV byte ptr [RAX],R9B
TEST R9B,R9B
JNZ 0x001d72be
CMP EDX,0x28
JA 0x001d72a6
MOV R9,R8
MOV R8D,EDX
ADD R8,RCX
ADD EDX,0x8
MOV dword ptr [RBP + -0x20],EDX
JMP 0x001d72b1
LAB_001d72a6:
LEA RDI,[R8 + 0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV R9,RDI
LAB_001d72b1:
MOV RSI,qword ptr [R8]
MOV R8,R9
TEST RSI,RSI
JNZ 0x001d7285
JMP 0x001d72c6
LAB_001d72be:
INC RAX
INC RSI
JMP 0x001d7282
LAB_001d72c6:
MOV byte ptr [RAX],0x0
ADD RSP,0x50
POP RBP
RET
|
void strxmov(char *param_1,char *param_2)
{
char cVar1;
int8 *puVar2;
int8 *puVar3;
ulong uVar4;
int8 *puVar5;
int8 local_d8 [22];
uint local_28;
puVar2 = (int8 *)&stack0x00000008;
if (param_2 != (char *)0x0) {
local_28 = 0x10;
puVar3 = puVar2;
do {
for (; cVar1 = *param_2, *param_1 = cVar1, cVar1 != '\0'; param_2 = param_2 + 1) {
param_1 = param_1 + 1;
puVar3 = puVar2;
}
if (local_28 < 0x29) {
uVar4 = (ulong)local_28;
local_28 = local_28 + 8;
puVar5 = (int8 *)((long)local_d8 + uVar4);
}
else {
puVar2 = puVar3 + 1;
puVar5 = puVar3;
puVar3 = puVar2;
}
param_2 = (char *)*puVar5;
} while (param_2 != (char *)0x0);
}
*param_1 = '\0';
return;
}
| |
39,006 | mi_store_blob_length | eloqsql/storage/myisam/mi_dynrec.c | void _mi_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O3 | c | mi_store_blob_length:
pushq %rbp
movq %rsp, %rbp
decl %esi
cmpl $0x3, %esi
ja 0x2e876
leaq 0x6c8c7(%rip), %rax # 0x9b11c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb %dl, (%rdi)
jmp 0x2e876
movb %dl, (%rdi)
movb %dh, 0x1(%rdi)
shrl $0x10, %edx
movb %dl, 0x2(%rdi)
jmp 0x2e876
movl %edx, (%rdi)
jmp 0x2e876
movw %dx, (%rdi)
popq %rbp
retq
| _mi_store_blob_length:
push rbp
mov rbp, rsp
dec esi; switch 4 cases
cmp esi, 3
ja short def_2E85C; jumptable 000000000002E85C default case
lea rax, jpt_2E85C
movsxd rcx, ds:(jpt_2E85C - 9B11Ch)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_2E85E:
mov [rdi], dl; jumptable 000000000002E85C case 1
jmp short def_2E85C; jumptable 000000000002E85C default case
loc_2E862:
mov [rdi], dl; jumptable 000000000002E85C case 3
mov [rdi+1], dh
shr edx, 10h
mov [rdi+2], dl
jmp short def_2E85C; jumptable 000000000002E85C default case
loc_2E86F:
mov [rdi], edx; jumptable 000000000002E85C case 4
jmp short def_2E85C; jumptable 000000000002E85C default case
loc_2E873:
mov [rdi], dx; jumptable 000000000002E85C case 2
def_2E85C:
pop rbp; jumptable 000000000002E85C default case
retn
| void mi_store_blob_length(_BYTE *a1, int a2, int a3)
{
switch ( a2 )
{
case 1:
*a1 = a3;
break;
case 2:
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
a1[2] = BYTE2(a3);
break;
case 4:
*(_DWORD *)a1 = a3;
break;
default:
return;
}
}
| _mi_store_blob_length:
PUSH RBP
MOV RBP,RSP
DEC ESI
CMP ESI,0x3
JA 0x0012e876
LEA RAX,[0x19b11c]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOV byte ptr [RDI],DL
JMP 0x0012e876
caseD_3:
MOV byte ptr [RDI],DL
MOV byte ptr [RDI + 0x1],DH
SHR EDX,0x10
MOV byte ptr [RDI + 0x2],DL
JMP 0x0012e876
caseD_4:
MOV dword ptr [RDI],EDX
JMP 0x0012e876
caseD_2:
MOV word ptr [RDI],DX
default:
POP RBP
RET
|
void _mi_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
| |
39,007 | ma_tls_verify_server_cert | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_verify_server_cert(MARIADB_TLS *ctls)
{
X509 *cert;
MYSQL *mysql;
SSL *ssl;
MARIADB_PVIO *pvio;
#if !defined(HAVE_OPENSSL_CHECK_HOST)
X509_NAME *x509sn;
int cn_pos;
X509_NAME_ENTRY *cn_entry;
ASN1_STRING *cn_asn1;
const char *cn_str;
#endif
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
mysql= (MYSQL *)SSL_get_app_data(ssl);
pvio= mysql->net.pvio;
if (!mysql->host)
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname");
return 1;
}
if (!(cert= SSL_get_peer_certificate(ssl)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate");
return 1;
}
#ifdef HAVE_OPENSSL_CHECK_HOST
if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1
&& X509_check_ip_asc(cert, mysql->host, 0) != 1)
goto error;
#else
x509sn= X509_get_subject_name(cert);
if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0)
goto error;
if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos)))
goto error;
if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry)))
goto error;
cn_str = (char *)ASN1_STRING_data(cn_asn1);
/* Make sure there is no embedded \0 in the CN */
if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str))
goto error;
if (strcmp(cn_str, mysql->host))
goto error;
#endif
X509_free(cert);
return 0;
error:
X509_free(cert);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed");
return 1;
} | O3 | c | ma_tls_verify_server_cert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x1, %r14d
testq %rdi, %rdi
je 0x2ad6c
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x2ad6c
movq %r15, %rdi
xorl %esi, %esi
callq 0x13160
movq %rax, %rbx
movq (%rax), %r12
cmpq $0x0, 0x2b0(%rax)
je 0x2acee
movq %r15, %rdi
callq 0x137e0
testq %rax, %rax
je 0x2ad0f
movq %rax, %r15
movq 0x2b0(%rbx), %rsi
xorl %r14d, %r14d
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x13860
cmpl $0x1, %eax
je 0x2ace4
movq 0x2b0(%rbx), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x13340
cmpl $0x1, %eax
jne 0x2ad30
movq %r15, %rdi
callq 0x13240
jmp 0x2ad6c
leaq 0x22f1b(%rip), %rax # 0x4dc10
movq (%rax), %rdx
leaq 0x22f21(%rip), %rax # 0x4dc20
movq 0xd0(%rax), %rcx
leaq 0xe990(%rip), %r8 # 0x3969d
jmp 0x2ad57
leaq 0x22efa(%rip), %rax # 0x4dc10
movq (%rax), %rdx
leaq 0x22f00(%rip), %rax # 0x4dc20
movq 0xd0(%rax), %rcx
leaq 0xe988(%rip), %r8 # 0x396b6
jmp 0x2ad57
movq %r15, %rdi
callq 0x13240
leaq 0x22ed1(%rip), %rax # 0x4dc10
movq (%rax), %rdx
leaq 0x22ed7(%rip), %rax # 0x4dc20
movq 0xd0(%rax), %rcx
leaq 0xe980(%rip), %r8 # 0x396d7
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
callq *0x50(%r12)
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_verify_server_cert:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, 1
test rdi, rdi
jz loc_2AD6C
mov r15, [rdi+10h]
test r15, r15
jz loc_2AD6C
mov rdi, r15
xor esi, esi
call _SSL_get_ex_data
mov rbx, rax
mov r12, [rax]
cmp qword ptr [rax+2B0h], 0
jz short loc_2ACEE
mov rdi, r15
call _SSL_get1_peer_certificate
test rax, rax
jz short loc_2AD0F
mov r15, rax
mov rsi, [rbx+2B0h]
xor r14d, r14d
mov rdi, rax
xor edx, edx
xor ecx, ecx
xor r8d, r8d
call _X509_check_host
cmp eax, 1
jz short loc_2ACE4
mov rsi, [rbx+2B0h]
mov rdi, r15
xor edx, edx
call _X509_check_ip_asc
cmp eax, 1
jnz short loc_2AD30
loc_2ACE4:
mov rdi, r15
call _X509_free
jmp short loc_2AD6C
loc_2ACEE:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aInvalidEmptyHo; "Invalid (empty) hostname"
jmp short loc_2AD57
loc_2AD0F:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aUnableToGetSer; "Unable to get server certificate"
jmp short loc_2AD57
loc_2AD30:
mov rdi, r15
call _X509_free
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aValidationOfSs; "Validation of SSL server certificate fa"...
loc_2AD57:
mov rdi, rbx
mov esi, 7EAh
xor eax, eax
call qword ptr [r12+50h]
mov r14d, 1
loc_2AD6C:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_tls_verify_server_cert(long long a1)
{
unsigned int v1; // r14d
long long v2; // r15
long long *v3; // rbx
long long v4; // r12
long long v5; // rax
long long v6; // r15
char *v7; // rdx
char *v8; // rcx
const char *v9; // r8
v1 = 1;
if ( a1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 )
{
v3 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL);
v4 = *v3;
if ( v3[86] )
{
v5 = SSL_get1_peer_certificate(v2);
if ( v5 )
{
v6 = v5;
v1 = 0;
if ( (unsigned int)X509_check_host(v5, v3[86], 0LL, 0LL, 0LL) == 1
|| (unsigned int)X509_check_ip_asc(v6, v3[86], 0LL) == 1 )
{
X509_free(v6);
return v1;
}
X509_free(v6);
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Validation of SSL server certificate failed";
}
else
{
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Unable to get server certificate";
}
}
else
{
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Invalid (empty) hostname";
}
(*(void ( **)(long long *, long long, char *, char *, const char *))(v4 + 80))(v3, 2026LL, v7, v8, v9);
return 1;
}
}
return v1;
}
| ma_tls_verify_server_cert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,0x1
TEST RDI,RDI
JZ 0x0012ad6c
MOV R15,qword ptr [RDI + 0x10]
TEST R15,R15
JZ 0x0012ad6c
MOV RDI,R15
XOR ESI,ESI
CALL 0x00113160
MOV RBX,RAX
MOV R12,qword ptr [RAX]
CMP qword ptr [RAX + 0x2b0],0x0
JZ 0x0012acee
MOV RDI,R15
CALL 0x001137e0
TEST RAX,RAX
JZ 0x0012ad0f
MOV R15,RAX
MOV RSI,qword ptr [RBX + 0x2b0]
XOR R14D,R14D
MOV RDI,RAX
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00113860
CMP EAX,0x1
JZ 0x0012ace4
MOV RSI,qword ptr [RBX + 0x2b0]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00113340
CMP EAX,0x1
JNZ 0x0012ad30
LAB_0012ace4:
MOV RDI,R15
CALL 0x00113240
JMP 0x0012ad6c
LAB_0012acee:
LEA RAX,[0x14dc10]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14dc20]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x13969d]
JMP 0x0012ad57
LAB_0012ad0f:
LEA RAX,[0x14dc10]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14dc20]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x1396b6]
JMP 0x0012ad57
LAB_0012ad30:
MOV RDI,R15
CALL 0x00113240
LEA RAX,[0x14dc10]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14dc20]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x1396d7]
LAB_0012ad57:
MOV RDI,RBX
MOV ESI,0x7ea
XOR EAX,EAX
CALL qword ptr [R12 + 0x50]
MOV R14D,0x1
LAB_0012ad6c:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 ma_tls_verify_server_cert(long param_1)
{
SSL *ssl;
long lVar1;
int iVar2;
long *plVar3;
X509 *a;
char *pcVar4;
if (param_1 == 0) {
return 1;
}
ssl = *(SSL **)(param_1 + 0x10);
if (ssl != (SSL *)0x0) {
plVar3 = (long *)SSL_get_ex_data(ssl,0);
lVar1 = *plVar3;
if (plVar3[0x56] == 0) {
pcVar4 = "Invalid (empty) hostname";
}
else {
a = (X509 *)SSL_get1_peer_certificate(ssl);
if (a == (X509 *)0x0) {
pcVar4 = "Unable to get server certificate";
}
else {
iVar2 = X509_check_host(a,plVar3[0x56],0,0,0);
if ((iVar2 == 1) || (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 == 1)) {
X509_free(a);
return 0;
}
X509_free(a);
pcVar4 = "Validation of SSL server certificate failed";
}
}
(**(code **)(lVar1 + 0x50))
(plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_0014dcf0,pcVar4);
return 1;
}
return 1;
}
| |
39,008 | mp_sqrtrem_dec | bluesky950520[P]quickjs/libbf.c | int mp_sqrtrem_dec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
taba[n] = mp_sqrtrem_rec_dec(tabs, taba, n, tmp_buf);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return 0;
} | O1 | c | mp_sqrtrem_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %r13
cmpq $0x10, %rcx
jb 0x8dec2
movq %r14, %rax
andq $-0x2, %rax
leaq 0x8(,%rax,4), %rdx
movq (%rbx), %rdi
xorl %esi, %esi
callq *0x8(%rbx)
movq %rax, %r13
testq %rax, %rax
je 0x8def1
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x8df09
movq %rax, (%r15,%r14,8)
cmpq %rbp, %r13
je 0x8deec
movq (%rbx), %rdi
xorl %r14d, %r14d
movq %r13, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
jmp 0x8def7
xorl %r14d, %r14d
jmp 0x8def7
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_sqrtrem_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rbp, rsp
mov r13, rbp
cmp rcx, 10h
jb short loc_8DEC2
mov rax, r14
and rax, 0FFFFFFFFFFFFFFFEh
lea rdx, ds:8[rax*4]
mov rdi, [rbx]
xor esi, esi
call qword ptr [rbx+8]
mov r13, rax
test rax, rax
jz short loc_8DEF1
loc_8DEC2:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, r13
call mp_sqrtrem_rec_dec
mov [r15+r14*8], rax
cmp r13, rbp
jz short loc_8DEEC
mov rdi, [rbx]
xor r14d, r14d
mov rsi, r13
xor edx, edx
call qword ptr [rbx+8]
jmp short loc_8DEF7
loc_8DEEC:
xor r14d, r14d
jmp short loc_8DEF7
loc_8DEF1:
mov r14d, 0FFFFFFFFh
loc_8DEF7:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_sqrtrem_dec(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
_QWORD *v6; // r13
unsigned int v7; // r14d
_QWORD savedregs[15]; // [rsp+0h] [rbp+0h] BYREF
v6 = savedregs;
if ( a4 < 0x10
|| (v6 = (_QWORD *)((long long ( *)(_QWORD, _QWORD, unsigned long long))a1[1])(
*a1,
0LL,
4 * (a4 & 0xFFFFFFFFFFFFFFFELL) + 8)) != 0LL )
{
*(_QWORD *)(a3 + 8 * a4) = mp_sqrtrem_rec_dec(a2, a3, a4, v6);
v7 = 0;
if ( v6 != savedregs )
((void ( *)(_QWORD, _QWORD *, _QWORD))a1[1])(*a1, v6, 0LL);
}
else
{
return (unsigned int)-1;
}
return v7;
}
| |||
39,009 | mp_sqrtrem_dec | bluesky950520[P]quickjs/libbf.c | int mp_sqrtrem_dec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
taba[n] = mp_sqrtrem_rec_dec(tabs, taba, n, tmp_buf);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return 0;
} | O2 | c | mp_sqrtrem_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %r13
cmpq $0x10, %rcx
jb 0x768fe
movq %r14, %rax
andq $-0x2, %rax
leaq 0x8(,%rax,4), %rdx
movq (%rbx), %rdi
xorl %esi, %esi
callq *0x8(%rbx)
movq %rax, %r13
testq %rax, %rax
je 0x7692d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x76943
movq %rax, (%r15,%r14,8)
cmpq %rbp, %r13
je 0x76928
movq (%rbx), %rdi
xorl %r14d, %r14d
movq %r13, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
jmp 0x76931
xorl %r14d, %r14d
jmp 0x76931
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_sqrtrem_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rbp, rsp
mov r13, rbp
cmp rcx, 10h
jb short loc_768FE
mov rax, r14
and rax, 0FFFFFFFFFFFFFFFEh
lea rdx, ds:8[rax*4]
mov rdi, [rbx]
xor esi, esi
call qword ptr [rbx+8]
mov r13, rax
test rax, rax
jz short loc_7692D
loc_768FE:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, r13
call mp_sqrtrem_rec_dec
mov [r15+r14*8], rax
cmp r13, rbp
jz short loc_76928
mov rdi, [rbx]
xor r14d, r14d
mov rsi, r13
xor edx, edx
call qword ptr [rbx+8]
jmp short loc_76931
loc_76928:
xor r14d, r14d
jmp short loc_76931
loc_7692D:
push 0FFFFFFFFFFFFFFFFh
pop r14
loc_76931:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_sqrtrem_dec(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
_QWORD *v6; // r13
unsigned int v7; // r14d
_QWORD savedregs[15]; // [rsp+0h] [rbp+0h] BYREF
v6 = savedregs;
if ( a4 < 0x10
|| (v6 = (_QWORD *)((long long ( *)(_QWORD, _QWORD, unsigned long long))a1[1])(
*a1,
0LL,
4 * (a4 & 0xFFFFFFFFFFFFFFFELL) + 8)) != 0LL )
{
*(_QWORD *)(a3 + 8 * a4) = mp_sqrtrem_rec_dec(a2, a3, a4, v6);
v7 = 0;
if ( v6 != savedregs )
((void ( *)(_QWORD, _QWORD *, _QWORD))a1[1])(*a1, v6, 0LL);
}
else
{
return (unsigned int)-1;
}
return v7;
}
| mp_sqrtrem_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RBP,RSP
MOV R13,RBP
CMP RCX,0x10
JC 0x001768fe
MOV RAX,R14
AND RAX,-0x2
LEA RDX,[0x8 + RAX*0x4]
MOV RDI,qword ptr [RBX]
XOR ESI,ESI
CALL qword ptr [RBX + 0x8]
MOV R13,RAX
TEST RAX,RAX
JZ 0x0017692d
LAB_001768fe:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x00176943
MOV qword ptr [R15 + R14*0x8],RAX
CMP R13,RBP
JZ 0x00176928
MOV RDI,qword ptr [RBX]
XOR R14D,R14D
MOV RSI,R13
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
JMP 0x00176931
LAB_00176928:
XOR R14D,R14D
JMP 0x00176931
LAB_0017692d:
PUSH -0x1
POP R14
LAB_00176931:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 mp_sqrtrem_dec(int8 *param_1,int8 param_2,long param_3,ulong param_4)
{
int1 *puVar1;
int8 uVar2;
int1 auStack_78 [72];
puVar1 = auStack_78;
if ((0xf < param_4) &&
(puVar1 = (int1 *)
(*(code *)param_1[1])(*param_1,0,(param_4 & 0xfffffffffffffffe) * 4 + 8),
puVar1 == (int1 *)0x0)) {
return 0xffffffff;
}
uVar2 = mp_sqrtrem_rec_dec(param_2,param_3,param_4,puVar1);
*(int8 *)(param_3 + param_4 * 8) = uVar2;
if (puVar1 != auStack_78) {
(*(code *)param_1[1])(*param_1,puVar1,0);
}
return 0;
}
| |
39,010 | free_root | eloqsql/mysys/my_alloc.c | void free_root(MEM_ROOT *root, myf MyFlags)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
/*
There is no point in using mark_blocks_free when using valgrind as
it will not reclaim any memory
*/
if (MyFlags & MY_MARK_BLOCKS_FREE)
{
mark_blocks_free(root);
DBUG_VOID_RETURN;
}
#endif
if (!(MyFlags & MY_KEEP_PREALLOC))
root->pre_alloc=0;
for (next=root->used; next ;)
{
old=next; next= next->next ;
if (old != root->pre_alloc)
my_free(old);
}
for (next=root->free ; next ;)
{
old=next; next= next->next;
if (old != root->pre_alloc)
my_free(old);
}
root->used=root->free=0;
if (root->pre_alloc)
{
root->free=root->pre_alloc;
root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(root->pre_alloc);
root->free->next=0;
}
root->block_num= 4;
root->first_block_usage= 0;
DBUG_VOID_RETURN;
} | O0 | c | free_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xeeda2
movq -0x10(%rbp), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0xeedbe
movq -0x8(%rbp), %rdi
callq 0xeeee0
jmp 0xeeecd
movq -0x10(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0xeedd8
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xeee17
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0xeee15
movq -0x20(%rbp), %rdi
callq 0xf4f60
jmp 0xeede4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xeee55
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0xeee53
movq -0x20(%rbp), %rdi
callq 0xf4f60
jmp 0xeee22
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xeeeb5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xeeea3
jmp 0xeeea5
jmp 0xeeea7
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
jmp 0xeeecd
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| free_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_EEDA2:
mov rax, [rbp+var_10]
and rax, 2
cmp rax, 0
jz short loc_EEDBE
mov rdi, [rbp+var_8]
call mark_blocks_free
jmp loc_EEECD
loc_EEDBE:
mov rax, [rbp+var_10]
and rax, 1
cmp rax, 0
jnz short loc_EEDD8
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_EEDD8:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_EEDE4:
cmp [rbp+var_18], 0
jz short loc_EEE17
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_EEE15
mov rdi, [rbp+var_20]
call my_free
loc_EEE15:
jmp short loc_EEDE4
loc_EEE17:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
loc_EEE22:
cmp [rbp+var_18], 0
jz short loc_EEE55
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_EEE53
mov rdi, [rbp+var_20]
call my_free
loc_EEE53:
jmp short loc_EEE22
loc_EEE55:
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_EEEB5
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+8], rcx
jmp short $+2
loc_EEEA3:
jmp short $+2
loc_EEEA5:
jmp short $+2
loc_EEEA7:
mov rax, [rbp+var_8]
mov rax, [rax]
mov qword ptr [rax], 0
loc_EEEB5:
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
jmp short $+2
loc_EEECD:
add rsp, 20h
pop rbp
retn
| long long free_root(long long a1, char a2)
{
long long result; // rax
_QWORD *v3; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+0h] [rbp-20h]
_QWORD *v5; // [rsp+8h] [rbp-18h]
_QWORD *v6; // [rsp+8h] [rbp-18h]
if ( (a2 & 2) != 0 )
return mark_blocks_free(a1);
if ( (a2 & 1) == 0 )
*(_QWORD *)(a1 + 16) = 0LL;
v5 = *(_QWORD **)(a1 + 8);
while ( v5 )
{
v3 = v5;
v5 = (_QWORD *)*v5;
if ( v3 != *(_QWORD **)(a1 + 16) )
my_free(v3);
}
v6 = *(_QWORD **)a1;
while ( v6 )
{
v4 = v6;
v6 = (_QWORD *)*v6;
if ( v4 != *(_QWORD **)(a1 + 16) )
my_free(v4);
}
*(_QWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 8) = 0LL;
if ( *(_QWORD *)(a1 + 16) )
{
*(_QWORD *)a1 = *(_QWORD *)(a1 + 16);
*(_QWORD *)(*(_QWORD *)a1 + 8LL) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 16LL) - 24LL;
**(_QWORD **)a1 = 0LL;
}
*(_DWORD *)(a1 + 40) = 4;
result = a1;
*(_DWORD *)(a1 + 44) = 0;
return result;
}
| free_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001eeda2
LAB_001eeda2:
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x2
CMP RAX,0x0
JZ 0x001eedbe
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001eeee0
JMP 0x001eeecd
LAB_001eedbe:
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x1
CMP RAX,0x0
JNZ 0x001eedd8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_001eedd8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_001eede4:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001eee17
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x001eee15
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001f4f60
LAB_001eee15:
JMP 0x001eede4
LAB_001eee17:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_001eee22:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001eee55
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x001eee53
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001f4f60
LAB_001eee53:
JMP 0x001eee22
LAB_001eee55:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001eeeb5
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001eeea3
LAB_001eeea3:
JMP 0x001eeea5
LAB_001eeea5:
JMP 0x001eeea7
LAB_001eeea7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],0x0
LAB_001eeeb5:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
JMP 0x001eeecd
LAB_001eeecd:
ADD RSP,0x20
POP RBP
RET
|
void free_root(long *param_1,ulong param_2)
{
int8 *puVar1;
int8 *local_20;
if ((param_2 & 2) == 0) {
if ((param_2 & 1) == 0) {
param_1[2] = 0;
}
puVar1 = (int8 *)param_1[1];
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
my_free(local_20);
}
}
puVar1 = (int8 *)*param_1;
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
my_free(local_20);
}
}
*param_1 = 0;
param_1[1] = 0;
if (param_1[2] != 0) {
*param_1 = param_1[2];
*(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18;
*(int8 *)*param_1 = 0;
}
*(int4 *)(param_1 + 5) = 4;
*(int4 *)((long)param_1 + 0x2c) = 0;
}
else {
mark_blocks_free(param_1);
}
return;
}
| |
39,011 | LefDefParser::lefiLayerDensity::Init(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayerDensity::Init(const char *type)
{
int len = strlen(type) + 1;
type_ = (char*) lefMalloc(len);
strcpy(type_, CASE(type));
oneEntry_ = 0;
numFrequency_ = 0;
frequency_ = 0;
numWidths_ = 0;
widths_ = 0;
numTableEntries_ = 0;
tableEntries_ = 0;
numCutareas_ = 0;
cutareas_ = 0;
} | O0 | cpp | LefDefParser::lefiLayerDensity::Init(char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x20e0
addq $0x1, %rax
movl %eax, 0x14(%rsp)
movslq 0x14(%rsp), %rdi
callq 0x4f550
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x59300
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x2270
movq 0x8(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movl $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movl $0x0, 0x30(%rax)
movq $0x0, 0x38(%rax)
movl $0x0, 0x40(%rax)
movq $0x0, 0x48(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser16lefiLayerDensity4InitEPKc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_10]
call _strlen
add rax, 1
mov [rsp+28h+var_14], eax
movsxd rdi, [rsp+28h+var_14]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax], rcx
mov rax, [rax]
mov [rsp+28h+var_28], rax
mov rdi, [rsp+28h+var_10]; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, [rsp+28h+var_28]
mov rsi, rax
call _strcpy
mov rax, [rsp+28h+var_20]
xorps xmm0, xmm0
movsd qword ptr [rax+8], xmm0
mov dword ptr [rax+10h], 0
mov qword ptr [rax+18h], 0
mov dword ptr [rax+20h], 0
mov qword ptr [rax+28h], 0
mov dword ptr [rax+30h], 0
mov qword ptr [rax+38h], 0
mov dword ptr [rax+40h], 0
mov qword ptr [rax+48h], 0
add rsp, 28h
retn
| LefDefParser::lefiLayerDensity * LefDefParser::lefiLayerDensity::Init(
LefDefParser::lefiLayerDensity *this,
LefDefParser *a2)
{
long long v2; // rax
LefDefParser::lefiLayerDensity *result; // rax
long long v4; // [rsp+0h] [rbp-28h]
int v5; // [rsp+14h] [rbp-14h]
v5 = strlen(a2) + 1;
*(_QWORD *)this = LefDefParser::lefMalloc((LefDefParser *)v5, (unsigned long long)a2);
v4 = *(_QWORD *)this;
v2 = LefDefParser::CASE(a2, (const char *)a2);
strcpy(v4, v2);
result = this;
*((_QWORD *)this + 1) = 0LL;
*((_DWORD *)this + 4) = 0;
*((_QWORD *)this + 3) = 0LL;
*((_DWORD *)this + 8) = 0;
*((_QWORD *)this + 5) = 0LL;
*((_DWORD *)this + 12) = 0;
*((_QWORD *)this + 7) = 0LL;
*((_DWORD *)this + 16) = 0;
*((_QWORD *)this + 9) = 0LL;
return result;
}
| Init:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001020e0
ADD RAX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOVSXD RDI,dword ptr [RSP + 0x14]
CALL 0x0014f550
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00159300
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x00102270
MOV RAX,qword ptr [RSP + 0x8]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX + 0x8],XMM0
MOV dword ptr [RAX + 0x10],0x0
MOV qword ptr [RAX + 0x18],0x0
MOV dword ptr [RAX + 0x20],0x0
MOV qword ptr [RAX + 0x28],0x0
MOV dword ptr [RAX + 0x30],0x0
MOV qword ptr [RAX + 0x38],0x0
MOV dword ptr [RAX + 0x40],0x0
MOV qword ptr [RAX + 0x48],0x0
ADD RSP,0x28
RET
|
/* LefDefParser::lefiLayerDensity::Init(char const*) */
void __thiscall LefDefParser::lefiLayerDensity::Init(lefiLayerDensity *this,char *param_1)
{
char *__dest;
size_t sVar1;
int8 uVar2;
char *__src;
sVar1 = strlen(param_1);
uVar2 = lefMalloc((long)((int)sVar1 + 1));
*(int8 *)this = uVar2;
__dest = *(char **)this;
__src = (char *)CASE(param_1);
strcpy(__dest,__src);
*(int8 *)(this + 8) = 0;
*(int4 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int4 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int4 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
return;
}
| |
39,012 | mysql_get_timeout_value | eloqsql/libmariadb/libmariadb/mariadb_lib.c | unsigned int STDCALL
mysql_get_timeout_value(const MYSQL *mysql)
{
unsigned int timeout= 0;
if (mysql->options.extension && mysql->options.extension->async_context)
timeout= mysql->options.extension->async_context->timeout_value;
/* Avoid overflow. */
if (timeout > UINT_MAX - 999)
return (timeout - 1)/1000 + 1;
else
return (timeout+999)/1000;
} | O3 | c | mysql_get_timeout_value:
pushq %rbp
movq %rsp, %rbp
movq 0x480(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x1a177
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
je 0x1a177
movl 0x10(%rcx), %eax
cmpl $0xfffffc19, %eax # imm = 0xFFFFFC19
jb 0x1a177
decl %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
incl %eax
jmp 0x1a187
addl $0x3e7, %eax # imm = 0x3E7
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
popq %rbp
retq
| mysql_get_timeout_value:
push rbp
mov rbp, rsp
mov rcx, [rdi+480h]
xor eax, eax
test rcx, rcx
jz short loc_1A177
mov rcx, [rcx+28h]
test rcx, rcx
jz short loc_1A177
mov eax, [rcx+10h]
cmp eax, 0FFFFFC19h
jb short loc_1A177
dec eax
imul rax, 10624DD3h
shr rax, 26h
inc eax
jmp short loc_1A187
loc_1A177:
add eax, 3E7h
imul rax, 10624DD3h
shr rax, 26h
loc_1A187:
pop rbp
retn
| unsigned long long mysql_get_timeout_value(long long a1)
{
long long v1; // rcx
unsigned int v2; // eax
long long v3; // rcx
v1 = *(_QWORD *)(a1 + 1152);
v2 = 0;
if ( v1 && (v3 = *(_QWORD *)(v1 + 40)) != 0 && (v2 = *(_DWORD *)(v3 + 16), v2 >= 0xFFFFFC19) )
return (v2 - 1) / 0x3E8 + 1;
else
return (v2 + 999) / 0x3E8uLL;
}
| mysql_get_timeout_value:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI + 0x480]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0011a177
MOV RCX,qword ptr [RCX + 0x28]
TEST RCX,RCX
JZ 0x0011a177
MOV EAX,dword ptr [RCX + 0x10]
CMP EAX,0xfffffc19
JC 0x0011a177
DEC EAX
IMUL RAX,RAX,0x10624dd3
SHR RAX,0x26
INC EAX
JMP 0x0011a187
LAB_0011a177:
ADD EAX,0x3e7
IMUL RAX,RAX,0x10624dd3
SHR RAX,0x26
LAB_0011a187:
POP RBP
RET
|
ulong mysql_get_timeout_value(long param_1)
{
long lVar1;
uint uVar2;
ulong uVar3;
uVar2 = 0;
if (((*(long *)(param_1 + 0x480) == 0) ||
(lVar1 = *(long *)(*(long *)(param_1 + 0x480) + 0x28), uVar2 = 0, lVar1 == 0)) ||
(uVar2 = *(uint *)(lVar1 + 0x10), uVar2 < 0xfffffc19)) {
uVar3 = (ulong)(uVar2 + 999) / 1000;
}
else {
uVar3 = (ulong)((uVar2 - 1) / 1000 + 1);
}
return uVar3;
}
| |
39,013 | void cxxopts::throw_or_mimic<cxxopts::exceptions::option_requires_argument>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp | void throw_or_mimic(const std::string& text)
{
static_assert(std::is_base_of<std::exception, T>::value,
"throw_or_mimic only works on std::exception and "
"deriving classes");
#ifndef CXXOPTS_NO_EXCEPTIONS
// If CXXOPTS_NO_EXCEPTIONS is not defined, just throw
throw T{text};
#else
// Otherwise manually instantiate the exception, print what() to stderr,
// and exit
T exception{text};
std::cerr << exception.what() << std::endl;
std::exit(EXIT_FAILURE);
#endif
} | O1 | cpp | void cxxopts::throw_or_mimic<cxxopts::exceptions::option_requires_argument>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x28, %edi
callq 0xf4f0
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x308d2
leaq 0x3031d1(%rip), %rsi # 0x333a80
leaq 0x2c6(%rip), %rdx # 0x30b7c
movq %rbx, %rdi
callq 0x10170
movq %rax, %r14
movq %rbx, %rdi
callq 0xf6f0
movq %r14, %rdi
callq 0x101c0
nop
| _ZN7cxxopts14throw_or_mimicINS_10exceptions19option_has_no_valueEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rdi
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rax
mov rsi, r14
call _ZN7cxxopts10exceptions19option_has_no_valueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::exceptions::option_has_no_value::option_has_no_value(std::string const&)
lea rsi, _ZTIN7cxxopts10exceptions19option_has_no_valueE; lptinfo
lea rdx, _ZN7cxxopts10exceptions9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| throw_or_mimic<cxxopts::exceptions::option_has_no_value>:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EDI,0x28
CALL 0x0010f4f0
MOV RBX,RAX
LAB_0013089d:
MOV RDI,RAX
MOV RSI,R14
CALL 0x001308d2
LAB_001308a8:
LEA RSI,[0x433a80]
LEA RDX,[0x130b7c]
MOV RDI,RBX
CALL 0x00110170
|
/* void cxxopts::throw_or_mimic<cxxopts::exceptions::option_has_no_value>(std::__cxx11::string
const&) */
void cxxopts::throw_or_mimic<cxxopts::exceptions::option_has_no_value>(string *param_1)
{
option_has_no_value *this;
this = (option_has_no_value *)__cxa_allocate_exception(0x28);
/* try { // try from 0013089d to 001308a7 has its CatchHandler @ 001308be */
exceptions::option_has_no_value::option_has_no_value(this,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(this,&exceptions::option_has_no_value::typeinfo,exceptions::exception::~exception);
}
| ||
39,014 | 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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) | llama.cpp/common/json.hpp | void destroy(value_t t)
{
if (
(t == value_t::object && object == nullptr) ||
(t == value_t::array && array == nullptr) ||
(t == value_t::string && string == nullptr) ||
(t == value_t::binary && binary == nullptr)
)
{
//not initialized (e.g. due to exception in the ctor)
return;
}
if (t == value_t::array || t == value_t::object)
{
// flatten the current json_value to a heap-allocated stack
std::vector<basic_json> stack;
// move the top-level items to stack
if (t == value_t::array)
{
stack.reserve(array->size());
std::move(array->begin(), array->end(), std::back_inserter(stack));
}
else
{
stack.reserve(object->size());
for (auto&& it : *object)
{
stack.push_back(std::move(it.second));
}
}
while (!stack.empty())
{
// move the last item to local variable to be processed
basic_json current_item(std::move(stack.back()));
stack.pop_back();
// if current_item is array/object, move
// its children to the stack to be processed later
if (current_item.is_array())
{
std::move(current_item.m_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack));
current_item.m_data.m_value.array->clear();
}
else if (current_item.is_object())
{
for (auto&& it : *current_item.m_data.m_value.object)
{
stack.push_back(std::move(it.second));
}
current_item.m_data.m_value.object->clear();
}
// it's now safe that current_item get destructed
// since it doesn't have any children
}
}
switch (t)
{
case value_t::object:
{
AllocatorType<object_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, object);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);
break;
}
case value_t::array:
{
AllocatorType<array_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, array);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);
break;
}
case value_t::string:
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);
break;
}
case value_t::binary:
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1);
break;
}
case value_t::null:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::discarded:
default:
{
break;
}
}
} | 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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x1, %esi
sete %cl
movq (%rdi), %rax
testq %rax, %rax
sete %dl
testb %dl, %cl
jne 0xaf3ca
movl %esi, %r14d
testq %rax, %rax
sete %cl
movl %r14d, %edx
andb $-0x2, %dl
cmpb $0x2, %dl
sete %dl
cmpb $0x8, %r14b
sete %sil
orb %dl, %sil
testb %cl, %sil
jne 0xaf3ca
movq %rdi, %rbx
leal -0x1(%r14), %ecx
cmpb $0x1, %cl
ja 0xaf345
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x4, %rsi
cmpb $0x2, %r14b
jne 0xaf1eb
movq %rsp, %rdi
callq 0xaf40e
movq (%rbx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r13
subq %r15, %r13
sarq $0x4, %r13
testq %r13, %r13
jle 0xaf22c
incq %r13
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xae3da
addq $0x10, %r15
decq %r13
cmpq $0x1, %r13
ja 0xaf1d1
jmp 0xaf22c
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rax
movq %rsp, %rdi
movq %rax, %rsi
callq 0xaf40e
movq (%rbx), %rax
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0xaf22c
movq %rsp, %r15
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0xae3da
addq $0x30, %r12
cmpq %r13, %r12
jne 0xaf216
movq 0x8(%rsp), %r13
cmpq %r13, (%rsp)
je 0xaf33d
leaq 0x20(%rsp), %r15
movq %rsp, %r12
leaq -0x10(%r13), %rdi
movups -0x10(%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %esi, %esi
callq 0xaa5c4
movb $0x0, -0x10(%r13)
movq $0x0, -0x8(%r13)
movq %r15, %rdi
movl $0x1, %esi
callq 0xaa5c4
movq 0x8(%rsp), %r13
addq $-0x10, %r13
movq %r13, 0x8(%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r13, %rdi
callq 0xaecde
movzbl 0x20(%rsp), %eax
cmpl $0x1, %eax
je 0xaf2e6
cmpl $0x2, %eax
jne 0xaf31c
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq 0x8(%rdi), %rbp
subq %r13, %rbp
sarq $0x4, %rbp
testq %rbp, %rbp
jle 0xaf2dc
incq %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0xae3da
addq $0x10, %r13
decq %rbp
cmpq $0x1, %rbp
jg 0xaf2bc
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq %r13, %rsi
callq 0xaf562
jmp 0xaf31c
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq 0x8(%rdi), %rbp
cmpq %rbp, %r13
je 0xaf314
leaq 0x20(%r13), %rsi
movq %r12, %rdi
callq 0xae3da
addq $0x30, %r13
cmpq %rbp, %r13
jne 0xaf2f7
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq %r13, %rsi
callq 0xaf5a8
movq %r15, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r15, %rdi
callq 0xaecde
movq 0x8(%rsp), %r13
cmpq %r13, (%rsp)
jne 0xaf243
movq %rsp, %rdi
callq 0xaf510
movzbl %r14b, %eax
decl %eax
cmpl $0x7, %eax
ja 0xaf3ca
leaq 0x8bf39(%rip), %rcx # 0x13b290
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
callq 0xaf662
jmp 0xaf387
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0xaf38a
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x231f0
movq (%rbx), %rdi
movl $0x20, %esi
jmp 0xaf3c5
movq (%rbx), %rdi
callq 0xaf510
movq (%rbx), %rdi
movl $0x18, %esi
jmp 0xaf3c5
movq (%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0xaf3c0
movq 0x10(%rdi), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x231f0
movq (%rbx), %rdi
movl $0x28, %esi
callq 0x231f0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xaf3dd
jmp 0xaf3dd
movq %rax, %rbx
jmp 0xaf3fe
jmp 0xaf3e4
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0xaa5c4
movq %r14, %rdi
callq 0xaecde
movq %rsp, %rdi
callq 0xaf510
movq %rbx, %rdi
callq 0x23ee0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
cmp esi, 1
setz cl
mov rax, [rdi]
test rax, rax
setz dl
test cl, dl
jnz def_AF35E; jumptable 00000000000AF35E default case, cases 4-7
mov r14d, esi
test rax, rax
setz cl
mov edx, r14d
and dl, 0FEh
cmp dl, 2
setz dl
cmp r14b, 8
setz sil
or sil, dl
test sil, cl
jnz def_AF35E; jumptable 00000000000AF35E default case, cases 4-7
mov rbx, rdi
lea ecx, [r14-1]
cmp cl, 1
ja loc_AF345
xorps xmm0, xmm0
movaps [rsp+68h+var_68], xmm0
mov [rsp+68h+var_58], 0
mov rsi, [rax+8]
sub rsi, [rax]
sar rsi, 4
cmp r14b, 2
jnz short loc_AF1EB
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; 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>>::reserve(ulong)
mov rax, [rbx]
mov r15, [rax]
mov r13, [rax+8]
sub r13, r15
sar r13, 4
test r13, r13
jle short loc_AF22C
inc r13
mov r12, rsp
loc_AF1D1:
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_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>>(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> &&)
add r15, 10h
dec r13
cmp r13, 1
ja short loc_AF1D1
jmp short loc_AF22C
loc_AF1EB:
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rsi
mov rdi, rsp
mov rsi, rax
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; 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>>::reserve(ulong)
mov rax, [rbx]
mov r12, [rax]
mov r13, [rax+8]
cmp r12, r13
jz short loc_AF22C
mov r15, rsp
loc_AF216:
lea rsi, [r12+20h]
mov rdi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_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>>(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> &&)
add r12, 30h ; '0'
cmp r12, r13
jnz short loc_AF216
loc_AF22C:
mov r13, qword ptr [rsp+68h+var_68+8]
cmp qword ptr [rsp+68h+var_68], r13
jz loc_AF33D
lea r15, [rsp+68h+var_48]
mov r12, rsp
loc_AF243:
lea rdi, [r13-10h]
movups xmm0, xmmword ptr [r13-10h]
movaps [rsp+68h+var_48], xmm0
xor esi, esi
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)
mov byte ptr [r13-10h], 0
mov qword ptr [r13-8], 0
mov rdi, r15
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)
mov r13, qword ptr [rsp+68h+var_68+8]
add r13, 0FFFFFFFFFFFFFFF0h
mov qword ptr [rsp+68h+var_68+8], r13
mov rdi, r13
xor esi, esi
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)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
movzx eax, byte ptr [rsp+68h+var_48]
cmp eax, 1
jz short loc_AF2E6
cmp eax, 2
jnz short loc_AF31C
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
mov rbp, [rdi+8]
sub rbp, r13
sar rbp, 4
test rbp, rbp
jle short loc_AF2DC
inc rbp
loc_AF2BC:
mov rdi, r12
mov rsi, r13
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_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>>(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> &&)
add r13, 10h
dec rbp
cmp rbp, 1
jg short loc_AF2BC
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
loc_AF2DC:
mov rsi, r13
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE15_M_erase_at_endEPSD_; 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>>::_M_erase_at_end(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>*)
jmp short loc_AF31C
loc_AF2E6:
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
mov rbp, [rdi+8]
cmp r13, rbp
jz short loc_AF314
loc_AF2F7:
lea rsi, [r13+20h]
mov rdi, r12
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_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>>(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> &&)
add r13, 30h ; '0'
cmp r13, rbp
jnz short loc_AF2F7
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
loc_AF314:
mov rsi, r13
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE15_M_erase_at_endEPSG_; 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>>>::_M_erase_at_end(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>>*)
loc_AF31C:
mov rdi, r15
xor esi, esi
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)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r13, qword ptr [rsp+68h+var_68+8]
cmp qword ptr [rsp+68h+var_68], r13
jnz loc_AF243
loc_AF33D:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; 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>>::~vector()
loc_AF345:
movzx eax, r14b
dec eax; switch 8 cases
cmp eax, 7
ja short def_AF35E; jumptable 00000000000AF35E default case, cases 4-7
lea rcx, jpt_AF35E
movsxd rax, ds:(jpt_AF35E - 13B290h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AF360:
mov rdi, [rbx]; jumptable 00000000000AF35E case 1
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EED2Ev; 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>>>::~vector()
jmp short loc_AF387
loc_AF36A:
mov rdi, [rbx]; jumptable 00000000000AF35E case 3
mov rax, [rdi]
lea rcx, [rdi+10h]
cmp rax, rcx
jz short loc_AF38A
mov rsi, [rcx]
inc rsi; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_AF387:
mov rdi, [rbx]
loc_AF38A:
mov esi, 20h ; ' '
jmp short loc_AF3C5
loc_AF391:
mov rdi, [rbx]; jumptable 00000000000AF35E case 2
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; 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>>::~vector()
mov rdi, [rbx]
mov esi, 18h
jmp short loc_AF3C5
loc_AF3A3:
mov rdi, [rbx]; jumptable 00000000000AF35E case 8
mov rax, [rdi]
test rax, rax
jz short loc_AF3C0
mov rsi, [rdi+10h]
sub rsi, rax; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rbx]; void *
loc_AF3C0:
mov esi, 28h ; '('; unsigned __int64
loc_AF3C5:
call __ZdlPvm; operator delete(void *,ulong)
def_AF35E:
add rsp, 38h; jumptable 00000000000AF35E default case, cases 4-7
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_AF3DD
jmp short $+2
loc_AF3DD:
mov rbx, rax
jmp short loc_AF3FE
jmp short $+2
loc_AF3E4:
mov rbx, rax
lea r14, [rsp+arg_18]
mov rdi, r14
xor esi, esi
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)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_AF3FE:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; 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>>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
long long **a1,
int a2)
{
long long *v2; // rax
char v3; // r14
long long v5; // rsi
long long v6; // r15
long long v7; // r13
long long v8; // r13
bool v9; // cf
long long v10; // r12
long long i; // r13
long long j; // r13
char *v13; // r13
long long v14; // rdi
long long v15; // r13
long long v16; // rbp
long long v17; // rbp
long long v18; // rdi
long long v19; // r13
long long v20; // rbp
void **v21; // rdi
_QWORD *v22; // rcx
unsigned long long v23; // rsi
long long v24; // rax
__int128 v25; // [rsp+0h] [rbp-68h] BYREF
long long v26; // [rsp+10h] [rbp-58h]
_OWORD v27[4]; // [rsp+20h] [rbp-48h] BYREF
v2 = *a1;
if ( *a1 != 0LL || a2 != 1 )
{
v3 = a2;
if ( v2 != 0LL || (a2 & 0xFE) != 2 && (_BYTE)a2 != 8 )
{
if ( (unsigned __int8)(a2 - 1) <= 1u )
{
v25 = 0LL;
v26 = 0LL;
v5 = (v2[1] - *v2) >> 4;
if ( v3 == 2 )
{
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>>::reserve(
&v25,
v5);
v6 = **a1;
v7 = ((*a1)[1] - v6) >> 4;
if ( v7 > 0 )
{
v8 = v7 + 1;
do
{
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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v25,
v6);
v6 += 16LL;
v9 = v8-- == 1;
}
while ( !v9 && v8 != 1 );
}
}
else
{
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>>::reserve(
&v25,
0xAAAAAAAAAAAAAAABLL * v5);
v10 = **a1;
for ( i = (*a1)[1]; v10 != i; v10 += 48LL )
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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v25,
v10 + 32);
}
for ( j = *((_QWORD *)&v25 + 1); (_QWORD)v25 != *((_QWORD *)&v25 + 1); j = *((_QWORD *)&v25 + 1) )
{
v27[0] = *(_OWORD *)(j - 16);
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 *)(j - 16));
*(_BYTE *)(j - 16) = 0;
*(_QWORD *)(j - 8) = 0LL;
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 *)v27);
v13 = (char *)(*((_QWORD *)&v25 + 1) - 16LL);
*((_QWORD *)&v25 + 1) = v13;
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(v13);
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>::data::~data(v13);
if ( LOBYTE(v27[0]) == 1 )
{
v18 = *((_QWORD *)&v27[0] + 1);
v19 = **((_QWORD **)&v27[0] + 1);
v20 = *(_QWORD *)(*((_QWORD *)&v27[0] + 1) + 8LL);
if ( **((_QWORD **)&v27[0] + 1) != v20 )
{
do
{
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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v25,
v19 + 32);
v19 += 48LL;
}
while ( v19 != v20 );
v18 = *((_QWORD *)&v27[0] + 1);
v19 = **((_QWORD **)&v27[0] + 1);
}
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>>>::_M_erase_at_end(
v18,
v19);
}
else if ( LOBYTE(v27[0]) == 2 )
{
v14 = *((_QWORD *)&v27[0] + 1);
v15 = **((_QWORD **)&v27[0] + 1);
v16 = (long long)(*(_QWORD *)(*((_QWORD *)&v27[0] + 1) + 8LL) - **((_QWORD **)&v27[0] + 1)) >> 4;
if ( v16 > 0 )
{
v17 = v16 + 1;
do
{
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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v25,
v15);
v15 += 16LL;
--v17;
}
while ( v17 > 1 );
v14 = *((_QWORD *)&v27[0] + 1);
v15 = **((_QWORD **)&v27[0] + 1);
}
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>>::_M_erase_at_end(
v14,
v15);
}
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 *)v27);
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>::data::~data(v27);
}
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>>::~vector(&v25);
}
switch ( v3 )
{
case 1:
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>>>::~vector(*a1);
goto LABEL_29;
case 2:
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>>::~vector(*a1);
v21 = (void **)*a1;
v23 = 24LL;
goto LABEL_35;
case 3:
v21 = (void **)*a1;
v22 = *a1 + 2;
if ( (_QWORD *)**a1 != v22 )
{
operator delete((void *)**a1, *v22 + 1LL);
LABEL_29:
v21 = (void **)*a1;
}
v23 = 32LL;
goto LABEL_35;
case 8:
v21 = (void **)*a1;
v24 = **a1;
if ( v24 )
{
operator delete((void *)**a1, (unsigned long long)v21[2] - v24);
v21 = (void **)*a1;
}
v23 = 40LL;
LABEL_35:
operator delete(v21, v23);
break;
default:
return;
}
}
}
}
| destroy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
CMP ESI,0x1
SETZ CL
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
SETZ DL
TEST CL,DL
JNZ 0x001af3ca
MOV R14D,ESI
TEST RAX,RAX
SETZ CL
MOV EDX,R14D
AND DL,0xfe
CMP DL,0x2
SETZ DL
CMP R14B,0x8
SETZ SIL
OR SIL,DL
TEST SIL,CL
JNZ 0x001af3ca
MOV RBX,RDI
LEA ECX,[R14 + -0x1]
CMP CL,0x1
JA 0x001af345
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RSI,qword ptr [RAX + 0x8]
SUB RSI,qword ptr [RAX]
SAR RSI,0x4
CMP R14B,0x2
JNZ 0x001af1eb
LAB_001af1ad:
MOV RDI,RSP
CALL 0x001af40e
MOV RAX,qword ptr [RBX]
MOV R15,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
SUB R13,R15
SAR R13,0x4
TEST R13,R13
JLE 0x001af22c
INC R13
MOV R12,RSP
LAB_001af1d1:
MOV RDI,R12
MOV RSI,R15
CALL 0x001ae3da
ADD R15,0x10
DEC R13
CMP R13,0x1
JA 0x001af1d1
JMP 0x001af22c
LAB_001af1eb:
MOV RAX,-0x5555555555555555
IMUL RAX,RSI
LAB_001af1f9:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x001af40e
MOV RAX,qword ptr [RBX]
MOV R12,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R12,R13
JZ 0x001af22c
MOV R15,RSP
LAB_001af216:
LEA RSI,[R12 + 0x20]
LAB_001af21b:
MOV RDI,R15
CALL 0x001ae3da
ADD R12,0x30
CMP R12,R13
JNZ 0x001af216
LAB_001af22c:
MOV R13,qword ptr [RSP + 0x8]
CMP qword ptr [RSP],R13
JZ 0x001af33d
LEA R15,[RSP + 0x20]
MOV R12,RSP
LAB_001af243:
LEA RDI,[R13 + -0x10]
MOVUPS XMM0,xmmword ptr [R13 + -0x10]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
XOR ESI,ESI
CALL 0x001aa5c4
MOV byte ptr [R13 + -0x10],0x0
MOV qword ptr [R13 + -0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x001aa5c4
MOV R13,qword ptr [RSP + 0x8]
ADD R13,-0x10
MOV qword ptr [RSP + 0x8],R13
MOV RDI,R13
XOR ESI,ESI
CALL 0x001aa5c4
MOV RDI,R13
CALL 0x001aecde
MOVZX EAX,byte ptr [RSP + 0x20]
CMP EAX,0x1
JZ 0x001af2e6
CMP EAX,0x2
JNZ 0x001af31c
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
SUB RBP,R13
SAR RBP,0x4
TEST RBP,RBP
JLE 0x001af2dc
INC RBP
LAB_001af2bc:
MOV RDI,R12
MOV RSI,R13
CALL 0x001ae3da
ADD R13,0x10
DEC RBP
CMP RBP,0x1
JG 0x001af2bc
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
LAB_001af2dc:
MOV RSI,R13
CALL 0x001af562
JMP 0x001af31c
LAB_001af2e6:
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP R13,RBP
JZ 0x001af314
LAB_001af2f7:
LEA RSI,[R13 + 0x20]
LAB_001af2fb:
MOV RDI,R12
CALL 0x001ae3da
LAB_001af303:
ADD R13,0x30
CMP R13,RBP
JNZ 0x001af2f7
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
LAB_001af314:
MOV RSI,R13
CALL 0x001af5a8
LAB_001af31c:
MOV RDI,R15
XOR ESI,ESI
CALL 0x001aa5c4
MOV RDI,R15
CALL 0x001aecde
MOV R13,qword ptr [RSP + 0x8]
CMP qword ptr [RSP],R13
JNZ 0x001af243
LAB_001af33d:
MOV RDI,RSP
CALL 0x001af510
LAB_001af345:
MOVZX EAX,R14B
DEC EAX
CMP EAX,0x7
JA 0x001af3ca
LEA RCX,[0x23b290]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RBX]
CALL 0x001af662
JMP 0x001af387
caseD_3:
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
LEA RCX,[RDI + 0x10]
CMP RAX,RCX
JZ 0x001af38a
MOV RSI,qword ptr [RCX]
INC RSI
MOV RDI,RAX
CALL 0x001231f0
LAB_001af387:
MOV RDI,qword ptr [RBX]
LAB_001af38a:
MOV ESI,0x20
JMP 0x001af3c5
caseD_2:
MOV RDI,qword ptr [RBX]
CALL 0x001af510
MOV RDI,qword ptr [RBX]
MOV ESI,0x18
JMP 0x001af3c5
caseD_8:
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001af3c0
MOV RSI,qword ptr [RDI + 0x10]
SUB RSI,RAX
MOV RDI,RAX
CALL 0x001231f0
MOV RDI,qword ptr [RBX]
LAB_001af3c0:
MOV ESI,0x28
LAB_001af3c5:
CALL 0x001231f0
caseD_4:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::destroy(json_value *this,uint param_2)
{
long *plVar1;
long lVar2;
pair *ppVar3;
void *pvVar4;
byte bVar5;
ulong uVar6;
bool bVar7;
int8 *puVar8;
long lVar9;
data *pdVar10;
pair *ppVar11;
basic_json *pbVar12;
data *local_68;
data *pdStack_60;
int8 local_58;
int8 local_48;
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>>>
*pvStack_40;
plVar1 = *(long **)this;
if (param_2 == 1 && plVar1 == (long *)0x0) {
return;
}
bVar5 = (byte)param_2;
if ((bVar5 == 8 || (bVar5 & 0xfe) == 2) && plVar1 == (long *)0x0) {
return;
}
if ((byte)(bVar5 - 1) < 2) {
local_68 = (data *)0x0;
pdStack_60 = (data *)0x0;
local_58 = 0;
uVar6 = plVar1[1] - *plVar1 >> 4;
if (bVar5 == 2) {
/* try { // try from 001af1ad to 001af1b4 has its CatchHandler @ 001af3d9 */
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>>>
::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,uVar6);
pbVar12 = (basic_json *)**(long **)this;
lVar9 = (*(long **)this)[1] - (long)pbVar12 >> 4;
if (0 < lVar9) {
uVar6 = lVar9 + 1;
do {
/* try { // try from 001af1d1 to 001af1db has its CatchHandler @ 001af3dd */
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>>>
::
emplace_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>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,pbVar12);
pbVar12 = pbVar12 + 0x10;
uVar6 = uVar6 - 1;
} while (1 < uVar6);
}
}
else {
/* try { // try from 001af1f9 to 001af203 has its CatchHandler @ 001af3d9 */
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>>>
::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,uVar6 * -0x5555555555555555);
lVar2 = (*(long **)this)[1];
for (lVar9 = **(long **)this; lVar9 != lVar2; lVar9 = lVar9 + 0x30) {
/* try { // try from 001af21b to 001af222 has its CatchHandler @ 001af3db */
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>>>
::
emplace_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>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,(basic_json *)(lVar9 + 0x20));
}
}
if (local_68 != pdStack_60) {
do {
pdVar10 = pdStack_60;
local_48 = *(int8 *)(pdStack_60 + -0x10);
pvStack_40 = *(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>>>
**)(pdStack_60 + -8);
assert_invariant((bool)((char)pdStack_60 + -0x10));
pdVar10[-0x10] = (data)0x0;
*(int8 *)(pdVar10 + -8) = 0;
bVar7 = SUB81((data *)&local_48,0);
assert_invariant(bVar7);
pdVar10 = pdStack_60 + -0x10;
pdStack_60 = pdVar10;
assert_invariant(SUB81(pdVar10,0));
data::~data(pdVar10);
if (local_48._0_1_ == (data)0x1) {
ppVar11 = *(pair **)pvStack_40;
ppVar3 = *(pair **)(pvStack_40 + 8);
if (ppVar11 != ppVar3) {
do {
/* try { // try from 001af2fb to 001af302 has its CatchHandler @ 001af3e4 */
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>>>
::
emplace_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>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,(basic_json *)(ppVar11 + 0x20));
ppVar11 = ppVar11 + 0x30;
} while (ppVar11 != ppVar3);
ppVar11 = *(pair **)pvStack_40;
}
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>>>>
::_M_erase_at_end((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)pvStack_40,ppVar11);
}
else if (local_48._0_1_ == (data)0x2) {
pbVar12 = *(basic_json **)pvStack_40;
lVar9 = *(long *)(pvStack_40 + 8) - (long)pbVar12 >> 4;
if (0 < lVar9) {
lVar9 = lVar9 + 1;
do {
/* try { // try from 001af2bc to 001af2c6 has its CatchHandler @ 001af3e2 */
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>>>
::
emplace_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>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,pbVar12);
pbVar12 = pbVar12 + 0x10;
lVar9 = lVar9 + -1;
} while (1 < lVar9);
pbVar12 = *(basic_json **)pvStack_40;
}
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>>>
::_M_erase_at_end(pvStack_40,pbVar12);
}
assert_invariant(bVar7);
data::~data((data *)&local_48);
} while (local_68 != pdStack_60);
}
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>>>
::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68);
}
switch(param_2 & 0xff) {
case 1:
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>>>>
::~vector(*(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);
LAB_001af387:
puVar8 = *(int8 **)this;
goto LAB_001af38a;
case 2:
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>>>
::~vector(*(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);
puVar8 = *(int8 **)this;
uVar6 = 0x18;
break;
case 3:
puVar8 = *(int8 **)this;
if ((long *)*puVar8 != puVar8 + 2) {
operator_delete((long *)*puVar8,puVar8[2] + 1);
goto LAB_001af387;
}
LAB_001af38a:
uVar6 = 0x20;
break;
default:
goto switchD_001af35e_caseD_4;
case 8:
puVar8 = *(int8 **)this;
pvVar4 = (void *)*puVar8;
if (pvVar4 != (void *)0x0) {
operator_delete(pvVar4,puVar8[2] - (long)pvVar4);
puVar8 = *(int8 **)this;
}
uVar6 = 0x28;
}
operator_delete(puVar8,uVar6);
switchD_001af35e_caseD_4:
return;
}
| |
39,015 | server_context::send_rerank(server_slot const&, llama_batch const&) | monkey531[P]llama/examples/server/server.cpp | void send_rerank(const server_slot & slot, const llama_batch & batch) {
auto res = std::make_unique<server_task_result_rerank>();
res->id = slot.id_task;
res->index = slot.index;
res->n_tokens = slot.n_prompt_tokens;
for (int i = 0; i < batch.n_tokens; ++i) {
if (!batch.logits[i] || batch.seq_id[i][0] != slot.id) {
continue;
}
const float * embd = llama_get_embeddings_seq(ctx, batch.seq_id[i][0]);
if (embd == NULL) {
embd = llama_get_embeddings_ith(ctx, i);
}
if (embd == NULL) {
SLT_ERR(slot, "failed to get embeddings, token = %d, seq_id = %d\n", batch.token[i], batch.seq_id[i][0]);
res->score = -1e6;
continue;
}
res->score = embd[0];
}
SLT_DBG(slot, "sending rerank result, res.score = %f\n", res->score);
queue_results.send(std::move(res));
} | O0 | cpp | server_context::send_rerank(server_slot const&, llama_batch const&):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2c60
movq 0xa8(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x64(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movl 0x64(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0xa8(%rsp), %rax
movq 0x78(%rax), %rax
movl %eax, 0x68(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movl 0x68(%rsp), %ecx
movl %ecx, 0x10(%rax)
movq 0xa8(%rsp), %rax
movl 0x780(%rax), %eax
movl %eax, 0x6c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movl 0x6c(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl $0x0, 0x94(%rsp)
movl 0x94(%rsp), %eax
movq 0xa0(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x18bfa7
movq 0xa0(%rsp), %rax
movq 0x30(%rax), %rax
movslq 0x94(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x18be28
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x94(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movq 0xa8(%rsp), %rcx
cmpl (%rcx), %eax
je 0x18be2d
jmp 0x18bf91
movq 0x58(%rsp), %rax
movq 0x1340(%rax), %rdi
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x94(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
callq 0x65750
movq %rax, 0x50(%rsp)
jmp 0x18be5f
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0x18bebb
movq 0x58(%rsp), %rax
movq 0x1340(%rax), %rdi
movl 0x94(%rsp), %esi
callq 0x64130
movq %rax, 0x48(%rsp)
jmp 0x18be96
movq 0x48(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x18bebb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x18c09c
cmpq $0x0, 0x88(%rsp)
jne 0x18bf67
jmp 0x18becc
xorl %eax, %eax
leaq 0x3582b3(%rip), %rcx # 0x4e4188
cmpl (%rcx), %eax
jg 0x18bf47
callq 0x2d08b0
movq %rax, 0x40(%rsp)
jmp 0x18bee5
movq 0x40(%rsp), %rdi
movq 0xa8(%rsp), %rax
movl (%rax), %r9d
movl 0x4(%rax), %ecx
movq 0xa0(%rsp), %rax
movslq 0x94(%rsp), %rsi
movq 0x8(%rax), %rdx
movq 0x28(%rax), %rax
movl (%rdx,%rsi,4), %edx
movq (%rax,%rsi,8), %rax
movl (%rax), %esi
movq %rsp, %rax
movl %esi, 0x10(%rax)
movl %edx, 0x8(%rax)
movl %ecx, (%rax)
leaq 0x15aa68(%rip), %rdx # 0x2e6993
leaq 0x15aad7(%rip), %r8 # 0x2e6a09
xorl %eax, %eax
movl $0x4, %esi
movl $0xc, %ecx
callq 0x2d09a0
jmp 0x18bf45
jmp 0x18bf47
jmp 0x18bf49
jmp 0x18bf4b
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movss 0x1520b8(%rip), %xmm0 # 0x2de018
movss %xmm0, 0x14(%rax)
jmp 0x18bf91
movq 0x88(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x3c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x14(%rax)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x18bdd1
jmp 0x18bfa9
movl $0x1, %eax
leaq 0x3581d3(%rip), %rcx # 0x4e4188
cmpl (%rcx), %eax
jg 0x18c026
callq 0x2d08b0
movq %rax, 0x30(%rsp)
jmp 0x18bfc5
movq 0xa8(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0x2c(%rsp)
movl 0x4(%rax), %eax
movl %eax, 0x28(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1a2cc0
movl 0x28(%rsp), %ecx
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %r9d
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rsp, %rax
movl %ecx, (%rax)
leaq 0x15aa0b(%rip), %rdx # 0x2e6a15
leaq 0x15a9f8(%rip), %r8 # 0x2e6a09
movl $0x1, %esi
movl $0xc, %ecx
movb $0x1, %al
callq 0x2d09a0
jmp 0x18c024
jmp 0x18c026
jmp 0x18c028
jmp 0x18c02a
movq 0x58(%rsp), %rax
addq $0x1578, %rax # imm = 0x1578
movq %rax, 0x18(%rsp)
leaq 0x70(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x98(%rsp), %rsi
callq 0x1a2cd0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x17f3b0
jmp 0x18c062
leaq 0x70(%rsp), %rdi
callq 0xfedc0
leaq 0x98(%rsp), %rdi
callq 0x1a2d30
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xfedc0
leaq 0x98(%rsp), %rdi
callq 0x1a2d30
movq 0x80(%rsp), %rdi
callq 0x64e40
nopw %cs:(%rax,%rax)
| _ZN14server_context11send_rerankERK11server_slotRK11llama_batch:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_60], rax
lea rdi, [rsp+0B8h+var_20]
call _ZSt11make_uniqueI25server_task_result_rerankJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<server_task_result_rerank>()
mov rax, [rsp+0B8h+var_10]
mov eax, [rax+4]
mov [rsp+0B8h+var_54], eax
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
mov ecx, [rsp+0B8h+var_54]
mov [rax+8], ecx
mov rax, [rsp+0B8h+var_10]
mov rax, [rax+78h]
mov [rsp+0B8h+var_50], eax
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
mov ecx, [rsp+0B8h+var_50]
mov [rax+10h], ecx
mov rax, [rsp+0B8h+var_10]
mov eax, [rax+780h]
mov [rsp+0B8h+var_4C], eax
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
mov ecx, [rsp+0B8h+var_4C]
mov [rax+18h], ecx
mov [rsp+0B8h+var_24], 0
loc_18BDD1:
mov eax, [rsp+0B8h+var_24]
mov rcx, [rsp+0B8h+var_18]
cmp eax, [rcx]
jge loc_18BFA7
mov rax, [rsp+0B8h+var_18]
mov rax, [rax+30h]
movsxd rcx, [rsp+0B8h+var_24]
cmp byte ptr [rax+rcx], 0
jz short loc_18BE28
mov rax, [rsp+0B8h+var_18]
mov rax, [rax+28h]
movsxd rcx, [rsp+0B8h+var_24]
mov rax, [rax+rcx*8]
mov eax, [rax]
mov rcx, [rsp+0B8h+var_10]
cmp eax, [rcx]
jz short loc_18BE2D
loc_18BE28:
jmp loc_18BF91
loc_18BE2D:
mov rax, [rsp+0B8h+var_60]
mov rdi, [rax+1340h]
mov rax, [rsp+0B8h+var_18]
mov rax, [rax+28h]
movsxd rcx, [rsp+0B8h+var_24]
mov rax, [rax+rcx*8]
mov esi, [rax]
call _llama_get_embeddings_seq
mov [rsp+0B8h+var_68], rax
jmp short $+2
loc_18BE5F:
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_30], rax
cmp [rsp+0B8h+var_30], 0
jnz short loc_18BEBB
mov rax, [rsp+0B8h+var_60]
mov rdi, [rax+1340h]
mov esi, [rsp+0B8h+var_24]
call _llama_get_embeddings_ith
mov [rsp+0B8h+var_70], rax
jmp short $+2
loc_18BE96:
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_30], rax
jmp short loc_18BEBB
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp loc_18C09C
loc_18BEBB:
cmp [rsp+0B8h+var_30], 0
jnz loc_18BF67
jmp short $+2
loc_18BECC:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_18BF47
call _Z15common_log_mainv; common_log_main(void)
mov [rsp+0B8h+var_78], rax
jmp short $+2
loc_18BEE5:
mov rdi, [rsp+0B8h+var_78]
mov rax, [rsp+0B8h+var_10]
mov r9d, [rax]
mov ecx, [rax+4]
mov rax, [rsp+0B8h+var_18]
movsxd rsi, [rsp+0B8h+var_24]
mov rdx, [rax+8]
mov rax, [rax+28h]
mov edx, [rdx+rsi*4]
mov rax, [rax+rsi*8]
mov esi, [rax]
mov rax, rsp
mov [rax+10h], esi
mov [rax+8], edx
mov [rax], ecx
lea rdx, aSlot12SId2dTas_24; "slot %12.*s: id %2d | task %d | failed "...
lea r8, aSendRerank; "send_rerank"
xor eax, eax
mov esi, 4
mov ecx, 0Ch
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short $+2
loc_18BF45:
jmp short $+2
loc_18BF47:
jmp short $+2
loc_18BF49:
jmp short $+2
loc_18BF4B:
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
movss xmm0, cs:dword_2DE018
movss dword ptr [rax+14h], xmm0
jmp short loc_18BF91
loc_18BF67:
mov rax, [rsp+0B8h+var_30]
movss xmm0, dword ptr [rax]
movss [rsp+0B8h+var_7C], xmm0
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
movss xmm0, [rsp+0B8h+var_7C]
movss dword ptr [rax+14h], xmm0
loc_18BF91:
mov eax, [rsp+0B8h+var_24]
add eax, 1
mov [rsp+0B8h+var_24], eax
jmp loc_18BDD1
loc_18BFA7:
jmp short $+2
loc_18BFA9:
mov eax, 1
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_18C026
call _Z15common_log_mainv; common_log_main(void)
mov [rsp+0B8h+var_88], rax
jmp short $+2
loc_18BFC5:
mov rax, [rsp+0B8h+var_10]
mov ecx, [rax]
mov [rsp+0B8h+var_8C], ecx
mov eax, [rax+4]
mov [rsp+0B8h+var_90], eax
lea rdi, [rsp+0B8h+var_20]
call _ZNKSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EEptEv; std::unique_ptr<server_task_result_rerank>::operator->(void)
mov ecx, [rsp+0B8h+var_90]
mov rdi, [rsp+0B8h+var_88]
mov r9d, [rsp+0B8h+var_8C]
movss xmm0, dword ptr [rax+14h]
cvtss2sd xmm0, xmm0
mov rax, rsp
mov [rax], ecx
lea rdx, aSlot12SId2dTas_25; "slot %12.*s: id %2d | task %d | sending"...
lea r8, aSendRerank; "send_rerank"
mov esi, 1
mov ecx, 0Ch
mov al, 1
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short $+2
loc_18C024:
jmp short $+2
loc_18C026:
jmp short $+2
loc_18C028:
jmp short $+2
loc_18C02A:
mov rax, [rsp+0B8h+var_60]
add rax, 1578h
mov [rsp+0B8h+var_A0], rax
lea rdi, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_98], rdi
lea rsi, [rsp+0B8h+var_20]
call _ZNSt10unique_ptrI18server_task_resultSt14default_deleteIS0_EEC2I25server_task_result_rerankS1_IS5_EvEEOS_IT_T0_E; std::unique_ptr<server_task_result>::unique_ptr<server_task_result_rerank,std::default_delete<server_task_result_rerank>,void>(std::unique_ptr&&<server_task_result_rerank,std::default_delete<server_task_result_rerank>>)
mov rdi, [rsp+0B8h+var_A0]
mov rsi, [rsp+0B8h+var_98]
call _ZN15server_response4sendEOSt10unique_ptrI18server_task_resultSt14default_deleteIS1_EE; server_response::send(std::unique_ptr<server_task_result> &&)
jmp short $+2
loc_18C062:
lea rdi, [rsp+0B8h+var_48]
call _ZNSt10unique_ptrI18server_task_resultSt14default_deleteIS0_EED2Ev; std::unique_ptr<server_task_result>::~unique_ptr()
lea rdi, [rsp+0B8h+var_20]
call _ZNSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EED2Ev; std::unique_ptr<server_task_result_rerank>::~unique_ptr()
add rsp, 0B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_68]
call _ZNSt10unique_ptrI18server_task_resultSt14default_deleteIS0_EED2Ev; std::unique_ptr<server_task_result>::~unique_ptr()
loc_18C09C:
lea rdi, [rsp+arg_90]
call _ZNSt10unique_ptrI25server_task_result_rerankSt14default_deleteIS0_EED2Ev; std::unique_ptr<server_task_result_rerank>::~unique_ptr()
mov rdi, [rsp+arg_78]
call __Unwind_Resume
| long long server_context::send_rerank(long long a1, int *a2, long long a3)
{
int v4; // [rsp+2Ch] [rbp-8Ch]
int v5; // [rsp+30h] [rbp-88h]
int v6; // [rsp+3Ch] [rbp-7Ch]
int v7; // [rsp+40h] [rbp-78h]
int v8; // [rsp+64h] [rbp-54h]
int v9; // [rsp+68h] [rbp-50h]
int v10; // [rsp+6Ch] [rbp-4Ch]
_BYTE v11[24]; // [rsp+70h] [rbp-48h] BYREF
int *embeddings_seq; // [rsp+88h] [rbp-30h]
unsigned int i; // [rsp+94h] [rbp-24h]
_BYTE v14[8]; // [rsp+98h] [rbp-20h] BYREF
long long v15; // [rsp+A0h] [rbp-18h]
int *v16; // [rsp+A8h] [rbp-10h]
long long v17; // [rsp+B0h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
std::make_unique<server_task_result_rerank>(v14);
v8 = v16[1];
*(_DWORD *)(std::unique_ptr<server_task_result_rerank>::operator->(v14) + 8) = v8;
v9 = *((_QWORD *)v16 + 15);
*(_DWORD *)(std::unique_ptr<server_task_result_rerank>::operator->(v14) + 16) = v9;
v10 = v16[480];
*(_DWORD *)(std::unique_ptr<server_task_result_rerank>::operator->(v14) + 24) = v10;
for ( i = 0; (signed int)i < *(_DWORD *)v15; ++i )
{
if ( *(_BYTE *)(*(_QWORD *)(v15 + 48) + (int)i) && **(_DWORD **)(*(_QWORD *)(v15 + 40) + 8LL * (int)i) == *v16 )
{
embeddings_seq = (int *)llama_get_embeddings_seq(
*(_QWORD *)(a1 + 4928),
**(unsigned int **)(*(_QWORD *)(v15 + 40) + 8LL * (int)i));
if ( !embeddings_seq )
embeddings_seq = (int *)llama_get_embeddings_ith(*(_QWORD *)(a1 + 4928), i);
if ( embeddings_seq )
{
v6 = *embeddings_seq;
*(_DWORD *)(std::unique_ptr<server_task_result_rerank>::operator->(v14) + 20) = v6;
}
else
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
common_log_add(
v7,
4,
(unsigned int)"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n",
12,
(unsigned int)"send_rerank",
*v16);
}
*(_DWORD *)(std::unique_ptr<server_task_result_rerank>::operator->(v14) + 20) = -915135488;
}
}
}
if ( common_log_verbosity_thold >= 1 )
{
v5 = common_log_main();
v4 = *v16;
std::unique_ptr<server_task_result_rerank>::operator->(v14);
common_log_add(
v5,
1,
(unsigned int)"slot %12.*s: id %2d | task %d | sending rerank result, res.score = %f\n",
12,
(unsigned int)"send_rerank",
v4);
}
std::unique_ptr<server_task_result>::unique_ptr<server_task_result_rerank,std::default_delete<server_task_result_rerank>,void>(
v11,
v14);
server_response::send(a1 + 5496, (long long)v11);
std::unique_ptr<server_task_result>::~unique_ptr((long long)v11);
return std::unique_ptr<server_task_result_rerank>::~unique_ptr(v14);
}
| |||
39,016 | server_context::send_rerank(server_slot const&, llama_batch const&) | monkey531[P]llama/examples/server/server.cpp | void send_rerank(const server_slot & slot, const llama_batch & batch) {
auto res = std::make_unique<server_task_result_rerank>();
res->id = slot.id_task;
res->index = slot.index;
res->n_tokens = slot.n_prompt_tokens;
for (int i = 0; i < batch.n_tokens; ++i) {
if (!batch.logits[i] || batch.seq_id[i][0] != slot.id) {
continue;
}
const float * embd = llama_get_embeddings_seq(ctx, batch.seq_id[i][0]);
if (embd == NULL) {
embd = llama_get_embeddings_ith(ctx, i);
}
if (embd == NULL) {
SLT_ERR(slot, "failed to get embeddings, token = %d, seq_id = %d\n", batch.token[i], batch.seq_id[i][0]);
res->score = -1e6;
continue;
}
res->score = embd[0];
}
SLT_DBG(slot, "sending rerank result, res.score = %f\n", res->score);
queue_results.send(std::move(res));
} | O2 | cpp | server_context::send_rerank(server_slot const&, llama_batch const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x89558
movl 0x4(%r14), %ecx
movq (%r12), %rax
movl %ecx, 0x8(%rax)
movl 0x78(%r14), %ecx
movl %ecx, 0x10(%rax)
movl 0x780(%r14), %ecx
movl %ecx, 0x18(%rax)
leaq 0x20fe05(%rip), %rbp # 0x291f98
xorl %r13d, %r13d
movslq (%r15), %rcx
cmpq %rcx, %r13
jge 0x82257
movq 0x30(%r15), %rcx
cmpb $0x0, (%rcx,%r13)
je 0x821ef
movq 0x28(%r15), %rcx
movq (%rcx,%r13,8), %rcx
movl (%rcx), %esi
cmpl (%r14), %esi
jne 0x821ef
movq 0x1340(%rbx), %rdi
callq 0x281d0
testq %rax, %rax
jne 0x821e1
movq 0x1340(%rbx), %rdi
movl %r13d, %esi
callq 0x28780
testq %rax, %rax
je 0x821f4
movss (%rax), %xmm0
movq 0x8(%rsp), %rax
movss %xmm0, 0x14(%rax)
incq %r13
jmp 0x82196
cmpl $0x0, (%rbp)
movss 0x6dfa8(%rip), %xmm0 # 0xf01a8
js 0x821e5
callq 0xeb6fe
movl (%r14), %r9d
movl 0x4(%r14), %r10d
movq 0x8(%r15), %rcx
movq 0x28(%r15), %rdx
movl (%rcx,%r13,4), %r11d
movq (%rdx,%r13,8), %rcx
movl (%rcx), %r12d
subq $0x8, %rsp
movq %rax, %rdi
pushq $0x4
popq %rsi
leaq 0x756f0(%rip), %rdx # 0xf7922
pushq $0xc
popq %rcx
leaq 0x7575c(%rip), %r8 # 0xf7998
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0xeb796
addq $0x20, %rsp
movss 0x6df53(%rip), %xmm0 # 0xf01a8
jmp 0x821e5
cmpl $0x0, (%rbp)
jle 0x8229e
callq 0xeb6fe
movl (%r14), %r9d
movl 0x4(%r14), %r10d
movq 0x8(%rsp), %rcx
cvtss2sd 0x14(%rcx), %xmm0
subq $0x8, %rsp
leaq 0x75726(%rip), %rdx # 0xf79a4
leaq 0x75713(%rip), %r8 # 0xf7998
pushq $0x1
popq %rsi
pushq $0xc
popq %rcx
movq %rax, %rdi
movb $0x1, %al
pushq %r10
callq 0xeb796
popq %rax
popq %rcx
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
addq $0x1578, %rbx # imm = 0x1578
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x7e10c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x822cb
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x822db
movq (%rdi), %rax
callq *0x28(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x82304
movq (%rdi), %rax
callq *0x28(%rax)
jmp 0x82304
jmp 0x82301
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x82314
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x293c0
| _ZN14server_context11send_rerankERK11server_slotRK11llama_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+48h+var_40]
mov rdi, r12
call _ZSt11make_uniqueI25server_task_result_rerankJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<server_task_result_rerank>()
mov ecx, [r14+4]
mov rax, [r12]
mov [rax+8], ecx
mov ecx, [r14+78h]
mov [rax+10h], ecx
mov ecx, [r14+780h]
mov [rax+18h], ecx
lea rbp, common_log_verbosity_thold
xor r13d, r13d
loc_82196:
movsxd rcx, dword ptr [r15]
cmp r13, rcx
jge loc_82257
mov rcx, [r15+30h]
cmp byte ptr [rcx+r13], 0
jz short loc_821EF
mov rcx, [r15+28h]
mov rcx, [rcx+r13*8]
mov esi, [rcx]
cmp esi, [r14]
jnz short loc_821EF
mov rdi, [rbx+1340h]
call _llama_get_embeddings_seq
test rax, rax
jnz short loc_821E1
mov rdi, [rbx+1340h]
mov esi, r13d
call _llama_get_embeddings_ith
test rax, rax
jz short loc_821F4
loc_821E1:
movss xmm0, dword ptr [rax]
loc_821E5:
mov rax, [rsp+48h+var_40]
movss dword ptr [rax+14h], xmm0
loc_821EF:
inc r13
jmp short loc_82196
loc_821F4:
cmp dword ptr [rbp+0], 0
movss xmm0, cs:dword_F01A8
js short loc_821E5
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r14]
mov r10d, [r14+4]
mov rcx, [r15+8]
mov rdx, [r15+28h]
mov r11d, [rcx+r13*4]
mov rcx, [rdx+r13*8]
mov r12d, [rcx]
sub rsp, 8
mov rdi, rax
push 4
pop rsi
lea rdx, aSlot12SId2dTas_24; "slot %12.*s: id %2d | task %d | failed "...
push 0Ch
pop rcx
lea r8, aSendRerank; "send_rerank"
xor eax, eax
push r12
push r11
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
add rsp, 20h
movss xmm0, cs:dword_F01A8
jmp short loc_821E5
loc_82257:
cmp dword ptr [rbp+0], 0
jle short loc_8229E
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r14]
mov r10d, [r14+4]
mov rcx, [rsp+48h+var_40]
cvtss2sd xmm0, dword ptr [rcx+14h]
sub rsp, 8
lea rdx, aSlot12SId2dTas_25; "slot %12.*s: id %2d | task %d | sending"...
lea r8, aSendRerank; "send_rerank"
push 1
pop rsi
push 0Ch
pop rcx
mov rdi, rax
mov al, 1
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
pop rax
pop rcx
mov rax, [rsp+48h+var_40]
loc_8229E:
and [rsp+48h+var_40], 0
add rbx, 1578h
lea rsi, [rsp+48h+var_38]
mov [rsi], rax
mov rdi, rbx
call _ZN15server_response4sendEOSt10unique_ptrI18server_task_resultSt14default_deleteIS1_EE; server_response::send(std::unique_ptr<server_task_result> &&)
mov rdi, [rsp+48h+var_38]
test rdi, rdi
jz short loc_822CB
mov rax, [rdi]
call qword ptr [rax+28h]
loc_822CB:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_822DB
mov rax, [rdi]
call qword ptr [rax+28h]
loc_822DB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_82304
mov rax, [rdi]
call qword ptr [rax+28h]
jmp short loc_82304
jmp short $+2
loc_82301:
mov rbx, rax
loc_82304:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_82314
mov rax, [rdi]
call qword ptr [rax+28h]
loc_82314:
mov rdi, rbx
call __Unwind_Resume
| long long * server_context::send_rerank(long long a1, _DWORD *a2, int *a3)
{
_DWORD *v4; // rax
long long i; // r13
int *embeddings_seq; // rax
int v7; // xmm0_4
int v8; // eax
int v9; // eax
long long *result; // rax
_DWORD *v11; // [rsp+8h] [rbp-40h] BYREF
_DWORD *v12; // [rsp+10h] [rbp-38h] BYREF
std::make_unique<server_task_result_rerank>(&v11);
v4 = v11;
v11[2] = a2[1];
v4[4] = a2[30];
v4[6] = a2[480];
for ( i = 0LL; i < *a3; ++i )
{
if ( *(_BYTE *)(*((_QWORD *)a3 + 6) + i) && **(_DWORD **)(*((_QWORD *)a3 + 5) + 8 * i) == *a2 )
{
embeddings_seq = (int *)llama_get_embeddings_seq(*(_QWORD *)(a1 + 4928));
if ( embeddings_seq
|| (embeddings_seq = (int *)llama_get_embeddings_ith(*(_QWORD *)(a1 + 4928), (unsigned int)i)) != 0LL )
{
v7 = *embeddings_seq;
}
else
{
v7 = -915135488;
if ( common_log_verbosity_thold >= 0 )
{
v8 = common_log_main();
common_log_add(
v8,
4,
(unsigned int)"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n",
12,
(unsigned int)"send_rerank",
*a2);
v7 = -915135488;
}
}
v4 = v11;
v11[5] = v7;
}
}
if ( common_log_verbosity_thold > 0 )
{
v9 = common_log_main();
common_log_add(
v9,
1,
(unsigned int)"slot %12.*s: id %2d | task %d | sending rerank result, res.score = %f\n",
12,
(unsigned int)"send_rerank",
*a2);
v4 = v11;
}
v11 = 0LL;
v12 = v4;
result = server_response::send(a1 + 5496, (long long)&v12);
if ( v12 )
result = (long long *)(*(long long ( **)(_DWORD *))(*(_QWORD *)v12 + 40LL))(v12);
if ( v11 )
return (long long *)(*(long long ( **)(_DWORD *))(*(_QWORD *)v11 + 40LL))(v11);
return result;
}
| send_rerank:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00189558
MOV ECX,dword ptr [R14 + 0x4]
MOV RAX,qword ptr [R12]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [R14 + 0x78]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [R14 + 0x780]
MOV dword ptr [RAX + 0x18],ECX
LEA RBP,[0x391f98]
XOR R13D,R13D
LAB_00182196:
MOVSXD RCX,dword ptr [R15]
CMP R13,RCX
JGE 0x00182257
MOV RCX,qword ptr [R15 + 0x30]
CMP byte ptr [RCX + R13*0x1],0x0
JZ 0x001821ef
MOV RCX,qword ptr [R15 + 0x28]
MOV RCX,qword ptr [RCX + R13*0x8]
MOV ESI,dword ptr [RCX]
CMP ESI,dword ptr [R14]
JNZ 0x001821ef
MOV RDI,qword ptr [RBX + 0x1340]
LAB_001821c3:
CALL 0x001281d0
TEST RAX,RAX
JNZ 0x001821e1
MOV RDI,qword ptr [RBX + 0x1340]
MOV ESI,R13D
CALL 0x00128780
TEST RAX,RAX
JZ 0x001821f4
LAB_001821e1:
MOVSS XMM0,dword ptr [RAX]
LAB_001821e5:
MOV RAX,qword ptr [RSP + 0x8]
MOVSS dword ptr [RAX + 0x14],XMM0
LAB_001821ef:
INC R13
JMP 0x00182196
LAB_001821f4:
CMP dword ptr [RBP],0x0
MOVSS XMM0,dword ptr [0x001f01a8]
JS 0x001821e5
CALL 0x001eb6fe
MOV R9D,dword ptr [R14]
MOV R10D,dword ptr [R14 + 0x4]
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,qword ptr [R15 + 0x28]
MOV R11D,dword ptr [RCX + R13*0x4]
MOV RCX,qword ptr [RDX + R13*0x8]
MOV R12D,dword ptr [RCX]
SUB RSP,0x8
MOV RDI,RAX
PUSH 0x4
POP RSI
LEA RDX,[0x1f7922]
PUSH 0xc
POP RCX
LEA R8,[0x1f7998]
XOR EAX,EAX
PUSH R12
PUSH R11
PUSH R10
CALL 0x001eb796
ADD RSP,0x20
MOVSS XMM0,dword ptr [0x001f01a8]
JMP 0x001821e5
LAB_00182257:
CMP dword ptr [RBP],0x0
JLE 0x0018229e
LAB_0018225d:
CALL 0x001eb6fe
MOV R9D,dword ptr [R14]
MOV R10D,dword ptr [R14 + 0x4]
MOV RCX,qword ptr [RSP + 0x8]
CVTSS2SD XMM0,dword ptr [RCX + 0x14]
SUB RSP,0x8
LEA RDX,[0x1f79a4]
LEA R8,[0x1f7998]
PUSH 0x1
POP RSI
PUSH 0xc
POP RCX
MOV RDI,RAX
MOV AL,0x1
PUSH R10
CALL 0x001eb796
POP RAX
POP RCX
MOV RAX,qword ptr [RSP + 0x8]
LAB_0018229e:
AND qword ptr [RSP + 0x8],0x0
ADD RBX,0x1578
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LAB_001822b3:
MOV RDI,RBX
CALL 0x0017e10c
LAB_001822bb:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001822cb
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_001822cb:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001822db
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_001822db:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001822d5) */
/* server_context::send_rerank(server_slot const&, llama_batch const&) */
void __thiscall
server_context::send_rerank(server_context *this,server_slot *param_1,llama_batch *param_2)
{
int4 *puVar1;
int8 uVar2;
ulong uVar3;
int4 uVar4;
long *local_40;
long *local_38;
std::make_unique<server_task_result_rerank>();
*(int4 *)(local_40 + 1) = *(int4 *)(param_1 + 4);
*(int4 *)(local_40 + 2) = *(int4 *)(param_1 + 0x78);
*(int4 *)(local_40 + 3) = *(int4 *)(param_1 + 0x780);
for (uVar3 = 0; (long)uVar3 < (long)*(int *)param_2; uVar3 = uVar3 + 1) {
if ((*(char *)(*(long *)(param_2 + 0x30) + uVar3) != '\0') &&
(**(int **)(*(long *)(param_2 + 0x28) + uVar3 * 8) == *(int *)param_1)) {
/* try { // try from 001821c3 to 0018224c has its CatchHandler @ 00182301 */
puVar1 = (int4 *)llama_get_embeddings_seq(*(int8 *)(this + 0x1340));
if ((puVar1 == (int4 *)0x0) &&
(puVar1 = (int4 *)
llama_get_embeddings_ith(*(int8 *)(this + 0x1340),uVar3 & 0xffffffff),
puVar1 == (int4 *)0x0)) {
uVar4 = DAT_001f01a8;
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,
"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n"
,0xc,"send_rerank",*(int4 *)param_1,*(int4 *)(param_1 + 4),
*(int4 *)(*(long *)(param_2 + 8) + uVar3 * 4),
**(int4 **)(*(long *)(param_2 + 0x28) + uVar3 * 8));
uVar4 = DAT_001f01a8;
}
}
else {
uVar4 = *puVar1;
}
*(int4 *)((long)local_40 + 0x14) = uVar4;
}
}
if (0 < common_log_verbosity_thold) {
/* try { // try from 0018225d to 00182298 has its CatchHandler @ 001822ff */
uVar2 = common_log_main();
common_log_add((double)*(float *)((long)local_40 + 0x14),uVar2,1,
"slot %12.*s: id %2d | task %d | sending rerank result, res.score = %f\n",0xc,
"send_rerank",*(int4 *)param_1,*(int4 *)(param_1 + 4));
}
local_38 = local_40;
/* try { // try from 001822b3 to 001822ba has its CatchHandler @ 001822ea */
server_response::send((server_response *)(this + 0x1578),(unique_ptr *)&local_38);
if (local_38 != (long *)0x0) {
(**(code **)(*local_38 + 0x28))();
}
return;
}
| |
39,017 | madb_get_os_character_set | eloqsql/libmariadb/libmariadb/ma_charset.c | const char *madb_get_os_character_set()
{
unsigned int i= 0;
char *p= NULL;
#ifdef _WIN32
char codepage[FN_REFLEN];
snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP());
p= codepage;
#elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE)
if (setlocale(LC_CTYPE, ""))
p= nl_langinfo(CODESET);
#endif
if (!p)
return MADB_DEFAULT_CHARSET_NAME;
while (MADB_OS_CHARSET[i].identifier)
{
if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED &&
strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0)
return MADB_OS_CHARSET[i].charset;
i++;
}
return MADB_DEFAULT_CHARSET_NAME;
} | O0 | c | madb_get_os_character_set:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
xorl %edi, %edi
leaq 0x75f1(%rip), %rsi # 0x4b721
callq 0x133a0
cmpq $0x0, %rax
je 0x44149
movl $0xe, %edi
callq 0x13410
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x44160
leaq 0x8207(%rip), %rax # 0x4c35e
movq %rax, -0x8(%rbp)
jmp 0x441f1
jmp 0x44162
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x1af92(%rip), %rax # 0x5f100
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x441e6
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x1af79(%rip), %rax # 0x5f100
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
jle 0x441d8
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x1af5d(%rip), %rax # 0x5f100
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x13480
cmpl $0x0, %eax
jne 0x441d8
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x1af39(%rip), %rax # 0x5f100
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x441f1
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x44162
leaq 0x8171(%rip), %rax # 0x4c35e
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| madb_get_os_character_set:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], 0
mov [rbp+var_18], 0
xor edi, edi
lea rsi, aExecuteTestWit+29h; ""
call _setlocale
cmp rax, 0
jz short loc_44149
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_18], rax
loc_44149:
cmp [rbp+var_18], 0
jnz short loc_44160
lea rax, aLatin1; "latin1"
mov [rbp+var_8], rax
jmp loc_441F1
loc_44160:
jmp short $+2
loc_44162:
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, MADB_OS_CHARSET
imul rcx, 28h ; '('
add rax, rcx
cmp qword ptr [rax], 0
jz short loc_441E6
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, MADB_OS_CHARSET
imul rcx, 28h ; '('
add rax, rcx
movzx eax, byte ptr [rax+20h]
cmp eax, 0
jle short loc_441D8
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, MADB_OS_CHARSET
imul rcx, 28h ; '('
add rax, rcx
mov rdi, [rax]
mov rsi, [rbp+var_18]
call _strcasecmp
cmp eax, 0
jnz short loc_441D8
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, MADB_OS_CHARSET
imul rcx, 28h ; '('
add rax, rcx
mov rax, [rax+10h]
mov [rbp+var_8], rax
jmp short loc_441F1
loc_441D8:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_44162
loc_441E6:
lea rax, aLatin1; "latin1"
mov [rbp+var_8], rax
loc_441F1:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| const char *madb_get_os_character_set()
{
long long v1; // [rsp+8h] [rbp-18h]
unsigned int v2; // [rsp+14h] [rbp-Ch]
v2 = 0;
v1 = 0LL;
if ( setlocale(0LL, "") )
v1 = nl_langinfo(14LL);
if ( !v1 )
return "latin1";
while ( *(&MADB_OS_CHARSET + 5 * v2) )
{
if ( *((_BYTE *)&MADB_OS_CHARSET + 40 * v2 + 32) && !(unsigned int)strcasecmp(*(&MADB_OS_CHARSET + 5 * v2), v1) )
return (const char *)*(&MADB_OS_CHARSET + 5 * v2 + 2);
++v2;
}
return "latin1";
}
| madb_get_os_character_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],0x0
MOV qword ptr [RBP + -0x18],0x0
XOR EDI,EDI
LEA RSI,[0x14b721]
CALL 0x001133a0
CMP RAX,0x0
JZ 0x00144149
MOV EDI,0xe
CALL 0x00113410
MOV qword ptr [RBP + -0x18],RAX
LAB_00144149:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00144160
LEA RAX,[0x14c35e]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001441f1
LAB_00144160:
JMP 0x00144162
LAB_00144162:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15f100]
IMUL RCX,RCX,0x28
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JZ 0x001441e6
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15f100]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x20]
CMP EAX,0x0
JLE 0x001441d8
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15f100]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x001441d8
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15f100]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001441f1
LAB_001441d8:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00144162
LAB_001441e6:
LEA RAX,[0x14c35e]
MOV qword ptr [RBP + -0x8],RAX
LAB_001441f1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
char * madb_get_os_character_set(void)
{
int iVar1;
char *pcVar2;
char *local_20;
uint local_14;
char *local_10;
local_14 = 0;
local_20 = (char *)0x0;
pcVar2 = setlocale(0,"");
if (pcVar2 != (char *)0x0) {
local_20 = nl_langinfo(0xe);
}
if (local_20 != (char *)0x0) {
while (*(long *)(MADB_OS_CHARSET + (ulong)local_14 * 0x28) != 0) {
if ((MADB_OS_CHARSET[(ulong)local_14 * 0x28 + 0x20] != '\0') &&
(iVar1 = strcasecmp(*(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28),local_20),
iVar1 == 0)) {
return *(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28 + 0x10);
}
local_14 = local_14 + 1;
}
}
local_10 = "latin1";
return local_10;
}
| |
39,018 | my_caseup_str_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
} | O0 | c | my_caseup_str_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x659ae
jmp 0x659b0
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x659de
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0x69840
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x659e7
jmp 0x65a36
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x69a80
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x69af0
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0x65a0f
jmp 0x65a36
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x659b0
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_caseup_str_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_659AE:
jmp short $+2
loc_659B0:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_659DE
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_659DE:
mov al, [rbp+var_39]
test al, 1
jnz short loc_659E7
jmp short loc_65A36
loc_659E7:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_toupper_utf8mb4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_wc_mb_utf8mb4_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_65A0F
jmp short loc_65A36
loc_65A0F:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_659B0
loc_65A36:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| _BYTE * my_caseup_str_utf8mb4(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_toupper_utf8mb4(v4, &v8);
v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
| my_caseup_str_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001659ae
LAB_001659ae:
JMP 0x001659b0
LAB_001659b0:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x001659de
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x00169840
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001659de:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x001659e7
JMP 0x00165a36
LAB_001659e7:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x00169a80
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00169af0
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x00165a0f
JMP 0x00165a36
LAB_00165a0f:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001659b0
LAB_00165a36:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_caseup_str_utf8mb4(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_toupper_utf8mb4(uVar1,&local_20);
iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
| |
39,019 | add_global_var | bluesky950520[P]quickjs/quickjs.c | static JSGlobalVar *add_global_var(JSContext *ctx, JSFunctionDef *s,
JSAtom name)
{
JSGlobalVar *hf;
if (js_resize_array(ctx, (void **)&s->global_vars,
sizeof(s->global_vars[0]),
&s->global_var_size, s->global_var_count + 1))
return NULL;
hf = &s->global_vars[s->global_var_count++];
hf->cpool_idx = -1;
hf->force_init = FALSE;
hf->is_lexical = FALSE;
hf->is_const = FALSE;
hf->scope_level = s->scope_level;
hf->var_name = JS_DupAtom(ctx, name);
return hf;
} | O0 | c | add_global_var:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x130, %rsi # imm = 0x130
movq 0x10(%rsp), %rcx
addq $0x128, %rcx # imm = 0x128
movq 0x10(%rsp), %rax
movl 0x124(%rax), %r8d
addl $0x1, %r8d
movl $0x10, %edx
callq 0x79430
cmpl $0x0, %eax
je 0xad84c
movq $0x0, 0x20(%rsp)
jmp 0xad8e8
movq 0x10(%rsp), %rax
movq 0x130(%rax), %rax
movq 0x10(%rsp), %rdx
movl 0x124(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x124(%rdx)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq (%rsp), %rax
movb 0x4(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x4(%rax)
movq (%rsp), %rax
movb 0x4(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x4(%rax)
movq (%rsp), %rax
movb 0x4(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x4(%rax)
movq 0x10(%rsp), %rax
movl 0xe8(%rax), %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x2e290
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rax)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| add_global_var:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_1C], edx
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
add rsi, 130h
mov rcx, [rsp+28h+var_18]
add rcx, 128h
mov rax, [rsp+28h+var_18]
mov r8d, [rax+124h]
add r8d, 1
mov edx, 10h
call js_resize_array
cmp eax, 0
jz short loc_AD84C
mov [rsp+28h+var_8], 0
jmp loc_AD8E8
loc_AD84C:
mov rax, [rsp+28h+var_18]
mov rax, [rax+130h]
mov rdx, [rsp+28h+var_18]
mov ecx, [rdx+124h]
mov esi, ecx
add esi, 1
mov [rdx+124h], esi
movsxd rcx, ecx
shl rcx, 4
add rax, rcx
mov [rsp+28h+var_28], rax
mov rax, [rsp+28h+var_28]
mov dword ptr [rax], 0FFFFFFFFh
mov rax, [rsp+28h+var_28]
mov cl, [rax+4]
and cl, 0FEh
or cl, 0
mov [rax+4], cl
mov rax, [rsp+28h+var_28]
mov cl, [rax+4]
and cl, 0FDh
or cl, 0
mov [rax+4], cl
mov rax, [rsp+28h+var_28]
mov cl, [rax+4]
and cl, 0FBh
or cl, 0
mov [rax+4], cl
mov rax, [rsp+28h+var_18]
mov ecx, [rax+0E8h]
mov rax, [rsp+28h+var_28]
mov [rax+8], ecx
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_1C]
call JS_DupAtom
mov ecx, eax
mov rax, [rsp+28h+var_28]
mov [rax+0Ch], ecx
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_8], rax
loc_AD8E8:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long add_global_var(long long a1, long long a2, unsigned int a3)
{
long long v3; // rax
int v4; // ecx
long long v6; // [rsp+0h] [rbp-28h]
if ( (unsigned int)js_resize_array(a1, a2 + 304, 0x10u, (_DWORD *)(a2 + 296), *(_DWORD *)(a2 + 292) + 1) )
return 0LL;
v3 = *(_QWORD *)(a2 + 304);
v4 = *(_DWORD *)(a2 + 292);
*(_DWORD *)(a2 + 292) = v4 + 1;
v6 = 16LL * v4 + v3;
*(_DWORD *)v6 = -1;
*(_BYTE *)(v6 + 4) &= ~1u;
*(_BYTE *)(v6 + 4) &= ~2u;
*(_BYTE *)(v6 + 4) &= ~4u;
*(_DWORD *)(v6 + 8) = *(_DWORD *)(a2 + 232);
*(_DWORD *)(v6 + 12) = JS_DupAtom(a1, a3);
return v6;
}
| add_global_var:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x130
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x128
MOV RAX,qword ptr [RSP + 0x10]
MOV R8D,dword ptr [RAX + 0x124]
ADD R8D,0x1
MOV EDX,0x10
CALL 0x00179430
CMP EAX,0x0
JZ 0x001ad84c
MOV qword ptr [RSP + 0x20],0x0
JMP 0x001ad8e8
LAB_001ad84c:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RDX + 0x124]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x124],ESI
MOVSXD RCX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX],0xffffffff
MOV RAX,qword ptr [RSP]
MOV CL,byte ptr [RAX + 0x4]
AND CL,0xfe
OR CL,0x0
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RSP]
MOV CL,byte ptr [RAX + 0x4]
AND CL,0xfd
OR CL,0x0
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RSP]
MOV CL,byte ptr [RAX + 0x4]
AND CL,0xfb
OR CL,0x0
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xe8]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0012e290
MOV ECX,EAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x20],RAX
LAB_001ad8e8:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
int4 * add_global_var(int8 param_1,long param_2,int4 param_3)
{
int iVar1;
int4 uVar2;
int4 *local_8;
iVar1 = js_resize_array(param_1,param_2 + 0x130,0x10,param_2 + 0x128,*(int *)(param_2 + 0x124) + 1
);
if (iVar1 == 0) {
iVar1 = *(int *)(param_2 + 0x124);
*(int *)(param_2 + 0x124) = iVar1 + 1;
local_8 = (int4 *)(*(long *)(param_2 + 0x130) + (long)iVar1 * 0x10);
*local_8 = 0xffffffff;
*(byte *)(local_8 + 1) = *(byte *)(local_8 + 1) & 0xfe;
*(byte *)(local_8 + 1) = *(byte *)(local_8 + 1) & 0xfd;
*(byte *)(local_8 + 1) = *(byte *)(local_8 + 1) & 0xfb;
local_8[2] = *(int4 *)(param_2 + 0xe8);
uVar2 = JS_DupAtom(param_1,param_3);
local_8[3] = uVar2;
}
else {
local_8 = (int4 *)0x0;
}
return local_8;
}
| |
39,020 | add_global_var | bluesky950520[P]quickjs/quickjs.c | static JSGlobalVar *add_global_var(JSContext *ctx, JSFunctionDef *s,
JSAtom name)
{
JSGlobalVar *hf;
if (js_resize_array(ctx, (void **)&s->global_vars,
sizeof(s->global_vars[0]),
&s->global_var_size, s->global_var_count + 1))
return NULL;
hf = &s->global_vars[s->global_var_count++];
hf->cpool_idx = -1;
hf->force_init = FALSE;
hf->is_lexical = FALSE;
hf->is_const = FALSE;
hf->scope_level = s->scope_level;
hf->var_name = JS_DupAtom(ctx, name);
return hf;
} | O2 | c | add_global_var:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
addq $0x130, %rsi # imm = 0x130
leaq 0x128(%r15), %rcx
movl 0x124(%r15), %r8d
incl %r8d
pushq $0x10
popq %rdx
callq 0x3ec9f
testl %eax, %eax
je 0x59fd7
xorl %eax, %eax
jmp 0x5a026
movq 0x130(%r15), %rcx
movslq 0x124(%r15), %rdx
leal 0x1(%rdx), %eax
movl %eax, 0x124(%r15)
shlq $0x4, %rdx
orl $-0x1, (%rcx,%rdx)
andb $-0x8, 0x4(%rcx,%rdx)
leaq (%rcx,%rdx), %rax
movl 0xe8(%r15), %esi
movl %esi, 0x8(%rcx,%rdx)
cmpl $0xe0, %ebx
jl 0x5a023
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0xc(%rax)
popq %rbx
popq %r14
popq %r15
retq
| add_global_var:
push r15
push r14
push rbx
mov ebx, edx
mov r15, rsi
mov r14, rdi
add rsi, 130h
lea rcx, [r15+128h]
mov r8d, [r15+124h]
inc r8d
push 10h
pop rdx
call js_resize_array
test eax, eax
jz short loc_59FD7
xor eax, eax
jmp short loc_5A026
loc_59FD7:
mov rcx, [r15+130h]
movsxd rdx, dword ptr [r15+124h]
lea eax, [rdx+1]
mov [r15+124h], eax
shl rdx, 4
or dword ptr [rcx+rdx], 0FFFFFFFFh
and byte ptr [rcx+rdx+4], 0F8h
lea rax, [rcx+rdx]
mov esi, [r15+0E8h]
mov [rcx+rdx+8], esi
cmp ebx, 0E0h
jl short loc_5A023
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_5A023:
mov [rax+0Ch], ebx
loc_5A026:
pop rbx
pop r14
pop r15
retn
| long long add_global_var(long long a1, long long a2, int a3)
{
long long result; // rax
long long v5; // rcx
long long v6; // rdx
_DWORD *v7; // rcx
if ( (unsigned int)js_resize_array(a1, a2 + 304, 16LL, (_DWORD *)(a2 + 296), *(_DWORD *)(a2 + 292) + 1) )
return 0LL;
v5 = *(_QWORD *)(a2 + 304);
v6 = *(int *)(a2 + 292);
*(_DWORD *)(a2 + 292) = v6 + 1;
v6 *= 16LL;
*(_DWORD *)(v5 + v6) = -1;
*(_BYTE *)(v5 + v6 + 4) &= 0xF8u;
result = v5 + v6;
*(_DWORD *)(v5 + v6 + 8) = *(_DWORD *)(a2 + 232);
if ( a3 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
++*v7;
}
*(_DWORD *)(result + 12) = a3;
return result;
}
| add_global_var:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
ADD RSI,0x130
LEA RCX,[R15 + 0x128]
MOV R8D,dword ptr [R15 + 0x124]
INC R8D
PUSH 0x10
POP RDX
CALL 0x0013ec9f
TEST EAX,EAX
JZ 0x00159fd7
XOR EAX,EAX
JMP 0x0015a026
LAB_00159fd7:
MOV RCX,qword ptr [R15 + 0x130]
MOVSXD RDX,dword ptr [R15 + 0x124]
LEA EAX,[RDX + 0x1]
MOV dword ptr [R15 + 0x124],EAX
SHL RDX,0x4
OR dword ptr [RCX + RDX*0x1],0xffffffff
AND byte ptr [RCX + RDX*0x1 + 0x4],0xf8
LEA RAX,[RCX + RDX*0x1]
MOV ESI,dword ptr [R15 + 0xe8]
MOV dword ptr [RCX + RDX*0x1 + 0x8],ESI
CMP EBX,0xe0
JL 0x0015a023
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_0015a023:
MOV dword ptr [RAX + 0xc],EBX
LAB_0015a026:
POP RBX
POP R14
POP R15
RET
|
long add_global_var(long param_1,long param_2,uint param_3)
{
byte *pbVar1;
long lVar2;
int *piVar3;
int iVar4;
long lVar5;
long lVar6;
iVar4 = js_resize_array(param_1,param_2 + 0x130,0x10,param_2 + 0x128,*(int *)(param_2 + 0x124) + 1
);
if (iVar4 == 0) {
lVar2 = *(long *)(param_2 + 0x130);
iVar4 = *(int *)(param_2 + 0x124);
*(int *)(param_2 + 0x124) = iVar4 + 1;
lVar6 = (long)iVar4 * 0x10;
*(int4 *)(lVar2 + lVar6) = 0xffffffff;
pbVar1 = (byte *)(lVar2 + 4 + lVar6);
*pbVar1 = *pbVar1 & 0xf8;
lVar5 = lVar2 + lVar6;
*(int4 *)(lVar2 + 8 + lVar6) = *(int4 *)(param_2 + 0xe8);
if (0xdf < (int)param_3) {
piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_3 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar5 + 0xc) = param_3;
}
else {
lVar5 = 0;
}
return lVar5;
}
| |
39,021 | lf_hash_destroy | eloqsql/mysys/lf_hash.cc | void lf_hash_destroy(LF_HASH *hash)
{
LF_SLIST *el, **head= (LF_SLIST **)lf_dynarray_value(&hash->array, 0);
if (head)
{
el= *head;
while (el)
{
intptr next= el->link;
if (el->hashnr & 1)
lf_alloc_direct_free(&hash->alloc, el); /* normal node */
else
my_free(el); /* dummy node */
el= (LF_SLIST *)next;
}
}
lf_alloc_destroy(&hash->alloc);
lf_dynarray_destroy(&hash->array);
} | O3 | cpp | lf_hash_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0xa5ad8
testq %rax, %rax
je 0xa5d72
movq (%rax), %r14
testq %r14, %r14
je 0xa5d72
movq (%r14), %r15
testb $0x1, 0x18(%r14)
je 0xa5d62
movq 0x88(%rbx), %rax
testq %rax, %rax
je 0xa5d62
movq %r14, %rdi
callq *%rax
movq %r14, %rdi
callq 0x9ffde
movq %r15, %r14
testq %r15, %r15
jne 0xa5d47
leaq 0x28(%rbx), %rdi
callq 0xa5889
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa5a57
| lf_hash_destroy:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
xor esi, esi
call lf_dynarray_value
test rax, rax
jz short loc_A5D72
mov r14, [rax]
test r14, r14
jz short loc_A5D72
loc_A5D47:
mov r15, [r14]
test byte ptr [r14+18h], 1
jz short loc_A5D62
mov rax, [rbx+88h]
test rax, rax
jz short loc_A5D62
mov rdi, r14
call rax
loc_A5D62:
mov rdi, r14
call my_free
mov r14, r15
test r15, r15
jnz short loc_A5D47
loc_A5D72:
lea rdi, [rbx+28h]
call lf_alloc_destroy
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp lf_dynarray_destroy
| long long lf_hash_destroy(long long a1)
{
long long *v1; // rax
long long v2; // r14
long long v3; // r15
void ( *v4)(long long); // rax
v1 = (long long *)lf_dynarray_value(a1, 0);
if ( v1 )
{
v2 = *v1;
if ( *v1 )
{
do
{
v3 = *(_QWORD *)v2;
if ( (*(_BYTE *)(v2 + 24) & 1) != 0 )
{
v4 = *(void ( **)(long long))(a1 + 136);
if ( v4 )
v4(v2);
}
my_free(v2);
v2 = v3;
}
while ( v3 );
}
}
lf_alloc_destroy(a1 + 40);
return lf_dynarray_destroy(a1);
}
| lf_hash_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x001a5ad8
TEST RAX,RAX
JZ 0x001a5d72
MOV R14,qword ptr [RAX]
TEST R14,R14
JZ 0x001a5d72
LAB_001a5d47:
MOV R15,qword ptr [R14]
TEST byte ptr [R14 + 0x18],0x1
JZ 0x001a5d62
MOV RAX,qword ptr [RBX + 0x88]
TEST RAX,RAX
JZ 0x001a5d62
MOV RDI,R14
CALL RAX
LAB_001a5d62:
MOV RDI,R14
CALL 0x0019ffde
MOV R14,R15
TEST R15,R15
JNZ 0x001a5d47
LAB_001a5d72:
LEA RDI,[RBX + 0x28]
CALL 0x001a5889
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001a5a57
|
void lf_hash_destroy(long param_1)
{
int8 *puVar1;
int8 *puVar2;
puVar2 = (int8 *)lf_dynarray_value(param_1,0);
if (puVar2 != (int8 *)0x0) {
puVar2 = (int8 *)*puVar2;
while (puVar2 != (int8 *)0x0) {
puVar1 = (int8 *)*puVar2;
if (((*(byte *)(puVar2 + 3) & 1) != 0) && (*(code **)(param_1 + 0x88) != (code *)0x0)) {
(**(code **)(param_1 + 0x88))(puVar2);
}
my_free(puVar2);
puVar2 = puVar1;
}
}
lf_alloc_destroy(param_1 + 0x28);
lf_dynarray_destroy(param_1);
return;
}
| |
39,022 | minja::split(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&) | llama.cpp/common/minja/minja.hpp | static std::vector<std::string> split(const std::string & s, const std::string & sep) {
std::vector<std::string> result;
size_t start = 0;
size_t end = s.find(sep);
while (end != std::string::npos) {
result.push_back(s.substr(start, end - start));
start = end + sep.length();
end = s.find(sep, start);
}
result.push_back(s.substr(start));
return result;
} | O3 | cpp | minja::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %ebp, %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x205d0
cmpq $-0x1, %rax
je 0xaf024
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %r12, %rcx
subq %rbp, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x210d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x72494
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xaf003
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r12, %rbp
addq %rcx, %rbp
movq %r14, %rdi
movq %rbp, %rdx
callq 0x205d0
movq %rax, %r12
cmpq $-0x1, %rax
jne 0xaefc8
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x210d0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x72494
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaf063
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xaf094
jmp 0xaf082
movq %rax, %r14
jmp 0xaf0a6
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xaf0a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rdi
callq 0x2714c
movq %r14, %rdi
callq 0x20b00
| _ZN5minjaL5splitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rsi, [rdx]
mov rcx, [rdx+8]
xor ebp, ebp
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_AF024
mov r12, rax
xor ebp, ebp
lea r13, [rsp+58h+var_50]
loc_AEFC8:
mov rcx, r12
sub rcx, rbp
mov rdi, r13
mov rsi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_AF003
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AF003:
mov rsi, [r15]
mov rcx, [r15+8]
mov rbp, r12
add rbp, rcx
mov rdi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_AEFC8
loc_AF024:
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AF063
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AF063:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_AF094
jmp short $+2
loc_AF082:
mov r14, rax
jmp short loc_AF0A6
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_AF094:
cmp rdi, rax
jz short loc_AF0A6
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AF0A6:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| void minja::split(long long a1, long long a2, _QWORD *a3)
{
long long v4; // rbp
long long v5; // rax
long long v6; // r12
long long v7; // rcx
void *v8[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, *a3, 0LL, a3[1]);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v8, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
v7 = a3[1];
v4 = v7 + v6;
v6 = std::string::find(a2, *a3, v7 + v6, v7);
}
while ( v6 != -1 );
}
std::string::substr(v8, a2, v4, -1LL);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
| split:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR EBP,EBP
MOV RDI,R14
XOR EDX,EDX
CALL 0x001205d0
CMP RAX,-0x1
JZ 0x001af024
MOV R12,RAX
XOR EBP,EBP
LEA R13,[RSP + 0x8]
LAB_001aefc8:
MOV RCX,R12
SUB RCX,RBP
LAB_001aefce:
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBP
CALL 0x001210d0
LAB_001aefdc:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00172494
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001af003
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_001af003:
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV RBP,R12
ADD RBP,RCX
MOV RDI,R14
MOV RDX,RBP
CALL 0x001205d0
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x001aefc8
LAB_001af024:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x001210d0
LAB_001af03b:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00172494
LAB_001af048:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001af063
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_001af063:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::split(std::__cxx11::string const&, std::__cxx11::string const&) */
void __thiscall minja::split(minja *this,string *param_1,string *param_2)
{
long lVar1;
long *local_50 [2];
long local_40 [2];
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
lVar1 = std::__cxx11::string::find((char *)param_1,*(ulong *)param_2,0);
if (lVar1 != -1) {
do {
/* try { // try from 001aefce to 001aefdb has its CatchHandler @ 001af082 */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
/* try { // try from 001aefdc to 001aefe6 has its CatchHandler @ 001af087 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar1 = std::__cxx11::string::find
((char *)param_1,*(ulong *)param_2,lVar1 + *(long *)(param_2 + 8));
} while (lVar1 != -1);
}
/* try { // try from 001af024 to 001af03a has its CatchHandler @ 001af080 */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
/* try { // try from 001af03b to 001af047 has its CatchHandler @ 001af072 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
| |
39,023 | my_strntoul_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulong
my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr= (char*)s;
err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int) wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr != NULL )
*endptr= (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr= (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= (ERANGE);
return (~(uint32) 0);
}
return (negative ? -((long) res) : (long) res);
} | O3 | c | my_strntoul_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0x460c5
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0x46095
cmpq $0x9, %rcx
je 0x460ad
cmpq $0x20, %rcx
je 0x460ad
jmp 0x460f7
cmpq $0x2b, %rcx
je 0x460ad
cmpq $0x2d, %rcx
jne 0x460f7
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0x4607d
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0x460d1
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0x461bb
movq %r12, -0x68(%rbp)
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %edi, %edi
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0x4614b
movq %rax, -0x30(%rbp)
jmp 0x46170
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0x4615b
addq $-0x37, %rsi
jmp 0x46169
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0x461cc
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0x461cc
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0x46193
jne 0x4618b
movl -0x44(%rbp), %r12d
cmpq -0x60(%rbp), %rax
ja 0x46196
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %edi, %esi
movl %ecx, %r12d
movl %esi, -0x54(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *-0x68(%rbp)
movl -0x54(%rbp), %esi
movl %r12d, %ecx
movl %esi, %edi
testl %eax, %eax
jg 0x4612f
jmp 0x461c3
xorl %r12d, %r12d
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0x46204
movl %esi, %edi
movl %r12d, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x461d8
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0x461f5
testl %edi, %edi
je 0x4621f
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x460e8
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0x460e6
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x46210
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0x460e6
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
cmpl $0x0, -0x38(%rbp)
cmoveq %rcx, %rax
jmp 0x460e8
| my_strntoul_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_460C5
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_4607D:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_46095
cmp rcx, 9
jz short loc_460AD
cmp rcx, 20h ; ' '
jz short loc_460AD
jmp short loc_460F7
loc_46095:
cmp rcx, 2Bh ; '+'
jz short loc_460AD
cmp rcx, 2Dh ; '-'
jnz short loc_460F7
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_460AD:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_4607D
loc_460C5:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_460D1
mov [rcx], r15
loc_460D1:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_460E6:
xor eax, eax
loc_460E8:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_460F7:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_461BB
mov [rbp+var_68], r12
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor edi, edi
loc_4612F:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_4614B
mov [rbp+var_30], rax
jmp short loc_46170
loc_4614B:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_4615B
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_46169
loc_4615B:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_461CC
add rsi, 0FFFFFFFFFFFFFFA9h
loc_46169:
mov [rbp+var_30], rsi
mov rax, rsi
loc_46170:
cmp eax, [rbp+var_34]
jge short loc_461CC
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_46193
jnz short loc_4618B
mov r12d, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_46196
loc_4618B:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, edi
loc_46193:
mov r12d, ecx
loc_46196:
mov [rbp+var_54], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call [rbp+var_68]
mov esi, [rbp+var_54]
mov ecx, r12d
mov edi, esi
test eax, eax
jg loc_4612F
jmp short loc_461C3
loc_461BB:
xor r12d, r12d
mov rbx, r15
xor esi, esi
loc_461C3:
test eax, eax
jz short loc_46204
mov edi, esi
mov ecx, r12d
loc_461CC:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_461D8
mov [rax], rbx
loc_461D8:
cmp rbx, r15
jz short loc_461F5
test edi, edi
jz short loc_4621F
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
jmp loc_460E8
loc_461F5:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_460E6
loc_46204:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_46210
mov [rax], rbx
loc_46210:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_460E6
loc_4621F:
mov ecx, ecx
mov rax, rcx
neg rax
cmp [rbp+var_38], 0
cmovz rax, rcx
jmp loc_460E8
| long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
unsigned int v14; // ecx
long long v15; // rbx
int v16; // edi
unsigned long long v17; // rax
long long v18; // rsi
int v19; // esi
unsigned int v20; // r12d
long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+8h] [rbp-68h]
unsigned int v23; // [rsp+2Ch] [rbp-44h]
BOOL v25; // [rsp+38h] [rbp-38h]
_QWORD v27[6]; // [rsp+40h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v27, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v25 = 0;
while ( 1 )
{
if ( v27[0] > 42LL )
{
if ( v27[0] != 43LL )
{
if ( v27[0] != 45LL )
break;
v25 = !v25;
}
goto LABEL_10;
}
if ( v27[0] != 9LL && v27[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v27, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v23 = 0xFFFFFFFF / a4;
v13 = v8(a1, v27, v6, v9);
if ( v13 > 0 )
{
v21 = v8;
v14 = 0;
v15 = v6;
v16 = 0;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v27[0] - 48LL;
if ( (unsigned long long)(v27[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v27[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v27[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v27[0] - 87LL;
}
else
{
v18 = v27[0] - 55LL;
}
v27[0] = v18;
v17 = v18;
}
else
{
v27[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( v14 <= v23 )
{
if ( v14 == v23 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
v14 = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = v21(a1, v27, v15, v9);
v14 = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
v16 = v19;
v14 = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
if ( v16 )
{
*a6 = 34;
return 0xFFFFFFFFLL;
}
else
{
result = -(long long)v14;
if ( !v25 )
return v14;
}
return result;
}
| my_strntoul_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001460c5
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_0014607d:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x00146095
CMP RCX,0x9
JZ 0x001460ad
CMP RCX,0x20
JZ 0x001460ad
JMP 0x001460f7
LAB_00146095:
CMP RCX,0x2b
JZ 0x001460ad
CMP RCX,0x2d
JNZ 0x001460f7
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001460ad:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x0014607d
LAB_001460c5:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001460d1
MOV qword ptr [RCX],R15
LAB_001460d1:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001460e6:
XOR EAX,EAX
LAB_001460e8:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001460f7:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001461bb
MOV qword ptr [RBP + -0x68],R12
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR EDI,EDI
LAB_0014612f:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x0014614b
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00146170
LAB_0014614b:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x0014615b
ADD RSI,-0x37
JMP 0x00146169
LAB_0014615b:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001461cc
ADD RSI,-0x57
LAB_00146169:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_00146170:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001461cc
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x00146193
JNZ 0x0014618b
MOV R12D,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x00146196
LAB_0014618b:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,EDI
LAB_00146193:
MOV R12D,ECX
LAB_00146196:
MOV dword ptr [RBP + -0x54],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL qword ptr [RBP + -0x68]
MOV ESI,dword ptr [RBP + -0x54]
MOV ECX,R12D
MOV EDI,ESI
TEST EAX,EAX
JG 0x0014612f
JMP 0x001461c3
LAB_001461bb:
XOR R12D,R12D
MOV RBX,R15
XOR ESI,ESI
LAB_001461c3:
TEST EAX,EAX
JZ 0x00146204
MOV EDI,ESI
MOV ECX,R12D
LAB_001461cc:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001461d8
MOV qword ptr [RAX],RBX
LAB_001461d8:
CMP RBX,R15
JZ 0x001461f5
TEST EDI,EDI
JZ 0x0014621f
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
JMP 0x001460e8
LAB_001461f5:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001460e6
LAB_00146204:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x00146210
MOV qword ptr [RAX],RBX
LAB_00146210:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001460e6
LAB_0014621f:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
CMP dword ptr [RBP + -0x38],0x0
CMOVZ RAX,RCX
JMP 0x001460e8
|
ulong my_strntoul_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
int4 uVar7;
uint uVar8;
long lVar9;
ulong uVar10;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001460f7:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar9 = param_2;
if ((int)uVar6 < 1) {
uVar8 = 0;
bVar3 = false;
goto LAB_001461c3;
}
uVar8 = 0;
bVar3 = false;
goto LAB_0014612f;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001460f7;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar7 = 0x21;
if (uVar5 == 0) {
uVar7 = 0x54;
}
*param_6 = uVar7;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar10) goto LAB_001461cc;
uVar6 = uVar8;
bVar4 = true;
if ((uVar8 <= uVar5) &&
((uVar8 != uVar5 || (uVar6 = uVar5, uVar10 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar8 * param_4 + (int)uVar10;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar8 = uVar6;
local_38 = uVar10;
uVar6 = (*pcVar1)(param_1,&local_38,lVar9,param_3);
if ((int)uVar6 < 1) break;
LAB_0014612f:
lVar9 = (ulong)uVar6 + lVar9;
uVar10 = local_38 - 0x30;
if (9 < uVar10) {
if (local_38 - 0x41 < 0x1a) {
uVar10 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001461cc;
uVar10 = local_38 - 0x57;
}
}
}
LAB_001461c3:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar9;
}
*param_6 = 0x54;
}
else {
LAB_001461cc:
if (param_5 != (long *)0x0) {
*param_5 = lVar9;
}
if (lVar9 != param_2) {
if (bVar3) {
*param_6 = 0x22;
return 0xffffffff;
}
if (!bVar2) {
return (ulong)uVar8;
}
return -(ulong)uVar8;
}
*param_6 = 0x21;
}
return 0;
}
| |
39,024 | glfwInputWindowFocus | untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c | void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
{
if (window->callbacks.focus)
window->callbacks.focus((GLFWwindow*) window, focused);
if (!focused)
{
int key, button;
for (key = 0; key <= GLFW_KEY_LAST; key++)
{
if (window->keys[key] == GLFW_PRESS)
{
const int scancode = _glfwPlatformGetKeyScancode(key);
_glfwInputKey(window, key, scancode, GLFW_RELEASE, 0);
}
}
for (button = 0; button <= GLFW_MOUSE_BUTTON_LAST; button++)
{
if (window->mouseButtons[button] == GLFW_PRESS)
_glfwInputMouseClick(window, button, GLFW_RELEASE, 0);
}
}
} | O1 | c | glfwInputWindowFocus:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x2d8(%rdi), %rax
testq %rax, %rax
je 0x1cbf4
movq %rbx, %rdi
movl %ebp, %esi
callq *%rax
testl %ebp, %ebp
jne 0x1cc4f
xorl %r14d, %r14d
cmpb $0x1, 0x80(%rbx,%r14)
jne 0x1cc20
movl %r14d, %edi
callq 0x254a3
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x196e4
incq %r14
cmpq $0x15d, %r14 # imm = 0x15D
jne 0x1cbfb
xorl %r14d, %r14d
cmpb $0x1, 0x78(%rbx,%r14)
jne 0x1cc46
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x197d0
incq %r14
cmpq $0x8, %r14
jne 0x1cc2f
popq %rbx
popq %r14
popq %rbp
retq
| _glfwInputWindowFocus:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
mov rax, [rdi+2D8h]
test rax, rax
jz short loc_1CBF4
mov rdi, rbx
mov esi, ebp
call rax
loc_1CBF4:
test ebp, ebp
jnz short loc_1CC4F
xor r14d, r14d
loc_1CBFB:
cmp byte ptr [rbx+r14+80h], 1
jnz short loc_1CC20
mov edi, r14d
call _glfwPlatformGetKeyScancode
mov rdi, rbx
mov esi, r14d
mov edx, eax
xor ecx, ecx
xor r8d, r8d
call _glfwInputKey
loc_1CC20:
inc r14
cmp r14, 15Dh
jnz short loc_1CBFB
xor r14d, r14d
loc_1CC2F:
cmp byte ptr [rbx+r14+78h], 1
jnz short loc_1CC46
mov rdi, rbx
mov esi, r14d
xor edx, edx
xor ecx, ecx
call _glfwInputMouseClick
loc_1CC46:
inc r14
cmp r14, 8
jnz short loc_1CC2F
loc_1CC4F:
pop rbx
pop r14
pop rbp
retn
| void glfwInputWindowFocus(long long a1, unsigned int a2)
{
void ( *v2)(long long, _QWORD); // rax
long long i; // r14
unsigned int KeyScancode; // eax
long long j; // r14
v2 = *(void ( **)(long long, _QWORD))(a1 + 728);
if ( v2 )
v2(a1, a2);
if ( !a2 )
{
for ( i = 0LL; i != 349; ++i )
{
if ( *(_BYTE *)(a1 + i + 128) == 1 )
{
KeyScancode = glfwPlatformGetKeyScancode((unsigned int)i);
glfwInputKey(a1, (unsigned int)i, KeyScancode, 0LL, 0);
}
}
for ( j = 0LL; j != 8; ++j )
{
if ( *(_BYTE *)(a1 + j + 120) == 1 )
glfwInputMouseClick(a1, (unsigned int)j, 0LL, 0);
}
}
}
| _glfwInputWindowFocus:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x2d8]
TEST RAX,RAX
JZ 0x0011cbf4
MOV RDI,RBX
MOV ESI,EBP
CALL RAX
LAB_0011cbf4:
TEST EBP,EBP
JNZ 0x0011cc4f
XOR R14D,R14D
LAB_0011cbfb:
CMP byte ptr [RBX + R14*0x1 + 0x80],0x1
JNZ 0x0011cc20
MOV EDI,R14D
CALL 0x001254a3
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EAX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001196e4
LAB_0011cc20:
INC R14
CMP R14,0x15d
JNZ 0x0011cbfb
XOR R14D,R14D
LAB_0011cc2f:
CMP byte ptr [RBX + R14*0x1 + 0x78],0x1
JNZ 0x0011cc46
MOV RDI,RBX
MOV ESI,R14D
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001197d0
LAB_0011cc46:
INC R14
CMP R14,0x8
JNZ 0x0011cc2f
LAB_0011cc4f:
POP RBX
POP R14
POP RBP
RET
|
void _glfwInputWindowFocus(long param_1,int param_2)
{
int4 uVar1;
ulong uVar2;
if (*(code **)(param_1 + 0x2d8) != (code *)0x0) {
(**(code **)(param_1 + 0x2d8))(param_1,param_2);
}
if (param_2 == 0) {
uVar2 = 0;
do {
if (*(char *)(param_1 + 0x80 + uVar2) == '\x01') {
uVar1 = _glfwPlatformGetKeyScancode(uVar2 & 0xffffffff);
_glfwInputKey(param_1,uVar2 & 0xffffffff,uVar1,0,0);
}
uVar2 = uVar2 + 1;
} while (uVar2 != 0x15d);
uVar2 = 0;
do {
if (*(char *)(param_1 + 0x78 + uVar2) == '\x01') {
_glfwInputMouseClick(param_1,uVar2 & 0xffffffff,0,0);
}
uVar2 = uVar2 + 1;
} while (uVar2 != 8);
}
return;
}
| |
39,025 | google::protobuf::internal::ExtensionSet::Extension::GetSize() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc | int ExtensionSet::Extension::GetSize() const {
GOOGLE_DCHECK(is_repeated);
switch (cpp_type(type)) {
#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \
case WireFormatLite::CPPTYPE_##UPPERCASE: \
return repeated_##LOWERCASE##_value->size()
HANDLE_TYPE(INT32, int32_t);
HANDLE_TYPE(INT64, int64_t);
HANDLE_TYPE(UINT32, uint32_t);
HANDLE_TYPE(UINT64, uint64_t);
HANDLE_TYPE(FLOAT, float);
HANDLE_TYPE(DOUBLE, double);
HANDLE_TYPE(BOOL, bool);
HANDLE_TYPE(ENUM, enum);
HANDLE_TYPE(STRING, string);
HANDLE_TYPE(MESSAGE, message);
#undef HANDLE_TYPE
}
GOOGLE_LOG(FATAL) << "Can't get here.";
return 0;
} | O0 | cpp | google::protobuf::internal::ExtensionSet::Extension::GetSize() const:
subq $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x186797
jmp 0x186850
movq 0x30(%rsp), %rax
movb 0x9(%rax), %al
movb $0x0, 0x8f(%rsp)
testb $0x1, %al
je 0x1867ad
jmp 0x186803
leaq 0x708d8(%rip), %rdx # 0x1f708c
leaq 0x90(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x3, %esi
movl $0x5db, %ecx # imm = 0x5DB
callq 0x237e0
movq 0x20(%rsp), %rdi
movb $0x1, 0x8f(%rsp)
leaq 0x7142a(%rip), %rsi # 0x1f7c0e
callq 0x230a0
movq %rax, 0x28(%rsp)
jmp 0x1867f0
movq 0x28(%rsp), %rsi
leaq 0x7b(%rsp), %rdi
callq 0x23250
jmp 0x186801
jmp 0x186803
testb $0x1, 0x8f(%rsp)
jne 0x18680f
jmp 0x18681c
leaq 0x90(%rsp), %rdi
callq 0x23820
jmp 0x18678c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0x18683e
jmp 0x18684b
leaq 0x90(%rsp), %rdi
callq 0x23820
jmp 0x186a08
movq 0x30(%rsp), %rax
movzbl 0x8(%rax), %edi
callq 0x186f90
decl %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x9, %eax
ja 0x18697c
movq 0x18(%rsp), %rax
leaq 0x7044c(%rip), %rcx # 0x1f6cc8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1bcd50
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1c2390
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1bf860
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1c4ec0
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1c79f0
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1ca540
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1ba240
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1bcd50
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1ccd80
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1a4b30
movl %eax, 0xd4(%rsp)
jmp 0x1869f9
leaq 0x70709(%rip), %rdx # 0x1f708c
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x3, %esi
movl $0x5ee, %ecx # imm = 0x5EE
callq 0x237e0
movq 0x8(%rsp), %rdi
leaq 0x6ad91(%rip), %rsi # 0x1f1739
callq 0x230a0
movq %rax, 0x10(%rsp)
jmp 0x1869b4
movq 0x10(%rsp), %rsi
leaq 0x3f(%rsp), %rdi
callq 0x23250
jmp 0x1869c5
leaq 0x40(%rsp), %rdi
callq 0x23820
movl $0x0, 0xd4(%rsp)
jmp 0x1869f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x23820
jmp 0x186a08
movl 0xd4(%rsp), %eax
addq $0xd8, %rsp
retq
movq 0x80(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZNK6google8protobuf8internal12ExtensionSet9Extension7GetSizeEv:
sub rsp, 0D8h
mov [rsp+0D8h+var_10], rdi
mov rax, [rsp+0D8h+var_10]
mov [rsp+0D8h+var_A8], rax
loc_18678C:
xor eax, eax
test al, 1
jnz short loc_186797
jmp loc_186850
loc_186797:
mov rax, [rsp+0D8h+var_A8]
mov al, [rax+9]
mov [rsp+0D8h+var_49], 0
test al, 1
jz short loc_1867AD
jmp short loc_186803
loc_1867AD:
lea rdx, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_B8], rdi
mov esi, 3
mov ecx, 5DBh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0D8h+var_B8]
mov [rsp+0D8h+var_49], 1
lea rsi, aCheckFailedIsR; "CHECK failed: is_repeated: "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov qword ptr [rsp+0D8h+var_B0], rax
jmp short $+2
loc_1867F0:
mov rsi, qword ptr [rsp+0D8h+var_B0]; unsigned __int8
lea rdi, [rsp+0D8h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_186801:
jmp short $+2
loc_186803:
test [rsp+0D8h+var_49], 1
jnz short loc_18680F
jmp short loc_18681C
loc_18680F:
lea rdi, [rsp+0D8h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_18681C:
jmp loc_18678C
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
test [rsp+arg_87], 1
jnz short loc_18683E
jmp short loc_18684B
loc_18683E:
lea rdi, [rsp+arg_88]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_18684B:
jmp loc_186A08
loc_186850:
mov rax, [rsp+0D8h+var_A8]
movzx edi, byte ptr [rax+8]; this
call _ZN6google8protobuf8internal12_GLOBAL__N_18cpp_typeEh; google::protobuf::internal::`anonymous namespace'::cpp_type(uchar)
dec eax; switch 10 cases
mov ecx, eax
mov [rsp+0D8h+var_C0], rcx
sub eax, 9
ja def_186883; jumptable 0000000000186883 default case
mov rax, [rsp+0D8h+var_C0]
lea rcx, jpt_186883
movsxd rax, ds:(jpt_186883 - 1F6CC8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_186885:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 1
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIiE4sizeEv; google::protobuf::RepeatedField<int>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_18689E:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 2
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIlE4sizeEv; google::protobuf::RepeatedField<long>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_1868B7:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 3
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIjE4sizeEv; google::protobuf::RepeatedField<uint>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_1868D0:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 4
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldImE4sizeEv; google::protobuf::RepeatedField<ulong>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_1868E9:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 6
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIfE4sizeEv; google::protobuf::RepeatedField<float>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_186902:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 5
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIdE4sizeEv; google::protobuf::RepeatedField<double>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_18691B:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 7
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIbE4sizeEv; google::protobuf::RepeatedField<bool>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_186934:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 8
mov rdi, [rax]
call _ZNK6google8protobuf13RepeatedFieldIiE4sizeEv; google::protobuf::RepeatedField<int>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_18694D:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 9
mov rdi, [rax]
call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv; google::protobuf::RepeatedPtrField<std::string>::size(void)
mov [rsp+0D8h+var_4], eax
jmp loc_1869F9
loc_186966:
mov rax, [rsp+0D8h+var_A8]; jumptable 0000000000186883 case 10
mov rdi, [rax]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_11MessageLiteEE4sizeEv; google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::size(void)
mov [rsp+0D8h+var_4], eax
jmp short loc_1869F9
def_186883:
lea rdx, aWorkspaceLlm4b_39; jumptable 0000000000186883 default case
lea rdi, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_D0], rdi
mov esi, 3
mov ecx, 5EEh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0D8h+var_D0]
lea rsi, aCanTGetHere; "Can't get here."
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0D8h+var_C8], rax
jmp short $+2
loc_1869B4:
mov rsi, [rsp+0D8h+var_C8]
lea rdi, [rsp+0D8h+var_99]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_1869C5:
lea rdi, [rsp+0D8h+var_98]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov [rsp+0D8h+var_4], 0
jmp short loc_1869F9
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_38]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_186A08
loc_1869F9:
mov eax, [rsp+0D8h+var_4]
add rsp, 0D8h
retn
loc_186A08:
mov rdi, [rsp+arg_78]
call __Unwind_Resume
| long long google::protobuf::internal::ExtensionSet::Extension::GetSize(
google::protobuf::internal::ExtensionSet::Extension *this,
unsigned __int8 a2)
{
google::protobuf::internal::LogMessage *v3; // [rsp+10h] [rbp-C8h]
char v4; // [rsp+3Fh] [rbp-99h] BYREF
_BYTE v5[59]; // [rsp+40h] [rbp-98h] BYREF
google::protobuf::internal::ExtensionSet::Extension *v6; // [rsp+C8h] [rbp-10h]
unsigned int v7; // [rsp+D4h] [rbp-4h]
v6 = this;
switch ( (unsigned int)google::protobuf::internal::`anonymous namespace'::cpp_type(
(google::protobuf::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + 8),
a2) )
{
case 1u:
case 8u:
v7 = google::protobuf::RepeatedField<int>::size(*(_QWORD *)this);
break;
case 2u:
v7 = google::protobuf::RepeatedField<long>::size(*(_QWORD *)this);
break;
case 3u:
v7 = google::protobuf::RepeatedField<unsigned int>::size(*(_QWORD *)this);
break;
case 4u:
v7 = google::protobuf::RepeatedField<unsigned long>::size(*(_QWORD *)this);
break;
case 5u:
v7 = google::protobuf::RepeatedField<double>::size(*(_QWORD *)this);
break;
case 6u:
v7 = google::protobuf::RepeatedField<float>::size(*(_QWORD *)this);
break;
case 7u:
v7 = google::protobuf::RepeatedField<bool>::size(*(_QWORD *)this);
break;
case 9u:
v7 = google::protobuf::RepeatedPtrField<std::string>::size(*(_QWORD *)this);
break;
case 0xAu:
v7 = google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::size(*(_QWORD *)this);
break;
default:
google::protobuf::internal::LogMessage::LogMessage(
(long long)v5,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
1518);
v3 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v5,
(long long)"Can't get here.");
google::protobuf::internal::LogFinisher::operator=((long long)&v4, v3);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v5);
v7 = 0;
break;
}
return v7;
}
| |||
39,026 | google::protobuf::internal::ExtensionSet::Extension::GetSize() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc | int ExtensionSet::Extension::GetSize() const {
GOOGLE_DCHECK(is_repeated);
switch (cpp_type(type)) {
#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \
case WireFormatLite::CPPTYPE_##UPPERCASE: \
return repeated_##LOWERCASE##_value->size()
HANDLE_TYPE(INT32, int32_t);
HANDLE_TYPE(INT64, int64_t);
HANDLE_TYPE(UINT32, uint32_t);
HANDLE_TYPE(UINT64, uint64_t);
HANDLE_TYPE(FLOAT, float);
HANDLE_TYPE(DOUBLE, double);
HANDLE_TYPE(BOOL, bool);
HANDLE_TYPE(ENUM, enum);
HANDLE_TYPE(STRING, string);
HANDLE_TYPE(MESSAGE, message);
#undef HANDLE_TYPE
}
GOOGLE_LOG(FATAL) << "Can't get here.";
return 0;
} | O3 | cpp | google::protobuf::internal::ExtensionSet::Extension::GetSize() const:
pushq %rbx
subq $0x40, %rsp
movzbl 0x8(%rdi), %eax
leaq 0x2b14e(%rip), %rcx # 0xbf0c0
movl (%rcx,%rax,4), %eax
decl %eax
cmpl $0x9, %eax
ja 0x93f9b
leaq 0x29151(%rip), %rcx # 0xbd0d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdi), %rax
movl (%rax), %eax
jmp 0x93fe1
movq (%rdi), %rax
movl 0x8(%rax), %eax
jmp 0x93fe1
leaq 0x294f6(%rip), %rdx # 0xbd498
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x5ee, %ecx # imm = 0x5EE
callq 0x169ca
leaq 0x255af(%rip), %rsi # 0xb956f
movq %rbx, %rdi
callq 0x164c8
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x8(%rsp), %rdi
callq 0x169e8
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
jmp 0x93fe9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
| _ZNK6google8protobuf8internal12ExtensionSet9Extension7GetSizeEv:
push rbx
sub rsp, 40h
movzx eax, byte ptr [rdi+8]
lea rcx, _ZN6google8protobuf8internal14WireFormatLite22kFieldTypeToCppTypeMapE; google::protobuf::internal::WireFormatLite::kFieldTypeToCppTypeMap
mov eax, [rcx+rax*4]
dec eax; switch 10 cases
cmp eax, 9
ja short def_93F8A; jumptable 0000000000093F8A default case
lea rcx, jpt_93F8A
movsxd rax, ds:(jpt_93F8A - 0BD0D4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_93F8C:
mov rax, [rdi]; jumptable 0000000000093F8A cases 1-8
mov eax, [rax]
jmp short loc_93FE1
loc_93F93:
mov rax, [rdi]; jumptable 0000000000093F8A cases 9,10
mov eax, [rax+8]
jmp short loc_93FE1
def_93F8A:
lea rdx, aWorkspaceLlm4b_22; jumptable 0000000000093F8A default case
lea rbx, [rsp+48h+var_40]
mov rdi, rbx
mov esi, 3
mov ecx, 5EEh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCanTGetHere; "Can't get here."
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+48h+var_41]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+48h+var_40]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
xor eax, eax
loc_93FE1:
add rsp, 40h
pop rbx
retn
jmp short $+2
loc_93FE9:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::internal::ExtensionSet::Extension::GetSize(
google::protobuf::internal::ExtensionSet::Extension *this)
{
long long result; // rax
google::protobuf::internal::LogMessage *v2; // rax
char v3; // [rsp+7h] [rbp-41h] BYREF
_BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF
switch ( *((_BYTE *)this + 8) )
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 0xD:
case 0xE:
case 0xF:
case 0x10:
case 0x11:
case 0x12:
result = **(unsigned int **)this;
break;
case 9:
case 0xA:
case 0xB:
case 0xC:
result = *(unsigned int *)(*(_QWORD *)this + 8LL);
break;
default:
google::protobuf::internal::LogMessage::LogMessage(
(long long)v4,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
1518);
v2 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v4,
(long long)"Can't get here.");
google::protobuf::internal::LogFinisher::operator=((long long)&v3, v2);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v4);
result = 0LL;
break;
}
return result;
}
| GetSize:
PUSH RBX
SUB RSP,0x40
MOVZX EAX,byte ptr [RDI + 0x8]
LEA RCX,[0x1bf0c0]
MOV EAX,dword ptr [RCX + RAX*0x4]
DEC EAX
CMP EAX,0x9
JA 0x00193f9b
LEA RCX,[0x1bd0d4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RDI]
MOV EAX,dword ptr [RAX]
JMP 0x00193fe1
caseD_9:
MOV RAX,qword ptr [RDI]
MOV EAX,dword ptr [RAX + 0x8]
JMP 0x00193fe1
default:
LEA RDX,[0x1bd498]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x3
MOV ECX,0x5ee
CALL 0x001169ca
LAB_00193fb9:
LEA RSI,[0x1b956f]
MOV RDI,RBX
CALL 0x001164c8
LAB_00193fc8:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x001165a2
LAB_00193fd5:
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
XOR EAX,EAX
LAB_00193fe1:
ADD RSP,0x40
POP RBX
RET
|
/* google::protobuf::internal::ExtensionSet::Extension::GetSize() const */
int4 __thiscall google::protobuf::internal::ExtensionSet::Extension::GetSize(Extension *this)
{
int4 uVar1;
LogMessage *pLVar2;
LogFinisher local_41;
LogMessage local_40 [56];
switch(*(int4 *)(WireFormatLite::kFieldTypeToCppTypeMap + (ulong)(byte)this[8] * 4)) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
uVar1 = **(int4 **)this;
break;
case 9:
case 10:
uVar1 = *(int4 *)(*(long *)this + 8);
break;
default:
LogMessage::LogMessage
(local_40,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc"
,0x5ee);
/* try { // try from 00193fb9 to 00193fc7 has its CatchHandler @ 00193fe9 */
pLVar2 = (LogMessage *)LogMessage::operator<<(local_40,"Can\'t get here.");
/* try { // try from 00193fc8 to 00193fd4 has its CatchHandler @ 00193fe7 */
LogFinisher::operator=(&local_41,pLVar2);
LogMessage::~LogMessage(local_40);
uVar1 = 0;
}
return uVar1;
}
| |
39,027 | ftxui::(anonymous namespace)::InputBase::HandleReturn() | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/input.cpp | bool HandleReturn() {
if (multiline()) {
HandleCharacter("\n");
}
on_enter();
return true;
} | O0 | cpp | ftxui::(anonymous namespace)::InputBase::HandleReturn():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0x28, %rdi
addq $0x80, %rdi
callq 0x5e410
testb $0x1, (%rax)
je 0x5a8ed
leaq -0x29(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xdaa0
movq -0x50(%rbp), %rdx
leaq 0x36468(%rip), %rsi # 0x90cf9
leaq -0x28(%rbp), %rdi
callq 0x16510
jmp 0x5a89c
movq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5a920
jmp 0x5a8ab
leaq -0x28(%rbp), %rdi
callq 0xdbc8
leaq -0x29(%rbp), %rdi
callq 0xd620
jmp 0x5a8ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5a8e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xdbc8
leaq -0x29(%rbp), %rdi
callq 0xd620
jmp 0x5a90b
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
addq $0xb0, %rdi
callq 0x253c0
movb $0x1, %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0xda90
nopw %cs:(%rax,%rax)
| _ZN5ftxui12_GLOBAL__N_19InputBase12HandleReturnEv:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_48], rdi
add rdi, 28h ; '('
add rdi, 80h
call _ZN5ftxui3RefIbEclEv; ftxui::Ref<bool>::operator()(void)
test byte ptr [rax], 1
jz short loc_5A8ED
lea rdi, [rbp+var_29]
mov [rbp+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_50]
lea rsi, asc_90CF8+1; "\n"
lea rdi, [rbp+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_5A89C:
mov rdi, [rbp+var_48]
lea rsi, [rbp+var_28]
call _ZN5ftxui12_GLOBAL__N_19InputBase15HandleCharacterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ftxui::`anonymous namespace'::InputBase::HandleCharacter(std::string const&)
jmp short $+2
loc_5A8AB:
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_29]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_5A8ED
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_5A8E2
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_5A8E2:
lea rdi, [rbp+var_29]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_5A90B
loc_5A8ED:
mov rdi, [rbp+var_48]
add rdi, 28h ; '('
add rdi, 0B0h
call _ZNKSt8functionIFvvEEclEv; std::function<void ()(void)>::operator()(void)
mov al, 1
and al, 1
add rsp, 50h
pop rbp
retn
loc_5A90B:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| char ftxui::`anonymous namespace'::InputBase::HandleReturn(long long (**this)(void))
{
char v2; // [rsp+27h] [rbp-29h] BYREF
_BYTE v3[32]; // [rsp+28h] [rbp-28h] BYREF
long long (**v4)(void); // [rsp+48h] [rbp-8h]
v4 = this;
if ( (*(_BYTE *)ftxui::Ref<bool>::operator()(this + 21) & 1) != 0 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v3, (long long)"\n", (long long)&v2);
ftxui::`anonymous namespace'::InputBase::HandleCharacter(this, v3);
std::string::~string(v3);
std::allocator<char>::~allocator(&v2);
}
std::function<void ()(void)>::operator()(this + 27);
return 1;
}
| HandleReturn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RDI
ADD RDI,0x28
ADD RDI,0x80
CALL 0x0015e410
TEST byte ptr [RAX],0x1
JZ 0x0015a8ed
LEA RDI,[RBP + -0x29]
MOV qword ptr [RBP + -0x50],RDI
CALL 0x0010daa0
MOV RDX,qword ptr [RBP + -0x50]
LAB_0015a88a:
LEA RSI,[0x190cf9]
LEA RDI,[RBP + -0x28]
CALL 0x00116510
JMP 0x0015a89c
LAB_0015a89c:
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x28]
CALL 0x0015a920
LAB_0015a8a9:
JMP 0x0015a8ab
LAB_0015a8ab:
LEA RDI,[RBP + -0x28]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x29]
CALL 0x0010d620
JMP 0x0015a8ed
LAB_0015a8ed:
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x28
ADD RDI,0xb0
CALL 0x001253c0
MOV AL,0x1
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
/* ftxui::(anonymous namespace)::InputBase::HandleReturn() */
int1 __thiscall ftxui::(anonymous_namespace)::InputBase::HandleReturn(InputBase *this)
{
byte *pbVar1;
allocator local_31;
string local_30 [32];
InputBase *local_10;
local_10 = this;
pbVar1 = (byte *)Ref<bool>::operator()((Ref<bool> *)(this + 0xa8));
if ((*pbVar1 & 1) != 0) {
std::allocator<char>::allocator();
/* try { // try from 0015a88a to 0015a899 has its CatchHandler @ 0015a8bf */
std::__cxx11::string::string<std::allocator<char>>(local_30,"\n",&local_31);
/* try { // try from 0015a89c to 0015a8a8 has its CatchHandler @ 0015a8cd */
HandleCharacter((string *)this);
std::__cxx11::string::~string(local_30);
std::allocator<char>::~allocator((allocator<char> *)&local_31);
}
std::function<void()>::operator()((function<void()> *)(this + 0xd8));
return 1;
}
| |
39,028 | mysql_local_infile_error | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
int mysql_local_infile_error(void *ptr, char *error_buf, unsigned int error_buf_len)
{
MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr;
if (info) {
ma_strmake(error_buf, info->error_msg, error_buf_len);
return(info->error_no);
}
ma_strmake(error_buf, "Unknown error", error_buf_len);
return(CR_UNKNOWN_ERROR);
} | O3 | c | mysql_local_infile_error:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
testq %rdi, %rdi
je 0x228cb
movq %rdi, %rbx
leaq 0xc(%rdi), %rsi
movl %edx, %edx
movq %rax, %rdi
callq 0x24ebb
movl 0x8(%rbx), %eax
jmp 0x228e1
movl %edx, %edx
leaq 0x1251a(%rip), %rsi # 0x34dee
movq %rax, %rdi
callq 0x24ebb
movl $0x7d0, %eax # imm = 0x7D0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_local_infile_error:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, rsi
test rdi, rdi
jz short loc_228CB
mov rbx, rdi
lea rsi, [rdi+0Ch]
mov edx, edx
mov rdi, rax
call ma_strmake
mov eax, [rbx+8]
jmp short loc_228E1
loc_228CB:
mov edx, edx
lea rsi, aUnknownError; "Unknown error"
mov rdi, rax
call ma_strmake
mov eax, 7D0h
loc_228E1:
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_local_infile_error(long long a1, long long a2, unsigned int a3)
{
if ( a1 )
{
ma_strmake(a2, a1 + 12, a3);
return *(unsigned int *)(a1 + 8);
}
else
{
ma_strmake(a2, "Unknown error", a3);
return 2000LL;
}
}
| mysql_local_infile_error:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,RSI
TEST RDI,RDI
JZ 0x001228cb
MOV RBX,RDI
LEA RSI,[RDI + 0xc]
MOV EDX,EDX
MOV RDI,RAX
CALL 0x00124ebb
MOV EAX,dword ptr [RBX + 0x8]
JMP 0x001228e1
LAB_001228cb:
MOV EDX,EDX
LEA RSI,[0x134dee]
MOV RDI,RAX
CALL 0x00124ebb
MOV EAX,0x7d0
LAB_001228e1:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int4 mysql_local_infile_error(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
if (param_1 == 0) {
ma_strmake(param_2,"Unknown error",param_3);
uVar1 = 2000;
}
else {
ma_strmake(param_2,param_1 + 0xc,param_3);
uVar1 = *(int4 *)(param_1 + 8);
}
return uVar1;
}
| |
39,029 | my_thread_init_common_mutex | eloqsql/mysys/my_thr_init.c | static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
} | O0 | c | my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0xb8da5d(%rip), %rax # 0xc89ae8
movl (%rax), %edi
leaq 0xb8e43c(%rip), %rsi # 0xc8a4d0
leaq 0xb8e735(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
leaq 0xb8da2d(%rip), %rax # 0xc89ad4
movl (%rax), %edi
leaq 0xb8e468(%rip), %rsi # 0xc8a518
leaq 0xb8e719(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
leaq 0xb8da1d(%rip), %rax # 0xc89ae0
movl (%rax), %edi
leaq 0xb8e494(%rip), %rsi # 0xc8a560
xorl %eax, %eax
movl %eax, %edx
callq 0xfcd90
leaq 0xb8da18(%rip), %rax # 0xc89af4
movl (%rax), %edi
leaq 0xb8e4c3(%rip), %rsi # 0xc8a5a8
leaq 0xb8e6e4(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
leaq 0xb8d9d8(%rip), %rax # 0xc89ad0
movl (%rax), %edi
leaq 0xb8e4ef(%rip), %rsi # 0xc8a5f0
leaq 0xb8e6c8(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
leaq 0xb8d9d0(%rip), %rax # 0xc89ae4
movl (%rax), %edi
leaq 0xb8e51b(%rip), %rsi # 0xc8a638
leaq 0xb8e6ac(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
leaq 0xb8d99c(%rip), %rax # 0xc89acc
movl (%rax), %edi
leaq 0xb8e547(%rip), %rsi # 0xc8a680
leaq 0xb8e690(%rip), %rdx # 0xc8a7d0
callq 0xfcd90
popq %rbp
retq
nopw (%rax,%rax)
| my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_10
pop rbp
retn
| long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init_10(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init_10(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init_10(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init_10(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
| my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0xd89ae8]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a4d0]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
LEA RAX,[0xd89ad4]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a518]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
LEA RAX,[0xd89ae0]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a560]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001fcd90
LEA RAX,[0xd89af4]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a5a8]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
LEA RAX,[0xd89ad0]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a5f0]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
LEA RAX,[0xd89ae4]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a638]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
LEA RAX,[0xd89acc]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd8a680]
LEA RDX,[0xd8a7d0]
CALL 0x001fcd90
POP RBP
RET
|
void my_thread_init_common_mutex(void)
{
inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr);
return;
}
| |
39,030 | mp_add_mul1 | bluesky950520[P]quickjs/libbf.c | static limb_t mp_add_mul1(limb_t *tabr, const limb_t *taba, limb_t n,
limb_t b)
{
limb_t i, l;
dlimb_t t;
l = 0;
for(i = 0; i < n; i++) {
t = (dlimb_t)taba[i] * (dlimb_t)b + l + tabr[i];
tabr[i] = t;
l = t >> LIMB_BITS;
}
return l;
} | O2 | c | mp_add_mul1:
movq %rdx, %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x78469
movq %rcx, %rax
mulq (%rsi,%r10,8)
addq %r9, %rax
movq %rdx, %r9
adcq $0x0, %r9
addq %rax, (%rdi,%r10,8)
adcq $0x0, %r9
incq %r10
jmp 0x78446
movq %r9, %rax
retq
| mp_add_mul1:
mov r8, rdx
xor r9d, r9d
xor r10d, r10d
loc_78446:
cmp r8, r10
jz short loc_78469
mov rax, rcx
mul qword ptr [rsi+r10*8]
add rax, r9
mov r9, rdx
adc r9, 0
add [rdi+r10*8], rax
adc r9, 0
inc r10
jmp short loc_78446
loc_78469:
mov rax, r9
retn
| unsigned long long mp_add_mul1(long long a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r9
long long i; // r10
long long v6; // r9
unsigned long long v7; // kr10_8
bool v8; // cf
v4 = 0LL;
for ( i = 0LL; a3 != i; ++i )
{
v7 = *(_QWORD *)(a2 + 8 * i) * a4 + v4;
v6 = (*(unsigned long long *)(a2 + 8 * i) * (unsigned __int128)a4 + v4) >> 64;
v8 = __CFADD__(v7, *(_QWORD *)(a1 + 8 * i));
*(_QWORD *)(a1 + 8 * i) += v7;
v4 = v8 + v6;
}
return v4;
}
| mp_add_mul1:
MOV R8,RDX
XOR R9D,R9D
XOR R10D,R10D
LAB_00178446:
CMP R8,R10
JZ 0x00178469
MOV RAX,RCX
MUL qword ptr [RSI + R10*0x8]
ADD RAX,R9
MOV R9,RDX
ADC R9,0x0
ADD qword ptr [RDI + R10*0x8],RAX
ADC R9,0x0
INC R10
JMP 0x00178446
LAB_00178469:
MOV RAX,R9
RET
|
ulong mp_add_mul1(long param_1,long param_2,long param_3,ulong param_4)
{
ulong *puVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
long lVar7;
uVar6 = 0;
for (lVar7 = 0; auVar4._8_8_ = 0, auVar4._0_8_ = uVar6, param_3 != lVar7; lVar7 = lVar7 + 1) {
auVar2._8_8_ = 0;
auVar2._0_8_ = param_4;
auVar3._8_8_ = 0;
auVar3._0_8_ = *(ulong *)(param_2 + lVar7 * 8);
auVar4 = auVar2 * auVar3 + auVar4;
uVar5 = auVar4._0_8_;
puVar1 = (ulong *)(param_1 + lVar7 * 8);
uVar6 = *puVar1;
*puVar1 = *puVar1 + uVar5;
uVar6 = auVar4._8_8_ + (ulong)CARRY8(uVar6,uVar5);
}
return uVar6;
}
| |
39,031 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 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&, unsigned long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(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::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
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::get_arithmetic_value<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>, unsigned long, 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&, unsigned long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x8325a
cmpl $0x7, %eax
je 0x83260
cmpl $0x6, %eax
jne 0x83291
movq 0x8(%r14), %rax
jmp 0x83285
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x2fdc6(%rip), %xmm0 # 0xb3040
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x43488
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3110d(%rip), %rsi # 0xb43c0
leaq 0x10(%rsp), %rdi
callq 0x6344b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x6335e
xorl %ebp, %ebp
leaq 0x78c6a(%rip), %rsi # 0xfbf48
leaq -0x432cd(%rip), %rdx # 0x40018
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241e8
testb %bpl, %bpl
jne 0x83304
jmp 0x8330c
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fb0
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_8325A
cmp eax, 7
jz short loc_83260
cmp eax, 6
jnz short loc_83291
loc_8325A:
mov rax, [r14+8]
jmp short loc_83285
loc_83260:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_B3040
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_83285:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_83291:
push 20h ; ' '
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_83304
jmp short loc_8330C
mov r14, rax
loc_83304:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8330C:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__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)"type must be number, but is ",
&v5);
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)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);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x0018325a
CMP EAX,0x7
JZ 0x00183260
CMP EAX,0x6
JNZ 0x00183291
LAB_0018325a:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x00183285
LAB_00183260:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001b3040]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_00183285:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00183291:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143488
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001832ac:
LEA RSI,[0x1b43c0]
LEA RDI,[RSP + 0x10]
CALL 0x0016344b
MOV BPL,0x1
LAB_001832c0:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0016335e
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x140018]
MOV RDI,RBX
CALL 0x00123f30
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_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,ulong *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
ulong uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7) {
uVar3 = (ulong)*(double *)(param_1 + 8);
uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001b3040) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_00183285;
}
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
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 001832ac to 001832bc has its CatchHandler @ 00183301 */
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 001832c0 to 001832ec has its CatchHandler @ 001832ed */
_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);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_00183285:
*param_2 = uVar3;
return;
}
| |
39,032 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 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&, unsigned long&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(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::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 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&, unsigned long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x8737d
cmpl $0x7, %eax
je 0x87375
cmpl $0x6, %eax
jne 0x87390
movsd 0x8(%r14), %xmm1
unpcklps 0x67c81(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x67c89(%rip), %xmm1 # 0xeeff0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0x87383
movsd 0x8(%r14), %xmm0
jmp 0x87383
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5efec
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6901c(%rip), %rsi # 0xf03d0
leaq 0x10(%rsp), %rdi
callq 0x86a1d
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x8684e
xorl %ebp, %ebp
leaq 0xa2b79(%rip), %rsi # 0x129f58
leaq -0x2c1c4(%rip), %rdx # 0x5b222
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8740c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x87416
jmp 0x8741e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afb0
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_8737D
cmp eax, 7
jz short loc_87375
cmp eax, 6
jnz short loc_87390
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_EEFE0
subpd xmm1, cs:xmmword_EEFF0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_87383
loc_87375:
movsd xmm0, qword ptr [r14+8]
jmp short loc_87383
loc_8737D:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_87383:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_87390:
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, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8740C
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8740C:
test bpl, bpl
jnz short loc_87416
jmp short loc_8741E
mov r14, rax
loc_87416:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8741E:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
double *a2)
{
long long result; // rax
__m128d v3; // xmm1
double v4; // xmm0_8
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_QWORD v7[2]; // [rsp+10h] [rbp-38h] BYREF
result = *a1;
switch ( (_DWORD)result )
{
case 5:
v4 = (double)(int)*((_QWORD *)a1 + 1);
break;
case 7:
v4 = *((double *)a1 + 1);
break;
case 6:
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_EEFE0),
(__m128d)xmmword_EEFF0);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v6 = 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)v7,
(long long)"type must be number, but is ",
&v6);
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,
v7);
__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 = v4;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x0018737d
CMP EAX,0x7
JZ 0x00187375
CMP EAX,0x6
JNZ 0x00187390
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x001eefe0]
SUBPD XMM1,xmmword ptr [0x001eeff0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x00187383
LAB_00187375:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x00187383
LAB_0018737d:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_00187383:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00187390:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015efec
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001873ad:
LEA RSI,[0x1f03d0]
LEA RDI,[RSP + 0x10]
CALL 0x00186a1d
MOV BPL,0x1
LAB_001873c1:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0018684e
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b222]
MOV RDI,RBX
CALL 0x0011af30
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_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,double *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
double dVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
dVar3 = (double)*(long *)(param_1 + 8);
}
else if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7) {
dVar3 = *(double *)(param_1 + 8);
}
else {
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
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 001873ad to 001873bd has its CatchHandler @ 00187413 */
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 001873c1 to 001873ed has its CatchHandler @ 001873ee */
_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);
}
dVar3 = ((double)CONCAT44(_UNK_001eefe4,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_001eeff8) +
((double)CONCAT44(_DAT_001eefe0,(int)*(int8 *)(param_1 + 8)) - _DAT_001eeff0);
}
*param_2 = dVar3;
return;
}
| |
39,033 | reset_root_defaults | eloqsql/mysys/my_alloc.c | void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("reset_root_defaults");
DBUG_ASSERT(alloc_root_inited(mem_root));
mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) |
(mem_root->block_size & 1));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM));
if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size)
{
USED_MEM *mem, **prev= &mem_root->free;
/*
Free unused blocks, so that consequent calls
to reset_root_defaults won't eat away memory.
*/
while (*prev)
{
mem= *prev;
if (mem->size == size)
{
/* We found a suitable block, no need to do anything else */
mem_root->pre_alloc= mem;
DBUG_VOID_RETURN;
}
if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size)
{
/* remove block from the list and free it */
*prev= mem->next;
my_free(mem);
}
else
prev= &mem->next;
}
/* Allocate new prealloc block and add it to the end of free list */
if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size,
MYF(MALLOC_FLAG(mem_root->
block_size)))))
{
mem->size= size;
mem->left= pre_alloc_size;
mem->next= *prev;
*prev= mem_root->pre_alloc= mem;
TRASH_MEM(mem);
}
else
{
mem_root->pre_alloc= 0;
}
}
}
else
#endif
mem_root->pre_alloc= 0;
DBUG_VOID_RETURN;
} | O0 | c | reset_root_defaults:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x289a6
movq -0x10(%rbp), %rcx
subq $0x28, %rcx
andq $-0x2, %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x1, %rax
orq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x28aff
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x28a01
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x28afd
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x28a76
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x28a3d
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x28b0f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x18, %rax
movq -0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x28a6c
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x2eb20
jmp 0x28a74
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x28a09
movq -0x8(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
andq $0x1, %rdx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2e7a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x28aef
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x28ae9
jmp 0x28aeb
jmp 0x28aed
jmp 0x28afb
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x28afd
jmp 0x28b0b
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x28b0d
jmp 0x28b0f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| reset_root_defaults:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_289A6:
mov rcx, [rbp+var_10]
sub rcx, 28h ; '('
and rcx, 0FFFFFFFFFFFFFFFEh
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 1
or rcx, rax
mov rax, [rbp+var_8]
mov [rax+20h], rcx
cmp [rbp+var_18], 0
jz loc_28AFF
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_28A01
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jz loc_28AFD
loc_28A01:
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
loc_28A09:
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jz short loc_28A76
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jnz short loc_28A3D
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp loc_28B0F
loc_28A3D:
mov rax, [rbp+var_28]
mov rax, [rax+8]
add rax, 18h
mov rcx, [rbp+var_28]
cmp rax, [rcx+10h]
jnz short loc_28A6C
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rdi, [rbp+var_28]
call my_free
jmp short loc_28A74
loc_28A6C:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_28A74:
jmp short loc_28A09
loc_28A76:
mov rax, [rbp+var_8]
mov edi, [rax+38h]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_8]
mov rdx, [rax+20h]
and rdx, 1
xor eax, eax
mov ecx, 10000h
cmp rdx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_28AEF
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov [rax], rcx
jmp short $+2
loc_28AE9:
jmp short $+2
loc_28AEB:
jmp short $+2
loc_28AED:
jmp short loc_28AFB
loc_28AEF:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_28AFB:
jmp short $+2
loc_28AFD:
jmp short loc_28B0B
loc_28AFF:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_28B0B:
jmp short $+2
loc_28B0D:
jmp short $+2
loc_28B0F:
add rsp, 30h
pop rbp
retn
| long long * reset_root_defaults(long long *a1, long long a2, long long a3)
{
long long *result; // rax
long long v4; // rdi
unsigned int v5; // eax
long long *v6; // [rsp+0h] [rbp-30h]
long long *v7; // [rsp+8h] [rbp-28h]
_QWORD *v8; // [rsp+8h] [rbp-28h]
long long *v9; // [rsp+10h] [rbp-20h]
a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL;
if ( a3 )
{
v9 = (long long *)(a3 + 24);
if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != v9) )
{
v6 = a1;
while ( *v6 )
{
v7 = (long long *)*v6;
if ( *(long long **)(*v6 + 16) == v9 )
{
result = a1;
a1[2] = (long long)v7;
return result;
}
if ( v7[1] + 24 == v7[2] )
{
*v6 = *v7;
my_free(v7);
}
else
{
v6 = (long long *)*v6;
}
}
v4 = *((unsigned int *)a1 + 14);
v5 = 0;
if ( (a1[4] & 1) != 0 )
v5 = 0x10000;
v8 = (_QWORD *)my_malloc(v4, v9, v5);
if ( v8 )
{
v8[2] = v9;
v8[1] = a3;
*v8 = *v6;
a1[2] = (long long)v8;
result = v6;
*v6 = (long long)v8;
}
else
{
result = a1;
a1[2] = 0LL;
}
}
}
else
{
result = a1;
a1[2] = 0LL;
}
return result;
}
| reset_root_defaults:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001289a6
LAB_001289a6:
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x28
AND RCX,-0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x1
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00128aff
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00128a01
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00128afd
LAB_00128a01:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_00128a09:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JZ 0x00128a76
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00128a3d
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00128b0f
LAB_00128a3d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,0x18
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x00128a6c
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0012eb20
JMP 0x00128a74
LAB_00128a6c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_00128a74:
JMP 0x00128a09
LAB_00128a76:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x20]
AND RDX,0x1
XOR EAX,EAX
MOV ECX,0x10000
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012e7a0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00128aef
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
JMP 0x00128ae9
LAB_00128ae9:
JMP 0x00128aeb
LAB_00128aeb:
JMP 0x00128aed
LAB_00128aed:
JMP 0x00128afb
LAB_00128aef:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_00128afb:
JMP 0x00128afd
LAB_00128afd:
JMP 0x00128b0b
LAB_00128aff:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_00128b0b:
JMP 0x00128b0d
LAB_00128b0d:
JMP 0x00128b0f
LAB_00128b0f:
ADD RSP,0x30
POP RBP
RET
|
void reset_root_defaults(long *param_1,long param_2,long param_3)
{
int4 uVar1;
long lVar2;
long *plVar3;
long *local_38;
param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U;
if (param_3 == 0) {
param_1[2] = 0;
}
else {
lVar2 = param_3 + 0x18;
plVar3 = param_1;
if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) {
while (local_38 = plVar3, *local_38 != 0) {
plVar3 = (long *)*local_38;
if (plVar3[2] == lVar2) {
param_1[2] = (long)plVar3;
return;
}
if (plVar3[1] + 0x18 == plVar3[2]) {
*local_38 = *plVar3;
my_free(plVar3);
plVar3 = local_38;
}
}
uVar1 = 0;
if ((param_1[4] & 1U) != 0) {
uVar1 = 0x10000;
}
plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1);
if (plVar3 == (long *)0x0) {
param_1[2] = 0;
}
else {
plVar3[2] = lVar2;
plVar3[1] = param_3;
*plVar3 = *local_38;
param_1[2] = (long)plVar3;
*local_38 = (long)plVar3;
}
}
}
return;
}
| |
39,034 | fmt::v8::detail::fixed_handler::on_start(unsigned long, unsigned long, unsigned long, int&) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format-inl.h | digits::result on_start(uint64_t divisor, uint64_t remainder, uint64_t error,
int& exp) {
// Non-fixed formats require at least one digit and no precision adjustment.
if (!fixed) return digits::more;
// Adjust fixed precision by exponent because it is relative to decimal
// point.
precision += exp + exp10;
// Check if precision is satisfied just by leading zeros, e.g.
// format("{:.2f}", 0.001) gives "0.00" without generating any digits.
if (precision > 0) return digits::more;
if (precision < 0) return digits::done;
auto dir = get_round_direction(divisor, remainder, error);
if (dir == round_direction::unknown) return digits::error;
buf[size++] = dir == round_direction::up ? '1' : '0';
return digits::done;
} | O3 | c | fmt::v8::detail::fixed_handler::on_start(unsigned long, unsigned long, unsigned long, int&):
xorl %eax, %eax
cmpb $0x1, 0x14(%rdi)
jne 0x472f9
movl 0x10(%rdi), %r9d
addl (%r8), %r9d
addl 0xc(%rdi), %r9d
movl %r9d, 0xc(%rdi)
jle 0x472fa
retq
movl $0x1, %eax
js 0x472f9
movq %rsi, %rax
subq %rdx, %rax
cmpq %rdx, %rax
jb 0x47321
leaq (%rcx,%rcx), %rax
movq %rsi, %r9
subq %rdx, %r9
subq %rdx, %r9
movb $0x30, %r8b
cmpq %r9, %rax
jbe 0x47336
movl $0x2, %eax
subq %rcx, %rdx
jb 0x472f9
subq %rdx, %rsi
movb $0x31, %r8b
cmpq %rsi, %rdx
jb 0x472f9
movq (%rdi), %rax
movslq 0x8(%rdi), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rdi)
movb %r8b, (%rax,%rcx)
movl $0x1, %eax
retq
nop
| _ZN3fmt2v86detail13fixed_handler8on_startEmmmRi:
xor eax, eax
cmp byte ptr [rdi+14h], 1
jnz short locret_472F9
mov r9d, [rdi+10h]
add r9d, [r8]
add r9d, [rdi+0Ch]
mov [rdi+0Ch], r9d
jle short loc_472FA
locret_472F9:
retn
loc_472FA:
mov eax, 1
js short locret_472F9
mov rax, rsi
sub rax, rdx
cmp rax, rdx
jb short loc_47321
lea rax, [rcx+rcx]
mov r9, rsi
sub r9, rdx
sub r9, rdx
mov r8b, 30h ; '0'
cmp rax, r9
jbe short loc_47336
loc_47321:
mov eax, 2
sub rdx, rcx
jb short locret_472F9
sub rsi, rdx
mov r8b, 31h ; '1'
cmp rdx, rsi
jb short locret_472F9
loc_47336:
mov rax, [rdi]
movsxd rcx, dword ptr [rdi+8]
lea edx, [rcx+1]
mov [rdi+8], edx
mov [rax+rcx], r8b
mov eax, 1
retn
| long long fmt::v8::detail::fixed_handler::on_start(
fmt::v8::detail::fixed_handler *this,
long long a2,
unsigned long long a3,
unsigned long long a4,
int *a5)
{
long long result; // rax
int v6; // r9d
bool v7; // sf
char v8; // cc
char v9; // r8
bool v10; // cf
unsigned long long v11; // rdx
long long v12; // rax
long long v13; // rcx
result = 0LL;
if ( *((_BYTE *)this + 20) == 1 )
{
v6 = *a5 + *((_DWORD *)this + 4);
v7 = *((_DWORD *)this + 3) + v6 < 0;
v8 = v7 ^ __OFADD__(*((_DWORD *)this + 3), v6) | (*((_DWORD *)this + 3) + v6 == 0);
*((_DWORD *)this + 3) += v6;
if ( v8 )
{
result = 1LL;
if ( !v7 )
{
if ( a2 - a3 >= a3 && (v9 = 48, 2 * a4 <= a2 - a3 - a3)
|| (result = 2LL, v10 = a3 < a4, v11 = a3 - a4, !v10) && (v9 = 49, v11 >= a2 - v11) )
{
v12 = *(_QWORD *)this;
v13 = *((int *)this + 2);
*((_DWORD *)this + 2) = v13 + 1;
*(_BYTE *)(v12 + v13) = v9;
return 1LL;
}
}
}
}
return result;
}
| on_start:
XOR EAX,EAX
CMP byte ptr [RDI + 0x14],0x1
JNZ 0x001472f9
MOV R9D,dword ptr [RDI + 0x10]
ADD R9D,dword ptr [R8]
ADD R9D,dword ptr [RDI + 0xc]
MOV dword ptr [RDI + 0xc],R9D
JLE 0x001472fa
LAB_001472f9:
RET
LAB_001472fa:
MOV EAX,0x1
JS 0x001472f9
MOV RAX,RSI
SUB RAX,RDX
CMP RAX,RDX
JC 0x00147321
LEA RAX,[RCX + RCX*0x1]
MOV R9,RSI
SUB R9,RDX
SUB R9,RDX
MOV R8B,0x30
CMP RAX,R9
JBE 0x00147336
LAB_00147321:
MOV EAX,0x2
SUB RDX,RCX
JC 0x001472f9
SUB RSI,RDX
MOV R8B,0x31
CMP RDX,RSI
JC 0x001472f9
LAB_00147336:
MOV RAX,qword ptr [RDI]
MOVSXD RCX,dword ptr [RDI + 0x8]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RDI + 0x8],EDX
MOV byte ptr [RAX + RCX*0x1],R8B
MOV EAX,0x1
RET
|
/* fmt::v8::detail::fixed_handler::on_start(unsigned long, unsigned long, unsigned long, int&) */
int8 __thiscall
fmt::v8::detail::fixed_handler::on_start
(fixed_handler *this,ulong param_1,ulong param_2,ulong param_3,int *param_4)
{
int iVar1;
int iVar2;
int8 uVar3;
int1 uVar4;
int iVar5;
uVar3 = 0;
if (this[0x14] == (fixed_handler)0x1) {
iVar1 = *param_4;
iVar2 = *(int *)(this + 0xc);
iVar5 = *(int *)(this + 0x10) + iVar1 + *(int *)(this + 0xc);
*(int *)(this + 0xc) = iVar5;
if ((iVar5 == 0 || SCARRY4(*(int *)(this + 0x10) + iVar1,iVar2) != iVar5 < 0) &&
(uVar3 = 1, iVar5 >= 0)) {
if ((param_1 - param_2 < param_2) || (uVar4 = 0x30, param_1 + param_2 * -2 < param_3 * 2)) {
if (param_2 < param_3) {
return 2;
}
uVar4 = 0x31;
if (param_2 - param_3 < param_1 - (param_2 - param_3)) {
return 2;
}
}
iVar1 = *(int *)(this + 8);
*(int *)(this + 8) = iVar1 + 1;
*(int1 *)(*(long *)this + (long)iVar1) = uVar4;
return 1;
}
}
return uVar3;
}
| |
39,035 | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&) | ng-log[P]ng-log/src/logging.cc | void MakeCheckOpValueString(std::ostream* os, const unsigned char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "unsigned char value " << static_cast<unsigned short>(v);
}
} | O3 | cpp | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x20, %al
cmpb $0x5e, %al
ja 0xdf50
leaq 0x147af(%rip), %r15 # 0x226be
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7610
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7610
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7610
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1491d(%rip), %rsi # 0x22874
movl $0x14, %edx
movq %rbx, %rdi
callq 0x7610
movzbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7360
| _ZN5nglog8internal22MakeCheckOpValueStringIhEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 0E0h
cmp al, 5Eh ; '^'
ja short loc_DF50
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
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)
mov al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
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)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_DF50:
lea rsi, aUnsignedCharVa; "unsigned char value "
mov edx, 14h
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movzx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
| long long nglog::internal::MakeCheckOpValueString<unsigned char>(long long a1, _BYTE *a2)
{
long long v2; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 32) > 0x5Eu )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "unsigned char value ", 20LL);
return std::ostream::_M_insert<unsigned long>(a1);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v2 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v2, "'", 1LL);
}
}
| MakeCheckOpValueString<unsigned_char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0xe0
CMP AL,0x5e
JA 0x0010df50
LEA R15,[0x1226be]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x00107610
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00107610
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00107610
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0010df50:
LEA RSI,[0x122874]
MOV EDX,0x14
MOV RDI,RBX
CALL 0x00107610
MOVZX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107360
|
/* void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&)
*/
void nglog::internal::MakeCheckOpValueString<unsigned_char>(ostream *param_1,uchar *param_2)
{
ostream *poVar1;
uchar local_19;
if ((byte)(*param_2 - 0x20) < 0x5f) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"unsigned char value ",0x14);
std::ostream::_M_insert<unsigned_long>((ulong)param_1);
return;
}
| |
39,036 | inline_mysql_file_seek | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
} | O0 | c | inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1e0280(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x8, %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 0xe7e53
leaq 0x1e023a(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xfc910
movq %rax, -0x38(%rbp)
leaq 0x1e0203(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe7e72
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xfc910
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| inline_mysql_file_seek_6:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
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, 8
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 short loc_E7E53
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_E7E72
loc_E7E53:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_E7E72:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long inline_mysql_file_seek_6(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h]
long long v9; // [rsp+58h] [rbp-38h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+78h] [rbp-18h]
unsigned int v14; // [rsp+7Ch] [rbp-14h]
long long v15; // [rsp+80h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL);
if ( !v8 )
return my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14);
v9 = my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL);
return v9;
}
| inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
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 dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x8
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 0x001e7e53
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001fc910
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e7e72
LAB_001e7e53:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001fc910
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e7e72:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int8
inline_mysql_file_seek
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int8 local_40;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_38 = param_6;
local_2c = 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,8);
if (local_48 == 0) {
local_10 = my_seek(local_20,local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c);
local_40 = my_seek(local_20,local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x218))(local_48,0);
local_10 = local_40;
}
return local_10;
}
| |
39,037 | inline_mysql_file_seek | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
} | O3 | c | inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movl %edi, %r14d
leaq 0x322c13(%rip), %rax # 0x38d070
movq (%rax), %rax
leaq -0x68(%rbp), %rdi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6a48f
movl %ebx, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xa6ca0
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x20(%rbp), %r15
movq %rax, %rdi
movl %r14d, %esi
movl %ebx, %edx
movq %r15, %rcx
callq 0x2ca98
movq (%r15), %rax
jmp 0x6a484
| inline_mysql_file_seek:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 58h
mov ebx, esi
mov r14d, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_68]
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6A48F
mov edi, ebx
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
loc_6A484:
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6A48F:
lea r15, [rbp+var_20]
mov rdi, rax
mov esi, r14d
mov edx, ebx
mov rcx, r15
call inline_mysql_file_seek_cold_1
mov rax, [r15]
jmp short loc_6A484
| long long inline_mysql_file_seek(unsigned int a1, long long a2)
{
long long v2; // rax
_BYTE v4[72]; // [rsp+8h] [rbp-68h] BYREF
_QWORD v5[4]; // [rsp+50h] [rbp-20h] BYREF
v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 8LL);
if ( !v2 )
return my_seek((unsigned int)a2, 0LL, 2LL, 0LL);
inline_mysql_file_seek_cold_1(v2, a1, a2, v5);
return v5[0];
}
| inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV EBX,ESI
MOV R14D,EDI
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016a48f
MOV EDI,EBX
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001a6ca0
LAB_0016a484:
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016a48f:
LEA R15,[RBP + -0x20]
MOV RDI,RAX
MOV ESI,R14D
MOV EDX,EBX
MOV RCX,R15
CALL 0x0012ca98
MOV RAX,qword ptr [R15]
JMP 0x0016a484
|
int8 inline_mysql_file_seek(int4 param_1,ulong param_2)
{
long lVar1;
int1 local_70 [72];
int8 local_28;
lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,8);
if (lVar1 == 0) {
local_28 = my_seek(param_2 & 0xffffffff,0,2,0);
}
else {
inline_mysql_file_seek_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_28);
}
return local_28;
}
| |
39,038 | google::protobuf::io::CodedInputStream::BackUpInputToCurrentPosition() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.h | inline int CodedInputStream::BufferSize() const {
return static_cast<int>(buffer_end_ - buffer_);
} | O3 | c | google::protobuf::io::CodedInputStream::BackUpInputToCurrentPosition():
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
movl %eax, %edx
subl %ecx, %edx
cmpl $0x9, %edx
jg 0x79d3c
testl %edx, %edx
jle 0x79d7e
cmpb $0x0, -0x1(%rax)
js 0x79cb4
testl %esi, %esi
je 0x79d5b
movzbl 0x1(%rcx), %eax
movl %eax, %edx
shll $0x7, %edx
addl %esi, %edx
addl $-0x80, %edx
testb %al, %al
js 0x79d63
addq $0x2, %rcx
jmp 0x79ddd
incq %rcx
movq %rcx, (%rdi)
jmp 0x79da6
movzbl 0x2(%rcx), %eax
movl %eax, %esi
shll $0xe, %esi
addl %esi, %edx
addl $0xffffc000, %edx # imm = 0xFFFFC000
testb %al, %al
js 0x79da9
addq $0x3, %rcx
jmp 0x79ddd
jne 0x79cb4
movl 0x2c(%rdi), %eax
movl 0x18(%rdi), %ecx
testl %eax, %eax
jg 0x79d97
cmpl 0x28(%rdi), %ecx
jne 0x79cb4
subl %eax, %ecx
cmpl 0x30(%rdi), %ecx
jge 0x79cb4
movb $0x1, 0x24(%rdi)
xorl %eax, %eax
retq
movzbl 0x3(%rcx), %eax
movl %eax, %esi
shll $0x15, %esi
addl %esi, %edx
addl $0xffe00000, %edx # imm = 0xFFE00000
testb %al, %al
js 0x79dc4
addq $0x4, %rcx
jmp 0x79ddd
movzbl 0x4(%rcx), %eax
movl %eax, %esi
shll $0x1c, %esi
addl %esi, %edx
addl $0xf0000000, %edx # imm = 0xF0000000
testb %al, %al
js 0x79de3
addq $0x5, %rcx
movq %rcx, (%rdi)
movl %edx, %eax
retq
addq $0x6, %rcx
movl $0x5, %esi
xorl %eax, %eax
cmpb $0x0, -0x1(%rcx)
jns 0x79ddd
incq %rcx
decl %esi
jne 0x79dee
jmp 0x79da8
nop
| _ZN6google8protobuf2io16CodedInputStream15ReadTagFallbackEj:
mov rcx, [rdi]
mov rax, [rdi+8]
mov edx, eax
sub edx, ecx
cmp edx, 9
jg short loc_79D3C
test edx, edx
jle short loc_79D7E
cmp byte ptr [rax-1], 0
js _ZN6google8protobuf2io16CodedInputStream11ReadTagSlowEv; google::protobuf::io::CodedInputStream::ReadTagSlow(void)
loc_79D3C:
test esi, esi
jz short loc_79D5B
movzx eax, byte ptr [rcx+1]
mov edx, eax
shl edx, 7
add edx, esi
add edx, 0FFFFFF80h
test al, al
js short loc_79D63
add rcx, 2
jmp loc_79DDD
loc_79D5B:
inc rcx
mov [rdi], rcx
jmp short loc_79DA6
loc_79D63:
movzx eax, byte ptr [rcx+2]
mov esi, eax
shl esi, 0Eh
add edx, esi
add edx, 0FFFFC000h
test al, al
js short loc_79DA9
add rcx, 3
jmp short loc_79DDD
loc_79D7E:
jnz _ZN6google8protobuf2io16CodedInputStream11ReadTagSlowEv; google::protobuf::io::CodedInputStream::ReadTagSlow(void)
mov eax, [rdi+2Ch]
mov ecx, [rdi+18h]
test eax, eax
jg short loc_79D97
cmp ecx, [rdi+28h]
jnz _ZN6google8protobuf2io16CodedInputStream11ReadTagSlowEv; google::protobuf::io::CodedInputStream::ReadTagSlow(void)
loc_79D97:
sub ecx, eax
cmp ecx, [rdi+30h]
jge _ZN6google8protobuf2io16CodedInputStream11ReadTagSlowEv; google::protobuf::io::CodedInputStream::ReadTagSlow(void)
mov byte ptr [rdi+24h], 1
loc_79DA6:
xor eax, eax
locret_79DA8:
retn
loc_79DA9:
movzx eax, byte ptr [rcx+3]
mov esi, eax
shl esi, 15h
add edx, esi
add edx, 0FFE00000h
test al, al
js short loc_79DC4
add rcx, 4
jmp short loc_79DDD
loc_79DC4:
movzx eax, byte ptr [rcx+4]
mov esi, eax
shl esi, 1Ch
add edx, esi
add edx, 0F0000000h
test al, al
js short loc_79DE3
add rcx, 5
loc_79DDD:
mov [rdi], rcx
mov eax, edx
retn
loc_79DE3:
add rcx, 6
mov esi, 5
xor eax, eax
loc_79DEE:
cmp byte ptr [rcx-1], 0
jns short loc_79DDD
inc rcx
dec esi
jnz short loc_79DEE
jmp short locret_79DA8
| long long google::protobuf::io::CodedInputStream::ReadTagFallback(
google::protobuf::io::CodedInputStream *this,
int a2)
{
unsigned __int8 *v2; // rcx
int v3; // edx
unsigned int v4; // edx
unsigned __int8 *v5; // rcx
int v6; // eax
int v7; // ecx
long long result; // rax
int v9; // esi
v2 = *(unsigned __int8 **)this;
v3 = *((_QWORD *)this + 1) - *(_QWORD *)this;
if ( v3 <= 9 )
{
if ( v3 <= 0 )
{
if ( !v3 )
{
v6 = *((_DWORD *)this + 11);
v7 = *((_DWORD *)this + 6);
if ( (v6 > 0 || v7 == *((_DWORD *)this + 10)) && v7 - v6 < *((_DWORD *)this + 12) )
{
*((_BYTE *)this + 36) = 1;
return 0LL;
}
}
}
else if ( *(char *)(*((_QWORD *)this + 1) - 1LL) >= 0 )
{
goto LABEL_4;
}
return google::protobuf::io::CodedInputStream::ReadTagSlow(this);
}
LABEL_4:
if ( !a2 )
{
*(_QWORD *)this = v2 + 1;
return 0LL;
}
v4 = a2 + (v2[1] << 7) - 128;
if ( (v2[1] & 0x80u) != 0 )
{
v4 = (v2[2] << 14) + v4 - 0x4000;
if ( (v2[2] & 0x80u) != 0 )
{
v4 = (v2[3] << 21) + v4 - 0x200000;
if ( (v2[3] & 0x80u) != 0 )
{
v4 = (v2[4] << 28) + v4 - 0x10000000;
if ( (v2[4] & 0x80u) != 0 )
{
v5 = v2 + 6;
v9 = 5;
result = 0LL;
while ( (*(v5 - 1) & 0x80u) != 0 )
{
++v5;
if ( !--v9 )
return result;
}
}
else
{
v5 = v2 + 5;
}
}
else
{
v5 = v2 + 4;
}
}
else
{
v5 = v2 + 3;
}
}
else
{
v5 = v2 + 2;
}
*(_QWORD *)this = v5;
return v4;
}
| ReadTagFallback:
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
MOV EDX,EAX
SUB EDX,ECX
CMP EDX,0x9
JG 0x00179d3c
TEST EDX,EDX
JLE 0x00179d7e
CMP byte ptr [RAX + -0x1],0x0
JS 0x00179cb4
LAB_00179d3c:
TEST ESI,ESI
JZ 0x00179d5b
MOVZX EAX,byte ptr [RCX + 0x1]
MOV EDX,EAX
SHL EDX,0x7
ADD EDX,ESI
ADD EDX,-0x80
TEST AL,AL
JS 0x00179d63
ADD RCX,0x2
JMP 0x00179ddd
LAB_00179d5b:
INC RCX
MOV qword ptr [RDI],RCX
JMP 0x00179da6
LAB_00179d63:
MOVZX EAX,byte ptr [RCX + 0x2]
MOV ESI,EAX
SHL ESI,0xe
ADD EDX,ESI
ADD EDX,0xffffc000
TEST AL,AL
JS 0x00179da9
ADD RCX,0x3
JMP 0x00179ddd
LAB_00179d7e:
JNZ 0x00179cb4
MOV EAX,dword ptr [RDI + 0x2c]
MOV ECX,dword ptr [RDI + 0x18]
TEST EAX,EAX
JG 0x00179d97
CMP ECX,dword ptr [RDI + 0x28]
JNZ 0x00179cb4
LAB_00179d97:
SUB ECX,EAX
CMP ECX,dword ptr [RDI + 0x30]
JGE 0x00179cb4
MOV byte ptr [RDI + 0x24],0x1
LAB_00179da6:
XOR EAX,EAX
LAB_00179da8:
RET
LAB_00179da9:
MOVZX EAX,byte ptr [RCX + 0x3]
MOV ESI,EAX
SHL ESI,0x15
ADD EDX,ESI
ADD EDX,0xffe00000
TEST AL,AL
JS 0x00179dc4
ADD RCX,0x4
JMP 0x00179ddd
LAB_00179dc4:
MOVZX EAX,byte ptr [RCX + 0x4]
MOV ESI,EAX
SHL ESI,0x1c
ADD EDX,ESI
ADD EDX,0xf0000000
TEST AL,AL
JS 0x00179de3
ADD RCX,0x5
LAB_00179ddd:
MOV qword ptr [RDI],RCX
MOV EAX,EDX
RET
LAB_00179de3:
ADD RCX,0x6
MOV ESI,0x5
XOR EAX,EAX
LAB_00179dee:
CMP byte ptr [RCX + -0x1],0x0
JNS 0x00179ddd
INC RCX
DEC ESI
JNZ 0x00179dee
JMP 0x00179da8
|
/* google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int) */
int __thiscall
google::protobuf::io::CodedInputStream::ReadTagFallback(CodedInputStream *this,uint param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
long lVar4;
int iVar5;
ulong extraout_RDX;
int iVar6;
lVar4 = *(long *)this;
iVar6 = (int)*(long *)(this + 8);
iVar5 = iVar6 - (int)lVar4;
if (iVar5 < 10) {
if (iVar5 < 1) {
if (iVar6 == (int)lVar4) {
if (((0 < *(int *)(this + 0x2c)) || (*(int *)(this + 0x18) == *(int *)(this + 0x28))) &&
(*(int *)(this + 0x18) - *(int *)(this + 0x2c) < *(int *)(this + 0x30))) {
this[0x24] = (CodedInputStream)0x1;
return 0;
}
}
}
else if (-1 < *(char *)(*(long *)(this + 8) + -1)) goto LAB_00179d3c;
pcVar3 = *(char **)this;
pcVar2 = *(char **)(this + 8);
if (pcVar3 == pcVar2) {
cVar1 = Refresh(this);
if (cVar1 == '\0') {
if (*(int *)(this + 0x18) - *(int *)(this + 0x2c) < *(int *)(this + 0x30)) {
this[0x24] = (CodedInputStream)0x1;
}
else {
this[0x24] = (CodedInputStream)(*(int *)(this + 0x28) == *(int *)(this + 0x30));
}
return 0;
}
pcVar3 = *(char **)this;
pcVar2 = *(char **)(this + 8);
}
if ((pcVar3 < pcVar2) && (cVar1 = *pcVar3, -1 < cVar1)) {
*(char **)this = pcVar3 + 1;
iVar5 = (int)cVar1;
}
else {
iVar6 = ReadVarint64Fallback(this);
iVar5 = 0;
if ((extraout_RDX & 1) != 0) {
iVar5 = iVar6;
}
}
return iVar5;
}
LAB_00179d3c:
if (param_1 == 0) {
*(long *)this = lVar4 + 1;
return 0;
}
iVar5 = (uint)*(byte *)(lVar4 + 1) * 0x80 + param_1 + -0x80;
if ((char)*(byte *)(lVar4 + 1) < '\0') {
iVar5 = iVar5 + (uint)*(byte *)(lVar4 + 2) * 0x4000 + -0x4000;
if ((char)*(byte *)(lVar4 + 2) < '\0') {
iVar5 = iVar5 + (uint)*(byte *)(lVar4 + 3) * 0x200000 + -0x200000;
if ((char)*(byte *)(lVar4 + 3) < '\0') {
iVar5 = iVar5 + (uint)*(byte *)(lVar4 + 4) * 0x10000000 + -0x10000000;
if ((char)*(byte *)(lVar4 + 4) < '\0') {
lVar4 = lVar4 + 6;
iVar6 = 5;
while (*(char *)(lVar4 + -1) < '\0') {
lVar4 = lVar4 + 1;
iVar6 = iVar6 + -1;
if (iVar6 == 0) {
return 0;
}
}
}
else {
lVar4 = lVar4 + 5;
}
}
else {
lVar4 = lVar4 + 4;
}
}
else {
lVar4 = lVar4 + 3;
}
}
else {
lVar4 = lVar4 + 2;
}
*(long *)this = lVar4;
return iVar5;
}
| |
39,039 | mariadb_server_version_id | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static size_t mariadb_server_version_id(MYSQL *mysql)
{
size_t major, minor, patch;
char *p;
if (!(p = mysql->server_version)) {
return 0;
}
major = strtol(p, &p, 10);
p += 1; /* consume the dot */
minor = strtol(p, &p, 10);
p += 1; /* consume the dot */
patch = strtol(p, &p, 10);
return (major * 10000L + (unsigned long)(minor * 100L + patch));
} | O0 | c | mariadb_server_version_id:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2d0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x40afb
movq $0x0, -0x8(%rbp)
jmp 0x40b6d
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x35830
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x35830
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x35830
movq %rax, -0x28(%rbp)
imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710
imulq $0x64, -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mariadb_server_version_id:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+2D0h]
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_40AFB
mov [rbp+var_8], 0
jmp short loc_40B6D
loc_40AFB:
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_28], rax
imul rax, [rbp+var_18], 2710h
imul rcx, [rbp+var_20], 64h ; 'd'
add rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
loc_40B6D:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long mariadb_server_version_id(long long a1)
{
long long v2; // [rsp+0h] [rbp-30h] BYREF
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
long long v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v2 = *(_QWORD *)(a1 + 720);
if ( !v2 )
return 0LL;
v5 = strtol(v2, &v2, 10LL);
++v2;
v4 = strtol(v2, &v2, 10LL);
++v2;
v3 = strtol(v2, &v2, 10LL);
return v3 + 100 * v4 + 10000 * v5;
}
| mariadb_server_version_id:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2d0]
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x00140afb
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00140b6d
LAB_00140afb:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x00135830
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x00135830
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x00135830
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x18],0x2710
IMUL RCX,qword ptr [RBP + -0x20],0x64
ADD RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00140b6d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long mariadb_server_version_id(long param_1)
{
long lVar1;
char *local_38 [2];
long local_28;
long local_20;
long local_18;
long local_10;
local_38[0] = *(char **)(param_1 + 0x2d0);
if (local_38[0] == (char *)0x0) {
local_10 = 0;
}
else {
local_18 = param_1;
local_20 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
local_28 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
lVar1 = strtol(local_38[0],local_38,10);
local_10 = local_20 * 10000 + local_28 * 100 + lVar1;
}
return local_10;
}
| |
39,040 | LEX::sp_while_loop_finalize(THD*) | eloqsql/sql/sql_lex.cc | bool LEX::sp_while_loop_finalize(THD *thd)
{
sp_label *lab= spcont->last_label(); /* Jumping back */
sp_instr_jump *i= new (thd->mem_root)
sp_instr_jump(sphead->instructions(), spcont, lab->ip);
if (unlikely(i == NULL) ||
unlikely(sphead->add_instr(i)))
return true;
sphead->do_cont_backpatch();
return false;
} | O0 | cpp | LEX::sp_while_loop_finalize(THD*):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x1970(%rax), %rdi
callq 0x5a5740
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x58(%rbp)
movl $0x50, %edi
callq 0x4a34d0
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movb $0x0, -0x29(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x48(%rbp)
je 0x595b88
movq -0x60(%rbp), %rax
movb $0x1, -0x29(%rbp)
movq 0x1960(%rax), %rdi
callq 0x4ea440
movl %eax, -0x64(%rbp)
jmp 0x595b5e
movl -0x64(%rbp), %esi
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rax
movq 0x1970(%rax), %rdx
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
callq 0x4ea980
jmp 0x595b7e
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x595b88
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x595bbb
movq -0x60(%rbp), %rax
movq 0x1960(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x4e1540
cmpl $0x0, %eax
je 0x595be4
movb $0x1, -0x1(%rbp)
jmp 0x595bf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x595bd5
jmp 0x595be2
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x4a3510
jmp 0x595c03
movq -0x60(%rbp), %rax
movq 0x1960(%rax), %rdi
callq 0x4e1aa0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x433ff0
nopl (%rax)
| _ZN3LEX22sp_while_loop_finalizeEP3THD:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
mov rdi, [rax+1970h]; this
call _ZN11sp_pcontext10last_labelEv; sp_pcontext::last_label(void)
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
mov [rbp+var_58], rsi
mov edi, 50h ; 'P'
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_50], rcx
mov [rbp+var_29], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_48], rax
jz short loc_595B88
mov rax, [rbp+var_60]
mov [rbp+var_29], 1
mov rdi, [rax+1960h]; this
call _ZN7sp_head12instructionsEv; sp_head::instructions(void)
mov [rbp+var_64], eax
jmp short $+2
loc_595B5E:
mov esi, [rbp+var_64]; unsigned int
mov rdi, [rbp+var_50]; this
mov rax, [rbp+var_60]
mov rdx, [rax+1970h]; sp_pcontext *
mov rax, [rbp+var_20]
mov ecx, [rax+10h]; unsigned int
call _ZN13sp_instr_jumpC2EjP11sp_pcontextj; sp_instr_jump::sp_instr_jump(uint,sp_pcontext *,uint)
jmp short $+2
loc_595B7E:
mov rax, [rbp+var_50]
mov [rbp+var_48], rax
jmp short $+2
loc_595B88:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jnz short loc_595BBB
mov rax, [rbp+var_60]
mov rdi, [rax+1960h]; this
mov rsi, [rbp+var_28]; sp_instr *
call _ZN7sp_head9add_instrEP8sp_instr; sp_head::add_instr(sp_instr *)
cmp eax, 0
jz short loc_595BE4
loc_595BBB:
mov [rbp+var_1], 1
jmp short loc_595BF8
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
test [rbp+var_29], 1
jnz short loc_595BD5
jmp short loc_595BE2
loc_595BD5:
mov rsi, [rbp+var_58]
mov rdi, [rbp+var_50]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_595BE2:
jmp short loc_595C03
loc_595BE4:
mov rax, [rbp+var_60]
mov rdi, [rax+1960h]; this
call _ZN7sp_head17do_cont_backpatchEv; sp_head::do_cont_backpatch(void)
mov [rbp+var_1], 0
loc_595BF8:
mov al, [rbp+var_1]
and al, 1
add rsp, 70h
pop rbp
retn
loc_595C03:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| char LEX::sp_while_loop_finalize(sp_pcontext **this, THD *a2)
{
unsigned int v3; // [rsp+Ch] [rbp-64h]
sp_instr_jump *v4; // [rsp+20h] [rbp-50h]
sp_instr *v5; // [rsp+28h] [rbp-48h]
long long label; // [rsp+50h] [rbp-20h]
label = sp_pcontext::last_label(this[814]);
v4 = (sp_instr_jump *)Sql_alloc::operator new(80LL, *((_QWORD *)a2 + 5));
v5 = 0LL;
if ( v4 )
{
v3 = sp_head::instructions(this[812]);
sp_instr_jump::sp_instr_jump(v4, v3, this[814], *(_DWORD *)(label + 16));
v5 = v4;
}
if ( !v5 || (unsigned int)sp_head::add_instr(this[812], v5) )
return 1;
sp_head::do_cont_backpatch(this[812]);
return 0;
}
| reinit_ssl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
CMP byte ptr [0x016be488],0x0
JNZ 0x00595b0d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00595cc8
LAB_00595b0d:
MOV dword ptr [RBP + -0x8],0x0
MOV RDI,qword ptr [0x016be4b0]
MOV RSI,qword ptr [0x016be4a0]
MOV RDX,qword ptr [0x016be490]
MOV RCX,qword ptr [0x016be498]
MOV R8,qword ptr [0x016be4a8]
MOV R11,qword ptr [0x016be4b8]
MOV R10,qword ptr [0x016be4c0]
MOV RAX,qword ptr [0x016be4d0]
LEA R9,[RBP + -0x8]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00bbaa10
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00595ba1
MOV EDI,dword ptr [RBP + -0x8]
CALL 0x00bba530
MOV RCX,RAX
MOV EDI,0x451
LEA RSI,[0xe75b63]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x00d12ca0
CALL 0x00534a20
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00595cc8
LAB_00595ba1:
MOV dword ptr [RBP + -0x14],0x0
CALL 0x005936d0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00595bc7
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x005a4120
CWDE
CMP EAX,0x0
JGE 0x00595be7
LAB_00595bc7:
LEA RDI,[0x16bdbb0]
LEA RSI,[0xe75292]
MOV EDX,0x1251
CALL 0x00595ce0
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00595c8c
LAB_00595be7:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x006440f0
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],RDX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00644190
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00595c1b
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00595c38
LAB_00595c1b:
LEA RDI,[0x16bdbb0]
LEA RSI,[0xe75292]
MOV EDX,0x1251
CALL 0x00595ce0
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00595c8a
LAB_00595c38:
LEA RDI,[0x16bdbb0]
LEA RSI,[0xe75292]
MOV EDX,0x1251
CALL 0x00595d40
MOV dword ptr [RBP + -0x44],EAX
LAB_00595c53:
CMP dword ptr [RBP + -0x44],0x0
JZ 0x00595c88
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x005a4140
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x005a4140
LEA RDI,[0x16bdbb0]
LEA RSI,[0xe75292]
MOV EDX,0x1251
CALL 0x00595d40
MOV dword ptr [RBP + -0x44],EAX
JMP 0x00595c53
LAB_00595c88:
JMP 0x00595c8a
LAB_00595c8a:
JMP 0x00595c8c
LAB_00595c8c:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x48],EAX
MOV RDI,qword ptr [0x016be580]
CALL 0x00bbab50
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x016be580],RAX
LEA RDI,[0x16c0ce0]
CALL 0x005a4180
LEA RDI,[0x16bdbb0]
CALL 0x00595da0
MOV dword ptr [RBP + -0x4],0x0
LAB_00595cc8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reinit_ssl() */
int4 reinit_ssl(void)
{
short sVar1;
long lVar2;
int8 uVar3;
THD *this;
function<void()> *this_00;
function<void()> *this_01;
int local_4c;
int4 local_10;
int4 local_c;
if (opt_use_ssl == '\0') {
local_c = 0;
}
else {
local_10 = 0;
lVar2 = new_VioSSLAcceptorFd
(opt_ssl_key,opt_ssl_cert,opt_ssl_ca,opt_ssl_capath,opt_ssl_cipher,&local_10,
opt_ssl_crl,opt_ssl_crlpath,tls_version);
if (lVar2 == 0) {
uVar3 = sslGetErrString(local_10);
my_printf_error(0x451,"Failed to refresh SSL, error: %s",0,uVar3);
ERR_clear_error();
local_c = 1;
}
else {
this = (THD *)_current_thd();
if ((this == (THD *)0x0) || (sVar1 = THD::ThdGroupId(this), sVar1 < 0)) {
inline_mysql_rwlock_wrlock
((st_mysql_rwlock *)LOCK_ssl_refresh,
"/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc",0x1251);
}
else {
this_00 = (function<void()> *)THD::CoroFunctors(this);
this_01 = (function<void()> *)THD::CoroLongResumeFunctor(this);
if ((this_00 == (function<void()> *)0x0) || (this_01 == (function<void()> *)0x0)) {
inline_mysql_rwlock_wrlock
((st_mysql_rwlock *)LOCK_ssl_refresh,
"/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc",0x1251);
}
else {
local_4c = inline_mysql_rwlock_trywrlock
((st_mysql_rwlock *)LOCK_ssl_refresh,
"/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc",0x1251);
while (local_4c != 0) {
std::function<void()>::operator()(this_01);
std::function<void()>::operator()(this_00);
local_4c = inline_mysql_rwlock_trywrlock
((st_mysql_rwlock *)LOCK_ssl_refresh,
"/workspace/llm4binary/github2025/eloqsql/sql/mysqld.cc",0x1251);
}
}
}
free_vio_ssl_acceptor_fd(ssl_acceptor_fd);
ssl_acceptor_fd = lVar2;
SSL_ACCEPTOR_STATS::init((SSL_ACCEPTOR_STATS *)&ssl_acceptor_stats);
inline_mysql_rwlock_unlock((st_mysql_rwlock *)LOCK_ssl_refresh);
local_c = 0;
}
}
return local_c;
}
| |
39,041 | POINTonE2_times_minus_z | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/map_to_g2.c | static void POINTonE2_times_minus_z(POINTonE2 *out, const POINTonE2 *in)
{
POINTonE2_double(out, in); /* 1: 0x2 */
POINTonE2_add_n_dbl(out, in, 2); /* 2..4: 0x3..0xc */
POINTonE2_add_n_dbl(out, in, 3); /* 5..8: 0xd..0x68 */
POINTonE2_add_n_dbl(out, in, 9); /* 9..18: 0x69..0xd200 */
POINTonE2_add_n_dbl(out, in, 32); /* 19..51: ..0xd20100000000 */
POINTonE2_add_n_dbl(out, in, 16); /* 52..68: ..0xd201000000010000 */
} | O1 | c | POINTonE2_times_minus_z:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1db4e
movl $0x2, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27919
movl $0x3, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27919
movl $0x9, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27919
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27919
movl $0x10, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x27919
| POINTonE2_times_minus_z:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
call POINTonE2_double
mov edx, 2
mov rdi, r14
mov rsi, rbx
call POINTonE2_add_n_dbl
mov edx, 3
mov rdi, r14
mov rsi, rbx
call POINTonE2_add_n_dbl
mov edx, 9
mov rdi, r14
mov rsi, rbx
call POINTonE2_add_n_dbl
mov edx, 20h ; ' '
mov rdi, r14
mov rsi, rbx
call POINTonE2_add_n_dbl
mov edx, 10h
mov rdi, r14
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp $+5
| long long POINTonE2_times_minus_z(long long a1, long long a2)
{
POINTonE2_double(a1, a2);
POINTonE2_add_n_dbl(a1, a2, 2LL);
POINTonE2_add_n_dbl(a1, a2, 3LL);
POINTonE2_add_n_dbl(a1, a2, 9LL);
POINTonE2_add_n_dbl(a1, a2, 32LL);
return POINTonE2_add_n_dbl(a1, a2, 16LL);
}
| POINTonE2_times_minus_z:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0011db4e
MOV EDX,0x2
MOV RDI,R14
MOV RSI,RBX
CALL 0x00127919
MOV EDX,0x3
MOV RDI,R14
MOV RSI,RBX
CALL 0x00127919
MOV EDX,0x9
MOV RDI,R14
MOV RSI,RBX
CALL 0x00127919
MOV EDX,0x20
MOV RDI,R14
MOV RSI,RBX
CALL 0x00127919
MOV EDX,0x10
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00127919
|
void POINTonE2_times_minus_z(int8 param_1,int8 param_2)
{
POINTonE2_double();
POINTonE2_add_n_dbl(param_1,param_2,2);
POINTonE2_add_n_dbl(param_1,param_2,3);
POINTonE2_add_n_dbl(param_1,param_2,9);
POINTonE2_add_n_dbl(param_1,param_2,0x20);
POINTonE2_add_n_dbl(param_1,param_2,0x10);
return;
}
| |
39,042 | rak_record_put | fabiosvm[P]rak/src/record.c | RakRecord *rak_record_put(RakRecord *rec, RakString *name, RakValue val, RakError *err)
{
// TODO: Implement this function.
(void) rec;
(void) name;
(void) val;
(void) err;
return NULL;
} | O2 | c | rak_record_put:
xorl %eax, %eax
retq
| rak_record_put:
xor eax, eax
retn
| long long rak_record_put()
{
return 0LL;
}
| rak_record_put:
XOR EAX,EAX
RET
|
int8 rak_record_put(void)
{
return 0;
}
| |
39,043 | google::protobuf::compiler::objectivec::TextFormatDecodeData::DecodeDataForString(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&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc | std::string TextFormatDecodeData::DecodeDataForString(
const std::string& input_for_decode, const std::string& desired_output) {
if (input_for_decode.empty() || desired_output.empty()) {
std::cerr << "error: got empty string for making TextFormat data, input: \""
<< input_for_decode << "\", desired: \"" << desired_output << "\"."
<< std::endl;
std::cerr.flush();
abort();
}
if ((input_for_decode.find('\0') != std::string::npos) ||
(desired_output.find('\0') != std::string::npos)) {
std::cerr << "error: got a null char in a string for making TextFormat data,"
<< " input: \"" << CEscape(input_for_decode) << "\", desired: \""
<< CEscape(desired_output) << "\"." << std::endl;
std::cerr.flush();
abort();
}
DecodeDataBuilder builder;
// Walk the output building it from the input.
int x = 0;
for (int y = 0; y < desired_output.size(); y++) {
const char d = desired_output[y];
if (d == '_') {
builder.AddUnderscore();
continue;
}
if (x >= input_for_decode.size()) {
// Out of input, no way to encode it, just return a full decode.
return DirectDecodeString(desired_output);
}
if (builder.AddCharacter(d, input_for_decode[x])) {
++x; // Consumed one input
} else {
// Couldn't transform for the next character, just return a full decode.
return DirectDecodeString(desired_output);
}
}
if (x != input_for_decode.size()) {
// Extra input (suffix from name sanitizing?), just return a full decode.
return DirectDecodeString(desired_output);
}
// Add the end marker.
return builder.Finish() + (char)'\0';
} | O0 | cpp | google::protobuf::compiler::objectivec::TextFormatDecodeData::DecodeDataForString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x58(%rsp)
movq %rdi, %rax
movq %rax, 0x60(%rsp)
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq 0x118(%rsp), %rdi
callq 0x212d0
testb $0x1, %al
jne 0x8a480
movq 0x110(%rsp), %rdi
callq 0x212d0
testb $0x1, %al
jne 0x8a480
jmp 0x8a4f1
movq 0x467b59(%rip), %rdi # 0x4f1fe0
leaq 0x32672f(%rip), %rsi # 0x3b0bbd
callq 0x21660
movq %rax, %rdi
movq 0x118(%rsp), %rsi
callq 0x21330
movq %rax, %rdi
leaq 0x326702(%rip), %rsi # 0x3b0baf
callq 0x21660
movq %rax, %rdi
movq 0x110(%rsp), %rsi
callq 0x21330
movq %rax, %rdi
leaq 0x376939(%rip), %rsi # 0x400e05
callq 0x21660
movq %rax, %rdi
movq 0x467af5(%rip), %rsi # 0x4f1fd0
callq 0x21ab0
movq 0x467af9(%rip), %rdi # 0x4f1fe0
callq 0x21580
callq 0x21770
movq 0x118(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x21b70
cmpq $-0x1, %rax
jne 0x8a527
movq 0x110(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x21b70
cmpq $-0x1, %rax
je 0x8a665
movq 0x467ab2(%rip), %rdi # 0x4f1fe0
leaq 0x3266c5(%rip), %rsi # 0x3b0bfa
callq 0x21660
movq %rax, %rdi
leaq 0x326661(%rip), %rsi # 0x3b0ba5
callq 0x21660
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x220fd0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x21330
movq %rax, 0x50(%rsp)
jmp 0x8a57e
movq 0x50(%rsp), %rdi
leaq 0x326625(%rip), %rsi # 0x3b0baf
callq 0x21660
movq %rax, 0x38(%rsp)
jmp 0x8a596
movq 0x110(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
callq 0x220fd0
jmp 0x8a5ad
movq 0x38(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x21330
movq %rax, 0x30(%rsp)
jmp 0x8a5c6
movq 0x30(%rsp), %rdi
leaq 0x376833(%rip), %rsi # 0x400e05
callq 0x21660
movq %rax, 0x28(%rsp)
jmp 0x8a5de
movq 0x28(%rsp), %rdi
movq 0x4679e6(%rip), %rsi # 0x4f1fd0
callq 0x21ab0
jmp 0x8a5f1
leaq 0xc0(%rsp), %rdi
callq 0x21cc8
leaq 0xf0(%rsp), %rdi
callq 0x21cc8
movq 0x4679ce(%rip), %rdi # 0x4f1fe0
callq 0x21580
callq 0x21770
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x8a653
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x21cc8
leaq 0xf0(%rsp), %rdi
callq 0x21cc8
jmp 0x8a8b7
leaq 0x98(%rsp), %rdi
callq 0x8aad0
movl $0x0, 0x94(%rsp)
movl $0x0, 0x90(%rsp)
movslq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rdi
callq 0x21300
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x8a7ea
movq 0x110(%rsp), %rdi
movslq 0x90(%rsp), %rsi
callq 0x21ba0
movb (%rax), %al
movb %al, 0x8f(%rsp)
movsbl 0x8f(%rsp), %eax
cmpl $0x5f, %eax
jne 0x8a70b
leaq 0x98(%rsp), %rdi
callq 0x8ab30
jmp 0x8a6ed
jmp 0x8a7d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x8a8aa
movslq 0x94(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x118(%rsp), %rdi
callq 0x21300
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jb 0x8a756
movq 0x58(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x8ab60
jmp 0x8a746
movl $0x1, 0x88(%rsp)
jmp 0x8a890
movsbl 0x8f(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x118(%rsp), %rdi
movslq 0x94(%rsp), %rsi
callq 0x21ba0
movl 0x10(%rsp), %esi
movsbl (%rax), %edx
leaq 0x98(%rsp), %rdi
callq 0x8ac00
movb %al, 0x17(%rsp)
jmp 0x8a791
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x8a79b
jmp 0x8a7ae
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x8a7d2
movq 0x58(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x8ab60
jmp 0x8a7c2
movl $0x1, 0x88(%rsp)
jmp 0x8a890
jmp 0x8a7d4
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x90(%rsp)
jmp 0x8a688
movslq 0x94(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
callq 0x21300
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
je 0x8a832
movq 0x58(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x8ab60
jmp 0x8a825
movl $0x1, 0x88(%rsp)
jmp 0x8a890
leaq 0x68(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x8ad40
jmp 0x8a846
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rsi
xorl %edx, %edx
callq 0x8dc70
jmp 0x8a859
leaq 0x68(%rsp), %rdi
callq 0x21cc8
movl $0x1, 0x88(%rsp)
jmp 0x8a890
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x21cc8
jmp 0x8a8aa
leaq 0x98(%rsp), %rdi
callq 0x8ad90
movq 0x60(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
leaq 0x98(%rsp), %rdi
callq 0x8ad90
movq 0xe8(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler10objectivec20TextFormatDecodeData19DecodeDataForStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_:
sub rsp, 128h
mov qword ptr [rsp+128h+var_D0], rdi
mov rax, rdi
mov [rsp+128h+var_C8], rax
mov [rsp+128h+var_8], rdi
mov [rsp+128h+var_10], rsi
mov qword ptr [rsp+128h+var_18], rdx
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8A480
mov rdi, qword ptr [rsp+128h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8A480
jmp short loc_8A4F1
loc_8A480:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorGotEmptyS; "error: got empty string for making Text"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, [rsp+128h+var_10]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
lea rsi, aDesired; "\", desired: \""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, qword ptr [rsp+128h+var_18]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
lea rsi, aWhichIsNotDefi+76h; "\"."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
mov rdi, cs:_ZSt4cerr_ptr; this
call __ZNSo5flushEv; std::ostream::flush(void)
call _abort
loc_8A4F1:
mov rdi, [rsp+128h+var_10]
xor esi, esi
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_8A527
mov rdi, qword ptr [rsp+128h+var_18]
xor esi, esi
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_8A665
loc_8A527:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorGotANullC; "error: got a null char in a string for "...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
lea rsi, aMakingTextform+19h; " input: \""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+128h+var_E8], rax
mov rsi, [rsp+128h+var_10]
lea rdi, [rsp+128h+var_38]
mov [rsp+128h+var_E0], rdi
call _ZN6google8protobuf7CEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::CEscape(std::string const&)
mov rdi, [rsp+128h+var_E8]
mov rsi, [rsp+128h+var_E0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+128h+var_D8], rax
jmp short $+2
loc_8A57E:
mov rdi, [rsp+128h+var_D8]
lea rsi, aDesired; "\", desired: \""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+128h+var_F0], rax
jmp short $+2
loc_8A596:
mov rsi, qword ptr [rsp+128h+var_18]
lea rdi, [rsp+128h+var_68]
call _ZN6google8protobuf7CEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::CEscape(std::string const&)
jmp short $+2
loc_8A5AD:
mov rdi, [rsp+128h+var_F0]
lea rsi, [rsp+128h+var_68]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+128h+var_F8], rax
jmp short $+2
loc_8A5C6:
mov rdi, [rsp+128h+var_F8]
lea rsi, aWhichIsNotDefi+76h; "\"."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+128h+var_100], rax
jmp short $+2
loc_8A5DE:
mov rdi, [rsp+128h+var_100]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_8A5F1:
lea rdi, [rsp+128h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, cs:_ZSt4cerr_ptr; this
call __ZNSo5flushEv; std::ostream::flush(void)
call _abort
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_40], rcx
mov [rsp+128h+var_44], eax
jmp short loc_8A653
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_40], rcx
mov [rsp+128h+var_44], eax
lea rdi, [rsp+128h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_8A653:
lea rdi, [rsp+128h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_8A8B7
loc_8A665:
lea rdi, [rsp+128h+var_90]; this
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilderC2Ev; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::DecodeDataBuilder(void)
mov [rsp+128h+var_94], 0
mov [rsp+128h+var_98], 0
loc_8A688:
movsxd rax, [rsp+128h+var_98]
mov [rsp+128h+var_108], rax
mov rdi, qword ptr [rsp+128h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rsp+128h+var_108]
cmp rax, rcx
jnb loc_8A7EA
mov rdi, qword ptr [rsp+128h+var_18]
movsxd rsi, [rsp+128h+var_98]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+128h+var_99], al
movsx eax, [rsp+128h+var_99]
cmp eax, 5Fh ; '_'
jnz short loc_8A70B
lea rdi, [rsp+128h+var_90]; this
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilder13AddUnderscoreEv; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::AddUnderscore(void)
jmp short $+2
loc_8A6ED:
jmp loc_8A7D4
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_40], rcx
mov [rsp+128h+var_44], eax
jmp loc_8A8AA
loc_8A70B:
movsxd rax, [rsp+128h+var_94]
mov [rsp+128h+var_110], rax
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax; int
mov rax, [rsp+128h+var_110]
cmp rax, rcx
jb short loc_8A756
mov rdi, qword ptr [rsp+128h+var_D0]; int
mov rsi, qword ptr [rsp+128h+var_18]; int
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_118DirectDecodeStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::objectivec::`anonymous namespace'::DirectDecodeString(std::string const&)
jmp short $+2
loc_8A746:
mov [rsp+128h+var_A0], 1
jmp loc_8A890
loc_8A756:
movsx eax, [rsp+128h+var_99]
mov dword ptr [rsp+128h+var_118], eax; __int64
mov rdi, [rsp+128h+var_10]
movsxd rsi, [rsp+128h+var_94]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov esi, dword ptr [rsp+128h+var_118]; char
movsx edx, byte ptr [rax]; char
lea rdi, [rsp+128h+var_90]; this
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilder12AddCharacterEcc; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::AddCharacter(char,char)
mov [rsp+128h+var_118+7], al
jmp short $+2
loc_8A791:
mov al, [rsp+128h+var_118+7]
test al, 1
jnz short loc_8A79B
jmp short loc_8A7AE
loc_8A79B:
mov eax, [rsp+128h+var_94]
add eax, 1
mov [rsp+128h+var_94], eax
jmp short loc_8A7D2
loc_8A7AE:
mov rdi, qword ptr [rsp+128h+var_D0]; int
mov rsi, qword ptr [rsp+128h+var_18]; int
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_118DirectDecodeStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::objectivec::`anonymous namespace'::DirectDecodeString(std::string const&)
jmp short $+2
loc_8A7C2:
mov [rsp+128h+var_A0], 1
jmp loc_8A890
loc_8A7D2:
jmp short $+2
loc_8A7D4:
mov eax, [rsp+128h+var_98]
add eax, 1
mov [rsp+128h+var_98], eax
jmp loc_8A688
loc_8A7EA:
movsxd rax, [rsp+128h+var_94]
mov qword ptr [rsp+128h+var_120], rax; int
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax; int
mov rax, qword ptr [rsp+128h+var_120]
cmp rax, rcx
jz short loc_8A832
mov rdi, qword ptr [rsp+128h+var_D0]; int
mov rsi, qword ptr [rsp+128h+var_18]; int
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_118DirectDecodeStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::objectivec::`anonymous namespace'::DirectDecodeString(std::string const&)
jmp short $+2
loc_8A825:
mov [rsp+128h+var_A0], 1
jmp short loc_8A890
loc_8A832:
lea rdi, [rsp+128h+var_C0]
lea rsi, [rsp+128h+var_90]
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilder6FinishB5cxx11Ev; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::Finish(void)
jmp short $+2
loc_8A846:
mov rdi, qword ptr [rsp+128h+var_D0]
lea rsi, [rsp+128h+var_C0]
xor edx, edx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_; std::operator+<char>(std::string&&,char)
jmp short $+2
loc_8A859:
lea rdi, [rsp+128h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov [rsp+128h+var_A0], 1
jmp short loc_8A890
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_40], rcx
mov [rsp+128h+var_44], eax
lea rdi, [rsp+128h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_8A8AA
loc_8A890:
lea rdi, [rsp+128h+var_90]; this
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilderD2Ev; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::~DecodeDataBuilder()
mov rax, [rsp+128h+var_C8]
add rsp, 128h
retn
loc_8A8AA:
lea rdi, [rsp+128h+var_90]; this
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_117DecodeDataBuilderD2Ev; google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::~DecodeDataBuilder()
loc_8A8B7:
mov rdi, [rsp+128h+var_40]
call __Unwind_Resume
| long long google::protobuf::compiler::objectivec::TextFormatDecodeData::DecodeDataForString(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
int v17; // edx
unsigned long long v18; // rcx
int v19; // r8d
int v20; // r9d
char *v21; // rax
int v22; // edx
long long v23; // rcx
int v24; // r8d
int v25; // r9d
void *v27; // [rsp+0h] [rbp-128h]
int v28; // [rsp+8h] [rbp-120h]
long long v29; // [rsp+10h] [rbp-118h]
long long v30; // [rsp+28h] [rbp-100h]
long long v31; // [rsp+30h] [rbp-F8h]
long long v32; // [rsp+38h] [rbp-F0h]
long long v33; // [rsp+40h] [rbp-E8h]
long long v34; // [rsp+50h] [rbp-D8h]
_BYTE v35[32]; // [rsp+68h] [rbp-C0h] BYREF
int v36; // [rsp+88h] [rbp-A0h]
char v37; // [rsp+8Fh] [rbp-99h]
int i; // [rsp+90h] [rbp-98h]
int v39; // [rsp+94h] [rbp-94h]
_BYTE v40[40]; // [rsp+98h] [rbp-90h] BYREF
_BYTE v41[36]; // [rsp+C0h] [rbp-68h] BYREF
_BYTE v42[32]; // [rsp+F0h] [rbp-38h] BYREF
int v43[2]; // [rsp+110h] [rbp-18h]
long long v44; // [rsp+118h] [rbp-10h]
long long v45; // [rsp+120h] [rbp-8h]
v45 = a1;
v44 = a2;
*(_QWORD *)v43 = a3;
if ( (std::string::empty(a2) & 1) != 0 || (std::string::empty(*(_QWORD *)v43) & 1) != 0 )
{
v3 = std::operator<<<std::char_traits<char>>(
&std::cerr,
"error: got empty string for making TextFormat data, input: \"");
v4 = std::operator<<<char>(v3, v44);
v5 = std::operator<<<std::char_traits<char>>(v4, "\", desired: \"");
v6 = std::operator<<<char>(v5, *(_QWORD *)v43);
v7 = std::operator<<<std::char_traits<char>>(v6, "\".");
std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>);
std::ostream::flush((std::ostream *)&std::cerr);
abort();
}
if ( std::string::find(v44, 0LL, 0LL) != -1 || std::string::find(*(_QWORD *)v43, 0LL, 0LL) != -1 )
{
v8 = std::operator<<<std::char_traits<char>>(
&std::cerr,
"error: got a null char in a string for making TextFormat data,");
v33 = std::operator<<<std::char_traits<char>>(v8, " input: \"");
google::protobuf::CEscape((unsigned int)v42, v44, v9, v10, v11, v12);
v34 = std::operator<<<char>(v33, v42);
v32 = std::operator<<<std::char_traits<char>>(v34, "\", desired: \"");
google::protobuf::CEscape((unsigned int)v41, v43[0], v13, v14, v15, v16);
v31 = std::operator<<<char>(v32, v41);
v30 = std::operator<<<std::char_traits<char>>(v31, "\".");
std::ostream::operator<<(v30, &std::endl<char,std::char_traits<char>>);
std::string::~string(v41);
std::string::~string(v42);
std::ostream::flush((std::ostream *)&std::cerr);
abort();
}
google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::DecodeDataBuilder((google::protobuf::compiler::objectivec::_anonymous_namespace_::DecodeDataBuilder *)v40);
v39 = 0;
for ( i = 0; i < (unsigned long long)std::string::size(*(_QWORD *)v43); ++i )
{
v37 = *(_BYTE *)std::string::operator[](*(_QWORD *)v43, i);
if ( v37 == 95 )
{
google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::AddUnderscore((google::protobuf::compiler::objectivec::_anonymous_namespace_::DecodeDataBuilder *)v40);
}
else
{
v18 = std::string::size(v44);
if ( v39 >= v18
|| (LODWORD(v29) = v37,
v21 = (char *)std::string::operator[](v44, v39),
HIBYTE(v29) = google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::AddCharacter(
(google::protobuf::compiler::objectivec::_anonymous_namespace_::DecodeDataBuilder *)v40,
v37,
*v21),
(v29 & 0x100000000000000LL) == 0) )
{
google::protobuf::compiler::objectivec::`anonymous namespace'::DirectDecodeString(
a1,
v43[0],
v17,
v18,
v19,
v20,
v27,
v28,
v29);
v36 = 1;
goto LABEL_21;
}
++v39;
}
}
v23 = std::string::size(v44);
if ( v39 == v23 )
{
google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::Finish[abi:cxx11](v35, v40);
std::operator+<char>(a1, v35, 0LL);
std::string::~string(v35);
}
else
{
google::protobuf::compiler::objectivec::`anonymous namespace'::DirectDecodeString(
a1,
v43[0],
v22,
v23,
v24,
v25,
v27,
v39,
v29);
}
v36 = 1;
LABEL_21:
google::protobuf::compiler::objectivec::`anonymous namespace'::DecodeDataBuilder::~DecodeDataBuilder((google::protobuf::compiler::objectivec::_anonymous_namespace_::DecodeDataBuilder *)v40);
return a1;
}
| DecodeDataForString:
SUB RSP,0x128
MOV qword ptr [RSP + 0x58],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x120],RDI
MOV qword ptr [RSP + 0x118],RSI
MOV qword ptr [RSP + 0x110],RDX
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x001212d0
TEST AL,0x1
JNZ 0x0018a480
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x001212d0
TEST AL,0x1
JNZ 0x0018a480
JMP 0x0018a4f1
LAB_0018a480:
MOV RDI,qword ptr [0x005f1fe0]
LEA RSI,[0x4b0bbd]
CALL 0x00121660
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x00121330
MOV RDI,RAX
LEA RSI,[0x4b0baf]
CALL 0x00121660
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x110]
CALL 0x00121330
MOV RDI,RAX
LEA RSI,[0x500e05]
CALL 0x00121660
MOV RDI,RAX
MOV RSI,qword ptr [0x005f1fd0]
CALL 0x00121ab0
MOV RDI,qword ptr [0x005f1fe0]
CALL 0x00121580
CALL 0x00121770
LAB_0018a4f1:
MOV RDI,qword ptr [RSP + 0x118]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00121b70
CMP RAX,-0x1
JNZ 0x0018a527
MOV RDI,qword ptr [RSP + 0x110]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00121b70
CMP RAX,-0x1
JZ 0x0018a665
LAB_0018a527:
MOV RDI,qword ptr [0x005f1fe0]
LEA RSI,[0x4b0bfa]
CALL 0x00121660
MOV RDI,RAX
LEA RSI,[0x4b0ba5]
CALL 0x00121660
MOV qword ptr [RSP + 0x40],RAX
MOV RSI,qword ptr [RSP + 0x118]
LEA RDI,[RSP + 0xf0]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x00320fd0
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
LAB_0018a572:
CALL 0x00121330
MOV qword ptr [RSP + 0x50],RAX
JMP 0x0018a57e
LAB_0018a57e:
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x4b0baf]
CALL 0x00121660
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0018a596
LAB_0018a596:
MOV RSI,qword ptr [RSP + 0x110]
LEA RDI,[RSP + 0xc0]
CALL 0x00320fd0
JMP 0x0018a5ad
LAB_0018a5ad:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0xc0]
CALL 0x00121330
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0018a5c6
LAB_0018a5c6:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x500e05]
CALL 0x00121660
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0018a5de
LAB_0018a5de:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [0x005f1fd0]
CALL 0x00121ab0
LAB_0018a5ef:
JMP 0x0018a5f1
LAB_0018a5f1:
LEA RDI,[RSP + 0xc0]
CALL 0x00121cc8
LEA RDI,[RSP + 0xf0]
CALL 0x00121cc8
MOV RDI,qword ptr [0x005f1fe0]
CALL 0x00121580
CALL 0x00121770
LAB_0018a665:
LEA RDI,[RSP + 0x98]
CALL 0x0018aad0
MOV dword ptr [RSP + 0x94],0x0
MOV dword ptr [RSP + 0x90],0x0
LAB_0018a688:
MOVSXD RAX,dword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x00121300
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,RCX
JNC 0x0018a7ea
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0x90]
CALL 0x00121ba0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x8f],AL
MOVSX EAX,byte ptr [RSP + 0x8f]
CMP EAX,0x5f
JNZ 0x0018a70b
LAB_0018a6de:
LEA RDI,[RSP + 0x98]
CALL 0x0018ab30
JMP 0x0018a6ed
LAB_0018a6ed:
JMP 0x0018a7d4
LAB_0018a70b:
MOVSXD RAX,dword ptr [RSP + 0x94]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x00121300
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP RAX,RCX
JC 0x0018a756
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x110]
CALL 0x0018ab60
JMP 0x0018a746
LAB_0018a746:
MOV dword ptr [RSP + 0x88],0x1
JMP 0x0018a890
LAB_0018a756:
MOVSX EAX,byte ptr [RSP + 0x8f]
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [RSP + 0x118]
MOVSXD RSI,dword ptr [RSP + 0x94]
CALL 0x00121ba0
MOV ESI,dword ptr [RSP + 0x10]
MOVSX EDX,byte ptr [RAX]
LEA RDI,[RSP + 0x98]
CALL 0x0018ac00
MOV byte ptr [RSP + 0x17],AL
JMP 0x0018a791
LAB_0018a791:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x0018a79b
JMP 0x0018a7ae
LAB_0018a79b:
MOV EAX,dword ptr [RSP + 0x94]
ADD EAX,0x1
MOV dword ptr [RSP + 0x94],EAX
JMP 0x0018a7d2
LAB_0018a7ae:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x110]
CALL 0x0018ab60
JMP 0x0018a7c2
LAB_0018a7c2:
MOV dword ptr [RSP + 0x88],0x1
JMP 0x0018a890
LAB_0018a7d2:
JMP 0x0018a7d4
LAB_0018a7d4:
MOV EAX,dword ptr [RSP + 0x90]
ADD EAX,0x1
MOV dword ptr [RSP + 0x90],EAX
JMP 0x0018a688
LAB_0018a7ea:
MOVSXD RAX,dword ptr [RSP + 0x94]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x00121300
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JZ 0x0018a832
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x110]
CALL 0x0018ab60
JMP 0x0018a825
LAB_0018a825:
MOV dword ptr [RSP + 0x88],0x1
JMP 0x0018a890
LAB_0018a832:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x98]
CALL 0x0018ad40
JMP 0x0018a846
LAB_0018a846:
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x68]
XOR EDX,EDX
CALL 0x0018dc70
LAB_0018a857:
JMP 0x0018a859
LAB_0018a859:
LEA RDI,[RSP + 0x68]
CALL 0x00121cc8
MOV dword ptr [RSP + 0x88],0x1
JMP 0x0018a890
LAB_0018a890:
LEA RDI,[RSP + 0x98]
CALL 0x0018ad90
MOV RAX,qword ptr [RSP + 0x60]
ADD RSP,0x128
RET
|
/* google::protobuf::compiler::objectivec::TextFormatDecodeData::DecodeDataForString(std::__cxx11::string
const&, std::__cxx11::string const&) */
TextFormatDecodeData * __thiscall
google::protobuf::compiler::objectivec::TextFormatDecodeData::DecodeDataForString
(TextFormatDecodeData *this,string *param_1,string *param_2)
{
char cVar1;
byte bVar2;
ulong uVar3;
long lVar4;
ostream *poVar5;
ulong uVar6;
char *pcVar7;
long lVar8;
string local_c0 [32];
int4 local_a0;
char local_99;
int local_98;
int local_94;
DecodeDataBuilder local_90 [40];
protobuf local_68 [48];
protobuf local_38 [32];
string *local_18;
string *local_10;
TextFormatDecodeData *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar3 = std::__cxx11::string::empty();
if ((uVar3 & 1) == 0) {
uVar3 = std::__cxx11::string::empty();
if ((uVar3 & 1) == 0) {
lVar4 = std::__cxx11::string::find((char)local_10,0);
if (lVar4 == -1) {
lVar4 = std::__cxx11::string::find((char)local_18,0);
if (lVar4 == -1) {
(anonymous_namespace)::DecodeDataBuilder::DecodeDataBuilder(local_90);
local_94 = 0;
local_98 = 0;
do {
uVar3 = (ulong)local_98;
uVar6 = std::__cxx11::string::size();
if (uVar6 <= uVar3) {
lVar4 = (long)local_94;
lVar8 = std::__cxx11::string::size();
if (lVar4 == lVar8) {
(anonymous_namespace)::DecodeDataBuilder::Finish_abi_cxx11_();
/* try { // try from 0018a846 to 0018a856 has its CatchHandler @ 0018a870 */
std::operator+((string *)this,(char)local_c0);
std::__cxx11::string::~string(local_c0);
}
else {
(anonymous_namespace)::DirectDecodeString((_anonymous_namespace_ *)this,local_18);
}
LAB_0018a890:
local_a0 = 1;
(anonymous_namespace)::DecodeDataBuilder::~DecodeDataBuilder(local_90);
return this;
}
pcVar7 = (char *)std::__cxx11::string::operator[]((ulong)local_18);
local_99 = *pcVar7;
if (local_99 == '_') {
/* try { // try from 0018a6de to 0018a843 has its CatchHandler @ 0018a6f2 */
(anonymous_namespace)::DecodeDataBuilder::AddUnderscore(local_90);
}
else {
uVar3 = (ulong)local_94;
uVar6 = std::__cxx11::string::size();
cVar1 = local_99;
if (uVar6 <= uVar3) {
(anonymous_namespace)::DirectDecodeString((_anonymous_namespace_ *)this,local_18);
goto LAB_0018a890;
}
pcVar7 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
bVar2 = (anonymous_namespace)::DecodeDataBuilder::AddCharacter(local_90,cVar1,*pcVar7)
;
if ((bVar2 & 1) == 0) {
(anonymous_namespace)::DirectDecodeString((_anonymous_namespace_ *)this,local_18);
goto LAB_0018a890;
}
local_94 = local_94 + 1;
}
local_98 = local_98 + 1;
} while( true );
}
}
poVar5 = std::operator<<((ostream *)PTR_cerr_005f1fe0,
"error: got a null char in a string for making TextFormat data,");
poVar5 = std::operator<<(poVar5," input: \"");
CEscape(local_38,local_10);
/* try { // try from 0018a572 to 0018a5aa has its CatchHandler @ 0018a61c */
poVar5 = std::operator<<(poVar5,(string *)local_38);
poVar5 = std::operator<<(poVar5,"\", desired: \"");
CEscape(local_68,local_18);
/* try { // try from 0018a5ad to 0018a5ee has its CatchHandler @ 0018a632 */
poVar5 = std::operator<<(poVar5,(string *)local_68);
poVar5 = std::operator<<(poVar5,"\".");
std::ostream::operator<<
(poVar5,(_func_ostream_ptr_ostream_ptr *)
PTR_endl<char,std_char_traits<char>>_005f1fd0);
std::__cxx11::string::~string((string *)local_68);
std::__cxx11::string::~string((string *)local_38);
std::ostream::flush();
/* WARNING: Subroutine does not return */
abort();
}
}
poVar5 = std::operator<<((ostream *)PTR_cerr_005f1fe0,
"error: got empty string for making TextFormat data, input: \"");
poVar5 = std::operator<<(poVar5,local_10);
poVar5 = std::operator<<(poVar5,"\", desired: \"");
poVar5 = std::operator<<(poVar5,local_18);
poVar5 = std::operator<<(poVar5,"\".");
std::ostream::operator<<
(poVar5,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_005f1fd0);
std::ostream::flush();
/* WARNING: Subroutine does not return */
abort();
}
| |
39,044 | PolyLine<float>::clearance() const | zkingston[P]unknot/src/knot.hh | [[nodiscard]] auto clearance() const -> RealT
{
RealT clearance = std::numeric_limits<RealT>::max();
for (auto i = 0U; i < points.size(); ++i)
{
const auto &s1 = segment(i);
for (auto j = 2U; j < points.size() - 1; ++j)
{
const auto &s2 = segment(i + j);
clearance =
std::min(clearance, segment_distance<RealT>(s1.first, s1.second, s2.first, s2.second));
}
}
return clearance;
} | O0 | cpp | PolyLine<float>::clearance() const:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x991d0
vmovss %xmm0, 0x5c(%rsp)
movl $0x0, 0x58(%rsp)
movq 0x10(%rsp), %rdi
movl 0x58(%rsp), %eax
movq %rax, 0x8(%rsp)
callq 0x88bb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x956fe
movq 0x10(%rsp), %rdi
movl 0x58(%rsp), %eax
movl %eax, %esi
callq 0x8db70
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x2, 0x3c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x3c(%rsp), %eax
movq %rax, (%rsp)
callq 0x88bb0
movq %rax, %rcx
movq (%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x956ec
movq 0x10(%rsp), %rdi
movl 0x58(%rsp), %eax
addl 0x3c(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x8db70
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x30(%rsp), %rax
movq (%rax), %rdx
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rcx
callq 0x15b40
vmovss %xmm0, 0x1c(%rsp)
leaq 0x5c(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x991e0
vmovss (%rax), %xmm0
vmovss %xmm0, 0x5c(%rsp)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x95646
jmp 0x956ee
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x955f6
vmovss 0x5c(%rsp), %xmm0
addq $0x68, %rsp
retq
nopl (%rax)
| _ZNK8PolyLineIfE9clearanceEv:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_58], rax
call _ZNSt14numeric_limitsIfE3maxEv; std::numeric_limits<float>::max(void)
vmovss [rsp+68h+var_C], xmm0
mov [rsp+68h+var_10], 0
loc_955F6:
mov rdi, [rsp+68h+var_58]
mov eax, [rsp+68h+var_10]
mov [rsp+68h+var_60], rax
call _ZNKSt6vectorIN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEESaIS2_EE4sizeEv; std::vector<Eigen::Matrix<float,3,1,0,3,1>>::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_60]
cmp rax, rcx
jnb loc_956FE
mov rdi, [rsp+68h+var_58]
mov eax, [rsp+68h+var_10]
mov esi, eax
call _ZNK8PolyLineIfE7segmentEm; PolyLine<float>::segment(ulong)
mov [rsp+68h+var_28], rax
mov [rsp+68h+var_20], rdx
lea rax, [rsp+68h+var_28]
mov [rsp+68h+var_18], rax
mov [rsp+68h+var_2C], 2
loc_95646:
mov rdi, [rsp+68h+var_58]
mov eax, [rsp+68h+var_2C]
mov [rsp+68h+var_68], rax
call _ZNKSt6vectorIN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEESaIS2_EE4sizeEv; std::vector<Eigen::Matrix<float,3,1,0,3,1>>::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_68]
sub rcx, 1
cmp rax, rcx
jnb loc_956EC
mov rdi, [rsp+68h+var_58]
mov eax, [rsp+68h+var_10]
add eax, [rsp+68h+var_2C]
mov eax, eax
mov esi, eax
call _ZNK8PolyLineIfE7segmentEm; PolyLine<float>::segment(ulong)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_40], rdx
lea rax, [rsp+68h+var_48]
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_18]
mov rdi, [rax]
mov rax, [rsp+68h+var_18]
mov rsi, [rax+8]
mov rax, [rsp+68h+var_38]
mov rdx, [rax]
mov rax, [rsp+68h+var_38]
mov rcx, [rax+8]
call _ZL16segment_distanceIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEET_RKT0_S6_S6_S6_; segment_distance<float,Eigen::Matrix<float,3,1,0,3,1>>(Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&)
vmovss [rsp+68h+var_4C], xmm0
lea rdi, [rsp+68h+var_C]
lea rsi, [rsp+68h+var_4C]
call _ZSt3minIfERKT_S2_S2_; std::min<float>(float const&,float const&)
vmovss xmm0, dword ptr [rax]
vmovss [rsp+68h+var_C], xmm0
mov eax, [rsp+68h+var_2C]
add eax, 1
mov [rsp+68h+var_2C], eax
jmp loc_95646
loc_956EC:
jmp short $+2
loc_956EE:
mov eax, [rsp+68h+var_10]
add eax, 1
mov [rsp+68h+var_10], eax
jmp loc_955F6
loc_956FE:
vmovss xmm0, [rsp+68h+var_C]
add rsp, 68h
retn
| __int128 __usercall PolyLine<float>::clearance@<xmm0>(_QWORD *a1@<rdi>, __m128 _XMM0@<xmm0>)
{
long long v2; // rdx
long long v3; // rdx
__int128 result; // xmm0
unsigned long long v8; // [rsp+0h] [rbp-68h]
unsigned long long v9; // [rsp+8h] [rbp-60h]
int v10; // [rsp+1Ch] [rbp-4Ch] BYREF
long long v11[3]; // [rsp+20h] [rbp-48h] BYREF
unsigned int j; // [rsp+3Ch] [rbp-2Ch]
_QWORD v13[2]; // [rsp+40h] [rbp-28h] BYREF
long long *v14; // [rsp+50h] [rbp-18h]
unsigned int i; // [rsp+58h] [rbp-10h]
int v16; // [rsp+5Ch] [rbp-Ch] BYREF
_QWORD *v17; // [rsp+60h] [rbp-8h]
v17 = a1;
*(double *)_XMM0.m128_u64 = std::numeric_limits<float>::max();
__asm { vmovss [rsp+68h+var_C], xmm0 }
for ( i = 0; ; ++i )
{
v9 = i;
if ( v9 >= std::vector<Eigen::Matrix<float,3,1,0,3,1>>::size(a1) )
break;
v13[0] = PolyLine<float>::segment(a1, i);
v13[1] = v2;
v14 = v13;
for ( j = 2; ; ++j )
{
v8 = j;
if ( v8 >= std::vector<Eigen::Matrix<float,3,1,0,3,1>>::size(a1) - 1 )
break;
v11[0] = PolyLine<float>::segment(a1, j + i);
v11[1] = v3;
v11[2] = (long long)v11;
_XMM0 = segment_distance<float,Eigen::Matrix<float,3,1,0,3,1>>(*v14, v14[1], v11[0], v3);
__asm { vmovss [rsp+68h+var_4C], xmm0 }
_RAX = std::min<float>(&v16, &v10);
__asm
{
vmovss xmm0, dword ptr [rax]
vmovss [rsp+68h+var_C], xmm0
}
}
}
__asm { vmovss xmm0, [rsp+68h+var_C] }
return result;
}
| clearance:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001991d0
VMOVSS dword ptr [RSP + 0x5c],XMM0
MOV dword ptr [RSP + 0x58],0x0
LAB_001955f6:
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00188bb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JNC 0x001956fe
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x58]
MOV ESI,EAX
CALL 0x0018db70
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x3c],0x2
LAB_00195646:
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP],RAX
CALL 0x00188bb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x001956ec
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x58]
ADD EAX,dword ptr [RSP + 0x3c]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0018db70
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x8]
CALL 0x00115b40
VMOVSS dword ptr [RSP + 0x1c],XMM0
LEA RDI,[RSP + 0x5c]
LEA RSI,[RSP + 0x1c]
CALL 0x001991e0
VMOVSS XMM0,dword ptr [RAX]
VMOVSS dword ptr [RSP + 0x5c],XMM0
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x00195646
LAB_001956ec:
JMP 0x001956ee
LAB_001956ee:
MOV EAX,dword ptr [RSP + 0x58]
ADD EAX,0x1
MOV dword ptr [RSP + 0x58],EAX
JMP 0x001955f6
LAB_001956fe:
VMOVSS XMM0,dword ptr [RSP + 0x5c]
ADD RSP,0x68
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* PolyLine<float>::clearance() const */
float __thiscall PolyLine<float>::clearance(PolyLine<float> *this)
{
ulong uVar1;
ulong uVar2;
long lVar3;
float *pfVar4;
int1 auVar5 [16];
float local_4c;
int1 local_48 [16];
int1 *local_38;
uint local_2c;
int1 local_28 [16];
int8 *local_18;
uint local_10;
float local_c;
PolyLine<float> *local_8;
local_8 = this;
local_c = (float)std::numeric_limits<float>::max();
local_10 = 0;
while( true ) {
uVar1 = (ulong)local_10;
uVar2 = std::
vector<Eigen::Matrix<float,3,1,0,3,1>,std::allocator<Eigen::Matrix<float,3,1,0,3,1>>>::
size((vector<Eigen::Matrix<float,3,1,0,3,1>,std::allocator<Eigen::Matrix<float,3,1,0,3,1>>>
*)this);
if (uVar2 <= uVar1) break;
auVar5 = segment(this,(ulong)local_10);
local_18 = (int8 *)local_28;
local_2c = 2;
local_28 = auVar5;
while( true ) {
uVar1 = (ulong)local_2c;
lVar3 = std::
vector<Eigen::Matrix<float,3,1,0,3,1>,std::allocator<Eigen::Matrix<float,3,1,0,3,1>>>
::size((vector<Eigen::Matrix<float,3,1,0,3,1>,std::allocator<Eigen::Matrix<float,3,1,0,3,1>>>
*)this);
if (lVar3 - 1U <= uVar1) break;
auVar5 = segment(this,(ulong)(local_10 + local_2c));
local_38 = local_48;
local_48 = auVar5;
local_4c = segment_distance<float,Eigen::Matrix<float,3,1,0,3,1>>
((Matrix *)*local_18,(Matrix *)local_18[1],auVar5._0_8_,auVar5._8_8_);
pfVar4 = std::min<float>(&local_c,&local_4c);
local_c = *pfVar4;
local_2c = local_2c + 1;
}
local_10 = local_10 + 1;
}
return local_c;
}
| |
39,045 | PolyLine<float>::clearance() const | zkingston[P]unknot/src/knot.hh | [[nodiscard]] auto clearance() const -> RealT
{
RealT clearance = std::numeric_limits<RealT>::max();
for (auto i = 0U; i < points.size(); ++i)
{
const auto &s1 = segment(i);
for (auto j = 2U; j < points.size() - 1; ++j)
{
const auto &s2 = segment(i + j);
clearance =
std::min(clearance, segment_distance<RealT>(s1.first, s1.second, s2.first, s2.second));
}
}
return clearance;
} | O1 | cpp | PolyLine<float>::clearance() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %r12
movq 0x8(%rdi), %rax
subq %r12, %rax
je 0x3a82d
sarq $0x2, %rax
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r13
leaq -0x1(%r13), %r14
vmovss 0x2548d8(%rip), %xmm0 # 0x28f03c
xorl %esi, %esi
movl $0x2, %ebp
leaq 0x24(%rsp), %r15
leaq 0x1(%rsi), %rcx
cmpq %r13, %rcx
movl $0x0, %eax
cmovneq %rcx, %rax
cmpq $0x3, %r14
movq %rsi, 0x8(%rsp)
movl %ebp, 0x4(%rsp)
jb 0x3a815
leaq (%rsi,%rsi,2), %rcx
leaq (%r12,%rcx,4), %rcx
movq %rcx, 0x18(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax,4), %rax
movq %rax, 0x10(%rsp)
movl $0x3, %ebx
vmovss %xmm0, (%rsp)
movl %ebp, %ecx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
movq %rdx, %rsi
incq %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
leaq (%rsi,%rsi,2), %rax
leaq (%r12,%rax,4), %rcx
leaq (%rdx,%rdx,2), %rax
leaq (%r12,%rax,4), %r8
movq %r15, %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x12a5f
vmovss 0x24(%rsp), %xmm0
vmovss (%rsp), %xmm1
vminss %xmm1, %xmm0, %xmm1
vmovss %xmm1, (%rsp)
vmovss (%rsp), %xmm0
movl %ebx, %eax
incl %ebp
incl %ebx
cmpq %rax, %r14
ja 0x3a7b2
movq 0x8(%rsp), %rsi
incl %esi
movl 0x4(%rsp), %ebp
incl %ebp
cmpq %rsi, %r13
ja 0x3a770
jmp 0x3a835
vmovss 0x254807(%rip), %xmm0 # 0x28f03c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK8PolyLineIfE9clearanceEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r12, [rdi]
mov rax, [rdi+8]
sub rax, r12
jz loc_3A82D
sar rax, 2
mov r13, 0AAAAAAAAAAAAAAABh
imul r13, rax
lea r14, [r13-1]
vmovss xmm0, dword ptr cs:xmmword_28F034+8
xor esi, esi
mov ebp, 2
lea r15, [rsp+78h+var_54]
loc_3A770:
lea rcx, [rsi+1]
cmp rcx, r13
mov eax, 0
cmovnz rax, rcx
cmp r14, 3
mov [rsp+78h+var_70], rsi
mov [rsp+78h+var_74], ebp
jb loc_3A815
lea rcx, [rsi+rsi*2]
lea rcx, [r12+rcx*4]
mov [rsp+78h+var_60], rcx
lea rax, [rax+rax*2]
lea rax, [r12+rax*4]
mov [rsp+78h+var_68], rax
mov ebx, 3
loc_3A7B2:
vmovss [rsp+78h+var_78], xmm0
mov ecx, ebp
mov rax, rcx
xor edx, edx
div r13
mov rsi, rdx
inc rcx
mov rax, rcx
xor edx, edx
div r13
lea rax, [rsi+rsi*2]
lea rcx, [r12+rax*4]
lea rax, [rdx+rdx*2]
lea r8, [r12+rax*4]
mov rdi, r15
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_68]
call _ZL17segment_intersectIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEESt5tupleIJSt8optionalIT0_ES6_T_EERKS5_SA_SA_SA_; segment_intersect<float,Eigen::Matrix<float,3,1,0,3,1>>(Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&,Eigen::Matrix<float,3,1,0,3,1> const&)
vmovss xmm0, [rsp+78h+var_54]
vmovss xmm1, [rsp+78h+var_78]
vminss xmm1, xmm0, xmm1
vmovss [rsp+78h+var_78], xmm1
vmovss xmm0, [rsp+78h+var_78]
mov eax, ebx
inc ebp
inc ebx
cmp r14, rax
ja short loc_3A7B2
loc_3A815:
mov rsi, [rsp+78h+var_70]
inc esi
mov ebp, [rsp+78h+var_74]
inc ebp
cmp r13, rsi
ja loc_3A770
jmp short loc_3A835
loc_3A82D:
vmovss xmm0, dword ptr cs:xmmword_28F034+8
loc_3A835:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| __int128 __usercall PolyLine<float>::clearance@<xmm0>(long long *a1@<rdi>)
{
long long v1; // r12
long long v2; // rax
unsigned long long v3; // r13
unsigned long long v4; // r14
__int128 result; // xmm0
unsigned long long v6; // rsi
unsigned int v7; // ebp
unsigned long long v8; // rax
unsigned int v9; // ebx
unsigned long long v13; // rax
unsigned int v16; // [rsp+4h] [rbp-74h]
long long v17; // [rsp+10h] [rbp-68h]
int v18[21]; // [rsp+24h] [rbp-54h] BYREF
v1 = *a1;
v2 = a1[1] - *a1;
if ( v2 )
{
v3 = 0xAAAAAAAAAAAAAAABLL * (v2 >> 2);
v4 = v3 - 1;
__asm { vmovss xmm0, dword ptr cs:xmmword_28F034+8 }
v6 = 0LL;
v7 = 2;
do
{
v8 = 0LL;
if ( v6 + 1 != v3 )
v8 = v6 + 1;
v16 = v7;
if ( v4 >= 3 )
{
v17 = v1 + 12 * v8;
v9 = 3;
do
{
__asm { vmovss [rsp+78h+var_78], xmm0 }
segment_intersect<float,Eigen::Matrix<float,3,1,0,3,1>>(
(long long)v18,
v1 + 12 * v6,
v17,
(long long *)(v1 + 12 * (v7 % v3)),
(long long *)(v1 + 12 * (((unsigned long long)v7 + 1) % v3)));
__asm
{
vmovss xmm0, [rsp+78h+var_54]
vmovss xmm1, [rsp+78h+var_78]
vminss xmm1, xmm0, xmm1
vmovss [rsp+78h+var_78], xmm1
vmovss xmm0, [rsp+78h+var_78]
}
v13 = v9;
++v7;
++v9;
}
while ( v4 > v13 );
}
v6 = (unsigned int)(v6 + 1);
v7 = v16 + 1;
}
while ( v3 > v6 );
}
else
{
__asm { vmovss xmm0, dword ptr cs:xmmword_28F034+8 }
}
return result;
}
| clearance:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R12,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R12
JZ 0x0013a82d
SAR RAX,0x2
MOV R13,-0x5555555555555555
IMUL R13,RAX
LEA R14,[R13 + -0x1]
VMOVSS XMM0,dword ptr [0x0038f03c]
XOR ESI,ESI
MOV EBP,0x2
LEA R15,[RSP + 0x24]
LAB_0013a770:
LEA RCX,[RSI + 0x1]
CMP RCX,R13
MOV EAX,0x0
CMOVNZ RAX,RCX
CMP R14,0x3
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EBP
JC 0x0013a815
LEA RCX,[RSI + RSI*0x2]
LEA RCX,[R12 + RCX*0x4]
MOV qword ptr [RSP + 0x18],RCX
LEA RAX,[RAX + RAX*0x2]
LEA RAX,[R12 + RAX*0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV EBX,0x3
LAB_0013a7b2:
VMOVSS dword ptr [RSP],XMM0
MOV ECX,EBP
MOV RAX,RCX
XOR EDX,EDX
DIV R13
MOV RSI,RDX
INC RCX
MOV RAX,RCX
XOR EDX,EDX
DIV R13
LEA RAX,[RSI + RSI*0x2]
LEA RCX,[R12 + RAX*0x4]
LEA RAX,[RDX + RDX*0x2]
LEA R8,[R12 + RAX*0x4]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00112a5f
VMOVSS XMM0,dword ptr [RSP + 0x24]
VMOVSS XMM1,dword ptr [RSP]
VMINSS XMM1,XMM0,XMM1
VMOVSS dword ptr [RSP],XMM1
VMOVSS XMM0,dword ptr [RSP]
MOV EAX,EBX
INC EBP
INC EBX
CMP R14,RAX
JA 0x0013a7b2
LAB_0013a815:
MOV RSI,qword ptr [RSP + 0x8]
INC ESI
MOV EBP,dword ptr [RSP + 0x4]
INC EBP
CMP R13,RSI
JA 0x0013a770
JMP 0x0013a835
LAB_0013a82d:
VMOVSS XMM0,dword ptr [0x0038f03c]
LAB_0013a835:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* PolyLine<float>::clearance() const */
uint __thiscall PolyLine<float>::clearance(PolyLine<float> *this)
{
long lVar1;
bool bVar2;
int1 auVar3 [16];
ulong uVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
uint local_54 [9];
lVar1 = *(long *)this;
uVar10 = DAT_0038f03c;
if (*(long *)(this + 8) - lVar1 != 0) {
uVar9 = (*(long *)(this + 8) - lVar1 >> 2) * -0x5555555555555555;
uVar8 = 0;
uVar7 = 2;
do {
uVar4 = 0;
if (uVar8 + 1 != uVar9) {
uVar4 = uVar8 + 1;
}
if (2 < uVar9 - 1) {
uVar5 = 3;
uVar6 = uVar7;
do {
segment_intersect<float,Eigen::Matrix<float,3,1,0,3,1>>
((Matrix *)local_54,(Matrix *)(lVar1 + uVar8 * 0xc),
(Matrix *)(lVar1 + uVar4 * 0xc),
(Matrix *)(lVar1 + ((ulong)uVar6 % uVar9) * 0xc));
auVar3 = vminss_avx(ZEXT416(local_54[0]),ZEXT416(uVar10));
uVar10 = auVar3._0_4_;
uVar6 = uVar6 + 1;
bVar2 = uVar5 < uVar9 - 1;
uVar5 = (ulong)((int)uVar5 + 1);
} while (bVar2);
}
uVar8 = (ulong)((int)uVar8 + 1);
uVar7 = uVar7 + 1;
} while (uVar8 <= uVar9 && uVar9 - uVar8 != 0);
}
return uVar10;
}
| |
39,046 | intx::udivrem_2by1(intx::uint<128u>, unsigned long, unsigned long) | corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp | inline div_result<uint64_t> udivrem_2by1(uint128 u, uint64_t d, uint64_t v) noexcept
{
auto q = umul(v, u[1]);
q = fast_add(q, u);
++q[1];
auto r = u[0] - q[1] * d;
if (r > q[0])
{
--q[1];
r += d;
}
if (r >= d)
{
++q[1];
r -= d;
}
return {q[1], r};
} | O0 | cpp | intx::udivrem_2by1(intx::uint<128u>, unsigned long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq -0x90(%rbp), %rdi
movq (%rax), %rsi
callq 0x600d0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x61da0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x60150
movq (%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq %rax, %rcx
movq -0x88(%rbp), %rax
movq (%rcx), %rcx
imulq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x60150
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq (%rcx), %rax
jbe 0x61c43
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x61c74
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x78(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN4intx12udivrem_2by1ENS_4uintILj128EEEmm:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_20], rdi
mov [rbp+var_18], rsi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov rax, [rbp+var_30]
mov [rbp+var_90], rax
lea rdi, [rbp+var_20]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rdi, [rbp+var_90]; this
mov rsi, [rax]; unsigned __int64
call _ZN4intx4umulEmm; intx::umul(ulong,ulong)
mov [rbp+var_40], rax
mov [rbp+var_38], rdx
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_68]
call _ZN4intx8fast_addENS_4uintILj128EEES1_; intx::fast_add(intx::uint<128u>,intx::uint<128u>)
mov [rbp+var_50], rax
mov [rbp+var_48], rdx
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
lea rdi, [rbp+var_40]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
lea rdi, [rbp+var_20]
xor eax, eax
mov esi, eax
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_88], rax
lea rdi, [rbp+var_40]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_88]
mov rcx, [rcx]
imul rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_80], rax
lea rdi, [rbp+var_40]
xor eax, eax
mov esi, eax
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_80]
cmp rax, [rcx]
jbe short loc_61C43
lea rdi, [rbp+var_40]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rcx, [rax]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax], rcx
mov rax, [rbp+var_28]
add rax, [rbp+var_78]
mov [rbp+var_78], rax
loc_61C43:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_28]
jb short loc_61C74
lea rdi, [rbp+var_40]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_78]
sub rax, rcx
mov [rbp+var_78], rax
loc_61C74:
lea rdi, [rbp+var_40]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_78]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long intx::udivrem_2by1(long long a1, long long a2, unsigned long long a3, unsigned long long a4)
{
unsigned long long *v4; // rax
long long v5; // rdx
long long v6; // rdx
_QWORD *v7; // rax
_QWORD *v8; // rax
_QWORD *v9; // rax
_QWORD *v10; // rax
long long v13; // [rsp+8h] [rbp-88h]
unsigned long long v14; // [rsp+18h] [rbp-78h]
long long v15; // [rsp+30h] [rbp-60h]
_QWORD v16[3]; // [rsp+50h] [rbp-40h] BYREF
unsigned long long v17; // [rsp+68h] [rbp-28h]
long long v18; // [rsp+70h] [rbp-20h] BYREF
long long v19; // [rsp+78h] [rbp-18h]
v18 = a1;
v19 = a2;
v17 = a3;
v16[2] = a4;
v4 = (unsigned long long *)intx::uint<128u>::operator[]((long long)&v18, 1LL);
v15 = intx::umul(a4, *v4);
v16[0] = intx::fast_add(v15, v5, v18, v19);
v16[1] = v6;
v7 = (_QWORD *)intx::uint<128u>::operator[]((long long)v16, 1LL);
++*v7;
v13 = *(_QWORD *)intx::uint<128u>::operator[]((long long)&v18, 0LL);
v8 = (_QWORD *)intx::uint<128u>::operator[]((long long)v16, 1LL);
v14 = v13 - v17 * *v8;
if ( v14 > *(_QWORD *)intx::uint<128u>::operator[]((long long)v16, 0LL) )
{
v9 = (_QWORD *)intx::uint<128u>::operator[]((long long)v16, 1LL);
--*v9;
v14 += v17;
}
if ( v14 >= v17 )
{
v10 = (_QWORD *)intx::uint<128u>::operator[]((long long)v16, 1LL);
++*v10;
}
return *(_QWORD *)intx::uint<128u>::operator[]((long long)v16, 1LL);
}
| udivrem_2by1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0x20]
MOV ESI,0x1
CALL 0x00160150
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RAX]
CALL 0x001600d0
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x68]
CALL 0x00161da0
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00160150
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
LEA RDI,[RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00160150
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00160150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RCX]
IMUL RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
LEA RDI,[RBP + -0x40]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00160150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x80]
CMP RAX,qword ptr [RCX]
JBE 0x00161c43
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00160150
MOV RCX,qword ptr [RAX]
ADD RCX,-0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x78],RAX
LAB_00161c43:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00161c74
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00160150
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x78]
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
LAB_00161c74:
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00160150
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* intx::udivrem_2by1(intx::uint<128u>, unsigned long, unsigned long) */
int1 [16] __thiscall
intx::udivrem_2by1(intx *this,int8 param_2,ulong param_3,ulong param_4)
{
long lVar1;
ulong *puVar2;
long *plVar3;
int8 *puVar4;
int1 auVar5 [16];
ulong local_80;
uint<128u> local_48 [16];
ulong local_38;
ulong local_30;
intx *local_28;
int8 local_20;
local_38 = param_4;
local_30 = param_3;
local_28 = this;
local_20 = param_2;
puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_28,1);
local_48 = (uint<128u> [16])umul(param_4,*puVar2);
auVar5 = fast_add(local_48._0_8_,local_48._8_8_,local_28,local_20);
local_48 = (uint<128u> [16])auVar5;
plVar3 = (long *)uint<128u>::operator[](local_48,1);
*plVar3 = *plVar3 + 1;
plVar3 = (long *)uint<128u>::operator[]((uint<128u> *)&local_28,0);
lVar1 = *plVar3;
plVar3 = (long *)uint<128u>::operator[](local_48,1);
local_80 = lVar1 - *plVar3 * local_30;
puVar2 = (ulong *)uint<128u>::operator[](local_48,0);
if (*puVar2 < local_80) {
plVar3 = (long *)uint<128u>::operator[](local_48,1);
*plVar3 = *plVar3 + -1;
local_80 = local_30 + local_80;
}
if (local_30 <= local_80) {
plVar3 = (long *)uint<128u>::operator[](local_48,1);
*plVar3 = *plVar3 + 1;
local_80 = local_80 - local_30;
}
puVar4 = (int8 *)uint<128u>::operator[](local_48,1);
auVar5._8_8_ = local_80;
auVar5._0_8_ = *puVar4;
return auVar5;
}
| |
39,047 | ggml_compute_forward_pad | llama.cpp/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_pad(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_pad_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O3 | cpp | ggml_compute_forward_pad:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq 0x98(%rsi), %rax
cmpl $0x0, (%rax)
jne 0x4145e
cmpq $0x4, 0x30(%rax)
jne 0x41478
cmpq $0x4, 0x30(%rsi)
jne 0x41494
movq 0x20(%rsi), %rcx
movq %rcx, 0x20(%rsp)
testq %rcx, %rcx
jle 0x4144c
movq 0x10(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq 0x20(%rax), %rcx
movq %rcx, 0x70(%rsp)
movq 0x28(%rax), %r10
movq 0x38(%rax), %rdx
movq 0x10(%rsi), %rbx
movq 0x18(%rsi), %rbp
movq 0x28(%rsi), %r15
movq 0xf8(%rsi), %rcx
movslq 0x4(%rdi), %rsi
movslq (%rdi), %rdi
movq %rdx, %r8
imulq %rdi, %r8
movq %r8, 0x30(%rsp)
imulq %rsi, %rdx
movq %rdx, 0x68(%rsp)
movq %rbx, %rdx
movq %rdi, 0x38(%rsp)
imulq %rdi, %rdx
leaq (%rcx,%rdx,4), %rcx
movq %rcx, 0x28(%rsp)
movq %rbp, 0x40(%rsp)
imulq %rbx, %rbp
leaq (,%rbp,4), %rcx
movq %rcx, 0x50(%rsp)
movq %rbx, %rcx
movq %rsi, 0x60(%rsp)
imulq %rsi, %rcx
shlq $0x2, %rcx
movq %rcx, 0x58(%rsp)
imulq 0x20(%rsp), %rbp
shlq $0x2, %rbp
movq 0x40(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x48(%rax), %rdi
movq $0x0, 0x18(%rsp)
movq 0x38(%rsp), %rcx
cmpq %rcx, 0x40(%rsp)
jle 0x41420
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x38(%rsp), %rsi
testq %rbx, %rbx
jle 0x413f2
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %r8
xorl %r14d, %r14d
testq %r15, %r15
jle 0x413e2
cmpq 0x78(%rsp), %rsi
setl %r9b
movq 0x18(%rsp), %rcx
cmpq 0x70(%rsp), %rcx
setl %r11b
cmpq 0x80(%rsp), %r14
setl %cl
andb %r9b, %cl
andb %r11b, %cl
movq %rdx, %r13
movq %r8, %r11
xorl %r9d, %r9d
cmpq %r10, %r9
setl %r12b
andb %cl, %r12b
vxorps %xmm0, %xmm0, %xmm0
cmpb $0x1, %r12b
jne 0x413ce
movq 0xf8(%rax), %r12
vmovss (%r12,%r11), %xmm0
vmovss %xmm0, (%r13)
incq %r9
addq %rdi, %r11
addq %rbp, %r13
cmpq %r9, %r15
jne 0x413ad
incq %r14
addq $0x4, %r8
addq $0x4, %rdx
cmpq %rbx, %r14
jne 0x41377
addq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rcx
addq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rcx
addq 0x58(%rsp), %rcx
movq %rcx, 0x10(%rsp)
cmpq 0x40(%rsp), %rsi
jl 0x41361
movq 0x18(%rsp), %rdx
incq %rdx
movq 0x48(%rsp), %rcx
addq %rcx, 0x30(%rsp)
movq 0x50(%rsp), %rcx
addq %rcx, 0x28(%rsp)
movq %rdx, 0x18(%rsp)
cmpq 0x20(%rsp), %rdx
jne 0x41338
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3157b(%rip), %rdi # 0x729e0
leaq 0x271f4(%rip), %rdx # 0x68660
movl $0x195e, %esi # imm = 0x195E
xorl %eax, %eax
callq 0xaf60
leaq 0x31561(%rip), %rdi # 0x729e0
leaq 0x270c4(%rip), %rdx # 0x6854a
leaq 0x319b8(%rip), %rcx # 0x72e45
movl $0x1932, %esi # imm = 0x1932
jmp 0x414ae
leaq 0x31545(%rip), %rdi # 0x729e0
leaq 0x270a8(%rip), %rdx # 0x6854a
leaq 0x319b9(%rip), %rcx # 0x72e62
movl $0x1933, %esi # imm = 0x1933
xorl %eax, %eax
callq 0xaf60
| ggml_compute_forward_pad:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rax, [rsi+98h]
cmp dword ptr [rax], 0
jnz loc_4145E
cmp qword ptr [rax+30h], 4
jnz loc_41478
cmp qword ptr [rsi+30h], 4
jnz loc_41494
mov rcx, [rsi+20h]
mov [rsp+0B8h+var_98], rcx
test rcx, rcx
jle loc_4144C
mov rcx, [rax+10h]
mov [rsp+0B8h+var_38], rcx
mov rcx, [rax+18h]
mov [rsp+0B8h+var_40], rcx
mov rcx, [rax+20h]
mov [rsp+0B8h+var_48], rcx
mov r10, [rax+28h]
mov rdx, [rax+38h]
mov rbx, [rsi+10h]
mov rbp, [rsi+18h]
mov r15, [rsi+28h]
mov rcx, [rsi+0F8h]
movsxd rsi, dword ptr [rdi+4]
movsxd rdi, dword ptr [rdi]
mov r8, rdx
imul r8, rdi
mov [rsp+0B8h+var_88], r8
imul rdx, rsi
mov [rsp+0B8h+var_50], rdx
mov rdx, rbx
mov [rsp+0B8h+var_80], rdi
imul rdx, rdi
lea rcx, [rcx+rdx*4]
mov [rsp+0B8h+var_90], rcx
mov [rsp+0B8h+var_78], rbp
imul rbp, rbx
lea rcx, ds:0[rbp*4]
mov [rsp+0B8h+var_68], rcx
mov rcx, rbx
mov [rsp+0B8h+var_58], rsi
imul rcx, rsi
shl rcx, 2
mov [rsp+0B8h+var_60], rcx
imul rbp, [rsp+0B8h+var_98]
shl rbp, 2
mov rcx, [rax+40h]
mov [rsp+0B8h+var_70], rcx
mov rdi, [rax+48h]
mov [rsp+0B8h+var_A0], 0
loc_41338:
mov rcx, [rsp+0B8h+var_80]
cmp [rsp+0B8h+var_78], rcx
jle loc_41420
mov rcx, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_A8], rcx
mov rcx, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_B0], rcx
mov rsi, [rsp+0B8h+var_80]
loc_41361:
test rbx, rbx
jle loc_413F2
mov rdx, [rsp+0B8h+var_A8]
mov r8, [rsp+0B8h+var_B0]
xor r14d, r14d
loc_41377:
test r15, r15
jle short loc_413E2
cmp rsi, [rsp+0B8h+var_40]
setl r9b
mov rcx, [rsp+0B8h+var_A0]
cmp rcx, [rsp+0B8h+var_48]
setl r11b
cmp r14, [rsp+0B8h+var_38]
setl cl
and cl, r9b
and cl, r11b
mov r13, rdx
mov r11, r8
xor r9d, r9d
loc_413AD:
cmp r9, r10
setl r12b
and r12b, cl
vxorps xmm0, xmm0, xmm0
cmp r12b, 1
jnz short loc_413CE
mov r12, [rax+0F8h]
vmovss xmm0, dword ptr [r12+r11]
loc_413CE:
vmovss dword ptr [r13+0], xmm0
inc r9
add r11, rdi
add r13, rbp
cmp r15, r9
jnz short loc_413AD
loc_413E2:
inc r14
add r8, 4
add rdx, 4
cmp r14, rbx
jnz short loc_41377
loc_413F2:
add rsi, [rsp+0B8h+var_58]
mov rcx, [rsp+0B8h+var_B0]
add rcx, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_B0], rcx
mov rcx, [rsp+0B8h+var_A8]
add rcx, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_A8], rcx
cmp rsi, [rsp+0B8h+var_78]
jl loc_41361
loc_41420:
mov rdx, [rsp+0B8h+var_A0]
inc rdx
mov rcx, [rsp+0B8h+var_70]
add [rsp+0B8h+var_88], rcx
mov rcx, [rsp+0B8h+var_68]
add [rsp+0B8h+var_90], rcx
mov [rsp+0B8h+var_A0], rdx
cmp rdx, [rsp+0B8h+var_98]
jnz loc_41338
loc_4144C:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4145E:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aFatalError; "fatal error"
mov esi, 195Eh
xor eax, eax
call _ggml_abort
loc_41478:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)"
mov esi, 1932h
jmp short loc_414AE
loc_41494:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)"
mov esi, 1933h
loc_414AE:
xor eax, eax
call _ggml_abort
| long long ggml_compute_forward_pad(int *a1, _QWORD *a2, __m128 _XMM0)
{
long long result; // rax
long long v4; // r10
long long v5; // rbx
long long v6; // rbp
long long v7; // r15
long long v8; // rcx
long long v9; // rsi
long long v10; // rdi
long long v11; // rbp
long long v12; // rbp
long long v13; // rdi
long long v14; // rsi
long long v15; // rdx
long long v16; // r8
long long j; // r14
long long k; // r9
long long v22; // [rsp+8h] [rbp-B0h]
long long v23; // [rsp+10h] [rbp-A8h]
long long i; // [rsp+18h] [rbp-A0h]
long long v25; // [rsp+20h] [rbp-98h]
long long v26; // [rsp+28h] [rbp-90h]
long long v27; // [rsp+30h] [rbp-88h]
long long v28; // [rsp+38h] [rbp-80h]
long long v29; // [rsp+40h] [rbp-78h]
long long v30; // [rsp+48h] [rbp-70h]
long long v31; // [rsp+50h] [rbp-68h]
long long v32; // [rsp+58h] [rbp-60h]
long long v33; // [rsp+60h] [rbp-58h]
long long v34; // [rsp+68h] [rbp-50h]
long long v35; // [rsp+70h] [rbp-48h]
long long v36; // [rsp+78h] [rbp-40h]
long long v37; // [rsp+80h] [rbp-38h]
result = a2[19];
if ( *(_DWORD *)result )
{
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp", 6494LL, "fatal error");
goto LABEL_20;
}
if ( *(_QWORD *)(result + 48) != 4LL )
{
LABEL_20:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
6450LL,
"GGML_ASSERT(%s) failed",
"src0->nb[0] == sizeof(float)");
return ggml_compute_forward_pad_reflect_1d();
}
if ( a2[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",
6451LL,
"GGML_ASSERT(%s) failed",
"dst->nb[0] == sizeof(float)");
return ggml_compute_forward_pad_reflect_1d();
}
v25 = a2[4];
if ( v25 > 0 )
{
v37 = *(_QWORD *)(result + 16);
v36 = *(_QWORD *)(result + 24);
v35 = *(_QWORD *)(result + 32);
v4 = *(_QWORD *)(result + 40);
v5 = a2[2];
v6 = a2[3];
v7 = a2[5];
v8 = a2[31];
v9 = a1[1];
v10 = *a1;
v27 = v10 * *(_QWORD *)(result + 56);
v34 = v9 * *(_QWORD *)(result + 56);
v28 = v10;
v26 = v8 + 4 * v10 * v5;
v29 = v6;
v11 = v5 * v6;
v31 = 4 * v11;
v33 = v9;
v32 = 4 * v9 * v5;
v12 = 4 * v25 * v11;
v30 = *(_QWORD *)(result + 64);
v13 = *(_QWORD *)(result + 72);
for ( i = 0LL; i != v25; ++i )
{
if ( v29 > v28 )
{
v23 = v26;
v22 = v27;
v14 = v28;
do
{
if ( v5 > 0 )
{
v15 = v23;
v16 = v22;
for ( j = 0LL; j != v5; ++j )
{
if ( v7 > 0 )
{
_R13 = v15;
_R11 = v16;
for ( k = 0LL; k != v7; ++k )
{
__asm { vxorps xmm0, xmm0, xmm0 }
if ( i < v35 && v14 < v36 && j < v37 && k < v4 )
{
_R12 = *(_QWORD *)(result + 248);
__asm { vmovss xmm0, dword ptr [r12+r11] }
}
__asm { vmovss dword ptr [r13+0], xmm0 }
_R11 += v13;
_R13 += v12;
}
}
v16 += 4LL;
v15 += 4LL;
}
}
v14 += v33;
v22 += v34;
v23 += v32;
}
while ( v14 < v29 );
}
v27 += v30;
v26 += v31;
}
}
return result;
}
| ggml_compute_forward_pad:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RAX,qword ptr [RSI + 0x98]
CMP dword ptr [RAX],0x0
JNZ 0x0014145e
CMP qword ptr [RAX + 0x30],0x4
JNZ 0x00141478
CMP qword ptr [RSI + 0x30],0x4
JNZ 0x00141494
MOV RCX,qword ptr [RSI + 0x20]
MOV qword ptr [RSP + 0x20],RCX
TEST RCX,RCX
JLE 0x0014144c
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x80],RCX
MOV RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x78],RCX
MOV RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x70],RCX
MOV R10,qword ptr [RAX + 0x28]
MOV RDX,qword ptr [RAX + 0x38]
MOV RBX,qword ptr [RSI + 0x10]
MOV RBP,qword ptr [RSI + 0x18]
MOV R15,qword ptr [RSI + 0x28]
MOV RCX,qword ptr [RSI + 0xf8]
MOVSXD RSI,dword ptr [RDI + 0x4]
MOVSXD RDI,dword ptr [RDI]
MOV R8,RDX
IMUL R8,RDI
MOV qword ptr [RSP + 0x30],R8
IMUL RDX,RSI
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,RBX
MOV qword ptr [RSP + 0x38],RDI
IMUL RDX,RDI
LEA RCX,[RCX + RDX*0x4]
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x40],RBP
IMUL RBP,RBX
LEA RCX,[RBP*0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV RCX,RBX
MOV qword ptr [RSP + 0x60],RSI
IMUL RCX,RSI
SHL RCX,0x2
MOV qword ptr [RSP + 0x58],RCX
IMUL RBP,qword ptr [RSP + 0x20]
SHL RBP,0x2
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x48],RCX
MOV RDI,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x18],0x0
LAB_00141338:
MOV RCX,qword ptr [RSP + 0x38]
CMP qword ptr [RSP + 0x40],RCX
JLE 0x00141420
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RCX
MOV RSI,qword ptr [RSP + 0x38]
LAB_00141361:
TEST RBX,RBX
JLE 0x001413f2
MOV RDX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x8]
XOR R14D,R14D
LAB_00141377:
TEST R15,R15
JLE 0x001413e2
CMP RSI,qword ptr [RSP + 0x78]
SETL R9B
MOV RCX,qword ptr [RSP + 0x18]
CMP RCX,qword ptr [RSP + 0x70]
SETL R11B
CMP R14,qword ptr [RSP + 0x80]
SETL CL
AND CL,R9B
AND CL,R11B
MOV R13,RDX
MOV R11,R8
XOR R9D,R9D
LAB_001413ad:
CMP R9,R10
SETL R12B
AND R12B,CL
VXORPS XMM0,XMM0,XMM0
CMP R12B,0x1
JNZ 0x001413ce
MOV R12,qword ptr [RAX + 0xf8]
VMOVSS XMM0,dword ptr [R12 + R11*0x1]
LAB_001413ce:
VMOVSS dword ptr [R13],XMM0
INC R9
ADD R11,RDI
ADD R13,RBP
CMP R15,R9
JNZ 0x001413ad
LAB_001413e2:
INC R14
ADD R8,0x4
ADD RDX,0x4
CMP R14,RBX
JNZ 0x00141377
LAB_001413f2:
ADD RSI,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RCX
CMP RSI,qword ptr [RSP + 0x40]
JL 0x00141361
LAB_00141420:
MOV RDX,qword ptr [RSP + 0x18]
INC RDX
MOV RCX,qword ptr [RSP + 0x48]
ADD qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x50]
ADD qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x18],RDX
CMP RDX,qword ptr [RSP + 0x20]
JNZ 0x00141338
LAB_0014144c:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014145e:
LEA RDI,[0x1729e0]
LEA RDX,[0x168660]
MOV ESI,0x195e
XOR EAX,EAX
CALL 0x0010af60
LAB_00141478:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x172e45]
MOV ESI,0x1932
JMP 0x001414ae
LAB_00141494:
LEA RDI,[0x1729e0]
LEA RDX,[0x16854a]
LEA RCX,[0x172e62]
MOV ESI,0x1933
LAB_001414ae:
XOR EAX,EAX
CALL 0x0010af60
|
void ggml_compute_forward_pad(int *param_1,long param_2)
{
int *piVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
char *pcVar13;
int4 *puVar14;
long lVar15;
long lVar16;
int8 uVar17;
long lVar18;
long lVar19;
long lVar20;
long lVar21;
int4 *puVar22;
long lVar23;
int4 uVar24;
long local_b0;
int4 *local_a8;
long local_a0;
int4 *local_90;
long local_88;
piVar1 = *(int **)(param_2 + 0x98);
if (*piVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",0x195e,
"fatal error");
}
if (*(long *)(piVar1 + 0xc) == 4) {
if (*(long *)(param_2 + 0x30) == 4) {
lVar2 = *(long *)(param_2 + 0x20);
if (0 < lVar2) {
lVar3 = *(long *)(piVar1 + 4);
lVar4 = *(long *)(piVar1 + 6);
lVar5 = *(long *)(piVar1 + 8);
lVar6 = *(long *)(piVar1 + 10);
lVar7 = *(long *)(piVar1 + 0xe);
lVar8 = *(long *)(param_2 + 0x10);
lVar9 = *(long *)(param_2 + 0x18);
lVar10 = *(long *)(param_2 + 0x28);
lVar15 = (long)param_1[1];
lVar18 = (long)*param_1;
local_88 = lVar7 * lVar18;
local_90 = (int4 *)(*(long *)(param_2 + 0xf8) + lVar8 * lVar18 * 4);
lVar11 = *(long *)(piVar1 + 0x10);
lVar12 = *(long *)(piVar1 + 0x12);
local_a0 = 0;
do {
if (lVar18 < lVar9) {
local_a8 = local_90;
local_b0 = local_88;
lVar16 = lVar18;
do {
if (0 < lVar8) {
lVar23 = 0;
puVar14 = local_a8;
lVar19 = local_b0;
do {
if (0 < lVar10) {
lVar20 = 0;
lVar21 = lVar19;
puVar22 = puVar14;
do {
uVar24 = 0;
if (lVar20 < lVar6 && ((lVar23 < lVar3 && lVar16 < lVar4) && local_a0 < lVar5)
) {
uVar24 = *(int4 *)(*(long *)(piVar1 + 0x3e) + lVar21);
}
*puVar22 = uVar24;
lVar20 = lVar20 + 1;
lVar21 = lVar21 + lVar12;
puVar22 = puVar22 + lVar9 * lVar8 * lVar2;
} while (lVar10 != lVar20);
}
lVar23 = lVar23 + 1;
lVar19 = lVar19 + 4;
puVar14 = puVar14 + 1;
} while (lVar23 != lVar8);
}
lVar16 = lVar16 + lVar15;
local_b0 = local_b0 + lVar7 * lVar15;
local_a8 = local_a8 + lVar8 * lVar15;
} while (lVar16 < lVar9);
}
local_a0 = local_a0 + 1;
local_88 = local_88 + lVar11;
local_90 = local_90 + lVar9 * lVar8;
} while (local_a0 != lVar2);
}
return;
}
pcVar13 = "dst->nb[0] == sizeof(float)";
uVar17 = 0x1933;
}
else {
pcVar13 = "src0->nb[0] == sizeof(float)";
uVar17 = 0x1932;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",uVar17,
"GGML_ASSERT(%s) failed",pcVar13);
}
| |
39,048 | compare_bin | eloqsql/mysys/my_compare.c | static int compare_bin(const uchar *a, uint a_length,
const uchar *b, uint b_length,
my_bool part_key, my_bool skip_end_space)
{
uint length= MY_MIN(a_length,b_length);
const uchar *end= a+ length;
int flag;
while (a < end)
if ((flag= (int) *a++ - (int) *b++))
return flag;
if (part_key && b_length < a_length)
return 0;
if (skip_end_space && a_length != b_length)
{
int swap= 1;
/*
We are using space compression. We have to check if longer key
has next character < ' ', in which case it's less than the shorter
key that has an implicite space afterwards.
This code is identical to the one in
strings/ctype-simple.c:my_strnncollsp_simple
*/
if (a_length < b_length)
{
/* put shorter key in a */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
}
for (end= a + a_length-length; a < end ; a++)
{
if (*a != ' ')
return (*a < ' ') ? -swap : swap;
}
return 0;
}
return (int) (a_length-b_length);
} | O0 | c | compare_bin:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x58(%rbp)
movl %ecx, %eax
movl -0x58(%rbp), %ecx
movl %eax, -0x54(%rbp)
movq %rdx, %rax
movl -0x54(%rbp), %edx
movq %rax, -0x50(%rbp)
movl %esi, %eax
movq -0x50(%rbp), %rsi
movl %eax, -0x44(%rbp)
movq %rdi, %r8
movl -0x44(%rbp), %edi
movb %r9b, %al
movq %r8, -0x10(%rbp)
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movb %cl, -0x25(%rbp)
movb %al, -0x26(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x894f0
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x894f6
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x8954f
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x8954d
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x89620
jmp 0x8950a
movsbl -0x25(%rbp), %eax
cmpl $0x0, %eax
je 0x8956c
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x8956c
movl $0x0, -0x4(%rbp)
jmp 0x89620
movsbl -0x26(%rbp), %eax
cmpl $0x0, %eax
je 0x89617
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x89617
movl $0x1, -0x40(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x895a9
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x8960e
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0x895fe
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jge 0x895f0
xorl %eax, %eax
subl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x895f6
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x89620
jmp 0x89600
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x895c4
movl $0x0, -0x4(%rbp)
jmp 0x89620
movl -0x14(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| compare_bin:
push rbp
mov rbp, rsp
mov [rbp+var_58], r8d
mov eax, ecx
mov ecx, [rbp+var_58]
mov [rbp+var_54], eax
mov rax, rdx
mov edx, [rbp+var_54]
mov [rbp+var_50], rax
mov eax, esi
mov rsi, [rbp+var_50]
mov [rbp+var_44], eax
mov r8, rdi
mov edi, [rbp+var_44]
mov al, r9b
mov [rbp+var_10], r8
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_25], cl
mov [rbp+var_26], al
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jnb short loc_894F0
mov eax, [rbp+var_14]
mov [rbp+var_5C], eax
jmp short loc_894F6
loc_894F0:
mov eax, [rbp+var_24]
mov [rbp+var_5C], eax
loc_894F6:
mov eax, [rbp+var_5C]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_38], rax
loc_8950A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_8954F
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_8954D
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp loc_89620
loc_8954D:
jmp short loc_8950A
loc_8954F:
movsx eax, [rbp+var_25]
cmp eax, 0
jz short loc_8956C
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
jnb short loc_8956C
mov [rbp+var_4], 0
jmp loc_89620
loc_8956C:
movsx eax, [rbp+var_26]
cmp eax, 0
jz loc_89617
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jz loc_89617
mov [rbp+var_40], 1
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jnb short loc_895A9
mov eax, [rbp+var_24]
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
mov [rbp+var_40], 0FFFFFFFFh
loc_895A9:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
add rax, rcx
mov ecx, [rbp+var_2C]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_38], rax
loc_895C4:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_8960E
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_895FE
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jge short loc_895F0
xor eax, eax
sub eax, [rbp+var_40]
mov [rbp+var_60], eax
jmp short loc_895F6
loc_895F0:
mov eax, [rbp+var_40]
mov [rbp+var_60], eax
loc_895F6:
mov eax, [rbp+var_60]
mov [rbp+var_4], eax
jmp short loc_89620
loc_895FE:
jmp short $+2
loc_89600:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_895C4
loc_8960E:
mov [rbp+var_4], 0
jmp short loc_89620
loc_89617:
mov eax, [rbp+var_14]
sub eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_89620:
mov eax, [rbp+var_4]
pop rbp
retn
| long long compare_bin(
unsigned __int8 *a1,
unsigned int a2,
unsigned __int8 *a3,
unsigned int a4,
char a5,
char a6)
{
unsigned __int8 *v6; // rax
unsigned __int8 *v7; // rcx
unsigned int v10; // [rsp+4h] [rbp-5Ch]
unsigned int v11; // [rsp+20h] [rbp-40h]
unsigned __int8 *v12; // [rsp+28h] [rbp-38h]
unsigned int v15; // [rsp+4Ch] [rbp-14h]
unsigned __int8 *v16; // [rsp+50h] [rbp-10h]
v16 = a1;
v15 = a2;
if ( a2 >= a4 )
v10 = a4;
else
v10 = a2;
while ( v16 < &a1[v10] )
{
v6 = v16++;
v7 = a3++;
if ( *v6 != *v7 )
return (unsigned int)(*v6 - *v7);
}
if ( a5 && a4 < a2 )
{
return 0;
}
else if ( !a6 || a2 == a4 )
{
return a2 - a4;
}
else
{
v11 = 1;
if ( a2 < a4 )
{
v15 = a4;
v16 = a3;
v11 = -1;
}
v12 = &v16[v15 - v10];
while ( 1 )
{
if ( v16 >= v12 )
return 0;
if ( *v16 != 32 )
break;
++v16;
}
if ( *v16 >= 0x20u )
return v11;
else
return -v11;
}
}
| compare_bin:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x58],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,ESI
MOV RSI,qword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x44],EAX
MOV R8,RDI
MOV EDI,dword ptr [RBP + -0x44]
MOV AL,R9B
MOV qword ptr [RBP + -0x10],R8
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV byte ptr [RBP + -0x25],CL
MOV byte ptr [RBP + -0x26],AL
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001894f0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001894f6
LAB_001894f0:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EAX
LAB_001894f6:
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0018950a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0018954f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x0018954d
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00189620
LAB_0018954d:
JMP 0x0018950a
LAB_0018954f:
MOVSX EAX,byte ptr [RBP + -0x25]
CMP EAX,0x0
JZ 0x0018956c
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x0018956c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00189620
LAB_0018956c:
MOVSX EAX,byte ptr [RBP + -0x26]
CMP EAX,0x0
JZ 0x00189617
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x00189617
MOV dword ptr [RBP + -0x40],0x1
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001895a9
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x40],0xffffffff
LAB_001895a9:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001895c4:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0018960e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001895fe
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JGE 0x001895f0
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001895f6
LAB_001895f0:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x60],EAX
LAB_001895f6:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00189620
LAB_001895fe:
JMP 0x00189600
LAB_00189600:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001895c4
LAB_0018960e:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00189620
LAB_00189617:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_00189620:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int compare_bin(byte *param_1,uint param_2,byte *param_3,uint param_4,char param_5,char param_6)
{
byte bVar1;
byte bVar2;
byte *pbVar3;
int local_68;
uint local_64;
int local_48;
byte *local_28;
uint local_1c;
byte *local_18;
local_64 = param_4;
if (param_2 < param_4) {
local_64 = param_2;
}
local_28 = param_3;
local_18 = param_1;
while (local_18 < param_1 + local_64) {
bVar1 = *local_18;
bVar2 = *local_28;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
if ((uint)bVar1 - (uint)bVar2 != 0) {
return (uint)bVar1 - (uint)bVar2;
}
}
if ((param_5 != '\0') && (param_4 < param_2)) {
return 0;
}
if ((param_6 != '\0') && (param_2 != param_4)) {
local_48 = 1;
local_1c = param_2;
if (param_2 < param_4) {
local_18 = local_28;
local_48 = -1;
local_1c = param_4;
}
pbVar3 = local_18 + ((ulong)local_1c - (ulong)local_64);
while( true ) {
if (pbVar3 <= local_18) {
return 0;
}
if (*local_18 != 0x20) break;
local_18 = local_18 + 1;
}
if (*local_18 < 0x20) {
local_68 = -local_48;
}
else {
local_68 = local_48;
}
return local_68;
}
return param_2 - param_4;
}
| |
39,049 | spdlog::details::registry::throw_if_exists_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/details/registry-inl.h | SPDLOG_INLINE void registry::throw_if_exists_(const std::string &logger_name) {
if (loggers_.find(logger_name) != loggers_.end()) {
throw_spdlog_ex("logger with name '" + logger_name + "' already exists");
}
} | O3 | c | spdlog::details::registry::throw_if_exists_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
addq $0x78, %rdi
callq 0x33b52
testq %rax, %rax
jne 0x2e1a8
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x53758(%rip), %rsi # 0x81907
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2fcf2
leaq 0x53754(%rip), %rsi # 0x8191a
movq %r14, %rdi
callq 0x25290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2e1ef
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x2e1fc
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2c3a9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e23c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x2e23c
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e257
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rdi
callq 0x11760
nop
| _ZN6spdlog7details8registry16throw_if_exists_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
add rdi, 78h ; 'x'
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN6spdlog6loggerEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<spdlog::logger>>,std::allocator<std::pair<std::string const,std::shared_ptr<spdlog::logger>>>,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>>::find(std::string const&)
test rax, rax
jnz short loc_2E1A8
add rsp, 48h
pop rbx
pop r14
retn
loc_2E1A8:
lea rsi, aLoggerWithName; "logger with name '"
lea r14, [rsp+58h+var_30]
mov rdi, r14
mov rdx, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rsi, aAlreadyExists; "' already exists"
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r14, [rsp+58h+var_40]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_2E1EF
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
jmp short loc_2E1FC
loc_2E1EF:
mov [rsp+58h+var_50], rdx
mov rdx, [rcx]
mov [rsp+58h+var_40], rdx
loc_2E1FC:
mov rdx, [rax+8]
lea rdi, [rsp+58h+var_50]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
call _ZN6spdlog15throw_spdlog_exENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::throw_spdlog_ex(std::string)
mov rbx, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r14
jz short loc_2E23C
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2E23C
mov rbx, rax
loc_2E23C:
lea rax, [rsp+58h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2E257
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E257:
mov rdi, rbx
call __Unwind_Resume
| long long spdlog::details::registry::throw_if_exists_(long long a1, long long a2)
{
long long result; // rax
long long v3; // rax
__int128 *v4; // rcx
void *v5[2]; // [rsp+8h] [rbp-50h] BYREF
__int128 v6; // [rsp+18h] [rbp-40h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-30h] BYREF
result = std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<spdlog::logger>>,std::allocator<std::pair<std::string const,std::shared_ptr<spdlog::logger>>>,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>>::find(
a1 + 120,
a2);
if ( result )
{
std::operator+<char>(v7, "logger with name '", a2);
v3 = std::string::append((long long)v7, (long long)"' already exists");
v5[0] = &v6;
v4 = (__int128 *)(v3 + 16);
if ( *(_QWORD *)v3 == v3 + 16 )
{
v6 = *v4;
}
else
{
v5[0] = *(void **)v3;
*(_QWORD *)&v6 = *(_QWORD *)v4;
}
v5[1] = *(void **)(v3 + 8);
*(_QWORD *)v3 = v4;
*(_QWORD *)(v3 + 8) = 0LL;
*(_BYTE *)(v3 + 16) = 0;
spdlog::throw_spdlog_ex((long long)v5);
}
return result;
}
| throw_if_exists_:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
ADD RDI,0x78
CALL 0x00133b52
TEST RAX,RAX
JNZ 0x0012e1a8
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_0012e1a8:
LEA RSI,[0x181907]
LEA R14,[RSP + 0x28]
MOV RDI,R14
MOV RDX,RBX
CALL 0x0012fcf2
LAB_0012e1bf:
LEA RSI,[0x18191a]
MOV RDI,R14
CALL 0x00125290
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0012e1ef
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
JMP 0x0012e1fc
LAB_0012e1ef:
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
LAB_0012e1fc:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0012e218:
CALL 0x0012c3a9
LAB_0012e21d:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x0012e23c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
JMP 0x0012e23c
LAB_0012e23c:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0012e257
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_0012e257:
MOV RDI,RBX
CALL 0x00111760
|
/* spdlog::details::registry::throw_if_exists_(std::__cxx11::string const&) */
void __thiscall spdlog::details::registry::throw_if_exists_(registry *this,string *param_1)
{
long lVar1;
long *plVar2;
int8 uVar3;
long *plVar4;
long *local_50;
long local_40;
int4 uStack_38;
int4 uStack_34;
long *local_30 [2];
long local_20 [2];
lVar1 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<spdlog::logger>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<spdlog::logger>>>,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>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<spdlog::logger>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<spdlog::logger>>>,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>>
*)(this + 0x78),param_1);
if (lVar1 == 0) {
return;
}
std::operator+((char *)local_30,(string *)"logger with name \'");
/* try { // try from 0012e1bf to 0012e1cd has its CatchHandler @ 0012e239 */
plVar2 = (long *)std::__cxx11::string::append((string *)local_30,"\' already exists");
local_50 = (long *)*plVar2;
plVar4 = plVar2 + 2;
if (local_50 == plVar4) {
local_40 = *plVar4;
uStack_38 = (int4)plVar2[3];
uStack_34 = *(int4 *)((long)plVar2 + 0x1c);
local_50 = &local_40;
}
else {
local_40 = *plVar4;
}
*plVar2 = (long)plVar4;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 0012e218 to 0012e21c has its CatchHandler @ 0012e21d */
uVar3 = throw_spdlog_ex();
/* catch() { ... } // from try @ 0012e218 with catch @ 0012e21d */
if (local_50 != &local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar3);
}
| |
39,050 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | llama.cpp/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0x81201
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x20640
movq %rax, %rbx
movq %r14, %rdi
callq 0x7a498
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x99f75(%rip), %rsi # 0x11b19a
leaq 0x10(%rsp), %rdi
callq 0x81297
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x7fef4
xorl %ebp, %ebp
leaq 0xdedf0(%rip), %rsi # 0x160040
leaq -0xac47(%rip), %rdx # 0x76610
movq %rbx, %rdi
callq 0x20a40
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8127d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0x81287
jmp 0x8128f
movq %rax, %r14
movq %rbx, %rdi
callq 0x20ef0
movq %r14, %rdi
callq 0x20ae0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_81201
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_81201:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8127D
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8127D:
test bpl, bpl
jnz short loc_81287
jmp short loc_8128F
mov r14, rax
loc_81287:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8128F:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x00181201
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00181201:
MOV EDI,0x20
CALL 0x00120640
MOV RBX,RAX
MOV RDI,R14
CALL 0x0017a498
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018121e:
LEA RSI,[0x21b19a]
LEA RDI,[RSP + 0x10]
CALL 0x00181297
MOV BPL,0x1
LAB_00181232:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0017fef4
XOR EBP,EBP
LEA RSI,[0x260040]
LEA RDX,[0x176610]
MOV RDI,RBX
CALL 0x00120a40
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long)
const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0018121e to 0018122e has its CatchHandler @ 00181284 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 00181232 to 0018125e has its CatchHandler @ 0018125f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
39,051 | my_mb_wc_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x35235
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x351f4
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x35235
movzbl %dil, %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
je 0x35235
cmpl $0xff, %ecx
je 0x35235
movzbl 0x1(%rdx), %edx
leal 0x1(%rdx), %edi
cmpb $-0x7f, %dil
ja 0x35236
movl %edx, %edi
andb $-0x21, %dil
addb $-0x5b, %dil
cmpb $-0x1a, %dil
jae 0x35236
retq
pushq %rbp
movq %rsp, %rbp
shll $0x8, %ecx
leal (%rcx,%rdx), %eax
addl $0xffff7ebf, %eax # imm = 0xFFFF7EBF
cmpl $0x47bd, %eax # imm = 0x47BD
ja 0x35257
movl %eax, %eax
leaq 0x8755b(%rip), %rcx # 0xbc7b0
jmp 0x35270
orl %edx, %ecx
addl $0xffff355f, %ecx # imm = 0xFFFF355F
cmpl $0x335e, %ecx # imm = 0x335E
jae 0x35289
movl %ecx, %eax
leaq 0x904c0(%rip), %rcx # 0xc5730
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x35295
jmp 0x35290
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_35235
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_351F4
mov [rsi], rdi
mov eax, 1
retn
loc_351F4:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_35235
movzx ecx, dil
xor eax, eax
cmp ecx, 80h
jz short locret_35235
cmp ecx, 0FFh
jz short locret_35235
movzx edx, byte ptr [rdx+1]
lea edi, [rdx+1]
cmp dil, 81h
ja short loc_35236
mov edi, edx
and dil, 0DFh
add dil, 0A5h
cmp dil, 0E6h
jnb short loc_35236
locret_35235:
retn
loc_35236:
push rbp
mov rbp, rsp
shl ecx, 8
lea eax, [rcx+rdx]
add eax, 0FFFF7EBFh
cmp eax, 47BDh
ja short loc_35257
mov eax, eax
lea rcx, tab_ksc5601_uni0
jmp short loc_35270
loc_35257:
or ecx, edx
add ecx, 0FFFF355Fh
cmp ecx, 335Eh
jnb short loc_35289
mov eax, ecx
lea rcx, tab_ksc5601_uni1
loc_35270:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_35295
jmp short loc_35290
loc_35289:
mov qword ptr [rsi], 0
loc_35290:
mov eax, 0FFFFFFFEh
loc_35295:
pop rbp
retn
| long long my_mb_wc_euc_kr(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // edx
int v7; // ecx
long long v8; // rax
unsigned __int16 *v9; // rcx
unsigned int v10; // ecx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) > 0x81u || (unsigned __int8)((v6 & 0xDF) - 91) >= 0xE6u )
{
v7 = (unsigned __int8)v5 << 8;
LODWORD(v8) = v7 + v6 - 33089;
if ( (unsigned int)v8 > 0x47BD )
{
v10 = (v6 | v7) - 51873;
if ( v10 >= 0x335E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = v10;
v9 = (unsigned __int16 *)&tab_ksc5601_uni1;
}
else
{
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_ksc5601_uni0;
}
v11 = v9[v8];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00135235
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001351f4
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001351f4:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00135235
MOVZX ECX,DIL
XOR EAX,EAX
CMP ECX,0x80
JZ 0x00135235
CMP ECX,0xff
JZ 0x00135235
MOVZX EDX,byte ptr [RDX + 0x1]
LEA EDI,[RDX + 0x1]
CMP DIL,0x81
JA 0x00135236
MOV EDI,EDX
AND DIL,0xdf
ADD DIL,0xa5
CMP DIL,0xe6
JNC 0x00135236
LAB_00135235:
RET
LAB_00135236:
PUSH RBP
MOV RBP,RSP
SHL ECX,0x8
LEA EAX,[RCX + RDX*0x1]
ADD EAX,0xffff7ebf
CMP EAX,0x47bd
JA 0x00135257
MOV EAX,EAX
LEA RCX,[0x1bc7b0]
JMP 0x00135270
LAB_00135257:
OR ECX,EDX
ADD ECX,0xffff355f
CMP ECX,0x335e
JNC 0x00135289
MOV EAX,ECX
LEA RCX,[0x1c5730]
LAB_00135270:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00135295
JMP 0x00135290
LAB_00135289:
MOV qword ptr [RSI],0x0
LAB_00135290:
MOV EAX,0xfffffffe
LAB_00135295:
POP RBP
RET
|
int8 my_mb_wc_euc_kr(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
uint uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (bVar1 == 0x80) {
return 0;
}
if (bVar1 == 0xff) {
return 0;
}
bVar2 = param_3[1];
if (((byte)(bVar2 + 1) < 0x82) && ((byte)((bVar2 & 0xdf) + 0xa5) < 0xe6)) {
return 0;
}
uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8141;
if (uVar4 < 0x47be) {
puVar5 = tab_ksc5601_uni0;
}
else {
uVar4 = CONCAT11(bVar1,bVar2) - 0xcaa1;
if (0x335d < uVar4) {
*param_2 = 0;
return 0xfffffffe;
}
puVar5 = tab_ksc5601_uni1;
}
uVar3 = *(ushort *)(puVar5 + (ulong)uVar4 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
| |
39,052 | hexlo | eloqsql/strings/ctype-utf8.c | static int hexlo(int x)
{
static const char hex_lo_digit[256]=
{
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* !"#$%&'()*+,-./ */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, /* 0123456789:;<=>? */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* @ABCDEFGHIJKLMNO */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ[\]^_ */
-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* `abcdefghijklmno */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* pqrstuvwxyz{|}~. */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
};
return hex_lo_digit[(unsigned int) x];
} | O0 | c | hexlo:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x1501fd(%rip), %rax # 0x20c850
movsbl (%rax,%rcx), %eax
popq %rbp
retq
nopl (%rax)
| hexlo:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, hexlo_hex_lo_digit
movsx eax, byte ptr [rax+rcx]
pop rbp
retn
| long long hexlo(int a1)
{
return (unsigned int)hexlo_hex_lo_digit[a1];
}
| hexlo:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0x30c850]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
POP RBP
RET
|
int hexlo(uint param_1)
{
return (int)(char)hexlo_hex_lo_digit[param_1];
}
| |
39,053 | alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test() | AlayaLite/tests/space/quant/sq8_test.cpp | TEST_F(SQ8QuantizerTest, Encode) {
float raw_data[] = {0.0, 5.0, 10.0, 7.5};
uint8_t encoded_data[4] = {0};
quantizer_.min_vector_ = {0.0, 0.0, 0.0, 0.0};
quantizer_.max_vector_ = {10.0, 10.0, 10.0, 10.0};
quantizer_.encode(raw_data, encoded_data);
EXPECT_EQ(encoded_data[0], 0);
EXPECT_EQ(encoded_data[1], 127);
EXPECT_EQ(encoded_data[2], 255);
EXPECT_EQ(encoded_data[3], 191);
} | O0 | cpp | alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x24300
movq 0x8(%rsp), %rdi
movl $0x50, %esi
callq 0x16720
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN5alaya28SQ8QuantizerTest_Encode_TestD0Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
mov [rsp+18h+var_10], rdi
call _ZN5alaya28SQ8QuantizerTest_Encode_TestD2Ev; alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test()
mov rdi, [rsp+18h+var_10]; void *
mov esi, 50h ; 'P'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 18h
retn
| void alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test(
alaya::SQ8QuantizerTest_Encode_Test *this)
{
alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test(this);
operator delete(this, 0x50uLL);
}
| ~SQ8QuantizerTest_Encode_Test:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00124300
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x50
CALL 0x00116720
ADD RSP,0x18
RET
|
/* alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test() */
void __thiscall
alaya::SQ8QuantizerTest_Encode_Test::~SQ8QuantizerTest_Encode_Test
(SQ8QuantizerTest_Encode_Test *this)
{
~SQ8QuantizerTest_Encode_Test(this);
operator_delete(this,0x50);
return;
}
| |
39,054 | google::protobuf::DescriptorProto_ReservedRange::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void DescriptorProto_ReservedRange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
::memset(&_impl_.start_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.end_) -
reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O3 | cpp | google::protobuf::DescriptorProto_ReservedRange::Clear():
testb $0x3, 0x10(%rdi)
je 0xec084
movq $0x0, 0x18(%rdi)
movl $0x0, 0x10(%rdi)
testb $0x1, 0x8(%rdi)
jne 0xec092
retq
addq $0x8, %rdi
jmp 0x73576
nop
| _ZN6google8protobuf29DescriptorProto_ReservedRange5ClearEv:
test byte ptr [rdi+10h], 3
jz short loc_EC084
mov qword ptr [rdi+18h], 0
loc_EC084:
mov dword ptr [rdi+10h], 0
test byte ptr [rdi+8], 1
jnz short loc_EC092
retn
loc_EC092:
add rdi, 8
jmp _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
| long long google::protobuf::DescriptorProto_ReservedRange::Clear(
google::protobuf::DescriptorProto_ReservedRange *this)
{
long long result; // rax
if ( (*((_BYTE *)this + 16) & 3) != 0 )
*((_QWORD *)this + 3) = 0LL;
*((_DWORD *)this + 4) = 0;
if ( (*((_BYTE *)this + 8) & 1) != 0 )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((long long *)this + 1);
return result;
}
| Clear:
TEST byte ptr [RDI + 0x10],0x3
JZ 0x001ec084
MOV qword ptr [RDI + 0x18],0x0
LAB_001ec084:
MOV dword ptr [RDI + 0x10],0x0
TEST byte ptr [RDI + 0x8],0x1
JNZ 0x001ec092
RET
LAB_001ec092:
ADD RDI,0x8
JMP 0x00173576
|
/* google::protobuf::DescriptorProto_ReservedRange::Clear() */
void __thiscall
google::protobuf::DescriptorProto_ReservedRange::Clear(DescriptorProto_ReservedRange *this)
{
if (((byte)this[0x10] & 3) != 0) {
*(int8 *)(this + 0x18) = 0;
}
*(int4 *)(this + 0x10) = 0;
if (((byte)this[8] & 1) == 0) {
return;
}
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
return;
}
| |
39,055 | void reaction::ObserverGraph::addNode<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>) | reaction/include/reaction/observerNode.h | void addNode(std::shared_ptr<NodeType> node) {
if constexpr (std::is_same_v<typename NodeType::SourceType, DataNode>) {
m_dataDependents[node] = std::unordered_set<DataNodePtr>();
m_dataObservers[node] = std::unordered_map<DataNodePtr, std::function<void(bool)>>();
m_actionObservers[node] = std::unordered_map<ActionNodePtr, std::function<void(bool)>>();
} else {
m_actionDependents[node] = std::unordered_set<DataNodePtr>();
}
} | O3 | c | void reaction::ObserverGraph::addNode<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %r12
movq $0x0, -0x10(%r12)
movq %r12, -0x30(%r12)
movq $0x1, -0x28(%r12)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r12)
movl $0x3f800000, -0x10(%r12) # imm = 0x3F800000
movups %xmm0, -0x8(%r12)
movq (%rsi), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rcx, (%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3930
movq 0x1069e(%rip), %rcx # 0x13fc0
cmpb $0x0, (%rcx)
je 0x392c
incl 0x8(%rax)
jmp 0x3930
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x65b2
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x22a0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3957
callq 0x4f16
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x616c
movq $0x0, 0x20(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
leaq 0x38(%rbx), %rdi
movq (%r14), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmovneq %rcx, %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x39c5
movq 0x10609(%rip), %rcx # 0x13fc0
cmpb $0x0, (%rcx)
je 0x39c1
incl 0x8(%rax)
jmp 0x39c5
lock
incl 0x8(%rax)
movq %rsp, %rsi
callq 0x68aa
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x2358
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x39e9
callq 0x4f16
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x640e
movq $0x0, 0x20(%r15)
movq %r12, (%r15)
movq $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x20(%r15) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
addq $0x70, %rbx
movq (%r14), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rcx, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3a57
movq 0x10577(%rip), %rcx # 0x13fc0
cmpb $0x0, (%rcx)
je 0x3a53
incl 0x8(%rax)
jmp 0x3a57
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6ba2
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x23fc
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7e
callq 0x4f16
leaq 0x10(%rsp), %rdi
callq 0x629e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3ad4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aa8
callq 0x4f16
leaq 0x10(%rsp), %rdi
callq 0x629e
jmp 0x3af8
jmp 0x3ad4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3ac8
callq 0x4f16
leaq 0x10(%rsp), %rdi
callq 0x640e
jmp 0x3af8
movq %rax, %rdi
callq 0x3814
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aee
callq 0x4f16
leaq 0x10(%rsp), %rdi
callq 0x616c
movq %rbx, %rdi
callq 0x2270
| _ZN8reaction13ObserverGraph7addNodeITkNS_6NodeCCENS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEEEvSt10shared_ptrIT_E:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+68h+var_28]
mov qword ptr [r12-10h], 0
mov [r12-30h], r12
mov qword ptr [r12-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [r12-20h], xmm0
mov dword ptr [r12-10h], 3F800000h
movups xmmword ptr [r12-8], xmm0
mov rax, [rsi]
lea rcx, [rax+8]
test rax, rax
cmovz rcx, rax
mov [rsp+68h+var_68], rcx
mov rax, [rsi+8]
mov [rsp+68h+var_60], rax
test rax, rax
jz short loc_3930
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_392C
inc dword ptr [rax+8]
jmp short loc_3930
loc_392C:
lock inc dword ptr [rax+8]
loc_3930:
mov rsi, rsp
mov rdi, rbx
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_setIS4_St4hashIS4_ESt8equal_toIS4_ESaIS4_EEESaISE_ENS_10_Select1stESB_S9_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOS4_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode>&&)
lea rsi, [rsp+68h+var_58]
mov rdi, rax
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE14_M_move_assignEOSG_St17integral_constantIbLb1EE; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_move_assign(std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>&&,std::integral_constant<bool,true>)
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_3957
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3957:
lea r15, [rsp+68h+var_58]
mov rdi, r15
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
mov qword ptr [r15+20h], 0
mov [r15], r12
mov qword ptr [r15+8], 1
xorps xmm0, xmm0
movups xmmword ptr [r15+10h], xmm0
mov dword ptr [r15+20h], 3F800000h
movups xmmword ptr [r15+28h], xmm0
lea rdi, [rbx+38h]
mov rax, [r14]
lea rcx, [rax+8]
test rax, rax
cmovnz rax, rcx
mov [rsp+68h+var_68], rax
mov rax, [r14+8]
mov [rsp+68h+var_60], rax
test rax, rax
jz short loc_39C5
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_39C1
inc dword ptr [rax+8]
jmp short loc_39C5
loc_39C1:
lock inc dword ptr [rax+8]
loc_39C5:
mov rsi, rsp
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_mapIS4_St8functionIFvbEESt4hashIS4_ESt8equal_toIS4_ESaIS5_IS6_SA_EEEESaISI_ENS_10_Select1stESE_SC_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOS4_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode>&&)
lea rsi, [rsp+68h+var_58]
mov rdi, rax
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE14_M_move_assignEOSM_St17integral_constantIbLb1EE; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_move_assign(std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>&&,std::integral_constant<bool,true>)
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_39E9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_39E9:
lea r15, [rsp+68h+var_58]
mov rdi, r15
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov qword ptr [r15+20h], 0
mov [r15], r12
mov qword ptr [r15+8], 1
xorps xmm0, xmm0
movups xmmword ptr [r15+10h], xmm0
mov dword ptr [r15+20h], 3F800000h
movups xmmword ptr [r15+28h], xmm0
add rbx, 70h ; 'p'
mov rax, [r14]
lea rcx, [rax+8]
test rax, rax
cmovz rcx, rax
mov [rsp+68h+var_68], rcx
mov rax, [r14+8]
mov [rsp+68h+var_60], rax
test rax, rax
jz short loc_3A57
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_3A53
inc dword ptr [rax+8]
jmp short loc_3A57
loc_3A53:
lock inc dword ptr [rax+8]
loc_3A57:
mov rsi, rsp
mov rdi, rbx
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_mapIS1_INS2_18ObserverActionNodeEESt8functionIFvbEESt4hashIS9_ESt8equal_toIS9_ESaIS5_IKS9_SC_EEEESaISL_ENS_10_Select1stESF_IS4_ESD_IS4_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOS4_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode>&&)
lea rsi, [rsp+68h+var_58]
mov rdi, rax
call _ZNSt10_HashtableISt10shared_ptrIN8reaction18ObserverActionNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE14_M_move_assignEOSM_St17integral_constantIbLb1EE; std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_move_assign(std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>&&,std::integral_constant<bool,true>)
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_3A7E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3A7E:
lea rdi, [rsp+68h+var_58]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction18ObserverActionNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_3AD4
mov rbx, rax
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_3AA8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AA8:
lea rdi, [rsp+68h+var_58]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction18ObserverActionNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
jmp short loc_3AF8
jmp short loc_3AD4
mov rbx, rax
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_3AC8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AC8:
lea rdi, [rsp+68h+var_58]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
jmp short loc_3AF8
loc_3AD4:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_3AEE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AEE:
lea rdi, [rsp+68h+var_58]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
loc_3AF8:
mov rdi, rbx
call __Unwind_Resume
| long long ZN8reaction13ObserverGraph7addNodeITkNS_6NodeCCENS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEEEvSt10shared_ptrIT_E(
long long a1,
long long *a2)
{
long long v2; // rcx
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rcx
long long v9; // rax
long long v10; // rax
long long v12; // [rsp+0h] [rbp-68h] BYREF
long long v13; // [rsp+8h] [rbp-60h]
long long v14; // [rsp+10h] [rbp-58h] BYREF
long long v15; // [rsp+18h] [rbp-50h]
__int128 v16; // [rsp+20h] [rbp-48h]
long long v17; // [rsp+30h] [rbp-38h]
_OWORD v18[3]; // [rsp+38h] [rbp-30h] BYREF
v17 = 1065353216LL;
v14 = (long long)v18 + 8;
v15 = 1LL;
v16 = 0LL;
v18[0] = 0LL;
v2 = *a2 + 8;
if ( !*a2 )
v2 = 0LL;
v12 = v2;
v3 = a2[1];
v13 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
v4 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1,
&v12);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_move_assign(
v4,
&v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable(&v14);
v17 = 1065353216LL;
v14 = (long long)v18 + 8;
v15 = 1LL;
v16 = 0LL;
v18[0] = 0LL;
v5 = *a2;
if ( *a2 )
v5 = *a2 + 8;
v12 = v5;
v6 = a2[1];
v13 = v6;
if ( v6 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v6 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v6 + 8));
}
v7 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1 + 56,
&v12);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_move_assign(
v7,
&v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(&v14);
v17 = 1065353216LL;
v14 = (long long)v18 + 8;
v15 = 1LL;
v16 = 0LL;
v18[0] = 0LL;
v8 = *a2 + 8;
if ( !*a2 )
v8 = 0LL;
v12 = v8;
v9 = a2[1];
v13 = v9;
if ( v9 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v9 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v9 + 8));
}
v10 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1 + 112,
&v12);
std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_move_assign(
v10,
&v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
return std::_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(&v14);
}
| _ZN8reaction13ObserverGraph7addNodeITkNS_6NodeCCENS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEEEvSt10shared_ptrIT_E:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x40]
MOV qword ptr [R12 + -0x10],0x0
MOV qword ptr [R12 + -0x30],R12
MOV qword ptr [R12 + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + -0x20],XMM0
MOV dword ptr [R12 + -0x10],0x3f800000
MOVUPS xmmword ptr [R12 + -0x8],XMM0
MOV RAX,qword ptr [RSI]
LEA RCX,[RAX + 0x8]
TEST RAX,RAX
CMOVZ RCX,RAX
MOV qword ptr [RSP],RCX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00103930
MOV RCX,qword ptr [0x00113fc0]
CMP byte ptr [RCX],0x0
JZ 0x0010392c
INC dword ptr [RAX + 0x8]
JMP 0x00103930
LAB_0010392c:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00103930:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001065b2
LAB_0010393b:
LEA RSI,[RSP + 0x10]
MOV RDI,RAX
CALL 0x001022a0
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00103957
CALL 0x00104f16
LAB_00103957:
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x0010616c
MOV qword ptr [R15 + 0x20],0x0
MOV qword ptr [R15],R12
MOV qword ptr [R15 + 0x8],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x10],XMM0
MOV dword ptr [R15 + 0x20],0x3f800000
MOVUPS xmmword ptr [R15 + 0x28],XMM0
LEA RDI,[RBX + 0x38]
MOV RAX,qword ptr [R14]
LEA RCX,[RAX + 0x8]
TEST RAX,RAX
CMOVNZ RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x001039c5
MOV RCX,qword ptr [0x00113fc0]
CMP byte ptr [RCX],0x0
JZ 0x001039c1
INC dword ptr [RAX + 0x8]
JMP 0x001039c5
LAB_001039c1:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001039c5:
MOV RSI,RSP
CALL 0x001068aa
LAB_001039cd:
LEA RSI,[RSP + 0x10]
MOV RDI,RAX
CALL 0x00102358
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001039e9
CALL 0x00104f16
LAB_001039e9:
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x0010640e
MOV qword ptr [R15 + 0x20],0x0
MOV qword ptr [R15],R12
MOV qword ptr [R15 + 0x8],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x10],XMM0
MOV dword ptr [R15 + 0x20],0x3f800000
MOVUPS xmmword ptr [R15 + 0x28],XMM0
ADD RBX,0x70
MOV RAX,qword ptr [R14]
LEA RCX,[RAX + 0x8]
TEST RAX,RAX
CMOVZ RCX,RAX
MOV qword ptr [RSP],RCX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00103a57
MOV RCX,qword ptr [0x00113fc0]
CMP byte ptr [RCX],0x0
JZ 0x00103a53
INC dword ptr [RAX + 0x8]
JMP 0x00103a57
LAB_00103a53:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00103a57:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00106ba2
LAB_00103a62:
LEA RSI,[RSP + 0x10]
MOV RDI,RAX
CALL 0x001023fc
LAB_00103a6f:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00103a7e
CALL 0x00104f16
LAB_00103a7e:
LEA RDI,[RSP + 0x10]
CALL 0x0010629e
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
void _ZN8reaction13ObserverGraph7addNodeITkNS_6NodeCCENS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEEEvSt10shared_ptrIT_E
(_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*param_1,long *param_2)
{
int8 uVar1;
long local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
int8 *local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 local_30;
int8 uStack_28;
local_50 = 1;
local_48 = 0;
uStack_40 = 0;
local_38 = 0x3f800000;
local_30 = 0;
uStack_28 = 0;
local_68 = *param_2 + 8;
if (*param_2 == 0) {
local_68 = 0;
}
local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00113fc0 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
/* try { // try from 00103930 to 0010393a has its CatchHandler @ 00103adc */
local_58 = &uStack_28;
uVar1 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[](param_1,(shared_ptr *)&local_68);
/* try { // try from 0010393b to 00103947 has its CatchHandler @ 00103ad4 */
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::_M_move_assign(uVar1,&local_58);
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::~_Hashtable((_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
*)&local_58);
local_50 = 1;
local_48 = 0;
uStack_40 = 0;
local_38 = 0x3f800000;
local_30 = 0;
uStack_28 = 0;
local_68 = *param_2;
if (local_68 != 0) {
local_68 = local_68 + 8;
}
local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00113fc0 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
/* try { // try from 001039c5 to 001039cc has its CatchHandler @ 00103ab6 */
local_58 = &uStack_28;
uVar1 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(param_1 + 0x38),(shared_ptr *)&local_68);
/* try { // try from 001039cd to 001039d9 has its CatchHandler @ 00103ab4 */
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_M_move_assign(uVar1,&local_58);
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_58);
local_50 = 1;
local_48 = 0;
uStack_40 = 0;
local_38 = 0x3f800000;
local_30 = 0;
uStack_28 = 0;
local_68 = *param_2 + 8;
if (*param_2 == 0) {
local_68 = 0;
}
local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00113fc0 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
/* try { // try from 00103a57 to 00103a61 has its CatchHandler @ 00103a96 */
local_58 = &uStack_28;
uVar1 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(param_1 + 0x70),(shared_ptr *)&local_68);
/* try { // try from 00103a62 to 00103a6e has its CatchHandler @ 00103a94 */
std::
_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_M_move_assign(uVar1,&local_58);
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
std::
_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<std::shared_ptr<reaction::ObserverActionNode>,std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_58);
return;
}
| |
39,056 | ma_read_key_record | eloqsql/storage/maria/ma_key.c | int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
{
fast_ma_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf))
{
_ma_set_fatal_error(info, HA_ERR_CRASHED);
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O0 | c | ma_read_key_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x34a9f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x35c40
cmpq $-0x1, -0x20(%rbp)
je 0x34b12
movq -0x10(%rbp), %rax
cmpl $0x0, 0x62c(%rax)
jl 0x34b07
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x62c(%rax), %esi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x34b30
cmpl $0x0, %eax
je 0x34aeb
movq -0x10(%rbp), %rdi
movl $0x7e, %esi
callq 0x33880
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x34b19
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x34b19
callq 0xf6090
movl $0x7c, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_read_key_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_34A9F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_34A9F:
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jz short loc_34B12
mov rax, [rbp+var_10]
cmp dword ptr [rax+62Ch], 0
jl short loc_34B07
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov esi, [rax+62Ch]
mov rcx, [rbp+var_18]
mov edx, 1
call _ma_put_key_in_record
cmp eax, 0
jz short loc_34AEB
mov rdi, [rbp+var_10]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_34B19
loc_34AEB:
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov [rbp+var_4], 0
jmp short loc_34B19
loc_34B07:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
loc_34B12:
mov [rbp+var_4], 0FFFFFFFFh
loc_34B19:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_read_key_record(int *a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo(a1, 0LL);
if ( a3 == -1 )
return (unsigned int)-1;
if ( a1[395] < 0 )
{
*(_DWORD *)my_thread_var() = 124;
return (unsigned int)-1;
}
if ( (unsigned int)ma_put_key_in_record(a1, (unsigned int)a1[395], 1LL, a2) )
{
ma_set_fatal_error(a1, 126, v3, v4, v5, v6);
return (unsigned int)-1;
}
else
{
a1[393] |= 2u;
return 0;
}
}
| _ma_read_key_record:
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
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00134a9f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00135c40
LAB_00134a9f:
CMP qword ptr [RBP + -0x20],-0x1
JZ 0x00134b12
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x62c],0x0
JL 0x00134b07
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x62c]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x00134b30
CMP EAX,0x0
JZ 0x00134aeb
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7e
CALL 0x00133880
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00134b19
LAB_00134aeb:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00134b19
LAB_00134b07:
CALL 0x001f6090
MOV dword ptr [RAX],0x7c
LAB_00134b12:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00134b19:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _ma_read_key_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
if (param_3 != -1) {
if (-1 < *(int *)((long)param_1 + 0x62c)) {
iVar1 = _ma_put_key_in_record(param_1,*(int4 *)((long)param_1 + 0x62c),1,param_2);
if (iVar1 != 0) {
_ma_set_fatal_error(param_1,0x7e);
return 0xffffffff;
}
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2;
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
return 0xffffffff;
}
| |
39,057 | pfs_end_mutex_wait_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_end_mutex_wait_v1(PSI_mutex_locker* locker, int rc)
{
PSI_mutex_locker_state *state= reinterpret_cast<PSI_mutex_locker_state*> (locker);
assert(state != NULL);
ulonglong timer_end= 0;
ulonglong wait_time= 0;
PFS_mutex *mutex= reinterpret_cast<PFS_mutex *> (state->m_mutex);
assert(mutex != NULL);
PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED)
{
timer_end= state->m_timer();
wait_time= timer_end - state->m_timer_start;
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (timed) */
mutex->m_mutex_stat.m_wait_stat.aggregate_value(wait_time);
}
else
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */
mutex->m_mutex_stat.m_wait_stat.aggregate_counted();
}
if (likely(rc == 0))
{
mutex->m_owner= thread;
mutex->m_last_locked= timer_end;
}
if (flags & STATE_FLAG_THREAD)
{
PFS_single_stat *event_name_array;
event_name_array= thread->write_instr_class_waits_stats();
uint index= mutex->m_class->m_event_name_index;
assert(index <= wait_class_max);
assert(sanitize_thread(thread) != NULL);
if (flags & STATE_FLAG_TIMED)
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */
event_name_array[index].aggregate_value(wait_time);
}
else
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */
event_name_array[index].aggregate_counted();
}
if (flags & STATE_FLAG_EVENT)
{
PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
assert(wait != NULL);
wait->m_timer_end= timer_end;
wait->m_end_event_id= thread->m_event_id;
if (thread->m_flag_events_waits_history)
insert_events_waits_history(thread, wait);
if (thread->m_flag_events_waits_history_long)
insert_events_waits_history_long(wait);
thread->m_events_waits_current--;
assert(wait == thread->m_events_waits_current);
}
}
} | O3 | cpp | pfs_end_mutex_wait_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %rbx
movl (%rdi), %r13d
testb $0x1, %r13b
jne 0x29c66
incq 0x20(%r12)
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x29cb0
movl %esi, -0x30(%rbp)
callq *0x20(%r14)
movq %rax, %r15
subq 0x18(%r14), %r15
movdqu 0x20(%r12), %xmm0
movq %r15, %xmm1
movdqa 0x5b9e8(%rip), %xmm2 # 0x85670
punpcklqdq %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x20(%r12)
cmpq %r15, 0x30(%r12)
ja 0x29d65
cmpq %r15, 0x38(%r12)
jb 0x29d6f
movl -0x30(%rbp), %esi
testl %esi, %esi
jne 0x29cbe
movq %rbx, 0x40(%r12)
movq %rax, 0x48(%r12)
testb $0x2, %r13b
je 0x29d56
cmpb $0x0, (%rbx)
jne 0x29ce0
movq %rbx, %rdi
movq %rax, -0x30(%rbp)
callq 0x46378
movq -0x30(%rbp), %rax
movb $0x1, (%rbx)
movq 0x8(%rbx), %rdx
movq 0x18(%r12), %rcx
movl 0x10(%rcx), %ecx
shlq $0x5, %rcx
incq (%rdx,%rcx)
testb $0x1, %r13b
je 0x29d0d
addq %rcx, %rdx
addq %r15, 0x8(%rdx)
cmpq %r15, 0x10(%rdx)
ja 0x29d79
cmpq %r15, 0x18(%rdx)
jb 0x29d7f
testb $0x4, %r13b
je 0x29d56
movq 0x28(%r14), %r14
movq %rax, 0x40(%r14)
movq 0x7f8(%rbx), %rax
movq %rax, 0x10(%r14)
cmpb $0x1, 0x7e2(%rbx)
jne 0x29d3a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x272d2
cmpb $0x1, 0x7e3(%rbx)
jne 0x29d4b
movq %r14, %rdi
callq 0x2732e
addq $-0xb0, 0x7f0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x30(%r12)
jmp 0x29ca2
movq %r15, 0x38(%r12)
jmp 0x29cad
movq %r15, 0x10(%rdx)
jmp 0x29d07
movq %r15, 0x18(%rdx)
jmp 0x29d0d
| pfs_end_mutex_wait_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [rdi+10h]
mov r13d, [rdi]
test r13b, 1
jnz short loc_29C66
inc qword ptr [r12+20h]
xor r15d, r15d
xor eax, eax
jmp short loc_29CB0
loc_29C66:
mov dword ptr [rbp+var_30], esi
call qword ptr [r14+20h]
mov r15, rax
sub r15, [r14+18h]
movdqu xmm0, xmmword ptr [r12+20h]
movq xmm1, r15
movdqa xmm2, cs:xmmword_85670
punpcklqdq xmm2, xmm1
paddq xmm2, xmm0
movdqu xmmword ptr [r12+20h], xmm2
cmp [r12+30h], r15
ja loc_29D65
loc_29CA2:
cmp [r12+38h], r15
jb loc_29D6F
loc_29CAD:
mov esi, dword ptr [rbp+var_30]
loc_29CB0:
test esi, esi
jnz short loc_29CBE
mov [r12+40h], rbx
mov [r12+48h], rax
loc_29CBE:
test r13b, 2
jz loc_29D56
cmp byte ptr [rbx], 0
jnz short loc_29CE0
mov rdi, rbx; this
mov [rbp+var_30], rax
call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void)
mov rax, [rbp+var_30]
mov byte ptr [rbx], 1
loc_29CE0:
mov rdx, [rbx+8]
mov rcx, [r12+18h]
mov ecx, [rcx+10h]
shl rcx, 5
inc qword ptr [rdx+rcx]
test r13b, 1
jz short loc_29D0D
add rdx, rcx
add [rdx+8], r15
cmp [rdx+10h], r15
ja short loc_29D79
loc_29D07:
cmp [rdx+18h], r15
jb short loc_29D7F
loc_29D0D:
test r13b, 4
jz short loc_29D56
mov r14, [r14+28h]
mov [r14+40h], rax
mov rax, [rbx+7F8h]
mov [r14+10h], rax
cmp byte ptr [rbx+7E2h], 1
jnz short loc_29D3A
mov rdi, rbx
mov rsi, r14
call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *)
loc_29D3A:
cmp byte ptr [rbx+7E3h], 1
jnz short loc_29D4B
mov rdi, r14
call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *)
loc_29D4B:
add qword ptr [rbx+7F0h], 0FFFFFFFFFFFFFF50h
loc_29D56:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29D65:
mov [r12+30h], r15
jmp loc_29CA2
loc_29D6F:
mov [r12+38h], r15
jmp loc_29CAD
loc_29D79:
mov [rdx+10h], r15
jmp short loc_29D07
loc_29D7F:
mov [rdx+18h], r15
jmp short loc_29D0D
| long long pfs_end_mutex_wait_v1(int *a1, int a2)
{
const __m128i *v2; // r12
long long v3; // rbx
int v4; // r13d
unsigned long long v5; // r15
long long result; // rax
long long v7; // rdx
long long v8; // rcx
_QWORD *v9; // rdx
long long v10; // r14
long long v11; // [rsp+0h] [rbp-30h]
v2 = (const __m128i *)*((_QWORD *)a1 + 1);
v3 = *((_QWORD *)a1 + 2);
v4 = *a1;
if ( (*a1 & 1) != 0 )
{
result = (*((long long (**)(void))a1 + 4))();
v5 = result - *((_QWORD *)a1 + 3);
v2[2] = _mm_add_epi64(
_mm_unpacklo_epi64(_mm_load_si128((const __m128i *)&xmmword_85670), (__m128i)v5),
_mm_loadu_si128(v2 + 2));
if ( v2[3].m128i_i64[0] > v5 )
v2[3].m128i_i64[0] = v5;
if ( v2[3].m128i_i64[1] < v5 )
v2[3].m128i_i64[1] = v5;
}
else
{
++v2[2].m128i_i64[0];
v5 = 0LL;
result = 0LL;
}
if ( !a2 )
{
v2[4].m128i_i64[0] = v3;
v2[4].m128i_i64[1] = result;
}
if ( (v4 & 2) != 0 )
{
if ( !*(_BYTE *)v3 )
{
v11 = result;
PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)v3);
result = v11;
*(_BYTE *)v3 = 1;
}
v7 = *(_QWORD *)(v3 + 8);
v8 = 32LL * *(unsigned int *)(v2[1].m128i_i64[1] + 16);
++*(_QWORD *)(v7 + v8);
if ( (v4 & 1) != 0 )
{
v9 = (_QWORD *)(v8 + v7);
v9[1] += v5;
if ( v9[2] > v5 )
v9[2] = v5;
if ( v9[3] < v5 )
v9[3] = v5;
}
if ( (v4 & 4) != 0 )
{
v10 = *((_QWORD *)a1 + 5);
*(_QWORD *)(v10 + 64) = result;
result = *(_QWORD *)(v3 + 2040);
*(_QWORD *)(v10 + 16) = result;
if ( *(_BYTE *)(v3 + 2018) == 1 )
result = insert_events_waits_history(v3, v10);
if ( *(_BYTE *)(v3 + 2019) == 1 )
result = insert_events_waits_history_long(v10);
*(_QWORD *)(v3 + 2032) -= 176LL;
}
}
return result;
}
| pfs_end_mutex_wait_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI + 0x10]
MOV R13D,dword ptr [RDI]
TEST R13B,0x1
JNZ 0x00129c66
INC qword ptr [R12 + 0x20]
XOR R15D,R15D
XOR EAX,EAX
JMP 0x00129cb0
LAB_00129c66:
MOV dword ptr [RBP + -0x30],ESI
CALL qword ptr [R14 + 0x20]
MOV R15,RAX
SUB R15,qword ptr [R14 + 0x18]
MOVDQU XMM0,xmmword ptr [R12 + 0x20]
MOVQ XMM1,R15
MOVDQA XMM2,xmmword ptr [0x00185670]
PUNPCKLQDQ XMM2,XMM1
PADDQ XMM2,XMM0
MOVDQU xmmword ptr [R12 + 0x20],XMM2
CMP qword ptr [R12 + 0x30],R15
JA 0x00129d65
LAB_00129ca2:
CMP qword ptr [R12 + 0x38],R15
JC 0x00129d6f
LAB_00129cad:
MOV ESI,dword ptr [RBP + -0x30]
LAB_00129cb0:
TEST ESI,ESI
JNZ 0x00129cbe
MOV qword ptr [R12 + 0x40],RBX
MOV qword ptr [R12 + 0x48],RAX
LAB_00129cbe:
TEST R13B,0x2
JZ 0x00129d56
CMP byte ptr [RBX],0x0
JNZ 0x00129ce0
MOV RDI,RBX
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00146378
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RBX],0x1
LAB_00129ce0:
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [R12 + 0x18]
MOV ECX,dword ptr [RCX + 0x10]
SHL RCX,0x5
INC qword ptr [RDX + RCX*0x1]
TEST R13B,0x1
JZ 0x00129d0d
ADD RDX,RCX
ADD qword ptr [RDX + 0x8],R15
CMP qword ptr [RDX + 0x10],R15
JA 0x00129d79
LAB_00129d07:
CMP qword ptr [RDX + 0x18],R15
JC 0x00129d7f
LAB_00129d0d:
TEST R13B,0x4
JZ 0x00129d56
MOV R14,qword ptr [R14 + 0x28]
MOV qword ptr [R14 + 0x40],RAX
MOV RAX,qword ptr [RBX + 0x7f8]
MOV qword ptr [R14 + 0x10],RAX
CMP byte ptr [RBX + 0x7e2],0x1
JNZ 0x00129d3a
MOV RDI,RBX
MOV RSI,R14
CALL 0x001272d2
LAB_00129d3a:
CMP byte ptr [RBX + 0x7e3],0x1
JNZ 0x00129d4b
MOV RDI,R14
CALL 0x0012732e
LAB_00129d4b:
ADD qword ptr [RBX + 0x7f0],-0xb0
LAB_00129d56:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00129d65:
MOV qword ptr [R12 + 0x30],R15
JMP 0x00129ca2
LAB_00129d6f:
MOV qword ptr [R12 + 0x38],R15
JMP 0x00129cad
LAB_00129d79:
MOV qword ptr [RDX + 0x10],R15
JMP 0x00129d07
LAB_00129d7f:
MOV qword ptr [RDX + 0x18],R15
JMP 0x00129d0d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void pfs_end_mutex_wait_v1(uint *param_1,int param_2)
{
long *plVar1;
uint uVar2;
PFS_connection_slice *this;
PFS_events_waits *pPVar3;
long lVar4;
long lVar5;
long lVar6;
ulong uVar7;
lVar5 = *(long *)(param_1 + 2);
this = *(PFS_connection_slice **)(param_1 + 4);
uVar2 = *param_1;
if ((uVar2 & 1) == 0) {
*(long *)(lVar5 + 0x20) = *(long *)(lVar5 + 0x20) + 1;
uVar7 = 0;
lVar4 = 0;
}
else {
lVar4 = (**(code **)(param_1 + 8))();
uVar7 = lVar4 - *(long *)(param_1 + 6);
*(long *)(lVar5 + 0x20) = _DAT_00185670 + *(long *)(lVar5 + 0x20);
*(ulong *)(lVar5 + 0x28) = uVar7 + *(long *)(lVar5 + 0x28);
if (uVar7 < *(ulong *)(lVar5 + 0x30)) {
*(ulong *)(lVar5 + 0x30) = uVar7;
}
if (*(ulong *)(lVar5 + 0x38) < uVar7) {
*(ulong *)(lVar5 + 0x38) = uVar7;
}
}
if (param_2 == 0) {
*(PFS_connection_slice **)(lVar5 + 0x40) = this;
*(long *)(lVar5 + 0x48) = lVar4;
}
if ((uVar2 & 2) != 0) {
if (*this == (PFS_connection_slice)0x0) {
PFS_connection_slice::reset_waits_stats(this);
*this = (PFS_connection_slice)0x1;
}
lVar6 = *(long *)(this + 8);
lVar5 = (ulong)*(uint *)(*(long *)(lVar5 + 0x18) + 0x10) * 0x20;
plVar1 = (long *)(lVar6 + lVar5);
*plVar1 = *plVar1 + 1;
if ((uVar2 & 1) != 0) {
lVar6 = lVar6 + lVar5;
*(long *)(lVar6 + 8) = *(long *)(lVar6 + 8) + uVar7;
if (uVar7 < *(ulong *)(lVar6 + 0x10)) {
*(ulong *)(lVar6 + 0x10) = uVar7;
}
if (*(ulong *)(lVar6 + 0x18) < uVar7) {
*(ulong *)(lVar6 + 0x18) = uVar7;
}
}
if ((uVar2 & 4) != 0) {
pPVar3 = *(PFS_events_waits **)(param_1 + 10);
*(long *)(pPVar3 + 0x40) = lVar4;
*(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8);
if (this[0x7e2] == (PFS_connection_slice)0x1) {
insert_events_waits_history((PFS_thread *)this,pPVar3);
}
if (this[0x7e3] == (PFS_connection_slice)0x1) {
insert_events_waits_history_long(pPVar3);
}
*(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0;
}
}
return;
}
| |
39,058 | ma_mark_file_changed | eloqsql/storage/maria/ma_locking.c | int _ma_mark_file_changed(register MARIA_SHARE *share)
{
if (!share->base.born_transactional)
{
if (!_MA_ALREADY_MARKED_FILE_CHANGED)
return _ma_mark_file_changed_now(share);
}
else
{
/*
For transactional tables, the table is marked changed when the first page
is written. Here we just mark the state to be updated so that caller
can do 'analyze table' and find that is has changed before any pages
are written.
*/
if (! test_all_bits(share->state.changed,
(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS)))
{
mysql_mutex_lock(&share->intern_lock);
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
mysql_mutex_unlock(&share->intern_lock);
}
}
return 0;
} | O3 | c | ma_mark_file_changed:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x44c(%rdi)
movl 0x170(%rdi), %eax
je 0x63053
notl %eax
testb $0x19, %al
je 0x63060
leaq 0x8f0(%rbx), %r14
cmpq $0x0, 0x930(%rbx)
jne 0x63073
movq %r14, %rdi
callq 0x2a230
orb $0x19, 0x170(%rbx)
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x63089
movq %r14, %rdi
callq 0x2a1f0
jmp 0x63060
testb $0x1, %al
je 0x63067
cmpb $0x0, 0x7df(%rbx)
je 0x63067
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6309b
leaq 0x98965(%rip), %rsi # 0xfb9df
movq %r14, %rdi
movl $0x19c, %edx # imm = 0x19C
callq 0x312ea
jmp 0x63036
leaq 0x34b988(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x63049
| _ma_mark_file_changed:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
cmp byte ptr [rdi+44Ch], 0
mov eax, [rdi+170h]
jz short loc_63053
not eax
test al, 19h
jz short loc_63060
lea r14, [rbx+8F0h]
cmp qword ptr [rbx+930h], 0
jnz short loc_63073
mov rdi, r14
call _pthread_mutex_lock
loc_63036:
or byte ptr [rbx+170h], 19h
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_63089
loc_63049:
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_63060
loc_63053:
test al, 1
jz short loc_63067
cmp byte ptr [rbx+7DFh], 0
jz short loc_63067
loc_63060:
xor eax, eax
pop rbx
pop r14
pop rbp
retn
loc_63067:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _ma_mark_file_changed_now
loc_63073:
lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 19Ch
call psi_mutex_lock
jmp short loc_63036
loc_63089:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_63049
| long long ma_mark_file_changed(long long a1)
{
int v1; // eax
v1 = *(_DWORD *)(a1 + 368);
if ( *(_BYTE *)(a1 + 1100) )
{
if ( (~(_BYTE)v1 & 0x19) != 0 )
{
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(
a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x19Cu);
else
pthread_mutex_lock(a1 + 2288);
*(_BYTE *)(a1 + 368) |= 0x19u;
if ( *(_QWORD *)(a1 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 2288);
}
return 0LL;
}
if ( (v1 & 1) != 0 && *(_BYTE *)(a1 + 2015) )
return 0LL;
return ma_mark_file_changed_now(a1);
}
| _ma_mark_file_changed:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CMP byte ptr [RDI + 0x44c],0x0
MOV EAX,dword ptr [RDI + 0x170]
JZ 0x00163053
NOT EAX
TEST AL,0x19
JZ 0x00163060
LEA R14,[RBX + 0x8f0]
CMP qword ptr [RBX + 0x930],0x0
JNZ 0x00163073
MOV RDI,R14
CALL 0x0012a230
LAB_00163036:
OR byte ptr [RBX + 0x170],0x19
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00163089
LAB_00163049:
MOV RDI,R14
CALL 0x0012a1f0
JMP 0x00163060
LAB_00163053:
TEST AL,0x1
JZ 0x00163067
CMP byte ptr [RBX + 0x7df],0x0
JZ 0x00163067
LAB_00163060:
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
LAB_00163067:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0016309b
LAB_00163073:
LEA RSI,[0x1fb9df]
MOV RDI,R14
MOV EDX,0x19c
CALL 0x001312ea
JMP 0x00163036
LAB_00163089:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00163049
|
int8 _ma_mark_file_changed(long param_1)
{
pthread_mutex_t *__mutex;
int8 uVar1;
if (*(char *)(param_1 + 0x44c) == '\0') {
if (((*(uint *)(param_1 + 0x170) & 1) == 0) || (*(char *)(param_1 + 0x7df) == '\0')) {
uVar1 = _ma_mark_file_changed_now(param_1);
return uVar1;
}
}
else if ((~*(uint *)(param_1 + 0x170) & 0x19) != 0) {
__mutex = (pthread_mutex_t *)(param_1 + 0x8f0);
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x19c);
}
*(byte *)(param_1 + 0x170) = *(byte *)(param_1 + 0x170) | 0x19;
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return 0;
}
| |
39,059 | maria_page_filler_set_normal | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_filler_set_normal(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
#ifdef DBUG_ASSERT_EXISTS
pgcache_page_no_t page_no= args->pageno;
#endif
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_page_filler_set_normal");
DBUG_ASSERT(page_no != 0); /* Catches some simple bugs */
int4store_aligned(page + share->block_size - CRC_SIZE,
MARIA_NO_CRC_NORMAL_PAGE);
DBUG_RETURN(0);
} | O0 | c | maria_page_filler_set_normal:
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 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xc2c41
jmp 0xc2c43
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
jmp 0xc2c68
jmp 0xc2c6a
xorl %eax, %eax
popq %rbp
retq
nop
| maria_page_filler_set_normal:
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+10h]
mov [rbp+var_18], rax
jmp short $+2
loc_C2C41:
jmp short $+2
loc_C2C43:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov ecx, [rcx+7BCh]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov dword ptr [rax], 0FFFFFFFFh
jmp short $+2
loc_C2C68:
jmp short $+2
loc_C2C6A:
xor eax, eax
pop rbp
retn
| long long maria_page_filler_set_normal(_QWORD *a1)
{
*(_DWORD *)(*(unsigned int *)(a1[2] + 1980LL) + *a1 - 4LL) = -1;
return 0LL;
}
| maria_page_filler_set_normal:
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 + 0x10]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001c2c41
LAB_001c2c41:
JMP 0x001c2c43
LAB_001c2c43:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x7bc]
ADD RAX,RCX
ADD RAX,-0x4
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0xffffffff
JMP 0x001c2c68
LAB_001c2c68:
JMP 0x001c2c6a
LAB_001c2c6a:
XOR EAX,EAX
POP RBP
RET
|
int8 maria_page_filler_set_normal(long *param_1)
{
*(int4 *)(*param_1 + (ulong)*(uint *)(param_1[2] + 0x7bc) + -4) = 0xffffffff;
return 0;
}
| |
39,060 | bf_get_float64 | bluesky950520[P]quickjs/libbf.c | int bf_get_float64(const bf_t *a, double *pres, bf_rnd_t rnd_mode)
{
Float64Union u;
int e, ret;
uint64_t m;
ret = 0;
if (a->expn == BF_EXP_NAN) {
u.u = 0x7ff8000000000000; /* quiet nan */
} else {
bf_t b_s, *b = &b_s;
bf_init(a->ctx, b);
bf_set(b, a);
if (bf_is_finite(b)) {
ret = bf_round(b, 53, rnd_mode | BF_FLAG_SUBNORMAL | bf_set_exp_bits(11));
}
if (b->expn == BF_EXP_INF) {
e = (1 << 11) - 1;
m = 0;
} else if (b->expn == BF_EXP_ZERO) {
e = 0;
m = 0;
} else {
e = b->expn + 1023 - 1;
#if LIMB_BITS == 32
if (b->len == 2) {
m = ((uint64_t)b->tab[1] << 32) | b->tab[0];
} else {
m = ((uint64_t)b->tab[0] << 32);
}
#else
m = b->tab[0];
#endif
if (e <= 0) {
/* subnormal */
m = m >> (12 - e);
e = 0;
} else {
m = (m << 1) >> 12;
}
}
u.u = m | ((uint64_t)e << 52) | ((uint64_t)b->sign << 63);
bf_delete(b);
}
*pres = u.d;
return ret;
} | O3 | c | bf_get_float64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movabsq $0x7ffffffffffffffd, %r12 # imm = 0x7FFFFFFFFFFFFFFD
leaq 0x2(%r12), %rax
cmpq %rax, 0x10(%rdi)
jne 0x8b0be
movabsq $0x7ff8000000000000, %r14 # imm = 0x7FF8000000000000
xorl %ebp, %ebp
jmp 0x8b1b4
movl %edx, %r14d
movq %rdi, %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movl $0x0, 0x8(%r15)
leaq 0x3(%r12), %rax
movq %rax, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq %r15, %rdi
callq 0x876d6
movq 0x10(%r15), %rax
xorl %ebp, %ebp
cmpq %r12, %rax
jg 0x8b12a
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x8b12a
orl $0x648, %r14d # imm = 0x648
leaq 0x8(%rsp), %r15
movl $0x35, %esi
movq %r15, %rdi
movl %r14d, %edx
xorl %r8d, %r8d
callq 0x8787f
movl %eax, %ebp
movq 0x10(%r15), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x8b146
movq %rax, %rcx
negq %rcx
jno 0x8b154
xorl %r14d, %r14d
jmp 0x8b150
movabsq $0x7ff0000000000000, %r14 # imm = 0x7FF0000000000000
xorl %edx, %edx
jmp 0x8b189
leal 0x3fe(%rax), %r14d
movq 0x28(%rsp), %rcx
movq (%rcx), %rdx
testl %r14d, %r14d
jle 0x8b17f
shrq $0xb, %rdx
movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF
andq %rax, %rdx
shlq $0x34, %r14
jmp 0x8b189
movb $0xe, %cl
subb %al, %cl
shrq %cl, %rdx
xorl %r14d, %r14d
orq %rdx, %r14
movl 0x10(%rsp), %r15d
shlq $0x3f, %r15
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x8b1b1
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x8b1b1
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
orq %r15, %r14
movq %r14, (%rbx)
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| bf_get_float64:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov rbx, rsi
mov r12, 7FFFFFFFFFFFFFFDh
lea rax, [r12+2]
cmp [rdi+10h], rax
jnz short loc_8B0BE
mov r14, 7FF8000000000000h
xor ebp, ebp
jmp loc_8B1B4
loc_8B0BE:
mov r14d, edx
mov rsi, rdi
mov rax, [rdi]
lea r15, [rsp+58h+var_50]
mov [r15], rax
mov dword ptr [r15+8], 0
lea rax, [r12+3]
mov [r15+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+18h], xmm0
mov rdi, r15
call bf_set
mov rax, [r15+10h]
xor ebp, ebp
cmp rax, r12
jg short loc_8B12A
mov rcx, [rsp+58h+var_38]
test rcx, rcx
jz short loc_8B12A
or r14d, 648h
lea r15, [rsp+58h+var_50]
mov esi, 35h ; '5'
mov rdi, r15
mov edx, r14d
xor r8d, r8d
call __bf_round
mov ebp, eax
mov rax, [r15+10h]
loc_8B12A:
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_8B146
mov rcx, rax
neg rcx
jno short loc_8B154
xor r14d, r14d
jmp short loc_8B150
loc_8B146:
mov r14, 7FF0000000000000h
loc_8B150:
xor edx, edx
jmp short loc_8B189
loc_8B154:
lea r14d, [rax+3FEh]
mov rcx, [rsp+58h+var_30]
mov rdx, [rcx]
test r14d, r14d
jle short loc_8B17F
shr rdx, 0Bh
mov rax, 0FFFFFFFFFFFFFh
and rdx, rax
shl r14, 34h
jmp short loc_8B189
loc_8B17F:
mov cl, 0Eh
sub cl, al
shr rdx, cl
xor r14d, r14d
loc_8B189:
or r14, rdx
mov r15d, [rsp+58h+var_48]
shl r15, 3Fh
mov rax, [rsp+58h+var_50]
test rax, rax
jz short loc_8B1B1
mov rsi, [rsp+58h+var_30]
test rsi, rsi
jz short loc_8B1B1
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8B1B1:
or r14, r15
loc_8B1B4:
mov [rbx], r14
mov eax, ebp
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long bf_get_float64(long long a1, long long *a2, int a3)
{
long long v3; // r14
unsigned int v4; // ebp
long long v6; // rax
long long v7; // rcx
long long v8; // r14
unsigned long long v9; // rdx
long long v10; // r14
unsigned long long v11; // rdx
long long v12; // r14
unsigned long long v13; // r15
_QWORD *v15; // [rsp+8h] [rbp-50h] BYREF
unsigned int v16; // [rsp+10h] [rbp-48h]
long long v17; // [rsp+18h] [rbp-40h]
__int128 v18; // [rsp+20h] [rbp-38h]
if ( *(_QWORD *)(a1 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
v3 = 0x7FF8000000000000LL;
v4 = 0;
goto LABEL_18;
}
v15 = *(_QWORD **)a1;
v16 = 0;
v17 = 0x8000000000000000LL;
v18 = 0LL;
bf_set(&v15, a1);
v6 = v17;
v4 = 0;
if ( v17 <= 0x7FFFFFFFFFFFFFFDLL && (_QWORD)v18 )
{
v4 = _bf_round(&v15, 53LL, a3 | 0x648u, v18, 0);
v6 = v17;
}
v7 = 0x7FFFFFFFFFFFFFFELL;
if ( v6 == 0x7FFFFFFFFFFFFFFELL )
{
v8 = 0x7FF0000000000000LL;
}
else
{
v7 = -v6;
if ( !__OFSUB__(-v6, 1LL) )
{
v10 = (unsigned int)(v6 + 1022);
v7 = *((_QWORD *)&v18 + 1);
v11 = **((_QWORD **)&v18 + 1);
if ( (int)v10 <= 0 )
{
LOBYTE(v7) = 14 - v6;
v9 = v11 >> (14 - (unsigned __int8)v6);
v8 = 0LL;
}
else
{
v9 = (v11 >> 11) & 0xFFFFFFFFFFFFFLL;
v8 = v10 << 52;
}
goto LABEL_14;
}
v8 = 0LL;
}
v9 = 0LL;
LABEL_14:
v12 = v9 | v8;
v13 = (unsigned long long)v16 << 63;
if ( v15 && *((_QWORD *)&v18 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD, long long))v15[1])(*v15, *((_QWORD *)&v18 + 1), 0LL, v7);
v3 = v13 | v12;
LABEL_18:
*a2 = v3;
return v4;
}
| bf_get_float64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R12,0x7ffffffffffffffd
LEA RAX,[R12 + 0x2]
CMP qword ptr [RDI + 0x10],RAX
JNZ 0x0018b0be
MOV R14,0x7ff8000000000000
XOR EBP,EBP
JMP 0x0018b1b4
LAB_0018b0be:
MOV R14D,EDX
MOV RSI,RDI
MOV RAX,qword ptr [RDI]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0x8],0x0
LEA RAX,[R12 + 0x3]
MOV qword ptr [R15 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x18],XMM0
MOV RDI,R15
CALL 0x001876d6
MOV RAX,qword ptr [R15 + 0x10]
XOR EBP,EBP
CMP RAX,R12
JG 0x0018b12a
MOV RCX,qword ptr [RSP + 0x20]
TEST RCX,RCX
JZ 0x0018b12a
OR R14D,0x648
LEA R15,[RSP + 0x8]
MOV ESI,0x35
MOV RDI,R15
MOV EDX,R14D
XOR R8D,R8D
CALL 0x0018787f
MOV EBP,EAX
MOV RAX,qword ptr [R15 + 0x10]
LAB_0018b12a:
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x0018b146
MOV RCX,RAX
NEG RCX
JNO 0x0018b154
XOR R14D,R14D
JMP 0x0018b150
LAB_0018b146:
MOV R14,0x7ff0000000000000
LAB_0018b150:
XOR EDX,EDX
JMP 0x0018b189
LAB_0018b154:
LEA R14D,[RAX + 0x3fe]
MOV RCX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RCX]
TEST R14D,R14D
JLE 0x0018b17f
SHR RDX,0xb
MOV RAX,0xfffffffffffff
AND RDX,RAX
SHL R14,0x34
JMP 0x0018b189
LAB_0018b17f:
MOV CL,0xe
SUB CL,AL
SHR RDX,CL
XOR R14D,R14D
LAB_0018b189:
OR R14,RDX
MOV R15D,dword ptr [RSP + 0x10]
SHL R15,0x3f
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JZ 0x0018b1b1
MOV RSI,qword ptr [RSP + 0x28]
TEST RSI,RSI
JZ 0x0018b1b1
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018b1b1:
OR R14,R15
LAB_0018b1b4:
MOV qword ptr [RBX],R14
MOV EAX,EBP
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0018b141) */
int4 bf_get_float64(int8 *param_1,ulong *param_2,uint param_3)
{
int4 uVar1;
byte bVar2;
uint uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
int8 *local_50;
uint local_48;
long local_40;
long local_38;
ulong *puStack_30;
ulong *puVar3;
if (param_1[2] == 0x7fffffffffffffff) {
uVar5 = 0x7ff8000000000000;
uVar1 = 0;
}
else {
local_50 = (int8 *)*param_1;
local_48 = 0;
local_40 = -0x8000000000000000;
local_38 = 0;
puStack_30 = (ulong *)0x0;
bf_set(&local_50,param_1);
uVar1 = 0;
if ((local_40 < 0x7ffffffffffffffe) && (local_38 != 0)) {
uVar1 = __bf_round(&local_50,0x35,param_3 | 0x648,local_38,0);
}
if (local_40 == 0x7ffffffffffffffe) {
uVar6 = 0x7ff0000000000000;
uVar5 = 0;
puVar3 = (ulong *)0x7ffffffffffffffe;
}
else {
uVar4 = (int)local_40 + 0x3fe;
if ((int)uVar4 < 1) {
bVar2 = 0xe - (char)local_40;
puVar3 = (ulong *)(ulong)bVar2;
uVar5 = *puStack_30 >> (bVar2 & 0x3f);
uVar6 = 0;
}
else {
uVar5 = *puStack_30 >> 0xb & 0xfffffffffffff;
uVar6 = (ulong)uVar4 << 0x34;
puVar3 = puStack_30;
}
}
uVar7 = (ulong)local_48;
if ((local_50 != (int8 *)0x0) && (puStack_30 != (ulong *)0x0)) {
(*(code *)local_50[1])(*local_50,puStack_30,0,puVar3);
}
uVar5 = uVar6 | uVar5 | uVar7 << 0x3f;
}
*param_2 = uVar5;
return uVar1;
}
| |
39,061 | my_printv_error | eloqsql/mysys/my_error.c | void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
{
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printv_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s",
error, MyFlags, errno, format));
(void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap);
(*error_handler_hook)(error, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O3 | c | my_printv_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdx, %rbx
movq %rsi, %rdx
movl %edi, %r14d
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq -0x220(%rbp), %r15
movl $0x200, %esi # imm = 0x200
movq %r15, %rdi
callq 0x36c01
leaq 0x2e975f(%rip), %rax # 0x336430
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq *(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x4ccf9
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24320
| my_printv_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 208h
mov rbx, rdx
mov rdx, rsi
mov r14d, edi
mov rax, fs:28h
mov [rbp+var_20], rax
lea r15, [rbp+var_220]
mov esi, 200h
mov rdi, r15
call my_vsnprintf
lea rax, error_handler_hook
mov edi, r14d
mov rsi, r15
mov rdx, rbx
call qword ptr [rax]
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_4CCF9
add rsp, 208h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4CCF9:
call ___stack_chk_fail
| unsigned long long my_printv_error(long long a1, unsigned __int8 *a2, long long a3, unsigned int *a4)
{
_BYTE v5[512]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v6; // [rsp+200h] [rbp-20h]
v6 = __readfsqword(0x28u);
my_vsnprintf((unsigned long long)v5, 512LL, a2, a4);
error_handler_hook[0]();
return __readfsqword(0x28u);
}
| my_printv_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x208
MOV RBX,RDX
MOV RDX,RSI
MOV R14D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA R15,[RBP + -0x220]
MOV ESI,0x200
MOV RDI,R15
CALL 0x00136c01
LEA RAX,[0x436430]
MOV EDI,R14D
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0014ccf9
ADD RSP,0x208
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014ccf9:
CALL 0x00124320
|
void my_printv_error(int4 param_1,int8 param_2,int8 param_3)
{
long in_FS_OFFSET;
int1 local_228 [512];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
my_vsnprintf(local_228,0x200,param_2);
(*(code *)error_handler_hook)(param_1,local_228,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
39,062 | remove_end_comment | eloqsql/mysys/my_default.c | static char *remove_end_comment(char *ptr)
{
char quote= 0; /* we are inside quote marks */
char escape= 0; /* symbol is protected by escape chagacter */
for (; *ptr; ptr++)
{
if ((*ptr == '\'' || *ptr == '\"') && !escape)
{
if (!quote)
quote= *ptr;
else if (quote == *ptr)
quote= 0;
}
/* We are not inside a string */
if (!quote && *ptr == '#')
{
*ptr= 0;
return ptr;
}
escape= (quote && *ptr == '\\' && !escape);
}
return ptr;
} | O0 | c | remove_end_comment:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x7654d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x764b5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x764e3
cmpb $0x0, -0x12(%rbp)
jne 0x764e3
cmpb $0x0, -0x11(%rbp)
jne 0x764cc
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
jmp 0x764e1
movsbl -0x11(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x764df
movb $0x0, -0x11(%rbp)
jmp 0x764e1
jmp 0x764e3
cmpb $0x0, -0x11(%rbp)
jne 0x76506
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x76506
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x76555
movsbl -0x11(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x13(%rbp)
je 0x76531
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x5c, %ecx
movb %al, -0x13(%rbp)
jne 0x76531
cmpb $0x0, -0x12(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x76490
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| remove_end_comment:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_11], 0
mov [rbp+var_12], 0
loc_76490:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz loc_7654D
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_764B5
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jnz short loc_764E3
loc_764B5:
cmp [rbp+var_12], 0
jnz short loc_764E3
cmp [rbp+var_11], 0
jnz short loc_764CC
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_11], al
jmp short loc_764E1
loc_764CC:
movsx eax, [rbp+var_11]
mov rcx, [rbp+var_10]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jnz short loc_764DF
mov [rbp+var_11], 0
loc_764DF:
jmp short $+2
loc_764E1:
jmp short $+2
loc_764E3:
cmp [rbp+var_11], 0
jnz short loc_76506
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_76506
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp short loc_76555
loc_76506:
movsx ecx, [rbp+var_11]
xor eax, eax
cmp ecx, 0
mov [rbp+var_13], al
jz short loc_76531
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 5Ch ; '\'
mov [rbp+var_13], al
jnz short loc_76531
cmp [rbp+var_12], 0
setnz al
xor al, 0FFh
mov [rbp+var_13], al
loc_76531:
mov al, [rbp+var_13]
and al, 1
movzx eax, al
mov [rbp+var_12], al
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_76490
loc_7654D:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_76555:
mov rax, [rbp+var_8]
pop rbp
retn
| char * remove_end_comment(char *a1)
{
char v2; // [rsp+1h] [rbp-13h]
char v3; // [rsp+2h] [rbp-12h]
char v4; // [rsp+3h] [rbp-11h]
v4 = 0;
v3 = 0;
while ( *a1 )
{
if ( (*a1 == 39 || *a1 == 34) && !v3 )
{
if ( v4 )
{
if ( v4 == *a1 )
v4 = 0;
}
else
{
v4 = *a1;
}
}
if ( !v4 && *a1 == 35 )
{
*a1 = 0;
return a1;
}
v2 = 0;
if ( v4 )
{
v2 = 0;
if ( *a1 == 92 )
v2 = ~(v3 != 0);
}
v3 = v2 & 1;
++a1;
}
return a1;
}
| remove_end_comment:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],0x0
MOV byte ptr [RBP + -0x12],0x0
LAB_00176490:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0017654d
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x001764b5
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JNZ 0x001764e3
LAB_001764b5:
CMP byte ptr [RBP + -0x12],0x0
JNZ 0x001764e3
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x001764cc
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
JMP 0x001764e1
LAB_001764cc:
MOVSX EAX,byte ptr [RBP + -0x11]
MOV RCX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x001764df
MOV byte ptr [RBP + -0x11],0x0
LAB_001764df:
JMP 0x001764e1
LAB_001764e1:
JMP 0x001764e3
LAB_001764e3:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x00176506
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x00176506
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00176555
LAB_00176506:
MOVSX ECX,byte ptr [RBP + -0x11]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x13],AL
JZ 0x00176531
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x5c
MOV byte ptr [RBP + -0x13],AL
JNZ 0x00176531
CMP byte ptr [RBP + -0x12],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x13],AL
LAB_00176531:
MOV AL,byte ptr [RBP + -0x13]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x12],AL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00176490
LAB_0017654d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00176555:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * remove_end_comment(char *param_1)
{
bool bVar1;
bool bVar2;
char local_19;
char *local_18;
local_19 = '\0';
bVar1 = false;
local_18 = param_1;
while( true ) {
if (*local_18 == '\0') {
return local_18;
}
if (((*local_18 == '\'') || (*local_18 == '\"')) && (!bVar1)) {
if (local_19 == '\0') {
local_19 = *local_18;
}
else if (local_19 == *local_18) {
local_19 = '\0';
}
}
if ((local_19 == '\0') && (*local_18 == '#')) break;
bVar2 = false;
if ((local_19 != '\0') && (bVar2 = false, *local_18 == '\\')) {
bVar2 = (bool)(bVar1 ^ 1);
}
bVar1 = bVar2;
local_18 = local_18 + 1;
}
*local_18 = '\0';
return local_18;
}
| |
39,063 | LefDefParser::lefwArrayFloorplan(char const*, char const*, double, double, int, int, int, double, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwArrayFloorplan(const char *site,
const char *name,
double origX,
double origY,
int orient,
int numX,
int numY,
double spaceX,
double spaceY)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwIsArrayFloorp)
return LEFW_BAD_ORDER;
if (site && strcmp(site, "CANPLACE") && strcmp(site, "CANNOTOCCUPY"))
return LEFW_BAD_DATA;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*)
" %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",
site, name, origX, origY, lefwOrient(orient), numX, numY,
spaceX, spaceY);
else
fprintf(lefwFile,
" %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",
site, name, origX, origY, lefwOrient(orient), numX, numY,
spaceX, spaceY);
lefwLines++;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwArrayFloorplan(char const*, char const*, double, double, int, int, int, double, double):
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movsd %xmm0, 0x88(%rsp)
movsd %xmm1, 0x80(%rsp)
movl %edx, 0x7c(%rsp)
movl %ecx, 0x78(%rsp)
movl %r8d, 0x74(%rsp)
movsd %xmm2, 0x68(%rsp)
movsd %xmm3, 0x60(%rsp)
leaq 0x9c1c7(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x2909f
movl $0x1, 0xa4(%rsp)
jmp 0x29262
leaq 0x9c422(%rip), %rax # 0xc54c8
cmpl $0x0, (%rax)
jne 0x290bb
movl $0x2, 0xa4(%rsp)
jmp 0x29262
cmpq $0x0, 0x98(%rsp)
je 0x29108
movq 0x98(%rsp), %rdi
leaq 0x6ac35(%rip), %rsi # 0x93d0a
callq 0x2360
cmpl $0x0, %eax
je 0x29108
movq 0x98(%rsp), %rdi
leaq 0x6ac25(%rip), %rsi # 0x93d13
callq 0x2360
cmpl $0x0, %eax
je 0x29108
movl $0x3, 0xa4(%rsp)
jmp 0x29262
cmpl $0x0, 0x9c42d(%rip) # 0xc553c
je 0x291ae
leaq 0x9c134(%rip), %rax # 0xc5250
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x48(%rsp)
movsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x7c(%rsp), %edi
callq 0x17b50
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movq %rax, %r8
movl 0x78(%rsp), %r9d
movl 0x74(%rsp), %eax
movsd 0x68(%rsp), %xmm2
movsd 0x60(%rsp), %xmm3
leaq 0x6ab81(%rip), %rsi # 0x93d20
movl %eax, (%rsp)
movb $0x4, %al
callq 0x8bf50
jmp 0x29242
leaq 0x9c09b(%rip), %rax # 0xc5250
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movl 0x7c(%rsp), %edi
callq 0x17b50
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movq %rax, %r8
movl 0x78(%rsp), %r9d
movl 0x74(%rsp), %eax
movsd 0x68(%rsp), %xmm2
movsd 0x60(%rsp), %xmm3
leaq 0x6aae8(%rip), %rsi # 0x93d20
movl %eax, (%rsp)
movb $0x4, %al
callq 0x2370
leaq 0x9c253(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x9c247(%rip), %rax # 0xc549c
movl %ecx, (%rax)
movl $0x0, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser18lefwArrayFloorplanEPKcS1_ddiiidd:
sub rsp, 0A8h
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_18], rsi
movsd [rsp+0A8h+var_20], xmm0
movsd [rsp+0A8h+var_2C+4], xmm1
mov dword ptr [rsp+0A8h+var_2C], edx
mov [rsp+0A8h+var_30], ecx
mov [rsp+0A8h+var_34], r8d
movsd [rsp+0A8h+var_40], xmm2
movsd [rsp+0A8h+var_48], xmm3
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_2909F
mov [rsp+0A8h+var_4], 1
jmp loc_29262
loc_2909F:
lea rax, _ZN12LefDefParser17lefwIsArrayFloorpE; LefDefParser::lefwIsArrayFloorp
cmp dword ptr [rax], 0
jnz short loc_290BB
mov [rsp+0A8h+var_4], 2
jmp loc_29262
loc_290BB:
cmp [rsp+0A8h+var_10], 0
jz short loc_29108
mov rdi, [rsp+0A8h+var_10]
lea rsi, aCanplace; "CANPLACE"
call _strcmp
cmp eax, 0
jz short loc_29108
mov rdi, [rsp+0A8h+var_10]
lea rsi, aCannotoccupy; "CANNOTOCCUPY"
call _strcmp
cmp eax, 0
jz short loc_29108
mov [rsp+0A8h+var_4], 3
jmp loc_29262
loc_29108:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz loc_291AE
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rax, [rax]
mov [rsp+0A8h+var_70], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_68], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_60], rax
movsd xmm0, [rsp+0A8h+var_20]
movsd [rsp+0A8h+var_58], xmm0
movsd xmm0, [rsp+0A8h+var_2C+4]
movsd [rsp+0A8h+var_50], xmm0
mov edi, dword ptr [rsp+0A8h+var_2C]; this
call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int)
mov rdi, [rsp+0A8h+var_70]
mov rdx, [rsp+0A8h+var_68]
mov rcx, [rsp+0A8h+var_60]
movsd xmm0, [rsp+0A8h+var_58]
movsd xmm1, [rsp+0A8h+var_50]
mov r8, rax
mov r9d, [rsp+0A8h+var_30]
mov eax, [rsp+0A8h+var_34]
movsd xmm2, [rsp+0A8h+var_40]
movsd xmm3, [rsp+0A8h+var_48]
lea rsi, aSS11g11gSDoDBy; " %s %s %.11g %.11g %s DO %d BY %d "...
mov [rsp+0A8h+var_A8], eax
mov al, 4
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp loc_29242
loc_291AE:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rax, [rax]
mov [rsp+0A8h+var_98], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_90], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_88], rax
movsd xmm0, [rsp+0A8h+var_20]
movsd [rsp+0A8h+var_80], xmm0
movsd xmm0, [rsp+0A8h+var_2C+4]
movsd [rsp+0A8h+var_78], xmm0
mov edi, dword ptr [rsp+0A8h+var_2C]; this
call _ZN12LefDefParser10lefwOrientEi; LefDefParser::lefwOrient(int)
mov rdi, [rsp+0A8h+var_98]
mov rdx, [rsp+0A8h+var_90]
mov rcx, [rsp+0A8h+var_88]
movsd xmm0, [rsp+0A8h+var_80]
movsd xmm1, [rsp+0A8h+var_78]
mov r8, rax
mov r9d, [rsp+0A8h+var_30]
mov eax, [rsp+0A8h+var_34]
movsd xmm2, [rsp+0A8h+var_40]
movsd xmm3, [rsp+0A8h+var_48]
lea rsi, aSS11g11gSDoDBy; " %s %s %.11g %.11g %s DO %d BY %d "...
mov [rsp+0A8h+var_A8], eax
mov al, 4
call _fprintf
loc_29242:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
mov [rsp+0A8h+var_4], 0
loc_29262:
mov eax, [rsp+0A8h+var_4]
add rsp, 0A8h
retn
| long long LefDefParser::lefwArrayFloorplan(
LefDefParser *this,
const char *a2,
const char *a3,
double a4,
double a5,
int a6,
int a7,
double a8,
double a9)
{
unsigned int v9; // eax
LefDefParser *v10; // rax
long long v12; // [rsp+10h] [rbp-98h]
int v13; // [rsp+38h] [rbp-70h]
unsigned int v16; // [rsp+7Ch] [rbp-2Ch]
const char *v17; // [rsp+90h] [rbp-18h]
v17 = a2;
v16 = (unsigned int)a3;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwIsArrayFloorp )
{
if ( !this
|| (a2 = "CANPLACE", !(unsigned int)strcmp(this, "CANPLACE"))
|| (a2 = "CANNOTOCCUPY", !(unsigned int)strcmp(this, "CANNOTOCCUPY")) )
{
if ( LefDefParser::lefwWriteEncrypt )
{
v13 = LefDefParser::lefwFile;
v9 = (unsigned int)LefDefParser::lefwOrient((LefDefParser *)v16, a2);
LefDefParser::encPrint(
v13,
(unsigned int)" %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",
(_DWORD)this,
(_DWORD)v17,
v9,
a6);
}
else
{
v12 = *(_QWORD *)&LefDefParser::lefwFile;
v10 = LefDefParser::lefwOrient((LefDefParser *)v16, a2);
fprintf(
v12,
" %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",
(const char *)this,
v17,
a4,
a5,
(const char *)v10,
a6,
a7,
a8,
a9);
}
++LefDefParser::lefwLines;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwArrayFloorplan:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x98],RDI
MOV qword ptr [RSP + 0x90],RSI
MOVSD qword ptr [RSP + 0x88],XMM0
MOVSD qword ptr [RSP + 0x80],XMM1
MOV dword ptr [RSP + 0x7c],EDX
MOV dword ptr [RSP + 0x78],ECX
MOV dword ptr [RSP + 0x74],R8D
MOVSD qword ptr [RSP + 0x68],XMM2
MOVSD qword ptr [RSP + 0x60],XMM3
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x0012909f
MOV dword ptr [RSP + 0xa4],0x1
JMP 0x00129262
LAB_0012909f:
LEA RAX,[0x1c54c8]
CMP dword ptr [RAX],0x0
JNZ 0x001290bb
MOV dword ptr [RSP + 0xa4],0x2
JMP 0x00129262
LAB_001290bb:
CMP qword ptr [RSP + 0x98],0x0
JZ 0x00129108
MOV RDI,qword ptr [RSP + 0x98]
LEA RSI,[0x193d0a]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00129108
MOV RDI,qword ptr [RSP + 0x98]
LEA RSI,[0x193d13]
CALL 0x00102360
CMP EAX,0x0
JZ 0x00129108
MOV dword ptr [RSP + 0xa4],0x3
JMP 0x00129262
LAB_00129108:
CMP dword ptr [0x001c553c],0x0
JZ 0x001291ae
LEA RAX,[0x1c5250]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x48],RAX
MOVSD XMM0,qword ptr [RSP + 0x88]
MOVSD qword ptr [RSP + 0x50],XMM0
MOVSD XMM0,qword ptr [RSP + 0x80]
MOVSD qword ptr [RSP + 0x58],XMM0
MOV EDI,dword ptr [RSP + 0x7c]
CALL 0x00117b50
MOV RDI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
MOVSD XMM0,qword ptr [RSP + 0x50]
MOVSD XMM1,qword ptr [RSP + 0x58]
MOV R8,RAX
MOV R9D,dword ptr [RSP + 0x78]
MOV EAX,dword ptr [RSP + 0x74]
MOVSD XMM2,qword ptr [RSP + 0x68]
MOVSD XMM3,qword ptr [RSP + 0x60]
LEA RSI,[0x193d20]
MOV dword ptr [RSP],EAX
MOV AL,0x4
CALL 0x0018bf50
JMP 0x00129242
LAB_001291ae:
LEA RAX,[0x1c5250]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x20],RAX
MOVSD XMM0,qword ptr [RSP + 0x88]
MOVSD qword ptr [RSP + 0x28],XMM0
MOVSD XMM0,qword ptr [RSP + 0x80]
MOVSD qword ptr [RSP + 0x30],XMM0
MOV EDI,dword ptr [RSP + 0x7c]
CALL 0x00117b50
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSD XMM1,qword ptr [RSP + 0x30]
MOV R8,RAX
MOV R9D,dword ptr [RSP + 0x78]
MOV EAX,dword ptr [RSP + 0x74]
MOVSD XMM2,qword ptr [RSP + 0x68]
MOVSD XMM3,qword ptr [RSP + 0x60]
LEA RSI,[0x193d20]
MOV dword ptr [RSP],EAX
MOV AL,0x4
CALL 0x00102370
LAB_00129242:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0xa4],0x0
LAB_00129262:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xa8
RET
|
/* LefDefParser::lefwArrayFloorplan(char const*, char const*, double, double, int, int, int, double,
double) */
int4
LefDefParser::lefwArrayFloorplan
(char *param_1,char *param_2,double param_3,double param_4,int param_5,int param_6,
int param_7,double param_8,double param_9)
{
_IO_FILE *__stream;
int iVar1;
int8 uVar2;
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwIsArrayFloorp == 0) {
local_4 = 2;
}
else {
if (((param_1 != (char *)0x0) && (iVar1 = strcmp(param_1,"CANPLACE"), iVar1 != 0)) &&
(iVar1 = strcmp(param_1,"CANNOTOCCUPY"), iVar1 != 0)) {
return 3;
}
__stream = lefwFile;
if (lefwWriteEncrypt == 0) {
uVar2 = lefwOrient(param_5);
fprintf(__stream," %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",param_3,param_4
,param_8,param_9,param_1,param_2,uVar2,(ulong)(uint)param_6,param_7);
}
else {
uVar2 = lefwOrient(param_5);
encPrint(__stream," %s %s %.11g %.11g %s DO %d BY %d STEP %.11g %.11g ;\n",param_3,
param_4,param_8,param_9,param_1,param_2,uVar2,(ulong)(uint)param_6,param_7);
}
lefwLines = lefwLines + 1;
local_4 = 0;
}
return local_4;
}
| |
39,064 | my_vfprintf | eloqsql/strings/my_vsnprintf.c | int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
} | O3 | c | my_vfprintf:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, -0x440(%rbp)
movq %rsi, %r12
movq %rdi, -0x438(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %bl
movl $0x400, %r13d # imm = 0x400
leaq -0x430(%rbp), %r14
leaq 0x2bb758(%rip), %rdi # 0x314760
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x440(%rbp), %r8
callq 0x57d58
movq %rax, %r15
leaq -0x1(%r13), %rax
cmpq %rax, %r15
jb 0x59059
testb $0x1, %bl
jne 0x59036
movq %r14, %rdi
callq 0x2662e
testq %r13, %r13
js 0x59086
addq %r13, %r13
xorl %ebx, %ebx
movl $0x8, %edx
xorl %edi, %edi
movq %r13, %rsi
callq 0x26401
movq %rax, %r14
testq %rax, %rax
jne 0x59001
jmp 0x59088
movq %r14, %rdi
movq -0x438(%rbp), %rsi
callq 0x242f0
testl %eax, %eax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmovnsl %r15d, %r12d
testb $0x1, %bl
jne 0x59081
movq %r14, %rdi
callq 0x2662e
movl %r12d, %ebx
jmp 0x59088
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x590ab
movl %ebx, %eax
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x242e0
| my_vfprintf:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov [rbp+var_440], rdx
mov r12, rsi
mov [rbp+var_438], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov bl, 1
mov r13d, 400h
lea r14, [rbp+var_430]
loc_59001:
lea rdi, my_charset_latin1
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8, [rbp+var_440]
call my_vsnprintf_ex
mov r15, rax
lea rax, [r13-1]
cmp r15, rax
jb short loc_59059
test bl, 1
jnz short loc_59036
mov rdi, r14
call my_free
loc_59036:
test r13, r13
js short loc_59086
add r13, r13
xor ebx, ebx
mov edx, 8
xor edi, edi
mov rsi, r13
call my_malloc
mov r14, rax
test rax, rax
jnz short loc_59001
jmp short loc_59088
loc_59059:
mov rdi, r14
mov rsi, [rbp+var_438]
call _fputs
test eax, eax
mov r12d, 0FFFFFFFFh
cmovns r12d, r15d
test bl, 1
jnz short loc_59081
mov rdi, r14
call my_free
loc_59081:
mov ebx, r12d
jmp short loc_59088
loc_59086:
xor ebx, ebx
loc_59088:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_590AB
mov eax, ebx
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_590AB:
call ___stack_chk_fail
| long long my_vfprintf(long long a1, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v3; // ebx
long long v4; // r13
char *v5; // r14
unsigned long long v6; // r15
unsigned int v7; // r12d
char v10; // [rsp+10h] [rbp-430h] BYREF
unsigned long long v11; // [rsp+410h] [rbp-30h]
v11 = __readfsqword(0x28u);
LOBYTE(v3) = 1;
v4 = 1024LL;
v5 = &v10;
while ( 1 )
{
v6 = my_vsnprintf_ex((long long)my_charset_latin1, (unsigned long long)v5, v4, a2, a3);
if ( v6 < v4 - 1 )
break;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
if ( v4 < 0 )
return 0;
v4 *= 2LL;
v3 = 0;
v5 = (char *)my_malloc(0, v4, 8);
if ( !v5 )
return v3;
}
v7 = -1;
if ( (int)fputs(v5, a1) >= 0 )
v7 = v6;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
return v7;
}
| my_vfprintf:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV qword ptr [RBP + -0x440],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x438],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV BL,0x1
MOV R13D,0x400
LEA R14,[RBP + -0x430]
LAB_00159001:
LEA RDI,[0x414760]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x440]
CALL 0x00157d58
MOV R15,RAX
LEA RAX,[R13 + -0x1]
CMP R15,RAX
JC 0x00159059
TEST BL,0x1
JNZ 0x00159036
MOV RDI,R14
CALL 0x0012662e
LAB_00159036:
TEST R13,R13
JS 0x00159086
ADD R13,R13
XOR EBX,EBX
MOV EDX,0x8
XOR EDI,EDI
MOV RSI,R13
CALL 0x00126401
MOV R14,RAX
TEST RAX,RAX
JNZ 0x00159001
JMP 0x00159088
LAB_00159059:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x438]
CALL 0x001242f0
TEST EAX,EAX
MOV R12D,0xffffffff
CMOVNS R12D,R15D
TEST BL,0x1
JNZ 0x00159081
MOV RDI,R14
CALL 0x0012662e
LAB_00159081:
MOV EBX,R12D
JMP 0x00159088
LAB_00159086:
XOR EBX,EBX
LAB_00159088:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001590ab
MOV EAX,EBX
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001590ab:
CALL 0x001242e0
|
ulong my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
int iVar1;
ulong uVar2;
char *__s;
ulong uVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
char local_438 [1024];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = 0x400;
__s = local_438;
uVar3 = 1;
do {
uVar2 = my_vsnprintf_ex(&my_charset_latin1,__s,lVar5,param_2,param_3);
if (uVar2 < lVar5 - 1U) {
iVar1 = fputs(__s,param_1);
uVar4 = 0xffffffff;
if (-1 < iVar1) {
uVar4 = uVar2 & 0xffffffff;
}
if (uVar3 == 0) {
my_free(__s);
}
break;
}
if ((char)uVar3 == '\0') {
my_free(__s);
}
if (lVar5 < 0) {
uVar4 = 0;
break;
}
lVar5 = lVar5 * 2;
uVar4 = 0;
__s = (char *)my_malloc(0,lVar5,8);
uVar3 = uVar4;
} while (__s != (char *)0x0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
39,065 | mysql_stmt_bind_param | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bind)
{
MYSQL *mysql= stmt->mysql;
if (!mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
/* If number of parameters was specified via mysql_stmt_attr_set we need to realloc
them, e.g. for mariadb_stmt_execute_direct()
*/
if ((stmt->state < MYSQL_STMT_PREPARED || stmt->state >= MYSQL_STMT_EXECUTED) &&
stmt->prebind_params > 0)
{
if (!stmt->params && stmt->prebind_params)
{
if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->prebind_params * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return(1);
}
memset(stmt->params, '\0', stmt->prebind_params * sizeof(MYSQL_BIND));
}
stmt->param_count= stmt->prebind_params;
}
else if (stmt->state < MYSQL_STMT_PREPARED) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->param_count && bind)
{
uint i;
memcpy(stmt->params, bind, sizeof(MYSQL_BIND) * stmt->param_count);
stmt->send_types_to_server= 1;
for (i=0; i < stmt->param_count; i++)
{
if (stmt->mysql->methods->db_supported_buffer_type &&
!stmt->mysql->methods->db_supported_buffer_type(stmt->params[i].buffer_type))
{
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->params[i].is_null)
stmt->params[i].is_null= &is_not_null;
if (stmt->params[i].long_data_used)
stmt->params[i].long_data_used= 0;
if (!stmt->params[i].length)
stmt->params[i].length= &stmt->params[i].buffer_length;
switch(stmt->params[i].buffer_type) {
case MYSQL_TYPE_NULL:
stmt->params[i].is_null= &is_null;
break;
case MYSQL_TYPE_TINY:
stmt->params[i].buffer_length= 1;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_YEAR:
stmt->params[i].buffer_length= 2;
break;
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_FLOAT:
stmt->params[i].buffer_length= 4;
break;
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_DOUBLE:
stmt->params[i].buffer_length= 8;
break;
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
stmt->params[i].buffer_length= 12;
break;
case MYSQL_TYPE_TIME:
stmt->params[i].buffer_length= 13;
break;
case MYSQL_TYPE_DATE:
stmt->params[i].buffer_length= 5;
break;
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
break;
default:
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return(1);
break;
}
}
}
stmt->bind_param_done= stmt->send_types_to_server= 1;
CLEAR_CLIENT_STMT_ERROR(stmt);
return(0);
} | O3 | c | mysql_stmt_bind_param:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x38(%rdi)
je 0x90dc3
movq %rsi, %r14
movl 0x50(%rbx), %ecx
cmpl $0x1, %ecx
je 0x90e24
movl 0x378(%rbx), %eax
testq %rax, %rax
je 0x90e1c
cmpq $0x0, 0x70(%rbx)
jne 0x90dbe
imulq $0x70, %rax, %rsi
movq %rbx, %rdi
callq 0x8ea87
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x9103e
movl 0x378(%rbx), %ecx
imulq $0x70, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x392e0
movl 0x378(%rbx), %eax
movl %eax, 0x64(%rbx)
jmp 0x90e24
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x3127e5(%rip), %rax # 0x3a35c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x39130
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x3127d0(%rip), %rax # 0x3a35d0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x39130
movb %r14b, 0x30b(%rbx)
movb $0x1, %al
jmp 0x90f9d
testl %ecx, %ecx
je 0x90ff5
movl 0x64(%rbx), %eax
testq %rax, %rax
sete %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
jne 0x90f6c
movq 0x70(%rbx), %rdi
imulq $0x70, %rax, %rdx
movq %r14, %rsi
callq 0x390a0
movb $0x1, 0x68(%rbx)
cmpl $0x0, 0x64(%rbx)
je 0x90f6c
movl $0x40, %r14d
xorl %r15d, %r15d
movl $0x3f3, %r13d # imm = 0x3F3
leaq 0x6e0f5(%rip), %r12 # 0xfef64
movq 0x38(%rbx), %rcx
movq 0x70(%rbx), %rax
movq 0x4d0(%rcx), %rcx
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
je 0x90e9a
movl 0x20(%rax,%r14), %edi
callq *%rcx
testb %al, %al
je 0x90fac
movq 0x70(%rbx), %rax
cmpq $0x0, -0x38(%rax,%r14)
jne 0x90eb2
leaq 0x38c729(%rip), %rcx # 0x41d5d2
movq %rcx, -0x38(%rax,%r14)
movq 0x70(%rbx), %rax
cmpb $0x0, 0x26(%rax,%r14)
je 0x90ec4
movb $0x0, 0x26(%rax,%r14)
movq 0x70(%rbx), %rax
cmpq $0x0, -0x40(%rax,%r14)
jne 0x90ed9
leaq (%rax,%r14), %rcx
movq %rcx, -0x40(%rax,%r14)
movq 0x70(%rbx), %rax
movl 0x20(%rax,%r14), %ecx
cmpq $0xd, %rcx
ja 0x90ef7
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq $0x2, (%rax,%r14)
jmp 0x90f59
addl $0xffffff0b, %ecx # imm = 0xFFFFFF0B
cmpl $0x9, %ecx
ja 0x90fac
btl %ecx, %r13d
jb 0x90f59
jmp 0x90fac
movq $0x4, (%rax,%r14)
jmp 0x90f59
movq $0x8, (%rax,%r14)
jmp 0x90f59
movq $0xc, (%rax,%r14)
jmp 0x90f59
movq $0xd, (%rax,%r14)
jmp 0x90f59
movq $0x1, (%rax,%r14)
jmp 0x90f59
leaq 0x311796(%rip), %rcx # 0x3a26e0
movq %rcx, -0x38(%rax,%r14)
jmp 0x90f59
movq $0x5, (%rax,%r14)
incq %r15
movl 0x64(%rbx), %eax
addq $0x70, %r14
cmpq %rax, %r15
jb 0x90e6f
movb $0x1, %al
movb %al, 0x68(%rbx)
movb %al, 0xe9(%rbx)
movl $0x0, 0x108(%rbx)
movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030
movw $0x30, 0x311(%rbx)
movb $0x0, 0x10c(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7f4, 0x108(%rbx) # imm = 0x7F4
leaq 0x30d(%rbx), %rdi
leaq 0x3125fc(%rip), %rax # 0x3a35c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x39130
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x3125e7(%rip), %rax # 0x3a35d0
movq 0x120(%rax), %rsi
jmp 0x90e04
movl $0x7ee, 0x108(%rbx) # imm = 0x7EE
leaq 0x30d(%rbx), %rdi
leaq 0x3125b3(%rip), %rax # 0x3a35c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x39130
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x31259e(%rip), %rax # 0x3a35d0
movq 0xf0(%rax), %rsi
jmp 0x90e04
movl $0x7d8, 0x108(%rbx) # imm = 0x7D8
leaq 0x30d(%rbx), %rdi
leaq 0x31256a(%rip), %rax # 0x3a35c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x39130
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x312555(%rip), %rax # 0x3a35d0
movq 0x40(%rax), %rsi
jmp 0x90e04
| mysql_stmt_bind_param:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+38h], 0
jz short loc_90DC3
mov r14, rsi
mov ecx, [rbx+50h]
cmp ecx, 1
jz loc_90E24
mov eax, [rbx+378h]
test rax, rax
jz loc_90E1C
cmp qword ptr [rbx+70h], 0
jnz short loc_90DBE
imul rsi, rax, 70h ; 'p'
mov rdi, rbx
call ma_alloc_root
mov [rbx+70h], rax
test rax, rax
jz loc_9103E
mov ecx, [rbx+378h]
imul rdx, rcx, 70h ; 'p'
mov rdi, rax
xor esi, esi
call _memset
mov eax, [rbx+378h]
loc_90DBE:
mov [rbx+64h], eax
jmp short loc_90E24
loc_90DC3:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_90E04:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov al, 1
jmp loc_90F9D
loc_90E1C:
test ecx, ecx
jz loc_90FF5
loc_90E24:
mov eax, [rbx+64h]
test rax, rax
setz cl
test r14, r14
setz dl
or dl, cl
jnz loc_90F6C
mov rdi, [rbx+70h]
imul rdx, rax, 70h ; 'p'
mov rsi, r14
call _memcpy
mov byte ptr [rbx+68h], 1
cmp dword ptr [rbx+64h], 0
jz loc_90F6C
mov r14d, 40h ; '@'
xor r15d, r15d
mov r13d, 3F3h
lea r12, jpt_90EEB
loc_90E6F:
mov rcx, [rbx+38h]
mov rax, [rbx+70h]
mov rcx, [rcx+4D0h]
mov rcx, [rcx+38h]
test rcx, rcx
jz short loc_90E9A
mov edi, [rax+r14+20h]
call rcx
test al, al
jz loc_90FAC; jumptable 0000000000090EEB case 9
mov rax, [rbx+70h]
loc_90E9A:
cmp qword ptr [rax+r14-38h], 0
jnz short loc_90EB2
lea rcx, is_not_null
mov [rax+r14-38h], rcx
mov rax, [rbx+70h]
loc_90EB2:
cmp byte ptr [rax+r14+26h], 0
jz short loc_90EC4
mov byte ptr [rax+r14+26h], 0
mov rax, [rbx+70h]
loc_90EC4:
cmp qword ptr [rax+r14-40h], 0
jnz short loc_90ED9
lea rcx, [rax+r14]
mov [rax+r14-40h], rcx
mov rax, [rbx+70h]
loc_90ED9:
mov ecx, [rax+r14+20h]
cmp rcx, 0Dh; switch 14 cases
ja short def_90EEB; jumptable 0000000000090EEB default case
movsxd rcx, ds:(jpt_90EEB - 0FEF64h)[r12+rcx*4]
add rcx, r12
jmp rcx; switch jump
loc_90EED:
mov qword ptr [rax+r14], 2; jumptable 0000000000090EEB cases 2,13
jmp short loc_90F59; jumptable 0000000000090EEB case 0
def_90EEB:
add ecx, 0FFFFFF0Bh; jumptable 0000000000090EEB default case
cmp ecx, 9
ja loc_90FAC; jumptable 0000000000090EEB case 9
bt r13d, ecx
jb short loc_90F59; jumptable 0000000000090EEB case 0
jmp loc_90FAC; jumptable 0000000000090EEB case 9
loc_90F11:
mov qword ptr [rax+r14], 4; jumptable 0000000000090EEB cases 3,4
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F1B:
mov qword ptr [rax+r14], 8; jumptable 0000000000090EEB cases 5,8
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F25:
mov qword ptr [rax+r14], 0Ch; jumptable 0000000000090EEB cases 7,12
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F2F:
mov qword ptr [rax+r14], 0Dh; jumptable 0000000000090EEB case 11
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F39:
mov qword ptr [rax+r14], 1; jumptable 0000000000090EEB case 1
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F43:
lea rcx, is_null; jumptable 0000000000090EEB case 6
mov [rax+r14-38h], rcx
jmp short loc_90F59; jumptable 0000000000090EEB case 0
loc_90F51:
mov qword ptr [rax+r14], 5; jumptable 0000000000090EEB case 10
loc_90F59:
inc r15; jumptable 0000000000090EEB case 0
mov eax, [rbx+64h]
add r14, 70h ; 'p'
cmp r15, rax
jb loc_90E6F
loc_90F6C:
mov al, 1
mov [rbx+68h], al
mov [rbx+0E9h], al
mov dword ptr [rbx+108h], 0
mov dword ptr [rbx+30Dh], 30303030h
mov word ptr [rbx+311h], 30h ; '0'
mov byte ptr [rbx+10Ch], 0
xor eax, eax
loc_90F9D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_90FAC:
mov dword ptr [rbx+108h], 7F4h; jumptable 0000000000090EEB case 9
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+120h]
jmp loc_90E04
loc_90FF5:
mov dword ptr [rbx+108h], 7EEh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+0F0h]
jmp loc_90E04
loc_9103E:
mov dword ptr [rbx+108h], 7D8h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
jmp loc_90E04
| char mysql_stmt_bind_param(long long a1, long long a2)
{
int v3; // ecx
long long v4; // rax
char *v5; // rax
long long v6; // rdi
char *v7; // rsi
long long v9; // rax
long long v10; // r14
unsigned long long v11; // r15
int v12; // r13d
long long v13; // rax
unsigned __int8 ( *v14)(_QWORD); // rcx
unsigned int v15; // ecx
if ( !*(_QWORD *)(a1 + 56) )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v6 = a1 + 268;
v7 = client_errors[13];
goto LABEL_9;
}
v3 = *(_DWORD *)(a1 + 80);
if ( v3 == 1 )
goto LABEL_11;
v4 = *(unsigned int *)(a1 + 888);
if ( *(_DWORD *)(a1 + 888) )
{
if ( *(_QWORD *)(a1 + 112) )
{
LABEL_7:
*(_DWORD *)(a1 + 100) = v4;
goto LABEL_11;
}
v5 = ma_alloc_root(a1, 112 * v4);
*(_QWORD *)(a1 + 112) = v5;
if ( v5 )
{
memset(v5, 0LL, 112LL * *(unsigned int *)(a1 + 888));
LODWORD(v4) = *(_DWORD *)(a1 + 888);
goto LABEL_7;
}
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v6 = a1 + 268;
v7 = client_errors[8];
LABEL_9:
strncpy(v6, v7, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( !v3 )
{
*(_DWORD *)(a1 + 264) = 2030;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v6 = a1 + 268;
v7 = client_errors[30];
goto LABEL_9;
}
LABEL_11:
v9 = *(unsigned int *)(a1 + 100);
if ( v9 != 0 && a2 != 0 )
{
memcpy(*(_QWORD *)(a1 + 112), a2, 112 * v9);
*(_BYTE *)(a1 + 104) = 1;
if ( *(_DWORD *)(a1 + 100) )
{
v10 = 64LL;
v11 = 0LL;
v12 = 1011;
do
{
v13 = *(_QWORD *)(a1 + 112);
v14 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL);
if ( v14 )
{
if ( !v14(*(unsigned int *)(v13 + v10 + 32)) )
{
LABEL_38:
*(_DWORD *)(a1 + 264) = 2036;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v6 = a1 + 268;
v7 = client_errors[36];
goto LABEL_9;
}
v13 = *(_QWORD *)(a1 + 112);
}
if ( !*(_QWORD *)(v13 + v10 - 56) )
{
*(_QWORD *)(v13 + v10 - 56) = &is_not_null;
v13 = *(_QWORD *)(a1 + 112);
}
if ( *(_BYTE *)(v13 + v10 + 38) )
{
*(_BYTE *)(v13 + v10 + 38) = 0;
v13 = *(_QWORD *)(a1 + 112);
}
if ( !*(_QWORD *)(v13 + v10 - 64) )
{
*(_QWORD *)(v13 + v10 - 64) = v13 + v10;
v13 = *(_QWORD *)(a1 + 112);
}
switch ( *(_DWORD *)(v13 + v10 + 32) )
{
case 0:
break;
case 1:
*(_QWORD *)(v13 + v10) = 1LL;
break;
case 2:
case 0xD:
*(_QWORD *)(v13 + v10) = 2LL;
break;
case 3:
case 4:
*(_QWORD *)(v13 + v10) = 4LL;
break;
case 5:
case 8:
*(_QWORD *)(v13 + v10) = 8LL;
break;
case 6:
*(_QWORD *)(v13 + v10 - 56) = &is_null;
break;
case 7:
case 0xC:
*(_QWORD *)(v13 + v10) = 12LL;
break;
case 9:
goto LABEL_38;
case 0xA:
*(_QWORD *)(v13 + v10) = 5LL;
break;
case 0xB:
*(_QWORD *)(v13 + v10) = 13LL;
break;
default:
v15 = *(_DWORD *)(v13 + v10 + 32) - 245;
if ( v15 > 9 || !_bittest(&v12, v15) )
goto LABEL_38;
break;
}
++v11;
v10 += 112LL;
}
while ( v11 < *(unsigned int *)(a1 + 100) );
}
}
*(_BYTE *)(a1 + 104) = 1;
*(_BYTE *)(a1 + 233) = 1;
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
return 0;
}
| mysql_stmt_bind_param:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x38],0x0
JZ 0x00190dc3
MOV R14,RSI
MOV ECX,dword ptr [RBX + 0x50]
CMP ECX,0x1
JZ 0x00190e24
MOV EAX,dword ptr [RBX + 0x378]
TEST RAX,RAX
JZ 0x00190e1c
CMP qword ptr [RBX + 0x70],0x0
JNZ 0x00190dbe
IMUL RSI,RAX,0x70
MOV RDI,RBX
CALL 0x0018ea87
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x0019103e
MOV ECX,dword ptr [RBX + 0x378]
IMUL RDX,RCX,0x70
MOV RDI,RAX
XOR ESI,ESI
CALL 0x001392e0
MOV EAX,dword ptr [RBX + 0x378]
LAB_00190dbe:
MOV dword ptr [RBX + 0x64],EAX
JMP 0x00190e24
LAB_00190dc3:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x4a35c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00139130
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x4a35d0]
MOV RSI,qword ptr [RAX + 0x68]
LAB_00190e04:
MOV EDX,0x200
CALL 0x00139130
MOV byte ptr [RBX + 0x30b],R14B
MOV AL,0x1
JMP 0x00190f9d
LAB_00190e1c:
TEST ECX,ECX
JZ 0x00190ff5
LAB_00190e24:
MOV EAX,dword ptr [RBX + 0x64]
TEST RAX,RAX
SETZ CL
TEST R14,R14
SETZ DL
OR DL,CL
JNZ 0x00190f6c
MOV RDI,qword ptr [RBX + 0x70]
IMUL RDX,RAX,0x70
MOV RSI,R14
CALL 0x001390a0
MOV byte ptr [RBX + 0x68],0x1
CMP dword ptr [RBX + 0x64],0x0
JZ 0x00190f6c
MOV R14D,0x40
XOR R15D,R15D
MOV R13D,0x3f3
LEA R12,[0x1fef64]
LAB_00190e6f:
MOV RCX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RBX + 0x70]
MOV RCX,qword ptr [RCX + 0x4d0]
MOV RCX,qword ptr [RCX + 0x38]
TEST RCX,RCX
JZ 0x00190e9a
MOV EDI,dword ptr [RAX + R14*0x1 + 0x20]
CALL RCX
TEST AL,AL
JZ 0x00190fac
MOV RAX,qword ptr [RBX + 0x70]
LAB_00190e9a:
CMP qword ptr [RAX + R14*0x1 + -0x38],0x0
JNZ 0x00190eb2
LEA RCX,[0x51d5d2]
MOV qword ptr [RAX + R14*0x1 + -0x38],RCX
MOV RAX,qword ptr [RBX + 0x70]
LAB_00190eb2:
CMP byte ptr [RAX + R14*0x1 + 0x26],0x0
JZ 0x00190ec4
MOV byte ptr [RAX + R14*0x1 + 0x26],0x0
MOV RAX,qword ptr [RBX + 0x70]
LAB_00190ec4:
CMP qword ptr [RAX + R14*0x1 + -0x40],0x0
JNZ 0x00190ed9
LEA RCX,[RAX + R14*0x1]
MOV qword ptr [RAX + R14*0x1 + -0x40],RCX
MOV RAX,qword ptr [RBX + 0x70]
LAB_00190ed9:
MOV ECX,dword ptr [RAX + R14*0x1 + 0x20]
CMP RCX,0xd
JA 0x00190ef7
MOVSXD RCX,dword ptr [R12 + RCX*0x4]
ADD RCX,R12
switchD:
JMP RCX
caseD_2:
MOV qword ptr [RAX + R14*0x1],0x2
JMP 0x00190f59
default:
ADD ECX,0xffffff0b
CMP ECX,0x9
JA 0x00190fac
BT R13D,ECX
JC 0x00190f59
JMP 0x00190fac
caseD_3:
MOV qword ptr [RAX + R14*0x1],0x4
JMP 0x00190f59
caseD_5:
MOV qword ptr [RAX + R14*0x1],0x8
JMP 0x00190f59
caseD_7:
MOV qword ptr [RAX + R14*0x1],0xc
JMP 0x00190f59
caseD_b:
MOV qword ptr [RAX + R14*0x1],0xd
JMP 0x00190f59
caseD_1:
MOV qword ptr [RAX + R14*0x1],0x1
JMP 0x00190f59
caseD_6:
LEA RCX,[0x4a26e0]
MOV qword ptr [RAX + R14*0x1 + -0x38],RCX
JMP 0x00190f59
caseD_a:
MOV qword ptr [RAX + R14*0x1],0x5
caseD_0:
INC R15
MOV EAX,dword ptr [RBX + 0x64]
ADD R14,0x70
CMP R15,RAX
JC 0x00190e6f
LAB_00190f6c:
MOV AL,0x1
MOV byte ptr [RBX + 0x68],AL
MOV byte ptr [RBX + 0xe9],AL
MOV dword ptr [RBX + 0x108],0x0
MOV dword ptr [RBX + 0x30d],0x30303030
MOV word ptr [RBX + 0x311],0x30
MOV byte ptr [RBX + 0x10c],0x0
XOR EAX,EAX
LAB_00190f9d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_9:
MOV dword ptr [RBX + 0x108],0x7f4
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x4a35c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00139130
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x4a35d0]
MOV RSI,qword ptr [RAX + 0x120]
JMP 0x00190e04
LAB_00190ff5:
MOV dword ptr [RBX + 0x108],0x7ee
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x4a35c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00139130
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x4a35d0]
MOV RSI,qword ptr [RAX + 0xf0]
JMP 0x00190e04
LAB_0019103e:
MOV dword ptr [RBX + 0x108],0x7d8
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x4a35c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00139130
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x4a35d0]
MOV RSI,qword ptr [RAX + 0x40]
JMP 0x00190e04
|
int8 mysql_stmt_bind_param(long param_1,void *param_2)
{
code *pcVar1;
char cVar2;
int iVar3;
void *__s;
int8 uVar4;
long lVar5;
uint uVar6;
char *__src;
long lVar7;
ulong uVar8;
if (*(long *)(param_1 + 0x38) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_004a3638;
LAB_00190e04:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar4 = 1;
}
else {
if (*(int *)(param_1 + 0x50) != 1) {
iVar3 = *(int *)(param_1 + 0x378);
if (iVar3 == 0) {
if (*(int *)(param_1 + 0x50) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7ee;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Statement_is_not_prepared_004a36c0;
goto LAB_00190e04;
}
}
else {
if (*(long *)(param_1 + 0x70) == 0) {
__s = (void *)ma_alloc_root(param_1);
*(void **)(param_1 + 0x70) = __s;
if (__s == (void *)0x0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Client_run_out_of_memory_004a3610;
goto LAB_00190e04;
}
memset(__s,0,(ulong)*(uint *)(param_1 + 0x378) * 0x70);
iVar3 = *(int *)(param_1 + 0x378);
}
*(int *)(param_1 + 100) = iVar3;
}
}
if (param_2 != (void *)0x0 && (ulong)*(uint *)(param_1 + 100) != 0) {
memcpy(*(void **)(param_1 + 0x70),param_2,(ulong)*(uint *)(param_1 + 100) * 0x70);
*(int1 *)(param_1 + 0x68) = 1;
if (*(int *)(param_1 + 100) != 0) {
lVar7 = 0x40;
uVar8 = 0;
do {
lVar5 = *(long *)(param_1 + 0x70);
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38);
if (pcVar1 != (code *)0x0) {
cVar2 = (*pcVar1)(*(int4 *)(lVar5 + 0x20 + lVar7));
if (cVar2 != '\0') {
lVar5 = *(long *)(param_1 + 0x70);
goto LAB_00190e9a;
}
switchD_00190eeb_caseD_9:
*(int4 *)(param_1 + 0x108) = 0x7f4;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Buffer_type_is_not_supported_004a36f0;
goto LAB_00190e04;
}
LAB_00190e9a:
if (*(long *)(lVar5 + -0x38 + lVar7) == 0) {
*(int1 **)(lVar5 + -0x38 + lVar7) = &is_not_null;
lVar5 = *(long *)(param_1 + 0x70);
}
if (*(char *)(lVar5 + 0x26 + lVar7) != '\0') {
*(int1 *)(lVar5 + 0x26 + lVar7) = 0;
lVar5 = *(long *)(param_1 + 0x70);
}
if (*(long *)(lVar5 + -0x40 + lVar7) == 0) {
*(long *)(lVar5 + -0x40 + lVar7) = lVar5 + lVar7;
lVar5 = *(long *)(param_1 + 0x70);
}
iVar3 = *(int *)(lVar5 + 0x20 + lVar7);
switch(iVar3) {
case 0:
break;
case 1:
*(int8 *)(lVar5 + lVar7) = 1;
break;
case 2:
case 0xd:
*(int8 *)(lVar5 + lVar7) = 2;
break;
case 3:
case 4:
*(int8 *)(lVar5 + lVar7) = 4;
break;
case 5:
case 8:
*(int8 *)(lVar5 + lVar7) = 8;
break;
case 6:
*(int1 **)(lVar5 + -0x38 + lVar7) = &is_null;
break;
case 7:
case 0xc:
*(int8 *)(lVar5 + lVar7) = 0xc;
break;
case 9:
goto switchD_00190eeb_caseD_9;
case 10:
*(int8 *)(lVar5 + lVar7) = 5;
break;
case 0xb:
*(int8 *)(lVar5 + lVar7) = 0xd;
break;
default:
uVar6 = iVar3 - 0xf5;
if ((9 < uVar6) || ((0x3f3U >> (uVar6 & 0x1f) & 1) == 0)) goto switchD_00190eeb_caseD_9;
}
uVar8 = uVar8 + 1;
lVar7 = lVar7 + 0x70;
} while (uVar8 < *(uint *)(param_1 + 100));
}
}
*(int1 *)(param_1 + 0x68) = 1;
*(int1 *)(param_1 + 0xe9) = 1;
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
uVar4 = 0;
}
return uVar4;
}
| |
39,066 | read_long_data2 | eloqsql/storage/maria/ma_blockrec.c | static my_bool read_long_data2(MARIA_HA *info, uchar *to, ulong length,
MARIA_EXTENT_CURSOR *extent,
uchar **data, uchar **end_of_data)
{
uint left_length= (uint) (*end_of_data - *data);
DBUG_ENTER("read_long_data2");
DBUG_PRINT("enter", ("length: %lu left_length: %u",
length, left_length));
DBUG_ASSERT(*data <= *end_of_data);
/*
Fields are never split in middle. This means that if length > rest-of-data
we should start reading from the next extent. The reason we may have
data left on the page is that if the fixed part of the row was less than
min_block_length the head block was extended to min_block_length.
This may change in the future, which is why we have the loop written
the way it's written.
*/
if (extent->first_extent && length > left_length)
{
*end_of_data= *data;
left_length= 0;
}
for(;;)
{
if (unlikely(left_length >= length))
{
memcpy(to, *data, length);
(*data)+= length;
DBUG_PRINT("info", ("left_length: %u", left_length - (uint) length));
DBUG_RETURN(0);
}
memcpy(to, *data, left_length);
to+= left_length;
length-= left_length;
if (!(*data= read_next_extent(info, extent, end_of_data)))
break;
left_length= (uint) (*end_of_data - *data);
}
DBUG_RETURN(1);
} | O3 | c | read_long_data2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
movq (%r9), %rdi
movq (%r8), %rax
subq %rax, %rdi
movq %rcx, -0x38(%rbp)
cmpb $0x0, 0x34(%rcx)
setne %dl
movl %edi, %esi
cmpq %r14, %rsi
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x62df4
movq %rax, (%r12)
movq (%r13), %rax
xorl %edi, %edi
movl %edi, %ebx
cmpq %r14, %rbx
jae 0x62e41
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x29080
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x5deab
movq %rax, (%r13)
testq %rax, %rax
je 0x62e30
subq %rbx, %r14
addq %rbx, %r15
movl (%r12), %ebx
subl %eax, %ebx
jmp 0x62df6
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x29080
addq %r14, (%r13)
xorl %eax, %eax
jmp 0x62e32
| read_long_data2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, r9
mov r13, r8
mov r14, rdx
mov r15, rsi
mov [rbp+var_30], rdi
mov rdi, [r9]
mov rax, [r8]
sub rdi, rax
mov [rbp+var_38], rcx
cmp byte ptr [rcx+34h], 0
setnz dl
mov esi, edi
cmp rsi, r14
setb sil
and sil, dl
cmp sil, 1
jnz short loc_62DF4
mov [r12], rax
mov rax, [r13+0]
xor edi, edi
loc_62DF4:
mov ebx, edi
loc_62DF6:
cmp rbx, r14
jnb short loc_62E41
mov rdi, r15
mov rsi, rax
mov rdx, rbx
call _memcpy
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rdx, r12
call read_next_extent
mov [r13+0], rax
test rax, rax
jz short loc_62E30
sub r14, rbx
add r15, rbx
mov ebx, [r12]
sub ebx, eax
jmp short loc_62DF6
loc_62E30:
mov al, 1
loc_62E32:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_62E41:
mov rdi, r15
mov rsi, rax
mov rdx, r14
call _memcpy
add [r13+0], r14
xor eax, eax
jmp short loc_62E32
| long long read_long_data2(long long *a1, long long a2, unsigned long long a3, long long a4, long long *a5, long long *a6)
{
unsigned long long v8; // r14
long long next_extent; // rax
long long v11; // rdi
unsigned long long i; // rbx
unsigned long long v13; // rcx
long long v14; // r8
int v15; // r9d
v8 = a3;
next_extent = *a5;
v11 = *a6 - *a5;
if ( *(_BYTE *)(a4 + 52) != 0 && (unsigned int)v11 < a3 )
{
*a6 = next_extent;
next_extent = *a5;
LODWORD(v11) = 0;
}
for ( i = (unsigned int)v11; i < v8; i = (unsigned int)(*(_DWORD *)a6 - next_extent) )
{
memcpy(a2, next_extent, i);
next_extent = read_next_extent(a1, (long long *)a4, (unsigned long long)a6, v13, v14, v15);
*a5 = next_extent;
if ( !next_extent )
return 1LL;
v8 -= i;
a2 += i;
}
memcpy(a2, next_extent, v8);
*a5 += v8;
return 0LL;
}
| read_long_data2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R9
MOV R13,R8
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RBP + -0x30],RDI
MOV RDI,qword ptr [R9]
MOV RAX,qword ptr [R8]
SUB RDI,RAX
MOV qword ptr [RBP + -0x38],RCX
CMP byte ptr [RCX + 0x34],0x0
SETNZ DL
MOV ESI,EDI
CMP RSI,R14
SETC SIL
AND SIL,DL
CMP SIL,0x1
JNZ 0x00162df4
MOV qword ptr [R12],RAX
MOV RAX,qword ptr [R13]
XOR EDI,EDI
LAB_00162df4:
MOV EBX,EDI
LAB_00162df6:
CMP RBX,R14
JNC 0x00162e41
MOV RDI,R15
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00129080
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
CALL 0x0015deab
MOV qword ptr [R13],RAX
TEST RAX,RAX
JZ 0x00162e30
SUB R14,RBX
ADD R15,RBX
MOV EBX,dword ptr [R12]
SUB EBX,EAX
JMP 0x00162df6
LAB_00162e30:
MOV AL,0x1
LAB_00162e32:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00162e41:
MOV RDI,R15
MOV RSI,RAX
MOV RDX,R14
CALL 0x00129080
ADD qword ptr [R13],R14
XOR EAX,EAX
JMP 0x00162e32
|
int8
read_long_data2(int8 param_1,void *param_2,ulong param_3,long param_4,long *param_5,
long *param_6)
{
void *__src;
ulong uVar1;
__src = (void *)*param_5;
uVar1 = *param_6 - (long)__src;
if ((uVar1 & 0xffffffff) < param_3 && *(char *)(param_4 + 0x34) != '\0') {
*param_6 = (long)__src;
__src = (void *)*param_5;
uVar1 = 0;
}
uVar1 = uVar1 & 0xffffffff;
while( true ) {
if (param_3 <= uVar1) {
memcpy(param_2,__src,param_3);
*param_5 = *param_5 + param_3;
return 0;
}
memcpy(param_2,__src,uVar1);
__src = (void *)read_next_extent(param_1,param_4,param_6);
*param_5 = (long)__src;
if (__src == (void *)0x0) break;
param_3 = param_3 - uVar1;
param_2 = (void *)((long)param_2 + uVar1);
uVar1 = (ulong)(uint)((int)*param_6 - (int)__src);
}
return 1;
}
| |
39,067 | js_map_get_size | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_get_size(JSContext *ctx, JSValue this_val, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
if (!s)
return JS_EXCEPTION;
return js_uint32(s->record_count);
} | O3 | c | js_map_get_size:
addl $0x23, %ecx
cmpl $-0x1, %edx
jne 0x51419
movzwl 0x6(%rsi), %eax
cmpl %eax, %ecx
jne 0x51419
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x51419
movslq 0x18(%rax), %rcx
xorl %esi, %esi
movl %ecx, %eax
cvtsi2sd %rax, %xmm0
testq %rcx, %rcx
movq %xmm0, %rax
cmovnsq %rcx, %rax
movl $0x7, %edx
cmovnsq %rsi, %rdx
retq
pushq %rax
movl %ecx, %esi
callq 0x270bb
movl $0x6, %edx
xorl %eax, %eax
addq $0x8, %rsp
retq
| js_map_get_size:
add ecx, 23h ; '#'
cmp edx, 0FFFFFFFFh
jnz short loc_51419
movzx eax, word ptr [rsi+6]
cmp ecx, eax
jnz short loc_51419
mov rax, [rsi+30h]
test rax, rax
jz short loc_51419
movsxd rcx, dword ptr [rax+18h]
xor esi, esi
mov eax, ecx
cvtsi2sd xmm0, rax
test rcx, rcx
movq rax, xmm0
cmovns rax, rcx
mov edx, 7
cmovns rdx, rsi
retn
loc_51419:
push rax
mov esi, ecx
call JS_ThrowTypeErrorInvalidClass
mov edx, 6
xor eax, eax
add rsp, 8
retn
| long long js_map_get_size(
long long a1,
long long a2,
int a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
int v12; // ecx
long long v13; // rax
long long v14; // rcx
long long result; // rax
v12 = a4 + 35;
if ( a3 == -1 && v12 == *(unsigned __int16 *)(a2 + 6) && (v13 = *(_QWORD *)(a2 + 48)) != 0 )
{
v14 = *(int *)(v13 + 24);
*(double *)&result = (double)*(int *)(v13 + 24);
if ( v14 >= 0 )
return v14;
}
else
{
JS_ThrowTypeErrorInvalidClass(a1, v12, a5, a6, a7, a8, a9, a10, a11, a12);
*(double *)&result = 0.0;
}
return result;
}
| js_map_get_size:
ADD ECX,0x23
CMP EDX,-0x1
JNZ 0x00151419
MOVZX EAX,word ptr [RSI + 0x6]
CMP ECX,EAX
JNZ 0x00151419
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x00151419
MOVSXD RCX,dword ptr [RAX + 0x18]
XOR ESI,ESI
MOV EAX,ECX
CVTSI2SD XMM0,RAX
TEST RCX,RCX
MOVQ RAX,XMM0
CMOVNS RAX,RCX
MOV EDX,0x7
CMOVNS RDX,RSI
RET
LAB_00151419:
PUSH RAX
MOV ESI,ECX
CALL 0x001270bb
MOV EDX,0x6
XOR EAX,EAX
ADD RSP,0x8
RET
|
int1 [16] js_map_get_size(int8 param_1,long param_2,int param_3,int param_4)
{
uint uVar1;
double dVar2;
double dVar3;
int1 auVar5 [16];
int8 uVar4;
if (((param_3 == -1) && (param_4 + 0x23U == (uint)*(ushort *)(param_2 + 6))) &&
(*(long *)(param_2 + 0x30) != 0)) {
uVar1 = *(uint *)(*(long *)(param_2 + 0x30) + 0x18);
dVar3 = (double)(long)(int)uVar1;
dVar2 = (double)uVar1;
if (-1 < (long)dVar3) {
dVar2 = dVar3;
}
uVar4 = 7;
if (-1 < (long)dVar3) {
uVar4 = 0;
}
auVar5._8_8_ = uVar4;
auVar5._0_8_ = dVar2;
return auVar5;
}
JS_ThrowTypeErrorInvalidClass(param_1,param_4 + 0x23U);
return ZEXT816(6) << 0x40;
}
| |
39,068 | 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_token_string() const | monkey531[P]llama/common/json.hpp | std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
} | O0 | 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_token_string() const:
subq $0x78, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x67(%rsp)
callq 0x5d5e0
movq 0x20(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa9140
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa9170
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xbd9e0
testb $0x1, %al
jne 0xabd23
jmp 0xabddb
leaq 0x50(%rsp), %rdi
callq 0xbda20
movb (%rax), %al
movb %al, 0x47(%rsp)
movzbl 0x47(%rsp), %eax
cmpl $0x1f, %eax
jg 0xabdb7
movb $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xbda30
movq 0x8(%rsp), %rdi
movq %rax, (%rsp)
callq 0xbda40
movq (%rsp), %rdi
movq %rax, %rsi
movzbl 0x47(%rsp), %ecx
leaq 0x16b61c(%rip), %rdx # 0x217397
xorl %eax, %eax
callq 0x5d900
movq 0x8(%rsp), %rdi
callq 0xbda30
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5d220
jmp 0xabd9b
jmp 0xabdca
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x5e568
jmp 0xabdfb
movq 0x10(%rsp), %rdi
movsbl 0x47(%rsp), %esi
callq 0x5e450
jmp 0xabdc8
jmp 0xabdca
jmp 0xabdcc
leaq 0x50(%rsp), %rdi
callq 0xbda50
jmp 0xabd0b
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0xabdf1
movq 0x10(%rsp), %rdi
callq 0x5e568
movq 0x18(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x5dbc0
nopw %cs:(%rax,%rax)
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
sub rsp, 78h
mov [rsp+78h+var_68], rdi
mov rax, rdi
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rsp+78h+var_58]
add rax, 38h ; '8'
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE5beginEv; std::vector<char>::begin(void)
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE3endEv; std::vector<char>::end(void)
mov [rsp+78h+var_30], rax
loc_ABD0B:
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_30]
call _ZN9__gnu_cxxneIPKcSt6vectorIcSaIcEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<char const*,std::vector<char>>(__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&,__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&)
test al, 1
jnz short loc_ABD23
jmp loc_ABDDB
loc_ABD23:
lea rdi, [rsp+78h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(void)
mov al, [rax]
mov [rsp+78h+var_31], al
movzx eax, [rsp+78h+var_31]
cmp eax, 1Fh
jg short loc_ABDB7
mov [rsp+78h+var_38], 0
mov [rsp+78h+var_40], 0
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_70], rdi
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_78], rax
call _ZNKSt5arrayIcLm9EE4sizeEv; std::array<char,9ul>::size(void)
mov rdi, [rsp+78h+var_78]
mov rsi, rax
movzx ecx, [rsp+78h+var_31]
lea rdx, aU4x; "<U+%.4X>"
xor eax, eax
call _snprintf
mov rdi, [rsp+78h+var_70]
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_68]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_ABD9B:
jmp short loc_ABDCA
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_ABDFB
loc_ABDB7:
mov rdi, [rsp+78h+var_68]
movsx esi, [rsp+78h+var_31]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_ABDC8:
jmp short $+2
loc_ABDCA:
jmp short $+2
loc_ABDCC:
lea rdi, [rsp+78h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(void)
jmp loc_ABD0B
loc_ABDDB:
mov [rsp+78h+var_11], 1
test [rsp+78h+var_11], 1
jnz short loc_ABDF1
mov rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_ABDF1:
mov rax, [rsp+78h+var_60]
add rsp, 78h
retn
loc_ABDFB:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| 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_token_string(
long long a1,
long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+0h] [rbp-78h]
long long v6; // [rsp+38h] [rbp-40h] BYREF
char v7; // [rsp+40h] [rbp-38h]
unsigned __int8 v8; // [rsp+47h] [rbp-31h]
long long v9; // [rsp+48h] [rbp-30h] BYREF
_QWORD v10[2]; // [rsp+50h] [rbp-28h] BYREF
char v11; // [rsp+67h] [rbp-11h]
long long v12; // [rsp+68h] [rbp-10h]
long long v13; // [rsp+70h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = 0;
std::string::basic_string(a1);
v10[1] = a2 + 56;
v10[0] = std::vector<char>::begin(a2 + 56);
v9 = std::vector<char>::end(a2 + 56);
while ( (__gnu_cxx::operator!=<char const*,std::vector<char>>(v10, &v9) & 1) != 0 )
{
v8 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(v10);
if ( v8 > 0x1Fu )
{
std::string::push_back(a1, (unsigned int)(char)v8);
}
else
{
v7 = 0;
v6 = 0LL;
v5 = ((long long (*)(void))std::array<char,9ul>::data)();
v2 = std::array<char,9ul>::size(&v6);
snprintf(v5, v2, "<U+%.4X>", v8);
v3 = std::array<char,9ul>::data(&v6);
std::string::operator+=(a1, v3);
}
__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(v10);
}
return a1;
}
| get_token_string:
SUB RSP,0x78
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x67],0x0
CALL 0x0015d5e0
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x38
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a9140
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a9170
MOV qword ptr [RSP + 0x48],RAX
LAB_001abd0b:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x48]
CALL 0x001bd9e0
TEST AL,0x1
JNZ 0x001abd23
JMP 0x001abddb
LAB_001abd23:
LEA RDI,[RSP + 0x50]
CALL 0x001bda20
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x47],AL
MOVZX EAX,byte ptr [RSP + 0x47]
CMP EAX,0x1f
JG 0x001abdb7
MOV byte ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x38],0x0
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001bda30
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
CALL 0x001bda40
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOVZX ECX,byte ptr [RSP + 0x47]
LEA RDX,[0x317397]
XOR EAX,EAX
CALL 0x0015d900
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001bda30
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
LAB_001abd94:
CALL 0x0015d220
JMP 0x001abd9b
LAB_001abd9b:
JMP 0x001abdca
LAB_001abdb7:
MOV RDI,qword ptr [RSP + 0x10]
MOVSX ESI,byte ptr [RSP + 0x47]
CALL 0x0015e450
LAB_001abdc6:
JMP 0x001abdc8
LAB_001abdc8:
JMP 0x001abdca
LAB_001abdca:
JMP 0x001abdcc
LAB_001abdcc:
LEA RDI,[RSP + 0x50]
CALL 0x001bda50
JMP 0x001abd0b
LAB_001abddb:
MOV byte ptr [RSP + 0x67],0x1
TEST byte ptr [RSP + 0x67],0x1
JNZ 0x001abdf1
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015e568
LAB_001abdf1:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x001abde7) */
/* 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_token_string() const */
string * 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_token_string(void)
{
bool bVar1;
byte *pbVar2;
char *pcVar3;
size_t __maxlen;
long in_RSI;
string *in_RDI;
int8 local_40;
int1 local_38;
byte local_31;
int8 local_30;
int8 local_28;
vector<char,std::allocator<char>> *local_20;
int1 local_11;
local_11 = 0;
std::__cxx11::string::string(in_RDI);
local_20 = (vector<char,std::allocator<char>> *)(in_RSI + 0x38);
local_28 = std::vector<char,std::allocator<char>>::begin(local_20);
local_30 = std::vector<char,std::allocator<char>>::end(local_20);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_28,(__normal_iterator *)&local_30), bVar1) {
pbVar2 = (byte *)__gnu_cxx::
__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::
operator*((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>
*)&local_28);
local_31 = *pbVar2;
if (local_31 < 0x20) {
local_38 = 0;
local_40 = 0;
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
__maxlen = std::array<char,9ul>::size();
snprintf(pcVar3,__maxlen,"<U+%.4X>",(ulong)local_31);
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
/* try { // try from 001abd94 to 001abdc5 has its CatchHandler @ 001abd9d */
std::__cxx11::string::operator+=(in_RDI,pcVar3);
}
else {
std::__cxx11::string::push_back((char)in_RDI);
}
__gnu_cxx::__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::operator++
((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>> *)&local_28);
}
return in_RDI;
}
| |
39,069 | JS_ConcatString1 | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ConcatString1(JSContext *ctx,
const JSString *p1, const JSString *p2)
{
JSString *p;
uint32_t len;
int is_wide_char;
len = p1->len + p2->len;
if (len > JS_STRING_LEN_MAX)
return JS_ThrowRangeError(ctx, "invalid string length");
is_wide_char = p1->is_wide_char | p2->is_wide_char;
p = js_alloc_string(ctx, len, is_wide_char);
if (!p)
return JS_EXCEPTION;
if (!is_wide_char) {
memcpy(p->u.str8, p1->u.str8, p1->len);
memcpy(p->u.str8 + p1->len, p2->u.str8, p2->len);
p->u.str8[len] = '\0';
} else {
copy_str16(p->u.str16, p1, 0, p1->len);
copy_str16(p->u.str16 + p1->len, p2, 0, p2->len);
}
return JS_MKPTR(JS_TAG_STRING, p);
} | O0 | c | JS_ConcatString1:
subq $0x38, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movq 0x10(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
addl %ecx, %eax
movl %eax, 0x4(%rsp)
cmpl $0x3fffffff, 0x4(%rsp) # imm = 0x3FFFFFFF
jbe 0x71534
movq 0x20(%rsp), %rdi
leaq 0x9c4b0(%rip), %rsi # 0x10d9ce
movb $0x0, %al
callq 0x29670
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0x71689
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %eax
movq 0x10(%rsp), %rcx
movq 0x4(%rcx), %rcx
shrq $0x1f, %rcx
andq $0x1, %rcx
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %esi
movl (%rsp), %edx
callq 0x29760
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x71595
movl $0x0, 0x28(%rsp)
movq $0x6, 0x30(%rsp)
jmp 0x71689
cmpl $0x0, (%rsp)
jne 0x71613
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
callq 0xe5b0
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cltq
addq %rax, %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsi
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
callq 0xe5b0
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movb $0x0, 0x18(%rax,%rcx)
jmp 0x71676
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x716a0
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cltq
shlq %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x716a0
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $-0x7, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| JS_ConcatString1:
sub rsp, 38h
mov [rsp+38h+var_18], rdi
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_28], rdx
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov rcx, [rsp+38h+var_28]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
add eax, ecx
mov [rsp+38h+var_34], eax
cmp [rsp+38h+var_34], 3FFFFFFFh
jbe short loc_71534
mov rdi, [rsp+38h+var_18]
lea rsi, aInvalidStringL; "invalid string length"
mov al, 0
call JS_ThrowRangeError
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp loc_71689
loc_71534:
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx eax, al
mov rcx, [rsp+38h+var_28]
mov rcx, [rcx+4]
shr rcx, 1Fh
and rcx, 1
movzx ecx, cl
or eax, ecx
mov [rsp+38h+var_38], eax
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_34]
mov edx, [rsp+38h+var_38]
call js_alloc_string
mov [rsp+38h+var_30], rax
cmp [rsp+38h+var_30], 0
jnz short loc_71595
mov dword ptr [rsp+38h+var_10], 0
mov [rsp+38h+var_8], 6
jmp loc_71689
loc_71595:
cmp [rsp+38h+var_38], 0
jnz short loc_71613
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rsi, [rsp+38h+var_20]
add rsi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov edx, eax
call _memcpy
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cdqe
add rdi, rax
mov rsi, [rsp+38h+var_28]
add rsi, 18h
mov rax, [rsp+38h+var_28]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rsp+38h+var_30]
mov ecx, [rsp+38h+var_34]
mov byte ptr [rax+rcx+18h], 0
jmp short loc_71676
loc_71613:
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rsi, [rsp+38h+var_20]
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call copy_str16
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cdqe
shl rax, 1
add rdi, rax
mov rsi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_28]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call copy_str16
loc_71676:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], 0FFFFFFFFFFFFFFF9h
loc_71689:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
| long long JS_ConcatString1(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rcx
char v16; // [rsp+0h] [rbp-38h]
unsigned int v17; // [rsp+0h] [rbp-38h]
unsigned int v18; // [rsp+4h] [rbp-34h]
long long v19; // [rsp+8h] [rbp-30h]
long long v21; // [rsp+28h] [rbp-10h]
v14 = *(_QWORD *)(a3 + 4) & 0x7FFFFFFFLL;
v18 = v14 + (*(_QWORD *)(a2 + 4) & 0x7FFFFFFF);
if ( v18 > 0x3FFFFFFF )
return JS_ThrowRangeError(
a1,
(long long)"invalid string length",
a3,
v14,
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v16);
v17 = (*(_QWORD *)(a3 + 4) & 0x80000000LL) != 0 || (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0;
v19 = js_alloc_string(a1, v18, v17);
if ( v19 )
{
if ( v17 )
{
copy_str16(v19 + 24, a2, 0LL, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
copy_str16(2LL * (*(_QWORD *)(a2 + 4) & 0x7FFFFFFF) + v19 + 24, a3, 0LL, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF);
}
else
{
memcpy(v19 + 24, a2 + 24, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
memcpy((*(_QWORD *)(a2 + 4) & 0x7FFFFFFF) + v19 + 24, a3 + 24, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF);
*(_BYTE *)(v19 + v18 + 24) = 0;
}
return v19;
}
else
{
LODWORD(v21) = 0;
}
return v21;
}
| JS_ConcatString1:
SUB RSP,0x38
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
ADD EAX,ECX
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x3fffffff
JBE 0x00171534
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x20d9ce]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x00171689
LAB_00171534:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x4]
SHR RCX,0x1f
AND RCX,0x1
MOVZX ECX,CL
OR EAX,ECX
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RSP]
CALL 0x00129760
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00171595
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x6
JMP 0x00171689
LAB_00171595:
CMP dword ptr [RSP],0x0
JNZ 0x00171613
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x18]
ADD RSI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0010e5b0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CDQE
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x18
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0010e5b0
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0
JMP 0x00171676
LAB_00171613:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x001716a0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CDQE
SHL RAX,0x1
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x001716a0
LAB_00171676:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],-0x7
LAB_00171689:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] JS_ConcatString1(int8 param_1,long param_2,long param_3)
{
byte bVar1;
uint uVar2;
long lVar3;
int1 auVar4 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
uVar2 = ((uint)*(int8 *)(param_2 + 4) & 0x7fffffff) +
((uint)*(int8 *)(param_3 + 4) & 0x7fffffff);
if (uVar2 < 0x40000000) {
bVar1 = (byte)(*(ulong *)(param_2 + 4) >> 0x1f) & 1 |
(byte)(*(ulong *)(param_3 + 4) >> 0x1f) & 1;
lVar3 = js_alloc_string(param_1,uVar2,bVar1);
if (lVar3 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
if (bVar1 == 0) {
memcpy((void *)(lVar3 + 0x18),(void *)(param_2 + 0x18),
(ulong)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff));
memcpy((void *)(lVar3 + 0x18 + (long)(int)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff))
,(void *)(param_3 + 0x18),(ulong)((uint)*(int8 *)(param_3 + 4) & 0x7fffffff));
*(int1 *)(lVar3 + 0x18 + (ulong)uVar2) = 0;
}
else {
copy_str16(lVar3 + 0x18,param_2,0,(uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
copy_str16(lVar3 + 0x18 + (long)(int)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff) * 2,
param_3,0,(uint)*(int8 *)(param_3 + 4) & 0x7fffffff);
}
local_10 = (int4)lVar3;
uStack_c = (int4)((ulong)lVar3 >> 0x20);
local_8 = 0xfffffffffffffff9;
}
}
else {
auVar4 = JS_ThrowRangeError(param_1,"invalid string length");
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
| |
39,070 | mi_store_blob_length | eloqsql/storage/myisam/mi_dynrec.c | void _mi_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O0 | c | mi_store_blob_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0xacada
movq -0x28(%rbp), %rax
leaq 0xb5f23(%rip), %rcx # 0x16298c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
jmp 0xacadc
jmp 0xaca81
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0xacadc
jmp 0xaca9a
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0xacadc
jmp 0xacac7
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0xacada
jmp 0xacadc
popq %rbp
retq
nop
| _mi_store_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 3
ja short def_ACA70; jumptable 00000000000ACA70 default case
mov rax, [rbp+var_28]
lea rcx, jpt_ACA70
movsxd rax, ds:(jpt_ACA70 - 16298Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_ACA72:
mov eax, [rbp+var_10]; jumptable 00000000000ACA70 case 1
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
jmp short loc_ACADC
loc_ACA7F:
jmp short $+2; jumptable 00000000000ACA70 case 2
loc_ACA81:
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov eax, [rbp+var_10]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax], cx
jmp short loc_ACADC
loc_ACA98:
jmp short $+2; jumptable 00000000000ACA70 case 3
loc_ACA9A:
mov eax, [rbp+var_10]
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
mov eax, [rbp+var_10]
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov [rax+1], cl
mov eax, [rbp+var_10]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_8]
mov [rax+2], cl
jmp short loc_ACADC
loc_ACAC5:
jmp short $+2; jumptable 00000000000ACA70 case 4
loc_ACAC7:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov ecx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], ecx
jmp short $+2; jumptable 00000000000ACA70 default case
def_ACA70:
jmp short $+2; jumptable 00000000000ACA70 default case
loc_ACADC:
pop rbp
retn
| unsigned long long mi_store_blob_length(_BYTE *a1, int a2, int a3)
{
unsigned long long result; // rax
result = (unsigned int)(a2 - 1);
switch ( a2 )
{
case 1:
result = (unsigned long long)a1;
*a1 = a3;
break;
case 2:
result = (unsigned long long)a1;
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
result = (unsigned long long)a1;
a1[2] = BYTE2(a3);
break;
case 4:
result = (unsigned long long)a1;
*(_DWORD *)a1 = a3;
break;
default:
return result;
}
return result;
}
| _mi_store_blob_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x3
JA 0x001acada
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x26298c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
JMP 0x001acadc
caseD_2:
JMP 0x001aca81
LAB_001aca81:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],CX
JMP 0x001acadc
caseD_3:
JMP 0x001aca9a
LAB_001aca9a:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],CL
JMP 0x001acadc
caseD_4:
JMP 0x001acac7
LAB_001acac7:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
JMP 0x001acada
LAB_001acada:
JMP 0x001acadc
default:
POP RBP
RET
|
void _mi_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
| |
39,071 | set_default_charset | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset(uint cs, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_nr(cs);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O3 | c | set_default_charset:
pushq %rbp
movq %rsp, %rbp
leaq 0x10775(%rip), %rax # 0x46c20
addq $-0x48, %rax
movl 0x48(%rax), %ecx
addq $0x48, %rax
testl %ecx, %ecx
je 0x364be
cmpl %edi, %ecx
jne 0x364af
testl %ecx, %ecx
je 0x364d0
leaq 0x1b9bf(%rip), %rcx # 0x51e88
movq %rax, (%rcx)
xorl %eax, %eax
jmp 0x364d2
movb $0x1, %al
popq %rbp
retq
| set_default_charset:
push rbp
mov rbp, rsp
lea rax, mariadb_compiled_charsets
add rax, 0FFFFFFFFFFFFFFB8h
loc_364AF:
mov ecx, [rax+48h]
add rax, 48h ; 'H'
test ecx, ecx
jz short loc_364BE
cmp ecx, edi
jnz short loc_364AF
loc_364BE:
test ecx, ecx
jz short loc_364D0
lea rcx, ma_default_charset_info
mov [rcx], rax
xor eax, eax
jmp short loc_364D2
loc_364D0:
mov al, 1
loc_364D2:
pop rbp
retn
| char set_default_charset(int a1)
{
char *v1; // rax
int v2; // ecx
v1 = (char *)&mariadb_compiled_charsets - 72;
do
{
v2 = *((_DWORD *)v1 + 18);
v1 += 72;
}
while ( v2 && v2 != a1 );
if ( !v2 )
return 1;
ma_default_charset_info = v1;
return 0;
}
| set_default_charset:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x146c20]
ADD RAX,-0x48
LAB_001364af:
MOV ECX,dword ptr [RAX + 0x48]
ADD RAX,0x48
TEST ECX,ECX
JZ 0x001364be
CMP ECX,EDI
JNZ 0x001364af
LAB_001364be:
TEST ECX,ECX
JZ 0x001364d0
LEA RCX,[0x151e88]
MOV qword ptr [RCX],RAX
XOR EAX,EAX
JMP 0x001364d2
LAB_001364d0:
MOV AL,0x1
LAB_001364d2:
POP RBP
RET
|
int8 set_default_charset(int param_1)
{
int iVar1;
int *puVar2;
int8 uVar3;
puVar2 = &UNK_00146bd8;
do {
iVar1 = *(int *)(puVar2 + 0x48);
puVar2 = puVar2 + 0x48;
if (iVar1 == 0) break;
} while (iVar1 != param_1);
if (iVar1 == 0) {
uVar3 = CONCAT71((int7)((ulong)puVar2 >> 8),1);
}
else {
uVar3 = 0;
ma_default_charset_info = puVar2;
}
return uVar3;
}
| |
39,072 | void fmt::v10::detail::bigint::multiply<unsigned __int128, 0>(unsigned __int128) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR20 void multiply(UInt value) {
using half_uint =
conditional_t<std::is_same<UInt, uint128_t>::value, uint64_t, uint32_t>;
const int shift = num_bits<half_uint>() - bigit_bits;
const UInt lower = static_cast<half_uint>(value);
const UInt upper = value >> num_bits<half_uint>();
UInt carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
UInt result = lower * bigits_[i] + static_cast<bigit>(carry);
carry = (upper * bigits_[i] << shift) + (result >> bigit_bits) +
(carry >> bigit_bits);
bigits_[i] = static_cast<bigit>(result);
}
while (carry != 0) {
bigits_.push_back(static_cast<bigit>(carry));
carry >>= bigit_bits;
}
} | O0 | c | void fmt::v10::detail::bigint::multiply<unsigned __int128, 0>(unsigned __int128):
subq $0xe8, %rsp
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rcx
movq %rdi, 0xc8(%rsp)
movq %rcx, 0xb8(%rsp)
movq %rax, 0xb0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x20, 0xac(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0xdc130
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rdi
movl %eax, %ecx
movq 0x38(%rsp), %rax
movb %cl, %sil
movb %sil, %cl
movq %rdx, %r8
shrq %cl, %r8
movq %r8, 0x40(%rsp)
movb %sil, %cl
shrdq %cl, %rdx, %rax
movq 0x40(%rsp), %rcx
xorl %edx, %edx
testb $0x40, %sil
cmovneq %rcx, %rax
cmovneq %rdx, %rcx
movq %rcx, 0x88(%rsp)
movq %rax, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
callq 0xdb3a0
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0xdc0db
movq 0x30(%rsp), %rdi
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rsi
callq 0xdb510
movq (%rsp), %rcx
movq 0x30(%rsp), %rdi
movq %rax, %rdx
movq 0x8(%rsp), %rax
movl (%rdx), %edx
imulq %rdx, %rcx
mulq %rdx
movl 0x70(%rsp), %esi
addq %rsi, %rax
adcq %rcx, %rdx
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x68(%rsp), %rsi
callq 0xdb510
movl 0x14(%rsp), %edx
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, %esi
imull %esi, %edx
movl %edx, 0x20(%rsp)
mulq %rcx
movq %rax, %rcx
movl 0x20(%rsp), %eax
addl %eax, %edx
movl %edx, %eax
shldq $0x20, %rcx, %rax
shlq $0x20, %rcx
movq 0x50(%rsp), %r8
movq 0x58(%rsp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
shldq $0x20, %r8, %rsi
addq %rsi, %rcx
adcq %rdx, %rax
movq 0x70(%rsp), %r8
movq 0x78(%rsp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
shldq $0x20, %r8, %rsi
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x68(%rsp), %rsi
callq 0xdb510
movl 0x24(%rsp), %ecx
movl %ecx, (%rax)
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0xdbfb3
jmp 0xdc0dd
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
orq %rcx, %rax
je 0xdc127
jmp 0xdc0ee
movq 0x30(%rsp), %rdi
movl 0x70(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x4c(%rsp), %rsi
callq 0xdb600
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq %rcx, %rax
shldq $0x20, %rdx, %rax
shrq $0x20, %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
jmp 0xdc0dd
addq $0xe8, %rsp
retq
nop
| _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
sub rsp, 0E8h
mov [rsp+0E8h+var_18], rsi
mov [rsp+0E8h+var_10], rdx
mov rax, [rsp+0E8h+var_18]
mov rcx, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_20], rdi
mov [rsp+0E8h+var_30], rcx
mov [rsp+0E8h+var_38], rax
mov rax, [rsp+0E8h+var_20]
mov [rsp+0E8h+var_B8], rax
mov [rsp+0E8h+var_3C], 20h ; ' '
mov rax, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_58], rax
mov [rsp+0E8h+var_50], 0
mov rax, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_B0], rax
mov rax, [rsp+0E8h+var_30]
mov [rsp+0E8h+var_C0], rax
call _ZN3fmt3v106detail8num_bitsImEEiv; fmt::v10::detail::num_bits<ulong>(void)
mov rdx, [rsp+0E8h+var_C0]
mov rdi, [rsp+0E8h+var_B8]
mov ecx, eax
mov rax, [rsp+0E8h+var_B0]
mov sil, cl
mov cl, sil
mov r8, rdx
shr r8, cl
mov [rsp+0E8h+var_A8], r8
mov cl, sil
shrd rax, rdx, cl
mov rcx, [rsp+0E8h+var_A8]
xor edx, edx
test sil, 40h
cmovnz rax, rcx
cmovnz rcx, rdx
mov [rsp+0E8h+var_60], rcx
mov [rsp+0E8h+var_68], rax
mov [rsp+0E8h+var_70], 0
mov [rsp+0E8h+var_78], 0
mov [rsp+0E8h+var_80], 0
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+0E8h+var_88], rax
loc_DBFB3:
mov rax, [rsp+0E8h+var_80]
cmp rax, [rsp+0E8h+var_88]
jnb loc_DC0DB
mov rdi, [rsp+0E8h+var_B8]
mov rax, [rsp+0E8h+var_58]
mov [rsp+0E8h+var_E0], rax
mov rax, [rsp+0E8h+var_50]
mov [rsp+0E8h+var_E8], rax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rcx, [rsp+0E8h+var_E8]
mov rdi, [rsp+0E8h+var_B8]
mov rdx, rax
mov rax, [rsp+0E8h+var_E0]
mov edx, [rdx]
imul rcx, rdx
mul rdx
mov esi, dword ptr [rsp+0E8h+var_78]
add rax, rsi
adc rdx, rcx
mov [rsp+0E8h+var_98], rax
mov [rsp+0E8h+var_90], rdx
mov rax, [rsp+0E8h+var_68]
mov [rsp+0E8h+var_D0], rax
mov eax, dword ptr [rsp+0E8h+var_60]
mov [rsp+0E8h+var_D4], eax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov edx, [rsp+0E8h+var_D4]
mov rdi, [rsp+0E8h+var_B8]
mov rcx, rax
mov rax, [rsp+0E8h+var_D0]
mov ecx, [rcx]
mov esi, ecx
imul edx, esi
mov [rsp+0E8h+var_C8], edx
mul rcx
mov rcx, rax
mov eax, [rsp+0E8h+var_C8]
add edx, eax
mov eax, edx
shld rax, rcx, 20h
shl rcx, 20h
mov r8, [rsp+0E8h+var_98]
mov rsi, [rsp+0E8h+var_90]
mov rdx, rsi
shr rdx, 20h
shld rsi, r8, 20h
add rcx, rsi
adc rax, rdx
mov r8, [rsp+0E8h+var_78]
mov rsi, [rsp+0E8h+var_70]
mov rdx, rsi
shr rdx, 20h
shld rsi, r8, 20h
add rcx, rsi
adc rax, rdx
mov [rsp+0E8h+var_78], rcx
mov [rsp+0E8h+var_70], rax
mov eax, dword ptr [rsp+0E8h+var_98]
mov [rsp+0E8h+var_C4], eax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+0E8h+var_C4]
mov [rax], ecx
mov rax, [rsp+0E8h+var_80]
add rax, 1
mov [rsp+0E8h+var_80], rax
jmp loc_DBFB3
loc_DC0DB:
jmp short $+2
loc_DC0DD:
mov rax, [rsp+0E8h+var_78]
mov rcx, [rsp+0E8h+var_70]
or rax, rcx
jz short loc_DC127
jmp short $+2
loc_DC0EE:
mov rdi, [rsp+0E8h+var_B8]
mov eax, dword ptr [rsp+0E8h+var_78]
mov [rsp+0E8h+var_9C], eax
lea rsi, [rsp+0E8h+var_9C]
call _ZN3fmt3v106detail6bufferIjE9push_backERKj; fmt::v10::detail::buffer<uint>::push_back(uint const&)
mov rdx, [rsp+0E8h+var_78]
mov rcx, [rsp+0E8h+var_70]
mov rax, rcx
shld rax, rdx, 20h
shr rcx, 20h
mov [rsp+0E8h+var_70], rcx
mov [rsp+0E8h+var_78], rax
jmp short loc_DC0DD
loc_DC127:
add rsp, 0E8h
retn
| long long ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_(
long long a1,
unsigned long long a2,
unsigned long long a3)
{
char v3; // si
unsigned long long v4; // rax
unsigned long long v5; // rcx
unsigned int *v6; // rax
_DWORD *v7; // rax
__int128 v8; // rt0
long long result; // rax
int v12; // [rsp+4Ch] [rbp-9Ch] BYREF
unsigned __int128 v13; // [rsp+50h] [rbp-98h]
unsigned long long v14; // [rsp+60h] [rbp-88h]
unsigned long long v15; // [rsp+68h] [rbp-80h]
unsigned __int128 v16; // [rsp+70h] [rbp-78h]
unsigned long long v17; // [rsp+80h] [rbp-68h]
unsigned long long v18; // [rsp+88h] [rbp-60h]
unsigned long long v19; // [rsp+90h] [rbp-58h]
long long v20; // [rsp+98h] [rbp-50h]
int v21; // [rsp+ACh] [rbp-3Ch]
unsigned long long v22; // [rsp+B0h] [rbp-38h]
unsigned long long v23; // [rsp+B8h] [rbp-30h]
long long v24; // [rsp+C8h] [rbp-20h]
unsigned long long v25; // [rsp+D0h] [rbp-18h]
unsigned long long v26; // [rsp+D8h] [rbp-10h]
v25 = a2;
v26 = a3;
v24 = a1;
v23 = a3;
v22 = a2;
v21 = 32;
v19 = a2;
v20 = 0LL;
v3 = fmt::v10::detail::num_bits<unsigned long>();
v4 = (a2 >> v3) | (a3 << (64 - v3));
v5 = a3 >> v3;
if ( (v3 & 0x40) != 0 )
{
v4 = a3 >> v3;
v5 = 0LL;
}
v18 = v5;
v17 = v4;
v16 = 0uLL;
v15 = 0LL;
v14 = fmt::v10::detail::buffer<unsigned int>::size(a1);
while ( v15 < v14 )
{
v6 = (unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15);
v13 = __PAIR128__((unsigned long long)*v6 * v20, (unsigned int)v16) + *v6 * (unsigned __int128)v19;
v7 = (_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15);
*((_QWORD *)&v8 + 1) = *v7 * (_DWORD)v18 + (unsigned int)(((unsigned int)*v7 * (unsigned __int128)v17) >> 64);
*(_QWORD *)&v8 = (unsigned int)*v7 * v17;
v16 = (v16 >> 32) + (v13 >> 32) + v8 * 0x100000000LL;
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15++) = v13;
}
while ( 1 )
{
result = *((_QWORD *)&v16 + 1) | v16;
if ( v16 == 0 )
break;
v12 = v16;
fmt::v10::detail::buffer<unsigned int>::push_back(a1, &v12);
v16 >>= 32;
}
return result;
}
| _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xd0],RSI
MOV qword ptr [RSP + 0xd8],RDX
MOV RAX,qword ptr [RSP + 0xd0]
MOV RCX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xc8],RDI
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0xac],0x20
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x98],0x0
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x001dc130
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV SIL,CL
MOV CL,SIL
MOV R8,RDX
SHR R8,CL
MOV qword ptr [RSP + 0x40],R8
MOV CL,SIL
SHRD RAX,RDX,CL
MOV RCX,qword ptr [RSP + 0x40]
XOR EDX,EDX
TEST SIL,0x40
CMOVNZ RAX,RCX
CMOVNZ RCX,RDX
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x80],RAX
MOV qword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x70],0x0
MOV qword ptr [RSP + 0x68],0x0
CALL 0x001db3a0
MOV qword ptr [RSP + 0x60],RAX
LAB_001dbfb3:
MOV RAX,qword ptr [RSP + 0x68]
CMP RAX,qword ptr [RSP + 0x60]
JNC 0x001dc0db
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001db510
MOV RCX,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x30]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RDX]
IMUL RCX,RDX
MUL RDX
MOV ESI,dword ptr [RSP + 0x70]
ADD RAX,RSI
ADC RDX,RCX
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x14],EAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001db510
MOV EDX,dword ptr [RSP + 0x14]
MOV RDI,qword ptr [RSP + 0x30]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RCX]
MOV ESI,ECX
IMUL EDX,ESI
MOV dword ptr [RSP + 0x20],EDX
MUL RCX
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x20]
ADD EDX,EAX
MOV EAX,EDX
SHLD RAX,RCX,0x20
SHL RCX,0x20
MOV R8,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,RSI
SHR RDX,0x20
SHLD RSI,R8,0x20
ADD RCX,RSI
ADC RAX,RDX
MOV R8,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,RSI
SHR RDX,0x20
SHLD RSI,R8,0x20
ADD RCX,RSI
ADC RAX,RDX
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RAX
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x24],EAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001db510
MOV ECX,dword ptr [RSP + 0x24]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x68]
ADD RAX,0x1
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001dbfb3
LAB_001dc0db:
JMP 0x001dc0dd
LAB_001dc0dd:
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x78]
OR RAX,RCX
JZ 0x001dc127
JMP 0x001dc0ee
LAB_001dc0ee:
MOV RDI,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x4c],EAX
LEA RSI,[RSP + 0x4c]
CALL 0x001db600
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,RCX
SHLD RAX,RDX,0x20
SHR RCX,0x20
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],RAX
JMP 0x001dc0dd
LAB_001dc127:
ADD RSP,0xe8
RET
|
void _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_
(buffer<unsigned_int> *param_1,ulong param_2,ulong param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
byte bVar4;
int1 auVar5 [16];
int4 uVar6;
int iVar7;
long lVar8;
uint uVar9;
uint *puVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong uVar15;
uint local_9c;
int1 local_98 [16];
ulong local_88;
ulong local_80;
ulong local_78;
ulong local_70;
ulong local_68;
ulong local_60;
ulong local_58;
long local_50;
int4 local_3c;
ulong local_38;
ulong local_30;
buffer<unsigned_int> *local_20;
ulong local_18;
ulong local_10;
local_3c = 0x20;
local_50 = 0;
local_58 = param_2;
local_38 = param_2;
local_30 = param_3;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
uVar9 = fmt::v10::detail::num_bits<unsigned_long>();
uVar15 = param_3 >> ((byte)uVar9 & 0x3f);
bVar4 = (byte)uVar9 & 0x3f;
local_60 = uVar15;
local_68 = param_2 >> bVar4 | param_3 << 0x40 - bVar4;
if ((uVar9 & 0x40) != 0) {
local_60 = 0;
local_68 = uVar15;
}
local_70 = 0;
local_78 = 0;
local_80 = 0;
local_88 = fmt::v10::detail::buffer<unsigned_int>::size(param_1);
for (; lVar8 = local_50, uVar15 = local_58, local_80 < local_88; local_80 = local_80 + 1) {
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
uVar11 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar15;
auVar3._8_8_ = 0;
auVar3._0_8_ = CONCAT44(0,*puVar10);
auVar5._8_8_ = lVar8 * CONCAT44(0,*puVar10);
auVar5._0_8_ = local_78 & 0xffffffff;
local_98 = auVar1 * auVar3 + auVar5;
iVar7 = (int)local_60;
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar11;
auVar2 = auVar2 * ZEXT416(*puVar10);
uVar15 = auVar2._0_8_;
uVar11 = uVar15 << 0x20;
uVar13 = local_98._8_8_ << 0x20 | (ulong)local_98._0_8_ >> 0x20;
uVar12 = uVar11 + uVar13;
uVar14 = local_70 << 0x20 | local_78 >> 0x20;
local_78 = uVar12 + uVar14;
local_70 = ((ulong)(auVar2._8_4_ + iVar7 * *puVar10) << 0x20 | uVar15 >> 0x20) +
((ulong)local_98._8_8_ >> 0x20) + (ulong)CARRY8(uVar11,uVar13) + (local_70 >> 0x20) +
(ulong)CARRY8(uVar12,uVar14);
uVar6 = local_98._0_4_;
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
*puVar10 = uVar6;
}
for (; local_78 != 0 || local_70 != 0; local_78 = uVar15 | local_78 >> 0x20) {
local_9c = (uint)local_78;
fmt::v10::detail::buffer<unsigned_int>::push_back(param_1,&local_9c);
uVar15 = local_70 << 0x20;
local_70 = local_70 >> 0x20;
}
return;
}
| |
39,073 | stbi__readval | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
{
int mask=0x80, i;
for (i=0; i<4; ++i, mask>>=1) {
if (channel & mask) {
if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short");
dest[i]=stbi__get8(s);
}
}
return dest;
} | O3 | c | stbi__readval:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x80, %r15d
xorl %r12d, %r12d
testl %ebp, %r15d
je 0x36d7f
cmpq $0x0, 0x10(%r14)
je 0x36d63
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x36d73
cmpl $0x0, 0x30(%r14)
je 0x36d8d
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x36d8d
movq %r14, %rdi
callq 0x35752
movb %al, (%rbx,%r12)
incq %r12
shrl %r15d
cmpq $0x4, %r12
jne 0x36d44
jmp 0x36da9
movq %fs:0x0, %rax
leaq 0x11453(%rip), %rcx # 0x481f3
movq %rcx, -0x8(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| stbi__readval:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov ebp, esi
mov r14, rdi
mov r15d, 80h
xor r12d, r12d
loc_36D44:
test r15d, ebp
jz short loc_36D7F
cmp qword ptr [r14+10h], 0
jz short loc_36D63
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_36D73
cmp dword ptr [r14+30h], 0
jz short loc_36D8D
loc_36D63:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_36D8D
loc_36D73:
mov rdi, r14
call stbi__get8
mov [rbx+r12], al
loc_36D7F:
inc r12
shr r15d, 1
cmp r12, 4
jnz short loc_36D44
jmp short loc_36DA9
loc_36D8D:
mov rax, fs:0
lea rcx, aBadFile; "bad file"
mov [rax-8], rcx
xor ebx, ebx
loc_36DA9:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long stbi__readval(long long a1, int a2, long long a3)
{
unsigned int v4; // r15d
long long v5; // r12
v4 = 128;
v5 = 0LL;
while ( (a2 & v4) == 0 )
{
LABEL_8:
++v5;
v4 >>= 1;
if ( v5 == 4 )
return a3;
}
if ( *(_QWORD *)(a1 + 16) )
{
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
{
LABEL_7:
*(_BYTE *)(a3 + v5) = stbi__get8(a1);
goto LABEL_8;
}
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_10;
}
if ( *(_QWORD *)(a1 + 192) < *(_QWORD *)(a1 + 200) )
goto LABEL_7;
LABEL_10:
*(_QWORD *)(__readfsqword(0) - 8) = "bad file";
return 0LL;
}
| stbi__readval:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV EBP,ESI
MOV R14,RDI
MOV R15D,0x80
XOR R12D,R12D
LAB_00136d44:
TEST R15D,EBP
JZ 0x00136d7f
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00136d63
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00136d73
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00136d8d
LAB_00136d63:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00136d8d
LAB_00136d73:
MOV RDI,R14
CALL 0x00135752
MOV byte ptr [RBX + R12*0x1],AL
LAB_00136d7f:
INC R12
SHR R15D,0x1
CMP R12,0x4
JNZ 0x00136d44
JMP 0x00136da9
LAB_00136d8d:
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x1481f3]
MOV qword ptr [RAX + -0x8],RCX
XOR EBX,EBX
LAB_00136da9:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long stbi__readval(long param_1,uint param_2,long param_3)
{
int1 uVar1;
int iVar2;
long lVar3;
uint uVar4;
long *in_FS_OFFSET;
uVar4 = 0x80;
lVar3 = 0;
do {
if ((uVar4 & param_2) != 0) {
if (*(long *)(param_1 + 0x10) == 0) {
LAB_00136d63:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) {
LAB_00136d8d:
*(char **)(*in_FS_OFFSET + -8) = "bad file";
return 0;
}
}
else {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 != 0) {
if (*(int *)(param_1 + 0x30) == 0) goto LAB_00136d8d;
goto LAB_00136d63;
}
}
uVar1 = stbi__get8(param_1);
*(int1 *)(param_3 + lVar3) = uVar1;
}
lVar3 = lVar3 + 1;
uVar4 = uVar4 >> 1;
if (lVar3 == 4) {
return param_3;
}
} while( true );
}
| |
39,074 | ma_update_blob_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_ma_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MARIA_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
return 1;
}
#endif
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info, rec_buff+
ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_ASSERT(reclength2 <= reclength);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
} | O3 | c | ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x3a0(%rax), %r12
movq %rcx, %rsi
callq 0x67e66
leaq (%r12,%rax), %rsi
addq $0x5c, %rsi
leaq -0x40(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%r14), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x67f78
cmpq $0x10000, %rax # imm = 0x10000
ja 0x67f60
cmpq $0x1000, %rsi # imm = 0x1000
jb 0x67f78
cmpq $0x8001, %rax # imm = 0x8001
jb 0x67f78
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x67f93
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xbf321
testq %rax, %rax
je 0x67fd3
movq %rax, %r12
movl $0x0, -0x34(%rbp)
leaq 0x18(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x674d9
testl %eax, %eax
je 0x67fc1
movl %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x6796e
testb %al, %al
setne %bl
jmp 0x67fc3
movb $0x1, %bl
cmpb $0x0, -0x34(%rbp)
jne 0x67fe0
movq %r12, %rdi
callq 0xbf54e
jmp 0x67fe0
callq 0xc14ee
movl $0x80, (%rax)
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x68000
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
| _ma_update_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rcx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r12, [rax+3A0h]
mov rsi, rcx
call _ma_calc_total_blob_length
lea rsi, [r12+rax]
add rsi, 5Ch ; '\'
lea rcx, [rbp+var_40]
mov [rcx], rsi
mov rax, [r14+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_67F78
cmp rax, 10000h
ja short loc_67F60
cmp rsi, 1000h
jb short loc_67F78
cmp rax, 8001h
jb short loc_67F78
loc_67F60:
mov r12, rsp
add rsi, 0Fh
and rsi, 0FFFFFFFFFFFFFFF0h
sub r12, rsi
mov rsp, r12
mov al, 1
mov [rbp+var_34], eax
jmp short loc_67F93
loc_67F78:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz short loc_67FD3
mov r12, rax
mov [rbp+var_34], 0
loc_67F93:
lea r13, [r12+18h]
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _ma_rec_pack
test eax, eax
jz short loc_67FC1
mov ecx, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call update_dynamic_record
test al, al
setnz bl
jmp short loc_67FC3
loc_67FC1:
mov bl, 1
loc_67FC3:
cmp byte ptr [rbp+var_34], 0
jnz short loc_67FE0
mov rdi, r12
call my_free
jmp short loc_67FE0
loc_67FD3:
call _my_thread_var
mov dword ptr [rax], 80h
mov bl, 1
loc_67FE0:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_68000
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_68000:
call ___stack_chk_fail
| long long ma_update_blob_record(long long a1, long long a2, long long a3, unsigned __int8 *a4)
{
long long v6; // r12
unsigned long long v7; // rsi
unsigned long long v8; // rax
bool v9; // cc
unsigned long long v10; // rax
char *v11; // r12
long long v12; // rax
unsigned int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
int v16; // [rsp+Ch] [rbp-34h]
unsigned long long v17; // [rsp+10h] [rbp-30h]
v17 = __readfsqword(0x28u);
v6 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v7 = v6 + ma_calc_total_blob_length((_QWORD *)a1, (long long)a4) + 92;
v15 = v7;
v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v15;
v9 = v8 <= v7;
v10 = v8 - v7;
if ( v9 || v10 <= 0x10000 && (v7 < 0x1000 || v10 < 0x8001) )
{
v12 = my_malloc(0LL, v7, 65552LL);
if ( !v12 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
LOBYTE(a2) = 1;
return (unsigned int)a2;
}
v11 = (char *)v12;
v16 = 0;
}
else
{
v11 = (char *)&v15 - ((v7 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v10) = 1;
v16 = v10;
}
v13 = ma_rec_pack((unsigned __int8 *)a1, v11 + 24, a4);
if ( v13 )
LOBYTE(a2) = update_dynamic_record((_QWORD *)a1, a2, (long long)(v11 + 24), v13);
else
LOBYTE(a2) = 1;
if ( !(_BYTE)v16 )
my_free(v11);
return (unsigned int)a2;
}
| _ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RCX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x3a0]
MOV RSI,RCX
CALL 0x00167e66
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x5c
LEA RCX,[RBP + -0x40]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [R14 + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00167f78
CMP RAX,0x10000
JA 0x00167f60
CMP RSI,0x1000
JC 0x00167f78
CMP RAX,0x8001
JC 0x00167f78
LAB_00167f60:
MOV R12,RSP
ADD RSI,0xf
AND RSI,-0x10
SUB R12,RSI
MOV RSP,R12
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00167f93
LAB_00167f78:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001bf321
TEST RAX,RAX
JZ 0x00167fd3
MOV R12,RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_00167f93:
LEA R13,[R12 + 0x18]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x001674d9
TEST EAX,EAX
JZ 0x00167fc1
MOV ECX,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x0016796e
TEST AL,AL
SETNZ BL
JMP 0x00167fc3
LAB_00167fc1:
MOV BL,0x1
LAB_00167fc3:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x00167fe0
MOV RDI,R12
CALL 0x001bf54e
JMP 0x00167fe0
LAB_00167fd3:
CALL 0x001c14ee
MOV dword ptr [RAX],0x80
MOV BL,0x1
LAB_00167fe0:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00168000
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00168000:
CALL 0x0012a280
|
ulong _ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
char cVar2;
int iVar3;
long lVar4;
ulong uVar5;
int1 *puVar6;
int4 *puVar7;
int7 uVar8;
ulong *puVar9;
long in_FS_OFFSET;
ulong local_48;
int4 local_3c;
long local_38;
puVar9 = &local_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*param_1 + 0x3a0);
lVar4 = _ma_calc_total_blob_length(param_1,param_4);
lVar1 = lVar1 + lVar4;
local_48 = lVar1 + 0x5c;
uVar5 = (*(long *)param_1[0xf] - (long)&local_48) - local_48;
uVar8 = (int7)((ulong)param_2 >> 8);
if (((ulong)(*(long *)param_1[0xf] - (long)&local_48) < local_48 || uVar5 == 0) ||
((uVar5 < 0x10001 && ((local_48 < 0x1000 || (uVar5 < 0x8001)))))) {
puVar6 = (int1 *)my_malloc(0,local_48,0x10010);
if (puVar6 == (int1 *)0x0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x80;
uVar5 = CONCAT71(uVar8,1);
goto LAB_00167fe0;
}
local_3c = 0;
puVar9 = &local_48;
}
else {
puVar6 = (int1 *)((long)&local_48 - (lVar1 + 0x6bU & 0xfffffffffffffff0));
local_3c = (int4)CONCAT71((int7)(uVar5 >> 8),1);
puVar9 = (ulong *)puVar6;
}
*(int8 *)((long)puVar9 + -8) = 0x167fa6;
iVar3 = _ma_rec_pack(param_1,puVar6 + 0x18,param_4);
if (iVar3 == 0) {
uVar5 = CONCAT71(uVar8,1);
}
else {
*(int8 *)((long)puVar9 + -8) = 0x167fba;
cVar2 = update_dynamic_record(param_1,param_2,puVar6 + 0x18,iVar3);
uVar5 = CONCAT71(uVar8,cVar2 != '\0');
}
if ((char)local_3c == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x167fd1;
my_free(puVar6);
}
LAB_00167fe0:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_delete_dynamic_record;
__stack_chk_fail();
}
| |
39,075 | init_dynamic_array2 | eloqsql/mysys/array.c | my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array,
uint element_size, void *init_buffer,
uint init_alloc, uint alloc_increment, myf my_flags)
{
DBUG_ENTER("init_dynamic_array2");
if (!alloc_increment)
{
alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
array->m_psi_key= psi_key;
array->malloc_flags= my_flags;
DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0);
if ((array->buffer= init_buffer))
{
array->malloc_flags|= MY_INIT_BUFFER_USED;
DBUG_RETURN(FALSE);
}
/*
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
if (init_alloc &&
!(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc,
MYF(my_flags))))
array->max_element=0;
DBUG_RETURN(FALSE);
} | O3 | c | init_dynamic_array2:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %r11d
movq %rsi, %rbx
movq 0x10(%rbp), %r10
testl %r9d, %r9d
jne 0x92a97
movl $0x10, %r9d
cmpl $0x1e1, %r11d # imm = 0x1E1
ja 0x92a86
movw $0x1ff8, %ax # imm = 0x1FF8
xorl %edx, %edx
divw %r11w
movzwl %ax, %r9d
cmpl $0x9, %r8d
jb 0x92a97
leal (%r8,%r8), %eax
cmpl %eax, %r9d
cmovael %eax, %r9d
movl $0x0, 0x8(%rbx)
movl %r8d, 0xc(%rbx)
movl %r9d, 0x10(%rbx)
movl %r11d, 0x14(%rbx)
movl %edi, 0x18(%rbx)
movq %r10, 0x20(%rbx)
movq %rcx, (%rbx)
testq %rcx, %rcx
je 0x92acd
orq $0x100, %r10 # imm = 0x100
movq %r10, 0x20(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testl %r8d, %r8d
je 0x92ac4
imull %r11d, %r8d
movq %r8, %rsi
movq %r10, %rdx
callq 0xa0cdd
movq %rax, (%rbx)
testq %rax, %rax
jne 0x92ac4
movl $0x0, 0xc(%rbx)
jmp 0x92ac4
| init_dynamic_array2:
push rbp
mov rbp, rsp
push rbx
push rax
mov r11d, edx
mov rbx, rsi
mov r10, [rbp+arg_0]
test r9d, r9d
jnz short loc_92A97
mov r9d, 10h
cmp r11d, 1E1h
ja short loc_92A86
mov ax, 1FF8h
xor edx, edx
div r11w
movzx r9d, ax
loc_92A86:
cmp r8d, 9
jb short loc_92A97
lea eax, [r8+r8]
cmp r9d, eax
cmovnb r9d, eax
loc_92A97:
mov dword ptr [rbx+8], 0
mov [rbx+0Ch], r8d
mov [rbx+10h], r9d
mov [rbx+14h], r11d
mov [rbx+18h], edi
mov [rbx+20h], r10
mov [rbx], rcx
test rcx, rcx
jz short loc_92ACD
or r10, 100h
mov [rbx+20h], r10
loc_92AC4:
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
loc_92ACD:
test r8d, r8d
jz short loc_92AC4
imul r8d, r11d
mov rsi, r8
mov rdx, r10
call my_malloc
mov [rbx], rax
test rax, rax
jnz short loc_92AC4
mov dword ptr [rbx+0Ch], 0
jmp short loc_92AC4
| long long init_dynamic_array2(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
long long a7)
{
long long v8; // rax
if ( !a6 )
{
a6 = 16;
if ( a3 <= 0x1E1 )
a6 = 0x1FF8u / (unsigned __int16)a3;
if ( a5 >= 9 && a6 >= 2 * a5 )
a6 = 2 * a5;
}
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = a5;
*(_DWORD *)(a2 + 16) = a6;
*(_DWORD *)(a2 + 20) = a3;
*(_DWORD *)(a2 + 24) = a1;
*(_QWORD *)(a2 + 32) = a7;
*(_QWORD *)a2 = a4;
if ( a4 )
{
*(_QWORD *)(a2 + 32) = a7 | 0x100;
}
else if ( a5 )
{
v8 = my_malloc(a1, a3 * a5, a7);
*(_QWORD *)a2 = v8;
if ( !v8 )
*(_DWORD *)(a2 + 12) = 0;
}
return 0LL;
}
| init_dynamic_array2:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV R11D,EDX
MOV RBX,RSI
MOV R10,qword ptr [RBP + 0x10]
TEST R9D,R9D
JNZ 0x00192a97
MOV R9D,0x10
CMP R11D,0x1e1
JA 0x00192a86
MOV AX,0x1ff8
XOR EDX,EDX
DIV R11W
MOVZX R9D,AX
LAB_00192a86:
CMP R8D,0x9
JC 0x00192a97
LEA EAX,[R8 + R8*0x1]
CMP R9D,EAX
CMOVNC R9D,EAX
LAB_00192a97:
MOV dword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0xc],R8D
MOV dword ptr [RBX + 0x10],R9D
MOV dword ptr [RBX + 0x14],R11D
MOV dword ptr [RBX + 0x18],EDI
MOV qword ptr [RBX + 0x20],R10
MOV qword ptr [RBX],RCX
TEST RCX,RCX
JZ 0x00192acd
OR R10,0x100
MOV qword ptr [RBX + 0x20],R10
LAB_00192ac4:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00192acd:
TEST R8D,R8D
JZ 0x00192ac4
IMUL R8D,R11D
MOV RSI,R8
MOV RDX,R10
CALL 0x001a0cdd
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JNZ 0x00192ac4
MOV dword ptr [RBX + 0xc],0x0
JMP 0x00192ac4
|
int8
init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5,
uint param_6,ulong param_7)
{
long lVar1;
if (param_6 == 0) {
param_6 = 0x10;
if (param_3 < 0x1e2) {
param_6 = 0x1ff8 / (param_3 & 0xffff);
}
if ((8 < param_5) && (param_5 * 2 <= param_6)) {
param_6 = param_5 * 2;
}
}
*(int4 *)(param_2 + 1) = 0;
*(uint *)((long)param_2 + 0xc) = param_5;
*(uint *)(param_2 + 2) = param_6;
*(uint *)((long)param_2 + 0x14) = param_3;
*(int4 *)(param_2 + 3) = param_1;
param_2[4] = param_7;
*param_2 = param_4;
if (param_4 == 0) {
if (param_5 != 0) {
lVar1 = my_malloc(param_1,param_5 * param_3,param_7);
*param_2 = lVar1;
if (lVar1 == 0) {
*(int4 *)((long)param_2 + 0xc) = 0;
}
}
}
else {
param_2[4] = param_7 | 0x100;
}
return 0;
}
| |
39,076 | convert_fast_array_to_array | bluesky950520[P]quickjs/quickjs.c | int convert_fast_array_to_array(JSContext *ctx,
JSObject *p)
{
JSProperty *pr;
JSShape *sh;
JSValue *tab;
uint32_t i, len, new_count;
if (js_shape_prepare_update(ctx, p, NULL))
return -1;
len = p->u.array.count;
/* resize the properties once to simplify the error handling */
sh = p->shape;
new_count = sh->prop_count + len;
if (new_count > sh->prop_size) {
if (resize_properties(ctx, &p->shape, p, new_count))
return -1;
}
tab = p->u.array.u.values;
for(i = 0; i < len; i++) {
/* add_property cannot fail here but
__JS_AtomFromUInt32(i) fails for i > INT32_MAX */
pr = add_property(ctx, p, __JS_AtomFromUInt32(i), JS_PROP_C_W_E);
pr->u.value = *tab++;
}
js_free(ctx, p->u.array.u.values);
p->u.array.count = 0;
p->u.array.u.values = NULL; /* fail safe */
p->u.array.u1.size = 0;
p->fast_array = 0;
return 0;
} | O2 | c | convert_fast_array_to_array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %edx, %edx
callq 0x1fe35
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x202d1
movl 0x40(%rbx), %r15d
movq 0x18(%rbx), %rax
movl 0x28(%rax), %ecx
addl %r15d, %ecx
cmpl 0x24(%rax), %ecx
jbe 0x2027c
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3509c
testl %eax, %eax
jne 0x202d1
movq 0x38(%rbx), %r12
xorl %r13d, %r13d
pushq $0x7
popq %rbp
cmpl %r13d, %r15d
je 0x202b2
movl %r13d, %edx
orl $0x80000000, %edx # imm = 0x80000000
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x34d1a
movups (%r12), %xmm0
addq $0x10, %r12
movups %xmm0, (%rax)
incl %r13d
jmp 0x20286
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x1726e
andl $0x0, 0x40(%rbx)
andq $0x0, 0x38(%rbx)
andl $0x0, 0x30(%rbx)
andb $-0x9, 0x5(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| convert_fast_array_to_array:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
xor edx, edx
call js_shape_prepare_update
push 0FFFFFFFFFFFFFFFFh
pop rbp
test eax, eax
jnz short loc_202D1
mov r15d, [rbx+40h]
mov rax, [rbx+18h]
mov ecx, [rax+28h]
add ecx, r15d
cmp ecx, [rax+24h]
jbe short loc_2027C
lea rsi, [rbx+18h]
mov rdi, r14
mov rdx, rbx
call resize_properties
test eax, eax
jnz short loc_202D1
loc_2027C:
mov r12, [rbx+38h]
xor r13d, r13d
push 7
pop rbp
loc_20286:
cmp r15d, r13d
jz short loc_202B2
mov edx, r13d
or edx, 80000000h
mov rdi, r14
mov rsi, rbx
mov ecx, ebp
call add_property
movups xmm0, xmmword ptr [r12]
add r12, 10h
movups xmmword ptr [rax], xmm0
inc r13d
jmp short loc_20286
loc_202B2:
mov rsi, [rbx+38h]
mov rdi, r14
call js_free
and dword ptr [rbx+40h], 0
and qword ptr [rbx+38h], 0
and dword ptr [rbx+30h], 0
and byte ptr [rbx+5], 0F7h
xor ebp, ebp
loc_202D1:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long convert_fast_array_to_array(long long a1, long long a2)
{
unsigned int v2; // ebp
int v3; // r15d
__int128 *v4; // r12
int i; // r13d
_OWORD *v6; // rax
__int128 v7; // xmm0
v2 = -1;
if ( !(unsigned int)js_shape_prepare_update(a1, a2, 0LL) )
{
v3 = *(_DWORD *)(a2 + 64);
if ( (unsigned int)(v3 + *(_DWORD *)(*(_QWORD *)(a2 + 24) + 40LL)) <= *(_DWORD *)(*(_QWORD *)(a2 + 24) + 36LL)
|| !(unsigned int)resize_properties(a1, a2 + 24, a2) )
{
v4 = *(__int128 **)(a2 + 56);
for ( i = 0; v3 != i; ++i )
{
v6 = (_OWORD *)add_property(a1, a2, i | 0x80000000, 7LL);
v7 = *v4++;
*v6 = v7;
}
js_free(a1, *(_QWORD *)(a2 + 56));
*(_DWORD *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 56) = 0LL;
*(_DWORD *)(a2 + 48) = 0;
*(_BYTE *)(a2 + 5) &= ~8u;
return 0;
}
}
return v2;
}
| convert_fast_array_to_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
XOR EDX,EDX
CALL 0x0011fe35
PUSH -0x1
POP RBP
TEST EAX,EAX
JNZ 0x001202d1
MOV R15D,dword ptr [RBX + 0x40]
MOV RAX,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX + 0x28]
ADD ECX,R15D
CMP ECX,dword ptr [RAX + 0x24]
JBE 0x0012027c
LEA RSI,[RBX + 0x18]
MOV RDI,R14
MOV RDX,RBX
CALL 0x0013509c
TEST EAX,EAX
JNZ 0x001202d1
LAB_0012027c:
MOV R12,qword ptr [RBX + 0x38]
XOR R13D,R13D
PUSH 0x7
POP RBP
LAB_00120286:
CMP R15D,R13D
JZ 0x001202b2
MOV EDX,R13D
OR EDX,0x80000000
MOV RDI,R14
MOV RSI,RBX
MOV ECX,EBP
CALL 0x00134d1a
MOVUPS XMM0,xmmword ptr [R12]
ADD R12,0x10
MOVUPS xmmword ptr [RAX],XMM0
INC R13D
JMP 0x00120286
LAB_001202b2:
MOV RSI,qword ptr [RBX + 0x38]
MOV RDI,R14
CALL 0x0011726e
AND dword ptr [RBX + 0x40],0x0
AND qword ptr [RBX + 0x38],0x0
AND dword ptr [RBX + 0x30],0x0
AND byte ptr [RBX + 0x5],0xf7
XOR EBP,EBP
LAB_001202d1:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 convert_fast_array_to_array(int8 param_1,long param_2)
{
uint uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int iVar5;
int4 *puVar6;
int4 uVar7;
int4 *puVar8;
uint uVar9;
iVar5 = js_shape_prepare_update(param_1,param_2,0);
uVar7 = 0xffffffff;
if (iVar5 == 0) {
uVar1 = *(uint *)(param_2 + 0x40);
if ((*(uint *)(*(long *)(param_2 + 0x18) + 0x24) <
*(int *)(*(long *)(param_2 + 0x18) + 0x28) + uVar1) &&
(iVar5 = resize_properties(param_1,param_2 + 0x18,param_2), iVar5 != 0)) {
return 0xffffffff;
}
puVar8 = *(int4 **)(param_2 + 0x38);
for (uVar9 = 0; uVar1 != uVar9; uVar9 = uVar9 + 1) {
puVar6 = (int4 *)add_property(param_1,param_2,uVar9 | 0x80000000,7);
uVar7 = *puVar8;
uVar2 = puVar8[1];
uVar3 = puVar8[2];
uVar4 = puVar8[3];
puVar8 = puVar8 + 4;
*puVar6 = uVar7;
puVar6[1] = uVar2;
puVar6[2] = uVar3;
puVar6[3] = uVar4;
}
js_free(param_1,*(int8 *)(param_2 + 0x38));
*(int4 *)(param_2 + 0x40) = 0;
*(int8 *)(param_2 + 0x38) = 0;
*(int4 *)(param_2 + 0x30) = 0;
*(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xf7;
uVar7 = 0;
}
return uVar7;
}
| |
39,077 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const std::string & help,
void (*handler)(common_params & params, const std::string &)
) : args(args), value_hint(value_hint), help(help), handler_string(handler) {} | O3 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
movl $0x1, %edx
callq 0x5c600
leaq 0x38(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
leaq 0x60(%rbx), %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x1(%rsp), %rcx
movq %r13, %rdi
callq 0x5c682
movq %r12, 0x78(%rbx)
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x268c4
movb $0x0, 0xb0(%rbx)
movq $0x0, 0xb8(%rbx)
movq %r14, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r13), %rdi
testq %rdi, %rdi
je 0x59120
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b930
jmp 0x59120
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x5c6c8
movq %rbx, %rdi
callq 0x5c6c8
movq %r14, %rdi
callq 0x1c0d0
nop
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_34]
mov dword ptr [rsi], 0
lea rcx, [rsp+38h+var_35]
lea r8, [rsp+38h+var_36]
mov edx, 1
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xor ecx, ecx
mov [rbx+40h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
mov [rbx+48h], rax
mov [rbx+50h], rax
mov [rbx+58h], rcx
lea r13, [rbx+60h]
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+38h+var_37]
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r12
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+80h], xmm0
mov [rbx+90h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov byte ptr [rbx+0B0h], 0
mov qword ptr [rbx+0B8h], 0
mov [rbx+0C0h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C8h], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r13+0]; void *
test rdi, rdi
jz short loc_59120
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_59120
mov r14, rax
loc_59120:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
long long result; // rax
int v10; // [rsp+0h] [rbp-38h] BYREF
_DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF
v10 = v5;
v11[0] = 0;
std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2);
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1);
*(_QWORD *)(a1 + 120) = a3;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 192) = a5;
*(_OWORD *)(a1 + 200) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0x3]
LEA R8,[RSP + 0x2]
MOV EDX,0x1
CALL 0x0015c600
LEA RAX,[RBX + 0x38]
XOR ECX,ECX
MOV qword ptr [RBX + 0x40],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],RCX
LEA R13,[RBX + 0x60]
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LAB_00159092:
LEA RCX,[RSP + 0x1]
MOV RDI,R13
CALL 0x0015c682
MOV qword ptr [RBX + 0x78],R12
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x80],XMM0
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_001590cc:
CALL 0x001268c4
LAB_001590d1:
MOV byte ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0xb8],0x0
MOV qword ptr [RBX + 0xc0],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,string *param_3,
_func_void_common_params_ptr_string_ptr *param_4)
{
int4 in_EAX;
int8 in_R9;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9
,in_EAX);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 00159092 to 0015909e has its CatchHandler @ 0015911d */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9);
*(char **)(this + 0x78) = param_2;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 001590cc to 001590d0 has its CatchHandler @ 00159103 */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
39,078 | js_parse_seek_token | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_seek_token(JSParseState *s, const JSParsePos *sp)
{
s->token.line_num = sp->last_line_num;
s->token.col_num = sp->last_col_num;
s->line_num = sp->line_num;
s->col_num = sp->col_num;
s->buf_ptr = sp->ptr;
s->eol = sp->eol;
s->mark = sp->mark;
s->got_lf = sp->got_lf;
return next_token(s);
} | O2 | c | js_parse_seek_token:
movq (%rsi), %rax
movq %rax, 0x24(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x70(%rdi)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x80(%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0x58(%rdi)
jmp 0x4fa4e
| js_parse_seek_token:
mov rax, [rsi]
mov [rdi+24h], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
mov rax, [rsi+18h]
mov [rdi+70h], rax
movups xmm0, xmmword ptr [rsi+20h]
movups xmmword ptr [rdi+80h], xmm0
mov eax, [rsi+10h]
mov [rdi+58h], eax
jmp next_token
| long long js_parse_seek_token(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
__m128 v14; // xmm0
*(_QWORD *)(a1 + 36) = *(_QWORD *)a2;
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a1 + 112) = *(_QWORD *)(a2 + 24);
v14 = *(__m128 *)(a2 + 32);
*(__m128 *)(a1 + 128) = v14;
*(_DWORD *)(a1 + 88) = *(_DWORD *)(a2 + 16);
return next_token(a1, a2, a3, v14, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6);
}
| js_parse_seek_token:
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x24],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RDI + 0x70],RAX
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOVUPS xmmword ptr [RDI + 0x80],XMM0
MOV EAX,dword ptr [RSI + 0x10]
MOV dword ptr [RDI + 0x58],EAX
JMP 0x0014fa4e
|
void js_parse_seek_token(long param_1,int8 *param_2)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
*(int8 *)(param_1 + 0x24) = *param_2;
*(int8 *)(param_1 + 0x10) = param_2[1];
*(int8 *)(param_1 + 0x70) = param_2[3];
uVar1 = *(int4 *)((long)param_2 + 0x24);
uVar2 = *(int4 *)(param_2 + 5);
uVar3 = *(int4 *)((long)param_2 + 0x2c);
*(int4 *)(param_1 + 0x80) = *(int4 *)(param_2 + 4);
*(int4 *)(param_1 + 0x84) = uVar1;
*(int4 *)(param_1 + 0x88) = uVar2;
*(int4 *)(param_1 + 0x8c) = uVar3;
*(int4 *)(param_1 + 0x58) = *(int4 *)(param_2 + 2);
next_token();
return;
}
| |
39,079 | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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&) | llama.cpp/common/json-schema-to-grammar.cpp | std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
} | O3 | cpp | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdi, 0x98(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq (%rcx), %r13
movq %rcx, 0xa0(%rsp)
cmpq %r13, 0x8(%rcx)
je 0xbb05d
leaq 0x50(%rsp), %r14
xorl %ebp, %ebp
leaq 0x60(%rsp), %r15
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rbx
movq %r14, 0x40(%rsp)
movq (%rax), %rsi
leaq (%rsi,%rbx), %rdx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x40a2c
testq %rbx, %rbx
leaq 0x17185(%rip), %rsi # 0xd1fd9
leaq 0x1720b(%rip), %rax # 0xd2066
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0x1c810
movl $0x1, %esi
cmpq $0xa, %rbp
jb 0xbaec1
movl $0x4, %esi
movq %rbp, %rcx
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
cmpq $0x63, %rcx
jbe 0xbaeba
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0xbaebf
cmpq $0x2710, %rcx # imm = 0x2710
jb 0xbaec1
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0xbae84
addl $-0x3, %esi
jmp 0xbaec1
addl $-0x2, %esi
jmp 0xbaec1
decl %esi
movl %esi, %esi
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
xorl %edx, %edx
callq 0x1c750
movq (%rsp), %rdi
movl 0x8(%rsp), %esi
movq %rbp, %rdx
callq 0x2fca1
movq 0x40(%rsp), %rcx
movl $0xf, %edi
cmpq %r14, %rcx
je 0xbaefa
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %r8
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0x30(%rsp), %r14
jbe 0xbaf2f
movl $0xf, %edi
leaq 0x10(%rsp), %r9
cmpq %r9, %rsi
je 0xbaf2a
movq 0x10(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xbaf3b
leaq 0x40(%rsp), %rdi
callq 0x1c3a0
jmp 0xbaf47
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1c190
movq %rax, %rbx
movq %r14, 0x20(%rsp)
movq (%rax), %rax
movq %r14, %rdi
leaq 0x10(%rbx), %r14
cmpq %r14, %rax
je 0xbaf6d
movq %rax, 0x20(%rsp)
movq (%r14), %rax
movq %rax, 0x30(%rsp)
jmp 0xbaf7c
movq 0x8(%rbx), %rdx
incq %rdx
movq %r14, %rsi
callq 0x1c0b0
movq %rbx, %rax
addq $0x8, %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x28(%rsp)
movq %r14, (%rbx)
movq %rbp, %rcx
shlq $0x4, %rcx
addq %rcx, %r13
movq $0x0, (%rax)
movb $0x0, (%r14)
movq %r15, %rdi
movq 0xa8(%rsp), %rsi
movq %r13, %rdx
leaq 0x20(%rsp), %rcx
callq 0xb811c
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
leaq 0x50(%rsp), %r14
callq 0x68ab4
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xbafed
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xbb009
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xbb024
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xbb03b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1c110
incq %rbp
movq 0xa0(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %rax
subq %r13, %rax
sarq $0x4, %rax
cmpq %rax, %rbp
jb 0xbae25
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x171a9(%rip), %rsi # 0xd2216
leaq 0x171a5(%rip), %rdx # 0xd2219
leaq 0x60(%rsp), %rdi
callq 0x3fe82
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movq 0x98(%rsp), %rbx
movq %rbx, %rdi
callq 0xacc67
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0xbb0b2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1c110
leaq 0x80(%rsp), %rdi
callq 0x2a79a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0xbb18c
movq 0x70(%rsp), %rsi
jmp 0xbb184
jmp 0xbb0f1
movq %rax, %rbx
jmp 0xbb18c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
jne 0xbb17f
jmp 0xbb18c
movq %rax, %rbx
jmp 0xbb170
movq %rax, %rbx
jmp 0xbb155
movq %rax, %rbx
jmp 0xbb139
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xbb139
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xbb155
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xbb170
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xbb18c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1c110
leaq 0x80(%rsp), %rdi
callq 0x2a79a
movq %rbx, %rdi
callq 0x1c7d0
nop
| _ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov [rsp+0E8h+var_38], rdx
mov [rsp+0E8h+var_40], rsi
mov [rsp+0E8h+var_50], rdi
xorps xmm0, xmm0
movaps [rsp+0E8h+var_68], xmm0
mov [rsp+0E8h+var_58], 0
mov r13, [rcx]
mov [rsp+0E8h+var_48], rcx
cmp [rcx+8], r13
jz loc_BB05D
lea r14, [rsp+0E8h+var_98]
xor ebp, ebp
lea r15, [rsp+0E8h+var_88]
loc_BAE25:
mov rax, [rsp+0E8h+var_38]
mov rbx, [rax+8]
mov [rsp+0E8h+var_A8], r14
mov rsi, [rax]
lea rdx, [rsi+rbx]
lea r12, [rsp+0E8h+var_A8]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
test rbx, rbx
lea rsi, aTuple+5; "-"
lea rax, aAlternative; "alternative-"
cmovz rsi, rax
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov esi, 1
cmp rbp, 0Ah
jb short loc_BAEC1
mov esi, 4
mov rcx, rbp
mov rdi, 346DC5D63886594Bh
loc_BAE84:
cmp rcx, 63h ; 'c'
jbe short loc_BAEBA
cmp rcx, 3E7h
jbe short loc_BAEBF
cmp rcx, 2710h
jb short loc_BAEC1
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_BAE84
add esi, 0FFFFFFFDh
jmp short loc_BAEC1
loc_BAEBA:
add esi, 0FFFFFFFEh
jmp short loc_BAEC1
loc_BAEBF:
dec esi
loc_BAEC1:
mov esi, esi
lea rax, [rsp+0E8h+var_D8]
mov [rsp+0E8h+var_E8], rax
mov rdi, rsp
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+0E8h+var_E8]
mov esi, dword ptr [rsp+0E8h+var_E0]
mov rdx, rbp
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rcx, [rsp+0E8h+var_A8]
mov edi, 0Fh
cmp rcx, r14
jz short loc_BAEFA
mov rdi, [rsp+0E8h+var_98]
loc_BAEFA:
mov r8, [rsp+0E8h+var_A0]
mov rsi, [rsp+0E8h+var_E8]
mov rdx, [rsp+0E8h+var_E0]
lea rax, [rdx+r8]
cmp rax, rdi
lea r14, [rsp+0E8h+var_B8]
jbe short loc_BAF2F
mov edi, 0Fh
lea r9, [rsp+0E8h+var_D8]
cmp rsi, r9
jz short loc_BAF2A
mov rdi, [rsp+0E8h+var_D8]
loc_BAF2A:
cmp rax, rdi
jbe short loc_BAF3B
loc_BAF2F:
lea rdi, [rsp+0E8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
jmp short loc_BAF47
loc_BAF3B:
mov rdi, rsp
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_BAF47:
mov rbx, rax
mov [rsp+0E8h+var_C8], r14
mov rax, [rax]
mov rdi, r14
lea r14, [rbx+10h]
cmp rax, r14
jz short loc_BAF6D
mov [rsp+0E8h+var_C8], rax
mov rax, [r14]
mov [rsp+0E8h+var_B8], rax
jmp short loc_BAF7C
loc_BAF6D:
mov rdx, [rbx+8]
inc rdx
mov rsi, r14
call _memcpy
loc_BAF7C:
mov rax, rbx
add rax, 8
mov rcx, [rbx+8]
mov [rsp+0E8h+var_C0], rcx
mov [rbx], r14
mov rcx, rbp
shl rcx, 4
add r13, rcx
mov qword ptr [rax], 0
mov byte ptr [r14], 0
mov rdi, r15
mov rsi, [rsp+0E8h+var_40]
mov rdx, r13
lea rcx, [rsp+0E8h+var_C8]
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_68]
mov rsi, r15
lea r14, [rsp+0E8h+var_98]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+0E8h+var_88]; void *
lea rax, [rsp+0E8h+var_78]
cmp rdi, rax
jz short loc_BAFED
mov rsi, [rsp+0E8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BAFED:
mov rdi, [rsp+0E8h+var_C8]; void *
lea rax, [rsp+0E8h+var_B8]
cmp rdi, rax
jz short loc_BB009
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB009:
mov rdi, [rsp+0E8h+var_E8]; void *
lea rax, [rsp+0E8h+var_D8]
cmp rdi, rax
jz short loc_BB024
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB024:
mov rdi, [rsp+0E8h+var_A8]; void *
cmp rdi, r14
jz short loc_BB03B
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB03B:
inc rbp
mov rax, [rsp+0E8h+var_48]
mov r13, [rax]
mov rax, [rax+8]
sub rax, r13
sar rax, 4
cmp rbp, rax
jb loc_BAE25
loc_BB05D:
lea r14, [rsp+0E8h+var_78]
mov [r14-10h], r14
lea rsi, asc_D2215+1; " | "
lea rdx, asc_D2215+4; ""
lea rdi, [rsp+0E8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0E8h+var_68]
lea rdx, [rsp+0E8h+var_88]
mov rbx, [rsp+0E8h+var_50]
mov rdi, rbx
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
mov rdi, [rsp+0E8h+var_88]; void *
cmp rdi, r14
jz short loc_BB0B2
mov rsi, [rsp+0E8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB0B2:
lea rdi, [rsp+0E8h+var_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_58]
cmp rdi, r14
jz loc_BB18C
mov rsi, [rsp+arg_68]
jmp loc_BB184
jmp short $+2
loc_BB0F1:
mov rbx, rax
jmp loc_BB18C
mov rbx, rax
mov rdi, [rsp+arg_38]
cmp rdi, r14
jnz short loc_BB17F
jmp loc_BB18C
mov rbx, rax
jmp short loc_BB170
mov rbx, rax
jmp short loc_BB155
mov rbx, rax
jmp short loc_BB139
mov rbx, rax
mov rdi, [rsp+arg_58]; void *
lea rax, [rsp+arg_68]
cmp rdi, rax
jz short loc_BB139
mov rsi, [rsp+arg_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB139:
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_BB155
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB155:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_BB170
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB170:
mov rdi, [rsp+arg_38]; void *
lea rax, [rsp+arg_48]
cmp rdi, rax
jz short loc_BB18C
loc_BB17F:
mov rsi, [rsp+arg_48]
loc_BB184:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BB18C:
lea rdi, [rsp+arg_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_generate_union_rule(long long a1, void *a2, long long a3, long long *a4)
{
long long v4; // r13
unsigned long long v5; // rbp
long long v6; // rbx
char *v7; // rsi
unsigned int v8; // esi
unsigned long long v9; // rcx
bool v10; // cc
unsigned long long v11; // rdi
unsigned long long v12; // rdi
void **v13; // rax
void **v14; // rbx
void **v15; // rax
_QWORD *v16; // r14
long long v17; // rbx
void *v19; // [rsp+0h] [rbp-E8h] BYREF
long long v20; // [rsp+8h] [rbp-E0h]
_QWORD v21[2]; // [rsp+10h] [rbp-D8h] BYREF
void *v22[2]; // [rsp+20h] [rbp-C8h] BYREF
_QWORD v23[2]; // [rsp+30h] [rbp-B8h] BYREF
void *v24; // [rsp+40h] [rbp-A8h] BYREF
long long v25; // [rsp+48h] [rbp-A0h]
_QWORD v26[2]; // [rsp+50h] [rbp-98h] BYREF
void *v27[2]; // [rsp+60h] [rbp-88h] BYREF
_QWORD v28[2]; // [rsp+70h] [rbp-78h] BYREF
__int128 v29; // [rsp+80h] [rbp-68h] BYREF
long long v30; // [rsp+90h] [rbp-58h]
long long v31; // [rsp+98h] [rbp-50h]
long long *v32; // [rsp+A0h] [rbp-48h]
void *v33; // [rsp+A8h] [rbp-40h]
long long v34; // [rsp+B0h] [rbp-38h]
v34 = a3;
v33 = a2;
v31 = a1;
v29 = 0LL;
v30 = 0LL;
v4 = *a4;
v32 = a4;
if ( a4[1] != v4 )
{
v5 = 0LL;
do
{
v6 = *(_QWORD *)(v34 + 8);
v24 = v26;
std::string::_M_construct<char *>((long long)&v24, *(_BYTE **)v34, *(_QWORD *)v34 + v6);
v7 = "-";
if ( !v6 )
v7 = "alternative-";
std::string::append(&v24, v7);
v8 = 1;
if ( v5 >= 0xA )
{
v8 = 4;
v9 = v5;
while ( 1 )
{
if ( v9 <= 0x63 )
{
v8 -= 2;
goto LABEL_14;
}
if ( v9 <= 0x3E7 )
break;
if ( v9 < 0x2710 )
goto LABEL_14;
v8 += 4;
v10 = v9 <= 0x1869F;
v9 /= 0x2710uLL;
if ( v10 )
{
v8 -= 3;
goto LABEL_14;
}
}
--v8;
}
LABEL_14:
v19 = v21;
std::string::_M_construct(&v19, v8, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v19, v20, v5);
v11 = 15LL;
if ( v24 != v26 )
v11 = v26[0];
if ( v20 + v25 <= v11 )
goto LABEL_20;
v12 = 15LL;
if ( v19 != v21 )
v12 = v21[0];
if ( v20 + v25 <= v12 )
v13 = (void **)std::string::replace(&v19, 0LL, 0LL, v24, v25);
else
LABEL_20:
v13 = (void **)std::string::append(&v24, v19, v20);
v14 = v13;
v22[0] = v23;
v15 = (void **)*v13;
v16 = v14 + 2;
if ( v15 == v14 + 2 )
{
memcpy(v23, v14 + 2, (char *)v14[1] + 1);
}
else
{
v22[0] = v15;
v23[0] = *v16;
}
v22[1] = v14[1];
*v14 = v16;
v14[1] = 0LL;
*(_BYTE *)v16 = 0;
SchemaConverter::visit(v27, v33, 16 * v5 + v4, (long long)v22);
std::vector<std::string>::emplace_back<std::string>((long long)&v29, v27);
if ( v27[0] != v28 )
operator delete(v27[0], v28[0] + 1LL);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
if ( v19 != v21 )
operator delete(v19, v21[0] + 1LL);
if ( v24 != v26 )
operator delete(v24, v26[0] + 1LL);
++v5;
v4 = *v32;
}
while ( v5 < (v32[1] - *v32) >> 4 );
}
v27[0] = v28;
std::string::_M_construct<char const*>((long long)v27, " | ", (long long)"");
v17 = v31;
string_join(v31, (long long *)&v29, v27);
if ( v27[0] != v28 )
operator delete(v27[0], v28[0] + 1LL);
std::vector<std::string>::~vector((long long)&v29);
return v17;
}
| _generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0x98],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOV qword ptr [RSP + 0x90],0x0
MOV R13,qword ptr [RCX]
MOV qword ptr [RSP + 0xa0],RCX
CMP qword ptr [RCX + 0x8],R13
JZ 0x001bb05d
LEA R14,[RSP + 0x50]
XOR EBP,EBP
LEA R15,[RSP + 0x60]
LAB_001bae25:
MOV RAX,qword ptr [RSP + 0xb0]
MOV RBX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x40],R14
MOV RSI,qword ptr [RAX]
LEA RDX,[RSI + RBX*0x1]
LAB_001bae3d:
LEA R12,[RSP + 0x40]
MOV RDI,R12
CALL 0x00140a2c
TEST RBX,RBX
LEA RSI,[0x1d1fd9]
LEA RAX,[0x1d2066]
CMOVZ RSI,RAX
LAB_001bae5f:
MOV RDI,R12
CALL 0x0011c810
MOV ESI,0x1
CMP RBP,0xa
JC 0x001baec1
MOV ESI,0x4
MOV RCX,RBP
MOV RDI,0x346dc5d63886594b
LAB_001bae84:
CMP RCX,0x63
JBE 0x001baeba
CMP RCX,0x3e7
JBE 0x001baebf
CMP RCX,0x2710
JC 0x001baec1
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001bae84
ADD ESI,-0x3
JMP 0x001baec1
LAB_001baeba:
ADD ESI,-0x2
JMP 0x001baec1
LAB_001baebf:
DEC ESI
LAB_001baec1:
MOV ESI,ESI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
LAB_001baecc:
MOV RDI,RSP
XOR EDX,EDX
CALL 0x0011c750
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x0012fca1
MOV RCX,qword ptr [RSP + 0x40]
MOV EDI,0xf
CMP RCX,R14
JZ 0x001baefa
MOV RDI,qword ptr [RSP + 0x50]
LAB_001baefa:
MOV R8,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LEA RAX,[RDX + R8*0x1]
CMP RAX,RDI
LEA R14,[RSP + 0x30]
JBE 0x001baf2f
MOV EDI,0xf
LEA R9,[RSP + 0x10]
CMP RSI,R9
JZ 0x001baf2a
MOV RDI,qword ptr [RSP + 0x10]
LAB_001baf2a:
CMP RAX,RDI
JBE 0x001baf3b
LAB_001baf2f:
LEA RDI,[RSP + 0x40]
CALL 0x0011c3a0
JMP 0x001baf47
LAB_001baf3b:
MOV RDI,RSP
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011c190
LAB_001baf47:
MOV RBX,RAX
MOV qword ptr [RSP + 0x20],R14
MOV RAX,qword ptr [RAX]
MOV RDI,R14
LEA R14,[RBX + 0x10]
CMP RAX,R14
JZ 0x001baf6d
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001baf7c
LAB_001baf6d:
MOV RDX,qword ptr [RBX + 0x8]
INC RDX
MOV RSI,R14
CALL 0x0011c0b0
LAB_001baf7c:
MOV RAX,RBX
ADD RAX,0x8
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RBX],R14
MOV RCX,RBP
SHL RCX,0x4
ADD R13,RCX
MOV qword ptr [RAX],0x0
MOV byte ptr [R14],0x0
LAB_001bafa4:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,R13
LEA RCX,[RSP + 0x20]
CALL 0x001b811c
LAB_001bafbc:
LEA RDI,[RSP + 0x80]
MOV RSI,R15
LEA R14,[RSP + 0x50]
CALL 0x00168ab4
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001bafed
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011c110
LAB_001bafed:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x001bb009
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011c110
LAB_001bb009:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001bb024
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011c110
LAB_001bb024:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,R14
JZ 0x001bb03b
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011c110
LAB_001bb03b:
INC RBP
MOV RAX,qword ptr [RSP + 0xa0]
MOV R13,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,R13
SAR RAX,0x4
CMP RBP,RAX
JC 0x001bae25
LAB_001bb05d:
LEA R14,[RSP + 0x70]
MOV qword ptr [R14 + -0x10],R14
LAB_001bb066:
LEA RSI,[0x1d2216]
LEA RDX,[0x1d2219]
LEA RDI,[RSP + 0x60]
CALL 0x0013fe82
LAB_001bb07e:
LEA RSI,[RSP + 0x80]
LEA RDX,[RSP + 0x60]
MOV RBX,qword ptr [RSP + 0x98]
MOV RDI,RBX
CALL 0x001acc67
LAB_001bb09b:
MOV RDI,qword ptr [RSP + 0x60]
CMP RDI,R14
JZ 0x001bb0b2
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011c110
LAB_001bb0b2:
LEA RDI,[RSP + 0x80]
CALL 0x0012a79a
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
vector * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *__src;
ulong uVar1;
bool bVar2;
string *psVar3;
char cVar4;
int8 *puVar5;
long *in_RCX;
ulong uVar6;
long *in_RDX;
ulong uVar7;
char cVar8;
ulong *local_e8;
uint local_e0;
int4 uStack_dc;
ulong local_d8 [2];
long *local_c8;
int8 local_c0;
long local_b8 [2];
ulong *local_a8;
long local_a0;
ulong local_98 [2];
long *local_88 [2];
long local_78 [2];
int8 local_68;
int8 uStack_60;
int8 local_58;
string *local_50;
long *local_48;
vector *local_40;
long *local_38;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
local_50 = param_1;
local_40 = param_2;
if (in_RCX[1] != *in_RCX) {
uVar7 = 0;
local_48 = in_RCX;
local_38 = in_RDX;
do {
/* try { // try from 001bae3d to 001bae49 has its CatchHandler @ 001bb0f1 */
local_a8 = local_98;
std::__cxx11::string::_M_construct<char*>(&local_a8,*local_38,*local_38 + local_38[1]);
/* try { // try from 001bae5f to 001bae66 has its CatchHandler @ 001bb0f9 */
std::__cxx11::string::append((char *)&local_a8);
cVar8 = '\x01';
if (9 < uVar7) {
uVar6 = uVar7;
cVar4 = '\x04';
do {
cVar8 = cVar4;
if (uVar6 < 100) {
cVar8 = cVar8 + -2;
goto LAB_001baec1;
}
if (uVar6 < 1000) {
cVar8 = cVar8 + -1;
goto LAB_001baec1;
}
if (uVar6 < 10000) goto LAB_001baec1;
bVar2 = 99999 < uVar6;
uVar6 = uVar6 / 10000;
cVar4 = cVar8 + '\x04';
} while (bVar2);
cVar8 = cVar8 + '\x01';
}
LAB_001baec1:
local_e8 = local_d8;
/* try { // try from 001baecc to 001baed5 has its CatchHandler @ 001bb10b */
std::__cxx11::string::_M_construct((ulong)&local_e8,cVar8);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_e8,local_e0,uVar7);
uVar6 = 0xf;
if (local_a8 != local_98) {
uVar6 = local_98[0];
}
uVar1 = CONCAT44(uStack_dc,local_e0) + local_a0;
if (uVar6 < uVar1) {
uVar6 = 0xf;
if (local_e8 != local_d8) {
uVar6 = local_d8[0];
}
if (uVar6 < uVar1) goto LAB_001baf2f;
puVar5 = (int8 *)
std::__cxx11::string::replace((ulong)&local_e8,0,(char *)0x0,(ulong)local_a8);
}
else {
LAB_001baf2f:
/* try { // try from 001baf2f to 001baf46 has its CatchHandler @ 001bb110 */
puVar5 = (int8 *)std::__cxx11::string::append((char *)&local_a8,(ulong)local_e8);
}
local_c8 = (long *)*puVar5;
__src = puVar5 + 2;
if (local_c8 == __src) {
local_c8 = local_b8;
memcpy(local_b8,__src,puVar5[1] + 1);
}
else {
local_b8[0] = *__src;
}
local_c0 = puVar5[1];
*puVar5 = __src;
puVar5[1] = 0;
*(int1 *)__src = 0;
/* try { // try from 001bafa4 to 001bafbb has its CatchHandler @ 001bb115 */
visit((basic_json *)local_88,(string *)local_40);
/* try { // try from 001bafbc to 001bafd0 has its CatchHandler @ 001bb11a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68,
(string *)local_88);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_c8 != local_b8) {
operator_delete(local_c8,local_b8[0] + 1);
}
if (local_e8 != local_d8) {
operator_delete(local_e8,local_d8[0] + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
uVar7 = uVar7 + 1;
} while (uVar7 < (ulong)(local_48[1] - *local_48 >> 4));
}
/* try { // try from 001bb066 to 001bb07d has its CatchHandler @ 001bb0ef */
local_88[0] = local_78;
std::__cxx11::string::_M_construct<char_const*>(local_88,&DAT_001d2216,&DAT_001d2219);
psVar3 = local_50;
/* try { // try from 001bb07e to 001bb09a has its CatchHandler @ 001bb0d4 */
string_join((vector *)local_50,(string *)&local_68);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return (vector *)psVar3;
}
| |
39,080 | minja::Value::contains(char const*) const | monkey531[P]llama/common/minja.hpp | bool contains(const char * key) const { return contains(std::string(key)); } | O3 | cpp | minja::Value::contains(char const*) const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x256d6
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb7818
movl %eax, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd1442
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd146a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq %rbx, %rdi
callq 0x1e660
| _ZNK5minja5Value8containsEPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
mov ebx, eax
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D1442
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D1442:
mov eax, ebx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D146A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D146A:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::contains(minja::Value *this, const char *a2)
{
unsigned int v2; // eax
unsigned int v3; // ebx
void *v5[2]; // [rsp+8h] [rbp-30h] BYREF
long long v6; // [rsp+18h] [rbp-20h] BYREF
std::string::basic_string<std::allocator<char>>(v5, (long long)a2);
LOBYTE(v2) = minja::Value::contains((long long)this, (long long)v5);
v3 = v2;
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
return v3;
}
| contains:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x001256d6
LAB_001d141a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b7818
LAB_001d1425:
MOV EBX,EAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001d1442
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc50
LAB_001d1442:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::contains(char const*) const */
int4 __thiscall minja::Value::contains(Value *this,char *param_1)
{
int4 uVar1;
allocator local_31;
long *local_30 [2];
long local_20 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 001d141a to 001d1424 has its CatchHandler @ 001d144c */
uVar1 = contains(this,(string *)local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return uVar1;
}
| |
39,081 | my_strnncollsp_simple | eloqsql/strings/ctype-simple.c | int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
} | O0 | c | my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x48e30
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x48e38
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, -0x48(%rbp)
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x48eb9
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x48eb7
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl -0x1(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x48f83
jmp 0x48e4b
movl $0x0, -0x4c(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x48f7d
movl $0x1, -0x50(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x48efe
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x48f7b
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
cmpl %ecx, %eax
je 0x48f6b
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jge 0x48f5d
xorl %eax, %eax
subl -0x50(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x48f63
movl -0x50(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x48f83
jmp 0x48f6d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x48f13
jmp 0x48f7d
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_48E30
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
jmp short loc_48E38
loc_48E30:
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
loc_48E38:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
mov [rbp+var_48], rcx
add rax, rcx
mov [rbp+var_40], rax
loc_48E4B:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb short loc_48EB9
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_28]
mov rsi, rdx
add rsi, 1
mov [rbp+var_28], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_48EB7
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_28]
movzx edx, byte ptr [rdx-1]
movzx ecx, byte ptr [rcx+rdx]
sub eax, ecx
mov [rbp+var_4], eax
jmp loc_48F83
loc_48EB7:
jmp short loc_48E4B
loc_48EB9:
mov [rbp+var_4C], 0
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jz loc_48F7D
mov [rbp+var_50], 1
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_48EFE
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_50], 0FFFFFFFFh
xor eax, eax
sub eax, [rbp+var_4C]
mov [rbp+var_4C], eax
loc_48EFE:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_48F13:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb short loc_48F7B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+20h]
cmp eax, ecx
jz short loc_48F6B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+20h]
cmp eax, ecx
jge short loc_48F5D
xor eax, eax
sub eax, [rbp+var_50]
mov [rbp+var_64], eax
jmp short loc_48F63
loc_48F5D:
mov eax, [rbp+var_50]
mov [rbp+var_64], eax
loc_48F63:
mov eax, [rbp+var_64]
mov [rbp+var_4], eax
jmp short loc_48F83
loc_48F6B:
jmp short $+2
loc_48F6D:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_48F13
loc_48F7B:
jmp short $+2
loc_48F7D:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
loc_48F83:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned __int8 *v5; // rcx
unsigned __int8 *v6; // rdx
unsigned long long v9; // [rsp+4h] [rbp-60h]
unsigned int v10; // [rsp+14h] [rbp-50h]
unsigned __int8 *v11; // [rsp+24h] [rbp-40h]
long long v12; // [rsp+2Ch] [rbp-38h]
unsigned long long v14; // [rsp+44h] [rbp-20h]
unsigned __int8 *v15; // [rsp+4Ch] [rbp-18h]
v15 = a2;
v14 = a3;
v12 = *(_QWORD *)(a1 + 88);
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
while ( v15 < &a2[v9] )
{
v5 = v15++;
v6 = a4++;
if ( *(unsigned __int8 *)(v12 + *v5) != *(unsigned __int8 *)(v12 + *v6) )
return (unsigned int)(*(unsigned __int8 *)(v12 + *(v15 - 1)) - *(unsigned __int8 *)(v12 + *(a4 - 1)));
}
if ( v14 != a5 )
{
v10 = 1;
if ( v14 < a5 )
{
v14 = a5;
v15 = a4;
v10 = -1;
}
v11 = &v15[v14 - v9];
while ( v15 < v11 )
{
if ( *(unsigned __int8 *)(v12 + *v15) != *(unsigned __int8 *)(v12 + 32) )
{
if ( *(unsigned __int8 *)(v12 + *v15) >= (int)*(unsigned __int8 *)(v12 + 32) )
return v10;
else
return -v10;
}
++v15;
}
}
return 0;
}
| my_strnncollsp_simple:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00148e30
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00148e38
LAB_00148e30:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
LAB_00148e38:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x48],RCX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00148e4b:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00148eb9
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x28]
MOV RSI,RDX
ADD RSI,0x1
MOV qword ptr [RBP + -0x28],RSI
MOVZX EDX,byte ptr [RDX]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x00148eb7
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX EDX,byte ptr [RDX + -0x1]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00148f83
LAB_00148eb7:
JMP 0x00148e4b
LAB_00148eb9:
MOV dword ptr [RBP + -0x4c],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00148f7d
MOV dword ptr [RBP + -0x50],0x1
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00148efe
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x50],0xffffffff
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x4c],EAX
LAB_00148efe:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00148f13:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00148f7b
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x20]
CMP EAX,ECX
JZ 0x00148f6b
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x20]
CMP EAX,ECX
JGE 0x00148f5d
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00148f63
LAB_00148f5d:
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x64],EAX
LAB_00148f63:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00148f83
LAB_00148f6b:
JMP 0x00148f6d
LAB_00148f6d:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00148f13
LAB_00148f7b:
JMP 0x00148f7d
LAB_00148f7d:
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00148f83:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
long lVar1;
byte *pbVar2;
byte *pbVar3;
int local_6c;
ulong local_68;
int local_58;
byte *local_30;
ulong local_28;
byte *local_20;
lVar1 = *(long *)(param_1 + 0x58);
local_68 = param_5;
if (param_3 < param_5) {
local_68 = param_3;
}
pbVar3 = param_4;
pbVar2 = param_2;
do {
local_20 = pbVar2;
local_30 = pbVar3;
if (param_2 + local_68 <= local_20) {
if (param_3 != param_5) {
local_58 = 1;
local_28 = param_3;
if (param_3 < param_5) {
local_20 = local_30;
local_58 = -1;
local_28 = param_5;
}
pbVar3 = local_20 + (local_28 - local_68);
for (; local_20 < pbVar3; local_20 = local_20 + 1) {
if (*(char *)(lVar1 + (ulong)*local_20) != *(char *)(lVar1 + 0x20)) {
if (*(byte *)(lVar1 + (ulong)*local_20) < *(byte *)(lVar1 + 0x20)) {
local_6c = -local_58;
}
else {
local_6c = local_58;
}
return local_6c;
}
}
}
return 0;
}
pbVar3 = local_30 + 1;
pbVar2 = local_20 + 1;
} while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30));
return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30);
}
| |
39,082 | simple_key_cache_insert | eloqsql/mysys/mf_keycache.c | static
int simple_key_cache_insert(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length)
{
int error= 0;
DBUG_ENTER("key_cache_insert");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file,(ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
my_bool locked_and_incremented= FALSE;
/*
When the keycache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We do not load index data into a disabled cache nor into an
ongoing resize.
*/
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Register the pseudo I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Loaded data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Load data in key_cache_block_size increments. */
do
{
/* Cache could be disabled or resizing in a later iteration. */
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Start loading at the beginning of the cache block. */
filepos-= offset;
/* Do not load beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* The block has been read by the caller already. */
keycache->global_cache_read++;
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
block= find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Stop loading index data.
*/
goto no_key_cache;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_WAIT_TO_BE_READ)
{
/*
this is a secondary request for a block to be read into the
cache. The block is in eviction. It is not yet assigned to
the requested file block (It does not point to the right
hash_link). So we cannot call remove_reader() on the block.
And we cannot access the hash_link directly here. We need to
wait until the assignment is complete. read_block_secondary()
executes the correct wait.
*/
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (page_st == PAGE_TO_BE_READ &&
(offset || (read_length < keycache->key_cache_block_size)))
{
/*
this is a primary request for a block to be read into the
cache and the supplied data does not fill the whole block.
This function is called on behalf of a LOAD INDEX INTO CACHE
statement, which is a read-only task and allows other
readers. It is possible that a parallel running reader tries
to access this block. If it needs more data than has been
supplied here, it would report an error. To be sure that we
have all data in the block that is available in the file, we
read the block ourselves.
Though reading again what the caller did read already is an
expensive operation, we need to do this for correctness.
*/
read_block_primary(keycache, block, keycache->key_cache_block_size,
read_length + offset);
}
else if (page_st == PAGE_TO_BE_READ)
{
/*
This is a new block in the cache. If we come here, we have
data for the whole block.
*/
DBUG_ASSERT(block->hash_link->requests);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
Here other threads may step in and register as secondary readers.
They will register in block->wqueue[COND_FOR_REQUESTED].
*/
#endif
/* Copy data from buff */
memcpy(block->buffer+offset, buff, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#endif
/*
After the data is in the buffer, we can declare the block
valid. Now other threads do not need to register as
secondary readers any more. They can immediately access the
block.
*/
block->status|= BLOCK_READ;
block->length= read_length+offset;
/*
Do not set block->offset here. If this block is marked
BLOCK_CHANGED later, we want to flush only the modified part. So
only a writer may set block->offset down from
keycache->key_cache_block_size.
*/
KEYCACHE_DBUG_PRINT("key_cache_insert",
("primary request: new page in cache"));
/* Signal all pending requests. */
release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]);
}
else
{
/*
page_st == PAGE_READ. The block is in the buffer. All data
must already be present. Blocks are always read with all
data available on file. Assert that the block does not have
less contents than the preloader supplies. If the caller has
data beyond block->length, it means that a file write has
been done while this block was in cache and not extended
with the new data. If the condition is met, we can simply
ignore the block.
*/
DBUG_ASSERT((page_st == PAGE_READ) &&
(read_length + offset <= block->length));
}
/*
A secondary request must now have the block assigned to the
requested file block. It does not hurt to check it for primary
requests too.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
} /* end of if (!(block->status & BLOCK_ERROR)) */
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_insert_block_error",
block->status|= BLOCK_ERROR; errno=EIO;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
no_key_cache:
if (locked_and_incremented)
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_RETURN(error);
} | O0 | c | simple_key_cache_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
jmp 0xe5737
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0xe59fd
movb $0x0, -0x45(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6d921(%rip), %rsi # 0x15307b
movl $0xbe2, %edx # imm = 0xBE2
callq 0xe2bf0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0xe577b
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xe5780
jmp 0xe59de
movq -0x8(%rbp), %rdi
callq 0xe2d10
movb $0x1, -0x45(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0xe57b9
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xe57be
jmp 0xe59de
movl -0x40(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl -0x40(%rbp), %ecx
cmpl %ecx, %eax
jbe 0xe57f2
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0xe57f4
jmp 0xe57f6
jmp 0xe57f8
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rax)
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x150(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x44(%rbp), %r9
callq 0xe2d30
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xe584e
jmp 0xe59de
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe595d
cmpl $0x2, -0x44(%rbp)
jne 0xe587f
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xe3770
jmp 0xe5876
jmp 0xe5878
jmp 0xe587a
jmp 0xe594f
cmpl $0x1, -0x44(%rbp)
jne 0xe58b6
cmpl $0x0, -0x40(%rbp)
jne 0xe5897
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xe58b6
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movl -0x3c(%rbp), %ecx
addl -0x40(%rbp), %ecx
callq 0xe3670
jmp 0xe594d
cmpl $0x1, -0x44(%rbp)
jne 0xe5945
jmp 0xe58c2
jmp 0xe58c4
jmp 0xe58c6
jmp 0xe58c8
jmp 0xe58ca
jmp 0xe58cc
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe3610
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rdi
movl -0x40(%rbp), %eax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %eax
movl %eax, %edx
callq 0x2a0a0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6d771(%rip), %rsi # 0x15307b
movl $0xc4b, %edx # imm = 0xC4B
callq 0xe2bf0
jmp 0xe5916
jmp 0xe5918
jmp 0xe591a
movq -0x38(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x50(%rax)
movl -0x3c(%rbp), %ecx
addl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0xe5936
movq -0x38(%rbp), %rdi
addq $0x28, %rdi
callq 0xe4a10
jmp 0xe594b
jmp 0xe5947
jmp 0xe5949
jmp 0xe594b
jmp 0xe594d
jmp 0xe594f
jmp 0xe5951
jmp 0xe5953
jmp 0xe5955
jmp 0xe5957
jmp 0xe5959
jmp 0xe595b
jmp 0xe595d
movq -0x38(%rbp), %rdi
callq 0xe37b0
jmp 0xe5968
movq -0x38(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe598b
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0xe3810
jmp 0xe59a1
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xe39a0
movl $0x1, -0x30(%rbp)
jmp 0xe59dc
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x3c(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xe57a2
jmp 0xe59de
cmpb $0x0, -0x45(%rbp)
je 0xe59ed
movq -0x8(%rbp), %rdi
callq 0xe3b10
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe3610
jmp 0xe59ff
movl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| simple_key_cache_insert:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov [rbp+var_30], 0
jmp short $+2
loc_E5737:
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz loc_E59FD
mov [rbp+var_45], 0
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0BE2h
call inline_mysql_mutex_lock_24
mov rax, [rbp+var_8]
cmp byte ptr [rax+3], 0
jz short loc_E577B
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jz short loc_E5780
loc_E577B:
jmp loc_E59DE
loc_E5780:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op_0
mov [rbp+var_45], 1
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_40], eax
loc_E57A2:
mov rax, [rbp+var_8]
cmp byte ptr [rax+3], 0
jz short loc_E57B9
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jz short loc_E57BE
loc_E57B9:
jmp loc_E59DE
loc_E57BE:
mov eax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
sub ecx, [rbp+var_40]
cmp eax, ecx
jbe short loc_E57F2
mov rax, [rbp+var_8]
mov eax, [rax+18h]
sub eax, [rbp+var_40]
mov [rbp+var_3C], eax
loc_E57F2:
jmp short $+2
loc_E57F4:
jmp short $+2
loc_E57F6:
jmp short $+2
loc_E57F8:
mov rax, [rbp+var_8]
mov rcx, [rax+158h]
add rcx, 1
mov [rax+158h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+150h]
add rcx, 1
mov [rax+150h], rcx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
xor r8d, r8d
lea r9, [rbp+var_44]
call find_key_block
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_E584E
jmp loc_E59DE
loc_E584E:
mov rax, [rbp+var_38]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz loc_E595D
cmp [rbp+var_44], 2
jnz short loc_E587F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
call read_block_secondary
jmp short $+2
loc_E5876:
jmp short $+2
loc_E5878:
jmp short $+2
loc_E587A:
jmp loc_E594F
loc_E587F:
cmp [rbp+var_44], 1
jnz short loc_E58B6
cmp [rbp+var_40], 0
jnz short loc_E5897
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_8]
cmp eax, [rcx+18h]
jnb short loc_E58B6
loc_E5897:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_8]
mov edx, [rax+18h]
mov ecx, [rbp+var_3C]
add ecx, [rbp+var_40]
call read_block_primary
jmp loc_E594D
loc_E58B6:
cmp [rbp+var_44], 1
jnz loc_E5945
jmp short $+2
loc_E58C2:
jmp short $+2
loc_E58C4:
jmp short $+2
loc_E58C6:
jmp short $+2
loc_E58C8:
jmp short $+2
loc_E58CA:
jmp short $+2
loc_E58CC:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
mov rax, [rbp+var_38]
mov rdi, [rax+40h]
mov eax, [rbp+var_40]
add rdi, rax
mov rsi, [rbp+var_28]
mov eax, [rbp+var_3C]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C4Bh
call inline_mysql_mutex_lock_24
jmp short $+2
loc_E5916:
jmp short $+2
loc_E5918:
jmp short $+2
loc_E591A:
mov rax, [rbp+var_38]
mov ecx, [rax+50h]
or ecx, 2
mov [rax+50h], ecx
mov ecx, [rbp+var_3C]
add ecx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+4Ch], ecx
jmp short $+2
loc_E5936:
mov rdi, [rbp+var_38]
add rdi, 28h ; '('
call release_whole_queue
jmp short loc_E594B
loc_E5945:
jmp short $+2
loc_E5947:
jmp short $+2
loc_E5949:
jmp short $+2
loc_E594B:
jmp short $+2
loc_E594D:
jmp short $+2
loc_E594F:
jmp short $+2
loc_E5951:
jmp short $+2
loc_E5953:
jmp short $+2
loc_E5955:
jmp short $+2
loc_E5957:
jmp short $+2
loc_E5959:
jmp short $+2
loc_E595B:
jmp short $+2
loc_E595D:
mov rdi, [rbp+var_38]
call remove_reader_0
jmp short $+2
loc_E5968:
mov rax, [rbp+var_38]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_E598B
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov edx, 1
call unreg_request_0
jmp short loc_E59A1
loc_E598B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
call free_block_0
mov [rbp+var_30], 1
jmp short loc_E59DC
loc_E59A1:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov eax, [rbp+var_3C]
add eax, [rbp+var_40]
mov eax, eax
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov [rbp+var_40], 0
mov ecx, [rbp+var_3C]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_E57A2
loc_E59DC:
jmp short $+2
loc_E59DE:
cmp [rbp+var_45], 0
jz short loc_E59ED
mov rdi, [rbp+var_8]
call dec_counter_for_resize_op_0
loc_E59ED:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
loc_E59FD:
jmp short $+2
loc_E59FF:
mov eax, [rbp+var_30]
mov [rbp+var_4C], eax
mov eax, [rbp+var_4C]
add rsp, 50h
pop rbp
retn
| long long simple_key_cache_insert(
_QWORD *a1,
unsigned int a2,
unsigned long long a3,
int a4,
long long a5,
unsigned int a6,
double a7)
{
char v8; // [rsp+Bh] [rbp-45h]
int v9; // [rsp+Ch] [rbp-44h] BYREF
unsigned int v10; // [rsp+10h] [rbp-40h]
unsigned int v11; // [rsp+14h] [rbp-3Ch]
long long key_block; // [rsp+18h] [rbp-38h]
unsigned int v13; // [rsp+20h] [rbp-30h]
unsigned int v14; // [rsp+24h] [rbp-2Ch]
long long v15; // [rsp+28h] [rbp-28h]
int v16; // [rsp+34h] [rbp-1Ch]
unsigned long long v17; // [rsp+38h] [rbp-18h]
unsigned int v18; // [rsp+44h] [rbp-Ch]
_QWORD *v19; // [rsp+48h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = a6;
v13 = 0;
if ( *(_BYTE *)a1 )
{
v8 = 0;
inline_mysql_mutex_lock_24(
(long long)(v19 + 24),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xBE2u);
if ( *((_BYTE *)v19 + 3) && !*((_BYTE *)v19 + 1) )
{
inc_counter_for_resize_op_0((long long)v19);
v8 = 1;
v10 = v17 % *((unsigned int *)v19 + 6);
do
{
if ( !*((_BYTE *)v19 + 3) || *((_BYTE *)v19 + 1) )
break;
v17 -= v10;
v11 = v14;
if ( v14 > *((_DWORD *)v19 + 6) - v10 )
v11 = *((_DWORD *)v19 + 6) - v10;
++v19[43];
++v19[42];
key_block = find_key_block((long long)v19, v18, v17, v16, 0, &v9, a7);
if ( !key_block )
break;
if ( (*(_DWORD *)(key_block + 80) & 1) == 0 )
{
if ( v9 == 2 )
{
read_block_secondary((long long)v19, key_block, a7);
}
else if ( v9 == 1 && (v10 || v11 < *((_DWORD *)v19 + 6)) )
{
read_block_primary((long long)v19, key_block, *((_DWORD *)v19 + 6), v10 + v11);
}
else if ( v9 == 1 )
{
inline_mysql_mutex_unlock_25((long long)(v19 + 24));
memcpy(v10 + *(_QWORD *)(key_block + 64), v15, v11);
inline_mysql_mutex_lock_24(
(long long)(v19 + 24),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xC4Bu);
*(_DWORD *)(key_block + 80) |= 2u;
*(_DWORD *)(key_block + 76) = v10 + v11;
release_whole_queue((_QWORD *)(key_block + 40));
}
}
remove_reader_0(key_block);
if ( (*(_DWORD *)(key_block + 80) & 1) != 0 )
{
free_block_0((long long)v19, key_block);
v13 = 1;
break;
}
unreg_request_0(v19, key_block, 1);
v15 += v11;
v17 += v10 + v11;
v10 = 0;
v14 -= v11;
}
while ( v14 );
}
if ( v8 )
dec_counter_for_resize_op_0((long long)v19);
inline_mysql_mutex_unlock_25((long long)(v19 + 24));
}
return v13;
}
| simple_key_cache_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001e5737
LAB_001e5737:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001e59fd
MOV byte ptr [RBP + -0x45],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25307b]
MOV EDX,0xbe2
CALL 0x001e2bf0
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x3],0x0
JZ 0x001e577b
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JZ 0x001e5780
LAB_001e577b:
JMP 0x001e59de
LAB_001e5780:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e2d10
MOV byte ptr [RBP + -0x45],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x40],EAX
LAB_001e57a2:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x3],0x0
JZ 0x001e57b9
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JZ 0x001e57be
LAB_001e57b9:
JMP 0x001e59de
LAB_001e57be:
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
SUB ECX,dword ptr [RBP + -0x40]
CMP EAX,ECX
JBE 0x001e57f2
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
SUB EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001e57f2:
JMP 0x001e57f4
LAB_001e57f4:
JMP 0x001e57f6
LAB_001e57f6:
JMP 0x001e57f8
LAB_001e57f8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x158]
ADD RCX,0x1
MOV qword ptr [RAX + 0x158],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x150]
ADD RCX,0x1
MOV qword ptr [RAX + 0x150],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
XOR R8D,R8D
LEA R9,[RBP + -0x44]
CALL 0x001e2d30
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001e584e
JMP 0x001e59de
LAB_001e584e:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e595d
CMP dword ptr [RBP + -0x44],0x2
JNZ 0x001e587f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001e3770
JMP 0x001e5876
LAB_001e5876:
JMP 0x001e5878
LAB_001e5878:
JMP 0x001e587a
LAB_001e587a:
JMP 0x001e594f
LAB_001e587f:
CMP dword ptr [RBP + -0x44],0x1
JNZ 0x001e58b6
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x001e5897
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x18]
JNC 0x001e58b6
LAB_001e5897:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,dword ptr [RBP + -0x40]
CALL 0x001e3670
JMP 0x001e594d
LAB_001e58b6:
CMP dword ptr [RBP + -0x44],0x1
JNZ 0x001e5945
JMP 0x001e58c2
LAB_001e58c2:
JMP 0x001e58c4
LAB_001e58c4:
JMP 0x001e58c6
LAB_001e58c6:
JMP 0x001e58c8
LAB_001e58c8:
JMP 0x001e58ca
LAB_001e58ca:
JMP 0x001e58cc
LAB_001e58cc:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e3610
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x40]
MOV EAX,dword ptr [RBP + -0x40]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x3c]
MOV EDX,EAX
CALL 0x0012a0a0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25307b]
MOV EDX,0xc4b
CALL 0x001e2bf0
JMP 0x001e5916
LAB_001e5916:
JMP 0x001e5918
LAB_001e5918:
JMP 0x001e591a
LAB_001e591a:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x2
MOV dword ptr [RAX + 0x50],ECX
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4c],ECX
JMP 0x001e5936
LAB_001e5936:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x28
CALL 0x001e4a10
JMP 0x001e594b
LAB_001e5945:
JMP 0x001e5947
LAB_001e5947:
JMP 0x001e5949
LAB_001e5949:
JMP 0x001e594b
LAB_001e594b:
JMP 0x001e594d
LAB_001e594d:
JMP 0x001e594f
LAB_001e594f:
JMP 0x001e5951
LAB_001e5951:
JMP 0x001e5953
LAB_001e5953:
JMP 0x001e5955
LAB_001e5955:
JMP 0x001e5957
LAB_001e5957:
JMP 0x001e5959
LAB_001e5959:
JMP 0x001e595b
LAB_001e595b:
JMP 0x001e595d
LAB_001e595d:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001e37b0
JMP 0x001e5968
LAB_001e5968:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e598b
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x1
CALL 0x001e3810
JMP 0x001e59a1
LAB_001e598b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001e39a0
MOV dword ptr [RBP + -0x30],0x1
JMP 0x001e59dc
LAB_001e59a1:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x40]
MOV EAX,EAX
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x40],0x0
MOV ECX,dword ptr [RBP + -0x3c]
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001e57a2
LAB_001e59dc:
JMP 0x001e59de
LAB_001e59de:
CMP byte ptr [RBP + -0x45],0x0
JZ 0x001e59ed
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e3b10
LAB_001e59ed:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e3610
LAB_001e59fd:
JMP 0x001e59ff
LAB_001e59ff:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x50
POP RBP
RET
|
int4
simple_key_cache_insert
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
bool bVar1;
int local_4c;
uint local_48;
uint local_44;
long local_40;
int4 local_38;
uint local_34;
void *local_30;
int4 local_24;
ulong local_20;
int4 local_14;
char *local_10;
local_38 = 0;
if (*param_1 != '\0') {
bVar1 = false;
local_34 = param_6;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xbe2);
if ((local_10[3] != '\0') && (local_10[1] == '\0')) {
inc_counter_for_resize_op(local_10);
bVar1 = true;
local_48 = (uint)(local_20 % (ulong)*(uint *)(local_10 + 0x18));
do {
if ((local_10[3] == '\0') || (local_10[1] != '\0')) break;
local_20 = local_20 - local_48;
local_44 = local_34;
if (*(int *)(local_10 + 0x18) - local_48 < local_34) {
local_44 = *(int *)(local_10 + 0x18) - local_48;
}
*(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1;
*(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1;
local_40 = find_key_block(local_10,local_14,local_20,local_24,0,&local_4c);
if (local_40 == 0) break;
if ((*(uint *)(local_40 + 0x50) & 1) == 0) {
if (local_4c == 2) {
read_block_secondary(local_10,local_40);
}
else if ((local_4c == 1) && ((local_48 != 0 || (local_44 < *(uint *)(local_10 + 0x18)))))
{
read_block_primary(local_10,local_40,*(int4 *)(local_10 + 0x18),
local_44 + local_48);
}
else if (local_4c == 1) {
inline_mysql_mutex_unlock(local_10 + 0xc0);
memcpy((void *)(*(long *)(local_40 + 0x40) + (ulong)local_48),local_30,(ulong)local_44);
inline_mysql_mutex_lock
(local_10 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xc4b);
*(uint *)(local_40 + 0x50) = *(uint *)(local_40 + 0x50) | 2;
*(uint *)(local_40 + 0x4c) = local_44 + local_48;
release_whole_queue(local_40 + 0x28);
}
}
remove_reader(local_40);
if ((*(uint *)(local_40 + 0x50) & 1) != 0) {
free_block(local_10,local_40);
local_38 = 1;
break;
}
unreg_request(local_10,local_40,1);
local_30 = (void *)((long)local_30 + (ulong)local_44);
local_20 = (local_44 + local_48) + local_20;
local_48 = 0;
local_34 = local_34 - local_44;
} while (local_34 != 0);
}
if (bVar1) {
dec_counter_for_resize_op(local_10);
}
inline_mysql_mutex_unlock(local_10 + 0xc0);
}
return local_38;
}
| |
39,083 | simple_key_cache_insert | eloqsql/mysys/mf_keycache.c | static
int simple_key_cache_insert(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length)
{
int error= 0;
DBUG_ENTER("key_cache_insert");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file,(ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
my_bool locked_and_incremented= FALSE;
/*
When the keycache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We do not load index data into a disabled cache nor into an
ongoing resize.
*/
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Register the pseudo I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Loaded data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Load data in key_cache_block_size increments. */
do
{
/* Cache could be disabled or resizing in a later iteration. */
if (!keycache->can_be_used || keycache->in_resize)
goto no_key_cache;
/* Start loading at the beginning of the cache block. */
filepos-= offset;
/* Do not load beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* The block has been read by the caller already. */
keycache->global_cache_read++;
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
block= find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Stop loading index data.
*/
goto no_key_cache;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_WAIT_TO_BE_READ)
{
/*
this is a secondary request for a block to be read into the
cache. The block is in eviction. It is not yet assigned to
the requested file block (It does not point to the right
hash_link). So we cannot call remove_reader() on the block.
And we cannot access the hash_link directly here. We need to
wait until the assignment is complete. read_block_secondary()
executes the correct wait.
*/
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (page_st == PAGE_TO_BE_READ &&
(offset || (read_length < keycache->key_cache_block_size)))
{
/*
this is a primary request for a block to be read into the
cache and the supplied data does not fill the whole block.
This function is called on behalf of a LOAD INDEX INTO CACHE
statement, which is a read-only task and allows other
readers. It is possible that a parallel running reader tries
to access this block. If it needs more data than has been
supplied here, it would report an error. To be sure that we
have all data in the block that is available in the file, we
read the block ourselves.
Though reading again what the caller did read already is an
expensive operation, we need to do this for correctness.
*/
read_block_primary(keycache, block, keycache->key_cache_block_size,
read_length + offset);
}
else if (page_st == PAGE_TO_BE_READ)
{
/*
This is a new block in the cache. If we come here, we have
data for the whole block.
*/
DBUG_ASSERT(block->hash_link->requests);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
Here other threads may step in and register as secondary readers.
They will register in block->wqueue[COND_FOR_REQUESTED].
*/
#endif
/* Copy data from buff */
memcpy(block->buffer+offset, buff, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT((page_st == PAGE_TO_BE_READ) ||
(block->status & BLOCK_READ));
#endif
/*
After the data is in the buffer, we can declare the block
valid. Now other threads do not need to register as
secondary readers any more. They can immediately access the
block.
*/
block->status|= BLOCK_READ;
block->length= read_length+offset;
/*
Do not set block->offset here. If this block is marked
BLOCK_CHANGED later, we want to flush only the modified part. So
only a writer may set block->offset down from
keycache->key_cache_block_size.
*/
KEYCACHE_DBUG_PRINT("key_cache_insert",
("primary request: new page in cache"));
/* Signal all pending requests. */
release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]);
}
else
{
/*
page_st == PAGE_READ. The block is in the buffer. All data
must already be present. Blocks are always read with all
data available on file. Assert that the block does not have
less contents than the preloader supplies. If the caller has
data beyond block->length, it means that a file write has
been done while this block was in cache and not extended
with the new data. If the condition is met, we can simply
ignore the block.
*/
DBUG_ASSERT((page_st == PAGE_READ) &&
(read_length + offset <= block->length));
}
/*
A secondary request must now have the block assigned to the
requested file block. It does not hurt to check it for primary
requests too.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
} /* end of if (!(block->status & BLOCK_ERROR)) */
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_insert_block_error",
block->status|= BLOCK_ERROR; errno=EIO;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
no_key_cache:
if (locked_and_incremented)
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_RETURN(error);
} | O3 | c | simple_key_cache_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x2c(%rbp)
movl %ecx, -0x48(%rbp)
movl %esi, -0x44(%rbp)
cmpb $0x0, (%rdi)
je 0x98d7f
movq %r8, %r15
movq %rdx, %r13
movq %rdi, %r12
leaq 0xc0(%rdi), %r14
cmpq $0x0, 0x100(%rdi)
jne 0x98dd7
movq %r14, %rdi
callq 0x29210
xorl %ebx, %ebx
cmpb $0x0, 0x3(%r12)
je 0x98db1
cmpb $0x0, 0x1(%r12)
jne 0x98db1
movq %r15, -0x60(%rbp)
movq %r14, -0x38(%rbp)
incq 0x70(%r12)
movl 0x18(%r12), %ecx
movq %r13, -0x40(%rbp)
movq %r13, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r13
movq %r12, %r15
cmpb $0x0, 0x3(%r15)
je 0x98d83
cmpb $0x0, 0x1(%r15)
jne 0x98d83
movl %r13d, %eax
movq -0x40(%rbp), %rdx
movq %rax, -0x70(%rbp)
subq %rax, %rdx
movl 0x18(%r15), %r14d
subl %r13d, %r14d
movl -0x2c(%rbp), %eax
cmpl %r14d, %eax
cmovbl %eax, %r14d
movdqu 0x150(%r15), %xmm0
psubq 0x3f51f(%rip), %xmm0 # 0xd8140
movdqu %xmm0, 0x150(%r15)
xorl %ebx, %ebx
movq %r15, %rdi
movl -0x44(%rbp), %esi
movq %rdx, -0x40(%rbp)
movl -0x48(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x4c(%rbp), %r9
callq 0x970c5
testq %rax, %rax
je 0x98d97
movq %rax, %r12
testb $0x1, 0x50(%rax)
movl %r14d, %ebx
jne 0x98d12
movl -0x4c(%rbp), %eax
cmpl $0x1, %eax
je 0x98c84
cmpl $0x2, %eax
jne 0x98d12
movq %r12, %rdi
addq $0x28, %rdi
movq -0x38(%rbp), %rsi
callq 0x97034
jmp 0x98d12
movl 0x18(%r15), %edx
testl %r13d, %r13d
jne 0x98d03
cmpl %edx, %r14d
jb 0x98d03
movq %rbx, -0x58(%rbp)
movq %r15, -0x68(%rbp)
movq 0x100(%r15), %rdi
testq %rdi, %rdi
jne 0x98d51
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x291e0
movq -0x70(%rbp), %rdi
addq 0x40(%r12), %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x29090
movq -0x68(%rbp), %rax
cmpq $0x0, 0x100(%rax)
jne 0x98d66
movq %rbx, %rdi
callq 0x29210
orb $0x2, 0x50(%r12)
movl %r14d, 0x4c(%r12)
movq %r12, %rdi
addq $0x28, %rdi
callq 0x982e9
movq -0x58(%rbp), %rbx
jmp 0x98d12
leal (%r14,%r13), %ecx
movq %r15, %rdi
movq %r12, %rsi
callq 0x978c6
movq %r12, %rdi
callq 0x97994
testb $0x1, 0x50(%r12)
jne 0x98d87
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x979dc
addq %rbx, -0x60(%rbp)
addl %r14d, %r13d
addq %r13, -0x40(%rbp)
xorl %r13d, %r13d
movl $0x0, %ebx
subl %r14d, -0x2c(%rbp)
jne 0x98bdb
jmp 0x98d97
leaq 0x2ec2b8(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x98caa
movq %rbx, %rdi
leaq 0x42474(%rip), %rsi # 0xdb1e4
movl $0xc4b, %edx # imm = 0xC4B
callq 0x2eb6f
jmp 0x98ce6
xorl %ebx, %ebx
jmp 0x98dc6
xorl %ebx, %ebx
jmp 0x98d97
movq %r15, %rdi
movq %r12, %rsi
callq 0x97ae4
movl $0x1, %ebx
decq 0x70(%r15)
movq %r15, %r12
jne 0x98dad
leaq 0x110(%r12), %rdi
callq 0x982e9
movq -0x38(%rbp), %r14
movq 0x100(%r12), %rdi
testq %rdi, %rdi
jne 0x98df0
movq %r14, %rdi
callq 0x291e0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42406(%rip), %rsi # 0xdb1e4
movq %r14, %rdi
movl $0xbe2, %edx # imm = 0xBE2
callq 0x2eb6f
jmp 0x98b9d
leaq 0x2ec219(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x98dbe
| simple_key_cache_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_2C], r9d
mov [rbp+var_48], ecx
mov [rbp+var_44], esi
cmp byte ptr [rdi], 0
jz loc_98D7F
mov r15, r8
mov r13, rdx
mov r12, rdi
lea r14, [rdi+0C0h]
cmp qword ptr [rdi+100h], 0
jnz loc_98DD7
mov rdi, r14
call _pthread_mutex_lock
loc_98B9D:
xor ebx, ebx
cmp byte ptr [r12+3], 0
jz loc_98DB1
cmp byte ptr [r12+1], 0
jnz loc_98DB1
mov [rbp+var_60], r15
mov [rbp+var_38], r14
inc qword ptr [r12+70h]
mov ecx, [r12+18h]
mov [rbp+var_40], r13
mov rax, r13
xor edx, edx
div rcx
mov r13, rdx
mov r15, r12
loc_98BDB:
cmp byte ptr [r15+3], 0
jz loc_98D83
cmp byte ptr [r15+1], 0
jnz loc_98D83
mov eax, r13d
mov rdx, [rbp+var_40]
mov [rbp+var_70], rax
sub rdx, rax
mov r14d, [r15+18h]
sub r14d, r13d
mov eax, [rbp+var_2C]
cmp eax, r14d
cmovb r14d, eax
movdqu xmm0, xmmword ptr [r15+150h]
psubq xmm0, cs:xmmword_D8140
movdqu xmmword ptr [r15+150h], xmm0
xor ebx, ebx
mov rdi, r15
mov esi, [rbp+var_44]
mov [rbp+var_40], rdx
mov ecx, [rbp+var_48]
xor r8d, r8d
lea r9, [rbp+var_4C]
call find_key_block
test rax, rax
jz loc_98D97
mov r12, rax
test byte ptr [rax+50h], 1
mov ebx, r14d
jnz loc_98D12
mov eax, [rbp+var_4C]
cmp eax, 1
jz short loc_98C84
cmp eax, 2
jnz loc_98D12
mov rdi, r12
add rdi, 28h ; '('
mov rsi, [rbp+var_38]
call wait_on_queue
jmp loc_98D12
loc_98C84:
mov edx, [r15+18h]
test r13d, r13d
jnz short loc_98D03
cmp r14d, edx
jb short loc_98D03
mov [rbp+var_58], rbx
mov [rbp+var_68], r15
mov rdi, [r15+100h]
test rdi, rdi
jnz loc_98D51
loc_98CAA:
mov rbx, [rbp+var_38]
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, [rbp+var_70]
add rdi, [r12+40h]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_58]
call _memcpy
mov rax, [rbp+var_68]
cmp qword ptr [rax+100h], 0
jnz loc_98D66
mov rdi, rbx
call _pthread_mutex_lock
loc_98CE6:
or byte ptr [r12+50h], 2
mov [r12+4Ch], r14d
mov rdi, r12
add rdi, 28h ; '('
call release_whole_queue
mov rbx, [rbp+var_58]
jmp short loc_98D12
loc_98D03:
lea ecx, [r14+r13]
mov rdi, r15
mov rsi, r12
call read_block_primary
loc_98D12:
mov rdi, r12
call remove_reader
test byte ptr [r12+50h], 1
jnz short loc_98D87
mov rdi, r15
mov rsi, r12
mov edx, 1
call unreg_request_0
add [rbp+var_60], rbx
add r13d, r14d
add [rbp+var_40], r13
xor r13d, r13d
mov ebx, 0
sub [rbp+var_2C], r14d
jnz loc_98BDB
jmp short loc_98D97
loc_98D51:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_98CAA
loc_98D66:
mov rdi, rbx
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C4Bh
call psi_mutex_lock
jmp loc_98CE6
loc_98D7F:
xor ebx, ebx
jmp short loc_98DC6
loc_98D83:
xor ebx, ebx
jmp short loc_98D97
loc_98D87:
mov rdi, r15
mov rsi, r12
call free_block_0
mov ebx, 1
loc_98D97:
dec qword ptr [r15+70h]
mov r12, r15
jnz short loc_98DAD
lea rdi, [r12+110h]
call release_whole_queue
loc_98DAD:
mov r14, [rbp+var_38]
loc_98DB1:
mov rdi, [r12+100h]
test rdi, rdi
jnz short loc_98DF0
loc_98DBE:
mov rdi, r14
call _pthread_mutex_unlock
loc_98DC6:
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_98DD7:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 0BE2h
call psi_mutex_lock
jmp loc_98B9D
loc_98DF0:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_98DBE
| long long simple_key_cache_insert(
__m128i *a1,
unsigned int a2,
unsigned long long a3,
int a4,
long long a5,
unsigned int a6)
{
__m128i *v8; // r12
long long m128i_i64; // r14
unsigned int v10; // ebx
unsigned long long v11; // rcx
unsigned long long v12; // r13
unsigned long long v14; // rdx
unsigned int v15; // r14d
long long key_block; // rax
long long v17; // r12
long long v18; // rbx
unsigned int v19; // edx
long long v20; // rdi
long long v21; // rbx
bool v22; // zf
long long v24; // [rsp+10h] [rbp-60h]
int v25; // [rsp+24h] [rbp-4Ch] BYREF
int v26; // [rsp+28h] [rbp-48h]
unsigned int v27; // [rsp+2Ch] [rbp-44h]
unsigned long long v28; // [rsp+30h] [rbp-40h]
__m128i *v29; // [rsp+38h] [rbp-38h]
unsigned int v30; // [rsp+44h] [rbp-2Ch]
v30 = a6;
v26 = a4;
v27 = a2;
if ( a1->m128i_i8[0] )
{
v8 = a1;
m128i_i64 = (long long)a1[12].m128i_i64;
if ( a1[16].m128i_i64[0] )
psi_mutex_lock(
(long long)a1[12].m128i_i64,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xBE2u);
else
pthread_mutex_lock(&a1[12]);
v10 = 0;
if ( a1->m128i_i8[3] && !a1->m128i_i8[1] )
{
v24 = a5;
v29 = a1 + 12;
++a1[7].m128i_i64[0];
v11 = a1[1].m128i_u32[2];
v28 = a3;
v12 = a3 % v11;
while ( 1 )
{
if ( !a1->m128i_i8[3] || a1->m128i_i8[1] )
{
v10 = 0;
goto LABEL_31;
}
v14 = v28 - (unsigned int)v12;
v15 = a1[1].m128i_i32[2] - v12;
if ( v30 < v15 )
v15 = v30;
a1[21] = _mm_sub_epi64(_mm_loadu_si128(a1 + 21), (__m128i)xmmword_D8140);
v10 = 0;
v28 = v14;
key_block = find_key_block((unsigned long long)a1, v27, v14, v26, 0, &v25);
if ( !key_block )
goto LABEL_31;
v17 = key_block;
v18 = v15;
if ( (*(_BYTE *)(key_block + 80) & 1) == 0 )
{
if ( v25 == 1 )
{
v19 = a1[1].m128i_u32[2];
if ( (_DWORD)v12 || v15 < v19 )
{
read_block_primary((long long)a1, key_block, v19, v15 + v12);
}
else
{
v20 = a1[16].m128i_i64[0];
if ( v20 )
((void ( *)(long long))PSI_server[44])(v20);
v21 = (long long)v29;
pthread_mutex_unlock(v29);
memcpy(*(_QWORD *)(v17 + 64) + (unsigned int)v12, v24, v15);
if ( a1[16].m128i_i64[0] )
psi_mutex_lock(v21, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xC4Bu);
else
pthread_mutex_lock(v21);
*(_BYTE *)(v17 + 80) |= 2u;
*(_DWORD *)(v17 + 76) = v15;
release_whole_queue((long long *)(v17 + 40));
v18 = v15;
}
}
else if ( v25 == 2 )
{
wait_on_queue((long long *)(key_block + 40), (long long)v29);
}
}
remove_reader(v17);
if ( (*(_BYTE *)(v17 + 80) & 1) != 0 )
break;
unreg_request_0(a1, v17, 1LL);
v24 += v18;
v28 += v15 + (unsigned int)v12;
LODWORD(v12) = 0;
v10 = 0;
v30 -= v15;
if ( !v30 )
goto LABEL_31;
}
free_block_0((long long)a1, v17);
v10 = 1;
LABEL_31:
v22 = a1[7].m128i_i64[0]-- == 1;
v8 = a1;
if ( v22 )
release_whole_queue(a1[17].m128i_i64);
m128i_i64 = (long long)v29;
}
if ( v8[16].m128i_i64[0] )
PSI_server[44]();
pthread_mutex_unlock(m128i_i64);
}
else
{
return 0;
}
return v10;
}
| simple_key_cache_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x48],ECX
MOV dword ptr [RBP + -0x44],ESI
CMP byte ptr [RDI],0x0
JZ 0x00198d7f
MOV R15,R8
MOV R13,RDX
MOV R12,RDI
LEA R14,[RDI + 0xc0]
CMP qword ptr [RDI + 0x100],0x0
JNZ 0x00198dd7
MOV RDI,R14
CALL 0x00129210
LAB_00198b9d:
XOR EBX,EBX
CMP byte ptr [R12 + 0x3],0x0
JZ 0x00198db1
CMP byte ptr [R12 + 0x1],0x0
JNZ 0x00198db1
MOV qword ptr [RBP + -0x60],R15
MOV qword ptr [RBP + -0x38],R14
INC qword ptr [R12 + 0x70]
MOV ECX,dword ptr [R12 + 0x18]
MOV qword ptr [RBP + -0x40],R13
MOV RAX,R13
XOR EDX,EDX
DIV RCX
MOV R13,RDX
MOV R15,R12
LAB_00198bdb:
CMP byte ptr [R15 + 0x3],0x0
JZ 0x00198d83
CMP byte ptr [R15 + 0x1],0x0
JNZ 0x00198d83
MOV EAX,R13D
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
SUB RDX,RAX
MOV R14D,dword ptr [R15 + 0x18]
SUB R14D,R13D
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,R14D
CMOVC R14D,EAX
MOVDQU XMM0,xmmword ptr [R15 + 0x150]
PSUBQ XMM0,xmmword ptr [0x001d8140]
MOVDQU xmmword ptr [R15 + 0x150],XMM0
XOR EBX,EBX
MOV RDI,R15
MOV ESI,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0x40],RDX
MOV ECX,dword ptr [RBP + -0x48]
XOR R8D,R8D
LEA R9,[RBP + -0x4c]
CALL 0x001970c5
TEST RAX,RAX
JZ 0x00198d97
MOV R12,RAX
TEST byte ptr [RAX + 0x50],0x1
MOV EBX,R14D
JNZ 0x00198d12
MOV EAX,dword ptr [RBP + -0x4c]
CMP EAX,0x1
JZ 0x00198c84
CMP EAX,0x2
JNZ 0x00198d12
MOV RDI,R12
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00197034
JMP 0x00198d12
LAB_00198c84:
MOV EDX,dword ptr [R15 + 0x18]
TEST R13D,R13D
JNZ 0x00198d03
CMP R14D,EDX
JC 0x00198d03
MOV qword ptr [RBP + -0x58],RBX
MOV qword ptr [RBP + -0x68],R15
MOV RDI,qword ptr [R15 + 0x100]
TEST RDI,RDI
JNZ 0x00198d51
LAB_00198caa:
MOV RBX,qword ptr [RBP + -0x38]
MOV RDI,RBX
CALL 0x001291e0
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,qword ptr [R12 + 0x40]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x58]
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x100],0x0
JNZ 0x00198d66
MOV RDI,RBX
CALL 0x00129210
LAB_00198ce6:
OR byte ptr [R12 + 0x50],0x2
MOV dword ptr [R12 + 0x4c],R14D
MOV RDI,R12
ADD RDI,0x28
CALL 0x001982e9
MOV RBX,qword ptr [RBP + -0x58]
JMP 0x00198d12
LAB_00198d03:
LEA ECX,[R14 + R13*0x1]
MOV RDI,R15
MOV RSI,R12
CALL 0x001978c6
LAB_00198d12:
MOV RDI,R12
CALL 0x00197994
TEST byte ptr [R12 + 0x50],0x1
JNZ 0x00198d87
MOV RDI,R15
MOV RSI,R12
MOV EDX,0x1
CALL 0x001979dc
ADD qword ptr [RBP + -0x60],RBX
ADD R13D,R14D
ADD qword ptr [RBP + -0x40],R13
XOR R13D,R13D
MOV EBX,0x0
SUB dword ptr [RBP + -0x2c],R14D
JNZ 0x00198bdb
JMP 0x00198d97
LAB_00198d51:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00198caa
LAB_00198d66:
MOV RDI,RBX
LEA RSI,[0x1db1e4]
MOV EDX,0xc4b
CALL 0x0012eb6f
JMP 0x00198ce6
LAB_00198d7f:
XOR EBX,EBX
JMP 0x00198dc6
LAB_00198d83:
XOR EBX,EBX
JMP 0x00198d97
LAB_00198d87:
MOV RDI,R15
MOV RSI,R12
CALL 0x00197ae4
MOV EBX,0x1
LAB_00198d97:
DEC qword ptr [R15 + 0x70]
MOV R12,R15
JNZ 0x00198dad
LEA RDI,[R12 + 0x110]
CALL 0x001982e9
LAB_00198dad:
MOV R14,qword ptr [RBP + -0x38]
LAB_00198db1:
MOV RDI,qword ptr [R12 + 0x100]
TEST RDI,RDI
JNZ 0x00198df0
LAB_00198dbe:
MOV RDI,R14
CALL 0x001291e0
LAB_00198dc6:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00198dd7:
LEA RSI,[0x1db1e4]
MOV RDI,R14
MOV EDX,0xbe2
CALL 0x0012eb6f
JMP 0x00198b9d
LAB_00198df0:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00198dbe
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8
simple_key_cache_insert
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
long *plVar1;
uint uVar2;
ulong uVar3;
int8 uVar4;
int iVar5;
pthread_mutex_t *ppVar6;
long lVar7;
void *local_68;
int local_54;
int4 local_50;
int4 local_4c;
ulong local_48;
pthread_mutex_t *local_40;
uint local_34;
if (*param_1 == '\0') {
uVar4 = 0;
}
else {
ppVar6 = (pthread_mutex_t *)(param_1 + 0xc0);
local_50 = param_4;
local_4c = param_2;
local_34 = param_6;
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar6);
}
else {
psi_mutex_lock(ppVar6,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xbe2);
}
uVar4 = 0;
if ((param_1[3] != '\0') && (param_1[1] == '\0')) {
*(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1;
uVar3 = param_3 % (ulong)*(uint *)(param_1 + 0x18);
local_68 = param_5;
local_48 = param_3;
local_40 = ppVar6;
do {
if ((param_1[3] == '\0') || (param_1[1] != '\0')) {
uVar4 = 0;
break;
}
iVar5 = (int)uVar3;
local_48 = local_48 - uVar3;
uVar2 = *(int *)(param_1 + 0x18) - iVar5;
if (local_34 < (uint)(*(int *)(param_1 + 0x18) - iVar5)) {
uVar2 = local_34;
}
lVar7 = *(long *)(param_1 + 0x158) - _UNK_001d8148;
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) - _DAT_001d8140;
*(long *)(param_1 + 0x158) = lVar7;
uVar4 = 0;
lVar7 = find_key_block(param_1,local_4c,local_48,local_50,0,&local_54);
if (lVar7 == 0) break;
if ((*(byte *)(lVar7 + 0x50) & 1) == 0) {
if (local_54 == 1) {
if ((iVar5 == 0) && (*(uint *)(param_1 + 0x18) <= uVar2)) {
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
ppVar6 = local_40;
pthread_mutex_unlock(local_40);
memcpy((void *)(uVar3 + *(long *)(lVar7 + 0x40)),local_68,(ulong)uVar2);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar6);
}
else {
psi_mutex_lock(ppVar6,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c"
,0xc4b);
}
*(byte *)(lVar7 + 0x50) = *(byte *)(lVar7 + 0x50) | 2;
*(uint *)(lVar7 + 0x4c) = uVar2;
release_whole_queue(lVar7 + 0x28);
}
else {
read_block_primary(param_1,lVar7,*(uint *)(param_1 + 0x18),uVar2 + iVar5);
}
}
else if (local_54 == 2) {
wait_on_queue(lVar7 + 0x28,local_40);
}
}
remove_reader(lVar7);
if ((*(byte *)(lVar7 + 0x50) & 1) != 0) {
free_block(param_1,lVar7);
uVar4 = 1;
break;
}
unreg_request(param_1,lVar7,1);
local_68 = (void *)((long)local_68 + (ulong)uVar2);
local_48 = local_48 + (iVar5 + uVar2);
uVar3 = 0;
uVar4 = 0;
local_34 = local_34 - uVar2;
} while (local_34 != 0);
plVar1 = (long *)(param_1 + 0x70);
*plVar1 = *plVar1 + -1;
ppVar6 = local_40;
if (*plVar1 == 0) {
release_whole_queue(param_1 + 0x110);
ppVar6 = local_40;
}
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar6);
}
return uVar4;
}
| |
39,084 | js_cond_init | bluesky950520[P]quickjs/cutils.c | void js_cond_init(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
if (pthread_cond_init(cond, NULL))
abort();
#else
pthread_condattr_t attr;
if (pthread_condattr_init(&attr))
abort();
if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC))
abort();
if (pthread_cond_init(cond, &attr))
abort();
if (pthread_condattr_destroy(&attr))
abort();
#endif
} | O0 | c | js_cond_init:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0xc(%rsp), %rdi
callq 0xe6f0
cmpl $0x0, %eax
je 0x20f8d
callq 0xe090
leaq 0xc(%rsp), %rdi
movl $0x1, %esi
callq 0xe4c0
cmpl $0x0, %eax
je 0x20fa6
callq 0xe090
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xe610
cmpl $0x0, %eax
je 0x20fbf
callq 0xe090
leaq 0xc(%rsp), %rdi
callq 0xe360
cmpl $0x0, %eax
je 0x20fd3
callq 0xe090
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| js_cond_init:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_init
cmp eax, 0
jz short loc_20F8D
call _abort
loc_20F8D:
lea rdi, [rsp+18h+var_C]
mov esi, 1
call _pthread_condattr_setclock
cmp eax, 0
jz short loc_20FA6
call _abort
loc_20FA6:
mov rdi, [rsp+18h+var_8]
lea rsi, [rsp+18h+var_C]
call _pthread_cond_init
cmp eax, 0
jz short loc_20FBF
call _abort
loc_20FBF:
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_destroy
cmp eax, 0
jz short loc_20FD3
call _abort
loc_20FD3:
add rsp, 18h
retn
| long long js_cond_init(long long a1)
{
long long result; // rax
_BYTE v2[4]; // [rsp+Ch] [rbp-Ch] BYREF
long long v3; // [rsp+10h] [rbp-8h]
v3 = a1;
if ( (unsigned int)pthread_condattr_init(v2) )
abort();
if ( (unsigned int)pthread_condattr_setclock(v2, 1LL) )
abort();
if ( (unsigned int)pthread_cond_init(v3, v2) )
abort();
result = pthread_condattr_destroy(v2);
if ( (_DWORD)result )
abort();
return result;
}
| js_cond_init:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
LEA RDI,[RSP + 0xc]
CALL 0x0010e6f0
CMP EAX,0x0
JZ 0x00120f8d
CALL 0x0010e090
LAB_00120f8d:
LEA RDI,[RSP + 0xc]
MOV ESI,0x1
CALL 0x0010e4c0
CMP EAX,0x0
JZ 0x00120fa6
CALL 0x0010e090
LAB_00120fa6:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0xc]
CALL 0x0010e610
CMP EAX,0x0
JZ 0x00120fbf
CALL 0x0010e090
LAB_00120fbf:
LEA RDI,[RSP + 0xc]
CALL 0x0010e360
CMP EAX,0x0
JZ 0x00120fd3
CALL 0x0010e090
LAB_00120fd3:
ADD RSP,0x18
RET
|
void js_cond_init(pthread_cond_t *param_1)
{
int iVar1;
pthread_condattr_t local_c;
pthread_cond_t *local_8;
local_8 = param_1;
iVar1 = pthread_condattr_init(&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_condattr_setclock(&local_c,1);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_cond_init(local_8,&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_condattr_destroy(&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
return;
}
| |
39,085 | js_cond_init | bluesky950520[P]quickjs/cutils.c | void js_cond_init(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
if (pthread_cond_init(cond, NULL))
abort();
#else
pthread_condattr_t attr;
if (pthread_condattr_init(&attr))
abort();
if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC))
abort();
if (pthread_cond_init(cond, &attr))
abort();
if (pthread_condattr_destroy(&attr))
abort();
#endif
} | O1 | c | js_cond_init:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdi
callq 0xe700
testl %eax, %eax
jne 0x1c7d7
leaq 0xc(%rsp), %rdi
movl $0x1, %esi
callq 0xe4c0
testl %eax, %eax
jne 0x1c7d7
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xe610
testl %eax, %eax
jne 0x1c7d7
leaq 0xc(%rsp), %rdi
callq 0xe360
testl %eax, %eax
jne 0x1c7d7
addq $0x10, %rsp
popq %rbx
retq
callq 0xe090
| js_cond_init:
push rbx
sub rsp, 10h
mov rbx, rdi
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_init
test eax, eax
jnz short loc_1C7D7
lea rdi, [rsp+18h+var_C]
mov esi, 1
call _pthread_condattr_setclock
test eax, eax
jnz short loc_1C7D7
lea rsi, [rsp+18h+var_C]
mov rdi, rbx
call _pthread_cond_init
test eax, eax
jnz short loc_1C7D7
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_destroy
test eax, eax
jnz short loc_1C7D7
add rsp, 10h
pop rbx
retn
loc_1C7D7:
call _abort
| long long js_cond_init(_BYTE *a1)
{
_BYTE *v2; // rdi
long long result; // rax
_BYTE v4[12]; // [rsp+Ch] [rbp-Ch] BYREF
v2 = v4;
if ( (unsigned int)pthread_condattr_init(v4)
|| (v2 = v4, (unsigned int)pthread_condattr_setclock(v4, 1LL))
|| (v2 = a1, (unsigned int)pthread_cond_init(a1, v4))
|| (v2 = v4, result = pthread_condattr_destroy(v4), (_DWORD)result) )
{
abort(v2);
}
return result;
}
| js_cond_init:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA RDI,[RSP + 0xc]
CALL 0x0010e700
TEST EAX,EAX
JNZ 0x0011c7d7
LEA RDI,[RSP + 0xc]
MOV ESI,0x1
CALL 0x0010e4c0
TEST EAX,EAX
JNZ 0x0011c7d7
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0010e610
TEST EAX,EAX
JNZ 0x0011c7d7
LEA RDI,[RSP + 0xc]
CALL 0x0010e360
TEST EAX,EAX
JNZ 0x0011c7d7
ADD RSP,0x10
POP RBX
RET
LAB_0011c7d7:
CALL 0x0010e090
|
void js_cond_init(pthread_cond_t *param_1)
{
int iVar1;
pthread_condattr_t local_c;
iVar1 = pthread_condattr_init(&local_c);
if (iVar1 == 0) {
iVar1 = pthread_condattr_setclock(&local_c,1);
if (iVar1 == 0) {
iVar1 = pthread_cond_init(param_1,&local_c);
if (iVar1 == 0) {
iVar1 = pthread_condattr_destroy(&local_c);
if (iVar1 == 0) {
return;
}
}
}
}
/* WARNING: Subroutine does not return */
abort();
}
| |
39,086 | evmone::(anonymous namespace)::InstructionTracer::on_execution_end(evmc_result const&) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/tracing.cpp | void on_execution_end(const evmc_result& /*result*/) noexcept override { m_contexts.pop(); } | O3 | cpp | evmone::(anonymous namespace)::InstructionTracer::on_execution_end(evmc_result const&):
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x48(%rdi), %rdi
cmpq %rdi, %rax
je 0x4c85d
addq $-0x18, %rax
jmp 0x4c88c
movl $0x1f8, %esi # imm = 0x1F8
callq 0x220c0
movq 0x58(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rbx)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rbx)
leaq 0x1f8(%rax), %rcx
movq %rcx, 0x50(%rbx)
addq $0x1e0, %rax # imm = 0x1E0
movq %rax, 0x40(%rbx)
popq %rbx
retq
| _ZN6evmone12_GLOBAL__N_117InstructionTracer16on_execution_endERK11evmc_result:
push rbx
mov rbx, rdi
mov rax, [rdi+40h]
mov rdi, [rdi+48h]; void *
cmp rax, rdi
jz short loc_4C85D
add rax, 0FFFFFFFFFFFFFFE8h
jmp short loc_4C88C
loc_4C85D:
mov esi, 1F8h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rax, [rbx+58h]
lea rcx, [rax-8]
mov [rbx+58h], rcx
mov rax, [rax-8]
mov [rbx+48h], rax
lea rcx, [rax+1F8h]
mov [rbx+50h], rcx
add rax, 1E0h
loc_4C88C:
mov [rbx+40h], rax
pop rbx
retn
| char * evmone::`anonymous namespace'::InstructionTracer::on_execution_end(_QWORD *a1)
{
char *v2; // rax
char *v3; // rdi
char *result; // rax
long long *v5; // rcx
long long v6; // rax
v2 = (char *)a1[8];
v3 = (char *)a1[9];
if ( v2 == v3 )
{
operator delete(v3, 0x1F8uLL);
v5 = (long long *)(a1[11] - 8LL);
a1[11] = v5;
v6 = *v5;
a1[9] = *v5;
a1[10] = v6 + 504;
result = (char *)(v6 + 480);
}
else
{
result = v2 - 24;
}
a1[8] = result;
return result;
}
| on_execution_end:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RDI,qword ptr [RDI + 0x48]
CMP RAX,RDI
JZ 0x0014c85d
ADD RAX,-0x18
JMP 0x0014c88c
LAB_0014c85d:
MOV ESI,0x1f8
CALL 0x001220c0
MOV RAX,qword ptr [RBX + 0x58]
LEA RCX,[RAX + -0x8]
MOV qword ptr [RBX + 0x58],RCX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RBX + 0x48],RAX
LEA RCX,[RAX + 0x1f8]
MOV qword ptr [RBX + 0x50],RCX
ADD RAX,0x1e0
LAB_0014c88c:
MOV qword ptr [RBX + 0x40],RAX
POP RBX
RET
|
/* evmone::(anonymous namespace)::InstructionTracer::on_execution_end(evmc_result const&) */
void evmone::(anonymous_namespace)::InstructionTracer::on_execution_end(evmc_result *param_1)
{
long lVar1;
if (*(void **)(param_1 + 0x40) == *(void **)(param_1 + 0x48)) {
operator_delete(*(void **)(param_1 + 0x48),0x1f8);
lVar1 = *(long *)(param_1 + 0x58);
*(long *)(param_1 + 0x58) = lVar1 + -8;
lVar1 = *(long *)(lVar1 + -8);
*(long *)(param_1 + 0x48) = lVar1;
*(long *)(param_1 + 0x50) = lVar1 + 0x1f8;
lVar1 = lVar1 + 0x1e0;
}
else {
lVar1 = (long)*(void **)(param_1 + 0x40) + -0x18;
}
*(long *)(param_1 + 0x40) = lVar1;
return;
}
| |
39,087 | printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool) | 666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp | void printShotResult(const std::string& result, uint64_t x, uint64_t y, bool isMaster) {
std::string player = isMaster ? "Master" : "Slave";
if (result == "miss") {
std::cout << player << ": Miss at (" << x << ", " << y << ").\n";
} else if (result == "hit") {
std::cout << player << ": Hit at (" << x << ", " << y << ").\n";
} else if (result == "hit_and_sunk") {
std::cout << player << ": Hit and sunk at (" << x << ", " << y << ").\n";
} else {
std::cout << player << ": Unknown shot result '" << result << "' at (" << x << ", " << y << ").\n";
}
} | O0 | cpp | printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %dl
leaq 0x27e4(%rip), %rcx # 0x41ccc
leaq 0x27e4(%rip), %rax # 0x41cd3
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x68(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x7650
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0xb110
jmp 0x3f51a
leaq -0x41(%rbp), %rdi
callq 0x73d0
movq -0x8(%rbp), %rdi
leaq 0x1eac(%rip), %rsi # 0x413da
callq 0xb230
movb %al, -0x69(%rbp)
jmp 0x3f538
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x3f544
jmp 0x3f609
movq 0x1ea45(%rip), %rdi # 0x5df90
leaq -0x40(%rbp), %rsi
callq 0x7350
movq %rax, -0x78(%rbp)
jmp 0x3f55a
movq -0x78(%rbp), %rdi
leaq 0x1eb5(%rip), %rsi # 0x4141a
callq 0x7380
movq %rax, -0x80(%rbp)
jmp 0x3f570
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x70a0
movq %rax, -0x88(%rbp)
jmp 0x3f586
movq -0x88(%rbp), %rdi
leaq 0x1e18(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, -0x90(%rbp)
jmp 0x3f5a2
movq -0x90(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, -0x98(%rbp)
jmp 0x3f5bb
movq -0x98(%rbp), %rdi
leaq 0x20e7(%rip), %rsi # 0x416b0
callq 0x7380
jmp 0x3f5d0
jmp 0x3f864
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x73d0
jmp 0x3f876
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7e50
jmp 0x3f876
movq -0x8(%rbp), %rdi
leaq 0x1dc2(%rip), %rsi # 0x413d6
callq 0xb230
movb %al, -0x99(%rbp)
jmp 0x3f621
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x3f630
jmp 0x3f6cd
movq 0x1e959(%rip), %rdi # 0x5df90
leaq -0x40(%rbp), %rsi
callq 0x7350
movq %rax, -0xa8(%rbp)
jmp 0x3f649
movq -0xa8(%rbp), %rdi
leaq 0x1d8e(%rip), %rsi # 0x413e5
callq 0x7380
movq %rax, -0xb0(%rbp)
jmp 0x3f665
movq -0xb0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x70a0
movq %rax, -0xb8(%rbp)
jmp 0x3f67e
movq -0xb8(%rbp), %rdi
leaq 0x1d20(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, -0xc0(%rbp)
jmp 0x3f69a
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, -0xc8(%rbp)
jmp 0x3f6b3
movq -0xc8(%rbp), %rdi
leaq 0x1fef(%rip), %rsi # 0x416b0
callq 0x7380
jmp 0x3f6c8
jmp 0x3f862
movq -0x8(%rbp), %rdi
leaq 0x1cf1(%rip), %rsi # 0x413c9
callq 0xb230
movb %al, -0xc9(%rbp)
jmp 0x3f6e5
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x3f6f4
jmp 0x3f791
movq 0x1e895(%rip), %rdi # 0x5df90
leaq -0x40(%rbp), %rsi
callq 0x7350
movq %rax, -0xd8(%rbp)
jmp 0x3f70d
movq -0xd8(%rbp), %rdi
leaq 0x25be(%rip), %rsi # 0x41cd9
callq 0x7380
movq %rax, -0xe0(%rbp)
jmp 0x3f729
movq -0xe0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x70a0
movq %rax, -0xe8(%rbp)
jmp 0x3f742
movq -0xe8(%rbp), %rdi
leaq 0x1c5c(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, -0xf0(%rbp)
jmp 0x3f75e
movq -0xf0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, -0xf8(%rbp)
jmp 0x3f777
movq -0xf8(%rbp), %rdi
leaq 0x1f2b(%rip), %rsi # 0x416b0
callq 0x7380
jmp 0x3f78c
jmp 0x3f860
movq 0x1e7f8(%rip), %rdi # 0x5df90
leaq -0x40(%rbp), %rsi
callq 0x7350
movq %rax, -0x100(%rbp)
jmp 0x3f7aa
movq -0x100(%rbp), %rdi
leaq 0x2535(%rip), %rsi # 0x41ced
callq 0x7380
movq %rax, -0x108(%rbp)
jmp 0x3f7c6
movq -0x108(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x7350
movq %rax, -0x110(%rbp)
jmp 0x3f7df
movq -0x110(%rbp), %rdi
leaq 0x2518(%rip), %rsi # 0x41d05
callq 0x7380
movq %rax, -0x118(%rbp)
jmp 0x3f7fb
movq -0x118(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x70a0
movq %rax, -0x120(%rbp)
jmp 0x3f814
movq -0x120(%rbp), %rdi
leaq 0x1b8a(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, -0x128(%rbp)
jmp 0x3f830
movq -0x128(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, -0x130(%rbp)
jmp 0x3f849
movq -0x130(%rbp), %rdi
leaq 0x1e59(%rip), %rsi # 0x416b0
callq 0x7380
jmp 0x3f85e
jmp 0x3f860
jmp 0x3f862
jmp 0x3f864
leaq -0x40(%rbp), %rdi
callq 0x7e50
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x7640
| _Z15printShotResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmb:
push rbp
mov rbp, rsp
sub rsp, 130h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
and al, 1
mov [rbp+var_19], al
mov dl, [rbp+var_19]
lea rcx, aMaster_1; "Master"
lea rax, aSlave_0; "Slave"
test dl, 1
cmovnz rax, rcx
mov [rbp+var_68], rax
lea rdi, [rbp+var_41]
mov [rbp+var_60], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_60]
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3F51A:
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_8]
lea rsi, aMiss; "miss"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_69], al
jmp short $+2
loc_3F538:
mov al, [rbp+var_69]
test al, 1
jnz short loc_3F544
jmp loc_3F609
loc_3F544:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_40]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_78], rax
jmp short $+2
loc_3F55A:
mov rdi, [rbp+var_78]
lea rsi, aMasterMissAt+6; ": Miss at ("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_80], rax
jmp short $+2
loc_3F570:
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_10]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_88], rax
jmp short $+2
loc_3F586:
mov rdi, [rbp+var_88]
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_90], rax
jmp short $+2
loc_3F5A2:
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_98], rax
jmp short $+2
loc_3F5BB:
mov rdi, [rbp+var_98]
lea rsi, aMasterExitingB+2Bh; ").\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_3F5D0:
jmp loc_3F864
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3F876
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_3F876
loc_3F609:
mov rdi, [rbp+var_8]
lea rsi, aHit; "hit"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_99], al
jmp short $+2
loc_3F621:
mov al, [rbp+var_99]
test al, 1
jnz short loc_3F630
jmp loc_3F6CD
loc_3F630:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_40]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_A8], rax
jmp short $+2
loc_3F649:
mov rdi, [rbp+var_A8]
lea rsi, aMasterHitAt+6; ": Hit at ("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_B0], rax
jmp short $+2
loc_3F665:
mov rdi, [rbp+var_B0]
mov rsi, [rbp+var_10]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_B8], rax
jmp short $+2
loc_3F67E:
mov rdi, [rbp+var_B8]
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_C0], rax
jmp short $+2
loc_3F69A:
mov rdi, [rbp+var_C0]
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_C8], rax
jmp short $+2
loc_3F6B3:
mov rdi, [rbp+var_C8]
lea rsi, aMasterExitingB+2Bh; ").\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_3F6C8:
jmp loc_3F862
loc_3F6CD:
mov rdi, [rbp+var_8]
lea rsi, aHitAndSunk; "hit_and_sunk"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_C9], al
jmp short $+2
loc_3F6E5:
mov al, [rbp+var_C9]
test al, 1
jnz short loc_3F6F4
jmp loc_3F791
loc_3F6F4:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_40]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_D8], rax
jmp short $+2
loc_3F70D:
mov rdi, [rbp+var_D8]
lea rsi, aHitAndSunkAt; ": Hit and sunk at ("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_E0], rax
jmp short $+2
loc_3F729:
mov rdi, [rbp+var_E0]
mov rsi, [rbp+var_10]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_E8], rax
jmp short $+2
loc_3F742:
mov rdi, [rbp+var_E8]
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_F0], rax
jmp short $+2
loc_3F75E:
mov rdi, [rbp+var_F0]
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_F8], rax
jmp short $+2
loc_3F777:
mov rdi, [rbp+var_F8]
lea rsi, aMasterExitingB+2Bh; ").\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_3F78C:
jmp loc_3F860
loc_3F791:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_40]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_100], rax
jmp short $+2
loc_3F7AA:
mov rdi, [rbp+var_100]
lea rsi, aUnknownShotRes; ": Unknown shot result '"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_108], rax
jmp short $+2
loc_3F7C6:
mov rdi, [rbp+var_108]
mov rsi, [rbp+var_8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_110], rax
jmp short $+2
loc_3F7DF:
mov rdi, [rbp+var_110]
lea rsi, aAt; "' at ("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_118], rax
jmp short $+2
loc_3F7FB:
mov rdi, [rbp+var_118]
mov rsi, [rbp+var_10]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_120], rax
jmp short $+2
loc_3F814:
mov rdi, [rbp+var_120]
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_128], rax
jmp short $+2
loc_3F830:
mov rdi, [rbp+var_128]
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_130], rax
jmp short $+2
loc_3F849:
mov rdi, [rbp+var_130]
lea rsi, aMasterExitingB+2Bh; ").\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_3F85E:
jmp short $+2
loc_3F860:
jmp short $+2
loc_3F862:
jmp short $+2
loc_3F864:
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 130h
pop rbp
retn
loc_3F876:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long printShotResult(long long a1, long long a2, long long a3, char a4)
{
const char *v4; // rax
long long v6; // [rsp+0h] [rbp-130h]
long long v7; // [rsp+8h] [rbp-128h]
long long v8; // [rsp+10h] [rbp-120h]
long long v9; // [rsp+18h] [rbp-118h]
long long v10; // [rsp+20h] [rbp-110h]
long long v11; // [rsp+28h] [rbp-108h]
long long v12; // [rsp+30h] [rbp-100h]
long long v13; // [rsp+38h] [rbp-F8h]
long long v14; // [rsp+40h] [rbp-F0h]
long long v15; // [rsp+48h] [rbp-E8h]
long long v16; // [rsp+50h] [rbp-E0h]
long long v17; // [rsp+58h] [rbp-D8h]
long long v18; // [rsp+68h] [rbp-C8h]
long long v19; // [rsp+70h] [rbp-C0h]
long long v20; // [rsp+78h] [rbp-B8h]
long long v21; // [rsp+80h] [rbp-B0h]
long long v22; // [rsp+88h] [rbp-A8h]
long long v23; // [rsp+98h] [rbp-98h]
long long v24; // [rsp+A0h] [rbp-90h]
long long v25; // [rsp+A8h] [rbp-88h]
long long v26; // [rsp+B0h] [rbp-80h]
long long v27; // [rsp+B8h] [rbp-78h]
long long v28; // [rsp+C8h] [rbp-68h]
char v29; // [rsp+EFh] [rbp-41h] BYREF
_QWORD v30[4]; // [rsp+F0h] [rbp-40h] BYREF
char v31; // [rsp+117h] [rbp-19h]
long long v32; // [rsp+118h] [rbp-18h]
long long v33; // [rsp+120h] [rbp-10h]
long long v34; // [rsp+128h] [rbp-8h]
v34 = a1;
v33 = a2;
v32 = a3;
v31 = a4 & 1;
v4 = "Slave";
if ( (a4 & 1) != 0 )
v4 = "Master";
v28 = (long long)v4;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v30, v28, (long long)&v29);
std::allocator<char>::~allocator(&v29);
if ( std::operator==<char>(v34, (long long)"miss") )
{
v27 = std::operator<<<char>(&std::cout, v30);
v26 = std::operator<<<std::char_traits<char>>(v27, ": Miss at (");
v25 = std::ostream::operator<<(v26, v33);
v24 = std::operator<<<std::char_traits<char>>(v25, ", ");
v23 = std::ostream::operator<<(v24, v32);
std::operator<<<std::char_traits<char>>(v23, ").\n");
}
else if ( std::operator==<char>(v34, (long long)"hit") )
{
v22 = std::operator<<<char>(&std::cout, v30);
v21 = std::operator<<<std::char_traits<char>>(v22, ": Hit at (");
v20 = std::ostream::operator<<(v21, v33);
v19 = std::operator<<<std::char_traits<char>>(v20, ", ");
v18 = std::ostream::operator<<(v19, v32);
std::operator<<<std::char_traits<char>>(v18, ").\n");
}
else if ( std::operator==<char>(v34, (long long)"hit_and_sunk") )
{
v17 = std::operator<<<char>(&std::cout, v30);
v16 = std::operator<<<std::char_traits<char>>(v17, ": Hit and sunk at (");
v15 = std::ostream::operator<<(v16, v33);
v14 = std::operator<<<std::char_traits<char>>(v15, ", ");
v13 = std::ostream::operator<<(v14, v32);
std::operator<<<std::char_traits<char>>(v13, ").\n");
}
else
{
v12 = std::operator<<<char>(&std::cout, v30);
v11 = std::operator<<<std::char_traits<char>>(v12, ": Unknown shot result '");
v10 = std::operator<<<char>(v11, v34);
v9 = std::operator<<<std::char_traits<char>>(v10, "' at (");
v8 = std::ostream::operator<<(v9, v33);
v7 = std::operator<<<std::char_traits<char>>(v8, ", ");
v6 = std::ostream::operator<<(v7, v32);
std::operator<<<std::char_traits<char>>(v6, ").\n");
}
return std::string::~string((long long)v30);
}
| printShotResult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
MOV DL,byte ptr [RBP + -0x19]
LEA RCX,[0x141ccc]
LEA RAX,[0x141cd3]
TEST DL,0x1
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[RBP + -0x41]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x00107650
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x60]
LAB_0013f50f:
LEA RDI,[RBP + -0x40]
CALL 0x0010b110
JMP 0x0013f51a
LAB_0013f51a:
LEA RDI,[RBP + -0x41]
CALL 0x001073d0
MOV RDI,qword ptr [RBP + -0x8]
LAB_0013f527:
LEA RSI,[0x1413da]
CALL 0x0010b230
MOV byte ptr [RBP + -0x69],AL
JMP 0x0013f538
LAB_0013f538:
MOV AL,byte ptr [RBP + -0x69]
TEST AL,0x1
JNZ 0x0013f544
JMP 0x0013f609
LAB_0013f544:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[RBP + -0x40]
CALL 0x00107350
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0013f55a
LAB_0013f55a:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[0x14141a]
CALL 0x00107380
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0013f570
LAB_0013f570:
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001070a0
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0013f586
LAB_0013f586:
MOV RDI,qword ptr [RBP + -0x88]
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0013f5a2
LAB_0013f5a2:
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0013f5bb
LAB_0013f5bb:
MOV RDI,qword ptr [RBP + -0x98]
LEA RSI,[0x1416b0]
CALL 0x00107380
JMP 0x0013f5d0
LAB_0013f5d0:
JMP 0x0013f864
LAB_0013f609:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1413d6]
CALL 0x0010b230
MOV byte ptr [RBP + -0x99],AL
JMP 0x0013f621
LAB_0013f621:
MOV AL,byte ptr [RBP + -0x99]
TEST AL,0x1
JNZ 0x0013f630
JMP 0x0013f6cd
LAB_0013f630:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[RBP + -0x40]
CALL 0x00107350
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0013f649
LAB_0013f649:
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[0x1413e5]
CALL 0x00107380
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0013f665
LAB_0013f665:
MOV RDI,qword ptr [RBP + -0xb0]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001070a0
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x0013f67e
LAB_0013f67e:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x0013f69a
LAB_0013f69a:
MOV RDI,qword ptr [RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0013f6b3
LAB_0013f6b3:
MOV RDI,qword ptr [RBP + -0xc8]
LEA RSI,[0x1416b0]
CALL 0x00107380
JMP 0x0013f6c8
LAB_0013f6c8:
JMP 0x0013f862
LAB_0013f6cd:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1413c9]
CALL 0x0010b230
MOV byte ptr [RBP + -0xc9],AL
JMP 0x0013f6e5
LAB_0013f6e5:
MOV AL,byte ptr [RBP + -0xc9]
TEST AL,0x1
JNZ 0x0013f6f4
JMP 0x0013f791
LAB_0013f6f4:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[RBP + -0x40]
CALL 0x00107350
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0013f70d
LAB_0013f70d:
MOV RDI,qword ptr [RBP + -0xd8]
LEA RSI,[0x141cd9]
CALL 0x00107380
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x0013f729
LAB_0013f729:
MOV RDI,qword ptr [RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001070a0
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x0013f742
LAB_0013f742:
MOV RDI,qword ptr [RBP + -0xe8]
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV qword ptr [RBP + -0xf0],RAX
JMP 0x0013f75e
LAB_0013f75e:
MOV RDI,qword ptr [RBP + -0xf0]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x0013f777
LAB_0013f777:
MOV RDI,qword ptr [RBP + -0xf8]
LEA RSI,[0x1416b0]
CALL 0x00107380
JMP 0x0013f78c
LAB_0013f78c:
JMP 0x0013f860
LAB_0013f791:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[RBP + -0x40]
CALL 0x00107350
MOV qword ptr [RBP + -0x100],RAX
JMP 0x0013f7aa
LAB_0013f7aa:
MOV RDI,qword ptr [RBP + -0x100]
LEA RSI,[0x141ced]
CALL 0x00107380
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0013f7c6
LAB_0013f7c6:
MOV RDI,qword ptr [RBP + -0x108]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00107350
MOV qword ptr [RBP + -0x110],RAX
JMP 0x0013f7df
LAB_0013f7df:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[0x141d05]
CALL 0x00107380
MOV qword ptr [RBP + -0x118],RAX
JMP 0x0013f7fb
LAB_0013f7fb:
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001070a0
MOV qword ptr [RBP + -0x120],RAX
JMP 0x0013f814
LAB_0013f814:
MOV RDI,qword ptr [RBP + -0x120]
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0013f830
LAB_0013f830:
MOV RDI,qword ptr [RBP + -0x128]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV qword ptr [RBP + -0x130],RAX
JMP 0x0013f849
LAB_0013f849:
MOV RDI,qword ptr [RBP + -0x130]
LEA RSI,[0x1416b0]
CALL 0x00107380
LAB_0013f85c:
JMP 0x0013f85e
LAB_0013f85e:
JMP 0x0013f860
LAB_0013f860:
JMP 0x0013f862
LAB_0013f862:
JMP 0x0013f864
LAB_0013f864:
LEA RDI,[RBP + -0x40]
CALL 0x00107e50
ADD RSP,0x130
POP RBP
RET
|
/* printShotResult(std::__cxx11::string const&, unsigned long, unsigned long, bool) */
void printShotResult(string *param_1,ulong param_2,ulong param_3,bool param_4)
{
bool bVar1;
char *pcVar2;
ostream *poVar3;
allocator local_49;
string local_48 [39];
int1 local_21;
ulong local_20;
ulong local_18;
string *local_10;
pcVar2 = "Slave";
if (param_4) {
pcVar2 = "Master";
}
local_21 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0013f50f to 0013f517 has its CatchHandler @ 0013f5d5 */
std::__cxx11::string::string<std::allocator<char>>(local_48,pcVar2,&local_49);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
/* try { // try from 0013f527 to 0013f85b has its CatchHandler @ 0013f5ef */
bVar1 = std::operator==(local_10,"miss");
if (bVar1) {
poVar3 = std::operator<<((ostream *)PTR_cout_0015df90,local_48);
poVar3 = std::operator<<(poVar3,": Miss at (");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_18);
poVar3 = std::operator<<(poVar3,", ");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_20);
std::operator<<(poVar3,").\n");
}
else {
bVar1 = std::operator==(local_10,"hit");
if (bVar1) {
poVar3 = std::operator<<((ostream *)PTR_cout_0015df90,local_48);
poVar3 = std::operator<<(poVar3,": Hit at (");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_18);
poVar3 = std::operator<<(poVar3,", ");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_20);
std::operator<<(poVar3,").\n");
}
else {
bVar1 = std::operator==(local_10,"hit_and_sunk");
if (bVar1) {
poVar3 = std::operator<<((ostream *)PTR_cout_0015df90,local_48);
poVar3 = std::operator<<(poVar3,": Hit and sunk at (");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_18);
poVar3 = std::operator<<(poVar3,", ");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_20);
std::operator<<(poVar3,").\n");
}
else {
poVar3 = std::operator<<((ostream *)PTR_cout_0015df90,local_48);
poVar3 = std::operator<<(poVar3,": Unknown shot result \'");
poVar3 = std::operator<<(poVar3,local_10);
poVar3 = std::operator<<(poVar3,"\' at (");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_18);
poVar3 = std::operator<<(poVar3,", ");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,local_20);
std::operator<<(poVar3,").\n");
}
}
}
std::__cxx11::string::~string(local_48);
return;
}
| |
39,088 | printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool) | 666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp | void printShotResult(const std::string& result, uint64_t x, uint64_t y, bool isMaster) {
std::string player = isMaster ? "Master" : "Slave";
if (result == "miss") {
std::cout << player << ": Miss at (" << x << ", " << y << ").\n";
} else if (result == "hit") {
std::cout << player << ": Hit at (" << x << ", " << y << ").\n";
} else if (result == "hit_and_sunk") {
std::cout << player << ": Hit and sunk at (" << x << ", " << y << ").\n";
} else {
std::cout << player << ": Unknown shot result '" << result << "' at (" << x << ", " << y << ").\n";
}
} | O2 | cpp | printShotResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long, bool):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x25c2(%rip), %rax # 0x18c4a
leaq 0x25c2(%rip), %rsi # 0x18c51
testl %ecx, %ecx
cmovneq %rax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6a32
leaq 0x1cad(%rip), %rsi # 0x18358
movq %r15, %rdi
callq 0x6a6d
testb %al, %al
je 0x166d4
movq 0xe8da(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5330
leaq 0x1cc9(%rip), %rsi # 0x18398
jmp 0x16760
leaq 0x1c79(%rip), %rsi # 0x18354
movq %r15, %rdi
callq 0x6a6d
testb %al, %al
je 0x16701
movq 0xe8aa(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5330
leaq 0x1c64(%rip), %rsi # 0x18363
jmp 0x16760
leaq 0x1c3f(%rip), %rsi # 0x18347
movq %r15, %rdi
callq 0x6a6d
testb %al, %al
je 0x1672e
movq 0xe87d(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5330
leaq 0x252b(%rip), %rsi # 0x18c57
jmp 0x16760
movq 0xe863(%rip), %rdi # 0x24f98
leaq 0x10(%rsp), %rsi
callq 0x5330
leaq 0x2525(%rip), %rsi # 0x18c6b
movq %rax, %rdi
callq 0x5360
movq %rax, %rdi
movq %r15, %rsi
callq 0x5330
leaq 0x2523(%rip), %rsi # 0x18c83
movq %rax, %rdi
callq 0x5360
movq %rax, %rdi
movq %r14, %rsi
callq 0x5270
leaq 0x1bb0(%rip), %rsi # 0x1832a
movq %rax, %rdi
callq 0x5360
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5270
leaq 0x1e9a(%rip), %rsi # 0x1862e
movq %rax, %rdi
callq 0x5360
leaq 0x10(%rsp), %rdi
callq 0x5ac8
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5ac8
movq %rbx, %rdi
callq 0x55b0
| _Z15printShotResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmmb:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rax, aMaster_1; "Master"
lea rsi, aSlave_0; "Slave"
test ecx, ecx
cmovnz rsi, rax
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aMiss; "miss"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_166D4
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aMasterMissAt+6; ": Miss at ("
jmp loc_16760
loc_166D4:
lea rsi, aHit; "hit"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_16701
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aMasterHitAt+6; ": Hit at ("
jmp short loc_16760
loc_16701:
lea rsi, aHitAndSunk; "hit_and_sunk"
mov rdi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_1672E
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aHitAndSunkAt; ": Hit and sunk at ("
jmp short loc_16760
loc_1672E:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rsp+48h+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aUnknownShotRes; ": Unknown shot result '"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aAt; "' at ("
loc_16760:
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_1832A; ", "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aMasterExitingB+2Bh; ").\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+48h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long printShotResult(long long a1, long long a2, long long a3, int a4)
{
char *v6; // rsi
long long v7; // rax
char *v8; // rsi
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long result; // rax
_QWORD v16[7]; // [rsp+10h] [rbp-38h] BYREF
v6 = "Slave";
if ( a4 )
v6 = "Master";
std::string::basic_string<std::allocator<char>>(v16, v6);
if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Miss at (";
}
else if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Hit at (";
}
else if ( std::operator==<char>(a1) )
{
v7 = std::operator<<<char>(&std::cout, v16);
v8 = ": Hit and sunk at (";
}
else
{
v9 = std::operator<<<char>(&std::cout, v16);
v10 = std::operator<<<std::char_traits<char>>(v9, ": Unknown shot result '");
v7 = std::operator<<<char>(v10, a1);
v8 = "' at (";
}
v11 = std::operator<<<std::char_traits<char>>(v7, v8);
v12 = std::ostream::_M_insert<unsigned long>(v11, a2);
v13 = std::operator<<<std::char_traits<char>>(v12, ", ");
v14 = std::ostream::_M_insert<unsigned long>(v13, a3);
result = std::operator<<<std::char_traits<char>>(v14, ").\n");
std::string::~string();
return result;
}
| printShotResult:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[0x118c4a]
LEA RSI,[0x118c51]
TEST ECX,ECX
CMOVNZ RSI,RAX
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00106a32
LEA RSI,[0x118358]
MOV RDI,R15
CALL 0x00106a6d
TEST AL,AL
JZ 0x001166d4
LAB_001166b7:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105330
LEA RSI,[0x118398]
JMP 0x00116760
LAB_001166d4:
LEA RSI,[0x118354]
MOV RDI,R15
CALL 0x00106a6d
TEST AL,AL
JZ 0x00116701
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105330
LEA RSI,[0x118363]
JMP 0x00116760
LAB_00116701:
LEA RSI,[0x118347]
MOV RDI,R15
CALL 0x00106a6d
TEST AL,AL
JZ 0x0011672e
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105330
LEA RSI,[0x118c57]
JMP 0x00116760
LAB_0011672e:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[RSP + 0x10]
CALL 0x00105330
LEA RSI,[0x118c6b]
MOV RDI,RAX
CALL 0x00105360
MOV RDI,RAX
MOV RSI,R15
CALL 0x00105330
LEA RSI,[0x118c83]
LAB_00116760:
MOV RDI,RAX
CALL 0x00105360
MOV RDI,RAX
MOV RSI,R14
CALL 0x00105270
LEA RSI,[0x11832a]
MOV RDI,RAX
CALL 0x00105360
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00105270
LEA RSI,[0x11862e]
MOV RDI,RAX
CALL 0x00105360
LAB_0011679c:
LEA RDI,[RSP + 0x10]
CALL 0x00105ac8
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* printShotResult(std::__cxx11::string const&, unsigned long, unsigned long, bool) */
void printShotResult(string *param_1,ulong param_2,ulong param_3,bool param_4)
{
bool bVar1;
ostream *poVar2;
int3 in_register_00000009;
char *pcVar3;
allocator local_39;
string local_38 [32];
pcVar3 = "Slave";
if (CONCAT31(in_register_00000009,param_4) != 0) {
pcVar3 = "Master";
}
std::__cxx11::string::string<std::allocator<char>>(local_38,pcVar3,&local_39);
bVar1 = std::operator==(param_1,"miss");
if (bVar1) {
/* try { // try from 001166b7 to 0011679b has its CatchHandler @ 001167b0 */
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Miss at (";
}
else {
bVar1 = std::operator==(param_1,"hit");
if (bVar1) {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Hit at (";
}
else {
bVar1 = std::operator==(param_1,"hit_and_sunk");
if (bVar1) {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
pcVar3 = ": Hit and sunk at (";
}
else {
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,local_38);
poVar2 = std::operator<<(poVar2,": Unknown shot result \'");
poVar2 = std::operator<<(poVar2,param_1);
pcVar3 = "\' at (";
}
}
}
poVar2 = std::operator<<(poVar2,pcVar3);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,", ");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::operator<<(poVar2,").\n");
std::__cxx11::string::~string(local_38);
return;
}
| |
39,089 | mysql_stmt_more_results@libmariadbclient_18 | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt)
{
/* MDEV 4604: Server doesn't set MORE_RESULT flag for
OutParam result set, so we need to check
for SERVER_MORE_RESULTS_EXIST and for
SERVER_PS_OUT_PARAMS)
*/
return (stmt &&
stmt->mysql &&
((stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) ||
(stmt->mysql->server_status & SERVER_PS_OUT_PARAMS)));
} | O0 | c | mysql_stmt_more_results@libmariadbclient_18:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x9(%rbp)
je 0x39631
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x38(%rcx)
movb %al, -0x9(%rbp)
je 0x39631
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %ecx
andl $0x8, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0xa(%rbp)
jne 0x3962b
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %eax
andl $0x1000, %eax # imm = 0x1000
cmpl $0x0, %eax
setne %al
movb %al, -0xa(%rbp)
movb -0xa(%rbp), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopl (%rax,%rax)
| mysql_stmt_more_results@libmariadbclient_18:
push rbp; Alternative name is 'mysql_stmt_more_results'
mov rbp, rsp
mov [rbp+var_8], rdi
xor eax, eax
cmp [rbp+var_8], 0
mov [rbp+var_9], al
jz short loc_39631
mov rcx, [rbp+var_8]
xor eax, eax
cmp qword ptr [rcx+38h], 0
mov [rbp+var_9], al
jz short loc_39631
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov ecx, [rax+380h]
and ecx, 8
mov al, 1
cmp ecx, 0
mov [rbp+var_A], al
jnz short loc_3962B
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov eax, [rax+380h]
and eax, 1000h
cmp eax, 0
setnz al
mov [rbp+var_A], al
loc_3962B:
mov al, [rbp+var_A]
mov [rbp+var_9], al
loc_39631:
mov al, [rbp+var_9]
and al, 1
movzx eax, al
pop rbp
retn
| _BOOL8 mysql_stmt_more_results_libmariadbclient_18(long long a1)
{
bool v2; // [rsp+0h] [rbp-Ah]
bool v3; // [rsp+1h] [rbp-9h]
v3 = 0;
if ( a1 )
{
v3 = 0;
if ( *(_QWORD *)(a1 + 56) )
{
v2 = 1;
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 8) == 0 )
return (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 0x1000) != 0;
return v2;
}
}
return v3;
}
| mysql_stmt_more_results:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
XOR EAX,EAX
CMP qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP + -0x9],AL
JZ 0x00139631
MOV RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP qword ptr [RCX + 0x38],0x0
MOV byte ptr [RBP + -0x9],AL
JZ 0x00139631
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x380]
AND ECX,0x8
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0xa],AL
JNZ 0x0013962b
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x1000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xa],AL
LAB_0013962b:
MOV AL,byte ptr [RBP + -0xa]
MOV byte ptr [RBP + -0x9],AL
LAB_00139631:
MOV AL,byte ptr [RBP + -0x9]
AND AL,0x1
MOVZX EAX,AL
POP RBP
RET
|
bool mysql_stmt_more_results(long param_1)
{
int1 local_12;
int1 local_11;
local_11 = false;
if ((param_1 != 0) && (local_11 = false, *(long *)(param_1 + 0x38) != 0)) {
local_12 = true;
if ((*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 8) == 0) {
local_12 = (*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 0x1000) != 0;
}
local_11 = local_12;
}
return local_11;
}
| |
39,090 | mysql_stmt_more_results@libmariadbclient_18 | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt)
{
/* MDEV 4604: Server doesn't set MORE_RESULT flag for
OutParam result set, so we need to check
for SERVER_MORE_RESULTS_EXIST and for
SERVER_PS_OUT_PARAMS)
*/
return (stmt &&
stmt->mysql &&
((stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) ||
(stmt->mysql->server_status & SERVER_PS_OUT_PARAMS)));
} | O3 | c | mysql_stmt_more_results@libmariadbclient_18:
testq %rdi, %rdi
je 0x2aada
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x2aada
pushq %rbp
movq %rsp, %rbp
movl 0x380(%rax), %ecx
movb $0x1, %al
testb $0x8, %cl
jne 0x2aad8
shrl $0xc, %ecx
andb $0x1, %cl
movl %ecx, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| mysql_stmt_more_results@libmariadbclient_18:
test rdi, rdi; Alternative name is 'mysql_stmt_more_results'
jz short loc_2AADA
mov rax, [rdi+38h]
test rax, rax
jz short loc_2AADA
push rbp
mov rbp, rsp
mov ecx, [rax+380h]
mov al, 1
test cl, 8
jnz short loc_2AAD8
shr ecx, 0Ch
and cl, 1
mov eax, ecx
loc_2AAD8:
pop rbp
retn
loc_2AADA:
xor eax, eax
retn
| bool mysql_stmt_more_results_libmariadbclient_18(long long a1)
{
long long v1; // rax
int v2; // ecx
bool result; // al
if ( !a1 )
return 0;
v1 = *(_QWORD *)(a1 + 56);
if ( !v1 )
return 0;
v2 = *(_DWORD *)(v1 + 896);
result = 1;
if ( (v2 & 8) == 0 )
return (v2 & 0x1000) != 0;
return result;
}
| mysql_stmt_more_results:
TEST RDI,RDI
JZ 0x0012aada
MOV RAX,qword ptr [RDI + 0x38]
TEST RAX,RAX
JZ 0x0012aada
PUSH RBP
MOV RBP,RSP
MOV ECX,dword ptr [RAX + 0x380]
MOV AL,0x1
TEST CL,0x8
JNZ 0x0012aad8
SHR ECX,0xc
AND CL,0x1
MOV EAX,ECX
LAB_0012aad8:
POP RBP
RET
LAB_0012aada:
XOR EAX,EAX
RET
|
ulong mysql_stmt_more_results(long param_1)
{
long lVar1;
ulong uVar2;
if ((param_1 != 0) && (lVar1 = *(long *)(param_1 + 0x38), lVar1 != 0)) {
uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),1);
if ((*(uint *)(lVar1 + 0x380) & 8) == 0) {
uVar2 = (ulong)(*(uint *)(lVar1 + 0x380) >> 0xc) & 0xffffffffffffff01;
}
return uVar2;
}
return 0;
}
| |
39,091 | minja::Parser::parseValueExpression()::'lambda'()::operator()() const | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
} | O3 | cpp | minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x689e9
movq 0x825bd(%rip), %rcx # 0xeaf98
cmpb $0x0, (%rcx)
je 0x689e5
incl 0x8(%rax)
jmp 0x689e9
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x69458
movq 0x40(%rsp), %r8
testq %r8, %r8
je 0x68a62
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
callq 0x6c52a
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x68a43
callq 0x309ec
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x68a52
callq 0x309ec
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x83697(%rip), %rax # 0xec100
movb (%rax), %al
testb %al, %al
je 0x68c69
leaq 0x83666(%rip), %rdx # 0xec0e0
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x63004
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x68aab
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x196d0
testq %r15, %r15
je 0x68b91
leaq 0x90(%rsp), %r14
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x31156
movq %r14, %rdi
movl $0x1, %esi
callq 0x31156
leaq 0x8(%rsp), %rdi
movq %r15, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x73282
movaps (%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movups %xmm0, (%rbx)
movq %rax, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x31156
movq %r14, %rdi
callq 0x364a4
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x68b4e
callq 0x309ec
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x68b5d
callq 0x309ec
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x68b6c
callq 0x309ec
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x68a34
movq 0x82417(%rip), %rax # 0xeaf98
cmpb $0x0, (%rax)
je 0x68bb9
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x68bc3
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x6365c
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x68bd7
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x68a34
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x68a34
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x68a34
movq %rsp, %rdi
movq %r14, %rsi
callq 0x697f2
movq (%rsp), %rax
testq %rax, %rax
je 0x68bf9
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x68c51
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x69d5e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x68c1e
movq %rax, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x68c42
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a39c
cmpq $0x0, (%rbx)
je 0x68cc0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x68c42
callq 0x309ec
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x68c51
callq 0x309ec
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x68a34
callq 0x309ec
jmp 0x68a34
leaq 0x83490(%rip), %rdi # 0xec100
callq 0x19c50
testl %eax, %eax
je 0x68a73
leaq 0x8345c(%rip), %rdi # 0xec0e0
leaq 0x51bb4(%rip), %rsi # 0xba83f
movl $0x10, %edx
callq 0x22b2a
leaq -0x4610a(%rip), %rdi # 0x22b92
leaq 0x8343d(%rip), %rsi # 0xec0e0
leaq 0x82a2e(%rip), %rdx # 0xeb6d8
callq 0x19600
leaq 0x8344a(%rip), %rdi # 0xec100
callq 0x19460
jmp 0x68a73
movl $0x10, %edi
callq 0x19370
movq %rax, %r15
leaq 0x51b72(%rip), %rsi # 0xba846
movq %rax, %rdi
callq 0x19280
movq 0x8230d(%rip), %rsi # 0xeaff0
movq 0x82286(%rip), %rdx # 0xeaf70
movq %r15, %rdi
callq 0x19ba0
movq %rax, %r14
leaq 0x83404(%rip), %rdi # 0xec100
callq 0x19450
jmp 0x68d75
movq %rax, %r14
jmp 0x68d13
movq %rax, %r14
movq %r15, %rdi
callq 0x19510
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x68d26
callq 0x309ec
jmp 0x68d26
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x68d3a
callq 0x309ec
jmp 0x68d3a
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x68d4e
callq 0x309ec
jmp 0x68d4e
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x68d75
callq 0x309ec
jmp 0x68d75
jmp 0x68d72
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x65844
jmp 0x68d75
jmp 0x68d72
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x68d89
callq 0x309ec
jmp 0x68d89
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x68d98
callq 0x309ec
movq %r14, %rdi
callq 0x19c00
| _ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov r14, [rsi]
mov rax, [r14]
mov [rsp+0B8h+var_90], rax
mov rax, [r14+8]
mov [rsp+0B8h+var_88], rax
test rax, rax
jz short loc_689E9
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_689E5
inc dword ptr [rax+8]
jmp short loc_689E9
loc_689E5:
lock inc dword ptr [rax+8]
loc_689E9:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+0B8h+var_80], rax
lea rdi, [rsp+0B8h+var_78]; this
mov rsi, r14
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov r8, [rsp+0B8h+var_78]
test r8, r8
jz short loc_68A62
lea rdi, [rsp+0B8h+var_68+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+0B8h+var_68]
mov rdx, rsp
lea rcx, [rsp+0B8h+var_90]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIS5_EJRNS4_8LocationERNS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value &>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::LiteralExpr>>,minja::Location &,minja::Value &)
movaps xmm0, [rsp+0B8h+var_68]
movups xmmword ptr [rbx], xmm0
loc_68A34:
mov rdi, [rsp+0B8h+var_70]
test rdi, rdi
jz short loc_68A43
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68A43:
mov rdi, [rsp+0B8h+var_88]
test rdi, rdi
jz short loc_68A52
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68A52:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
loc_68A62:
lea rax, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
mov al, [rax]
test al, al
jz loc_68C69
loc_68A73:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rdi, [rsp+0B8h+var_68]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+0B8h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_68AAB
mov rsi, [rsp+0B8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68AAB:
test r15, r15
jz loc_68B91
lea r14, [rsp+0B8h+var_28]
xor r15d, r15d
mov [r14+8], r15
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
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)
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)
lea rdi, [rsp+0B8h+var_B0]
mov [rdi-8], r15
mov rsi, rsp
lea rdx, [rsp+0B8h+var_A0]
lea rcx, [rsp+0B8h+var_90]
lea r8, [rsp+0B8h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIS5_EJRNS4_8LocationENS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::LiteralExpr>>,minja::Location &,minja::Value &&)
movaps xmm0, xmmword ptr [rsp]
xor eax, eax
mov [rsp+0B8h+var_B0], rax
movups xmmword ptr [rbx], xmm0
mov [rsp+0B8h+var_B8], rax
mov rdi, r14
xor esi, esi
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)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0B8h+var_30]
test rdi, rdi
jz short loc_68B4E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68B4E:
mov rdi, [rsp+0B8h+var_40]
test rdi, rdi
jz short loc_68B5D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68B5D:
mov rdi, [rsp+0B8h+var_50]
test rdi, rdi
jz short loc_68B6C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68B6C:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz loc_68A34
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_68BB9
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_68BC3
loc_68B91:
lea rdi, [rsp+0B8h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, qword ptr [rsp+0B8h+var_68]
test rax, rax
jz short loc_68BD7
mov [rbx], rax
mov rax, qword ptr [rsp+0B8h+var_68+8]
mov [rbx+8], rax
jmp loc_68A34
loc_68BB9:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_68BC3:
cmp eax, 1
jnz loc_68A34
mov rax, [rdi]
call qword ptr [rax+18h]
jmp loc_68A34
loc_68BD7:
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0B8h+var_B8]
test rax, rax
jz short loc_68BF9
mov [rbx], rax
mov rax, [rsp+0B8h+var_B0]
mov [rbx+8], rax
jmp short loc_68C51
loc_68BF9:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_68C1E
mov [rbx], rax
mov rax, [rsp+0B8h+var_98]
mov [rbx+8], rax
jmp short loc_68C42
loc_68C1E:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [rbx], 0
jz loc_68CC0
mov rdi, [rsp+0B8h+var_98]
test rdi, rdi
jz short loc_68C42
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68C42:
mov rdi, [rsp+0B8h+var_B0]
test rdi, rdi
jz short loc_68C51
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68C51:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz loc_68A34
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_68A34
loc_68C69:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_68A73
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_68A73
loc_68CC0:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedValueE; "Expected value expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_68D75
mov r14, rax
jmp short loc_68D13
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_68D13:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_68D26
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_68D26
mov r14, rax
loc_68D26:
mov rdi, [rsp+0B8h+var_98]
test rdi, rdi
jz short loc_68D3A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_68D3A
mov r14, rax
loc_68D3A:
mov rdi, [rsp+0B8h+var_B0]
test rdi, rdi
jz short loc_68D4E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_68D4E
mov r14, rax
loc_68D4E:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz short loc_68D75
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_68D75
jmp short loc_68D72
mov r14, rax
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_68D75
jmp short $+2
loc_68D72:
mov r14, rax
loc_68D75:
mov rdi, [rsp+0B8h+var_70]
test rdi, rdi
jz short loc_68D89
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_68D89
mov r14, rax
loc_68D89:
mov rdi, [rsp+0B8h+var_88]
test rdi, rdi
jz short loc_68D98
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_68D98:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
long long **a2)
{
long long *v3; // r14
volatile signed __int32 *v4; // rax
long long v6; // r15
__int128 v7; // xmm0
long long v8; // rdi
signed __int32 v9; // eax
std::runtime_error *exception; // r15
__int128 v11; // [rsp+0h] [rbp-B8h] BYREF
long long v12; // [rsp+18h] [rbp-A0h] BYREF
volatile signed __int32 *v13; // [rsp+20h] [rbp-98h]
long long v14; // [rsp+28h] [rbp-90h] BYREF
volatile signed __int32 *v15; // [rsp+30h] [rbp-88h]
long long v16; // [rsp+38h] [rbp-80h]
long long v17; // [rsp+40h] [rbp-78h] BYREF
volatile signed __int32 *v18; // [rsp+48h] [rbp-70h]
__int128 v19; // [rsp+50h] [rbp-68h] BYREF
__int128 v20; // [rsp+60h] [rbp-58h] BYREF
__int128 v21; // [rsp+70h] [rbp-48h]
__int128 v22; // [rsp+80h] [rbp-38h]
char v23[8]; // [rsp+90h] [rbp-28h] BYREF
long long v24; // [rsp+98h] [rbp-20h]
v3 = *a2;
v14 = **a2;
v4 = (volatile signed __int32 *)v3[1];
v15 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v16 = v3[4] - v3[2];
minja::Parser::parseConstant((minja::Parser *)&v17);
if ( v17 )
{
*(_QWORD *)&v19 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value &>(
(char *)&v19 + 8,
&v19,
&v11,
&v14);
*(_OWORD *)this = v19;
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
(long long)"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)&v19,
(long long)v3,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v6 = *((_QWORD *)&v19 + 1);
if ( (__int128 *)v19 != &v20 )
operator delete((void *)v19, v20 + 1);
if ( v6 )
{
v24 = 0LL;
v19 = 0LL;
v20 = 0LL;
v21 = 0LL;
v22 = 0LL;
v23[0] = 0;
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(v23);
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(v23);
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value>(
(char *)&v11 + 8,
&v11,
&v12,
&v14,
&v19);
v7 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v11 = 0LL;
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(v23);
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>::data::~data(v23);
if ( *((_QWORD *)&v22 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v22 + 1));
if ( *((_QWORD *)&v21 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v21 + 1));
if ( *((_QWORD *)&v20 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v20 + 1));
v8 = *((_QWORD *)&v19 + 1);
if ( *((_QWORD *)&v19 + 1) )
{
if ( _libc_single_threaded )
{
v9 = *(_DWORD *)(*((_QWORD *)&v19 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v19 + 1) + 12LL) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v19 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
else
{
minja::Parser::parseIdentifier((minja::Parser *)&v19, v3);
if ( (_QWORD)v19 )
{
*(_OWORD *)this = v19;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v11);
if ( (_QWORD)v11 )
{
*(_OWORD *)this = v11;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v12);
if ( v12 )
{
*(_QWORD *)this = v12;
*((_QWORD *)this + 1) = v13;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
}
if ( *((_QWORD *)&v11 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1));
}
if ( *((_QWORD *)&v19 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v19 + 1));
}
}
}
if ( v18 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
return this;
}
| operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x001689e9
MOV RCX,qword ptr [0x001eaf98]
CMP byte ptr [RCX],0x0
JZ 0x001689e5
INC dword ptr [RAX + 0x8]
JMP 0x001689e9
LAB_001689e5:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001689e9:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x38],RAX
LAB_001689f6:
LEA RDI,[RSP + 0x40]
MOV RSI,R14
CALL 0x00169458
MOV R8,qword ptr [RSP + 0x40]
TEST R8,R8
JZ 0x00168a62
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + -0x8],0x0
LAB_00168a1a:
LEA RSI,[RSP + 0x50]
MOV RDX,RSP
LEA RCX,[RSP + 0x28]
CALL 0x0016c52a
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RBX],XMM0
LAB_00168a34:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00168a43
CALL 0x001309ec
LAB_00168a43:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00168a52
CALL 0x001309ec
LAB_00168a52:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
LAB_00168a62:
LEA RAX,[0x1ec100]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00168c69
LAB_00168a73:
LEA RDX,[0x1ec0e0]
LEA RDI,[RSP + 0x50]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00163004
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00168aab
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001196d0
LAB_00168aab:
TEST R15,R15
JZ 0x00168b91
LEA R14,[RSP + 0x90]
XOR R15D,R15D
MOV qword ptr [R14 + 0x8],R15
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00131156
MOV RDI,R14
MOV ESI,0x1
CALL 0x00131156
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + -0x8],R15
LAB_00168b01:
MOV RSI,RSP
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x28]
LEA R8,[RSP + 0x50]
CALL 0x00173282
MOVAPS XMM0,xmmword ptr [RSP]
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00131156
MOV RDI,R14
CALL 0x001364a4
MOV RDI,qword ptr [RSP + 0x88]
TEST RDI,RDI
JZ 0x00168b4e
CALL 0x001309ec
LAB_00168b4e:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x00168b5d
CALL 0x001309ec
LAB_00168b5d:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x00168b6c
CALL 0x001309ec
LAB_00168b6c:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00168a34
MOV RAX,qword ptr [0x001eaf98]
CMP byte ptr [RAX],0x0
JZ 0x00168bb9
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00168bc3
LAB_00168b91:
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x0016365c
LAB_00168b9e:
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x00168bd7
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00168a34
LAB_00168bb9:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00168bc3:
CMP EAX,0x1
JNZ 0x00168a34
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
JMP 0x00168a34
LAB_00168bd7:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001697f2
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00168bf9
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00168c51
LAB_00168bf9:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x00169d5e
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00168c1e
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00168c42
LAB_00168c1e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016a39c
CMP qword ptr [RBX],0x0
JZ 0x00168cc0
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00168c42
CALL 0x001309ec
LAB_00168c42:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00168c51
CALL 0x001309ec
LAB_00168c51:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00168a34
CALL 0x001309ec
JMP 0x00168a34
LAB_00168c69:
LEA RDI,[0x1ec100]
CALL 0x00119c50
TEST EAX,EAX
JZ 0x00168a73
LAB_00168c7d:
LEA RDI,[0x1ec0e0]
LEA RSI,[0x1ba83f]
MOV EDX,0x10
CALL 0x00122b2a
LAB_00168c95:
LEA RDI,[0x122b92]
LEA RSI,[0x1ec0e0]
LEA RDX,[0x1eb6d8]
CALL 0x00119600
LEA RDI,[0x1ec100]
CALL 0x00119460
JMP 0x00168a73
LAB_00168cc0:
MOV EDI,0x10
CALL 0x00119370
MOV R15,RAX
LAB_00168ccd:
LEA RSI,[0x1ba846]
MOV RDI,RAX
CALL 0x00119280
LAB_00168cdc:
MOV RSI,qword ptr [0x001eaff0]
MOV RDX,qword ptr [0x001eaf70]
MOV RDI,R15
CALL 0x00119ba0
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
int iVar3;
runtime_error *this_00;
long *in_RSI;
bool bVar4;
long local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *ap_Stack_b0 [2];
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
int8 local_90;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_88;
long local_80;
long local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_60;
long local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
puVar2 = (int8 *)*in_RSI;
local_90 = *puVar2;
local_88 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)puVar2[1];
if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001eaf98 == '\0') {
LOCK();
*(int *)(local_88 + 8) = *(int *)(local_88 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_88 + 8) = *(int *)(local_88 + 8) + 1;
}
}
local_80 = puVar2[4] - puVar2[2];
/* try { // try from 001689f6 to 00168a02 has its CatchHandler @ 00168d86 */
parseConstant();
if (local_78 == 0) {
if (operator()()::null_regex_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00168c7d to 00168c94 has its CatchHandler @ 00168cf2 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
}
/* try { // try from 00168a73 to 00168a8b has its CatchHandler @ 00168d70 */
consumeToken(&local_68,puVar2,operator()()::null_regex_abi_cxx11_,1);
p_Var1 = p_Stack_60;
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 00168b91 to 00168b9d has its CatchHandler @ 00168d5f */
parseIdentifier();
if (local_68 == (long *)0x0) {
/* try { // try from 00168bd7 to 00168be1 has its CatchHandler @ 00168d4b */
parseBracedExpressionOrArray();
if (local_b8 == 0) {
/* try { // try from 00168bf9 to 00168c05 has its CatchHandler @ 00168d37 */
parseArray();
if (local_a0 == 0) {
/* try { // try from 00168c1e to 00168c28 has its CatchHandler @ 00168d23 */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00168ccd to 00168cdb has its CatchHandler @ 00168d08 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 00168cdc to 00168cf1 has its CatchHandler @ 00168d03 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70);
}
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
}
else {
*(long *)this = local_a0;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = local_98;
}
if (ap_Stack_b0[0] != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(ap_Stack_b0[0]);
}
}
else {
*(long *)this = local_b8;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = ap_Stack_b0[0];
}
if (p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_60);
}
}
else {
*(long **)this = local_68;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Stack_60;
}
}
else {
local_20 = 0;
local_68 = (long *)0x0;
p_Stack_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
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>
::assert_invariant(bVar4);
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>
::assert_invariant(bVar4);
local_b8 = 0;
/* try { // try from 00168b01 to 00168b17 has its CatchHandler @ 00168d61 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location&,minja::Value>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)ap_Stack_b0,&local_b8,&local_a0,
&local_90,&local_68);
p_Var1 = ap_Stack_b0[0];
ap_Stack_b0[0] = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(long *)this = local_b8;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Var1;
local_b8 = 0;
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>
::assert_invariant(bVar4);
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>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001eaf98 == '\0') {
LOCK();
p_Var1 = p_Stack_60 + 0xc;
iVar3 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)(p_Stack_60 + 0xc);
*(int *)(p_Stack_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*(long *)p_Stack_60 + 0x18))();
}
}
}
}
else {
local_68 = (long *)0x0;
/* try { // try from 00168a1a to 00168a2b has its CatchHandler @ 00168d72 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location&,minja::Value&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_60,&local_68,&local_b8,
&local_90);
*(long **)this = local_68;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Stack_60;
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_88);
}
return this;
}
| |
39,092 | list_cons | eloqsql/mysys/list.c | LIST *list_cons(void *data, LIST *list)
{
LIST *new_charset=(LIST*) my_malloc(key_memory_LIST, sizeof(LIST),MYF(MY_FAE));
if (!new_charset)
return 0;
new_charset->data=data;
return list_add(list,new_charset);
} | O3 | c | list_cons:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb7b1a5(%rip), %rax # 0xc147cc
movl (%rax), %edi
movl $0x18, %esi
movl $0x8, %edx
callq 0xa6f99
testq %rax, %rax
je 0x9966c
movq %r14, 0x10(%rax)
testq %rbx, %rbx
je 0x99657
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x99660
movq %rax, 0x8(%rcx)
movq (%rbx), %rcx
jmp 0x99662
movq $0x0, (%rax)
jmp 0x99668
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rax, (%rbx)
movq %rbx, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| list_cons:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
lea rax, key_memory_LIST
mov edi, [rax]
mov esi, 18h
mov edx, 8
call my_malloc
test rax, rax
jz short loc_9966C
mov [rax+10h], r14
test rbx, rbx
jz short loc_99657
mov rcx, [rbx]
test rcx, rcx
jz short loc_99660
mov [rcx+8], rax
mov rcx, [rbx]
jmp short loc_99662
loc_99657:
mov qword ptr [rax], 0
jmp short loc_99668
loc_99660:
xor ecx, ecx
loc_99662:
mov [rax], rcx
mov [rbx], rax
loc_99668:
mov [rax+8], rbx
loc_9966C:
pop rbx
pop r14
pop rbp
retn
| _QWORD * list_cons(long long a1, long long *a2)
{
_QWORD *result; // rax
long long v3; // rcx
result = (_QWORD *)my_malloc(key_memory_LIST, 24LL, 8LL);
if ( result )
{
result[2] = a1;
if ( a2 )
{
if ( *a2 )
{
*(_QWORD *)(*a2 + 8) = result;
v3 = *a2;
}
else
{
v3 = 0LL;
}
*result = v3;
*a2 = (long long)result;
}
else
{
*result = 0LL;
}
result[1] = a2;
}
return result;
}
| list_cons:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0xd147cc]
MOV EDI,dword ptr [RAX]
MOV ESI,0x18
MOV EDX,0x8
CALL 0x001a6f99
TEST RAX,RAX
JZ 0x0019966c
MOV qword ptr [RAX + 0x10],R14
TEST RBX,RBX
JZ 0x00199657
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x00199660
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RBX]
JMP 0x00199662
LAB_00199657:
MOV qword ptr [RAX],0x0
JMP 0x00199668
LAB_00199660:
XOR ECX,ECX
LAB_00199662:
MOV qword ptr [RAX],RCX
MOV qword ptr [RBX],RAX
LAB_00199668:
MOV qword ptr [RAX + 0x8],RBX
LAB_0019966c:
POP RBX
POP R14
POP RBP
RET
|
void list_cons(long param_1,long *param_2)
{
long *plVar1;
long lVar2;
plVar1 = (long *)my_malloc(key_memory_LIST,0x18,8);
if (plVar1 != (long *)0x0) {
plVar1[2] = param_1;
if (param_2 == (long *)0x0) {
*plVar1 = 0;
}
else {
if (*param_2 == 0) {
lVar2 = 0;
}
else {
*(long **)(*param_2 + 8) = plVar1;
lVar2 = *param_2;
}
*plVar1 = lVar2;
*param_2 = (long)plVar1;
}
plVar1[1] = (long)param_2;
}
return;
}
| |
39,093 | intern_filename | eloqsql/mysys/mf_pack.c | char *intern_filename(char *to, const char *from)
{
size_t length, to_length;
char buff[FN_REFLEN + 1];
if (from == to)
{ /* Dirname may destroy from */
(void) strnmov(buff, from, FN_REFLEN);
from=buff;
}
length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */
(void) strnmov(to + to_length, from + length, FN_REFLEN - to_length);
return (to);
} | O3 | c | intern_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
cmpq %rdi, %rsi
jne 0x9b14b
leaq -0x230(%rbp), %r15
movl $0x200, %edx # imm = 0x200
movq %r15, %rdi
movq %r14, %rsi
callq 0xd71e0
movq %r15, %r14
leaq -0x238(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x94901
movq (%r15), %rcx
leaq (%rbx,%rcx), %rdi
addq %rax, %r14
movl $0x200, %edx # imm = 0x200
subq %rcx, %rdx
movq %r14, %rsi
callq 0xd71e0
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x9b19a
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| intern_filename:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 228h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
cmp rsi, rdi
jnz short loc_9B14B
lea r15, [rbp+var_230]
mov edx, 200h
mov rdi, r15
mov rsi, r14
call strnmov
mov r14, r15
loc_9B14B:
lea r15, [rbp+var_238]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call dirname_part
mov rcx, [r15]
lea rdi, [rbx+rcx]
add r14, rax
mov edx, 200h
sub rdx, rcx
mov rsi, r14
call strnmov
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_9B19A
mov rax, rbx
add rsp, 228h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9B19A:
call ___stack_chk_fail
| long long intern_filename(long long a1, _BYTE *a2)
{
_BYTE *v2; // r14
long long v3; // rax
long long v5; // [rsp+8h] [rbp-238h] BYREF
_BYTE v6[528]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v7; // [rsp+220h] [rbp-20h]
v2 = a2;
v7 = __readfsqword(0x28u);
if ( a2 == (_BYTE *)a1 )
{
strnmov(v6, a2, 512LL);
v2 = v6;
}
v3 = dirname_part(a1, v2, &v5);
strnmov(a1 + v5, &v2[v3], 512 - v5);
return a1;
}
| intern_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
CMP RSI,RDI
JNZ 0x0019b14b
LEA R15,[RBP + -0x230]
MOV EDX,0x200
MOV RDI,R15
MOV RSI,R14
CALL 0x001d71e0
MOV R14,R15
LAB_0019b14b:
LEA R15,[RBP + -0x238]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00194901
MOV RCX,qword ptr [R15]
LEA RDI,[RBX + RCX*0x1]
ADD R14,RAX
MOV EDX,0x200
SUB RDX,RCX
MOV RSI,R14
CALL 0x001d71e0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0019b19a
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019b19a:
CALL 0x00129270
|
int1 * intern_filename(int1 *param_1,int1 *param_2)
{
long lVar1;
int1 *puVar2;
long in_FS_OFFSET;
long local_240;
int1 local_238 [528];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
puVar2 = param_2;
if (param_2 == param_1) {
puVar2 = local_238;
strnmov(puVar2,param_2,0x200);
}
lVar1 = dirname_part(param_1,puVar2,&local_240);
strnmov(param_1 + local_240,puVar2 + lVar1,0x200 - local_240);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
39,094 | PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*) | eloqsql/storage/perfschema/pfs_account.cc | void PFS_account::aggregate_memory(bool alive, PFS_user *safe_user, PFS_host *safe_host)
{
if (read_instr_class_memory_stats() == NULL)
return;
if (likely(safe_user != NULL && safe_host != NULL))
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
global_instr_class_memory_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
global_instr_class_memory_array);
return;
} | O0 | cpp | PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x419b0
cmpq $0x0, %rax
jne 0x53084
jmp 0x53193
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x29(%rbp)
je 0x5309b
cmpq $0x0, -0x20(%rbp)
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x530ee
movq -0x28(%rbp), %rdi
movb -0x9(%rbp), %al
movb %al, -0x2a(%rbp)
callq 0x419f0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x419f0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x419f0
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %rax, %rcx
movb -0x2a(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0x3c640
jmp 0x53193
cmpq $0x0, -0x18(%rbp)
je 0x53131
movq -0x28(%rbp), %rdi
movb -0x9(%rbp), %al
movb %al, -0x41(%rbp)
callq 0x419f0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x419f0
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movb -0x41(%rbp), %al
leaq 0x3ba9e6(%rip), %rcx # 0x40db08
movq (%rcx), %rcx
andb $0x1, %al
movzbl %al, %edi
callq 0x3c640
jmp 0x53193
cmpq $0x0, -0x20(%rbp)
je 0x5316a
movq -0x28(%rbp), %rdi
movb -0x9(%rbp), %al
movb %al, -0x51(%rbp)
callq 0x419f0
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0x419f0
movq -0x60(%rbp), %rsi
movq %rax, %rdx
movb -0x51(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0x3c580
jmp 0x53193
movq -0x28(%rbp), %rdi
movb -0x9(%rbp), %al
movb %al, -0x61(%rbp)
callq 0x419f0
movq %rax, %rsi
movb -0x61(%rbp), %al
leaq 0x3ba982(%rip), %rcx # 0x40db08
movq (%rcx), %rdx
andb $0x1, %al
movzbl %al, %edi
callq 0x3c580
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN11PFS_account16aggregate_memoryEbP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_8]; this
mov [rbp+var_28], rdi
call _ZNK20PFS_connection_slice29read_instr_class_memory_statsEv; PFS_connection_slice::read_instr_class_memory_stats(void)
cmp rax, 0
jnz short loc_53084
jmp loc_53193
loc_53084:
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_29], al
jz short loc_5309B
cmp [rbp+var_20], 0
setnz al
mov [rbp+var_29], al
loc_5309B:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_530EE
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_9]
mov [rbp+var_2A], al
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov rsi, [rbp+var_40]; PFS_memory_stat *
mov rdx, [rbp+var_38]; PFS_memory_stat *
mov rcx, rax; PFS_memory_stat *
mov al, [rbp+var_2A]
and al, 1
movzx edi, al; bool
call _Z20aggregate_all_memorybP15PFS_memory_statS0_S0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *,PFS_memory_stat *)
jmp loc_53193
loc_530EE:
cmp [rbp+var_18], 0
jz short loc_53131
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_9]
mov [rbp+var_41], al
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov [rbp+var_50], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov rsi, [rbp+var_50]; PFS_memory_stat *
mov rdx, rax; PFS_memory_stat *
mov al, [rbp+var_41]
lea rcx, global_instr_class_memory_array
mov rcx, [rcx]; PFS_memory_stat *
and al, 1
movzx edi, al; bool
call _Z20aggregate_all_memorybP15PFS_memory_statS0_S0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *,PFS_memory_stat *)
jmp short loc_53193
loc_53131:
cmp [rbp+var_20], 0
jz short loc_5316A
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_9]
mov [rbp+var_51], al
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov [rbp+var_60], rax
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov rsi, [rbp+var_60]; PFS_memory_stat *
mov rdx, rax; PFS_memory_stat *
mov al, [rbp+var_51]
and al, 1
movzx edi, al; bool
call _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *)
jmp short loc_53193
loc_5316A:
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_9]
mov [rbp+var_61], al
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov rsi, rax; PFS_memory_stat *
mov al, [rbp+var_61]
lea rcx, global_instr_class_memory_array
mov rdx, [rcx]; PFS_memory_stat *
and al, 1
movzx edi, al; bool
call _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *)
loc_53193:
add rsp, 70h
pop rbp
retn
| PFS_memory_stat * PFS_account::aggregate_memory(PFS_account *this, char a2, PFS_user *a3, PFS_host *a4)
{
PFS_memory_stat *result; // rax
PFS_memory_stat *v5; // rax
PFS_memory_stat *v6; // rax
PFS_memory_stat *v7; // rax
PFS_memory_stat *v8; // rax
PFS_memory_stat *v9; // [rsp+10h] [rbp-60h]
PFS_memory_stat *v10; // [rsp+20h] [rbp-50h]
PFS_memory_stat *v11; // [rsp+30h] [rbp-40h]
PFS_memory_stat *v12; // [rsp+38h] [rbp-38h]
bool v13; // [rsp+47h] [rbp-29h]
result = (PFS_memory_stat *)PFS_connection_slice::read_instr_class_memory_stats(this);
if ( result )
{
v13 = 0;
if ( a3 )
v13 = a4 != 0LL;
if ( v13 )
{
v11 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(this);
v12 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a3);
v5 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a4);
return aggregate_all_memory(a2 & 1, v11, v12, v5);
}
else if ( a3 )
{
v10 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(this);
v6 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a3);
return aggregate_all_memory(a2 & 1, v10, v6, global_instr_class_memory_array);
}
else if ( a4 )
{
v9 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(this);
v7 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a4);
return aggregate_all_memory(a2 & 1, v9, v7);
}
else
{
v8 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(this);
return aggregate_all_memory(a2 & 1, v8, global_instr_class_memory_array);
}
}
return result;
}
| aggregate_memory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RDI
CALL 0x001419b0
CMP RAX,0x0
JNZ 0x00153084
JMP 0x00153193
LAB_00153084:
XOR EAX,EAX
CMP qword ptr [RBP + -0x18],0x0
MOV byte ptr [RBP + -0x29],AL
JZ 0x0015309b
CMP qword ptr [RBP + -0x20],0x0
SETNZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_0015309b:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001530ee
MOV RDI,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x2a],AL
CALL 0x001419f0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001419f0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001419f0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,RAX
MOV AL,byte ptr [RBP + -0x2a]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0013c640
JMP 0x00153193
LAB_001530ee:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00153131
MOV RDI,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x41],AL
CALL 0x001419f0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001419f0
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RAX
MOV AL,byte ptr [RBP + -0x41]
LEA RCX,[0x50db08]
MOV RCX,qword ptr [RCX]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0013c640
JMP 0x00153193
LAB_00153131:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0015316a
MOV RDI,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x51],AL
CALL 0x001419f0
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001419f0
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,RAX
MOV AL,byte ptr [RBP + -0x51]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0013c580
JMP 0x00153193
LAB_0015316a:
MOV RDI,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x61],AL
CALL 0x001419f0
MOV RSI,RAX
MOV AL,byte ptr [RBP + -0x61]
LEA RCX,[0x50db08]
MOV RDX,qword ptr [RCX]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0013c580
LAB_00153193:
ADD RSP,0x70
POP RBP
RET
|
/* PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*) */
void __thiscall
PFS_account::aggregate_memory(PFS_account *this,bool param_1,PFS_user *param_2,PFS_host *param_3)
{
long lVar1;
PFS_memory_stat *pPVar2;
PFS_memory_stat *pPVar3;
PFS_memory_stat *pPVar4;
lVar1 = PFS_connection_slice::read_instr_class_memory_stats((PFS_connection_slice *)this);
if (lVar1 != 0) {
if (param_2 == (PFS_user *)0x0 || param_3 == (PFS_host *)0x0) {
if (param_2 == (PFS_user *)0x0) {
if (param_3 == (PFS_host *)0x0) {
pPVar2 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats
((PFS_connection_slice *)this);
aggregate_all_memory(param_1,pPVar2,global_instr_class_memory_array);
}
else {
pPVar2 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats
((PFS_connection_slice *)this);
pPVar3 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats
((PFS_connection_slice *)param_3);
aggregate_all_memory(param_1,pPVar2,pPVar3);
}
}
else {
pPVar2 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)this);
pPVar3 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats
((PFS_connection_slice *)param_2);
aggregate_all_memory(param_1,pPVar2,pPVar3,global_instr_class_memory_array);
}
}
else {
pPVar2 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)this);
pPVar3 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)param_2)
;
pPVar4 = (PFS_memory_stat *)
PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)param_3)
;
aggregate_all_memory(param_1,pPVar2,pPVar3,pPVar4);
}
}
return;
}
| |
39,095 | google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional int32 start = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target);
}
// optional int32 end = 2;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target);
}
// optional .google.protobuf.ExtensionRangeOptions options = 3;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::options(this),
_Internal::options(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange)
return target;
} | O0 | cpp | google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x24(%rsp)
addq $0x10, %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movslq 0x6c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2b67c1
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x155d00
movq 0x18(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x293b90
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl $0x1, 0x94(%rsp)
movl %ecx, 0x90(%rsp)
movq %rax, 0x88(%rsp)
movl 0x94(%rsp), %ecx
movq 0x88(%rsp), %rax
movl %ecx, 0xb4(%rsp)
movl $0x0, 0xb0(%rsp)
movq %rax, 0xa8(%rsp)
movl 0xb4(%rsp), %edi
movl 0xb0(%rsp), %esi
callq 0x158f30
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x104(%rsp)
movq %rax, 0xf8(%rsp)
movl 0x104(%rsp), %edi
movq 0xf8(%rsp), %rsi
callq 0x158f50
movq %rax, 0x88(%rsp)
movl 0x90(%rsp), %ecx
movq 0x88(%rsp), %rax
movl %ecx, 0xd4(%rsp)
movq %rax, 0xc8(%rsp)
movl 0xd4(%rsp), %edi
movq 0xc8(%rsp), %rsi
callq 0x203890
movq %rax, 0x30(%rsp)
movl 0x24(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2b68ac
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x155d00
movq 0x18(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x293ba0
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl $0x2, 0x84(%rsp)
movl %ecx, 0x80(%rsp)
movq %rax, 0x78(%rsp)
movl 0x84(%rsp), %ecx
movq 0x78(%rsp), %rax
movl %ecx, 0xc4(%rsp)
movl $0x0, 0xc0(%rsp)
movq %rax, 0xb8(%rsp)
movl 0xc4(%rsp), %edi
movl 0xc0(%rsp), %esi
callq 0x158f30
movl %eax, %ecx
movq 0xb8(%rsp), %rax
movl %ecx, 0xf4(%rsp)
movq %rax, 0xe8(%rsp)
movl 0xf4(%rsp), %edi
movq 0xe8(%rsp), %rsi
callq 0x158f50
movq %rax, 0x78(%rsp)
movl 0x80(%rsp), %ecx
movq 0x78(%rsp), %rax
movl %ecx, 0xe4(%rsp)
movq %rax, 0xd8(%rsp)
movl 0xe4(%rsp), %edi
movq 0xd8(%rsp), %rsi
callq 0x203890
movq %rax, 0x30(%rsp)
movl 0x24(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b68f9
movq 0x18(%rsp), %rdi
callq 0x2b5d80
movq 0x18(%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x2b5d80
movq %rax, %rdi
callq 0x2deca0
movq 0x10(%rsp), %rsi
movl %eax, %edx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movl $0x3, %edi
callq 0x1aaae0
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b69af
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
leaq -0xd04a2(%rip), %rax # 0x1e64a0
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b698d
movq 0x8(%rsp), %rdi
callq 0x155370
addq $0x8, %rax
movq %rax, 0x58(%rsp)
jmp 0x2b6996
callq *0x48(%rsp)
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1f1090
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x108, %rsp # imm = 0x108
retq
nopl (%rax)
| _ZNK6google8protobuf30DescriptorProto_ExtensionRange18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
sub rsp, 108h
mov [rsp+108h+var_D0], rdi
mov [rsp+108h+var_D8], rsi
mov [rsp+108h+var_E0], rdx
mov rax, [rsp+108h+var_D0]
mov [rsp+108h+var_F0], rax
mov [rsp+108h+var_E4], 0
add rax, 10h
mov [rsp+108h+var_98], rax
mov [rsp+108h+var_9C], 0
mov rax, [rsp+108h+var_98]
movsxd rcx, [rsp+108h+var_9C]
mov eax, [rax+rcx*4]
mov [rsp+108h+var_E4], eax
mov eax, [rsp+108h+var_E4]
and eax, 2
cmp eax, 0
jz loc_2B67C1
mov rdi, [rsp+108h+var_E0]; this
mov rsi, [rsp+108h+var_D8]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *)
mov rdi, [rsp+108h+var_F0]; this
mov [rsp+108h+var_D8], rax
call _ZNK6google8protobuf30DescriptorProto_ExtensionRange15_internal_startEv; google::protobuf::DescriptorProto_ExtensionRange::_internal_start(void)
mov ecx, eax
mov rax, [rsp+108h+var_D8]
mov [rsp+108h+var_74], 1
mov [rsp+108h+var_78], ecx
mov [rsp+108h+var_80], rax
mov ecx, [rsp+108h+var_74]
mov rax, [rsp+108h+var_80]
mov [rsp+108h+var_54], ecx
mov [rsp+108h+var_58], 0
mov [rsp+108h+var_60], rax
mov edi, [rsp+108h+var_54]
mov esi, [rsp+108h+var_58]
call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType)
mov ecx, eax
mov rax, [rsp+108h+var_60]
mov [rsp+108h+var_4], ecx
mov [rsp+108h+var_14+4], rax
mov edi, [rsp+108h+var_4]; this
mov rsi, [rsp+108h+var_14+4]; unsigned int
call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *)
mov [rsp+108h+var_80], rax
mov ecx, [rsp+108h+var_78]
mov rax, [rsp+108h+var_80]
mov dword ptr [rsp+108h+var_34], ecx
mov qword ptr [rsp+108h+var_40], rax
mov edi, dword ptr [rsp+108h+var_34]; this
mov rsi, qword ptr [rsp+108h+var_40]; int
call _ZN6google8protobuf2io17CodedOutputStream32WriteVarint32SignExtendedToArrayEiPh; google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(int,uchar *)
mov [rsp+108h+var_D8], rax
loc_2B67C1:
mov eax, [rsp+108h+var_E4]
and eax, 4
cmp eax, 0
jz loc_2B68AC
mov rdi, [rsp+108h+var_E0]; this
mov rsi, [rsp+108h+var_D8]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *)
mov rdi, [rsp+108h+var_F0]; this
mov [rsp+108h+var_D8], rax
call _ZNK6google8protobuf30DescriptorProto_ExtensionRange13_internal_endEv; google::protobuf::DescriptorProto_ExtensionRange::_internal_end(void)
mov ecx, eax
mov rax, [rsp+108h+var_D8]
mov [rsp+108h+var_84], 2
mov [rsp+108h+var_88], ecx
mov [rsp+108h+var_90], rax
mov ecx, [rsp+108h+var_84]
mov rax, [rsp+108h+var_90]
mov [rsp+108h+var_44], ecx
mov [rsp+108h+var_48], 0
mov [rsp+108h+var_50], rax
mov edi, [rsp+108h+var_44]
mov esi, [rsp+108h+var_48]
call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType)
mov ecx, eax
mov rax, [rsp+108h+var_50]
mov dword ptr [rsp+108h+var_14], ecx
mov [rsp+108h+var_24+4], rax
mov edi, dword ptr [rsp+108h+var_14]; this
mov rsi, [rsp+108h+var_24+4]; unsigned int
call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *)
mov [rsp+108h+var_90], rax
mov ecx, [rsp+108h+var_88]
mov rax, [rsp+108h+var_90]
mov dword ptr [rsp+108h+var_24], ecx
mov [rsp+108h+var_34+4], rax
mov edi, dword ptr [rsp+108h+var_24]; this
mov rsi, [rsp+108h+var_34+4]; google::protobuf::DescriptorProto_ExtensionRange *
call _ZN6google8protobuf2io17CodedOutputStream32WriteVarint32SignExtendedToArrayEiPh; google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(int,uchar *)
mov [rsp+108h+var_D8], rax
loc_2B68AC:
mov eax, [rsp+108h+var_E4]
and eax, 1
cmp eax, 0
jz short loc_2B68F9
mov rdi, [rsp+108h+var_F0]; this
call _ZN6google8protobuf30DescriptorProto_ExtensionRange9_Internal7optionsEPKS1_; google::protobuf::DescriptorProto_ExtensionRange::_Internal::options(google::protobuf::DescriptorProto_ExtensionRange const*)
mov rdi, [rsp+108h+var_F0]; this
mov qword ptr [rsp+108h+var_F8], rax
call _ZN6google8protobuf30DescriptorProto_ExtensionRange9_Internal7optionsEPKS1_; google::protobuf::DescriptorProto_ExtensionRange::_Internal::options(google::protobuf::DescriptorProto_ExtensionRange const*)
mov rdi, rax; this
call _ZNK6google8protobuf21ExtensionRangeOptions13GetCachedSizeEv; google::protobuf::ExtensionRangeOptions::GetCachedSize(void)
mov rsi, qword ptr [rsp+108h+var_F8]; int
mov edx, eax; google::protobuf::MessageLite *
mov rcx, [rsp+108h+var_D8]; int
mov r8, [rsp+108h+var_E0]; unsigned __int8 *
mov edi, (offset dword_0+3); this
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+108h+var_D8], rax
loc_2B68F9:
mov rax, [rsp+108h+var_F0]
add rax, 8
mov [rsp+108h+var_C8], rax
mov rax, [rsp+108h+var_C8]
mov [rsp+108h+var_68], rax
mov rax, [rsp+108h+var_68]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz loc_2B69AF
mov rax, [rsp+108h+var_F0]
add rax, 8
mov [rsp+108h+var_B8], rax
lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void)
mov [rsp+108h+var_C0], rax
mov rax, [rsp+108h+var_B8]
mov [rsp+108h+var_100], rax
mov [rsp+108h+var_A8], rax
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_70], rax
mov rax, [rsp+108h+var_70]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_2B698D
mov rdi, [rsp+108h+var_100]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+108h+var_B0], rax
jmp short loc_2B6996
loc_2B698D:
call [rsp+108h+var_C0]
mov [rsp+108h+var_B0], rax
loc_2B6996:
mov rdi, [rsp+108h+var_B0]; this
mov rsi, [rsp+108h+var_D8]; google::protobuf::UnknownFieldSet *
mov rdx, [rsp+108h+var_E0]; unsigned __int8 *
call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+108h+var_D8], rax
loc_2B69AF:
mov rax, [rsp+108h+var_D8]
add rsp, 108h
retn
| const google::protobuf::UnknownFieldSet * google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(
google::protobuf::DescriptorProto_ExtensionRange *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3)
{
unsigned __int8 *v3; // rdx
unsigned __int8 *v4; // rdx
unsigned __int8 *v5; // rdx
unsigned __int8 *v6; // rdx
google::protobuf::ExtensionRangeOptions *v7; // rax
unsigned int CachedSize; // eax
google::protobuf::io::EpsCopyOutputStream *v9; // r9
google::protobuf::io::EpsCopyOutputStream *v10; // rcx
long long v12; // [rsp+10h] [rbp-F8h]
int v13; // [rsp+24h] [rbp-E4h]
unsigned __int8 *v15; // [rsp+30h] [rbp-D8h]
unsigned __int8 *v16; // [rsp+30h] [rbp-D8h]
unsigned __int8 *v17; // [rsp+30h] [rbp-D8h]
google::protobuf::internal::WireFormat *v18; // [rsp+58h] [rbp-B0h]
unsigned int v19; // [rsp+80h] [rbp-88h]
unsigned int v20; // [rsp+90h] [rbp-78h]
unsigned int v21; // [rsp+F4h] [rbp-14h]
unsigned int Tag; // [rsp+104h] [rbp-4h]
v15 = a2;
v13 = *((_DWORD *)this + 4);
if ( (v13 & 2) != 0 )
{
v16 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, a2);
v20 = google::protobuf::DescriptorProto_ExtensionRange::_internal_start(this);
Tag = google::protobuf::internal::WireFormatLite::MakeTag(1, 0);
a2 = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
(google::protobuf::io::CodedOutputStream *)Tag,
v16,
v3);
v15 = google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(
(google::protobuf::io::CodedOutputStream *)v20,
a2,
v4);
}
if ( (v13 & 4) != 0 )
{
v17 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, v15);
v19 = google::protobuf::DescriptorProto_ExtensionRange::_internal_end(this);
v21 = google::protobuf::internal::WireFormatLite::MakeTag(2, 0);
a2 = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
(google::protobuf::io::CodedOutputStream *)v21,
v17,
v5);
v15 = google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(
(google::protobuf::io::CodedOutputStream *)v19,
a2,
v6);
}
if ( (v13 & 1) != 0 )
{
v12 = google::protobuf::DescriptorProto_ExtensionRange::_Internal::options(
this,
(const google::protobuf::DescriptorProto_ExtensionRange *)a2);
v7 = (google::protobuf::ExtensionRangeOptions *)google::protobuf::DescriptorProto_ExtensionRange::_Internal::options(
this,
(const google::protobuf::DescriptorProto_ExtensionRange *)a2);
CachedSize = google::protobuf::ExtensionRangeOptions::GetCachedSize(v7);
v15 = (unsigned __int8 *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 3),
v12,
(const google::protobuf::MessageLite *)CachedSize,
v15,
a3,
v9);
}
if ( (*((_QWORD *)this + 1) & 1LL) != 0 )
{
v18 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1)
+ 8);
return google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
v18,
(const google::protobuf::UnknownFieldSet *)v15,
a3,
v10);
}
return (const google::protobuf::UnknownFieldSet *)v15;
}
| |||
39,096 | google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | uint8_t* DescriptorProto_ExtensionRange::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional int32 start = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_start(), target);
}
// optional int32 end = 2;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_end(), target);
}
// optional .google.protobuf.ExtensionRangeOptions options = 3;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::options(this),
_Internal::options(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange)
return target;
} | O3 | cpp | google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %ebp
testb $0x2, %bpl
je 0xebc5e
cmpq %rsi, (%rbx)
jbe 0xebd68
movslq 0x20(%r14), %rcx
movb $0x8, (%rsi)
movb %cl, 0x1(%rsi)
cmpq $0x7f, %rcx
ja 0xebcbe
addq $0x2, %rsi
movq %rsi, %rax
testb $0x4, %bpl
je 0xebc88
cmpq %rax, (%rbx)
jbe 0xebd78
movslq 0x24(%r14), %rdx
movb $0x10, (%rax)
movb %dl, 0x1(%rax)
cmpq $0x7f, %rdx
ja 0xebd05
addq $0x2, %rax
movq %rax, %rcx
testb $0x1, %bpl
je 0xebca8
movq 0x18(%r14), %rsi
movl 0x40(%rsi), %edx
movl $0x3, %edi
movq %rbx, %r8
callq 0x8cace
movq %rax, %rcx
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0xebd51
movq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movl %ecx, %edx
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
shrq $0x7, %rcx
movb %cl, 0x2(%rsi)
leaq 0x3(%rsi), %rax
cmpl $0x4000, %edx # imm = 0x4000
jb 0xebc61
movb 0x2(%rsi), %sil
movq %rcx, %rdx
orb $-0x80, %sil
movb %sil, -0x1(%rax)
shrq $0x7, %rdx
movb %dl, (%rax)
incq %rax
movl %edx, %esi
cmpq $0x3fff, %rcx # imm = 0x3FFF
movq %rdx, %rcx
ja 0xebce1
jmp 0xebc61
movl %edx, %esi
movl %edx, %ecx
orb $-0x80, %cl
movb %cl, 0x1(%rax)
shrq $0x7, %rdx
movb %dl, 0x2(%rax)
leaq 0x3(%rax), %rcx
cmpl $0x4000, %esi # imm = 0x4000
jb 0xebc8b
movb 0x2(%rax), %sil
movq %rdx, %rax
orb $-0x80, %sil
movb %sil, -0x1(%rcx)
shrq $0x7, %rax
movb %al, (%rcx)
incq %rcx
movl %eax, %esi
cmpq $0x3fff, %rdx # imm = 0x3FFF
movq %rax, %rdx
ja 0xebd2d
jmp 0xebc8b
andq $-0x4, %rdi
addq $0x8, %rdi
movq %rcx, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0xa6e1e
movq %rbx, %rdi
callq 0x2f106
movq %rax, %rsi
jmp 0xebc4a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f106
jmp 0xebc70
| _ZNK6google8protobuf30DescriptorProto_ExtensionRange18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push rbp
push r14
push rbx
mov rbx, rdx
mov r14, rdi
mov ebp, [rdi+10h]
test bpl, 2
jz short loc_EBC5E
cmp [rbx], rsi
jbe loc_EBD68
loc_EBC4A:
movsxd rcx, dword ptr [r14+20h]
mov byte ptr [rsi], 8
mov [rsi+1], cl
cmp rcx, 7Fh
ja short loc_EBCBE
add rsi, 2
loc_EBC5E:
mov rax, rsi
loc_EBC61:
test bpl, 4
jz short loc_EBC88
cmp [rbx], rax
jbe loc_EBD78
loc_EBC70:
movsxd rdx, dword ptr [r14+24h]
mov byte ptr [rax], 10h
mov [rax+1], dl
cmp rdx, 7Fh
ja loc_EBD05
add rax, 2
loc_EBC88:
mov rcx, rax; int
loc_EBC8B:
test bpl, 1
jz short loc_EBCA8
mov rsi, [r14+18h]; int
mov edx, [rsi+40h]; google::protobuf::MessageLite *
mov edi, (offset dword_0+3); this
mov r8, rbx; unsigned __int8 *
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov rcx, rax; google::protobuf::io::EpsCopyOutputStream *
loc_EBCA8:
mov rdi, [r14+8]
test dil, 1
jnz loc_EBD51
mov rax, rcx
pop rbx
pop r14
pop rbp
retn
loc_EBCBE:
mov edx, ecx
mov eax, ecx
or al, 80h
mov [rsi+1], al
shr rcx, 7
mov [rsi+2], cl
lea rax, [rsi+3]
cmp edx, 4000h
jb short loc_EBC61
mov sil, [rsi+2]
mov rdx, rcx
loc_EBCE1:
or sil, 80h
mov [rax-1], sil
shr rdx, 7
mov [rax], dl
inc rax
mov esi, edx
cmp rcx, 3FFFh
mov rcx, rdx
ja short loc_EBCE1
jmp loc_EBC61
loc_EBD05:
mov esi, edx
mov ecx, edx
or cl, 80h
mov [rax+1], cl
shr rdx, 7
mov [rax+2], dl
lea rcx, [rax+3]
cmp esi, 4000h
jb loc_EBC8B
mov sil, [rax+2]
mov rax, rdx
loc_EBD2D:
or sil, 80h
mov [rcx-1], sil
shr rax, 7
mov [rcx], al
inc rcx
mov esi, eax
cmp rdx, 3FFFh
mov rdx, rax
ja short loc_EBD2D
jmp loc_EBC8B
loc_EBD51:
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8; this
mov rsi, rcx; unsigned __int8 *
mov rdx, rbx; unsigned __int8 *
pop rbx
pop r14
pop rbp
jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
loc_EBD68:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp loc_EBC4A
loc_EBD78:
mov rdi, rbx; this
mov rsi, rax; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
jmp loc_EBC70
| unsigned __int8 * google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(
google::protobuf::DescriptorProto_ExtensionRange *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3,
long long a4,
long long a5,
google::protobuf::io::EpsCopyOutputStream *a6)
{
int v7; // ebp
unsigned long long v8; // rcx
unsigned __int8 *v9; // rax
unsigned long long v10; // rdx
const google::protobuf::UnknownFieldSet *v11; // rcx
long long v12; // rdi
unsigned int v14; // edx
unsigned long long v15; // rcx
unsigned __int8 v16; // si
unsigned long long v17; // rdx
bool v18; // cc
unsigned int v19; // esi
unsigned long long v20; // rdx
unsigned __int8 v21; // si
unsigned long long v22; // rax
v7 = *((_DWORD *)this + 4);
if ( (v7 & 2) == 0 )
goto LABEL_6;
if ( *(_QWORD *)a3 <= (unsigned long long)a2 )
a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2);
v8 = *((int *)this + 8);
*a2 = 8;
a2[1] = v8;
if ( v8 <= 0x7F )
{
a2 += 2;
LABEL_6:
v9 = a2;
goto LABEL_7;
}
v14 = v8;
a2[1] = v8 | 0x80;
v15 = v8 >> 7;
a2[2] = v15;
v9 = a2 + 3;
if ( v14 >= 0x4000 )
{
v16 = a2[2];
v17 = v15;
do
{
*(v9 - 1) = v16 | 0x80;
v17 >>= 7;
*v9++ = v17;
v16 = v17;
v18 = v15 <= 0x3FFF;
v15 = v17;
}
while ( !v18 );
}
LABEL_7:
if ( (v7 & 4) == 0 )
{
LABEL_12:
v11 = (const google::protobuf::UnknownFieldSet *)v9;
goto LABEL_13;
}
if ( *(_QWORD *)a3 <= (unsigned long long)v9 )
v9 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v9);
v10 = *((int *)this + 9);
*v9 = 16;
v9[1] = v10;
if ( v10 <= 0x7F )
{
v9 += 2;
goto LABEL_12;
}
v19 = v10;
v9[1] = v10 | 0x80;
v20 = v10 >> 7;
v9[2] = v20;
v11 = (const google::protobuf::UnknownFieldSet *)(v9 + 3);
if ( v19 >= 0x4000 )
{
v21 = v9[2];
v22 = v20;
do
{
*((_BYTE *)v11 - 1) = v21 | 0x80;
v22 >>= 7;
*(_BYTE *)v11 = v22;
v11 = (const google::protobuf::UnknownFieldSet *)((char *)v11 + 1);
v21 = v22;
v18 = v20 <= 0x3FFF;
v20 = v22;
}
while ( !v18 );
}
LABEL_13:
if ( (v7 & 1) != 0 )
v11 = (const google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 3),
*((_QWORD *)this + 3),
(const google::protobuf::MessageLite *)*(unsigned int *)(*((_QWORD *)this + 3) + 64LL),
(unsigned long long)v11,
a3,
a6);
v12 = *((_QWORD *)this + 1);
if ( (v12 & 1) != 0 )
return google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
(google::protobuf::internal::WireFormat *)((v12 & 0xFFFFFFFFFFFFFFFCLL) + 8),
v11,
a3,
v11);
else
return (unsigned __int8 *)v11;
}
| _InternalSerialize:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RDI
MOV EBP,dword ptr [RDI + 0x10]
TEST BPL,0x2
JZ 0x001ebc5e
CMP qword ptr [RBX],RSI
JBE 0x001ebd68
LAB_001ebc4a:
MOVSXD RCX,dword ptr [R14 + 0x20]
MOV byte ptr [RSI],0x8
MOV byte ptr [RSI + 0x1],CL
CMP RCX,0x7f
JA 0x001ebcbe
ADD RSI,0x2
LAB_001ebc5e:
MOV RAX,RSI
LAB_001ebc61:
TEST BPL,0x4
JZ 0x001ebc88
CMP qword ptr [RBX],RAX
JBE 0x001ebd78
LAB_001ebc70:
MOVSXD RDX,dword ptr [R14 + 0x24]
MOV byte ptr [RAX],0x10
MOV byte ptr [RAX + 0x1],DL
CMP RDX,0x7f
JA 0x001ebd05
ADD RAX,0x2
LAB_001ebc88:
MOV RCX,RAX
LAB_001ebc8b:
TEST BPL,0x1
JZ 0x001ebca8
MOV RSI,qword ptr [R14 + 0x18]
MOV EDX,dword ptr [RSI + 0x40]
MOV EDI,0x3
MOV R8,RBX
CALL 0x0018cace
MOV RCX,RAX
LAB_001ebca8:
MOV RDI,qword ptr [R14 + 0x8]
TEST DIL,0x1
JNZ 0x001ebd51
MOV RAX,RCX
POP RBX
POP R14
POP RBP
RET
LAB_001ebcbe:
MOV EDX,ECX
MOV EAX,ECX
OR AL,0x80
MOV byte ptr [RSI + 0x1],AL
SHR RCX,0x7
MOV byte ptr [RSI + 0x2],CL
LEA RAX,[RSI + 0x3]
CMP EDX,0x4000
JC 0x001ebc61
MOV SIL,byte ptr [RSI + 0x2]
MOV RDX,RCX
LAB_001ebce1:
OR SIL,0x80
MOV byte ptr [RAX + -0x1],SIL
SHR RDX,0x7
MOV byte ptr [RAX],DL
INC RAX
MOV ESI,EDX
CMP RCX,0x3fff
MOV RCX,RDX
JA 0x001ebce1
JMP 0x001ebc61
LAB_001ebd05:
MOV ESI,EDX
MOV ECX,EDX
OR CL,0x80
MOV byte ptr [RAX + 0x1],CL
SHR RDX,0x7
MOV byte ptr [RAX + 0x2],DL
LEA RCX,[RAX + 0x3]
CMP ESI,0x4000
JC 0x001ebc8b
MOV SIL,byte ptr [RAX + 0x2]
MOV RAX,RDX
LAB_001ebd2d:
OR SIL,0x80
MOV byte ptr [RCX + -0x1],SIL
SHR RAX,0x7
MOV byte ptr [RCX],AL
INC RCX
MOV ESI,EAX
CMP RDX,0x3fff
MOV RDX,RAX
JA 0x001ebd2d
JMP 0x001ebc8b
LAB_001ebd51:
AND RDI,-0x4
ADD RDI,0x8
MOV RSI,RCX
MOV RDX,RBX
POP RBX
POP R14
POP RBP
JMP 0x001a6e1e
LAB_001ebd68:
MOV RDI,RBX
CALL 0x0012f106
MOV RSI,RAX
JMP 0x001ebc4a
LAB_001ebd78:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012f106
JMP 0x001ebc70
|
/* google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::DescriptorProto_ExtensionRange::_InternalSerialize
(DescriptorProto_ExtensionRange *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
uint uVar1;
uint uVar2;
bool bVar3;
uchar *puVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 & 2) != 0) {
puVar4 = param_1;
if (*(uchar **)param_2 <= param_1) {
puVar4 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
uVar2 = *(uint *)(this + 0x20);
*puVar4 = '\b';
puVar4[1] = (byte)uVar2;
if ((ulong)(long)(int)uVar2 < 0x80) {
param_1 = puVar4 + 2;
}
else {
puVar4[1] = (byte)uVar2 | 0x80;
uVar6 = (ulong)(long)(int)uVar2 >> 7;
puVar4[2] = (uchar)uVar6;
param_1 = puVar4 + 3;
if (0x3fff < uVar2) {
uVar7 = (ulong)puVar4[2];
do {
param_1[-1] = (byte)uVar7 | 0x80;
uVar5 = uVar6 >> 7;
*param_1 = (uchar)uVar5;
param_1 = param_1 + 1;
uVar7 = uVar5 & 0xffffffff;
bVar3 = 0x3fff < uVar6;
uVar6 = uVar5;
} while (bVar3);
}
}
}
puVar4 = param_1;
if ((uVar1 & 4) != 0) {
if (*(uchar **)param_2 <= param_1) {
param_1 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
uVar2 = *(uint *)(this + 0x24);
*param_1 = '\x10';
param_1[1] = (byte)uVar2;
if ((ulong)(long)(int)uVar2 < 0x80) {
puVar4 = param_1 + 2;
}
else {
param_1[1] = (byte)uVar2 | 0x80;
uVar6 = (ulong)(long)(int)uVar2 >> 7;
param_1[2] = (uchar)uVar6;
puVar4 = param_1 + 3;
if (0x3fff < uVar2) {
uVar7 = (ulong)param_1[2];
do {
puVar4[-1] = (byte)uVar7 | 0x80;
uVar5 = uVar6 >> 7;
*puVar4 = (uchar)uVar5;
puVar4 = puVar4 + 1;
uVar7 = uVar5 & 0xffffffff;
bVar3 = 0x3fff < uVar6;
uVar6 = uVar5;
} while (bVar3);
}
}
}
if ((uVar1 & 1) != 0) {
puVar4 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(3,*(MessageLite **)(this + 0x18),
*(int *)(*(MessageLite **)(this + 0x18) + 0x40),puVar4,param_2);
}
if ((*(ulong *)(this + 8) & 1) != 0) {
puVar4 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray
((UnknownFieldSet *)
((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8),puVar4,param_2);
return puVar4;
}
return puVar4;
}
| |
39,097 | fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h | FMT_CONSTEXPR auto get(int id) const -> format_arg {
format_arg arg;
if (!is_packed()) {
if (id < max_size()) arg = args_[id];
return arg;
}
if (id >= detail::max_packed_args) return arg;
arg.type_ = type(id);
if (arg.type_ == detail::type::none_type) return arg;
arg.value_ = values_[id];
return arg;
} | O0 | c | fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const:
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x9f660
movq 0x20(%rsp), %rdi
callq 0x9f6a0
testb $0x1, %al
jne 0x9f4a3
movq 0x20(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x9f6d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x9f4a1
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x2c(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
jmp 0x9f4f4
cmpl $0xf, 0x2c(%rsp)
jl 0x9f4ac
jmp 0x9f4f4
movq 0x20(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x9f730
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x10(%rax)
cmpl $0x0, 0x10(%rax)
jne 0x9f4cc
jmp 0x9f4f4
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x2c(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
addq $0x38, %rsp
retq
nop
| _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE3getEi:
sub rsp, 38h
mov [rsp+38h+var_28], rdi
mov rax, rdi
mov [rsp+38h+var_20], rax
mov [rsp+38h+var_8], rsi
mov [rsp+38h+var_C], edx
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_18], rax
call _ZN3fmt3v1016basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEC2Ev; fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(void)
mov rdi, [rsp+38h+var_18]
call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE9is_packedEv; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::is_packed(void)
test al, 1
jnz short loc_9F4A3
mov rdi, [rsp+38h+var_18]
mov eax, [rsp+38h+var_C]
mov [rsp+38h+var_2C], eax
call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE8max_sizeEv; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::max_size(void)
mov ecx, eax
mov eax, [rsp+38h+var_2C]
cmp eax, ecx
jge short loc_9F4A1
mov rax, [rsp+38h+var_28]
mov rcx, [rsp+38h+var_18]
mov rcx, [rcx+8]
movsxd rdx, [rsp+38h+var_C]
shl rdx, 5
add rcx, rdx
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov ecx, [rcx+10h]
mov [rax+10h], ecx
loc_9F4A1:
jmp short loc_9F4F4
loc_9F4A3:
cmp [rsp+38h+var_C], 0Fh
jl short loc_9F4AC
jmp short loc_9F4F4
loc_9F4AC:
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_C]
call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE4typeEi; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::type(int)
mov ecx, eax
mov rax, [rsp+38h+var_28]
mov [rax+10h], ecx
cmp dword ptr [rax+10h], 0
jnz short loc_9F4CC
jmp short loc_9F4F4
loc_9F4CC:
mov rax, [rsp+38h+var_28]
mov rcx, [rsp+38h+var_18]
mov rcx, [rcx+8]
movsxd rdx, [rsp+38h+var_C]
shl rdx, 4
add rcx, rdx
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_9F4F4:
mov rax, [rsp+38h+var_20]
add rsp, 38h
retn
| long long fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get(
long long a1,
long long a2,
int a3)
{
long long v3; // rcx
_QWORD *v4; // rcx
fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg();
if ( (fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::is_packed(a2) & 1) != 0 )
{
if ( a3 < 15 )
{
*(_DWORD *)(a1 + 16) = fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::type(
a2,
(unsigned int)a3);
if ( *(_DWORD *)(a1 + 16) )
{
v4 = (_QWORD *)(16LL * a3 + *(_QWORD *)(a2 + 8));
*(_QWORD *)a1 = *v4;
*(_QWORD *)(a1 + 8) = v4[1];
}
}
}
else if ( a3 < (int)fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::max_size(a2) )
{
v3 = 32LL * a3 + *(_QWORD *)(a2 + 8);
*(_QWORD *)a1 = *(_QWORD *)v3;
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v3 + 8);
*(_DWORD *)(a1 + 16) = *(_DWORD *)(v3 + 16);
}
return a1;
}
| get:
SUB RSP,0x38
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x2c],EDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x0019f660
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0019f6a0
TEST AL,0x1
JNZ 0x0019f4a3
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
CALL 0x0019f6d0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JGE 0x0019f4a1
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOVSXD RDX,dword ptr [RSP + 0x2c]
SHL RDX,0x5
ADD RCX,RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV ECX,dword ptr [RCX + 0x10]
MOV dword ptr [RAX + 0x10],ECX
LAB_0019f4a1:
JMP 0x0019f4f4
LAB_0019f4a3:
CMP dword ptr [RSP + 0x2c],0xf
JL 0x0019f4ac
JMP 0x0019f4f4
LAB_0019f4ac:
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x0019f730
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x10],ECX
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x0019f4cc
JMP 0x0019f4f4
LAB_0019f4cc:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOVSXD RDX,dword ptr [RSP + 0x2c]
SHL RDX,0x4
ADD RCX,RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_0019f4f4:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x38
RET
|
/* fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >::get(int)
const */
basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *
fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get
(int param_1)
{
int iVar1;
int4 uVar2;
ulong uVar3;
int8 *puVar4;
int in_EDX;
basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>> *in_RSI;
int4 in_register_0000003c;
basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *this;
this = (basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *)
CONCAT44(in_register_0000003c,param_1);
basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(this);
uVar3 = is_packed(in_RSI);
if ((uVar3 & 1) == 0) {
iVar1 = max_size(in_RSI);
if (in_EDX < iVar1) {
puVar4 = (int8 *)(*(long *)(in_RSI + 8) + (long)in_EDX * 0x20);
*(int8 *)this = *puVar4;
*(int8 *)(this + 8) = puVar4[1];
*(int4 *)(this + 0x10) = *(int4 *)(puVar4 + 2);
}
}
else if (in_EDX < 0xf) {
uVar2 = type(in_RSI,in_EDX);
*(int4 *)(this + 0x10) = uVar2;
if (*(int *)(this + 0x10) != 0) {
puVar4 = (int8 *)(*(long *)(in_RSI + 8) + (long)in_EDX * 0x10);
*(int8 *)this = *puVar4;
*(int8 *)(this + 8) = puVar4[1];
}
}
return this;
}
| |
39,098 | mysql_change_user_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_change_user_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_change_user,
(parms->mysql, parms->user, parms->passwd, parms->db),
parms->mysql,
my_bool,
r_my_bool)
} | O0 | c | mysql_change_user_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
callq 0x44c70
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_change_user_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
call mysql_change_user
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_change_user_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_change_user(*a1, a1[1], a1[2], a1[3]);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_change_user_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
CALL 0x00144c70
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_change_user_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_change_user(*param_1,param_1[1],param_1[2],param_1[3]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
39,099 | mi_fetch_keypage | eloqsql/storage/myisam/mi_page.c | uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
my_off_t page, int level,
uchar *buff, int return_buffer)
{
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (uchar*) buff,
(uint) keyinfo->block_length,
(uint) keyinfo->block_length,
return_buffer);
if (tmp == info->buff)
info->buff_used=1;
else if (!tmp)
{
DBUG_PRINT("error",("Got errno: %d from key_cache_read",my_errno));
info->last_keypage=HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
info->last_keypage=page;
page_size=mi_getint(tmp);
if (page_size < 4 || page_size > keyinfo->block_length)
{
DBUG_PRINT("error",("page %lu had wrong page length: %u",
(ulong) page, page_size));
DBUG_DUMP("page", tmp, keyinfo->block_length);
info->last_keypage = HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno = HA_ERR_CRASHED;
tmp = 0;
}
DBUG_RETURN(tmp);
} | O3 | c | mi_fetch_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r9d, %eax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdx
movq 0x278(%rdx), %rdi
movl 0x350(%rdx), %esi
movzwl 0xe(%r14), %r9d
movq %r15, %rdx
pushq %rax
pushq %r9
callq 0x5309c
addq $0x10, %rsp
cmpq 0x100(%rbx), %rax
je 0x483ae
testq %rax, %rax
jne 0x483b5
jmp 0x483d9
movb $0x1, 0x33d(%rbx)
movq %r15, 0x190(%rbx)
movzbl 0x1(%rax), %edx
movzbl (%rax), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %edx, %ecx
cmpl $0x4, %ecx
jb 0x483d9
movzwl 0xe(%r14), %edx
cmpl %edx, %ecx
jbe 0x48405
movq $-0x1, 0x190(%rbx)
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x474b6
callq 0x5db4e
movl $0x7e, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _mi_fetch_keypage:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov eax, r9d
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdx, [rdi]
mov rdi, [rdx+278h]
mov esi, [rdx+350h]
movzx r9d, word ptr [r14+0Eh]
mov rdx, r15
push rax
push r9
call key_cache_read
add rsp, 10h
cmp rax, [rbx+100h]
jz short loc_483AE
test rax, rax
jnz short loc_483B5
jmp short loc_483D9
loc_483AE:
mov byte ptr [rbx+33Dh], 1
loc_483B5:
mov [rbx+190h], r15
movzx edx, byte ptr [rax+1]
movzx ecx, byte ptr [rax]
and ecx, 7Fh
shl ecx, 8
or ecx, edx
cmp ecx, 4
jb short loc_483D9
movzx edx, word ptr [r14+0Eh]
cmp ecx, edx
jbe short loc_48405
loc_483D9:
mov qword ptr [rbx+190h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
xor eax, eax
loc_48405:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| _BYTE * mi_fetch_keypage(_QWORD *a1, long long a2, long long a3)
{
_BYTE *result; // rax
unsigned int v5; // ecx
result = (_BYTE *)key_cache_read(*(_QWORD *)(*a1 + 632LL), *(unsigned int *)(*a1 + 848LL), a3);
if ( result == (_BYTE *)a1[32] )
{
*((_BYTE *)a1 + 829) = 1;
}
else if ( !result )
{
LABEL_7:
a1[50] = -1LL;
mi_report_error(126, *(_QWORD *)(*a1 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
return 0LL;
}
a1[50] = a3;
v5 = (unsigned __int8)result[1] | ((*result & 0x7F) << 8);
if ( v5 < 4 || v5 > *(unsigned __int16 *)(a2 + 14) )
goto LABEL_7;
return result;
}
| _mi_fetch_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,R9D
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDX + 0x278]
MOV ESI,dword ptr [RDX + 0x350]
MOVZX R9D,word ptr [R14 + 0xe]
MOV RDX,R15
PUSH RAX
PUSH R9
CALL 0x0015309c
ADD RSP,0x10
CMP RAX,qword ptr [RBX + 0x100]
JZ 0x001483ae
TEST RAX,RAX
JNZ 0x001483b5
JMP 0x001483d9
LAB_001483ae:
MOV byte ptr [RBX + 0x33d],0x1
LAB_001483b5:
MOV qword ptr [RBX + 0x190],R15
MOVZX EDX,byte ptr [RAX + 0x1]
MOVZX ECX,byte ptr [RAX]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EDX
CMP ECX,0x4
JC 0x001483d9
MOVZX EDX,word ptr [R14 + 0xe]
CMP ECX,EDX
JBE 0x00148405
LAB_001483d9:
MOV qword ptr [RBX + 0x190],-0x1
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001474b6
CALL 0x0015db4e
MOV dword ptr [RAX],0x7e
XOR EAX,EAX
LAB_00148405:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
byte * _mi_fetch_keypage(long *param_1,long param_2,long param_3)
{
byte *pbVar1;
int4 *puVar2;
uint uVar3;
pbVar1 = (byte *)key_cache_read(*(int8 *)(*param_1 + 0x278),
*(int4 *)(*param_1 + 0x350),param_3);
if (pbVar1 == (byte *)param_1[0x20]) {
*(int1 *)((long)param_1 + 0x33d) = 1;
}
else if (pbVar1 == (byte *)0x0) goto LAB_001483d9;
param_1[0x32] = param_3;
uVar3 = (*pbVar1 & 0x7f) << 8 | (uint)pbVar1[1];
if ((3 < uVar3) && (uVar3 <= *(ushort *)(param_2 + 0xe))) {
return pbVar1;
}
LAB_001483d9:
param_1[0x32] = -1;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
return (byte *)0x0;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.