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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,000 | my_uca_scanner_init_any | eloqsql/strings/ctype-uca.c | static void
my_uca_scanner_init_any(my_uca_scanner *scanner,
CHARSET_INFO *cs,
const MY_UCA_WEIGHT_LEVEL *level,
const uchar *str, size_t length)
{
/* Note, no needs to initialize scanner->wbeg */
scanner->sbeg= str;
scanner->send= str + length;
scanner->wbeg= nochar;
scanner->level= level;
scanner->cs= cs;
} | O0 | c | my_uca_scanner_init_any:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0xa9a01(%rip), %rcx # 0xf3940
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopl (%rax)
| my_uca_scanner_init_any:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rcx, [rbp+var_20]
add rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_8]
lea rcx, nochar
mov [rax], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+30h], rcx
pop rbp
retn
| _QWORD * my_uca_scanner_init_any(_QWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
_QWORD *result; // rax
a1[1] = a4;
a1[2] = a5 + a4;
*a1 = &nochar;
a1[3] = a3;
result = a1;
a1[6] = a2;
return result;
}
| my_uca_scanner_init_any:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1f3940]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],RCX
POP RBP
RET
|
void my_uca_scanner_init_any
(int8 *param_1,int8 param_2,int8 param_3,long param_4,long param_5)
{
param_1[1] = param_4;
param_1[2] = param_4 + param_5;
*param_1 = &nochar;
param_1[3] = param_3;
param_1[6] = param_2;
return;
}
| |
23,001 | Catch::makeStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | auto makeStream( std::string const& filename ) -> Detail::unique_ptr<IStream> {
if ( filename.empty() || filename == "-" ) {
return Detail::make_unique<Detail::CoutStream>();
}
if( filename[0] == '%' ) {
if ( filename == "%debug" ) {
return Detail::make_unique<Detail::DebugOutStream>();
} else if ( filename == "%stderr" ) {
return Detail::make_unique<Detail::CerrStream>();
} else if ( filename == "%stdout" ) {
return Detail::make_unique<Detail::CoutStream>();
} else {
CATCH_ERROR( "Unrecognised stream: '" << filename << '\'' );
}
}
return Detail::make_unique<Detail::FileStream>( filename );
} | O3 | cpp | Catch::makeStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x4d3ea
movq %rsi, %r12
leaq 0x91c97(%rip), %rsi # 0xdf027
movq %r12, %rdi
callq 0x2f448
testl %eax, %eax
je 0x4d3ea
movq (%r12), %rax
cmpb $0x25, (%rax)
jne 0x4d402
leaq 0x90857(%rip), %rsi # 0xddc03
movq %r12, %rdi
callq 0x2f448
testl %eax, %eax
je 0x4d457
leaq 0x8fcaa(%rip), %rsi # 0xdd06d
movq %r12, %rdi
callq 0x2f448
testl %eax, %eax
je 0x4d4dd
leaq 0x90830(%rip), %rsi # 0xddc0a
movq %r12, %rdi
callq 0x2f448
testl %eax, %eax
jne 0x4d58c
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x5c9ee
movq (%r14), %rax
movq %rax, (%rbx)
jmp 0x4d516
movl $0x208, %edi # imm = 0x208
callq 0x171f0
movq %rax, %r14
leaq 0xe2fc2(%rip), %rax # 0x1303d8
movq %rax, (%r14)
movq %r14, %r15
addq $0x8, %r15
movq %r15, %rdi
callq 0x172b0
movq (%r12), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x17d10
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x4d525
orb $0x20, 0x21(%r14,%rax)
jmp 0x4d513
movl $0x120, %edi # imm = 0x120
callq 0x171f0
movq %rax, %r14
leaq 0xe2e45(%rip), %rax # 0x1302b0
movq %rax, (%r14)
movl $0x148, %edi # imm = 0x148
callq 0x171f0
movq %rax, %r15
movq 0xe4b06(%rip), %rax # 0x131f88
addq $0x10, %rax
movq %rax, (%r15)
leaq 0x38(%r15), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x28(%r15)
callq 0x17930
leaq 0xe2e4d(%rip), %rax # 0x1302f8
movq %rax, (%r15)
leaq 0x40(%r15), %rax
movq %r15, %rcx
addq $0x140, %rcx # imm = 0x140
movq %rax, 0x28(%r15)
movq %rax, 0x20(%r15)
movq %rcx, 0x30(%r15)
movq %r15, 0x8(%r14)
movq %r14, %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x17e00
jmp 0x4d513
movl $0x118, %edi # imm = 0x118
callq 0x171f0
movq %rax, %r14
leaq 0xe2e9f(%rip), %rax # 0x130390
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq 0xe4ac9(%rip), %rax # 0x131fc8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq 0xe8(%rax,%rcx), %rsi
callq 0x17e00
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
callq 0x5e2c8
movq 0x10(%rsp), %rdi
leaq 0x91f46(%rip), %rsi # 0xdf481
movl $0x16, %edx
callq 0x17be0
movq 0x10(%rsp), %rdi
movq (%r12), %rsi
movq 0x8(%r12), %rdx
callq 0x17be0
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movb $0x27, (%rsi)
movl $0x1, %edx
callq 0x17be0
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
leaq 0x18(%rsp), %rdi
callq 0x17c70
leaq 0x18(%rsp), %rdi
callq 0x4aaa7
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5e2c8
movq 0x8(%rbx), %rdi
leaq 0x9066e(%rip), %rsi # 0xddc12
movl $0x16, %edx
callq 0x17be0
movq 0x10(%rsp), %rdi
movq (%r12), %rsi
movq 0x8(%r12), %rdx
callq 0x17be0
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movb $0x27, (%rsi)
movl $0x1, %edx
callq 0x17be0
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
leaq 0x18(%rsp), %rdi
callq 0x17c70
leaq 0x18(%rsp), %rdi
callq 0x4aaa7
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d646
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x4d646
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d655
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
jmp 0x4d655
jmp 0x4d643
jmp 0x4d652
movq %rax, %rbx
movl $0x118, %esi # imm = 0x118
jmp 0x4d696
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5e2f4
jmp 0x4d69e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5e2f4
jmp 0x4d684
movq %rax, %rbx
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x4d678
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4d678
movq %rax, %rbx
movl $0x120, %esi # imm = 0x120
jmp 0x4d696
jmp 0x4d681
movq %rax, %rbx
movq %r15, %rdi
callq 0x17920
jmp 0x4d691
movq %rax, %rbx
movl $0x208, %esi # imm = 0x208
movq %r14, %rdi
callq 0x17150
movq %rbx, %rdi
callq 0x17740
| _ZN5Catch10makeStreamERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
cmp qword ptr [rsi+8], 0
jz short loc_4D3EA
mov r12, rsi
lea rsi, aNone+7; "-"
mov rdi, r12
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_4D3EA
mov rax, [r12]
cmp byte ptr [rax], 25h ; '%'
jnz short loc_4D402
lea rsi, aDebug; "%debug"
mov rdi, r12
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_4D457
lea rsi, aStderr; "%stderr"
mov rdi, r12
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_4D4DD
lea rsi, aStdout; "%stdout"
mov rdi, r12
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_4D58C
loc_4D3EA:
lea r14, [rsp+58h+var_40]
mov rdi, r14
call _ZN5Catch6Detail11make_uniqueINS0_12_GLOBAL__N_110CoutStreamEJEEENS0_10unique_ptrIT_EEDpOT0_; Catch::Detail::make_unique<Catch::Detail::`anonymous namespace'::CoutStream>()
mov rax, [r14]
mov [rbx], rax
jmp loc_4D516
loc_4D402:
mov edi, 208h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, off_1303D8
mov [r14], rax
mov r15, r14
add r15, 8
mov rdi, r15
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev; std::ofstream::basic_ofstream(void)
mov rsi, [r12]
mov rdi, r15
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode; std::ofstream::open(char const*,std::_Ios_Openmode)
mov rax, [r15]
mov rax, [rax-18h]
test byte ptr [r15+rax+20h], 5
jnz loc_4D525
or byte ptr [r14+rax+21h], 20h
jmp loc_4D513
loc_4D457:
mov edi, 120h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, off_1302B0
mov [r14], rax
mov edi, 148h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [r15], rax
lea rdi, [r15+38h]; this
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
movups xmmword ptr [r15+18h], xmm0
movups xmmword ptr [r15+28h], xmm0
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, off_1302F8
mov [r15], rax
lea rax, [r15+40h]
mov rcx, r15
add rcx, 140h
mov [r15+28h], rax
mov [r15+20h], rax
mov [r15+30h], rcx
mov [r14+8], r15
mov rdi, r14
add rdi, 10h
mov rsi, r15
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
jmp short loc_4D513
loc_4D4DD:
mov edi, 118h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, off_130390
mov [r14], rax
lea rdi, [r14+8]
mov rax, cs:_ZSt4cerr_ptr
mov rcx, [rax]
mov rcx, [rcx-18h]
mov rsi, [rax+rcx+0E8h]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
loc_4D513:
mov [rbx], r14
loc_4D516:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_4D525:
lea rdi, [rsp+58h+var_50]; this
call _ZN5Catch20ReusableStringStreamC2Ev; Catch::ReusableStringStream::ReusableStringStream(void)
mov rdi, [rsp+58h+var_48]
lea rsi, aUnableToOpenFi; "Unable to open file: '"
mov edx, 16h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+58h+var_48]
mov rsi, [r12]
mov rdx, [r12+8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+58h+var_48]
lea rsi, [rsp+58h+var_40]
mov byte ptr [rsi], 27h ; '''
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+58h+var_48]
add rsi, 8
lea rdi, [rsp+58h+var_40]
call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+58h+var_40]
call _ZN5Catch18throw_domain_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Catch::throw_domain_error(std::string const&)
loc_4D58C:
lea rbx, [rsp+58h+var_50]
mov rdi, rbx; this
call _ZN5Catch20ReusableStringStreamC2Ev; Catch::ReusableStringStream::ReusableStringStream(void)
mov rdi, [rbx+8]
lea rsi, aUnrecognisedSt; "Unrecognised stream: '"
mov edx, 16h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+58h+var_48]
mov rsi, [r12]
mov rdx, [r12+8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+58h+var_48]
lea rsi, [rsp+58h+var_40]
mov byte ptr [rsi], 27h ; '''
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+58h+var_48]
add rsi, 8
lea rdi, [rsp+58h+var_40]
call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+58h+var_40]
call _ZN5Catch18throw_domain_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Catch::throw_domain_error(std::string const&)
mov rbx, rax
lea rax, [rsp+58h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4D646
mov rsi, [rsp+58h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4D646
mov rbx, rax
lea rax, [rsp+58h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4D655
mov rsi, [rsp+58h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4D655
jmp short loc_4D643
jmp short loc_4D652
mov rbx, rax
mov esi, 118h
jmp short loc_4D696
loc_4D643:
mov rbx, rax
loc_4D646:
lea rdi, [rsp+58h+var_50]; this
call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream()
jmp short loc_4D69E
loc_4D652:
mov rbx, rax
loc_4D655:
lea rdi, [rsp+58h+var_50]; this
call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream()
jmp short loc_4D684
mov rbx, rax
mov rdi, [r14+8]
test rdi, rdi
jz short loc_4D678
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_4D678
mov rbx, rax
loc_4D678:
mov esi, 120h
jmp short loc_4D696
jmp short $+2
loc_4D681:
mov rbx, rax
loc_4D684:
mov rdi, r15
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp short loc_4D691
mov rbx, rax
loc_4D691:
mov esi, 208h; unsigned __int64
loc_4D696:
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_4D69E:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * Catch::makeStream(_QWORD *a1, _QWORD *a2, double a3)
{
_QWORD *v3; // r14
long long v4; // rax
long long v5; // r15
_BYTE v7[8]; // [rsp+8h] [rbp-50h] BYREF
long long v8; // [rsp+10h] [rbp-48h]
_QWORD v9[2]; // [rsp+18h] [rbp-40h] BYREF
if ( a2[1] && (unsigned int)std::string::compare(a2, (long long)"-") )
{
if ( *(_BYTE *)*a2 == 37 )
{
if ( !(unsigned int)std::string::compare(a2, (long long)"%debug") )
{
v3 = (_QWORD *)operator new(0x120uLL);
*v3 = off_1302B0;
v5 = operator new(0x148uLL);
*(_QWORD *)v5 = (char *)&`vtable for'std::streambuf + 16;
*(_OWORD *)(v5 + 8) = 0LL;
*(_OWORD *)(v5 + 24) = 0LL;
*(_OWORD *)(v5 + 40) = 0LL;
std::locale::locale((std::locale *)(v5 + 56));
*(_QWORD *)v5 = &off_1302F8;
*(_QWORD *)(v5 + 40) = v5 + 64;
*(_QWORD *)(v5 + 32) = v5 + 64;
*(_QWORD *)(v5 + 48) = v5 + 320;
v3[1] = v5;
std::ostream::ostream(v3 + 2, v5);
}
else
{
if ( (unsigned int)std::string::compare(a2, (long long)"%stderr") )
{
if ( (unsigned int)std::string::compare(a2, (long long)"%stdout") )
{
Catch::ReusableStringStream::ReusableStringStream((Catch::ReusableStringStream *)v7);
std::__ostream_insert<char,std::char_traits<char>>(v8, "Unrecognised stream: '", 22LL);
std::__ostream_insert<char,std::char_traits<char>>(v8, *a2, a2[1]);
LOBYTE(v9[0]) = 39;
std::__ostream_insert<char,std::char_traits<char>>(v8, v9, 1LL);
std::stringbuf::str(v9, v8 + 8, a3);
Catch::throw_domain_error((long long)v9);
}
goto LABEL_7;
}
v3 = (_QWORD *)operator new(0x118uLL);
*v3 = off_130390;
std::ostream::ostream(v3 + 1, *(_QWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 232));
}
}
else
{
v3 = (_QWORD *)operator new(0x208uLL);
*v3 = off_1303D8;
std::ofstream::basic_ofstream(v3 + 1);
std::ofstream::open(v3 + 1, *a2, 16LL);
v4 = *(_QWORD *)(v3[1] - 24LL);
if ( (*((_BYTE *)v3 + v4 + 40) & 5) != 0 )
{
Catch::ReusableStringStream::ReusableStringStream((Catch::ReusableStringStream *)v7);
std::__ostream_insert<char,std::char_traits<char>>(v8, "Unable to open file: '", 22LL);
std::__ostream_insert<char,std::char_traits<char>>(v8, *a2, a2[1]);
LOBYTE(v9[0]) = 39;
std::__ostream_insert<char,std::char_traits<char>>(v8, v9, 1LL);
std::stringbuf::str(v9, v8 + 8, a3);
Catch::throw_domain_error((long long)v9);
}
*((_BYTE *)v3 + v4 + 33) |= 0x20u;
}
*a1 = v3;
return a1;
}
LABEL_7:
Catch::Detail::make_unique<Catch::Detail::`anonymous namespace'::CoutStream>(v9);
*a1 = v9[0];
return a1;
}
| makeStream:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
CMP qword ptr [RSI + 0x8],0x0
JZ 0x0014d3ea
MOV R12,RSI
LEA RSI,[0x1df027]
MOV RDI,R12
CALL 0x0012f448
TEST EAX,EAX
JZ 0x0014d3ea
MOV RAX,qword ptr [R12]
CMP byte ptr [RAX],0x25
JNZ 0x0014d402
LEA RSI,[0x1ddc03]
MOV RDI,R12
CALL 0x0012f448
TEST EAX,EAX
JZ 0x0014d457
LEA RSI,[0x1dd06d]
MOV RDI,R12
CALL 0x0012f448
TEST EAX,EAX
JZ 0x0014d4dd
LEA RSI,[0x1ddc0a]
MOV RDI,R12
CALL 0x0012f448
TEST EAX,EAX
JNZ 0x0014d58c
LAB_0014d3ea:
LEA R14,[RSP + 0x18]
MOV RDI,R14
CALL 0x0015c9ee
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX],RAX
JMP 0x0014d516
LAB_0014d402:
MOV EDI,0x208
CALL 0x001171f0
MOV R14,RAX
LEA RAX,[0x2303d8]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x8
LAB_0014d420:
MOV RDI,R15
CALL 0x001172b0
MOV RSI,qword ptr [R12]
LAB_0014d42c:
MOV RDI,R15
MOV EDX,0x10
CALL 0x00117d10
LAB_0014d439:
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + -0x18]
TEST byte ptr [R15 + RAX*0x1 + 0x20],0x5
JNZ 0x0014d525
OR byte ptr [R14 + RAX*0x1 + 0x21],0x20
JMP 0x0014d513
LAB_0014d457:
MOV EDI,0x120
CALL 0x001171f0
MOV R14,RAX
LEA RAX,[0x2302b0]
MOV qword ptr [R14],RAX
LAB_0014d46e:
MOV EDI,0x148
CALL 0x001171f0
MOV R15,RAX
MOV RAX,qword ptr [0x00231f88]
ADD RAX,0x10
MOV qword ptr [R15],RAX
LEA RDI,[R15 + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
MOVUPS xmmword ptr [R15 + 0x18],XMM0
MOVUPS xmmword ptr [R15 + 0x28],XMM0
CALL 0x00117930
LEA RAX,[0x2302f8]
MOV qword ptr [R15],RAX
LEA RAX,[R15 + 0x40]
MOV RCX,R15
ADD RCX,0x140
MOV qword ptr [R15 + 0x28],RAX
MOV qword ptr [R15 + 0x20],RAX
MOV qword ptr [R15 + 0x30],RCX
MOV qword ptr [R14 + 0x8],R15
MOV RDI,R14
ADD RDI,0x10
LAB_0014d4d3:
MOV RSI,R15
CALL 0x00117e00
LAB_0014d4db:
JMP 0x0014d513
LAB_0014d4dd:
MOV EDI,0x118
CALL 0x001171f0
MOV R14,RAX
LEA RAX,[0x230390]
MOV qword ptr [R14],RAX
LEA RDI,[R14 + 0x8]
MOV RAX,qword ptr [0x00231fc8]
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV RSI,qword ptr [RAX + RCX*0x1 + 0xe8]
LAB_0014d50e:
CALL 0x00117e00
LAB_0014d513:
MOV qword ptr [RBX],R14
LAB_0014d516:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0014d525:
LEA RDI,[RSP + 0x8]
CALL 0x0015e2c8
MOV RDI,qword ptr [RSP + 0x10]
LAB_0014d534:
LEA RSI,[0x1df481]
MOV EDX,0x16
CALL 0x00117be0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
CALL 0x00117be0
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x18]
MOV byte ptr [RSI],0x27
LAB_0014d565:
MOV EDX,0x1
CALL 0x00117be0
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x8
LEA RDI,[RSP + 0x18]
CALL 0x00117c70
LAB_0014d582:
LEA RDI,[RSP + 0x18]
CALL 0x0014aaa7
LAB_0014d58c:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0015e2c8
MOV RDI,qword ptr [RBX + 0x8]
LAB_0014d59d:
LEA RSI,[0x1ddc12]
MOV EDX,0x16
CALL 0x00117be0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
CALL 0x00117be0
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x18]
MOV byte ptr [RSI],0x27
LAB_0014d5ce:
MOV EDX,0x1
CALL 0x00117be0
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x8
LEA RDI,[RSP + 0x18]
CALL 0x00117c70
LAB_0014d5eb:
LEA RDI,[RSP + 0x18]
CALL 0x0014aaa7
LAB_0014d5f5:
MOV RBX,RAX
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014d646
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00117150
JMP 0x0014d646
LAB_0014d646:
LEA RDI,[RSP + 0x8]
CALL 0x0015e2f4
JMP 0x0014d69e
LAB_0014d69e:
MOV RDI,RBX
CALL 0x00117740
|
/* Catch::makeStream(std::__cxx11::string const&) */
Catch * __thiscall Catch::makeStream(Catch *this,string *param_1)
{
byte *pbVar1;
int iVar2;
streambuf *psVar3;
int8 *puVar4;
int8 uVar5;
ofstream *this_00;
ReusableStringStream local_50 [8];
ostream *local_48;
Detail local_40;
int7 uStack_3f;
long local_30 [2];
if ((*(long *)(param_1 + 8) != 0) &&
(iVar2 = std::__cxx11::string::compare(param_1,"-"), iVar2 != 0)) {
if (**(char **)param_1 == '%') {
iVar2 = std::__cxx11::string::compare(param_1,"%debug");
if (iVar2 == 0) {
puVar4 = (int8 *)operator_new(0x120);
*puVar4 = &PTR__DebugOutStream_002302b0;
/* try { // try from 0014d46e to 0014d477 has its CatchHandler @ 0014d675 */
psVar3 = (streambuf *)operator_new(0x148);
*(int **)psVar3 = PTR_vtable_00231f88 + 0x10;
*(int8 *)(psVar3 + 8) = 0;
*(int8 *)(psVar3 + 0x10) = 0;
*(int8 *)(psVar3 + 0x18) = 0;
*(int8 *)(psVar3 + 0x20) = 0;
*(int8 *)(psVar3 + 0x28) = 0;
*(int8 *)(psVar3 + 0x30) = 0;
std::locale::locale((locale *)(psVar3 + 0x38));
*(int ***)psVar3 = &PTR__StreamBufImpl_002302f8;
*(streambuf **)(psVar3 + 0x28) = psVar3 + 0x40;
*(streambuf **)(psVar3 + 0x20) = psVar3 + 0x40;
*(streambuf **)(psVar3 + 0x30) = psVar3 + 0x140;
puVar4[1] = psVar3;
/* try { // try from 0014d4d3 to 0014d4da has its CatchHandler @ 0014d661 */
std::ostream::ostream((ostream *)(puVar4 + 2),psVar3);
}
else {
iVar2 = std::__cxx11::string::compare(param_1,"%stderr");
if (iVar2 != 0) {
iVar2 = std::__cxx11::string::compare(param_1,"%stdout");
if (iVar2 != 0) goto LAB_0014d58c;
goto LAB_0014d3ea;
}
puVar4 = (int8 *)operator_new(0x118);
*puVar4 = &PTR__CerrStream_00230390;
/* try { // try from 0014d50e to 0014d512 has its CatchHandler @ 0014d639 */
std::ostream::ostream
((ostream *)(puVar4 + 1),
*(streambuf **)
(PTR_cerr_00231fc8 + *(long *)(*(long *)PTR_cerr_00231fc8 + -0x18) + 0xe8));
}
}
else {
puVar4 = (int8 *)operator_new(0x208);
*puVar4 = &PTR__FileStream_002303d8;
this_00 = (ofstream *)(puVar4 + 1);
/* try { // try from 0014d420 to 0014d427 has its CatchHandler @ 0014d68e */
std::ofstream::ofstream(this_00);
/* try { // try from 0014d42c to 0014d438 has its CatchHandler @ 0014d681 */
std::ofstream::open(this_00,*(int8 *)param_1,0x10);
if ((*(byte *)((long)puVar4 + *(long *)(*(long *)this_00 + -0x18) + 0x28) & 5) != 0) {
/* try { // try from 0014d525 to 0014d52e has its CatchHandler @ 0014d67f */
ReusableStringStream::ReusableStringStream(local_50);
/* try { // try from 0014d534 to 0014d557 has its CatchHandler @ 0014d652 */
std::__ostream_insert<char,std::char_traits<char>>(local_48,"Unable to open file: \'",0x16);
std::__ostream_insert<char,std::char_traits<char>>
(local_48,*(char **)param_1,*(long *)(param_1 + 8));
local_40 = (Detail)0x27;
/* try { // try from 0014d565 to 0014d581 has its CatchHandler @ 0014d637 */
std::__ostream_insert<char,std::char_traits<char>>(local_48,(char *)&local_40,1);
std::__cxx11::stringbuf::str();
/* try { // try from 0014d582 to 0014d58b has its CatchHandler @ 0014d615 */
throw_domain_error((string *)&local_40);
LAB_0014d58c:
ReusableStringStream::ReusableStringStream(local_50);
/* try { // try from 0014d59d to 0014d5c0 has its CatchHandler @ 0014d643 */
std::__ostream_insert<char,std::char_traits<char>>(local_48,"Unrecognised stream: \'",0x16);
std::__ostream_insert<char,std::char_traits<char>>
(local_48,*(char **)param_1,*(long *)(param_1 + 8));
local_40 = (Detail)0x27;
/* try { // try from 0014d5ce to 0014d5ea has its CatchHandler @ 0014d635 */
std::__ostream_insert<char,std::char_traits<char>>(local_48,(char *)&local_40,1);
std::__cxx11::stringbuf::str();
/* try { // try from 0014d5eb to 0014d5f4 has its CatchHandler @ 0014d5f5 */
uVar5 = throw_domain_error((string *)&local_40);
/* catch() { ... } // from try @ 0014d5eb with catch @ 0014d5f5 */
if ((long *)CONCAT71(uStack_3f,local_40) != local_30) {
operator_delete((long *)CONCAT71(uStack_3f,local_40),local_30[0] + 1);
}
ReusableStringStream::~ReusableStringStream(local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
pbVar1 = (byte *)((long)puVar4 + *(long *)(*(long *)this_00 + -0x18) + 0x21);
*pbVar1 = *pbVar1 | 0x20;
}
*(int8 **)this = puVar4;
return this;
}
LAB_0014d3ea:
Detail::make_unique<Catch::Detail::(anonymous_namespace)::CoutStream>(&local_40);
*(ulong *)this = CONCAT71(uStack_3f,local_40);
return this;
}
| |
23,002 | uf_space_endspace_selected | eloqsql/storage/maria/ma_packrec.c | static void uf_space_endspace_selected(MARIA_COLUMNDEF *rec,
MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill(to, (end-to), ' ');
else
{
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill(end - spaces, spaces, ' ');
}
else
decode_bytes(rec,bit_buff,to,end);
}
} | O3 | c | uf_space_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x3a73c
movl (%r15), %r12d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jb 0x3a7b1
testl %eax, %eax
jne 0x3a759
movq %r15, %rdi
callq 0x3a300
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
testl %r12d, %r12d
jns 0x3a7c4
movl $0x1f, %eax
jmp 0x3a765
movq %r15, %rdi
callq 0x3a300
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
movl $0x1f, %eax
testl %r12d, %r12d
js 0x3a7b1
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jae 0x3a7c4
movq %r13, %rdx
movl 0x24(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x3a7e3
subl %eax, %r13d
movl %eax, %eax
leaq 0xa682d(%rip), %rcx # 0xe0fb0
andl (%rcx,%rax,4), %r12d
movl %r13d, %ecx
shll %cl, %r12d
movq %r15, %rdi
callq 0x3a300
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r12d
jmp 0x3a7f8
subq %r14, %rbx
movq %r14, %rdi
movl $0x20, %esi
movq %rbx, %rdx
jmp 0x3a847
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a4bd
movl %ecx, 0x4(%r15)
shrl %cl, %r12d
movl 0x24(%rdx), %eax
leaq 0xa67bc(%rip), %rcx # 0xe0fb0
andl (%rcx,%rax,4), %r12d
movl %r12d, %r13d
leaq (%r14,%r13), %rax
cmpq %rbx, %rax
jbe 0x3a81b
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r12
negq %r12
cmpq %rbx, %rax
je 0x3a839
leaq (%rbx,%r12), %rcx
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a4bd
addq %r12, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
| uf_space_endspace_selected:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_3A73C
mov r12d, [r15]
dec eax
mov [r15+4], eax
bt r12d, eax
jb loc_3A7B1
test eax, eax
jnz short loc_3A759
mov rdi, r15
call fill_buffer
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
test r12d, r12d
jns loc_3A7C4
mov eax, 1Fh
jmp short loc_3A765
loc_3A73C:
mov rdi, r15
call fill_buffer
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
mov eax, 1Fh
test r12d, r12d
js short loc_3A7B1
loc_3A759:
dec eax
mov [r15+4], eax
bt r12d, eax
jnb short loc_3A7C4
loc_3A765:
mov rdx, r13
mov r13d, [r13+24h]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_3A7E3
sub r13d, eax
mov eax, eax
lea rcx, mask
and r12d, [rcx+rax*4]
mov ecx, r13d
shl r12d, cl
mov rdi, r15
call fill_buffer
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r12d, eax
jmp short loc_3A7F8
loc_3A7B1:
sub rbx, r14
mov rdi, r14
mov esi, 20h ; ' '
mov rdx, rbx
jmp loc_3A847
loc_3A7C4:
mov rdi, r13
mov rsi, r15
mov rdx, r14
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes
loc_3A7E3:
mov [r15+4], ecx
shr r12d, cl
mov eax, [rdx+24h]
lea rcx, mask
and r12d, [rcx+rax*4]
loc_3A7F8:
mov r13d, r12d
lea rax, [r14+r13]
cmp rax, rbx
jbe short loc_3A81B
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3A81B:
mov r12, r13
neg r12
cmp rax, rbx
jz short loc_3A839
lea rcx, [rbx+r12]
mov rdi, [rbp+var_30]
mov rsi, r15
mov rdx, r14
call decode_bytes
loc_3A839:
add rbx, r12
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
loc_3A847:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
| _BYTE * uf_space_endspace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
unsigned int v6; // eax
unsigned int v7; // r12d
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // r13d
unsigned int v11; // ecx
int v12; // r13d
int v13; // r12d
unsigned int v14; // r12d
_BYTE *result; // rax
v6 = a2[1];
if ( !v6 )
{
fill_buffer((long long)a2);
a2[1] = 31;
v7 = *a2;
v8 = 31;
if ( (*a2 & 0x80000000) == 0 )
{
LABEL_7:
v9 = v8 - 1;
a2[1] = v9;
if ( _bittest((const int *)&v7, v9) )
goto LABEL_8;
return decode_bytes(a1, (long long)a2, a3, a4);
}
return (_BYTE *)memset(a3, 32LL, a4 - a3);
}
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( _bittest((const int *)&v7, v8) )
return (_BYTE *)memset(a3, 32LL, a4 - a3);
if ( v8 )
goto LABEL_7;
fill_buffer((long long)a2);
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
v9 = 31;
LABEL_8:
v10 = *(_DWORD *)(a1 + 36);
v11 = v9 - v10;
if ( v9 >= v10 )
{
a2[1] = v11;
v14 = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v11);
}
else
{
v12 = v10 - v9;
v13 = (mask[v9] & v7) << v12;
fill_buffer((long long)a2);
a2[1] = 32 - v12;
v14 = (*a2 >> -(char)v12) + v13;
}
result = &a3[v14];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes(a1, (long long)a2, a3, &a4[-v14]);
return (_BYTE *)memset(&a4[-v14], 32LL, v14);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_space_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0013a73c
MOV R12D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JC 0x0013a7b1
TEST EAX,EAX
JNZ 0x0013a759
MOV RDI,R15
CALL 0x0013a300
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
TEST R12D,R12D
JNS 0x0013a7c4
MOV EAX,0x1f
JMP 0x0013a765
LAB_0013a73c:
MOV RDI,R15
CALL 0x0013a300
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
MOV EAX,0x1f
TEST R12D,R12D
JS 0x0013a7b1
LAB_0013a759:
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JNC 0x0013a7c4
LAB_0013a765:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x24]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x0013a7e3
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e0fb0]
AND R12D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R12D,CL
MOV RDI,R15
CALL 0x0013a300
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R12D,EAX
JMP 0x0013a7f8
LAB_0013a7b1:
SUB RBX,R14
MOV RDI,R14
MOV ESI,0x20
MOV RDX,RBX
JMP 0x0013a847
LAB_0013a7c4:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013a4bd
LAB_0013a7e3:
MOV dword ptr [R15 + 0x4],ECX
SHR R12D,CL
MOV EAX,dword ptr [RDX + 0x24]
LEA RCX,[0x1e0fb0]
AND R12D,dword ptr [RCX + RAX*0x4]
LAB_0013a7f8:
MOV R13D,R12D
LEA RAX,[R14 + R13*0x1]
CMP RAX,RBX
JBE 0x0013a81b
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013a81b:
MOV R12,R13
NEG R12
CMP RAX,RBX
JZ 0x0013a839
LEA RCX,[RBX + R12*0x1]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV RDX,R14
CALL 0x0013a4bd
LAB_0013a839:
ADD RBX,R12
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
LAB_0013a847:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
size_t __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if ((int)uVar5 < 0) goto LAB_0013a7b1;
LAB_0013a759:
uVar3 = uVar3 - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_0013a7c4:
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_0013a7b1:
__n = param_4 - (long)param_3;
goto LAB_0013a847;
}
if (uVar3 != 0) goto LAB_0013a759;
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if (-1 < (int)uVar5) goto LAB_0013a7c4;
uVar3 = 0x1f;
}
uVar1 = *(uint *)(param_1 + 0x24);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
__n = (size_t)uVar5;
if (param_4 < (long)param_3 + __n) {
param_2[10] = 1;
return;
}
if ((long)param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
param_3 = (void *)(param_4 + -__n);
LAB_0013a847:
memset(param_3,0x20,__n);
return;
}
| |
23,003 | js_regexp_Symbol_match | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_Symbol_match(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// [Symbol.match](str)
JSValue rx = this_val;
JSValue A, S, flags, result, matchStr;
int global, n, fullUnicode, isEmpty;
JSString *p;
if (!JS_IsObject(rx))
return JS_ThrowTypeErrorNotAnObject(ctx);
A = JS_UNDEFINED;
flags = JS_UNDEFINED;
result = JS_UNDEFINED;
matchStr = JS_UNDEFINED;
S = JS_ToString(ctx, argv[0]);
if (JS_IsException(S))
goto exception;
flags = JS_GetProperty(ctx, rx, JS_ATOM_flags);
if (JS_IsException(flags))
goto exception;
flags = JS_ToStringFree(ctx, flags);
if (JS_IsException(flags))
goto exception;
p = JS_VALUE_GET_STRING(flags);
// TODO(bnoordhuis) query 'u' flag the same way?
global = (-1 != string_indexof_char(p, 'g', 0));
if (!global) {
A = JS_RegExpExec(ctx, rx, S);
} else {
fullUnicode = JS_ToBoolFree(ctx, JS_GetProperty(ctx, rx, JS_ATOM_unicode));
if (fullUnicode < 0)
goto exception;
if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, js_int32(0)) < 0)
goto exception;
A = JS_NewArray(ctx);
if (JS_IsException(A))
goto exception;
n = 0;
for(;;) {
JS_FreeValue(ctx, result);
result = JS_RegExpExec(ctx, rx, S);
if (JS_IsException(result))
goto exception;
if (JS_IsNull(result))
break;
matchStr = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, result, 0));
if (JS_IsException(matchStr))
goto exception;
isEmpty = JS_IsEmptyString(matchStr);
if (JS_SetPropertyInt64(ctx, A, n++, matchStr) < 0)
goto exception;
if (isEmpty) {
int64_t thisIndex, nextIndex;
if (JS_ToLengthFree(ctx, &thisIndex,
JS_GetProperty(ctx, rx, JS_ATOM_lastIndex)) < 0)
goto exception;
p = JS_VALUE_GET_STRING(S);
nextIndex = string_advance_index(p, thisIndex, fullUnicode);
if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, js_int64(nextIndex)) < 0)
goto exception;
}
}
if (n == 0) {
JS_FreeValue(ctx, A);
A = JS_NULL;
}
}
JS_FreeValue(ctx, result);
JS_FreeValue(ctx, flags);
JS_FreeValue(ctx, S);
return A;
exception:
JS_FreeValue(ctx, A);
JS_FreeValue(ctx, result);
JS_FreeValue(ctx, flags);
JS_FreeValue(ctx, S);
return JS_EXCEPTION;
} | O2 | c | js_regexp_Symbol_match:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $-0x1, %r14d
jne 0x4026e
movq %rsi, %r15
movq (%r8), %rsi
movq 0x8(%r8), %rdx
movq %rbx, %rdi
callq 0x1b03c
movq %rax, 0x28(%rsp)
pushq $0x3
popq %rbp
movq %rdx, 0x30(%rsp)
cmpl $0x6, %edx
jne 0x4027b
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %rbp, %r15
movq %rbp, %r8
xorl %ecx, %ecx
xorl %r12d, %r12d
jmp 0x403d8
movq %rbx, %rdi
callq 0x1d5e1
jmp 0x4041a
pushq $0x6e
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1b043
cmpl $0x6, %edx
jne 0x402a7
xorl %r13d, %r13d
movq %rbp, %r8
xorl %ecx, %ecx
xorl %r12d, %r12d
movq %rax, %r14
movq %rdx, %r15
jmp 0x403d8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2e049
movq %rdx, 0x8(%rsp)
cmpl $0x6, %edx
jne 0x402cf
xorl %r13d, %r13d
movq %rbp, %r8
xorl %ecx, %ecx
xorl %r12d, %r12d
movq %rax, %r14
jmp 0x403d3
pushq $0x67
popq %rsi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
xorl %edx, %edx
callq 0x414fc
cmpl $-0x1, %eax
je 0x40351
pushq $0x70
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1b043
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1cdfa
movl %eax, 0x4c(%rsp)
testl %eax, %eax
js 0x403b9
pushq $0x56
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1e446
testl %eax, %eax
js 0x403c3
movq %rbx, %rdi
callq 0x1b2bb
movq %rax, %rcx
movq %rdx, %r8
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %r8d
jne 0x40434
xorl %r13d, %r13d
jmp 0x403ce
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x28(%rsp), %r15
movq %r15, %rcx
movq 0x30(%rsp), %r14
movq %r14, %r8
callq 0x4133b
movq %rax, %rbp
movq %rdx, (%rsp)
movq %rax, %r12
shrq $0x20, %r12
pushq $0x3
popq %rdx
xorl %eax, %eax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1801e
shlq $0x20, %r12
movl %ebp, %eax
movq (%rsp), %rdx
jmp 0x40422
xorl %r13d, %r13d
movq %rbp, %r8
xorl %ecx, %ecx
jmp 0x403cb
movq %rbp, %r8
xorl %ecx, %ecx
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
shlq $0x20, %r12
movl %ecx, %esi
orq %r12, %rsi
movq %rbx, %rdi
movq %r8, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1801e
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x1801e
pushq $0x6
popq %rdx
xorl %eax, %eax
xorl %r12d, %r12d
orq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, (%rsp)
movq %rcx, 0x18(%rsp)
pushq $0x3
popq %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
xorl %esi, %esi
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
callq 0x4133b
movq %rdx, %rbp
cmpl $0x2, %ebp
movq %rdx, 0x20(%rsp)
je 0x40594
cmpl $0x6, %ebp
je 0x405b5
movq %rbx, %rdi
movq %rax, 0x38(%rsp)
movq %rax, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x1e178
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2e049
movq %rdx, %r9
cmpl $-0x7, %r9d
je 0x404d4
movb $0x1, %r13b
cmpl $0x6, %r9d
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rbp
movq (%rsp), %r8
jne 0x404ed
jmp 0x405d0
testl $0x7fffffff, 0x4(%rax) # imm = 0x7FFFFFFF
setne %r13b
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rbp
movq (%rsp), %r8
movq %rbx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x1f0a6
testl %eax, %eax
js 0x4057e
testb %r13b, %r13b
jne 0x4056c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x56
popq %r13
movl %r13d, %ecx
callq 0x1b043
movq %rdx, %rcx
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
movq %rax, %rdx
callq 0x3daf8
testl %eax, %eax
js 0x4057e
movq 0x50(%rsp), %rsi
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %edx
callq 0x41551
movq %rax, %rdi
callq 0x20a0b
movq %rdx, %r9
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %r13d, %ecx
movq %rax, %r8
callq 0x1e446
testl %eax, %eax
js 0x4057e
incq %rbp
movq %rbp, 0x40(%rsp)
movq 0x38(%rsp), %rsi
jmp 0x40450
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
movq 0x38(%rsp), %r13
movq 0x20(%rsp), %rbp
jmp 0x405c2
cmpq $0x0, 0x40(%rsp)
je 0x405e9
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rbp
jmp 0x40382
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
movq %rax, %r13
movq 0x18(%rsp), %rcx
movq (%rsp), %r8
jmp 0x403d8
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
movq 0x38(%rsp), %r13
movq 0x20(%rsp), %rbp
jmp 0x403d8
movq %rbx, %rdi
movq %rax, %r14
movq 0x18(%rsp), %rsi
movq (%rsp), %rdx
callq 0x1801e
movq %r14, %rax
pushq $0x2
popq %rcx
movq %rcx, (%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rdx
jmp 0x40382
| js_regexp_Symbol_match:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rdi
cmp r14d, 0FFFFFFFFh
jnz short loc_4026E
mov r15, rsi
mov rsi, [r8]
mov rdx, [r8+8]
mov rdi, rbx
call JS_ToString
mov [rsp+88h+var_60], rax
push 3
pop rbp
mov [rsp+88h+var_58], rdx
cmp edx, 6
jnz short loc_4027B
xor r14d, r14d
xor r13d, r13d
mov r15, rbp
mov r8, rbp
xor ecx, ecx
xor r12d, r12d
jmp loc_403D8
loc_4026E:
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
jmp loc_4041A
loc_4027B:
push 6Eh ; 'n'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_GetProperty
cmp edx, 6
jnz short loc_402A7
xor r13d, r13d
mov r8, rbp
xor ecx, ecx
xor r12d, r12d
mov r14, rax
mov r15, rdx
jmp loc_403D8
loc_402A7:
mov rdi, rbx
mov rsi, rax
call JS_ToStringFree
mov [rsp+88h+var_80], rdx
cmp edx, 6
jnz short loc_402CF
xor r13d, r13d
mov r8, rbp
xor ecx, ecx
xor r12d, r12d
mov r14, rax
jmp loc_403D3
loc_402CF:
push 67h ; 'g'
pop rsi
mov [rsp+88h+var_78], rax
mov rdi, rax
xor edx, edx
call string_indexof_char
cmp eax, 0FFFFFFFFh
jz short loc_40351
push 70h ; 'p'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_GetProperty
mov rdi, rbx
mov rsi, rax
call JS_ToBoolFree
mov [rsp+88h+var_3C], eax
test eax, eax
js loc_403B9
push 56h ; 'V'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
xor r8d, r8d
xor r9d, r9d
call JS_SetProperty
test eax, eax
js loc_403C3
mov rdi, rbx
call JS_NewArray
mov rcx, rax
mov r8, rdx
mov r12, rax
shr r12, 20h
cmp r8d, 6
jnz loc_40434
xor r13d, r13d
jmp short loc_403CE
loc_40351:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov r15, [rsp+88h+var_60]
mov rcx, r15
mov r14, [rsp+88h+var_58]
mov r8, r14
call JS_RegExpExec
mov rbp, rax
mov [rsp+88h+var_88], rdx
mov r12, rax
shr r12, 20h
push 3
pop rdx
xor eax, eax
loc_40382:
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+88h+var_78]
mov rdx, [rsp+88h+var_80]
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
shl r12, 20h
mov eax, ebp
mov rdx, [rsp+88h+var_88]
jmp short loc_40422
loc_403B9:
xor r13d, r13d
mov r8, rbp
xor ecx, ecx
jmp short loc_403CB
loc_403C3:
mov r8, rbp
xor ecx, ecx
xor r13d, r13d
loc_403CB:
xor r12d, r12d
loc_403CE:
mov r14, [rsp+88h+var_78]
loc_403D3:
mov r15, [rsp+88h+var_80]
loc_403D8:
shl r12, 20h
mov esi, ecx
or rsi, r12
mov rdi, rbx
mov rdx, r8
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_58]
call JS_FreeValue
loc_4041A:
push 6
pop rdx
xor eax, eax
xor r12d, r12d
loc_40422:
or rax, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40434:
mov [rsp+88h+var_88], r8
mov [rsp+88h+var_70], rcx
push 3
pop rax
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_48], 0
xor esi, esi
loc_40450:
mov rdi, rbx
mov rdx, [rsp+88h+var_68]
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, [rsp+88h+var_60]
mov r8, [rsp+88h+var_58]
call JS_RegExpExec
mov rbp, rdx
cmp ebp, 2
mov [rsp+88h+var_68], rdx
jz loc_40594
cmp ebp, 6
jz loc_405B5
mov rdi, rbx
mov [rsp+88h+var_50], rax
mov rsi, rax
mov rdx, rbp
xor ecx, ecx
call JS_GetPropertyInt64
mov rdi, rbx
mov rsi, rax
call JS_ToStringFree
mov r9, rdx
cmp r9d, 0FFFFFFF9h
jz short loc_404D4
mov r13b, 1
cmp r9d, 6
mov rcx, [rsp+88h+var_70]
mov rbp, [rsp+88h+var_48]
mov r8, [rsp+88h+var_88]
jnz short loc_404ED
jmp loc_405D0
loc_404D4:
test dword ptr [rax+4], 7FFFFFFFh
setnz r13b
mov rcx, [rsp+88h+var_70]
mov rbp, [rsp+88h+var_48]
mov r8, [rsp+88h+var_88]
loc_404ED:
mov rdi, rbx
mov rsi, rcx
mov rdx, r8
mov rcx, rbp
mov r8, rax
call JS_SetPropertyInt64
test eax, eax
js short loc_4057E
test r13b, r13b
jnz short loc_4056C
mov rdi, rbx
mov rsi, r15
mov rdx, r14
push 56h ; 'V'
pop r13
mov ecx, r13d
call JS_GetProperty
mov rcx, rdx
mov rdi, rbx
lea rsi, [rsp+88h+var_38]
mov rdx, rax
call JS_ToLengthFree
test eax, eax
js short loc_4057E
mov rsi, [rsp+88h+var_38]
mov rdi, [rsp+88h+var_60]
mov edx, [rsp+88h+var_3C]
call string_advance_index
mov rdi, rax
call js_int64
mov r9, rdx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, r13d
mov r8, rax
call JS_SetProperty
test eax, eax
js short loc_4057E
loc_4056C:
inc rbp
mov [rsp+88h+var_48], rbp
mov rsi, [rsp+88h+var_50]
jmp loc_40450
loc_4057E:
mov r14, [rsp+88h+var_78]
mov r15, [rsp+88h+var_80]
mov r13, [rsp+88h+var_50]
mov rbp, [rsp+88h+var_68]
jmp short loc_405C2
loc_40594:
cmp [rsp+88h+var_48], 0
jz short loc_405E9
mov r14, [rsp+88h+var_58]
mov r15, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_68]
mov rbp, [rsp+88h+var_70]
jmp loc_40382
loc_405B5:
mov r14, [rsp+88h+var_78]
mov r15, [rsp+88h+var_80]
mov r13, rax
loc_405C2:
mov rcx, [rsp+88h+var_70]
mov r8, [rsp+88h+var_88]
jmp loc_403D8
loc_405D0:
mov r14, [rsp+88h+var_78]
mov r15, [rsp+88h+var_80]
mov r13, [rsp+88h+var_50]
mov rbp, [rsp+88h+var_68]
jmp loc_403D8
loc_405E9:
mov rdi, rbx
mov r14, rax
mov rsi, [rsp+88h+var_70]
mov rdx, [rsp+88h+var_88]
call JS_FreeValue
mov rax, r14
push 2
pop rcx
mov [rsp+88h+var_88], rcx
xor ebp, ebp
xor r12d, r12d
mov r14, [rsp+88h+var_58]
mov r15, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_68]
jmp loc_40382
| unsigned long long js_regexp_Symbol_match(
long long a1,
long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v16; // rdx
long long v17; // rbp
long long v18; // r14
long long v19; // r13
long long v20; // r15
long long v21; // r8
long long v22; // rcx
unsigned long long v23; // r12
long long Property; // rax
long long v25; // rdx
long long v26; // rax
long long v27; // rdx
long long v28; // rax
long long v29; // rdx
unsigned long long v30; // rax
long long v31; // rdx
long long v32; // rdx
long long v33; // r15
long long v34; // r14
unsigned long long v35; // rax
unsigned int v36; // ebp
long long v37; // rdx
long long v38; // rax
unsigned long long v39; // r12
long long v40; // rax
long long i; // rsi
unsigned long long PropertyInt64; // rax
long long v44; // rdx
long long v45; // rax
long long v46; // rdx
bool v47; // r13
unsigned long long v48; // rbp
_DWORD *v49; // rax
long long v50; // rdx
long long v51; // rax
int v52; // eax
int v53; // edx
long long v54; // r14
char v55; // [rsp+0h] [rbp-88h]
long long v56; // [rsp+0h] [rbp-88h]
long long v57; // [rsp+8h] [rbp-80h]
long long v58; // [rsp+10h] [rbp-78h]
long long v59; // [rsp+18h] [rbp-70h]
long long v60; // [rsp+20h] [rbp-68h]
long long v61; // [rsp+28h] [rbp-60h]
long long v62; // [rsp+30h] [rbp-58h]
long long v63; // [rsp+38h] [rbp-50h]
unsigned long long v64; // [rsp+40h] [rbp-48h]
int v65; // [rsp+4Ch] [rbp-3Ch]
unsigned long long v66[7]; // [rsp+50h] [rbp-38h] BYREF
if ( (_DWORD)a3 != -1 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v55);
LABEL_22:
v40 = 0LL;
v39 = 0LL;
return v39 | v40;
}
v61 = JS_ToString(a1, *a5, a5[1]);
v17 = 3LL;
v62 = v16;
if ( (_DWORD)v16 == 6 )
{
v18 = 0LL;
v19 = 0LL;
v20 = 3LL;
v21 = 3LL;
LODWORD(v22) = 0;
v23 = 0LL;
LABEL_21:
JS_FreeValue(a1, (v23 << 32) | (unsigned int)v22, v21);
JS_FreeValue(a1, v19, v17);
JS_FreeValue(a1, v18, v20);
JS_FreeValue(a1, v61, v62);
goto LABEL_22;
}
Property = JS_GetProperty(a1, a2, a3, 110);
if ( (_DWORD)v25 == 6 )
{
v19 = 0LL;
v21 = 3LL;
LODWORD(v22) = 0;
v23 = 0LL;
v18 = Property;
v20 = v25;
goto LABEL_21;
}
v26 = JS_ToStringFree(a1, Property, v25);
v57 = v27;
if ( (_DWORD)v27 == 6 )
{
v19 = 0LL;
v21 = 3LL;
LODWORD(v22) = 0;
v23 = 0LL;
v18 = v26;
LABEL_20:
v20 = v57;
goto LABEL_21;
}
v58 = v26;
if ( (unsigned int)string_indexof_char(v26, 103LL, 0LL) == -1 )
{
v32 = a3;
v33 = v61;
v34 = v62;
v35 = JS_RegExpExec(a1, a2, v32, v61, v62);
v36 = v35;
v23 = HIDWORD(v35);
v37 = 3LL;
v38 = 0LL;
goto LABEL_15;
}
v28 = JS_GetProperty(a1, a2, a3, 112);
v65 = JS_ToBoolFree(a1, v28, v29);
if ( v65 < 0 )
{
v19 = 0LL;
v21 = 3LL;
LODWORD(v22) = 0;
LABEL_18:
v23 = 0LL;
goto LABEL_19;
}
if ( (int)JS_SetProperty(a1, a2, a3, 86, 0, 0) < 0 )
{
v21 = 3LL;
LODWORD(v22) = 0;
v19 = 0LL;
goto LABEL_18;
}
v30 = JS_NewArray(a1);
LODWORD(v22) = v30;
v21 = v31;
v23 = HIDWORD(v30);
if ( (_DWORD)v31 == 6 )
{
v19 = 0LL;
LABEL_19:
v18 = v58;
goto LABEL_20;
}
v56 = v31;
v59 = v30;
v60 = 3LL;
v64 = 0LL;
for ( i = 0LL; ; i = v63 )
{
JS_FreeValue(a1, i, v60);
v38 = JS_RegExpExec(a1, a2, a3, v61, v62);
v17 = v37;
v60 = v37;
if ( (_DWORD)v37 == 2 )
break;
if ( (_DWORD)v37 == 6 )
{
v18 = v58;
v20 = v57;
v19 = v38;
goto LABEL_40;
}
v63 = v38;
PropertyInt64 = JS_GetPropertyInt64(a1, v38, v37, 0LL);
v45 = JS_ToStringFree(a1, PropertyInt64, v44);
if ( (_DWORD)v46 == -7 )
{
v47 = (*(_DWORD *)(v45 + 4) & 0x7FFFFFFF) != 0;
v22 = v59;
v48 = v64;
v21 = v56;
}
else
{
v47 = 1;
v22 = v59;
v48 = v64;
v21 = v56;
if ( (_DWORD)v46 == 6 )
{
v18 = v58;
v20 = v57;
v19 = v63;
v17 = v60;
goto LABEL_21;
}
}
if ( (int)JS_SetPropertyInt64(a1, v22, v21, v48, v45, v46) < 0
|| !v47
&& ((v49 = (_DWORD *)JS_GetProperty(a1, a2, a3, 86), (int)JS_ToLengthFree(a1, v66, v49, v50) < 0)
|| (v51 = string_advance_index(v61, v66[0], (unsigned int)v65),
v52 = js_int64(v51),
(int)JS_SetProperty(a1, a2, a3, 86, v52, v53) < 0)) )
{
v18 = v58;
v20 = v57;
v19 = v63;
v17 = v60;
LABEL_40:
LODWORD(v22) = v59;
v21 = v56;
goto LABEL_21;
}
v64 = v48 + 1;
}
if ( v64 )
{
v34 = v62;
v33 = v61;
v36 = v59;
}
else
{
v54 = v38;
JS_FreeValue(a1, v59, v56);
v38 = v54;
v36 = 0;
v23 = 0LL;
v34 = v62;
v33 = v61;
v37 = v60;
}
LABEL_15:
JS_FreeValue(a1, v38, v37);
JS_FreeValue(a1, v58, v57);
JS_FreeValue(a1, v33, v34);
v39 = v23 << 32;
v40 = v36;
return v39 | v40;
}
| js_regexp_Symbol_match:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RDI
CMP R14D,-0x1
JNZ 0x0014026e
MOV R15,RSI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
MOV RDI,RBX
CALL 0x0011b03c
MOV qword ptr [RSP + 0x28],RAX
PUSH 0x3
POP RBP
MOV qword ptr [RSP + 0x30],RDX
CMP EDX,0x6
JNZ 0x0014027b
XOR R14D,R14D
XOR R13D,R13D
MOV R15,RBP
MOV R8,RBP
XOR ECX,ECX
XOR R12D,R12D
JMP 0x001403d8
LAB_0014026e:
MOV RDI,RBX
CALL 0x0011d5e1
JMP 0x0014041a
LAB_0014027b:
PUSH 0x6e
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011b043
CMP EDX,0x6
JNZ 0x001402a7
XOR R13D,R13D
MOV R8,RBP
XOR ECX,ECX
XOR R12D,R12D
MOV R14,RAX
MOV R15,RDX
JMP 0x001403d8
LAB_001402a7:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012e049
MOV qword ptr [RSP + 0x8],RDX
CMP EDX,0x6
JNZ 0x001402cf
XOR R13D,R13D
MOV R8,RBP
XOR ECX,ECX
XOR R12D,R12D
MOV R14,RAX
JMP 0x001403d3
LAB_001402cf:
PUSH 0x67
POP RSI
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RAX
XOR EDX,EDX
CALL 0x001414fc
CMP EAX,-0x1
JZ 0x00140351
PUSH 0x70
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011b043
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011cdfa
MOV dword ptr [RSP + 0x4c],EAX
TEST EAX,EAX
JS 0x001403b9
PUSH 0x56
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011e446
TEST EAX,EAX
JS 0x001403c3
MOV RDI,RBX
CALL 0x0011b2bb
MOV RCX,RAX
MOV R8,RDX
MOV R12,RAX
SHR R12,0x20
CMP R8D,0x6
JNZ 0x00140434
XOR R13D,R13D
JMP 0x001403ce
LAB_00140351:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV R15,qword ptr [RSP + 0x28]
MOV RCX,R15
MOV R14,qword ptr [RSP + 0x30]
MOV R8,R14
CALL 0x0014133b
MOV RBP,RAX
MOV qword ptr [RSP],RDX
MOV R12,RAX
SHR R12,0x20
PUSH 0x3
POP RDX
XOR EAX,EAX
LAB_00140382:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011801e
SHL R12,0x20
MOV EAX,EBP
MOV RDX,qword ptr [RSP]
JMP 0x00140422
LAB_001403b9:
XOR R13D,R13D
MOV R8,RBP
XOR ECX,ECX
JMP 0x001403cb
LAB_001403c3:
MOV R8,RBP
XOR ECX,ECX
XOR R13D,R13D
LAB_001403cb:
XOR R12D,R12D
LAB_001403ce:
MOV R14,qword ptr [RSP + 0x10]
LAB_001403d3:
MOV R15,qword ptr [RSP + 0x8]
LAB_001403d8:
SHL R12,0x20
MOV ESI,ECX
OR RSI,R12
MOV RDI,RBX
MOV RDX,R8
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0011801e
LAB_0014041a:
PUSH 0x6
POP RDX
XOR EAX,EAX
XOR R12D,R12D
LAB_00140422:
OR RAX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140434:
MOV qword ptr [RSP],R8
MOV qword ptr [RSP + 0x18],RCX
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x40],0x0
XOR ESI,ESI
LAB_00140450:
MOV RDI,RBX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
CALL 0x0014133b
MOV RBP,RDX
CMP EBP,0x2
MOV qword ptr [RSP + 0x20],RDX
JZ 0x00140594
CMP EBP,0x6
JZ 0x001405b5
MOV RDI,RBX
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,RAX
MOV RDX,RBP
XOR ECX,ECX
CALL 0x0011e178
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012e049
MOV R9,RDX
CMP R9D,-0x7
JZ 0x001404d4
MOV R13B,0x1
CMP R9D,0x6
MOV RCX,qword ptr [RSP + 0x18]
MOV RBP,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP]
JNZ 0x001404ed
JMP 0x001405d0
LAB_001404d4:
TEST dword ptr [RAX + 0x4],0x7fffffff
SETNZ R13B
MOV RCX,qword ptr [RSP + 0x18]
MOV RBP,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP]
LAB_001404ed:
MOV RDI,RBX
MOV RSI,RCX
MOV RDX,R8
MOV RCX,RBP
MOV R8,RAX
CALL 0x0011f0a6
TEST EAX,EAX
JS 0x0014057e
TEST R13B,R13B
JNZ 0x0014056c
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
PUSH 0x56
POP R13
MOV ECX,R13D
CALL 0x0011b043
MOV RCX,RDX
MOV RDI,RBX
LEA RSI,[RSP + 0x50]
MOV RDX,RAX
CALL 0x0013daf8
TEST EAX,EAX
JS 0x0014057e
MOV RSI,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x4c]
CALL 0x00141551
MOV RDI,RAX
CALL 0x00120a0b
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,R13D
MOV R8,RAX
CALL 0x0011e446
TEST EAX,EAX
JS 0x0014057e
LAB_0014056c:
INC RBP
MOV qword ptr [RSP + 0x40],RBP
MOV RSI,qword ptr [RSP + 0x38]
JMP 0x00140450
LAB_0014057e:
MOV R14,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x8]
MOV R13,qword ptr [RSP + 0x38]
MOV RBP,qword ptr [RSP + 0x20]
JMP 0x001405c2
LAB_00140594:
CMP qword ptr [RSP + 0x40],0x0
JZ 0x001405e9
MOV R14,qword ptr [RSP + 0x30]
MOV R15,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0x18]
JMP 0x00140382
LAB_001405b5:
MOV R14,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x8]
MOV R13,RAX
LAB_001405c2:
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP]
JMP 0x001403d8
LAB_001405d0:
MOV R14,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x8]
MOV R13,qword ptr [RSP + 0x38]
MOV RBP,qword ptr [RSP + 0x20]
JMP 0x001403d8
LAB_001405e9:
MOV RDI,RBX
MOV R14,RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP]
CALL 0x0011801e
MOV RAX,R14
PUSH 0x2
POP RCX
MOV qword ptr [RSP],RCX
XOR EBP,EBP
XOR R12D,R12D
MOV R14,qword ptr [RSP + 0x30]
MOV R15,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
JMP 0x00140382
|
int1 [16]
js_regexp_Symbol_match
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
ulong uVar5;
ulong uVar7;
bool bVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [12];
int8 local_88;
int8 local_68;
long local_48;
int8 local_38;
int8 uVar6;
if ((int)param_3 == -1) {
auVar9 = JS_ToString(param_1,*param_5,param_5[1]);
uVar6 = auVar9._8_8_;
uVar3 = auVar9._0_8_;
if (auVar9._8_4_ == 6) {
auVar9 = ZEXT816(3) << 0x40;
auVar11 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
}
else {
auVar9 = JS_GetProperty(param_1,param_2,param_3,0x6e);
if (auVar9._8_4_ == 6) {
auVar11 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
}
else {
auVar9 = JS_ToStringFree(param_1,auVar9._0_8_);
if (auVar9._8_4_ == 6) {
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
}
else {
iVar1 = string_indexof_char(auVar9._0_8_,0x67,0);
if (iVar1 == -1) {
auVar10 = JS_RegExpExec(param_1,param_2,param_3,uVar3,uVar6);
uVar7 = auVar10._0_8_ >> 0x20;
auVar11 = ZEXT816(3) << 0x40;
LAB_00140382:
local_88 = auVar10._8_8_;
JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_);
JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_);
JS_FreeValue(param_1,uVar3,uVar6);
uVar7 = uVar7 << 0x20;
uVar5 = auVar10._0_8_ & 0xffffffff;
goto LAB_00140422;
}
uVar4 = JS_GetProperty(param_1,param_2,param_3,0x70);
iVar1 = JS_ToBoolFree(param_1,uVar4);
if ((iVar1 < 0) || (iVar2 = JS_SetProperty(param_1,param_2,param_3,0x56,0,0), iVar2 < 0))
{
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
}
else {
auVar10 = JS_NewArray(param_1);
uVar5 = auVar10._0_8_;
uVar7 = uVar5 >> 0x20;
if (auVar10._8_4_ != 6) {
local_48 = 0;
auVar11 = ZEXT816(3) << 0x40;
while( true ) {
local_68 = auVar11._8_8_;
JS_FreeValue(param_1,auVar11._0_8_,local_68);
auVar11 = JS_RegExpExec(param_1,param_2,param_3,uVar3,uVar6);
if (auVar11._8_4_ == 2) break;
if (auVar11._8_4_ == 6) goto LAB_001403d8;
uVar4 = JS_GetPropertyInt64(param_1,auVar11._0_8_,auVar11._8_8_,0);
auVar13 = JS_ToStringFree(param_1,uVar4);
if (auVar13._8_4_ == -7) {
bVar8 = (*(uint *)(auVar13._0_8_ + 4) & 0x7fffffff) != 0;
}
else {
bVar8 = true;
if (auVar13._8_4_ == 6) goto LAB_001403d8;
}
iVar2 = JS_SetPropertyInt64(param_1,uVar5,auVar10._8_8_,local_48,auVar13._0_8_);
if (iVar2 < 0) goto LAB_001403d8;
if (!bVar8) {
auVar12 = JS_GetProperty(param_1,param_2,param_3,0x56);
iVar2 = JS_ToLengthFree(param_1,&local_38,auVar12._0_8_,auVar12._8_8_);
if (iVar2 < 0) goto LAB_001403d8;
uVar4 = string_advance_index(uVar3,local_38,iVar1);
auVar12 = js_int64(uVar4);
iVar2 = JS_SetProperty(param_1,param_2,param_3,0x56,auVar12._0_8_,auVar12._8_8_);
if (iVar2 < 0) goto LAB_001403d8;
}
local_48 = local_48 + 1;
}
if (local_48 == 0) {
JS_FreeValue(param_1,uVar5,auVar10._8_8_);
auVar10 = ZEXT816(2) << 0x40;
uVar7 = 0;
}
goto LAB_00140382;
}
}
}
auVar11 = ZEXT816(3) << 0x40;
}
}
LAB_001403d8:
JS_FreeValue(param_1,auVar10._0_8_ & 0xffffffff | uVar7 << 0x20,auVar10._8_8_);
JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_);
JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_);
JS_FreeValue(param_1,uVar3,uVar6);
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
}
local_88 = 6;
uVar5 = 0;
uVar7 = 0;
LAB_00140422:
auVar9._0_8_ = uVar5 | uVar7;
auVar9._8_8_ = local_88;
return auVar9;
}
| |
23,004 | google::protobuf::SourceCodeInfo_Location::_internal_add_span(int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h | inline void SourceCodeInfo_Location::_internal_add_span(int32_t value) {
_impl_.span_.Add(value);
} | O3 | c | google::protobuf::SourceCodeInfo_Location::_internal_add_span(int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x30(%rdi), %rbx
movl 0x30(%rdi), %r12d
cmpl 0x34(%rdi), %r12d
jne 0xfb0e9
leal 0x1(%r12), %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7f560
movq 0x38(%r14), %rax
movl %ebp, (%rax,%r12,4)
jmp 0xfb0f6
movq 0x38(%r14), %rax
movl %ebp, (%rax,%r12,4)
leal 0x1(%r12), %r15d
movl %r15d, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN6google8protobuf23SourceCodeInfo_Location18_internal_add_spanEi:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, esi
mov r14, rdi
lea rbx, [rdi+30h]
mov r12d, [rdi+30h]
cmp r12d, [rdi+34h]
jnz short loc_FB0E9
lea r15d, [r12+1]
mov rdi, rbx
mov esi, r15d
call _ZN6google8protobuf13RepeatedFieldIiE7ReserveEi; google::protobuf::RepeatedField<int>::Reserve(int)
mov rax, [r14+38h]
mov [rax+r12*4], ebp
jmp short loc_FB0F6
loc_FB0E9:
mov rax, [r14+38h]
mov [rax+r12*4], ebp
lea r15d, [r12+1]
loc_FB0F6:
mov [rbx], r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long google::protobuf::SourceCodeInfo_Location::_internal_add_span(
google::protobuf::SourceCodeInfo_Location *this,
int a2)
{
long long v2; // r12
int v3; // r15d
long long result; // rax
v2 = *((unsigned int *)this + 12);
if ( (_DWORD)v2 == *((_DWORD *)this + 13) )
{
v3 = v2 + 1;
google::protobuf::RepeatedField<int>::Reserve((int *)this + 12, v2 + 1);
result = *((_QWORD *)this + 7);
*(_DWORD *)(result + 4 * v2) = a2;
}
else
{
result = *((_QWORD *)this + 7);
*(_DWORD *)(result + 4 * v2) = a2;
v3 = v2 + 1;
}
*((_DWORD *)this + 12) = v3;
return result;
}
| _internal_add_span:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ESI
MOV R14,RDI
LEA RBX,[RDI + 0x30]
MOV R12D,dword ptr [RDI + 0x30]
CMP R12D,dword ptr [RDI + 0x34]
JNZ 0x001fb0e9
LEA R15D,[R12 + 0x1]
MOV RDI,RBX
MOV ESI,R15D
CALL 0x0017f560
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + R12*0x4],EBP
JMP 0x001fb0f6
LAB_001fb0e9:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + R12*0x4],EBP
LEA R15D,[R12 + 0x1]
LAB_001fb0f6:
MOV dword ptr [RBX],R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::SourceCodeInfo_Location::_internal_add_span(int) */
void __thiscall
google::protobuf::SourceCodeInfo_Location::_internal_add_span
(SourceCodeInfo_Location *this,int param_1)
{
uint uVar1;
uVar1 = *(uint *)(this + 0x30);
if (uVar1 == *(uint *)(this + 0x34)) {
RepeatedField<int>::Reserve((RepeatedField<int> *)(this + 0x30),uVar1 + 1);
*(int *)(*(long *)(this + 0x38) + (ulong)uVar1 * 4) = param_1;
}
else {
*(int *)(*(long *)(this + 0x38) + (ulong)uVar1 * 4) = param_1;
}
*(uint *)(this + 0x30) = uVar1 + 1;
return;
}
| |
23,005 | void cxxopts::throw_or_mimic<cxxopts::exceptions::no_such_option>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | shubhamoy[P]dir2txt/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
} | O2 | cpp | void cxxopts::throw_or_mimic<cxxopts::exceptions::no_such_option>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x211c6
leaq 0x2e95e(%rip), %rsi # 0x4f998
leaq 0x3e5(%rip), %rdx # 0x21426
movq %rbx, %rdi
callq 0x85d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x82e0
movq %r14, %rdi
callq 0x85e0
| _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rdi
push 28h ; '('
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rax
mov rsi, r14
call _ZN7cxxopts10exceptions23incorrect_argument_typeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::exceptions::incorrect_argument_type::incorrect_argument_type(std::string const&)
lea rsi, _ZTIN7cxxopts10exceptions23incorrect_argument_typeE; 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::incorrect_argument_type>:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
PUSH 0x28
POP RDI
CALL 0x00108200
MOV RBX,RAX
LAB_00121028:
MOV RDI,RAX
MOV RSI,R14
CALL 0x001211c6
LAB_00121033:
LEA RSI,[0x14f998]
LEA RDX,[0x121426]
MOV RDI,RBX
CALL 0x001085d0
|
/* void cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::__cxx11::string
const&) */
void cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(string *param_1)
{
incorrect_argument_type *this;
this = (incorrect_argument_type *)__cxa_allocate_exception(0x28);
/* try { // try from 00121028 to 00121032 has its CatchHandler @ 00121049 */
exceptions::incorrect_argument_type::incorrect_argument_type(this,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(this,&exceptions::incorrect_argument_type::typeinfo,exceptions::exception::~exception)
;
}
| ||
23,006 | minja::ExpressionNode::~ExpressionNode() | monkey531[P]llama/common/minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O3 | cpp | minja::ExpressionNode::~ExpressionNode():
pushq %rbx
movq %rdi, %rbx
leaq 0x8cc9b(%rip), %rax # 0x12b2b8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x9e632
callq 0x6de32
leaq 0x8c99f(%rip), %rax # 0x12afd8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9e64e
callq 0x6de32
movl $0x30, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1a8e0
| _ZN5minja14ExpressionNodeD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_9E632
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9E632:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9E64E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9E64E:
mov esi, 30h ; '0'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::ExpressionNode::~ExpressionNode(minja::ExpressionNode *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionNode + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateNode + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x30uLL);
}
| ~ExpressionNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22b2b8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x0019e632
CALL 0x0016de32
LAB_0019e632:
LEA RAX,[0x22afd8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0019e64e
CALL 0x0016de32
LAB_0019e64e:
MOV ESI,0x30
MOV RDI,RBX
POP RBX
JMP 0x0011a8e0
|
/* minja::ExpressionNode::~ExpressionNode() */
void __thiscall minja::ExpressionNode::~ExpressionNode(ExpressionNode *this)
{
*(int ***)this = &PTR_do_render_0022b2c8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
}
operator_delete(this,0x30);
return;
}
| |
23,007 | bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc | Result HandleExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
// NOTE: The user code can affect the way in which Google Test handles
// exceptions by setting GTEST_FLAG(catch_exceptions), but only before
// RUN_ALL_TESTS() starts. It is technically possible to check the flag
// after the exception is caught and either report or re-throw the
// exception based on the flag's value:
//
// try {
// // Perform the test method.
// } catch (...) {
// if (GTEST_FLAG_GET(catch_exceptions))
// // Report the exception as failure.
// else
// throw; // Re-throws the original exception.
// }
//
// However, the purpose of this flag is to allow the program to drop into
// the debugger when the exception is thrown. On most platforms, once the
// control enters the catch block, the exception origin information is
// lost and the debugger will stop the program at the point of the
// re-throw in this function -- instead of at the point of the original
// throw statement in the code under test. For this reason, we perform
// the check early, sacrificing the ability to affect Google Test's
// exception handling in the method where the exception is thrown.
if (internal::GetUnitTestImpl()->catch_exceptions()) {
#if GTEST_HAS_EXCEPTIONS
try {
return HandleSehExceptionsInMethodIfSupported(object, method, location);
} catch (const AssertionException&) { // NOLINT
// This failure was reported already.
} catch (const internal::GoogleTestFailureException&) { // NOLINT
// This exception type can only be thrown by a failed Google
// Test assertion with the intention of letting another testing
// framework catch it. Therefore we just re-throw it.
throw;
} catch (const std::exception& e) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(e.what(), location));
} catch (...) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(nullptr, location));
}
return static_cast<Result>(0);
#else
return HandleSehExceptionsInMethodIfSupported(object, method, location);
#endif // GTEST_HAS_EXCEPTIONS
} else {
return (object->*method)();
}
} | O0 | cpp | bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movq %rdi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
callq 0x44940
movq %rax, %rdi
callq 0x64230
testb $0x1, %al
jne 0x4c101
jmp 0x4c2bf
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rdx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x68250
movb %al, -0xb1(%rbp)
jmp 0x4c12e
movb -0xb1(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4c32b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl $0x4, %ecx
cmpl %ecx, %eax
jne 0x4c17a
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0xb0(%rbp)
callq 0xab70
movb $0x0, -0x1(%rbp)
jmp 0x4c32b
movl -0xb8(%rbp), %eax
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x4c1a3
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0xa8(%rbp)
callq 0xaa40
jmp 0x4c34a
movl -0xb8(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x4c20a
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq -0x38(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x42060
jmp 0x4c1e1
movl $0x2, %edi
leaq -0xa0(%rbp), %rsi
callq 0x2ae30
jmp 0x4c1f4
leaq -0xa0(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c171
movq -0x50(%rbp), %rdi
callq 0xa250
movq -0x38(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0x78(%rbp), %rdi
callq 0x42060
jmp 0x4c226
movl $0x2, %edi
leaq -0x78(%rbp), %rsi
callq 0x2ae30
jmp 0x4c236
leaq -0x78(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x4c26c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c273
jmp 0x4c339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x4c29e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c2a5
jmp 0x4c339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0xab70
jmp 0x4c2bd
jmp 0x4c339
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0xc0(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x4c308
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0xd0(%rbp)
jmp 0x4c316
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xd0(%rbp), %rax
callq *%rax
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0xac00
movq %rax, %rdi
callq 0x13e20
nopw (%rax,%rax)
| _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
mov rax, [rbp+var_18]
mov rdx, [rbp+var_10]
mov [rbp+var_20], rdi
mov [rbp+var_28], rdx
mov [rbp+var_30], rax
mov [rbp+var_38], rcx
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
mov rdi, rax; this
call _ZNK7testing8internal12UnitTestImpl16catch_exceptionsEv; testing::internal::UnitTestImpl::catch_exceptions(void)
test al, 1
jnz short loc_4C101
jmp loc_4C2BF
loc_4C101:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_30]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_38]
mov [rbp+var_40], rdx
mov [rbp+var_48], rax
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_40]
call _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl *,bool (testing::internal::UnitTestImpl::*)(void),char const*)
mov [rbp+var_B1], al
jmp short $+2
loc_4C12E:
mov al, [rbp+var_B1]
and al, 1
mov [rbp+var_1], al
jmp loc_4C32B
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
mov eax, [rbp+var_54]
mov [rbp+var_B8], eax
mov ecx, 4
cmp eax, ecx
jnz short loc_4C17A
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_B0], rax
call ___cxa_end_catch
loc_4C171:
mov [rbp+var_1], 0
jmp loc_4C32B
loc_4C17A:
mov eax, [rbp+var_B8]
mov ecx, 3
cmp eax, ecx
jnz short loc_4C1A3
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_A8], rax
call ___cxa_rethrow
jmp loc_4C34A
loc_4C1A3:
mov eax, [rbp+var_B8]
mov ecx, 2
cmp eax, ecx
jnz short loc_4C20A
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_80], rax
mov rdi, [rbp+var_80]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
mov rdx, [rbp+var_38]
lea rdi, [rbp+var_A0]
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
jmp short $+2
loc_4C1E1:
mov edi, 2
lea rsi, [rbp+var_A0]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short $+2
loc_4C1F4:
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
call ___cxa_end_catch
jmp loc_4C171
loc_4C20A:
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov rdx, [rbp+var_38]
xor eax, eax
mov esi, eax
lea rdi, [rbp+var_78]
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
jmp short $+2
loc_4C226:
mov edi, 2
lea rsi, [rbp+var_78]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short $+2
loc_4C236:
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
call ___cxa_end_catch
jmp loc_4C171
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_4C26C
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4C26C:
call ___cxa_end_catch
jmp short $+2
loc_4C273:
jmp loc_4C339
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_4C29E
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4C29E:
call ___cxa_end_catch
jmp short $+2
loc_4C2A5:
jmp loc_4C339
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
call ___cxa_end_catch
jmp short $+2
loc_4C2BD:
jmp short loc_4C339
loc_4C2BF:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rbp+var_C8], rax
mov rdx, [rbp+var_28]
add rcx, rdx
mov [rbp+var_C0], rcx
and rax, 1
cmp rax, 0
jz short loc_4C308
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_C0]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rbp+var_D0], rax
jmp short loc_4C316
loc_4C308:
mov rax, [rbp+var_C8]
mov [rbp+var_D0], rax
loc_4C316:
mov rdi, [rbp+var_C0]
mov rax, [rbp+var_D0]
call rax
and al, 1
mov [rbp+var_1], al
loc_4C32B:
mov al, [rbp+var_1]
and al, 1
add rsp, 0D0h
pop rbp
retn
loc_4C339:
mov rdi, [rbp+var_50]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
loc_4C34A:
nop word ptr [rax+rax+00h]
| char testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
testing::internal *a1,
long long ( *a2)(_QWORD),
long long a3,
long long a4)
{
testing::internal::UnitTestImpl *UnitTestImpl; // rax
char v5; // al
_QWORD *v7; // [rsp+10h] [rbp-C0h]
UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(a1);
if ( (testing::internal::UnitTestImpl::catch_exceptions(UnitTestImpl) & 1) != 0 )
return testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
a1,
a2,
a3,
a4) & 1;
v7 = (_QWORD *)((char *)a1 + a3);
if ( ((unsigned __int8)a2 & 1) != 0 )
v5 = (*(long long ( **)(_QWORD *))((char *)a2 + *v7 - 1))(v7);
else
v5 = a2(v7);
return v5 & 1;
}
| HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],RCX
CALL 0x00144940
MOV RDI,RAX
CALL 0x00164230
TEST AL,0x1
JNZ 0x0014c101
JMP 0x0014c2bf
LAB_0014c101:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
LAB_0014c121:
CALL 0x00168250
LAB_0014c126:
MOV byte ptr [RBP + -0xb1],AL
JMP 0x0014c12e
LAB_0014c12e:
MOV AL,byte ptr [RBP + -0xb1]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x0014c32b
LAB_0014c2bf:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xc8],RAX
MOV RDX,qword ptr [RBP + -0x28]
ADD RCX,RDX
MOV qword ptr [RBP + -0xc0],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x0014c308
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0014c316
LAB_0014c308:
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xd0],RAX
LAB_0014c316:
MOV RDI,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0xd0]
CALL RAX
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0014c32b:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xd0
POP RBP
RET
|
/* bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
*/
bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(UnitTestImpl *param_1,_func_bool *param_2,char *param_3)
{
UnitTestImpl *this;
ulong uVar1;
_func_bool *local_d8;
bool local_9;
this = (UnitTestImpl *)GetUnitTestImpl();
uVar1 = UnitTestImpl::catch_exceptions(this);
if ((uVar1 & 1) == 0) {
local_d8 = param_2;
if (((ulong)param_2 & 1) != 0) {
local_d8 = *(_func_bool **)(param_2 + *(long *)(param_1 + (long)param_3) + -1);
}
local_9 = (*local_d8)(param_1 + (long)param_3);
}
else {
/* try { // try from 0014c121 to 0014c125 has its CatchHandler @ 0014c13e */
local_9 = HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(param_1,param_2,param_3);
}
return local_9;
}
| |
23,008 | mysql_stmt_fetch_column | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset)
{
if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count ||
stmt->state == MYSQL_STMT_FETCH_DONE) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[column].u.row_ptr)
{
/* we set row_ptr only for columns which contain data, so this must be a NULL column */
if (bind[0].is_null)
*bind[0].is_null= 1;
}
else
{
unsigned char *save_ptr;
if (bind[0].length)
*bind[0].length= *stmt->bind[column].length;
else
bind[0].length= &stmt->bind[column].length_value;
if (bind[0].is_null)
*bind[0].is_null= 0;
else
bind[0].is_null= &bind[0].is_null_value;
if (!bind[0].error)
bind[0].error= &bind[0].error_value;
*bind[0].error= 0;
bind[0].offset= offset;
save_ptr= stmt->bind[column].u.row_ptr;
mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr);
stmt->bind[column].u.row_ptr= save_ptr;
}
return(0);
} | O3 | c | mysql_stmt_fetch_column:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x50(%rdi), %eax
cmpl $0x5, %eax
jae 0x20648
movl $0x803, 0x108(%rbx) # imm = 0x803
leaq 0x30d(%rbx), %rdi
leaq 0x28435(%rip), %rax # 0x48a30
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28420(%rip), %rax # 0x48a40
movq 0x198(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6, %eax
je 0x205e3
cmpl %edx, 0x60(%rbx)
jbe 0x205e3
movq 0x78(%rbx), %rax
movl %edx, %edi
imulq $0x70, %rdi, %r14
cmpq $0x0, 0x20(%rax,%r14)
je 0x2067a
addq %r14, %rax
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x2068a
movq (%rax), %rax
movq (%rax), %rax
movq %rax, (%rdx)
jmp 0x20691
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x2063d
movb $0x1, (%rcx)
jmp 0x2063d
addq $0x50, %rax
movq %rax, (%rsi)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2069f
movb $0x0, (%rax)
jmp 0x206a7
leaq 0x67(%rsi), %rax
movq %rax, 0x8(%rsi)
movq 0x18(%rsi), %rax
testq %rax, %rax
jne 0x206b8
leaq 0x64(%rsi), %rax
movq %rax, 0x18(%rsi)
movb $0x0, (%rax)
movq %rcx, 0x48(%rsi)
movq 0x58(%rbx), %rcx
movq 0x78(%rbx), %rax
leaq (%rax,%r14), %rdx
addq $0x20, %rdx
movq (%rdx), %r15
shlq $0x7, %rdi
leaq (%rcx,%rdi), %rax
movl 0x70(%rcx,%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x28887(%rip), %r8 # 0x48f70
movq %rsi, %rdi
movq %rax, %rsi
callq *(%r8,%rcx,8)
movq 0x78(%rbx), %rax
movq %r15, 0x20(%rax,%r14)
xorl %eax, %eax
jmp 0x2063d
| mysql_stmt_fetch_column:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+50h]
cmp eax, 5
jnb short loc_20648
loc_205E3:
mov dword ptr [rbx+108h], 803h
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+198h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov eax, 1
loc_2063D:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_20648:
cmp eax, 6
jz short loc_205E3
cmp [rbx+60h], edx
jbe short loc_205E3
mov rax, [rbx+78h]
mov edi, edx
imul r14, rdi, 70h ; 'p'
cmp qword ptr [rax+r14+20h], 0
jz short loc_2067A
add rax, r14
mov rdx, [rsi]
test rdx, rdx
jz short loc_2068A
mov rax, [rax]
mov rax, [rax]
mov [rdx], rax
jmp short loc_20691
loc_2067A:
mov rcx, [rsi+8]
xor eax, eax
test rcx, rcx
jz short loc_2063D
mov byte ptr [rcx], 1
jmp short loc_2063D
loc_2068A:
add rax, 50h ; 'P'
mov [rsi], rax
loc_20691:
mov rax, [rsi+8]
test rax, rax
jz short loc_2069F
mov byte ptr [rax], 0
jmp short loc_206A7
loc_2069F:
lea rax, [rsi+67h]
mov [rsi+8], rax
loc_206A7:
mov rax, [rsi+18h]
test rax, rax
jnz short loc_206B8
lea rax, [rsi+64h]
mov [rsi+18h], rax
loc_206B8:
mov byte ptr [rax], 0
mov [rsi+48h], rcx
mov rcx, [rbx+58h]
mov rax, [rbx+78h]
lea rdx, [rax+r14]
add rdx, 20h ; ' '
mov r15, [rdx]
shl rdi, 7
lea rax, [rcx+rdi]
mov ecx, [rcx+rdi+70h]
lea rcx, [rcx+rcx*2]
lea r8, mysql_ps_fetch_functions
mov rdi, rsi
mov rsi, rax
call qword ptr [r8+rcx*8]
mov rax, [rbx+78h]
mov [rax+r14+20h], r15
xor eax, eax
jmp loc_2063D
| long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int v4; // eax
long long result; // rax
long long v6; // rax
long long v7; // r14
_QWORD **v8; // rax
_BYTE *v9; // rcx
_BYTE *v10; // rax
_BYTE *v11; // rax
long long v12; // r15
v4 = *(_DWORD *)(a1 + 80);
if ( v4 < 5 || v4 == 6 || *(_DWORD *)(a1 + 96) <= a3 )
{
*(_DWORD *)(a1 + 264) = 2051;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[51], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1LL;
}
else
{
v6 = *(_QWORD *)(a1 + 120);
v7 = 112LL * a3;
if ( *(_QWORD *)(v6 + v7 + 32) )
{
v8 = (_QWORD **)(v7 + v6);
if ( *(_QWORD *)a2 )
**(_QWORD **)a2 = **v8;
else
*(_QWORD *)a2 = v8 + 10;
v10 = *(_BYTE **)(a2 + 8);
if ( v10 )
*v10 = 0;
else
*(_QWORD *)(a2 + 8) = a2 + 103;
v11 = *(_BYTE **)(a2 + 24);
if ( !v11 )
{
v11 = (_BYTE *)(a2 + 100);
*(_QWORD *)(a2 + 24) = a2 + 100;
}
*v11 = 0;
*(_QWORD *)(a2 + 72) = a4;
v12 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32);
(*(void ( **)(long long, unsigned long long))&mysql_ps_fetch_functions[6
* *(unsigned int *)(*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7) + 112)])(
a2,
*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7));
*(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32) = v12;
return 0LL;
}
else
{
v9 = *(_BYTE **)(a2 + 8);
result = 0LL;
if ( v9 )
*v9 = 1;
}
}
return result;
}
| mysql_stmt_fetch_column:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x50]
CMP EAX,0x5
JNC 0x00120648
LAB_001205e3:
MOV dword ptr [RBX + 0x108],0x803
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x148a30]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x148a40]
MOV RSI,qword ptr [RAX + 0x198]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV EAX,0x1
LAB_0012063d:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00120648:
CMP EAX,0x6
JZ 0x001205e3
CMP dword ptr [RBX + 0x60],EDX
JBE 0x001205e3
MOV RAX,qword ptr [RBX + 0x78]
MOV EDI,EDX
IMUL R14,RDI,0x70
CMP qword ptr [RAX + R14*0x1 + 0x20],0x0
JZ 0x0012067a
ADD RAX,R14
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0012068a
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDX],RAX
JMP 0x00120691
LAB_0012067a:
MOV RCX,qword ptr [RSI + 0x8]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0012063d
MOV byte ptr [RCX],0x1
JMP 0x0012063d
LAB_0012068a:
ADD RAX,0x50
MOV qword ptr [RSI],RAX
LAB_00120691:
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x0012069f
MOV byte ptr [RAX],0x0
JMP 0x001206a7
LAB_0012069f:
LEA RAX,[RSI + 0x67]
MOV qword ptr [RSI + 0x8],RAX
LAB_001206a7:
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JNZ 0x001206b8
LEA RAX,[RSI + 0x64]
MOV qword ptr [RSI + 0x18],RAX
LAB_001206b8:
MOV byte ptr [RAX],0x0
MOV qword ptr [RSI + 0x48],RCX
MOV RCX,qword ptr [RBX + 0x58]
MOV RAX,qword ptr [RBX + 0x78]
LEA RDX,[RAX + R14*0x1]
ADD RDX,0x20
MOV R15,qword ptr [RDX]
SHL RDI,0x7
LEA RAX,[RCX + RDI*0x1]
MOV ECX,dword ptr [RCX + RDI*0x1 + 0x70]
LEA RCX,[RCX + RCX*0x2]
LEA R8,[0x148f70]
MOV RDI,RSI
MOV RSI,RAX
CALL qword ptr [R8 + RCX*0x8]
MOV RAX,qword ptr [RBX + 0x78]
MOV qword ptr [RAX + R14*0x1 + 0x20],R15
XOR EAX,EAX
JMP 0x0012063d
|
int8 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4)
{
int8 uVar1;
int8 *puVar2;
int1 *puVar3;
long lVar4;
long lVar5;
if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x50) == 6)) ||
(*(uint *)(param_1 + 0x60) <= param_3)) {
*(int4 *)(param_1 + 0x108) = 0x803;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s__00148bd8,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar1 = 1;
}
else {
lVar5 = (ulong)param_3 * 0x70;
if (*(long *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) == 0) {
uVar1 = 0;
if ((int1 *)param_2[1] != (int1 *)0x0) {
*(int1 *)param_2[1] = 1;
}
}
else {
puVar2 = (int8 *)(*(long *)(param_1 + 0x78) + lVar5);
if ((int8 *)*param_2 == (int8 *)0x0) {
*param_2 = (long)(puVar2 + 10);
}
else {
*(int8 *)*param_2 = *(int8 *)*puVar2;
}
if ((int1 *)param_2[1] == (int1 *)0x0) {
param_2[1] = (long)param_2 + 0x67;
}
else {
*(int1 *)param_2[1] = 0;
}
puVar3 = (int1 *)param_2[3];
if (puVar3 == (int1 *)0x0) {
puVar3 = (int1 *)((long)param_2 + 100);
param_2[3] = (long)puVar3;
}
*puVar3 = 0;
param_2[9] = param_4;
uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + lVar5 + 0x20);
lVar4 = (ulong)param_3 * 0x80;
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar4) * 3])
(param_2,*(long *)(param_1 + 0x58) + lVar4);
*(int8 *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) = uVar1;
uVar1 = 0;
}
}
return uVar1;
}
| |
23,009 | google::protobuf::ServiceDescriptorProto::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void ServiceDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.method_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | cpp | google::protobuf::ServiceDescriptorProto::Clear():
subq $0xb8, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x0, 0x7c(%rsp)
addq $0x10, %rdi
addq $0x8, %rdi
callq 0xd89f0
movq 0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, 0xa0(%rsp)
movl $0x0, 0x9c(%rsp)
movq 0xa0(%rsp), %rax
movslq 0x9c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xb9c33
movl 0x7c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb9b62
movq 0x20(%rsp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0xd4de0
movl 0x7c(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xb9c31
jmp 0xb9b74
xorl %eax, %eax
testb $0x1, %al
jne 0xb9b7f
jmp 0xb9c23
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x3f(%rsp)
cmpq $0x0, %rax
je 0xb9b95
jmp 0xb9be5
leaq 0x136d94(%rip), %rdx # 0x1f0930
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %esi
movl $0x1574, %ecx # imm = 0x1574
callq 0x237e0
movq 0x10(%rsp), %rdi
movb $0x1, 0x3f(%rsp)
leaq 0x136df7(%rip), %rsi # 0x1f09bd
callq 0x230a0
movq %rax, 0x18(%rsp)
jmp 0xb9bd2
movq 0x18(%rsp), %rsi
leaq 0x2b(%rsp), %rdi
callq 0x23250
jmp 0xb9be3
jmp 0xb9be5
testb $0x1, 0x3f(%rsp)
jne 0xb9bee
jmp 0xb9bf8
leaq 0x40(%rsp), %rdi
callq 0x23820
jmp 0xb9b74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
testb $0x1, 0x3f(%rsp)
jne 0xb9c14
jmp 0xb9c1e
leaq 0x40(%rsp), %rdi
callq 0x23820
jmp 0xb9cb5
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xb9cc0
jmp 0xb9c33
movq 0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x13200
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb9cad
movq 0x8(%rsp), %rdi
callq 0xe0a90
addq $0xb8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x13750
nop
| _ZN6google8protobuf22ServiceDescriptorProto5ClearEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_38], rdi
mov rdi, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_98], rdi
mov [rsp+0B8h+var_3C], 0
add rdi, 10h
add rdi, 8
call _ZN6google8protobuf16RepeatedPtrFieldINS0_21MethodDescriptorProtoEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::MethodDescriptorProto>::Clear(void)
mov rax, [rsp+0B8h+var_98]
add rax, 10h
mov [rsp+0B8h+var_18], rax
mov [rsp+0B8h+var_1C], 0
mov rax, [rsp+0B8h+var_18]
movsxd rcx, [rsp+0B8h+var_1C]
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_3C], eax
mov eax, [rsp+0B8h+var_3C]
and eax, 3
cmp eax, 0
jz loc_B9C33
mov eax, [rsp+0B8h+var_3C]
and eax, 1
cmp eax, 0
jz short loc_B9B62
mov rdi, [rsp+0B8h+var_98]
add rdi, 10h
add rdi, 20h ; ' '; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_B9B62:
mov eax, [rsp+0B8h+var_3C]
and eax, 2
cmp eax, 0
jz loc_B9C31
jmp short $+2
loc_B9B74:
xor eax, eax
test al, 1
jnz short loc_B9B7F
jmp loc_B9C23
loc_B9B7F:
mov rax, [rsp+0B8h+var_98]
mov rax, [rax+38h]
mov [rsp+0B8h+var_79], 0
cmp rax, 0
jz short loc_B9B95
jmp short loc_B9BE5
loc_B9B95:
lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_A8], rdi
mov esi, 3
mov ecx, 1574h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_79], 1
lea rsi, aCheckFailedImp; "CHECK failed: _impl_.options_ != nullpt"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0B8h+var_A0], rax
jmp short $+2
loc_B9BD2:
mov rsi, [rsp+0B8h+var_A0]
lea rdi, [rsp+0B8h+var_8D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_B9BE3:
jmp short $+2
loc_B9BE5:
test [rsp+0B8h+var_79], 1
jnz short loc_B9BEE
jmp short loc_B9BF8
loc_B9BEE:
lea rdi, [rsp+0B8h+var_78]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_B9BF8:
jmp loc_B9B74
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
test [rsp+arg_37], 1
jnz short loc_B9C14
jmp short loc_B9C1E
loc_B9C14:
lea rdi, [rsp+arg_38]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_B9C1E:
jmp loc_B9CB5
loc_B9C23:
mov rax, [rsp+0B8h+var_98]
mov rdi, [rax+38h]; this
call _ZN6google8protobuf14ServiceOptions5ClearEv; google::protobuf::ServiceOptions::Clear(void)
loc_B9C31:
jmp short $+2
loc_B9C33:
mov rax, [rsp+0B8h+var_98]
add rax, 10h
mov [rsp+0B8h+var_10], rax
mov rdi, [rsp+0B8h+var_10]
xor esi, esi
mov edx, 4
call _memset
mov rax, [rsp+0B8h+var_98]
add rax, 8
mov [rsp+0B8h+var_30], rax
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_B0], rax
mov [rsp+0B8h+var_28], rax
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_B9CAD
mov rdi, [rsp+0B8h+var_B0]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_B9CAD:
add rsp, 0B8h
retn
loc_B9CB5:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long google::protobuf::ServiceDescriptorProto::Clear(google::protobuf::ServiceDescriptorProto *this)
{
long long result; // rax
int v2; // [rsp+7Ch] [rbp-3Ch]
google::protobuf::RepeatedPtrField<google::protobuf::MethodDescriptorProto>::Clear((char *)this + 24);
v2 = *((_DWORD *)this + 4);
if ( (v2 & 3) != 0 )
{
if ( (v2 & 1) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::ServiceDescriptorProto *)((char *)this + 48));
if ( (v2 & 2) != 0 )
google::protobuf::ServiceOptions::Clear(*((google::protobuf::ServiceOptions **)this + 7));
}
memset((char *)this + 16, 0LL, 4LL);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| Clear:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x80],RDI
MOV RDI,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x7c],0x0
ADD RDI,0x10
ADD RDI,0x8
CALL 0x001d89f0
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x10
MOV qword ptr [RSP + 0xa0],RAX
MOV dword ptr [RSP + 0x9c],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOVSXD RCX,dword ptr [RSP + 0x9c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x7c],EAX
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001b9c33
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001b9b62
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x10
ADD RDI,0x20
CALL 0x001d4de0
LAB_001b9b62:
MOV EAX,dword ptr [RSP + 0x7c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001b9c31
JMP 0x001b9b74
LAB_001b9b74:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001b9b7f
JMP 0x001b9c23
LAB_001b9b7f:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RSP + 0x3f],0x0
CMP RAX,0x0
JZ 0x001b9b95
JMP 0x001b9be5
LAB_001b9b95:
LEA RDX,[0x2f0930]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RDI
MOV ESI,0x3
MOV ECX,0x1574
CALL 0x001237e0
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x3f],0x1
LAB_001b9bbf:
LEA RSI,[0x2f09bd]
CALL 0x001230a0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001b9bd2
LAB_001b9bd2:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x2b]
CALL 0x00123250
LAB_001b9be1:
JMP 0x001b9be3
LAB_001b9be3:
JMP 0x001b9be5
LAB_001b9be5:
TEST byte ptr [RSP + 0x3f],0x1
JNZ 0x001b9bee
JMP 0x001b9bf8
LAB_001b9bee:
LEA RDI,[RSP + 0x40]
CALL 0x00123820
LAB_001b9bf8:
JMP 0x001b9b74
LAB_001b9c23:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001b9cc0
LAB_001b9c31:
JMP 0x001b9c33
LAB_001b9c33:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x10
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa8]
XOR ESI,ESI
MOV EDX,0x4
CALL 0x00113200
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x8
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b9cad
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e0a90
LAB_001b9cad:
ADD RSP,0xb8
RET
|
/* WARNING: Removing unreachable block (ram,0x001b9b7f) */
/* WARNING: Removing unreachable block (ram,0x001b9b95) */
/* WARNING: Removing unreachable block (ram,0x001b9b93) */
/* WARNING: Removing unreachable block (ram,0x001b9be5) */
/* WARNING: Removing unreachable block (ram,0x001b9bee) */
/* WARNING: Removing unreachable block (ram,0x001b9bec) */
/* WARNING: Removing unreachable block (ram,0x001b9bf8) */
/* google::protobuf::ServiceDescriptorProto::Clear() */
void __thiscall google::protobuf::ServiceDescriptorProto::Clear(ServiceDescriptorProto *this)
{
uint uVar1;
RepeatedPtrField<google::protobuf::MethodDescriptorProto>::Clear
((RepeatedPtrField<google::protobuf::MethodDescriptorProto> *)(this + 0x18));
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 & 3) != 0) {
if ((uVar1 & 1) != 0) {
internal::ArenaStringPtr::ClearNonDefaultToEmpty((ArenaStringPtr *)(this + 0x30));
}
if ((uVar1 & 2) != 0) {
ServiceOptions::Clear(*(ServiceOptions **)(this + 0x38));
}
}
memset(this + 0x10,0,4);
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
return;
}
| |
23,010 | google::protobuf::ServiceDescriptorProto::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void ServiceDescriptorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.method_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_impl_.name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.options_ != nullptr);
_impl_.options_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O3 | cpp | google::protobuf::ServiceDescriptorProto::Clear():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x20(%rdi), %r14
testq %r14, %r14
jle 0x4f3ee
movq 0x28(%rbx), %r15
xorl %r12d, %r12d
movq 0x8(%r15,%r12,8), %rdi
incq %r12
callq 0x4fc90
cmpq %r12, %r14
jne 0x4f3d5
movl $0x0, 0x20(%rbx)
movl 0x10(%rbx), %eax
testb $0x3, %al
je 0x4f41c
testb $0x1, %al
je 0x4f40f
movq 0x30(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x2, %al
je 0x4f41c
movq 0x38(%rbx), %rdi
callq 0x4f44c
movl $0x0, 0x10(%rbx)
testb $0x1, 0x8(%rbx)
jne 0x4f435
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x597c4
| _ZN6google8protobuf22ServiceDescriptorProto5ClearEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
movsxd r14, dword ptr [rdi+20h]
test r14, r14
jle short loc_4F3EE
mov r15, [rbx+28h]
xor r12d, r12d
loc_4F3D5:
mov rdi, [r15+r12*8+8]; this
inc r12
call _ZN6google8protobuf21MethodDescriptorProto5ClearEv; google::protobuf::MethodDescriptorProto::Clear(void)
cmp r14, r12
jnz short loc_4F3D5
mov dword ptr [rbx+20h], 0
loc_4F3EE:
mov eax, [rbx+10h]
test al, 3
jz short loc_4F41C
test al, 1
jz short loc_4F40F
mov rcx, [rbx+30h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_4F40F:
test al, 2
jz short loc_4F41C
mov rdi, [rbx+38h]; this
call _ZN6google8protobuf14ServiceOptions5ClearEv; google::protobuf::ServiceOptions::Clear(void)
loc_4F41C:
mov dword ptr [rbx+10h], 0
test byte ptr [rbx+8], 1
jnz short loc_4F435
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_4F435:
add rbx, 8
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
| long long google::protobuf::ServiceDescriptorProto::Clear(google::protobuf::ServiceDescriptorProto *this)
{
long long v2; // r14
long long v3; // r15
long long i; // r12
google::protobuf::MethodDescriptorProto *v5; // rdi
long long result; // rax
unsigned long long v7; // rcx
v2 = *((int *)this + 8);
if ( v2 > 0 )
{
v3 = *((_QWORD *)this + 5);
for ( i = 0LL; i != v2; ++i )
{
v5 = *(google::protobuf::MethodDescriptorProto **)(v3 + 8 * i + 8);
google::protobuf::MethodDescriptorProto::Clear(v5);
}
*((_DWORD *)this + 8) = 0;
}
result = *((unsigned int *)this + 4);
if ( (result & 3) != 0 )
{
if ( (result & 1) != 0 )
{
v7 = *((_QWORD *)this + 6) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v7 + 8) = 0LL;
**(_BYTE **)v7 = 0;
}
if ( (result & 2) != 0 )
result = google::protobuf::ServiceOptions::Clear(*((google::protobuf::ServiceOptions **)this + 7));
}
*((_DWORD *)this + 4) = 0;
if ( (*((_BYTE *)this + 8) & 1) != 0 )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| Clear:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVSXD R14,dword ptr [RDI + 0x20]
TEST R14,R14
JLE 0x0014f3ee
MOV R15,qword ptr [RBX + 0x28]
XOR R12D,R12D
LAB_0014f3d5:
MOV RDI,qword ptr [R15 + R12*0x8 + 0x8]
INC R12
CALL 0x0014fc90
CMP R14,R12
JNZ 0x0014f3d5
MOV dword ptr [RBX + 0x20],0x0
LAB_0014f3ee:
MOV EAX,dword ptr [RBX + 0x10]
TEST AL,0x3
JZ 0x0014f41c
TEST AL,0x1
JZ 0x0014f40f
MOV RCX,qword ptr [RBX + 0x30]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_0014f40f:
TEST AL,0x2
JZ 0x0014f41c
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x0014f44c
LAB_0014f41c:
MOV dword ptr [RBX + 0x10],0x0
TEST byte ptr [RBX + 0x8],0x1
JNZ 0x0014f435
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0014f435:
ADD RBX,0x8
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001597c4
|
/* google::protobuf::ServiceDescriptorProto::Clear() */
void __thiscall google::protobuf::ServiceDescriptorProto::Clear(ServiceDescriptorProto *this)
{
long lVar1;
int iVar2;
uint uVar3;
long lVar4;
ulong uVar5;
long lVar6;
iVar2 = *(int *)(this + 0x20);
if (0 < (long)iVar2) {
lVar4 = *(long *)(this + 0x28);
lVar6 = 0;
do {
lVar1 = lVar6 * 8;
lVar6 = lVar6 + 1;
MethodDescriptorProto::Clear(*(MethodDescriptorProto **)(lVar4 + 8 + lVar1));
} while (iVar2 != lVar6);
*(int4 *)(this + 0x20) = 0;
}
uVar3 = *(uint *)(this + 0x10);
if ((uVar3 & 3) != 0) {
if ((uVar3 & 1) != 0) {
uVar5 = *(ulong *)(this + 0x30);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 2) != 0) {
ServiceOptions::Clear(*(ServiceOptions **)(this + 0x38));
}
}
*(int4 *)(this + 0x10) = 0;
if (((byte)this[8] & 1) == 0) {
return;
}
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
return;
}
| |
23,011 | httplib::detail::write_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<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&) | hkr04[P]cpp-mcp/common/httplib.h | inline ssize_t write_headers(Stream &strm, const Headers &headers) {
ssize_t write_len = 0;
for (const auto &x : headers) {
std::string s;
s = x.first;
s += ": ";
s += x.second;
s += "\r\n";
auto len = strm.write(s.data(), s.size());
if (len < 0) { return len; }
write_len += len;
}
auto len = strm.write("\r\n");
if (len < 0) { return len; }
write_len += len;
return write_len;
} | O0 | c | httplib::detail::write_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<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 $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
callq 0x2a960
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rdi
callq 0x26650
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x217c0
testb $0x1, %al
jne 0xa468b
jmp 0xa47cd
leaq 0x88(%rsp), %rdi
callq 0x2a990
movq %rax, 0x78(%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xbb80
movq 0x28(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0xb080
jmp 0xa46bd
leaq 0x2a9d4(%rip), %rsi # 0xcf098
leaq 0x58(%rsp), %rdi
callq 0xb7f0
jmp 0xa46d0
movq 0x78(%rsp), %rsi
addq $0x20, %rsi
leaq 0x58(%rsp), %rdi
callq 0xba50
jmp 0xa46e5
leaq 0x29984(%rip), %rsi # 0xce070
leaq 0x58(%rsp), %rdi
callq 0xb7f0
jmp 0xa46f8
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb470
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0xb590
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movq %rax, 0x20(%rsp)
jmp 0xa4740
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jge 0xa4786
movq 0x40(%rsp), %rax
movq %rax, 0xb0(%rsp)
movl $0x1, 0x3c(%rsp)
jmp 0xa47a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xbfb0
jmp 0xa4832
movq 0x40(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, 0x98(%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xbfb0
movl 0x3c(%rsp), %eax
testl %eax, %eax
je 0xa47b9
jmp 0xa47b7
jmp 0xa4822
jmp 0xa47bb
leaq 0x88(%rsp), %rdi
callq 0x24aa0
jmp 0xa466d
movq 0xa8(%rsp), %rdi
leaq 0x29894(%rip), %rsi # 0xce070
callq 0x180e0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jge 0xa47fd
movq 0x30(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xa4822
movq 0x30(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0xbe10
nopl (%rax)
| _ZN7httplib6detail13write_headersERNS_6StreamERKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_NS0_11case_ignore4hashENSA_8equal_toESaISt4pairIKS9_S9_EEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_20], 0
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_28], rax
mov rdi, [rsp+0B8h+var_28]
call _ZNKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N7httplib6detail11case_ignore4hashENS8_8equal_toESaISt4pairIKS5_S5_EEE5beginEv; std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::begin(void)
mov [rsp+0B8h+var_30], rax
mov rdi, [rsp+0B8h+var_28]
call _ZNKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N7httplib6detail11case_ignore4hashENS8_8equal_toESaISt4pairIKS5_S5_EEE3endEv; std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::end(void)
mov [rsp+0B8h+var_38], rax
loc_A466D:
lea rdi, [rsp+0B8h+var_30]
lea rsi, [rsp+0B8h+var_38]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb1EEESC_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,std::string>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,std::string>,true> const&)
test al, 1
jnz short loc_A468B
jmp loc_A47CD
loc_A468B:
lea rdi, [rsp+0B8h+var_30]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb0ELb1EEdeEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator*(void)
mov [rsp+0B8h+var_40], rax
lea rdi, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_90], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+0B8h+var_90]
mov rsi, [rsp+0B8h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_A46BD:
lea rsi, aSubtype+9; ": "
lea rdi, [rsp+0B8h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_A46D0:
mov rsi, [rsp+0B8h+var_40]
add rsi, 20h ; ' '
lea rdi, [rsp+0B8h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_A46E5:
lea rsi, a0+1; "\r\n"
lea rdi, [rsp+0B8h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_A46F8:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_A8], rax
lea rdi, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_B0], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_A0], rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_A0]
mov rdx, rax
mov rax, [rdi]
mov rax, [rax+28h]
call rax
mov [rsp+0B8h+var_98], rax
jmp short $+2
loc_A4740:
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_78], rax
cmp [rsp+0B8h+var_78], 0
jge short loc_A4786
mov rax, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_8], rax
mov [rsp+0B8h+var_7C], 1
jmp short loc_A47A3
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_A4832
loc_A4786:
mov rax, [rsp+0B8h+var_78]
add rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_20], rax
mov [rsp+0B8h+var_7C], 0
loc_A47A3:
lea rdi, [rsp+0B8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rsp+0B8h+var_7C]
test eax, eax
jz short loc_A47B9
jmp short $+2
loc_A47B7:
jmp short loc_A4822
loc_A47B9:
jmp short $+2
loc_A47BB:
lea rdi, [rsp+0B8h+var_30]
call _ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb0ELb1EEppEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator++(void)
jmp loc_A466D
loc_A47CD:
mov rdi, [rsp+0B8h+var_10]; this
lea rsi, a0+1; char *
call _ZN7httplib6Stream5writeEPKc; httplib::Stream::write(char const*)
mov [rsp+0B8h+var_88], rax
cmp [rsp+0B8h+var_88], 0
jge short loc_A47FD
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_8], rax
jmp short loc_A4822
loc_A47FD:
mov rax, [rsp+0B8h+var_88]
add rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_20], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_8], rax
loc_A4822:
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
loc_A4832:
mov rdi, [rsp+arg_48]
call __Unwind_Resume
| long long httplib::detail::write_headers(httplib::Stream *a1, long long a2)
{
long long v2; // rax
httplib::Stream *v4; // [rsp+10h] [rbp-A8h]
long long v5; // [rsp+18h] [rbp-A0h]
long long v6; // [rsp+30h] [rbp-88h]
int v7; // [rsp+3Ch] [rbp-7Ch]
long long v8; // [rsp+40h] [rbp-78h]
_BYTE v9[32]; // [rsp+58h] [rbp-60h] BYREF
long long v10; // [rsp+78h] [rbp-40h]
long long v11; // [rsp+80h] [rbp-38h] BYREF
_QWORD v12[2]; // [rsp+88h] [rbp-30h] BYREF
long long v13; // [rsp+98h] [rbp-20h]
long long v14; // [rsp+A0h] [rbp-18h]
httplib::Stream *v15; // [rsp+A8h] [rbp-10h]
long long v16; // [rsp+B0h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = 0LL;
v12[1] = a2;
v12[0] = std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::begin(a2);
v11 = std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::end(a2);
while ( std::__detail::operator!=(v12, &v11) )
{
v10 = std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator*(v12);
std::string::basic_string(v9);
std::string::operator=(v9, v10);
std::string::operator+=(v9, ": ");
std::string::operator+=(v9, v10 + 32);
std::string::operator+=(v9, "\r\n");
v4 = v15;
v5 = std::string::data(v9);
v2 = std::string::size(v9);
v8 = (*(long long ( **)(httplib::Stream *, long long, long long))(*(_QWORD *)v4 + 40LL))(v4, v5, v2);
if ( v8 >= 0 )
{
v13 += v8;
v7 = 0;
}
else
{
v16 = v8;
v7 = 1;
}
std::string::~string(v9);
if ( v7 )
return v16;
std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator++((long long)v12);
}
v6 = httplib::Stream::write(v15, "\r\n");
if ( v6 < 0 )
return v6;
v13 += v6;
return v13;
}
| write_headers:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0x98],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0012a960
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x00126650
MOV qword ptr [RSP + 0x80],RAX
LAB_001a466d:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x80]
CALL 0x001217c0
TEST AL,0x1
JNZ 0x001a468b
JMP 0x001a47cd
LAB_001a468b:
LEA RDI,[RSP + 0x88]
CALL 0x0012a990
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x0010bb80
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x78]
LAB_001a46b6:
CALL 0x0010b080
JMP 0x001a46bd
LAB_001a46bd:
LEA RSI,[0x1cf098]
LEA RDI,[RSP + 0x58]
CALL 0x0010b7f0
JMP 0x001a46d0
LAB_001a46d0:
MOV RSI,qword ptr [RSP + 0x78]
ADD RSI,0x20
LEA RDI,[RSP + 0x58]
CALL 0x0010ba50
JMP 0x001a46e5
LAB_001a46e5:
LEA RSI,[0x1ce070]
LEA RDI,[RSP + 0x58]
CALL 0x0010b7f0
JMP 0x001a46f8
LAB_001a46f8:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010b470
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x0010b590
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x28]
CALL RAX
LAB_001a4739:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001a4740
LAB_001a4740:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JGE 0x001a4786
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xb0],RAX
MOV dword ptr [RSP + 0x3c],0x1
JMP 0x001a47a3
LAB_001a4786:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x98],RAX
MOV dword ptr [RSP + 0x3c],0x0
LAB_001a47a3:
LEA RDI,[RSP + 0x58]
CALL 0x0010bfb0
MOV EAX,dword ptr [RSP + 0x3c]
TEST EAX,EAX
JZ 0x001a47b9
JMP 0x001a47b7
LAB_001a47b7:
JMP 0x001a4822
LAB_001a47b9:
JMP 0x001a47bb
LAB_001a47bb:
LEA RDI,[RSP + 0x88]
CALL 0x00124aa0
JMP 0x001a466d
LAB_001a47cd:
MOV RDI,qword ptr [RSP + 0xa8]
LEA RSI,[0x1ce070]
CALL 0x001180e0
MOV qword ptr [RSP + 0x30],RAX
CMP qword ptr [RSP + 0x30],0x0
JGE 0x001a47fd
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001a4822
LAB_001a47fd:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xb0],RAX
LAB_001a4822:
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
/* httplib::detail::write_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::string,
std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to,
std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) */
long httplib::detail::write_headers(Stream *param_1,unordered_multimap *param_2)
{
Stream *pSVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int8 uVar5;
long lVar6;
string local_60 [32];
string *local_40;
int8 local_38;
int8 local_30;
unordered_multimap *local_28;
long local_20;
unordered_multimap *local_18;
Stream *local_10;
long local_8;
local_20 = 0;
local_28 = param_2;
local_18 = param_2;
local_10 = param_1;
local_30 = std::
unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::begin((unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)param_2);
local_38 = std::
unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::end();
while( true ) {
uVar3 = std::__detail::operator!=
((_Node_iterator_base *)&local_30,(_Node_iterator_base *)&local_38);
if ((uVar3 & 1) == 0) {
local_8 = Stream::write(local_10,"\r\n");
if (-1 < local_8) {
local_8 = local_8 + local_20;
}
return local_8;
}
local_40 = (string *)
std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true>
::operator*((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true>
*)&local_30);
std::__cxx11::string::string(local_60);
/* try { // try from 001a46b6 to 001a4738 has its CatchHandler @ 001a4769 */
std::__cxx11::string::operator=(local_60,local_40);
std::__cxx11::string::operator+=(local_60,": ");
std::__cxx11::string::operator+=(local_60,local_40 + 0x20);
std::__cxx11::string::operator+=(local_60,"\r\n");
pSVar1 = local_10;
uVar4 = std::__cxx11::string::data();
uVar5 = std::__cxx11::string::size();
lVar6 = (**(code **)(*(long *)pSVar1 + 0x28))(pSVar1,uVar4,uVar5);
lVar2 = lVar6;
if (-1 < lVar6) {
local_20 = lVar6 + local_20;
lVar2 = local_8;
}
local_8 = lVar2;
std::__cxx11::string::~string(local_60);
if (-1 >= lVar6) break;
std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true>::
operator++((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true>
*)&local_30);
}
return local_8;
}
| |
23,012 | my_uca_implicit_weight_put | eloqsql/strings/ctype-uca.c | static inline void
my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level)
{
switch (level) {
case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */
case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */
case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */
default:
DBUG_ASSERT(0);
case 0:
break;
}
/* Primary level */
to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code);
to[1]= (code & 0x7FFF) | 0x8000;
to[2]= 0;
} | O0 | c | my_uca_implicit_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0xb2903
movq -0x20(%rbp), %rax
leaq 0xf58c1(%rip), %rcx # 0x1a817c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0x20, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xb290b
movq -0x8(%rbp), %rax
movw $0x2, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xb290b
movq -0x8(%rbp), %rax
movw $0x1, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xb290b
jmp 0xb2905
jmp 0xb2907
jmp 0xb2909
jmp 0xb290b
movq -0x10(%rbp), %rax
shrq $0xf, %rax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb2970
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
andq $0x7fff, %rax # imm = 0x7FFF
orq $0x8000, %rax # imm = 0x8000
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_implicit_weight_put:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_B28C2; jumptable 00000000000B28C2 default case
mov rax, [rbp+var_20]
lea rcx, jpt_B28C2
movsxd rax, ds:(jpt_B28C2 - 1A817Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B28C4:
mov rax, [rbp+var_8]; jumptable 00000000000B28C2 case 1
mov word ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_B290B
loc_B28D9:
mov rax, [rbp+var_8]; jumptable 00000000000B28C2 case 2
mov word ptr [rax], 2
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_B290B
loc_B28EE:
mov rax, [rbp+var_8]; jumptable 00000000000B28C2 case 3
mov word ptr [rax], 1
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_B290B
def_B28C2:
jmp short $+2; jumptable 00000000000B28C2 default case
loc_B2905:
jmp short $+2
loc_B2907:
jmp short $+2; jumptable 00000000000B28C2 case 0
loc_B2909:
jmp short $+2; jumptable 00000000000B28C2 case 0
loc_B290B:
mov rax, [rbp+var_10]
shr rax, 0Fh
movzx eax, ax
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call my_uca_implicit_weight_base
mov cx, ax
mov eax, [rbp+var_24]
movzx ecx, cx
add eax, ecx
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_10]
and rax, 7FFFh
or rax, 8000h
mov cx, ax
mov rax, [rbp+var_8]
mov [rax+2], cx
mov rax, [rbp+var_8]
mov word ptr [rax+4], 0
add rsp, 30h
pop rbp
retn
| _WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3)
{
_WORD *result; // rax
switch ( a3 )
{
case 1:
*a1 = 32;
a1[1] = 0;
break;
case 2:
*a1 = 2;
a1[1] = 0;
break;
case 3:
*a1 = 1;
a1[1] = 0;
break;
default:
break;
}
*a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15);
a1[1] = a2 & 0x7FFF | 0x8000;
result = a1;
a1[2] = 0;
return result;
}
| my_uca_implicit_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x001b2903
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x2a817c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001b290b
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001b290b
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001b290b
LAB_001b2903:
JMP 0x001b2905
LAB_001b2905:
JMP 0x001b2907
LAB_001b2907:
JMP 0x001b2909
caseD_0:
JMP 0x001b290b
LAB_001b290b:
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0xf
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b2970
MOV CX,AX
MOV EAX,dword ptr [RBP + -0x24]
MOVZX ECX,CX
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x7fff
OR RAX,0x8000
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x4],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3)
{
short sVar1;
switch(param_3) {
default:
break;
case 1:
*param_1 = 0x20;
param_1[1] = 0;
break;
case 2:
*param_1 = 2;
param_1[1] = 0;
break;
case 3:
*param_1 = 1;
param_1[1] = 0;
}
sVar1 = my_uca_implicit_weight_base(param_2);
*param_1 = (short)(param_2 >> 0xf) + sVar1;
param_1[1] = (ushort)param_2 & 0x7fff | 0x8000;
param_1[2] = 0;
return;
}
| |
23,013 | my_strntol_8bit | eloqsql/strings/ctype-simple.c | long my_strntol_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register uint32 cutoff;
register uint cutlim;
register uint32 i;
register const char *s;
register uchar c;
const char *save, *e;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for ( ; s<e && my_isspace(cs, *s) ; s++);
if (s == e)
{
goto noconv;
}
/* Check for a sign. */
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = ((uint32)~0L) / (uint32) base;
cutlim = (uint) (((uint32)~0L) % (uint32) base);
overflow = 0;
i = 0;
for (c = *s; s != e; c = *++s)
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (uint32) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (negative)
{
if (i > (uint32) INT_MIN32)
overflow = 1;
}
else if (i > INT_MAX32)
overflow = 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) i) : (long) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O0 | c | my_strntol_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x6d(%rbp)
jae 0xf7bd8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0xf7be1
jmp 0xf7bf1
jmp 0xf7be3
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xf7ba9
movq -0x50(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0xf7c00
jmp 0xf7df5
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xf7c21
movl $0x1, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xf7c4b
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0xf7c42
movl $0x0, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xf7c49
movl $0x0, -0x3c(%rbp)
jmp 0xf7c4b
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x40(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x44(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0xf7d55
movzbl -0x51(%rbp), %eax
cmpl $0x30, %eax
jl 0xf7cb0
movzbl -0x51(%rbp), %eax
cmpl $0x39, %eax
jg 0xf7cb0
movzbl -0x51(%rbp), %eax
subl $0x30, %eax
movb %al, -0x51(%rbp)
jmp 0xf7cf8
movzbl -0x51(%rbp), %eax
cmpl $0x41, %eax
jl 0xf7cd1
movzbl -0x51(%rbp), %eax
cmpl $0x5a, %eax
jg 0xf7cd1
movzbl -0x51(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x51(%rbp)
jmp 0xf7cf6
movzbl -0x51(%rbp), %eax
cmpl $0x61, %eax
jl 0xf7cf2
movzbl -0x51(%rbp), %eax
cmpl $0x7a, %eax
jg 0xf7cf2
movzbl -0x51(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x51(%rbp)
jmp 0xf7cf4
jmp 0xf7d55
jmp 0xf7cf6
jmp 0xf7cf8
movzbl -0x51(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0xf7d03
jmp 0xf7d55
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
ja 0xf7d1c
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0xf7d25
movzbl -0x51(%rbp), %eax
cmpl -0x44(%rbp), %eax
jbe 0xf7d25
movl $0x1, -0x6c(%rbp)
jmp 0xf7d39
movl -0x24(%rbp), %eax
imull -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movzbl -0x51(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0xf7d3b
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb 0x1(%rax), %al
movb %al, -0x51(%rbp)
jmp 0xf7c84
movq -0x50(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0xf7d64
jmp 0xf7df5
cmpq $0x0, -0x30(%rbp)
je 0xf7d76
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0xf7d8e
cmpl $0x80000000, -0x48(%rbp) # imm = 0x80000000
jbe 0xf7d8c
movl $0x1, -0x6c(%rbp)
jmp 0xf7da2
movl -0x48(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0xf7da0
movl $0x1, -0x6c(%rbp)
jmp 0xf7da2
cmpl $0x0, -0x6c(%rbp)
je 0xf7dce
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx # imm = 0x80000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xf7e19
cmpl $0x0, -0x3c(%rbp)
je 0xf7de4
movl -0x48(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0xf7deb
movl -0x48(%rbp), %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf7e19
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0xf7e11
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| my_strntol_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_F7BA9:
mov rcx, [rbp+var_50]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_6D], al
jnb short loc_F7BD8
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_50]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_6D], al
loc_F7BD8:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_F7BE1
jmp short loc_F7BF1
loc_F7BE1:
jmp short $+2
loc_F7BE3:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_F7BA9
loc_F7BF1:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_68]
jnz short loc_F7C00
jmp loc_F7DF5
loc_F7C00:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_F7C21
mov [rbp+var_3C], 1
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_F7C4B
loc_F7C21:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_F7C42
mov [rbp+var_3C], 0
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_F7C49
loc_F7C42:
mov [rbp+var_3C], 0
loc_F7C49:
jmp short $+2
loc_F7C4B:
mov rax, [rbp+var_50]
mov [rbp+var_60], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_40], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_44], edx
mov [rbp+var_6C], 0
mov [rbp+var_48], 0
mov rax, [rbp+var_50]
mov al, [rax]
mov [rbp+var_51], al
loc_F7C84:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_68]
jz loc_F7D55
movzx eax, [rbp+var_51]
cmp eax, 30h ; '0'
jl short loc_F7CB0
movzx eax, [rbp+var_51]
cmp eax, 39h ; '9'
jg short loc_F7CB0
movzx eax, [rbp+var_51]
sub eax, 30h ; '0'
mov [rbp+var_51], al
jmp short loc_F7CF8
loc_F7CB0:
movzx eax, [rbp+var_51]
cmp eax, 41h ; 'A'
jl short loc_F7CD1
movzx eax, [rbp+var_51]
cmp eax, 5Ah ; 'Z'
jg short loc_F7CD1
movzx eax, [rbp+var_51]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_51], al
jmp short loc_F7CF6
loc_F7CD1:
movzx eax, [rbp+var_51]
cmp eax, 61h ; 'a'
jl short loc_F7CF2
movzx eax, [rbp+var_51]
cmp eax, 7Ah ; 'z'
jg short loc_F7CF2
movzx eax, [rbp+var_51]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_51], al
jmp short loc_F7CF4
loc_F7CF2:
jmp short loc_F7D55
loc_F7CF4:
jmp short $+2
loc_F7CF6:
jmp short $+2
loc_F7CF8:
movzx eax, [rbp+var_51]
cmp eax, [rbp+var_24]
jl short loc_F7D03
jmp short loc_F7D55
loc_F7D03:
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
ja short loc_F7D1C
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
jnz short loc_F7D25
movzx eax, [rbp+var_51]
cmp eax, [rbp+var_44]
jbe short loc_F7D25
loc_F7D1C:
mov [rbp+var_6C], 1
jmp short loc_F7D39
loc_F7D25:
mov eax, [rbp+var_24]
imul eax, [rbp+var_48]
mov [rbp+var_48], eax
movzx eax, [rbp+var_51]
add eax, [rbp+var_48]
mov [rbp+var_48], eax
loc_F7D39:
jmp short $+2
loc_F7D3B:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
mov al, [rax+1]
mov [rbp+var_51], al
jmp loc_F7C84
loc_F7D55:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_60]
jnz short loc_F7D64
jmp loc_F7DF5
loc_F7D64:
cmp [rbp+var_30], 0
jz short loc_F7D76
mov rcx, [rbp+var_50]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_F7D76:
cmp [rbp+var_3C], 0
jz short loc_F7D8E
cmp [rbp+var_48], 80000000h
jbe short loc_F7D8C
mov [rbp+var_6C], 1
loc_F7D8C:
jmp short loc_F7DA2
loc_F7D8E:
mov eax, [rbp+var_48]
cmp rax, 7FFFFFFFh
jle short loc_F7DA0
mov [rbp+var_6C], 1
loc_F7DA0:
jmp short $+2
loc_F7DA2:
cmp [rbp+var_6C], 0
jz short loc_F7DCE
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov eax, 7FFFFFFFh
mov rcx, 0FFFFFFFF80000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_F7E19
loc_F7DCE:
cmp [rbp+var_3C], 0
jz short loc_F7DE4
mov eax, [rbp+var_48]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_78], rax
jmp short loc_F7DEB
loc_F7DE4:
mov eax, [rbp+var_48]
mov [rbp+var_78], rax
loc_F7DEB:
mov rax, [rbp+var_78]
mov [rbp+var_8], rax
jmp short loc_F7E19
loc_F7DF5:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_F7E11
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_F7E11:
mov [rbp+var_8], 0
loc_F7E19:
mov rax, [rbp+var_8]
pop rbp
retn
| long long my_strntol_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
_BYTE *v6; // rax
long long v7; // rax
bool v10; // [rsp+Bh] [rbp-6Dh]
int v11; // [rsp+Ch] [rbp-6Ch]
_BYTE *v12; // [rsp+10h] [rbp-68h]
_BYTE *v13; // [rsp+18h] [rbp-60h]
unsigned __int8 v14; // [rsp+27h] [rbp-51h]
unsigned __int8 v15; // [rsp+27h] [rbp-51h]
_BYTE *v16; // [rsp+28h] [rbp-50h]
unsigned int v17; // [rsp+30h] [rbp-48h]
unsigned long long v18; // [rsp+34h] [rbp-44h]
int v19; // [rsp+3Ch] [rbp-3Ch]
*a6 = 0;
v16 = a2;
v12 = &a2[a3];
while ( 1 )
{
v10 = 0;
if ( v16 < v12 )
v10 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v16 + 1LL) & 8) != 0;
if ( !v10 )
break;
++v16;
}
if ( v16 == v12 )
goto LABEL_45;
if ( *v16 == 45 )
{
v19 = 1;
++v16;
}
else
{
v19 = 0;
if ( *v16 == 43 )
++v16;
}
v13 = v16;
v11 = 0;
v17 = 0;
v14 = *v16;
while ( v16 != v12 )
{
if ( v14 < 0x30u || v14 > 0x39u )
{
if ( v14 < 0x41u || v14 > 0x5Au )
{
if ( v14 < 0x61u || v14 > 0x7Au )
break;
v15 = v14 - 97 + 10;
}
else
{
v15 = v14 - 65 + 10;
}
}
else
{
v15 = v14 - 48;
}
if ( v15 >= a4 )
break;
LODWORD(v18) = 0xFFFFFFFF % a4;
HIDWORD(v18) = 0xFFFFFFFF / a4;
if ( __PAIR64__(v17, v15) <= v18 )
v17 = v17 * a4 + v15;
else
v11 = 1;
v6 = v16++;
v14 = v6[1];
}
if ( v16 == v13 )
{
LABEL_45:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v16;
if ( v19 )
{
if ( v17 > 0x80000000 )
v11 = 1;
}
else if ( v17 > 0x7FFFFFFFuLL )
{
v11 = 1;
}
if ( v11 )
{
*a6 = 34;
v7 = 0x7FFFFFFFLL;
if ( v19 )
return 0xFFFFFFFF80000000LL;
return v7;
}
else if ( v19 )
{
return -(long long)v17;
}
else
{
return v17;
}
}
}
| my_strntol_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_001f7ba9:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x6d],AL
JNC 0x001f7bd8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x6d],AL
LAB_001f7bd8:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x001f7be1
JMP 0x001f7bf1
LAB_001f7be1:
JMP 0x001f7be3
LAB_001f7be3:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001f7ba9
LAB_001f7bf1:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001f7c00
JMP 0x001f7df5
LAB_001f7c00:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x001f7c21
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001f7c4b
LAB_001f7c21:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x001f7c42
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001f7c49
LAB_001f7c42:
MOV dword ptr [RBP + -0x3c],0x0
LAB_001f7c49:
JMP 0x001f7c4b
LAB_001f7c4b:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x44],EDX
MOV dword ptr [RBP + -0x6c],0x0
MOV dword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x51],AL
LAB_001f7c84:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x001f7d55
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x30
JL 0x001f7cb0
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x39
JG 0x001f7cb0
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x30
MOV byte ptr [RBP + -0x51],AL
JMP 0x001f7cf8
LAB_001f7cb0:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x41
JL 0x001f7cd1
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x5a
JG 0x001f7cd1
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x51],AL
JMP 0x001f7cf6
LAB_001f7cd1:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x61
JL 0x001f7cf2
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x7a
JG 0x001f7cf2
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x51],AL
JMP 0x001f7cf4
LAB_001f7cf2:
JMP 0x001f7d55
LAB_001f7cf4:
JMP 0x001f7cf6
LAB_001f7cf6:
JMP 0x001f7cf8
LAB_001f7cf8:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001f7d03
JMP 0x001f7d55
LAB_001f7d03:
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JA 0x001f7d1c
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x001f7d25
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x001f7d25
LAB_001f7d1c:
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x001f7d39
LAB_001f7d25:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
MOVZX EAX,byte ptr [RBP + -0x51]
ADD EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
LAB_001f7d39:
JMP 0x001f7d3b
LAB_001f7d3b:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOV AL,byte ptr [RAX + 0x1]
MOV byte ptr [RBP + -0x51],AL
JMP 0x001f7c84
LAB_001f7d55:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x60]
JNZ 0x001f7d64
JMP 0x001f7df5
LAB_001f7d64:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001f7d76
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001f7d76:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001f7d8e
CMP dword ptr [RBP + -0x48],0x80000000
JBE 0x001f7d8c
MOV dword ptr [RBP + -0x6c],0x1
LAB_001f7d8c:
JMP 0x001f7da2
LAB_001f7d8e:
MOV EAX,dword ptr [RBP + -0x48]
CMP RAX,0x7fffffff
JLE 0x001f7da0
MOV dword ptr [RBP + -0x6c],0x1
LAB_001f7da0:
JMP 0x001f7da2
LAB_001f7da2:
CMP dword ptr [RBP + -0x6c],0x0
JZ 0x001f7dce
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,0x7fffffff
MOV RCX,-0x80000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f7e19
LAB_001f7dce:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001f7de4
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x001f7deb
LAB_001f7de4:
MOV EAX,dword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x78],RAX
LAB_001f7deb:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f7e19
LAB_001f7df5:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001f7e11
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001f7e11:
MOV qword ptr [RBP + -0x8],0x0
LAB_001f7e19:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,int8 *param_5,
int4 *param_6)
{
bool bVar1;
byte *pbVar2;
uint uVar3;
byte *pbVar4;
bool bVar5;
ulong local_80;
byte local_59;
byte *local_58;
uint local_50;
*param_6 = 0;
pbVar4 = param_2 + param_3;
local_58 = param_2;
while( true ) {
bVar5 = false;
if (local_58 < pbVar4) {
bVar5 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_58) & 8) != 0;
}
if (!bVar5) break;
local_58 = local_58 + 1;
}
if (local_58 != pbVar4) {
if (*local_58 == 0x2d) {
bVar5 = true;
local_58 = local_58 + 1;
}
else {
if (*local_58 == 0x2b) {
local_58 = local_58 + 1;
}
bVar5 = false;
}
pbVar2 = local_58;
uVar3 = (uint)(0xffffffff / (ulong)param_4);
bVar1 = false;
local_50 = 0;
local_59 = *local_58;
for (; local_58 != pbVar4; local_58 = local_58 + 1) {
if ((local_59 < 0x30) || (0x39 < local_59)) {
if ((local_59 < 0x41) || (0x5a < local_59)) {
if ((local_59 < 0x61) || (0x7a < local_59)) break;
local_59 = local_59 + 0xa9;
}
else {
local_59 = local_59 - 0x37;
}
}
else {
local_59 = local_59 - 0x30;
}
if ((int)param_4 <= (int)(uint)local_59) break;
if ((uVar3 < local_50) ||
((local_50 == uVar3 && ((uint)(0xffffffff % (ulong)param_4) < (uint)local_59)))) {
bVar1 = true;
}
else {
local_50 = (uint)local_59 + param_4 * local_50;
}
local_59 = local_58[1];
}
if (local_58 != pbVar2) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_58;
}
if (bVar5) {
if (0x80000000 < local_50) {
bVar1 = true;
}
}
else if (0x7fffffff < local_50) {
bVar1 = true;
}
if (bVar1) {
*param_6 = 0x22;
if (!bVar5) {
return 0x7fffffff;
}
return 0xffffffff80000000;
}
if (bVar5) {
local_80 = -(ulong)local_50;
}
else {
local_80 = (ulong)local_50;
}
return local_80;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
| |
23,014 | mimi_transformer::mimi_transformer(ggml_easy::ctx&, char const*, int) | ngxson[P]ggml-easy/demo/kyutai-mimi.cpp | mimi_transformer(ggml_easy::ctx & ctx, const char * prefix, int n_layers) {
for (int il = 0; il < n_layers; il++) {
layers.push_back({
.inp_norm_w = ctx.get_weight("%s_transformer.layers.%d.input_layernorm.weight", prefix, il),
.inp_norm_b = ctx.get_weight("%s_transformer.layers.%d.input_layernorm.bias", prefix, il),
.attn_q = ctx.get_weight("%s_transformer.layers.%d.self_attn.q_proj.weight", prefix, il),
.attn_k = ctx.get_weight("%s_transformer.layers.%d.self_attn.k_proj.weight", prefix, il),
.attn_v = ctx.get_weight("%s_transformer.layers.%d.self_attn.v_proj.weight", prefix, il),
.attn_o = ctx.get_weight("%s_transformer.layers.%d.self_attn.o_proj.weight", prefix, il),
.attn_post_norm_w = ctx.get_weight("%s_transformer.layers.%d.post_attention_layernorm.weight", prefix, il),
.attn_post_norm_b = ctx.get_weight("%s_transformer.layers.%d.post_attention_layernorm.bias", prefix, il),
.attn_layer_scale = ctx.get_weight("%s_transformer.layers.%d.self_attn_layer_scale.scale", prefix, il),
.ffn_up = ctx.get_weight("%s_transformer.layers.%d.mlp.fc1.weight", prefix, il),
.ffn_down = ctx.get_weight("%s_transformer.layers.%d.mlp.fc2.weight", prefix, il),
.mlp_layer_scale = ctx.get_weight("%s_transformer.layers.%d.mlp_layer_scale.scale", prefix, il),
});
}
} | O2 | cpp | mimi_transformer::mimi_transformer(ggml_easy::ctx&, char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ebp
leaq 0x8(%rsp), %r12
xorl %r13d, %r13d
cmpl %r13d, %ebp
je 0x8227
movq %r15, %rdi
leaq 0x5449(%rip), %rsi # 0xd517
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x545d(%rip), %rsi # 0xd547
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x10(%rsp)
movq %r15, %rdi
leaq 0x546f(%rip), %rsi # 0xd575
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x18(%rsp)
movq %r15, %rdi
leaq 0x5484(%rip), %rsi # 0xd5a6
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x20(%rsp)
movq %r15, %rdi
leaq 0x5499(%rip), %rsi # 0xd5d7
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x28(%rsp)
movq %r15, %rdi
leaq 0x54ae(%rip), %rsi # 0xd608
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x30(%rsp)
movq %r15, %rdi
leaq 0x54c3(%rip), %rsi # 0xd639
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x38(%rsp)
movq %r15, %rdi
leaq 0x54e0(%rip), %rsi # 0xd672
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x40(%rsp)
movq %r15, %rdi
leaq 0x54fb(%rip), %rsi # 0xd6a9
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x48(%rsp)
movq %r15, %rdi
leaq 0x5514(%rip), %rsi # 0xd6de
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x50(%rsp)
movq %r15, %rdi
leaq 0x5520(%rip), %rsi # 0xd706
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x58(%rsp)
movq %r15, %rdi
leaq 0x552c(%rip), %rsi # 0xd72e
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xaaa4
movq %rax, 0x60(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xac46
incl %r13d
jmp 0x80bb
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xae2a
movq %r14, %rdi
callq 0x57e0
nop
| _ZN16mimi_transformerC2ERN9ggml_easy3ctxEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
and qword ptr [rdi+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor eax, eax
test ecx, ecx
cmovle ebp, eax
lea r12, [rsp+98h+var_90]
xor r13d, r13d
loc_80BB:
cmp ebp, r13d
jz loc_8227
mov rdi, r15; this
lea rsi, aSTransformerLa; "%s_transformer.layers.%d.input_layernor"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_90], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_0; "%s_transformer.layers.%d.input_layernor"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_88], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_1; "%s_transformer.layers.%d.self_attn.q_pr"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_80], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_2; "%s_transformer.layers.%d.self_attn.k_pr"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_78], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_3; "%s_transformer.layers.%d.self_attn.v_pr"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_70], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_4; "%s_transformer.layers.%d.self_attn.o_pr"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_68], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_5; "%s_transformer.layers.%d.post_attention"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_60], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_6; "%s_transformer.layers.%d.post_attention"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_58], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_7; "%s_transformer.layers.%d.self_attn_laye"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_50], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_8; "%s_transformer.layers.%d.mlp.fc1.weight"
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_48], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_9; "%s_transformer.layers.%d.mlp.fc2.weight"
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_40], rax
mov rdi, r15; this
lea rsi, aSTransformerLa_10; "%s_transformer.layers.%d.mlp_layer_scal"...
mov rdx, r14
mov ecx, r13d
xor eax, eax
call _ZN9ggml_easy3ctx10get_weightEPKcz; ggml_easy::ctx::get_weight(char const*,...)
mov [rsp+98h+var_38], rax
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorIN16mimi_transformer5layerESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<mimi_transformer::layer>::emplace_back<mimi_transformer::layer>(mimi_transformer::layer &&)
inc r13d
jmp loc_80BB
loc_8227:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseIN16mimi_transformer5layerESaIS1_EED2Ev; std::_Vector_base<mimi_transformer::layer>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| void mimi_transformer::mimi_transformer(mimi_transformer *this, ggml_easy::ctx *a2, const char *a3, int a4)
{
int v4; // ebp
int i; // r13d
_QWORD v7[18]; // [rsp+8h] [rbp-90h] BYREF
v4 = a4;
*((_QWORD *)this + 2) = 0LL;
*(_OWORD *)this = 0LL;
if ( a4 <= 0 )
v4 = 0;
for ( i = 0; v4 != i; ++i )
{
v7[0] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.input_layernorm.weight", a3, i);
v7[1] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.input_layernorm.bias", a3, i);
v7[2] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.self_attn.q_proj.weight", a3, i);
v7[3] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.self_attn.k_proj.weight", a3, i);
v7[4] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.self_attn.v_proj.weight", a3, i);
v7[5] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.self_attn.o_proj.weight", a3, i);
v7[6] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.post_attention_layernorm.weight", a3, i);
v7[7] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.post_attention_layernorm.bias", a3, i);
v7[8] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.self_attn_layer_scale.scale", a3, i);
v7[9] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.mlp.fc1.weight", a3, i);
v7[10] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.mlp.fc2.weight", a3, i);
v7[11] = ggml_easy::ctx::get_weight(a2, "%s_transformer.layers.%d.mlp_layer_scale.scale", a3, i);
std::vector<mimi_transformer::layer>::emplace_back<mimi_transformer::layer>(this, v7);
}
}
| mimi_transformer:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
AND qword ptr [RDI + 0x10],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
TEST ECX,ECX
CMOVLE EBP,EAX
LEA R12,[RSP + 0x8]
XOR R13D,R13D
LAB_001080bb:
CMP EBP,R13D
JZ 0x00108227
LAB_001080c4:
MOV RDI,R15
LEA RSI,[0x10d517]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R15
LEA RSI,[0x10d547]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,R15
LEA RSI,[0x10d575]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,R15
LEA RSI,[0x10d5a6]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R15
LEA RSI,[0x10d5d7]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,R15
LEA RSI,[0x10d608]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,R15
LEA RSI,[0x10d639]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,R15
LEA RSI,[0x10d672]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,R15
LEA RSI,[0x10d6a9]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,R15
LEA RSI,[0x10d6de]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,R15
LEA RSI,[0x10d706]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,R15
LEA RSI,[0x10d72e]
MOV RDX,R14
MOV ECX,R13D
XOR EAX,EAX
CALL 0x0010aaa4
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x0010ac46
LAB_0010821f:
INC R13D
JMP 0x001080bb
LAB_00108227:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* mimi_transformer::mimi_transformer(ggml_easy::ctx&, char const*, int) */
void __thiscall
mimi_transformer::mimi_transformer(mimi_transformer *this,ctx *param_1,char *param_2,int param_3)
{
uint uVar1;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
*(int8 *)(this + 0x10) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
if (param_3 < 1) {
param_3 = 0;
}
for (uVar1 = 0; param_3 != uVar1; uVar1 = uVar1 + 1) {
/* try { // try from 001080c4 to 0010821e has its CatchHandler @ 00108236 */
local_90 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.input_layernorm.weight",param_2,
(ulong)uVar1);
local_88 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.input_layernorm.bias",param_2,
(ulong)uVar1);
local_80 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.self_attn.q_proj.weight",param_2
,(ulong)uVar1);
local_78 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.self_attn.k_proj.weight",param_2
,(ulong)uVar1);
local_70 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.self_attn.v_proj.weight",param_2
,(ulong)uVar1);
local_68 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.self_attn.o_proj.weight",param_2
,(ulong)uVar1);
local_60 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.post_attention_layernorm.weight"
,param_2,(ulong)uVar1);
local_58 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.post_attention_layernorm.bias",
param_2,(ulong)uVar1);
local_50 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.self_attn_layer_scale.scale",
param_2,(ulong)uVar1);
local_48 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.mlp.fc1.weight",param_2,
(ulong)uVar1);
local_40 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.mlp.fc2.weight",param_2,
(ulong)uVar1);
local_38 = ggml_easy::ctx::get_weight
((char *)param_1,"%s_transformer.layers.%d.mlp_layer_scale.scale",param_2,
(ulong)uVar1);
std::vector<mimi_transformer::layer,std::allocator<mimi_transformer::layer>>::
emplace_back<mimi_transformer::layer>
((vector<mimi_transformer::layer,std::allocator<mimi_transformer::layer>> *)this,
(layer *)&local_90);
}
return;
}
| |
23,015 | MNN::CreateExpandDims(flatbuffers::FlatBufferBuilder&, MNN::ExpandDimsT const*, std::__1::function<unsigned long (void*)> const*) | mnn-tts/MNN/schema/current/TensorflowOp_generated.h | inline flatbuffers::Offset<ExpandDims> CreateExpandDims(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
(void)_rehasher;
(void)_o;
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ExpandDimsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _T = _o->T;
auto _Tdim = _o->Tdim;
auto _axis = _o->axis;
return MNN::CreateExpandDims(
_fbb,
_T,
_Tdim,
_axis);
} | O0 | c | MNN::CreateExpandDims(flatbuffers::FlatBufferBuilder&, MNN::ExpandDimsT const*, std::__1::function<unsigned long (void*)> const*):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movl 0x4(%rsp), %ecx
callq 0x1a0b0
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
| _ZN3MNN16CreateExpandDimsERN11flatbuffers17FlatBufferBuilderEPKNS_11ExpandDimsTEPKNSt3__18functionIFmPvEEE:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_18]
mov eax, [rax]
mov [rsp+48h+var_3C], eax
mov rax, [rsp+48h+var_18]
mov eax, [rax+4]
mov [rsp+48h+var_40], eax
mov rax, [rsp+48h+var_18]
mov eax, [rax+8]
mov [rsp+48h+var_44], eax
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_3C]
mov edx, [rsp+48h+var_40]
mov ecx, [rsp+48h+var_44]
call _ZN3MNN16CreateExpandDimsERN11flatbuffers17FlatBufferBuilderENS_8DataTypeES3_i; MNN::CreateExpandDims(flatbuffers::FlatBufferBuilder &,MNN::DataType,MNN::DataType,int)
mov [rsp+48h+var_4], eax
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long MNN::CreateExpandDims(long long a1, unsigned int *a2)
{
return (unsigned int)MNN::CreateExpandDims(a1, *a2, a2[1], a2[2]);
}
| CreateExpandDims:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x8],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x0011a0b0
MOV dword ptr [RSP + 0x44],EAX
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
/* MNN::CreateExpandDims(flatbuffers::FlatBufferBuilder&, MNN::ExpandDimsT const*,
std::function<unsigned long (void*)> const*) */
int4 MNN::CreateExpandDims(FlatBufferBuilder *param_1,ExpandDimsT *param_2,function *param_3)
{
int4 uVar1;
uVar1 = CreateExpandDims(param_1,*(int4 *)param_2,*(int4 *)(param_2 + 4),
*(int4 *)(param_2 + 8));
return uVar1;
}
| |
23,016 | rlGetGlTextureFormats | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h | void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
{
*glInternalFormat = 0;
*glFormat = 0;
*glType = 0;
switch (format)
{
#if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_ES2)
// NOTE: on OpenGL ES 2.0 (WebGL), internalFormat must match format and options allowed are: GL_LUMINANCE, GL_RGB, GL_RGBA
case RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_LUMINANCE_ALPHA; *glFormat = GL_LUMINANCE_ALPHA; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_BYTE; break;
#if !defined(GRAPHICS_API_OPENGL_11)
#if defined(GRAPHICS_API_OPENGL_ES3)
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_R32F_EXT; *glFormat = GL_RED_EXT; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB32F_EXT; *glFormat = GL_RGB; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA32F_EXT; *glFormat = GL_RGBA; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_R16F_EXT; *glFormat = GL_RED_EXT; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB16F_EXT; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA16F_EXT; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT; break;
#else
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
#if defined(GRAPHICS_API_OPENGL_21)
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_HALF_FLOAT_ARB; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT_ARB; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT_ARB; break;
#else // defined(GRAPHICS_API_OPENGL_ES2)
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
#endif
#endif
#endif
#elif defined(GRAPHICS_API_OPENGL_33)
case RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_R8; *glFormat = GL_RED; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_RG8; *glFormat = GL_RG; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB565; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB8; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGB5_A1; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA4; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: *glInternalFormat = GL_RGBA8; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_R32F; *glFormat = GL_RED; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB32F; *glFormat = GL_RGB; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA32F; *glFormat = GL_RGBA; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_R16F; *glFormat = GL_RED; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB16F; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA16F; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT; break;
#endif
#if !defined(GRAPHICS_API_OPENGL_11)
case RL_PIXELFORMAT_COMPRESSED_DXT1_RGB: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_ETC1_RGB: if (RLGL.ExtSupported.texCompETC1) *glInternalFormat = GL_ETC1_RGB8_OES; break; // NOTE: Requires OpenGL ES 2.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ETC2_RGB: if (RLGL.ExtSupported.texCompETC2) *glInternalFormat = GL_COMPRESSED_RGB8_ETC2; break; // NOTE: Requires OpenGL ES 3.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA: if (RLGL.ExtSupported.texCompETC2) *glInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; break; // NOTE: Requires OpenGL ES 3.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_PVRT_RGB: if (RLGL.ExtSupported.texCompPVRT) *glInternalFormat = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; break; // NOTE: Requires PowerVR GPU
case RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA: if (RLGL.ExtSupported.texCompPVRT) *glInternalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; break; // NOTE: Requires PowerVR GPU
case RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: if (RLGL.ExtSupported.texCompASTC) *glInternalFormat = GL_COMPRESSED_RGBA_ASTC_4x4_KHR; break; // NOTE: Requires OpenGL ES 3.1 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: if (RLGL.ExtSupported.texCompASTC) *glInternalFormat = GL_COMPRESSED_RGBA_ASTC_8x8_KHR; break; // NOTE: Requires OpenGL ES 3.1 or OpenGL 4.3
#endif
default: TRACELOG(RL_LOG_WARNING, "TEXTURE: Current format not supported (%i)", format); break;
}
} | O2 | c | rlGetGlTextureFormats:
andl $0x0, (%rsi)
andl $0x0, (%rdx)
andl $0x0, (%rcx)
movl %edi, %eax
leal -0x1(%rax), %edi
cmpl $0x17, %edi
ja 0x54719
leaq 0x6f1d4(%rip), %rax # 0xc370c
movslq (%rax,%rdi,4), %rdi
addq %rax, %rdi
jmpq *%rdi
movl $0x8229, (%rsi) # imm = 0x8229
movl $0x1903, (%rdx) # imm = 0x1903
jmp 0x5469a
cmpb $0x1, 0xd366e(%rip) # 0x127bc7
jne 0x546a0
movl $0x83f3, (%rsi) # imm = 0x83F3
retq
cmpb $0x1, 0xd365a(%rip) # 0x127bc7
jne 0x546a0
movl $0x83f1, (%rsi) # imm = 0x83F1
retq
cmpb $0x1, 0xd3645(%rip) # 0x127bc6
jne 0x54589
movl $0x881b, (%rsi) # imm = 0x881B
movl $0x1907, (%rdx) # imm = 0x1907
jmp 0x546c6
movl $0x8057, (%rsi) # imm = 0x8057
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x8034, (%rcx) # imm = 0x8034
retq
cmpb $0x1, 0xd3618(%rip) # 0x127bc6
jne 0x545b6
movl $0x881a, (%rsi) # imm = 0x881A
movl $0x1908, (%rdx) # imm = 0x1908
jmp 0x546c6
cmpb $0x1, 0xd35fd(%rip) # 0x127bc5
jne 0x545d0
movl $0x8814, (%rsi) # imm = 0x8814
movl $0x1908, (%rdx) # imm = 0x1908
jmp 0x546e2
movl $0x8d62, (%rsi) # imm = 0x8D62
movl $0x1907, (%rdx) # imm = 0x1907
movl $0x8363, (%rcx) # imm = 0x8363
retq
cmpb $0x1, 0xd35d2(%rip) # 0x127bc7
jne 0x546a0
movl $0x83f2, (%rsi) # imm = 0x83F2
retq
movl $0x8051, (%rsi) # imm = 0x8051
movl $0x1907, (%rdx) # imm = 0x1907
jmp 0x5469a
cmpb $0x1, 0xd35ab(%rip) # 0x127bc5
jne 0x54622
movl $0x822e, (%rsi) # imm = 0x822E
movl $0x1903, (%rdx) # imm = 0x1903
jmp 0x546e2
movl $0x822b, (%rsi) # imm = 0x822B
movl $0x8227, (%rdx) # imm = 0x8227
jmp 0x5469a
cmpb $0x1, 0xd3586(%rip) # 0x127bc8
jne 0x546a0
movl $0x8d64, (%rsi) # imm = 0x8D64
retq
cmpb $0x1, 0xd3578(%rip) # 0x127bca
jne 0x546a0
movl $0x8c00, (%rsi) # imm = 0x8C00
retq
movl $0x8056, (%rsi) # imm = 0x8056
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x8033, (%rcx) # imm = 0x8033
retq
cmpb $0x1, 0xd3555(%rip) # 0x127bca
jne 0x546a0
movl $0x8c02, (%rsi) # imm = 0x8C02
retq
cmpb $0x1, 0xd3542(%rip) # 0x127bc7
jne 0x546a0
movl $0x83f0, (%rsi) # imm = 0x83F0
retq
movl $0x8058, (%rsi) # imm = 0x8058
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x1401, (%rcx) # imm = 0x1401
retq
cmpb $0x1, 0xd3521(%rip) # 0x127bc9
jne 0x546a0
movl $0x9274, (%rsi) # imm = 0x9274
retq
cmpb $0x1, 0xd350e(%rip) # 0x127bc6
jne 0x546c0
movl $0x822d, (%rsi) # imm = 0x822D
movl $0x1903, (%rdx) # imm = 0x1903
movl $0x140b, (%rcx) # imm = 0x140B
retq
cmpb $0x1, 0xd34f1(%rip) # 0x127bc5
jne 0x546dc
movl $0x8815, (%rsi) # imm = 0x8815
movl $0x1907, (%rdx) # imm = 0x1907
movl $0x1406, (%rcx) # imm = 0x1406
retq
cmpb $0x1, 0xd34db(%rip) # 0x127bcb
jne 0x546a0
movl $0x93b0, (%rsi) # imm = 0x93B0
retq
cmpb $0x1, 0xd34c9(%rip) # 0x127bc9
jne 0x546a0
movl $0x9278, (%rsi) # imm = 0x9278
retq
cmpb $0x1, 0xd34bb(%rip) # 0x127bcb
jne 0x546a0
movl $0x93b7, (%rsi) # imm = 0x93B7
retq
leaq 0x70cbb(%rip), %rsi # 0xc53db
pushq $0x4
popq %rdi
movl %eax, %edx
xorl %eax, %eax
jmp 0xa128b
| rlGetGlTextureFormats:
and dword ptr [rsi], 0
and dword ptr [rdx], 0
and dword ptr [rcx], 0
mov eax, edi
lea edi, [rax-1]; switch 24 cases
cmp edi, 17h
ja def_5453F; jumptable 000000000005453F default case
lea rax, jpt_5453F
movsxd rdi, ds:(jpt_5453F - 0C370Ch)[rax+rdi*4]
add rdi, rax
jmp rdi; switch jump
loc_54541:
mov dword ptr [rsi], 8229h; jumptable 000000000005453F case 1
mov dword ptr [rdx], 1903h
jmp loc_5469A
loc_54552:
cmp cs:byte_127BC7, 1; jumptable 000000000005453F case 17
jnz locret_546A0
mov dword ptr [rsi], 83F3h
retn
loc_54566:
cmp cs:byte_127BC7, 1; jumptable 000000000005453F case 15
jnz locret_546A0
mov dword ptr [rsi], 83F1h
retn
loc_5457A:
cmp byte ptr cs:word_127BC5+1, 1; jumptable 000000000005453F case 12
jnz short loc_54589
mov dword ptr [rsi], 881Bh
loc_54589:
mov dword ptr [rdx], 1907h
jmp loc_546C6
loc_54594:
mov dword ptr [rsi], 8057h; jumptable 000000000005453F case 5
mov dword ptr [rdx], 1908h
mov dword ptr [rcx], 8034h
retn
loc_545A7:
cmp byte ptr cs:word_127BC5+1, 1; jumptable 000000000005453F case 13
jnz short loc_545B6
mov dword ptr [rsi], 881Ah
loc_545B6:
mov dword ptr [rdx], 1908h
jmp loc_546C6
loc_545C1:
cmp byte ptr cs:word_127BC5, 1; jumptable 000000000005453F case 10
jnz short loc_545D0
mov dword ptr [rsi], 8814h
loc_545D0:
mov dword ptr [rdx], 1908h
jmp loc_546E2
loc_545DB:
mov dword ptr [rsi], 8D62h; jumptable 000000000005453F case 3
mov dword ptr [rdx], 1907h
mov dword ptr [rcx], 8363h
retn
loc_545EE:
cmp cs:byte_127BC7, 1; jumptable 000000000005453F case 16
jnz locret_546A0
mov dword ptr [rsi], 83F2h
retn
loc_54602:
mov dword ptr [rsi], 8051h; jumptable 000000000005453F case 4
mov dword ptr [rdx], 1907h
jmp loc_5469A
loc_54613:
cmp byte ptr cs:word_127BC5, 1; jumptable 000000000005453F case 8
jnz short loc_54622
mov dword ptr [rsi], 822Eh
loc_54622:
mov dword ptr [rdx], 1903h
jmp loc_546E2
loc_5462D:
mov dword ptr [rsi], 822Bh; jumptable 000000000005453F case 2
mov dword ptr [rdx], 8227h
jmp short loc_5469A
loc_5463B:
cmp cs:byte_127BC8, 1; jumptable 000000000005453F case 18
jnz short locret_546A0
mov dword ptr [rsi], 8D64h
retn
loc_5464B:
cmp cs:byte_127BCA, 1; jumptable 000000000005453F case 21
jnz short locret_546A0
mov dword ptr [rsi], 8C00h
retn
loc_5465B:
mov dword ptr [rsi], 8056h; jumptable 000000000005453F case 6
mov dword ptr [rdx], 1908h
mov dword ptr [rcx], 8033h
retn
loc_5466E:
cmp cs:byte_127BCA, 1; jumptable 000000000005453F case 22
jnz short locret_546A0
mov dword ptr [rsi], 8C02h
retn
loc_5467E:
cmp cs:byte_127BC7, 1; jumptable 000000000005453F case 14
jnz short locret_546A0
mov dword ptr [rsi], 83F0h
retn
loc_5468E:
mov dword ptr [rsi], 8058h; jumptable 000000000005453F case 7
mov dword ptr [rdx], 1908h
loc_5469A:
mov dword ptr [rcx], 1401h
locret_546A0:
retn
loc_546A1:
cmp cs:byte_127BC9, 1; jumptable 000000000005453F case 19
jnz short locret_546A0
mov dword ptr [rsi], 9274h
retn
loc_546B1:
cmp byte ptr cs:word_127BC5+1, 1; jumptable 000000000005453F case 11
jnz short loc_546C0
mov dword ptr [rsi], 822Dh
loc_546C0:
mov dword ptr [rdx], 1903h
loc_546C6:
mov dword ptr [rcx], 140Bh
retn
loc_546CD:
cmp byte ptr cs:word_127BC5, 1; jumptable 000000000005453F case 9
jnz short loc_546DC
mov dword ptr [rsi], 8815h
loc_546DC:
mov dword ptr [rdx], 1907h
loc_546E2:
mov dword ptr [rcx], 1406h
retn
loc_546E9:
cmp cs:byte_127BCB, 1; jumptable 000000000005453F case 23
jnz short locret_546A0
mov dword ptr [rsi], 93B0h
retn
loc_546F9:
cmp cs:byte_127BC9, 1; jumptable 000000000005453F case 20
jnz short locret_546A0
mov dword ptr [rsi], 9278h
retn
loc_54709:
cmp cs:byte_127BCB, 1; jumptable 000000000005453F case 24
jnz short locret_546A0
mov dword ptr [rsi], 93B7h
retn
def_5453F:
lea rsi, aTextureCurrent; jumptable 000000000005453F default case
push 4
pop rdi
mov edx, eax
xor eax, eax
jmp TraceLog
| long long rlGetGlTextureFormats(unsigned int a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, int a5, int a6)
{
long long result; // rax
*a2 = 0;
*a3 = 0;
*a4 = 0;
result = a1;
switch ( a1 )
{
case 1u:
*a2 = 33321;
*a3 = 6403;
goto LABEL_35;
case 2u:
*a2 = 33323;
*a3 = 33319;
goto LABEL_35;
case 3u:
*a2 = 36194;
*a3 = 6407;
*a4 = 33635;
return result;
case 4u:
*a2 = 32849;
*a3 = 6407;
goto LABEL_35;
case 5u:
*a2 = 32855;
*a3 = 6408;
*a4 = 32820;
return result;
case 6u:
*a2 = 32854;
*a3 = 6408;
*a4 = 32819;
return result;
case 7u:
*a2 = 32856;
*a3 = 6408;
LABEL_35:
*a4 = 5121;
return result;
case 8u:
if ( (_BYTE)word_127BC5 == 1 )
*a2 = 33326;
*a3 = 6403;
goto LABEL_46;
case 9u:
if ( (_BYTE)word_127BC5 == 1 )
*a2 = 34837;
*a3 = 6407;
goto LABEL_46;
case 0xAu:
if ( (_BYTE)word_127BC5 == 1 )
*a2 = 34836;
*a3 = 6408;
LABEL_46:
*a4 = 5126;
return result;
case 0xBu:
if ( HIBYTE(word_127BC5) == 1 )
*a2 = 33325;
*a3 = 6403;
goto LABEL_42;
case 0xCu:
if ( HIBYTE(word_127BC5) == 1 )
*a2 = 34843;
*a3 = 6407;
goto LABEL_42;
case 0xDu:
if ( HIBYTE(word_127BC5) == 1 )
*a2 = 34842;
*a3 = 6408;
LABEL_42:
*a4 = 5131;
break;
case 0xEu:
if ( byte_127BC7 == 1 )
*a2 = 33776;
break;
case 0xFu:
if ( byte_127BC7 == 1 )
*a2 = 33777;
break;
case 0x10u:
if ( byte_127BC7 == 1 )
*a2 = 33778;
break;
case 0x11u:
if ( byte_127BC7 == 1 )
*a2 = 33779;
break;
case 0x12u:
if ( byte_127BC8 == 1 )
*a2 = 36196;
break;
case 0x13u:
if ( byte_127BC9 == 1 )
*a2 = 37492;
break;
case 0x14u:
if ( byte_127BC9 == 1 )
*a2 = 37496;
break;
case 0x15u:
if ( byte_127BCA == 1 )
*a2 = 35840;
break;
case 0x16u:
if ( byte_127BCA == 1 )
*a2 = 35842;
break;
case 0x17u:
if ( byte_127BCB == 1 )
*a2 = 37808;
break;
case 0x18u:
if ( byte_127BCB == 1 )
*a2 = 37815;
break;
default:
result = TraceLog(4, (unsigned int)"TEXTURE: Current format not supported (%i)", a1, (_DWORD)a4, a5, a6);
break;
}
return result;
}
| rlGetGlTextureFormats:
AND dword ptr [RSI],0x0
AND dword ptr [RDX],0x0
AND dword ptr [RCX],0x0
MOV EAX,EDI
LEA EDI,[RAX + -0x1]
CMP EDI,0x17
JA 0x00154719
LEA RAX,[0x1c370c]
MOVSXD RDI,dword ptr [RAX + RDI*0x4]
ADD RDI,RAX
switchD:
JMP RDI
caseD_1:
MOV dword ptr [RSI],0x8229
MOV dword ptr [RDX],0x1903
JMP 0x0015469a
caseD_11:
CMP byte ptr [0x00227bc7],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x83f3
RET
caseD_f:
CMP byte ptr [0x00227bc7],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x83f1
RET
caseD_c:
CMP byte ptr [0x00227bc6],0x1
JNZ 0x00154589
MOV dword ptr [RSI],0x881b
LAB_00154589:
MOV dword ptr [RDX],0x1907
JMP 0x001546c6
caseD_5:
MOV dword ptr [RSI],0x8057
MOV dword ptr [RDX],0x1908
MOV dword ptr [RCX],0x8034
RET
caseD_d:
CMP byte ptr [0x00227bc6],0x1
JNZ 0x001545b6
MOV dword ptr [RSI],0x881a
LAB_001545b6:
MOV dword ptr [RDX],0x1908
JMP 0x001546c6
caseD_a:
CMP byte ptr [0x00227bc5],0x1
JNZ 0x001545d0
MOV dword ptr [RSI],0x8814
LAB_001545d0:
MOV dword ptr [RDX],0x1908
JMP 0x001546e2
caseD_3:
MOV dword ptr [RSI],0x8d62
MOV dword ptr [RDX],0x1907
MOV dword ptr [RCX],0x8363
RET
caseD_10:
CMP byte ptr [0x00227bc7],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x83f2
RET
caseD_4:
MOV dword ptr [RSI],0x8051
MOV dword ptr [RDX],0x1907
JMP 0x0015469a
caseD_8:
CMP byte ptr [0x00227bc5],0x1
JNZ 0x00154622
MOV dword ptr [RSI],0x822e
LAB_00154622:
MOV dword ptr [RDX],0x1903
JMP 0x001546e2
caseD_2:
MOV dword ptr [RSI],0x822b
MOV dword ptr [RDX],0x8227
JMP 0x0015469a
caseD_12:
CMP byte ptr [0x00227bc8],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x8d64
RET
caseD_15:
CMP byte ptr [0x00227bca],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x8c00
RET
caseD_6:
MOV dword ptr [RSI],0x8056
MOV dword ptr [RDX],0x1908
MOV dword ptr [RCX],0x8033
RET
caseD_16:
CMP byte ptr [0x00227bca],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x8c02
RET
caseD_e:
CMP byte ptr [0x00227bc7],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x83f0
RET
caseD_7:
MOV dword ptr [RSI],0x8058
MOV dword ptr [RDX],0x1908
LAB_0015469a:
MOV dword ptr [RCX],0x1401
LAB_001546a0:
RET
caseD_13:
CMP byte ptr [0x00227bc9],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x9274
RET
caseD_b:
CMP byte ptr [0x00227bc6],0x1
JNZ 0x001546c0
MOV dword ptr [RSI],0x822d
LAB_001546c0:
MOV dword ptr [RDX],0x1903
LAB_001546c6:
MOV dword ptr [RCX],0x140b
RET
caseD_9:
CMP byte ptr [0x00227bc5],0x1
JNZ 0x001546dc
MOV dword ptr [RSI],0x8815
LAB_001546dc:
MOV dword ptr [RDX],0x1907
LAB_001546e2:
MOV dword ptr [RCX],0x1406
RET
caseD_17:
CMP byte ptr [0x00227bcb],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x93b0
RET
caseD_14:
CMP byte ptr [0x00227bc9],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x9278
RET
caseD_18:
CMP byte ptr [0x00227bcb],0x1
JNZ 0x001546a0
MOV dword ptr [RSI],0x93b7
RET
default:
LEA RSI,[0x1c53db]
PUSH 0x4
POP RDI
MOV EDX,EAX
XOR EAX,EAX
JMP 0x001a128b
|
void rlGetGlTextureFormats
(int4 param_1,int4 *param_2,int4 *param_3,int4 *param_4)
{
*param_2 = 0;
*param_3 = 0;
*param_4 = 0;
switch(param_1) {
case 1:
*param_2 = 0x8229;
*param_3 = 0x1903;
goto LAB_0015469a;
case 2:
*param_2 = 0x822b;
*param_3 = 0x8227;
goto LAB_0015469a;
case 3:
*param_2 = 0x8d62;
*param_3 = 0x1907;
*param_4 = 0x8363;
return;
case 4:
*param_2 = 0x8051;
*param_3 = 0x1907;
goto LAB_0015469a;
case 5:
*param_2 = 0x8057;
*param_3 = 0x1908;
*param_4 = 0x8034;
return;
case 6:
*param_2 = 0x8056;
*param_3 = 0x1908;
*param_4 = 0x8033;
return;
case 7:
*param_2 = 0x8058;
*param_3 = 0x1908;
LAB_0015469a:
*param_4 = 0x1401;
break;
case 8:
if (DAT_00227bc5 == '\x01') {
*param_2 = 0x822e;
}
*param_3 = 0x1903;
goto LAB_001546e2;
case 9:
if (DAT_00227bc5 == '\x01') {
*param_2 = 0x8815;
}
*param_3 = 0x1907;
goto LAB_001546e2;
case 10:
if (DAT_00227bc5 == '\x01') {
*param_2 = 0x8814;
}
*param_3 = 0x1908;
LAB_001546e2:
*param_4 = 0x1406;
return;
case 0xb:
if (DAT_00227bc6 == '\x01') {
*param_2 = 0x822d;
}
*param_3 = 0x1903;
goto LAB_001546c6;
case 0xc:
if (DAT_00227bc6 == '\x01') {
*param_2 = 0x881b;
}
*param_3 = 0x1907;
goto LAB_001546c6;
case 0xd:
if (DAT_00227bc6 == '\x01') {
*param_2 = 0x881a;
}
*param_3 = 0x1908;
LAB_001546c6:
*param_4 = 0x140b;
return;
case 0xe:
if (DAT_00227bc7 == '\x01') {
*param_2 = 0x83f0;
return;
}
break;
case 0xf:
if (DAT_00227bc7 == '\x01') {
*param_2 = 0x83f1;
return;
}
break;
case 0x10:
if (DAT_00227bc7 == '\x01') {
*param_2 = 0x83f2;
return;
}
break;
case 0x11:
if (DAT_00227bc7 == '\x01') {
*param_2 = 0x83f3;
return;
}
break;
case 0x12:
if (DAT_00227bc8 == '\x01') {
*param_2 = 0x8d64;
return;
}
break;
case 0x13:
if (DAT_00227bc9 == '\x01') {
*param_2 = 0x9274;
return;
}
break;
case 0x14:
if (DAT_00227bc9 == '\x01') {
*param_2 = 0x9278;
return;
}
break;
case 0x15:
if (DAT_00227bca == '\x01') {
*param_2 = 0x8c00;
return;
}
break;
case 0x16:
if (DAT_00227bca == '\x01') {
*param_2 = 0x8c02;
return;
}
break;
case 0x17:
if (DAT_00227bcb == '\x01') {
*param_2 = 0x93b0;
return;
}
break;
case 0x18:
if (DAT_00227bcb == '\x01') {
*param_2 = 0x93b7;
return;
}
break;
default:
TraceLog(4,"TEXTURE: Current format not supported (%i)",param_1);
return;
}
return;
}
| |
23,017 | rlGetGlTextureFormats | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h | void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
{
*glInternalFormat = 0;
*glFormat = 0;
*glType = 0;
switch (format)
{
#if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_ES2)
// NOTE: on OpenGL ES 2.0 (WebGL), internalFormat must match format and options allowed are: GL_LUMINANCE, GL_RGB, GL_RGBA
case RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_LUMINANCE_ALPHA; *glFormat = GL_LUMINANCE_ALPHA; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_BYTE; break;
#if !defined(GRAPHICS_API_OPENGL_11)
#if defined(GRAPHICS_API_OPENGL_ES3)
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_R32F_EXT; *glFormat = GL_RED_EXT; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB32F_EXT; *glFormat = GL_RGB; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA32F_EXT; *glFormat = GL_RGBA; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_R16F_EXT; *glFormat = GL_RED_EXT; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB16F_EXT; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA16F_EXT; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT; break;
#else
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_FLOAT; break; // NOTE: Requires extension OES_texture_float
#if defined(GRAPHICS_API_OPENGL_21)
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_HALF_FLOAT_ARB; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT_ARB; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT_ARB; break;
#else // defined(GRAPHICS_API_OPENGL_ES2)
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT_OES; break; // NOTE: Requires extension OES_texture_half_float
#endif
#endif
#endif
#elif defined(GRAPHICS_API_OPENGL_33)
case RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_R8; *glFormat = GL_RED; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_RG8; *glFormat = GL_RG; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB565; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB8; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGB5_A1; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA4; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: *glInternalFormat = GL_RGBA8; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_BYTE; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_R32F; *glFormat = GL_RED; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGB32F; *glFormat = GL_RGB; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: if (RLGL.ExtSupported.texFloat32) *glInternalFormat = GL_RGBA32F; *glFormat = GL_RGBA; *glType = GL_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_R16F; *glFormat = GL_RED; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGB16F; *glFormat = GL_RGB; *glType = GL_HALF_FLOAT; break;
case RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: if (RLGL.ExtSupported.texFloat16) *glInternalFormat = GL_RGBA16F; *glFormat = GL_RGBA; *glType = GL_HALF_FLOAT; break;
#endif
#if !defined(GRAPHICS_API_OPENGL_11)
case RL_PIXELFORMAT_COMPRESSED_DXT1_RGB: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA: if (RLGL.ExtSupported.texCompDXT) *glInternalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
case RL_PIXELFORMAT_COMPRESSED_ETC1_RGB: if (RLGL.ExtSupported.texCompETC1) *glInternalFormat = GL_ETC1_RGB8_OES; break; // NOTE: Requires OpenGL ES 2.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ETC2_RGB: if (RLGL.ExtSupported.texCompETC2) *glInternalFormat = GL_COMPRESSED_RGB8_ETC2; break; // NOTE: Requires OpenGL ES 3.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA: if (RLGL.ExtSupported.texCompETC2) *glInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; break; // NOTE: Requires OpenGL ES 3.0 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_PVRT_RGB: if (RLGL.ExtSupported.texCompPVRT) *glInternalFormat = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; break; // NOTE: Requires PowerVR GPU
case RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA: if (RLGL.ExtSupported.texCompPVRT) *glInternalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; break; // NOTE: Requires PowerVR GPU
case RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: if (RLGL.ExtSupported.texCompASTC) *glInternalFormat = GL_COMPRESSED_RGBA_ASTC_4x4_KHR; break; // NOTE: Requires OpenGL ES 3.1 or OpenGL 4.3
case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: if (RLGL.ExtSupported.texCompASTC) *glInternalFormat = GL_COMPRESSED_RGBA_ASTC_8x8_KHR; break; // NOTE: Requires OpenGL ES 3.1 or OpenGL 4.3
#endif
default: TRACELOG(RL_LOG_WARNING, "TEXTURE: Current format not supported (%i)", format); break;
}
} | O3 | c | rlGetGlTextureFormats:
movl %edi, %eax
xorl %edi, %edi
movl %edi, (%rsi)
movl %edi, (%rdx)
movl %edi, (%rcx)
leal -0x1(%rax), %edi
cmpl $0x17, %edi
ja 0x6461c
leaq 0x79141(%rip), %rax # 0xdd57c
movslq (%rax,%rdi,4), %rdi
addq %rax, %rdi
jmpq *%rdi
movl $0x8229, (%rsi) # imm = 0x8229
movl $0x1903, (%rdx) # imm = 0x1903
jmp 0x6459d
cmpb $0x1, 0xd774b(%rip) # 0x13bba7
jne 0x645a3
movl $0x83f3, (%rsi) # imm = 0x83F3
retq
cmpb $0x1, 0xd7737(%rip) # 0x13bba7
jne 0x645a3
movl $0x83f1, (%rsi) # imm = 0x83F1
retq
cmpb $0x1, 0xd7722(%rip) # 0x13bba6
jne 0x6448c
movl $0x881b, (%rsi) # imm = 0x881B
movl $0x1907, (%rdx) # imm = 0x1907
jmp 0x645c9
movl $0x8057, (%rsi) # imm = 0x8057
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x8034, (%rcx) # imm = 0x8034
retq
cmpb $0x1, 0xd76f5(%rip) # 0x13bba6
jne 0x644b9
movl $0x881a, (%rsi) # imm = 0x881A
movl $0x1908, (%rdx) # imm = 0x1908
jmp 0x645c9
cmpb $0x1, 0xd76da(%rip) # 0x13bba5
jne 0x644d3
movl $0x8814, (%rsi) # imm = 0x8814
movl $0x1908, (%rdx) # imm = 0x1908
jmp 0x645e5
movl $0x8d62, (%rsi) # imm = 0x8D62
movl $0x1907, (%rdx) # imm = 0x1907
movl $0x8363, (%rcx) # imm = 0x8363
retq
cmpb $0x1, 0xd76af(%rip) # 0x13bba7
jne 0x645a3
movl $0x83f2, (%rsi) # imm = 0x83F2
retq
movl $0x8051, (%rsi) # imm = 0x8051
movl $0x1907, (%rdx) # imm = 0x1907
jmp 0x6459d
cmpb $0x1, 0xd7688(%rip) # 0x13bba5
jne 0x64525
movl $0x822e, (%rsi) # imm = 0x822E
movl $0x1903, (%rdx) # imm = 0x1903
jmp 0x645e5
movl $0x822b, (%rsi) # imm = 0x822B
movl $0x8227, (%rdx) # imm = 0x8227
jmp 0x6459d
cmpb $0x1, 0xd7663(%rip) # 0x13bba8
jne 0x645a3
movl $0x8d64, (%rsi) # imm = 0x8D64
retq
cmpb $0x1, 0xd7655(%rip) # 0x13bbaa
jne 0x645a3
movl $0x8c00, (%rsi) # imm = 0x8C00
retq
movl $0x8056, (%rsi) # imm = 0x8056
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x8033, (%rcx) # imm = 0x8033
retq
cmpb $0x1, 0xd7632(%rip) # 0x13bbaa
jne 0x645a3
movl $0x8c02, (%rsi) # imm = 0x8C02
retq
cmpb $0x1, 0xd761f(%rip) # 0x13bba7
jne 0x645a3
movl $0x83f0, (%rsi) # imm = 0x83F0
retq
movl $0x8058, (%rsi) # imm = 0x8058
movl $0x1908, (%rdx) # imm = 0x1908
movl $0x1401, (%rcx) # imm = 0x1401
retq
cmpb $0x1, 0xd75fe(%rip) # 0x13bba9
jne 0x645a3
movl $0x9274, (%rsi) # imm = 0x9274
retq
cmpb $0x1, 0xd75eb(%rip) # 0x13bba6
jne 0x645c3
movl $0x822d, (%rsi) # imm = 0x822D
movl $0x1903, (%rdx) # imm = 0x1903
movl $0x140b, (%rcx) # imm = 0x140B
retq
cmpb $0x1, 0xd75ce(%rip) # 0x13bba5
jne 0x645df
movl $0x8815, (%rsi) # imm = 0x8815
movl $0x1907, (%rdx) # imm = 0x1907
movl $0x1406, (%rcx) # imm = 0x1406
retq
cmpb $0x1, 0xd75b8(%rip) # 0x13bbab
jne 0x645a3
movl $0x93b0, (%rsi) # imm = 0x93B0
retq
cmpb $0x1, 0xd75a6(%rip) # 0x13bba9
jne 0x645a3
movl $0x9278, (%rsi) # imm = 0x9278
retq
cmpb $0x1, 0xd7598(%rip) # 0x13bbab
jne 0x645a3
movl $0x93b7, (%rsi) # imm = 0x93B7
retq
leaq 0x7ac30(%rip), %rsi # 0xdf253
movl $0x4, %edi
movl %eax, %edx
xorl %eax, %eax
jmp 0xb9db7
| rlGetGlTextureFormats:
mov eax, edi
xor edi, edi
mov [rsi], edi
mov [rdx], edi
mov [rcx], edi
lea edi, [rax-1]; switch 24 cases
cmp edi, 17h
ja def_64442; jumptable 0000000000064442 default case
lea rax, jpt_64442
movsxd rdi, ds:(jpt_64442 - 0DD57Ch)[rax+rdi*4]
add rdi, rax
jmp rdi; switch jump
loc_64444:
mov dword ptr [rsi], 8229h; jumptable 0000000000064442 case 1
mov dword ptr [rdx], 1903h
jmp loc_6459D
loc_64455:
cmp cs:byte_13BBA7, 1; jumptable 0000000000064442 case 17
jnz locret_645A3
mov dword ptr [rsi], 83F3h
retn
loc_64469:
cmp cs:byte_13BBA7, 1; jumptable 0000000000064442 case 15
jnz locret_645A3
mov dword ptr [rsi], 83F1h
retn
loc_6447D:
cmp byte ptr cs:word_13BBA5+1, 1; jumptable 0000000000064442 case 12
jnz short loc_6448C
mov dword ptr [rsi], 881Bh
loc_6448C:
mov dword ptr [rdx], 1907h
jmp loc_645C9
loc_64497:
mov dword ptr [rsi], 8057h; jumptable 0000000000064442 case 5
mov dword ptr [rdx], 1908h
mov dword ptr [rcx], 8034h
retn
loc_644AA:
cmp byte ptr cs:word_13BBA5+1, 1; jumptable 0000000000064442 case 13
jnz short loc_644B9
mov dword ptr [rsi], 881Ah
loc_644B9:
mov dword ptr [rdx], 1908h
jmp loc_645C9
loc_644C4:
cmp byte ptr cs:word_13BBA5, 1; jumptable 0000000000064442 case 10
jnz short loc_644D3
mov dword ptr [rsi], 8814h
loc_644D3:
mov dword ptr [rdx], 1908h
jmp loc_645E5
loc_644DE:
mov dword ptr [rsi], 8D62h; jumptable 0000000000064442 case 3
mov dword ptr [rdx], 1907h
mov dword ptr [rcx], 8363h
retn
loc_644F1:
cmp cs:byte_13BBA7, 1; jumptable 0000000000064442 case 16
jnz locret_645A3
mov dword ptr [rsi], 83F2h
retn
loc_64505:
mov dword ptr [rsi], 8051h; jumptable 0000000000064442 case 4
mov dword ptr [rdx], 1907h
jmp loc_6459D
loc_64516:
cmp byte ptr cs:word_13BBA5, 1; jumptable 0000000000064442 case 8
jnz short loc_64525
mov dword ptr [rsi], 822Eh
loc_64525:
mov dword ptr [rdx], 1903h
jmp loc_645E5
loc_64530:
mov dword ptr [rsi], 822Bh; jumptable 0000000000064442 case 2
mov dword ptr [rdx], 8227h
jmp short loc_6459D
loc_6453E:
cmp cs:byte_13BBA8, 1; jumptable 0000000000064442 case 18
jnz short locret_645A3
mov dword ptr [rsi], 8D64h
retn
loc_6454E:
cmp cs:byte_13BBAA, 1; jumptable 0000000000064442 case 21
jnz short locret_645A3
mov dword ptr [rsi], 8C00h
retn
loc_6455E:
mov dword ptr [rsi], 8056h; jumptable 0000000000064442 case 6
mov dword ptr [rdx], 1908h
mov dword ptr [rcx], 8033h
retn
loc_64571:
cmp cs:byte_13BBAA, 1; jumptable 0000000000064442 case 22
jnz short locret_645A3
mov dword ptr [rsi], 8C02h
retn
loc_64581:
cmp cs:byte_13BBA7, 1; jumptable 0000000000064442 case 14
jnz short locret_645A3
mov dword ptr [rsi], 83F0h
retn
loc_64591:
mov dword ptr [rsi], 8058h; jumptable 0000000000064442 case 7
mov dword ptr [rdx], 1908h
loc_6459D:
mov dword ptr [rcx], 1401h
locret_645A3:
retn
loc_645A4:
cmp cs:byte_13BBA9, 1; jumptable 0000000000064442 case 19
jnz short locret_645A3
mov dword ptr [rsi], 9274h
retn
loc_645B4:
cmp byte ptr cs:word_13BBA5+1, 1; jumptable 0000000000064442 case 11
jnz short loc_645C3
mov dword ptr [rsi], 822Dh
loc_645C3:
mov dword ptr [rdx], 1903h
loc_645C9:
mov dword ptr [rcx], 140Bh
retn
loc_645D0:
cmp byte ptr cs:word_13BBA5, 1; jumptable 0000000000064442 case 9
jnz short loc_645DF
mov dword ptr [rsi], 8815h
loc_645DF:
mov dword ptr [rdx], 1907h
loc_645E5:
mov dword ptr [rcx], 1406h
retn
loc_645EC:
cmp cs:byte_13BBAB, 1; jumptable 0000000000064442 case 23
jnz short locret_645A3
mov dword ptr [rsi], 93B0h
retn
loc_645FC:
cmp cs:byte_13BBA9, 1; jumptable 0000000000064442 case 20
jnz short locret_645A3
mov dword ptr [rsi], 9278h
retn
loc_6460C:
cmp cs:byte_13BBAB, 1; jumptable 0000000000064442 case 24
jnz short locret_645A3
mov dword ptr [rsi], 93B7h
retn
def_64442:
lea rsi, aTextureCurrent; jumptable 0000000000064442 default case
mov edi, 4
mov edx, eax
xor eax, eax
jmp TraceLog
| long long rlGetGlTextureFormats(unsigned int a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, int a5, int a6)
{
long long result; // rax
result = a1;
*a2 = 0;
*a3 = 0;
*a4 = 0;
switch ( a1 )
{
case 1u:
*a2 = 33321;
*a3 = 6403;
goto LABEL_35;
case 2u:
*a2 = 33323;
*a3 = 33319;
goto LABEL_35;
case 3u:
*a2 = 36194;
*a3 = 6407;
*a4 = 33635;
return result;
case 4u:
*a2 = 32849;
*a3 = 6407;
goto LABEL_35;
case 5u:
*a2 = 32855;
*a3 = 6408;
*a4 = 32820;
return result;
case 6u:
*a2 = 32854;
*a3 = 6408;
*a4 = 32819;
return result;
case 7u:
*a2 = 32856;
*a3 = 6408;
LABEL_35:
*a4 = 5121;
return result;
case 8u:
if ( (_BYTE)word_13BBA5 == 1 )
*a2 = 33326;
*a3 = 6403;
goto LABEL_46;
case 9u:
if ( (_BYTE)word_13BBA5 == 1 )
*a2 = 34837;
*a3 = 6407;
goto LABEL_46;
case 0xAu:
if ( (_BYTE)word_13BBA5 == 1 )
*a2 = 34836;
*a3 = 6408;
LABEL_46:
*a4 = 5126;
return result;
case 0xBu:
if ( HIBYTE(word_13BBA5) == 1 )
*a2 = 33325;
*a3 = 6403;
goto LABEL_42;
case 0xCu:
if ( HIBYTE(word_13BBA5) == 1 )
*a2 = 34843;
*a3 = 6407;
goto LABEL_42;
case 0xDu:
if ( HIBYTE(word_13BBA5) == 1 )
*a2 = 34842;
*a3 = 6408;
LABEL_42:
*a4 = 5131;
break;
case 0xEu:
if ( byte_13BBA7 == 1 )
*a2 = 33776;
break;
case 0xFu:
if ( byte_13BBA7 == 1 )
*a2 = 33777;
break;
case 0x10u:
if ( byte_13BBA7 == 1 )
*a2 = 33778;
break;
case 0x11u:
if ( byte_13BBA7 == 1 )
*a2 = 33779;
break;
case 0x12u:
if ( byte_13BBA8 == 1 )
*a2 = 36196;
break;
case 0x13u:
if ( byte_13BBA9 == 1 )
*a2 = 37492;
break;
case 0x14u:
if ( byte_13BBA9 == 1 )
*a2 = 37496;
break;
case 0x15u:
if ( byte_13BBAA == 1 )
*a2 = 35840;
break;
case 0x16u:
if ( byte_13BBAA == 1 )
*a2 = 35842;
break;
case 0x17u:
if ( byte_13BBAB == 1 )
*a2 = 37808;
break;
case 0x18u:
if ( byte_13BBAB == 1 )
*a2 = 37815;
break;
default:
result = TraceLog(4, (unsigned int)"TEXTURE: Current format not supported (%i)", a1, (_DWORD)a4, a5, a6);
break;
}
return result;
}
| rlGetGlTextureFormats:
MOV EAX,EDI
XOR EDI,EDI
MOV dword ptr [RSI],EDI
MOV dword ptr [RDX],EDI
MOV dword ptr [RCX],EDI
LEA EDI,[RAX + -0x1]
CMP EDI,0x17
JA 0x0016461c
LEA RAX,[0x1dd57c]
MOVSXD RDI,dword ptr [RAX + RDI*0x4]
ADD RDI,RAX
switchD:
JMP RDI
caseD_1:
MOV dword ptr [RSI],0x8229
MOV dword ptr [RDX],0x1903
JMP 0x0016459d
caseD_11:
CMP byte ptr [0x0023bba7],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x83f3
RET
caseD_f:
CMP byte ptr [0x0023bba7],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x83f1
RET
caseD_c:
CMP byte ptr [0x0023bba6],0x1
JNZ 0x0016448c
MOV dword ptr [RSI],0x881b
LAB_0016448c:
MOV dword ptr [RDX],0x1907
JMP 0x001645c9
caseD_5:
MOV dword ptr [RSI],0x8057
MOV dword ptr [RDX],0x1908
MOV dword ptr [RCX],0x8034
RET
caseD_d:
CMP byte ptr [0x0023bba6],0x1
JNZ 0x001644b9
MOV dword ptr [RSI],0x881a
LAB_001644b9:
MOV dword ptr [RDX],0x1908
JMP 0x001645c9
caseD_a:
CMP byte ptr [0x0023bba5],0x1
JNZ 0x001644d3
MOV dword ptr [RSI],0x8814
LAB_001644d3:
MOV dword ptr [RDX],0x1908
JMP 0x001645e5
caseD_3:
MOV dword ptr [RSI],0x8d62
MOV dword ptr [RDX],0x1907
MOV dword ptr [RCX],0x8363
RET
caseD_10:
CMP byte ptr [0x0023bba7],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x83f2
RET
caseD_4:
MOV dword ptr [RSI],0x8051
MOV dword ptr [RDX],0x1907
JMP 0x0016459d
caseD_8:
CMP byte ptr [0x0023bba5],0x1
JNZ 0x00164525
MOV dword ptr [RSI],0x822e
LAB_00164525:
MOV dword ptr [RDX],0x1903
JMP 0x001645e5
caseD_2:
MOV dword ptr [RSI],0x822b
MOV dword ptr [RDX],0x8227
JMP 0x0016459d
caseD_12:
CMP byte ptr [0x0023bba8],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x8d64
RET
caseD_15:
CMP byte ptr [0x0023bbaa],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x8c00
RET
caseD_6:
MOV dword ptr [RSI],0x8056
MOV dword ptr [RDX],0x1908
MOV dword ptr [RCX],0x8033
RET
caseD_16:
CMP byte ptr [0x0023bbaa],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x8c02
RET
caseD_e:
CMP byte ptr [0x0023bba7],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x83f0
RET
caseD_7:
MOV dword ptr [RSI],0x8058
MOV dword ptr [RDX],0x1908
LAB_0016459d:
MOV dword ptr [RCX],0x1401
LAB_001645a3:
RET
caseD_13:
CMP byte ptr [0x0023bba9],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x9274
RET
caseD_b:
CMP byte ptr [0x0023bba6],0x1
JNZ 0x001645c3
MOV dword ptr [RSI],0x822d
LAB_001645c3:
MOV dword ptr [RDX],0x1903
LAB_001645c9:
MOV dword ptr [RCX],0x140b
RET
caseD_9:
CMP byte ptr [0x0023bba5],0x1
JNZ 0x001645df
MOV dword ptr [RSI],0x8815
LAB_001645df:
MOV dword ptr [RDX],0x1907
LAB_001645e5:
MOV dword ptr [RCX],0x1406
RET
caseD_17:
CMP byte ptr [0x0023bbab],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x93b0
RET
caseD_14:
CMP byte ptr [0x0023bba9],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x9278
RET
caseD_18:
CMP byte ptr [0x0023bbab],0x1
JNZ 0x001645a3
MOV dword ptr [RSI],0x93b7
RET
default:
LEA RSI,[0x1df253]
MOV EDI,0x4
MOV EDX,EAX
XOR EAX,EAX
JMP 0x001b9db7
|
void rlGetGlTextureFormats
(int4 param_1,int4 *param_2,int4 *param_3,int4 *param_4)
{
*param_2 = 0;
*param_3 = 0;
*param_4 = 0;
switch(param_1) {
case 1:
*param_2 = 0x8229;
*param_3 = 0x1903;
goto LAB_0016459d;
case 2:
*param_2 = 0x822b;
*param_3 = 0x8227;
goto LAB_0016459d;
case 3:
*param_2 = 0x8d62;
*param_3 = 0x1907;
*param_4 = 0x8363;
return;
case 4:
*param_2 = 0x8051;
*param_3 = 0x1907;
goto LAB_0016459d;
case 5:
*param_2 = 0x8057;
*param_3 = 0x1908;
*param_4 = 0x8034;
return;
case 6:
*param_2 = 0x8056;
*param_3 = 0x1908;
*param_4 = 0x8033;
return;
case 7:
*param_2 = 0x8058;
*param_3 = 0x1908;
LAB_0016459d:
*param_4 = 0x1401;
break;
case 8:
if (DAT_0023bba5 == '\x01') {
*param_2 = 0x822e;
}
*param_3 = 0x1903;
goto LAB_001645e5;
case 9:
if (DAT_0023bba5 == '\x01') {
*param_2 = 0x8815;
}
*param_3 = 0x1907;
goto LAB_001645e5;
case 10:
if (DAT_0023bba5 == '\x01') {
*param_2 = 0x8814;
}
*param_3 = 0x1908;
LAB_001645e5:
*param_4 = 0x1406;
return;
case 0xb:
if (DAT_0023bba6 == '\x01') {
*param_2 = 0x822d;
}
*param_3 = 0x1903;
goto LAB_001645c9;
case 0xc:
if (DAT_0023bba6 == '\x01') {
*param_2 = 0x881b;
}
*param_3 = 0x1907;
goto LAB_001645c9;
case 0xd:
if (DAT_0023bba6 == '\x01') {
*param_2 = 0x881a;
}
*param_3 = 0x1908;
LAB_001645c9:
*param_4 = 0x140b;
return;
case 0xe:
if (DAT_0023bba7 == '\x01') {
*param_2 = 0x83f0;
return;
}
break;
case 0xf:
if (DAT_0023bba7 == '\x01') {
*param_2 = 0x83f1;
return;
}
break;
case 0x10:
if (DAT_0023bba7 == '\x01') {
*param_2 = 0x83f2;
return;
}
break;
case 0x11:
if (DAT_0023bba7 == '\x01') {
*param_2 = 0x83f3;
return;
}
break;
case 0x12:
if (DAT_0023bba8 == '\x01') {
*param_2 = 0x8d64;
return;
}
break;
case 0x13:
if (DAT_0023bba9 == '\x01') {
*param_2 = 0x9274;
return;
}
break;
case 0x14:
if (DAT_0023bba9 == '\x01') {
*param_2 = 0x9278;
return;
}
break;
case 0x15:
if (DAT_0023bbaa == '\x01') {
*param_2 = 0x8c00;
return;
}
break;
case 0x16:
if (DAT_0023bbaa == '\x01') {
*param_2 = 0x8c02;
return;
}
break;
case 0x17:
if (DAT_0023bbab == '\x01') {
*param_2 = 0x93b0;
return;
}
break;
case 0x18:
if (DAT_0023bbab == '\x01') {
*param_2 = 0x93b7;
return;
}
break;
default:
TraceLog(4,"TEXTURE: Current format not supported (%i)",param_1);
return;
}
return;
}
| |
23,018 | my_strnxfrm_unicode_full_nopad_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
size_t len= de - dst;
set_if_smaller(len, nweights * 3);
memset(dst, 0x00, len);
dst+= len;
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
{
memset(dst, 0x00, de - dst);
dst= de;
}
return dst - dst0;
} | O0 | c | my_strnxfrm_unicode_full_nopad_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x28(%rbp), %r9
addq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0x6b2f0
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x6b611
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x6b671
cmpl $0x0, -0x1c(%rbp)
je 0x6b671
movl 0x10(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6b671
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
imull $0x3, -0x1c(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x6b654
imull $0x3, -0x1c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x6b656
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x24180
movq -0x48(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl 0x10(%rbp), %edx
xorl %ecx, %ecx
callq 0x4c7f0
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6b6b8
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x6b6b8
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x24180
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_unicode_full_nopad_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov r8, [rbp+var_28]
mov r9, [rbp+var_28]
add r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_unicode_full_bin_internal
add rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_6B611:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_6B671
cmp [rbp+var_1C], 0
jz short loc_6B671
mov eax, [rbp+arg_0]
and eax, 40h
cmp eax, 0
jz short loc_6B671
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
imul ecx, [rbp+var_1C], 3
mov ecx, ecx
cmp rax, rcx
jbe short loc_6B654
imul eax, [rbp+var_1C], 3
mov eax, eax
mov [rbp+var_48], rax
loc_6B654:
jmp short $+2
loc_6B656:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_48]
xor esi, esi
call _memset
mov rax, [rbp+var_48]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
loc_6B671:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+arg_0]
xor ecx, ecx
call my_strxfrm_desc_and_reverse
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_6B6B8
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_6B6B8
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_10]
sub rdx, rax
xor esi, esi
call _memset
mov rax, [rbp+var_40]
mov [rbp+var_10], rax
loc_6B6B8:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 50h
pop rbp
retn
| unsigned long long my_strnxfrm_unicode_full_nopad_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
_BYTE *v7; // rax
unsigned long long v9; // [rsp+8h] [rbp-48h]
unsigned long long v10; // [rsp+10h] [rbp-40h]
int v11; // [rsp+34h] [rbp-1Ch] BYREF
long long v12; // [rsp+38h] [rbp-18h]
unsigned long long v13; // [rsp+40h] [rbp-10h]
long long v14; // [rsp+48h] [rbp-8h]
v14 = a1;
v13 = (unsigned long long)a2;
v12 = a3;
v11 = a4;
v10 = (unsigned long long)&a2[a3];
v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5);
v13 += (unsigned long long)v7;
if ( v13 < v10 && v11 && (a7 & 0x40) != 0 )
{
v9 = v10 - v13;
if ( v10 - v13 > (unsigned int)(3 * v11) )
v9 = (unsigned int)(3 * v11);
memset(v13, 0LL, v9);
v13 += v9;
}
my_strxfrm_desc_and_reverse(a2, v13, a7, 0);
if ( (a7 & 0x80) != 0 && v13 < v10 )
{
memset(v13, 0LL, v10 - v13);
v13 = v10;
}
return v13 - (_QWORD)a2;
}
| my_strnxfrm_unicode_full_nopad_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x28]
ADD R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x0016b2f0
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016b611
LAB_0016b611:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0016b671
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0016b671
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x40
CMP EAX,0x0
JZ 0x0016b671
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
IMUL ECX,dword ptr [RBP + -0x1c],0x3
MOV ECX,ECX
CMP RAX,RCX
JBE 0x0016b654
IMUL EAX,dword ptr [RBP + -0x1c],0x3
MOV EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
LAB_0016b654:
JMP 0x0016b656
LAB_0016b656:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x48]
XOR ESI,ESI
CALL 0x00124180
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_0016b671:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + 0x10]
XOR ECX,ECX
CALL 0x0014c7f0
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016b6b8
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0016b6b8
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
SUB RDX,RAX
XOR ESI,ESI
CALL 0x00124180
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x10],RAX
LAB_0016b6b8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x50
POP RBP
RET
|
long my_strnxfrm_unicode_full_nopad_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
void *pvVar1;
long lVar2;
size_t local_50;
int local_24;
long local_20;
void *local_18;
int8 local_10;
pvVar1 = (void *)(param_2 + param_3);
local_24 = param_4;
local_20 = param_3;
local_18 = (void *)param_2;
local_10 = param_1;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6);
local_18 = (void *)(lVar2 + (long)local_18);
if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) {
local_50 = (long)pvVar1 - (long)local_18;
if ((uint)(local_24 * 3) < local_50) {
local_50 = (size_t)(uint)(local_24 * 3);
}
memset(local_18,0,local_50);
local_18 = (void *)(local_50 + (long)local_18);
}
my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0);
if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) {
memset(local_18,0,(long)pvVar1 - (long)local_18);
local_18 = pvVar1;
}
return (long)local_18 - param_2;
}
| |
23,019 | my_strnxfrm_unicode_full_nopad_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
size_t len= de - dst;
set_if_smaller(len, nweights * 3);
memset(dst, 0x00, len);
dst+= len;
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
{
memset(dst, 0x00, de - dst);
dst= de;
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_nopad_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %rbx
movl 0x10(%rbp), %r12d
leaq -0x2c(%rbp), %rax
movl %ecx, (%rax)
leaq (%rsi,%rdx), %r14
addq %r8, %r9
movq %r14, %rdx
movq %rax, %rcx
callq 0x52813
leaq (%rbx,%rax), %r15
testb $0x40, %r12b
je 0x52a20
subq %rax, %r13
jle 0x52a20
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x52a20
leal (%rax,%rax,2), %r12d
cmpq %r12, %r13
cmovbq %r13, %r12
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x24180
addq %r12, %r15
movl 0x10(%rbp), %r12d
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x3d7ba
testb %r12b, %r12b
jns 0x52a4d
cmpq %r14, %r15
jae 0x52a4d
movq %r14, %rdx
subq %r15, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x24180
movq %r14, %r15
subq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_nopad_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, rdx
mov rbx, rsi
mov r12d, [rbp+arg_0]
lea rax, [rbp+var_2C]
mov [rax], ecx
lea r14, [rsi+rdx]
add r9, r8
mov rdx, r14
mov rcx, rax
call my_strnxfrm_unicode_full_bin_internal
lea r15, [rbx+rax]
test r12b, 40h
jz short loc_52A20
sub r13, rax
jle short loc_52A20
mov eax, [rbp+var_2C]
test eax, eax
jz short loc_52A20
lea r12d, [rax+rax*2]
cmp r13, r12
cmovb r12, r13
mov rdi, r15
xor esi, esi
mov rdx, r12
call _memset
add r15, r12
mov r12d, [rbp+arg_0]
loc_52A20:
mov rdi, rbx
mov rsi, r15
mov edx, r12d
xor ecx, ecx
call my_strxfrm_desc_and_reverse
test r12b, r12b
jns short loc_52A4D
cmp r15, r14
jnb short loc_52A4D
mov rdx, r14
sub rdx, r15
mov rdi, r15
xor esi, esi
call _memset
mov r15, r14
loc_52A4D:
sub r15, rbx
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_nopad_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
unsigned int v8; // r12d
_BYTE *v9; // r14
long long v10; // rax
_BYTE *v11; // r15
bool v12; // cc
unsigned long long v13; // r13
unsigned long long v14; // r12
int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF
v8 = a7;
v16[0] = a4;
v9 = &a2[a3];
v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6);
v11 = &a2[v10];
if ( (a7 & 0x40) != 0 )
{
v12 = a3 <= v10;
v13 = a3 - v10;
if ( !v12 )
{
if ( v16[0] )
{
v14 = (unsigned int)(3 * v16[0]);
if ( v13 < v14 )
v14 = v13;
memset(v11, 0LL, v14);
v11 += v14;
v8 = a7;
}
}
}
my_strxfrm_desc_and_reverse(a2, v11, v8, 0);
if ( (v8 & 0x80u) != 0 && v11 < v9 )
{
memset(v11, 0LL, v9 - v11);
v11 = v9;
}
return v11 - a2;
}
| my_strnxfrm_unicode_full_nopad_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,RDX
MOV RBX,RSI
MOV R12D,dword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x2c]
MOV dword ptr [RAX],ECX
LEA R14,[RSI + RDX*0x1]
ADD R9,R8
MOV RDX,R14
MOV RCX,RAX
CALL 0x00152813
LEA R15,[RBX + RAX*0x1]
TEST R12B,0x40
JZ 0x00152a20
SUB R13,RAX
JLE 0x00152a20
MOV EAX,dword ptr [RBP + -0x2c]
TEST EAX,EAX
JZ 0x00152a20
LEA R12D,[RAX + RAX*0x2]
CMP R13,R12
CMOVC R12,R13
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
CALL 0x00124180
ADD R15,R12
MOV R12D,dword ptr [RBP + 0x10]
LAB_00152a20:
MOV RDI,RBX
MOV RSI,R15
MOV EDX,R12D
XOR ECX,ECX
CALL 0x0013d7ba
TEST R12B,R12B
JNS 0x00152a4d
CMP R15,R14
JNC 0x00152a4d
MOV RDX,R14
SUB RDX,R15
MOV RDI,R15
XOR ESI,ESI
CALL 0x00124180
MOV R15,R14
LAB_00152a4d:
SUB R15,RBX
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_nopad_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
void *pvVar1;
long lVar2;
ulong __n;
ulong uVar3;
void *__s;
int local_34;
pvVar1 = (void *)(param_2 + param_3);
local_34 = param_4;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5);
__s = (void *)(param_2 + lVar2);
if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) &&
(local_34 != 0)) {
__n = (ulong)(uint)(local_34 * 3);
if (uVar3 < (uint)(local_34 * 3)) {
__n = uVar3;
}
memset(__s,0,__n);
__s = (void *)((long)__s + __n);
}
my_strxfrm_desc_and_reverse(param_2,__s,param_7,0);
if (((char)param_7 < '\0') && (__s < pvVar1)) {
memset(__s,0,(long)pvVar1 - (long)__s);
__s = pvVar1;
}
return (long)__s - param_2;
}
| |
23,020 | stbi__fopen(char const*, char const*) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static FILE *stbi__fopen(char const *filename, char const *mode)
{
FILE *f;
#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
wchar_t wMode[64];
wchar_t wFilename[1024];
if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename)))
return 0;
if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode)))
return 0;
#if defined(_MSC_VER) && _MSC_VER >= 1400
if (0 != _wfopen_s(&f, wFilename, wMode))
f = 0;
#else
f = _wfopen(wFilename, wMode);
#endif
#elif defined(_MSC_VER) && _MSC_VER >= 1400
if (0 != fopen_s(&f, filename, mode))
f=0;
#else
f = fopen(filename, mode);
#endif
return f;
} | O0 | c | stbi__fopen(char const*, char const*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x62c20
movq %rax, (%rsp)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZL11stbi__fopenPKcS0_:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _fopen
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
add rsp, 18h
retn
| long long stbi__fopen(const char *a1, const char *a2)
{
return fopen(a1, a2);
}
| stbi__fopen:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00162c20
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
ADD RSP,0x18
RET
|
/* stbi__fopen(char const*, char const*) */
FILE * stbi__fopen(char *param_1,char *param_2)
{
FILE *pFVar1;
pFVar1 = fopen(param_1,param_2);
return pFVar1;
}
| |
23,021 | nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator++() | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O0 | cpp | nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator++():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x9, %rax
ja 0xde006
movq 0x8(%rsp), %rax
leaq 0xa4e4d(%rip), %rcx # 0x182e1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xdf0e0
jmp 0xde017
movq (%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xdf130
jmp 0xde017
jmp 0xde006
movq (%rsp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0xdf180
movq (%rsp), %rax
addq $0x18, %rsp
retq
| _ZN8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEppEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+18h+var_10], rax
sub rax, 9; switch 10 cases
ja short def_DDFD6; jumptable 00000000000DDFD6 default case
mov rax, [rsp+18h+var_10]
lea rcx, jpt_DDFD6
movsxd rax, ds:(jpt_DDFD6 - 182E1Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_DDFD8:
mov rdi, [rsp+18h+var_18]; jumptable 00000000000DDFD6 case 1
add rdi, 8
mov esi, 1
call _ZSt7advanceISt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEEEEEiEvRT_T0_; std::advance<std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>,int>(std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> &,int)
jmp short loc_DE017
loc_DDFEC:
mov rdi, [rsp+18h+var_18]; jumptable 00000000000DDFD6 case 2
add rdi, 8
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>,int>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> &,int)
jmp short loc_DE017
loc_DE004:
jmp short $+2; jumptable 00000000000DDFD6 cases 0,3-9
def_DDFD6:
mov rdi, [rsp+18h+var_18]; jumptable 00000000000DDFD6 default case
add rdi, 8
add rdi, 10h
call _ZN8nlohmann16json_abi_v3_11_26detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_2::detail::primitive_iterator_t::operator++(void)
loc_DE017:
mov rax, [rsp+18h+var_18]
add rsp, 18h
retn
| _BYTE ** nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>::operator++(
_BYTE **a1)
{
switch ( **a1 )
{
case 1:
std::advance<std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>>,int>(
a1 + 1,
1LL);
break;
case 2:
std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>>,int>(
a1 + 2,
1LL);
break;
default:
nlohmann::json_abi_v3_11_2::detail::primitive_iterator_t::operator++(a1 + 3);
break;
}
return a1;
}
| operator++:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
SUB RAX,0x9
JA 0x001de006
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x282e1c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RSP]
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001df0e0
JMP 0x001de017
caseD_2:
MOV RDI,qword ptr [RSP]
ADD RDI,0x8
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001df130
JMP 0x001de017
caseD_0:
JMP 0x001de006
default:
MOV RDI,qword ptr [RSP]
ADD RDI,0x8
ADD RDI,0x10
CALL 0x001df180
LAB_001de017:
MOV RAX,qword ptr [RSP]
ADD RSP,0x18
RET
|
/* nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> > > >::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
* __thiscall
nlohmann::json_abi_v3_11_2::detail::
iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
*this)
{
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
primitive_iterator_t::operator++((primitive_iterator_t *)(this + 0x18));
break;
case 1:
std::
advance<std::_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>,int>
((_Rb_tree_iterator *)(this + 8),1);
break;
case 2:
std::
advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>*,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,std::allocator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>>,int>
((__normal_iterator *)(this + 0x10),1);
}
return this;
}
| |
23,022 | nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator++() | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator++():
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x51a4e
cmpl $0x1, %eax
jne 0x51a55
leaq 0x8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x51f1d
jmp 0x51a59
addq $0x10, 0x10(%rbx)
jmp 0x51a59
incq 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEppEv:
push rbx
mov rbx, rdi
mov rax, [rdi]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_51A4E
cmp eax, 1
jnz short loc_51A55
lea rdi, [rbx+8]
push 1
pop rsi
call _ZSt9__advanceISt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEEEEElEvRT_T0_St26bidirectional_iterator_tag; std::__advance<std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>,long>(std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> &,long,std::bidirectional_iterator_tag)
jmp short loc_51A59
loc_51A4E:
add qword ptr [rbx+10h], 10h
jmp short loc_51A59
loc_51A55:
inc qword ptr [rbx+18h]
loc_51A59:
mov rax, rbx
pop rbx
retn
| unsigned __int8 ** nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
std::__advance<std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>>,long>(
a1 + 1,
1LL);
}
else
{
++a1[3];
}
return a1;
}
| operator++:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00151a4e
CMP EAX,0x1
JNZ 0x00151a55
LEA RDI,[RBX + 0x8]
PUSH 0x1
POP RSI
CALL 0x00151f1d
JMP 0x00151a59
LAB_00151a4e:
ADD qword ptr [RBX + 0x10],0x10
JMP 0x00151a59
LAB_00151a55:
INC qword ptr [RBX + 0x18]
LAB_00151a59:
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> > > >::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
* __thiscall
nlohmann::json_abi_v3_11_2::detail::
iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
*this)
{
if (**(char **)this == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (**(char **)this == '\x01') {
std::
__advance<std::_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>>>,long>
(this + 8,1);
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
| |
23,023 | multi_alloc_root | eloqsql/mysys/my_alloc.c | void *multi_alloc_root(MEM_ROOT *root, ...)
{
va_list args;
char **ptr, *start, *res;
size_t tot_length, length;
DBUG_ENTER("multi_alloc_root");
/*
We don't need to do DBUG_PRINT here as it will be done when alloc_root
is called
*/
va_start(args, root);
tot_length= 0;
while ((ptr= va_arg(args, char **)))
{
length= va_arg(args, uint);
tot_length+= ALIGN_SIZE(length);
}
va_end(args);
if (!(start= (char*) alloc_root(root, tot_length)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args, root);
res= start;
while ((ptr= va_arg(args, char **)))
{
*ptr= res;
length= va_arg(args, uint);
res+= ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O3 | c | multi_alloc_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
leaq -0xe0(%rbp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x57f8a
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movabsq $0x1fffffff8, %rbx # imm = 0x1FFFFFFF8
movq %r14, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movabsq $0x3000000008, %r15 # imm = 0x3000000008
movq %r15, -0x30(%rbp)
movl $0x8, %eax
xorl %esi, %esi
cmpl $0x28, %eax
ja 0x57fca
movq %rcx, %rdx
movl %eax, %ecx
addq %r14, %rcx
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x57fd2
leaq 0x8(%rcx), %rdx
movq %rdx, -0x28(%rbp)
cmpq $0x0, (%rcx)
je 0x58003
cmpl $0x28, %eax
ja 0x57fed
movq %rdx, %rcx
movl %eax, %edx
addq %r14, %rdx
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x57ff5
leaq 0x8(%rdx), %rcx
movq %rcx, -0x28(%rbp)
movl (%rdx), %edx
addq $0x7, %rdx
andq %rbx, %rdx
addq %rdx, %rsi
jmp 0x57fb5
callq 0x57e17
testq %rax, %rax
je 0x58081
movq %r14, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %r15, -0x30(%rbp)
movl $0x8, %edx
movq %rax, %rcx
cmpl $0x28, %edx
ja 0x58038
movl %edx, %esi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x58044
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdx
movq %rdx, -0x28(%rbp)
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x58081
movq %rcx, (%rdx)
movl -0x30(%rbp), %edx
cmpq $0x28, %rdx
ja 0x58067
movq %rdx, %rsi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x58073
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdi
movq %rdi, -0x28(%rbp)
movl (%rsi), %esi
addq $0x7, %rsi
andq %rbx, %rsi
addq %rsi, %rcx
jmp 0x58025
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| multi_alloc_root:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
lea r14, [rbp+var_E0]
mov [r14+8], rsi
mov [r14+10h], rdx
mov [r14+18h], rcx
mov [r14+20h], r8
mov [r14+28h], r9
test al, al
jz short loc_57F8A
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_57F8A:
mov rbx, 1FFFFFFF8h
mov [rbp+var_20], r14
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov r15, 3000000008h
mov [rbp+var_30], r15
mov eax, 8
xor esi, esi
loc_57FB5:
cmp eax, 28h ; '('
ja short loc_57FCA
mov rdx, rcx
mov ecx, eax
add rcx, r14
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_57FD2
loc_57FCA:
lea rdx, [rcx+8]
mov [rbp+var_28], rdx
loc_57FD2:
cmp qword ptr [rcx], 0
jz short loc_58003
cmp eax, 28h ; '('
ja short loc_57FED
mov rcx, rdx
mov edx, eax
add rdx, r14
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_57FF5
loc_57FED:
lea rcx, [rdx+8]
mov [rbp+var_28], rcx
loc_57FF5:
mov edx, [rdx]
add rdx, 7
and rdx, rbx
add rsi, rdx
jmp short loc_57FB5
loc_58003:
call alloc_root
test rax, rax
jz short loc_58081
mov [rbp+var_20], r14
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov [rbp+var_30], r15
mov edx, 8
mov rcx, rax
loc_58025:
cmp edx, 28h ; '('
ja short loc_58038
mov esi, edx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_58044
loc_58038:
mov rsi, [rbp+var_28]
lea rdx, [rsi+8]
mov [rbp+var_28], rdx
loc_58044:
mov rdx, [rsi]
test rdx, rdx
jz short loc_58081
mov [rdx], rcx
mov edx, dword ptr [rbp+var_30]
cmp rdx, 28h ; '('
ja short loc_58067
mov rsi, rdx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_58073
loc_58067:
mov rsi, [rbp+var_28]
lea rdi, [rsi+8]
mov [rbp+var_28], rdi
loc_58073:
mov esi, [rsi]
add rsi, 7
and rsi, rbx
add rcx, rsi
jmp short loc_58025
loc_58081:
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
| char * multi_alloc_root(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rcx
unsigned int v16; // eax
long long i; // rsi
char *v18; // rdx
char *result; // rax
unsigned int v20; // edx
char *j; // rcx
char *v22; // rsi
char *v23; // rsi
_BYTE v24[8]; // [rsp+0h] [rbp-E0h] BYREF
long long v25; // [rsp+8h] [rbp-D8h]
long long v26; // [rsp+10h] [rbp-D0h]
long long v27; // [rsp+18h] [rbp-C8h]
long long v28; // [rsp+20h] [rbp-C0h]
long long v29; // [rsp+28h] [rbp-B8h]
__m128 v30; // [rsp+30h] [rbp-B0h]
__m128 v31; // [rsp+40h] [rbp-A0h]
__m128 v32; // [rsp+50h] [rbp-90h]
__m128 v33; // [rsp+60h] [rbp-80h]
__m128 v34; // [rsp+70h] [rbp-70h]
__m128 v35; // [rsp+80h] [rbp-60h]
__m128 v36; // [rsp+90h] [rbp-50h]
__m128 v37; // [rsp+A0h] [rbp-40h]
long long v38; // [rsp+B0h] [rbp-30h]
char *v39; // [rsp+B8h] [rbp-28h]
_BYTE *v40; // [rsp+C0h] [rbp-20h]
v30 = a7;
v31 = a8;
v32 = a9;
v33 = a10;
v34 = a11;
v35 = a12;
v36 = a13;
v37 = a14;
v25 = a2;
v26 = a3;
v27 = a4;
v28 = a5;
v29 = a6;
v40 = v24;
v15 = &a15;
v39 = &a15;
v38 = 0x3000000008LL;
v16 = 8;
for ( i = 0LL; ; i += (*(unsigned int *)v18 + 7LL) & 0x1FFFFFFF8LL )
{
if ( v16 > 0x28 )
{
v18 = v15 + 8;
v39 = v15 + 8;
}
else
{
v18 = v15;
v15 = &v24[v16];
v16 += 8;
LODWORD(v38) = v16;
}
if ( !*(_QWORD *)v15 )
break;
if ( v16 > 0x28 )
{
v15 = v18 + 8;
v39 = v18 + 8;
}
else
{
v15 = v18;
v18 = &v24[v16];
v16 += 8;
LODWORD(v38) = v16;
}
}
result = alloc_root(a1, i, (long long)v18, (long long)v15);
if ( result )
{
v40 = v24;
v39 = &a15;
v38 = 0x3000000008LL;
v20 = 8;
for ( j = result; ; j += (*(unsigned int *)v23 + 7LL) & 0x1FFFFFFF8LL )
{
if ( v20 > 0x28 )
{
v22 = v39;
v39 += 8;
}
else
{
v22 = &v40[v20];
LODWORD(v38) = v20 + 8;
}
if ( !*(_QWORD *)v22 )
break;
**(_QWORD **)v22 = j;
v20 = v38;
if ( (unsigned int)v38 > 0x28uLL )
{
v23 = v39;
v39 += 8;
}
else
{
v23 = &v40[(unsigned int)v38];
v20 = v38 + 8;
LODWORD(v38) = v38 + 8;
}
}
}
return result;
}
| multi_alloc_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
LEA R14,[RBP + -0xe0]
MOV qword ptr [R14 + 0x8],RSI
MOV qword ptr [R14 + 0x10],RDX
MOV qword ptr [R14 + 0x18],RCX
MOV qword ptr [R14 + 0x20],R8
MOV qword ptr [R14 + 0x28],R9
TEST AL,AL
JZ 0x00157f8a
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00157f8a:
MOV RBX,0x1fffffff8
MOV qword ptr [RBP + -0x20],R14
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV R15,0x3000000008
MOV qword ptr [RBP + -0x30],R15
MOV EAX,0x8
XOR ESI,ESI
LAB_00157fb5:
CMP EAX,0x28
JA 0x00157fca
MOV RDX,RCX
MOV ECX,EAX
ADD RCX,R14
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00157fd2
LAB_00157fca:
LEA RDX,[RCX + 0x8]
MOV qword ptr [RBP + -0x28],RDX
LAB_00157fd2:
CMP qword ptr [RCX],0x0
JZ 0x00158003
CMP EAX,0x28
JA 0x00157fed
MOV RCX,RDX
MOV EDX,EAX
ADD RDX,R14
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00157ff5
LAB_00157fed:
LEA RCX,[RDX + 0x8]
MOV qword ptr [RBP + -0x28],RCX
LAB_00157ff5:
MOV EDX,dword ptr [RDX]
ADD RDX,0x7
AND RDX,RBX
ADD RSI,RDX
JMP 0x00157fb5
LAB_00158003:
CALL 0x00157e17
TEST RAX,RAX
JZ 0x00158081
MOV qword ptr [RBP + -0x20],R14
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R15
MOV EDX,0x8
MOV RCX,RAX
LAB_00158025:
CMP EDX,0x28
JA 0x00158038
MOV ESI,EDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x00158044
LAB_00158038:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDX
LAB_00158044:
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x00158081
MOV qword ptr [RDX],RCX
MOV EDX,dword ptr [RBP + -0x30]
CMP RDX,0x28
JA 0x00158067
MOV RSI,RDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x00158073
LAB_00158067:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDI
LAB_00158073:
MOV ESI,dword ptr [RSI]
ADD RSI,0x7
AND RSI,RBX
ADD RCX,RSI
JMP 0x00158025
LAB_00158081:
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void multi_alloc_root(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
uint *puVar2;
uint *puVar3;
ulong uVar4;
long lVar5;
uint *puVar6;
uint local_e8 [2];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
uint local_38;
int4 uStack_34;
uint *local_30;
uint *local_28;
local_e0 = param_10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
puVar6 = (uint *)&stack0x00000008;
local_30 = puVar6;
local_38 = 8;
uStack_34 = 0x30;
uVar1 = 8;
lVar5 = 0;
while( true ) {
if (uVar1 < 0x29) {
uVar4 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
puVar2 = (uint *)((long)local_e8 + uVar4);
puVar3 = puVar6;
}
else {
puVar3 = puVar6 + 2;
local_30 = puVar3;
puVar2 = puVar6;
}
if (*(long *)puVar2 == 0) break;
if (uVar1 < 0x29) {
uVar4 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
puVar6 = puVar3;
puVar3 = (uint *)((long)local_e8 + uVar4);
}
else {
puVar6 = puVar3 + 2;
local_30 = puVar6;
}
lVar5 = lVar5 + ((ulong)*puVar3 + 7 & 0x1fffffff8);
}
lVar5 = alloc_root(param_9,lVar5);
if (lVar5 != 0) {
local_30 = (uint *)&stack0x00000008;
uVar1 = 8;
uVar4 = 8;
while( true ) {
if ((uint)uVar4 < 0x29) {
uVar1 = (uint)uVar4 + 8;
puVar6 = (uint *)((long)local_e8 + uVar4);
}
else {
puVar6 = local_30;
local_30 = local_30 + 2;
}
if (*(long **)puVar6 == (long *)0x0) break;
**(long **)puVar6 = lVar5;
uVar4 = (ulong)uVar1;
if (uVar4 < 0x29) {
puVar6 = (uint *)((long)local_e8 + uVar4);
uVar1 = uVar1 + 8;
uVar4 = (ulong)uVar1;
}
else {
puVar6 = local_30;
local_30 = local_30 + 2;
}
lVar5 = lVar5 + ((ulong)*puVar6 + 7 & 0x1fffffff8);
}
}
return;
}
| |
23,024 | pvio_socket_read | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r;
int read_flags= MSG_DONTWAIT;
struct st_pvio_socket *csock;
int timeout;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_READ_TIMEOUT];
while ((r = ma_recv(csock->socket, (void *)buffer, length, read_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
) || timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, TRUE, timeout) < 1)
return -1;
}
return r;
} | O0 | c | pvio_socket_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x40, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x410fc
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x41106
movq $-0x1, -0x8(%rbp)
jmp 0x41185
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x42740
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x4117d
callq 0x13050
movl (%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $0xb, -0x40(%rbp)
jne 0x41151
cmpl $0x0, -0x3c(%rbp)
jne 0x4115b
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x41185
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl $0x1, %esi
callq 0x41370
cmpl $0x1, %eax
jge 0x4117b
movq $-0x1, -0x8(%rbp)
jmp 0x41185
jmp 0x4111b
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| pvio_socket_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_2C], 40h ; '@'
cmp [rbp+var_10], 0
jz short loc_410FC
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_41106
loc_410FC:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_41185
loc_41106:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov eax, [rax+28h]
mov [rbp+var_3C], eax
loc_4111B:
mov rax, [rbp+var_38]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call ma_recv
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_4117D
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
cmp [rbp+var_40], 0Bh
jnz short loc_41151
cmp [rbp+var_3C], 0
jnz short loc_4115B
loc_41151:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_41185
loc_4115B:
mov rdi, [rbp+var_10]
mov edx, [rbp+var_3C]
mov esi, 1
call pvio_socket_wait_io_or_timeout
cmp eax, 1
jge short loc_4117B
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_41185
loc_4117B:
jmp short loc_4111B
loc_4117D:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_41185:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_read(unsigned int **a1, long long a2, long long a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+4h] [rbp-3Ch]
unsigned int *v6; // [rsp+8h] [rbp-38h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 || !*a1 )
return -1LL;
v6 = *a1;
v5 = *((_DWORD *)a1 + 10);
while ( 1 )
{
v3 = *v6;
v7 = ma_recv(v3, a2, a3, 64LL);
if ( v7 != -1 )
break;
if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 )
return -1LL;
if ( (int)pvio_socket_wait_io_or_timeout(a1, 1LL, v5) < 1 )
return -1LL;
}
return v7;
}
| pvio_socket_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x2c],0x40
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001410fc
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00141106
LAB_001410fc:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00141185
LAB_00141106:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x3c],EAX
LAB_0014111b:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x00142740
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x0014117d
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0xb
JNZ 0x00141151
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x0014115b
LAB_00141151:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00141185
LAB_0014115b:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x3c]
MOV ESI,0x1
CALL 0x00141370
CMP EAX,0x1
JGE 0x0014117b
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00141185
LAB_0014117b:
JMP 0x0014111b
LAB_0014117d:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00141185:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long pvio_socket_read(long *param_1,int8 param_2,int8 param_3)
{
int4 *puVar1;
long lVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
puVar1 = (int4 *)*param_1;
lVar2 = param_1[5];
do {
lVar4 = ma_recv(*puVar1,param_2,param_3,0x40);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
if (*piVar5 != 0xb) {
return -1;
}
if ((int)lVar2 == 0) {
return -1;
}
iVar3 = pvio_socket_wait_io_or_timeout(param_1,1,(int)lVar2);
} while (0 < iVar3);
}
return -1;
}
| |
23,025 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) | llama.cpp/common/./json.hpp | inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0x7b835
testl %r8d, %r8d
jle 0x7b851
movq %rdi, %rbx
leal (%rdx,%rsi), %r15d
testl %edx, %edx
sets %al
cmpl %r8d, %r15d
setg %dil
orb %al, %dil
je 0x7b6de
cmpl %r8d, %r15d
setg %al
testl %r15d, %r15d
setle %dil
orb %al, %dil
je 0x7b70b
testl %r15d, %r15d
setg %al
cmpl %ecx, %r15d
setle %cl
orb %al, %cl
jne 0x7b746
negl %r15d
leaq (%rbx,%r15), %r14
addq $0x2, %r14
movslq %esi, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x25280
movw $0x2e30, (%rbx) # imm = 0x2E30
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x30, %esi
movq %r15, %rdx
callq 0x25600
addq %r12, %r14
jmp 0x7b826
movslq %esi, %rax
leaq (%rbx,%rax), %rdi
movslq %r15d, %r14
movq %r14, %rdx
subq %rax, %rdx
movl $0x30, %esi
callq 0x25600
addq %rbx, %r14
addq $0x2, %r14
movw $0x302e, -0x2(%r14) # imm = 0x302E
jmp 0x7b826
testl %edx, %edx
jns 0x7b872
movl %r15d, %ecx
leaq (%rbx,%rcx), %rax
leaq (%rbx,%rcx), %r14
incq %r14
movl %esi, %r15d
movq %r15, %rdx
subq %rcx, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x25280
movb $0x2e, -0x1(%r14)
leaq (%rbx,%r15), %r14
incq %r14
jmp 0x7b826
cmpl $0x1, %esi
je 0x7b769
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rax
movslq %esi, %r14
leaq -0x1(%r14), %rdx
movq %rax, %rsi
callq 0x25280
movb $0x2e, 0x1(%rbx)
addq %r14, %rbx
movb $0x65, 0x1(%rbx)
cmpl $0xfffffc19, %r15d # imm = 0xFFFFFC19
jle 0x7b88e
cmpl $0x3e9, %r15d # imm = 0x3E9
jge 0x7b8aa
leaq 0x2(%rbx), %r14
leal -0x1(%r15), %ecx
testl %r15d, %r15d
setle %dl
addb %dl, %dl
addb $0x2b, %dl
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movb %dl, 0x2(%rbx)
cmpl $0x9, %eax
ja 0x7b7b3
movb $0x30, 0x3(%rbx)
addq $0x4, %rbx
jmp 0x7b7d7
cmpl $0x63, %eax
ja 0x7b7de
movzbl %al, %eax
imull $0xcd, %eax, %ecx
shrl $0xb, %ecx
movl %ecx, %edx
orb $0x30, %dl
movb %dl, 0x3(%rbx)
addq $0x4, %rbx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
movl $0x3, %ecx
jmp 0x7b81f
movl $0xffff, %ecx # imm = 0xFFFF
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %edx
imull $0x147b, %edx, %edx # imm = 0x147B
shrl $0x11, %edx
leal 0x30(%rdx), %esi
movb %sil, 0x3(%rbx)
imull $0x64, %edx, %edx
subl %edx, %eax
imull $0x67, %eax, %edx
andl %ecx, %edx
shrl $0xa, %edx
movl %edx, %ecx
orb $0x30, %cl
movb %cl, 0x4(%rbx)
addq $0x5, %rbx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subb %cl, %al
movl $0x4, %ecx
addq %rcx, %r14
orb $0x30, %al
movb %al, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xf7599(%rip), %rdi # 0x172dd5
leaq 0xf75cf(%rip), %rdx # 0x172e12
leaq 0xf93c6(%rip), %rcx # 0x174c10
movl $0x45e3, %esi # imm = 0x45E3
jmp 0x7b86b
leaq 0xf757d(%rip), %rdi # 0x172dd5
leaq 0xf75b3(%rip), %rdx # 0x172e12
leaq 0xf93b6(%rip), %rcx # 0x174c1c
movl $0x45e4, %esi # imm = 0x45E4
xorl %eax, %eax
callq 0x26090
leaq 0xf755c(%rip), %rdi # 0x172dd5
leaq 0xf7592(%rip), %rdx # 0x172e12
leaq 0xf93a1(%rip), %rcx # 0x174c28
movl $0x45fe, %esi # imm = 0x45FE
jmp 0x7b86b
leaq 0xf7540(%rip), %rdi # 0x172dd5
leaq 0xf7576(%rip), %rdx # 0x172e12
leaq 0xf938b(%rip), %rcx # 0x174c2e
movl $0x45ae, %esi # imm = 0x45AE
jmp 0x7b86b
leaq 0xf7524(%rip), %rdi # 0x172dd5
leaq 0xf755a(%rip), %rdx # 0x172e12
leaq 0xf9379(%rip), %rcx # 0x174c38
movl $0x45af, %esi # imm = 0x45AF
jmp 0x7b86b
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
push r15
push r14
push r12
push rbx
push rax
test ecx, ecx
jns loc_7B835
test r8d, r8d
jle loc_7B851
mov rbx, rdi
lea r15d, [rdx+rsi]
test edx, edx
sets al
cmp r15d, r8d
setnle dil
or dil, al
jz short loc_7B6DE
cmp r15d, r8d
setnle al
test r15d, r15d
setle dil
or dil, al
jz short loc_7B70B
test r15d, r15d
setnle al
cmp r15d, ecx
setle cl
or cl, al
jnz loc_7B746
neg r15d
lea r14, [rbx+r15]
add r14, 2
movsxd r12, esi
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call _memmove
mov word ptr [rbx], 2E30h
add rbx, 2
mov rdi, rbx
mov esi, 30h ; '0'
mov rdx, r15
call _memset
add r14, r12
jmp loc_7B826
loc_7B6DE:
movsxd rax, esi
lea rdi, [rbx+rax]
movsxd r14, r15d
mov rdx, r14
sub rdx, rax
mov esi, 30h ; '0'
call _memset
add r14, rbx
add r14, 2
mov word ptr [r14-2], 302Eh
jmp loc_7B826
loc_7B70B:
test edx, edx
jns loc_7B872
mov ecx, r15d
lea rax, [rbx+rcx]
lea r14, [rbx+rcx]
inc r14
mov r15d, esi
mov rdx, r15
sub rdx, rcx
mov rdi, r14
mov rsi, rax
call _memmove
mov byte ptr [r14-1], 2Eh ; '.'
lea r14, [rbx+r15]
inc r14
jmp loc_7B826
loc_7B746:
cmp esi, 1
jz short loc_7B769
lea rdi, [rbx+2]
lea rax, [rbx+1]
movsxd r14, esi
lea rdx, [r14-1]
mov rsi, rax
call _memmove
mov byte ptr [rbx+1], 2Eh ; '.'
add rbx, r14
loc_7B769:
mov byte ptr [rbx+1], 65h ; 'e'
cmp r15d, 0FFFFFC19h
jle loc_7B88E
cmp r15d, 3E9h
jge loc_7B8AA
lea r14, [rbx+2]
lea ecx, [r15-1]
test r15d, r15d
setle dl
add dl, dl
add dl, 2Bh ; '+'
mov eax, ecx
neg eax
cmovs eax, ecx
mov [rbx+2], dl
cmp eax, 9
ja short loc_7B7B3
mov byte ptr [rbx+3], 30h ; '0'
add rbx, 4
jmp short loc_7B7D7
loc_7B7B3:
cmp eax, 63h ; 'c'
ja short loc_7B7DE
movzx eax, al
imul ecx, eax, 0CDh
shr ecx, 0Bh
mov edx, ecx
or dl, 30h
mov [rbx+3], dl
add rbx, 4
add ecx, ecx
lea ecx, [rcx+rcx*4]
sub al, cl
loc_7B7D7:
mov ecx, 3
jmp short loc_7B81F
loc_7B7DE:
mov ecx, 0FFFFh
mov edx, eax
and edx, ecx
shr edx, 2
imul edx, 147Bh
shr edx, 11h
lea esi, [rdx+30h]
mov [rbx+3], sil
imul edx, 64h ; 'd'
sub eax, edx
imul edx, eax, 67h ; 'g'
and edx, ecx
shr edx, 0Ah
mov ecx, edx
or cl, 30h
mov [rbx+4], cl
add rbx, 5
add edx, edx
lea ecx, [rdx+rdx*4]
sub al, cl
mov ecx, 4
loc_7B81F:
add r14, rcx
or al, 30h
mov [rbx], al
loc_7B826:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_7B835:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMinExp0; "min_exp < 0"
mov esi, 45E3h
jmp short loc_7B86B
loc_7B851:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaxExp0; "max_exp > 0"
mov esi, 45E4h
loc_7B86B:
xor eax, eax
call _ggml_abort
loc_7B872:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKN; "k > n"
mov esi, 45FEh
jmp short loc_7B86B
loc_7B88E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_7B86B
loc_7B8AA:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
jmp short loc_7B86B
| char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx
int v6; // r15d
long long v7; // r15
char *v8; // r14
char *v9; // r14
char *v10; // r14
unsigned int v11; // eax
_BYTE *v12; // rbx
long long v13; // rcx
if ( a4 >= 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",
17891LL,
"GGML_ASSERT(%s) failed",
"min_exp < 0");
goto LABEL_26;
}
if ( a5 <= 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",
17892LL,
"GGML_ASSERT(%s) failed",
"max_exp > 0");
goto LABEL_26;
}
v5 = this;
v6 = a3 + (_DWORD)a2;
if ( a3 >= 0 && a3 + (int)a2 <= a5 )
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
v8 = (char *)this + v6 + 2;
*(_WORD *)((char *)this + v6) = 12334;
return v8;
}
if ( v6 <= a5 && v6 > 0 )
{
if ( a3 < 0 )
{
v9 = (char *)this + (unsigned int)v6 + 1;
memmove(v9, (char *)this + (unsigned int)v6, (unsigned int)a2 - (unsigned long long)(unsigned int)v6);
*(v9 - 1) = 46;
return (char *)this + (unsigned int)a2 + 1;
}
goto LABEL_26;
}
if ( v6 > 0 || v6 <= a4 )
{
if ( (_DWORD)a2 != 1 )
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2);
}
*((_BYTE *)v5 + 1) = 101;
if ( v6 <= -999 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( v6 < 1001 )
{
v10 = (char *)v5 + 2;
v11 = 1 - v6;
if ( 1 - v6 < 0 )
v11 = v6 - 1;
*((_BYTE *)v5 + 2) = 2 * (v6 <= 0) + 43;
if ( v11 > 9 )
{
if ( v11 > 0x63 )
{
*((_BYTE *)v5 + 3) = ((unsigned int)(5243 * ((unsigned __int16)v11 >> 2)) >> 17) + 48;
LOWORD(v11) = (unsigned __int16)v11 % 0x64u;
*((_BYTE *)v5 + 4) = ((unsigned __int16)(103 * v11) >> 10) | 0x30;
v12 = (char *)v5 + 5;
LOBYTE(v11) = v11 - 10 * ((unsigned __int16)(103 * v11) >> 10);
v13 = 4LL;
goto LABEL_22;
}
*((_BYTE *)v5 + 3) = ((unsigned __int8)v11 / 0xAu) | 0x30;
v12 = (char *)v5 + 4;
LOBYTE(v11) = (unsigned __int8)v11 % 0xAu;
}
else
{
*((_BYTE *)v5 + 3) = 48;
v12 = (char *)v5 + 4;
}
v13 = 3LL;
LABEL_22:
v8 = &v10[v13];
*v12 = v11 | 0x30;
return v8;
}
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
while ( 1 )
LABEL_26:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",
17918LL,
"GGML_ASSERT(%s) failed",
"k > n");
}
v7 = (unsigned int)-v6;
memmove((char *)this + v7 + 2, this, (int)a2);
*(_WORD *)this = 11824;
memset((char *)this + 2, 48LL, v7);
return (char *)this + v7 + (int)a2 + 2;
}
| format_buffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
JNS 0x0017b835
TEST R8D,R8D
JLE 0x0017b851
MOV RBX,RDI
LEA R15D,[RDX + RSI*0x1]
TEST EDX,EDX
SETS AL
CMP R15D,R8D
SETG DIL
OR DIL,AL
JZ 0x0017b6de
CMP R15D,R8D
SETG AL
TEST R15D,R15D
SETLE DIL
OR DIL,AL
JZ 0x0017b70b
TEST R15D,R15D
SETG AL
CMP R15D,ECX
SETLE CL
OR CL,AL
JNZ 0x0017b746
NEG R15D
LEA R14,[RBX + R15*0x1]
ADD R14,0x2
MOVSXD R12,ESI
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
CALL 0x00125280
MOV word ptr [RBX],0x2e30
ADD RBX,0x2
MOV RDI,RBX
MOV ESI,0x30
MOV RDX,R15
CALL 0x00125600
ADD R14,R12
JMP 0x0017b826
LAB_0017b6de:
MOVSXD RAX,ESI
LEA RDI,[RBX + RAX*0x1]
MOVSXD R14,R15D
MOV RDX,R14
SUB RDX,RAX
MOV ESI,0x30
CALL 0x00125600
ADD R14,RBX
ADD R14,0x2
MOV word ptr [R14 + -0x2],0x302e
JMP 0x0017b826
LAB_0017b70b:
TEST EDX,EDX
JNS 0x0017b872
MOV ECX,R15D
LEA RAX,[RBX + RCX*0x1]
LEA R14,[RBX + RCX*0x1]
INC R14
MOV R15D,ESI
MOV RDX,R15
SUB RDX,RCX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00125280
MOV byte ptr [R14 + -0x1],0x2e
LEA R14,[RBX + R15*0x1]
INC R14
JMP 0x0017b826
LAB_0017b746:
CMP ESI,0x1
JZ 0x0017b769
LEA RDI,[RBX + 0x2]
LEA RAX,[RBX + 0x1]
MOVSXD R14,ESI
LEA RDX,[R14 + -0x1]
MOV RSI,RAX
CALL 0x00125280
MOV byte ptr [RBX + 0x1],0x2e
ADD RBX,R14
LAB_0017b769:
MOV byte ptr [RBX + 0x1],0x65
CMP R15D,0xfffffc19
JLE 0x0017b88e
CMP R15D,0x3e9
JGE 0x0017b8aa
LEA R14,[RBX + 0x2]
LEA ECX,[R15 + -0x1]
TEST R15D,R15D
SETLE DL
ADD DL,DL
ADD DL,0x2b
MOV EAX,ECX
NEG EAX
CMOVS EAX,ECX
MOV byte ptr [RBX + 0x2],DL
CMP EAX,0x9
JA 0x0017b7b3
MOV byte ptr [RBX + 0x3],0x30
ADD RBX,0x4
JMP 0x0017b7d7
LAB_0017b7b3:
CMP EAX,0x63
JA 0x0017b7de
MOVZX EAX,AL
IMUL ECX,EAX,0xcd
SHR ECX,0xb
MOV EDX,ECX
OR DL,0x30
MOV byte ptr [RBX + 0x3],DL
ADD RBX,0x4
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x4]
SUB AL,CL
LAB_0017b7d7:
MOV ECX,0x3
JMP 0x0017b81f
LAB_0017b7de:
MOV ECX,0xffff
MOV EDX,EAX
AND EDX,ECX
SHR EDX,0x2
IMUL EDX,EDX,0x147b
SHR EDX,0x11
LEA ESI,[RDX + 0x30]
MOV byte ptr [RBX + 0x3],SIL
IMUL EDX,EDX,0x64
SUB EAX,EDX
IMUL EDX,EAX,0x67
AND EDX,ECX
SHR EDX,0xa
MOV ECX,EDX
OR CL,0x30
MOV byte ptr [RBX + 0x4],CL
ADD RBX,0x5
ADD EDX,EDX
LEA ECX,[RDX + RDX*0x4]
SUB AL,CL
MOV ECX,0x4
LAB_0017b81f:
ADD R14,RCX
OR AL,0x30
MOV byte ptr [RBX],AL
LAB_0017b826:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0017b835:
LEA RDI,[0x272dd5]
LEA RDX,[0x272e12]
LEA RCX,[0x274c10]
MOV ESI,0x45e3
JMP 0x0017b86b
LAB_0017b851:
LEA RDI,[0x272dd5]
LEA RDX,[0x272e12]
LEA RCX,[0x274c1c]
MOV ESI,0x45e4
LAB_0017b86b:
XOR EAX,EAX
CALL 0x00126090
LAB_0017b872:
LEA RDI,[0x272dd5]
LEA RDX,[0x272e12]
LEA RCX,[0x274c28]
MOV ESI,0x45fe
JMP 0x0017b86b
LAB_0017b88e:
LEA RDI,[0x272dd5]
LEA RDX,[0x272e12]
LEA RCX,[0x274c2e]
MOV ESI,0x45ae
JMP 0x0017b86b
LAB_0017b8aa:
LEA RDI,[0x272dd5]
LEA RDX,[0x272e12]
LEA RCX,[0x274c38]
MOV ESI,0x45af
JMP 0x0017b86b
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
byte bVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
byte *pbVar8;
int8 uVar9;
uint uVar10;
if (-1 < param_4) {
pcVar7 = "min_exp < 0";
uVar9 = 0x45e3;
LAB_0017b86b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",uVar9,
"GGML_ASSERT(%s) failed",pcVar7);
}
if (param_5 < 1) {
pcVar7 = "max_exp > 0";
uVar9 = 0x45e4;
goto LAB_0017b86b;
}
uVar10 = param_3 + param_2;
if ((int)uVar10 <= param_5 && -1 < param_3) {
memset(param_1 + param_2,0x30,(long)(int)uVar10 - (long)param_2);
pcVar7 = param_1 + (int)uVar10;
pcVar7[0] = '.';
pcVar7[1] = '0';
return pcVar7 + 2;
}
if (0 < (int)uVar10 && (int)uVar10 <= param_5) {
if (param_3 < 0) {
uVar5 = (ulong)uVar10;
memmove(param_1 + uVar5 + 1,param_1 + uVar5,(uint)param_2 - uVar5);
param_1[uVar5] = '.';
return param_1 + (ulong)(uint)param_2 + 1;
}
pcVar7 = "k > n";
uVar9 = 0x45fe;
goto LAB_0017b86b;
}
if (param_4 < (int)uVar10 && (int)uVar10 < 1) {
memmove(param_1 + (ulong)-uVar10 + 2,param_1,(long)param_2);
param_1[0] = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(ulong)-uVar10);
return param_1 + (ulong)-uVar10 + 2 + param_2;
}
if (param_2 != 1) {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
param_1 = param_1 + param_2;
}
param_1[1] = 'e';
if ((int)uVar10 < -0x3e6) {
pcVar7 = "e > -1000";
uVar9 = 0x45ae;
goto LAB_0017b86b;
}
if (1000 < (int)uVar10) {
pcVar7 = "e < 1000";
uVar9 = 0x45af;
goto LAB_0017b86b;
}
uVar1 = uVar10 - 1;
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
param_1[2] = ((int)uVar10 < 1) * '\x02' + '+';
if (uVar3 < 10) {
param_1[3] = '0';
}
else {
if (99 < uVar3) {
uVar10 = (uVar3 & 0xffff) / 100;
param_1[3] = (char)uVar10 + '0';
iVar4 = uVar3 + uVar10 * -100;
bVar2 = (byte)((iVar4 * 0x67 & 0xffffU) >> 10);
param_1[4] = bVar2 | 0x30;
pbVar8 = (byte *)(param_1 + 5);
bVar2 = (char)iVar4 + bVar2 * -10;
lVar6 = 4;
goto LAB_0017b81f;
}
bVar2 = (byte)((uVar3 & 0xff) / 10);
param_1[3] = bVar2 | 0x30;
uVar3 = (uint)(byte)((char)uVar3 + bVar2 * -10);
}
bVar2 = (byte)uVar3;
pbVar8 = (byte *)(param_1 + 4);
lVar6 = 3;
LAB_0017b81f:
*pbVar8 = bVar2 | 0x30;
return param_1 + lVar6 + 2;
}
| |
23,026 | blst_scalar_from_le_bytes | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/exports.c | int blst_scalar_from_le_bytes(pow256 out, const unsigned char *bytes, size_t n)
{
size_t rem = (n - 1) % 32 + 1;
struct { vec256 out, digit; } t;
limb_t ret;
vec_zero(t.out, sizeof(t.out));
n -= rem;
limbs_from_le_bytes(t.out, bytes += n, rem);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
while (n) {
limbs_from_le_bytes(t.digit, bytes -= 32, 32);
add_mod_256(t.out, t.out, t.digit, BLS12_381_r);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
n -= 32;
}
from_mont_256(t.out, t.out, BLS12_381_r, r0);
ret = vec_is_zero(t.out, sizeof(t.out));
le_bytes_from_limbs(out, t.out, 32);
vec_zero(&t, sizeof(t));
return (int)(ret^1);
} | O0 | c | blst_scalar_from_le_bytes:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
andq $0x1f, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x20, %esi
callq 0x23310
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
leaq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x10(%rbp), %rsi
movq %rsi, -0x10(%rbp)
movq -0x20(%rbp), %rdx
callq 0x30430
leaq -0x60(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq 0x235a3(%rip), %rsi # 0x54fa0
leaq 0x2308c(%rip), %rcx # 0x54a90
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0x47200
cmpq $0x0, -0x18(%rbp)
je 0x31a87
leaq -0x60(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
addq $-0x20, %rsi
movq %rsi, -0x10(%rbp)
movl $0x20, %edx
callq 0x30430
leaq -0x60(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x60(%rbp), %rdx
addq $0x20, %rdx
leaq 0x23041(%rip), %rcx # 0x54a90
callq 0x47900
leaq -0x60(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq 0x2353d(%rip), %rsi # 0x54fa0
leaq 0x23026(%rip), %rcx # 0x54a90
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0x47200
movq -0x18(%rbp), %rax
subq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x31a13
leaq -0x60(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq 0x22ffa(%rip), %rdx # 0x54a90
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
callq 0x47620
leaq -0x60(%rbp), %rdi
movl $0x20, %esi
callq 0x23820
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x20, %edx
callq 0x30540
leaq -0x60(%rbp), %rdi
movl $0x40, %esi
callq 0x23310
movq -0x68(%rbp), %rax
xorq $0x1, %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| blst_scalar_from_le_bytes:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
sub rax, 1
and rax, 1Fh
add rax, 1
mov [rbp+var_20], rax
lea rdi, [rbp+var_60]
mov esi, 20h ; ' '
call vec_zero
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
lea rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
add rsi, [rbp+var_10]
mov [rbp+var_10], rsi
mov rdx, [rbp+var_20]
call limbs_from_le_bytes
lea rdi, [rbp+var_60]
lea rdx, [rbp+var_60]
lea rsi, BLS12_381_rRR
lea rcx, BLS12_381_r
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
loc_31A13:
cmp [rbp+var_18], 0
jz short loc_31A87
lea rdi, [rbp+var_60]
add rdi, 20h ; ' '
mov rsi, [rbp+var_10]
add rsi, 0FFFFFFFFFFFFFFE0h
mov [rbp+var_10], rsi
mov edx, 20h ; ' '
call limbs_from_le_bytes
lea rdi, [rbp+var_60]
lea rsi, [rbp+var_60]
lea rdx, [rbp+var_60]
add rdx, 20h ; ' '
lea rcx, BLS12_381_r
call add_mod_256
lea rdi, [rbp+var_60]
lea rdx, [rbp+var_60]
lea rsi, BLS12_381_rRR
lea rcx, BLS12_381_r
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
mov rax, [rbp+var_18]
sub rax, 20h ; ' '
mov [rbp+var_18], rax
jmp short loc_31A13
loc_31A87:
lea rdi, [rbp+var_60]
lea rsi, [rbp+var_60]
lea rdx, BLS12_381_r
mov rcx, 0FFFFFFFEFFFFFFFFh
call from_mont_256
lea rdi, [rbp+var_60]
mov esi, 20h ; ' '
call vec_is_zero
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_60]
mov edx, 20h ; ' '
call le_bytes_from_limbs
lea rdi, [rbp+var_60]
mov esi, 40h ; '@'
call vec_zero
mov rax, [rbp+var_68]
xor rax, 1
add rsp, 70h
pop rbp
retn
| long long blst_scalar_from_le_bytes(_BYTE *a1, long long a2, long long a3)
{
unsigned long long is_zero; // [rsp+8h] [rbp-68h]
_BYTE v5[32]; // [rsp+10h] [rbp-60h] BYREF
_BYTE v6[32]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+50h] [rbp-20h]
long long v8; // [rsp+58h] [rbp-18h]
long long v9; // [rsp+60h] [rbp-10h]
_BYTE *v10; // [rsp+68h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = (((_BYTE)a3 - 1) & 0x1F) + 1LL;
vec_zero((long long)v5, 0x20uLL);
v8 -= v7;
v9 += v8;
limbs_from_le_bytes((long long)v5, v9, v7);
mul_mont_sparse_256(v5, &BLS12_381_rRR, v5, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
while ( v8 )
{
v9 -= 32LL;
limbs_from_le_bytes((long long)v6, v9, 0x20uLL);
add_mod_256(v5, v5, v6, &BLS12_381_r);
mul_mont_sparse_256(v5, &BLS12_381_rRR, v5, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
v8 -= 32LL;
}
from_mont_256(v5, v5, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
is_zero = vec_is_zero((long long)v5, 0x20uLL);
le_bytes_from_limbs(v10, v5, 0x20uLL);
vec_zero((long long)v5, 0x40uLL);
return is_zero ^ 1;
}
| blst_scalar_from_le_bytes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
AND RAX,0x1f
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x60]
MOV ESI,0x20
CALL 0x00123310
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RSI
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00130430
LEA RDI,[RBP + -0x60]
LEA RDX,[RBP + -0x60]
LEA RSI,[0x154fa0]
LEA RCX,[0x154a90]
MOV R8,-0x100000001
CALL 0x00147200
LAB_00131a13:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00131a87
LEA RDI,[RBP + -0x60]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,-0x20
MOV qword ptr [RBP + -0x10],RSI
MOV EDX,0x20
CALL 0x00130430
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0x60]
LEA RDX,[RBP + -0x60]
ADD RDX,0x20
LEA RCX,[0x154a90]
CALL 0x00147900
LEA RDI,[RBP + -0x60]
LEA RDX,[RBP + -0x60]
LEA RSI,[0x154fa0]
LEA RCX,[0x154a90]
MOV R8,-0x100000001
CALL 0x00147200
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x20
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00131a13
LAB_00131a87:
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0x60]
LEA RDX,[0x154a90]
MOV RCX,-0x100000001
CALL 0x00147620
LEA RDI,[RBP + -0x60]
MOV ESI,0x20
CALL 0x00123820
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x60]
MOV EDX,0x20
CALL 0x00130540
LEA RDI,[RBP + -0x60]
MOV ESI,0x40
CALL 0x00123310
MOV RAX,qword ptr [RBP + -0x68]
XOR RAX,0x1
ADD RSP,0x70
POP RBP
RET
|
ulong blst_scalar_from_le_bytes(int8 param_1,long param_2,long param_3)
{
ulong uVar1;
int1 local_68 [32];
int1 auStack_48 [32];
long local_28;
long local_20;
long local_18;
int8 local_10;
local_28 = (param_3 - 1U & 0x1f) + 1;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
vec_zero(local_68,0x20);
local_20 = local_20 - local_28;
local_18 = local_20 + local_18;
limbs_from_le_bytes(local_68,local_18,local_28);
mul_mont_sparse_256(local_68,BLS12_381_rRR,local_68,BLS12_381_r,0xfffffffeffffffff);
for (; local_20 != 0; local_20 = local_20 + -0x20) {
local_18 = local_18 + -0x20;
limbs_from_le_bytes(auStack_48,local_18,0x20);
add_mod_256(local_68,local_68,auStack_48,BLS12_381_r);
mul_mont_sparse_256(local_68,BLS12_381_rRR,local_68,BLS12_381_r,0xfffffffeffffffff);
}
from_mont_256(local_68,local_68,BLS12_381_r,0xfffffffeffffffff);
uVar1 = vec_is_zero(local_68,0x20);
le_bytes_from_limbs(local_10,local_68,0x20);
vec_zero(local_68,0x40);
return uVar1 ^ 1;
}
| |
23,027 | facebook::yoga::SmallValueBuffer_push_32_after_64_Test::~SmallValueBuffer_push_32_after_64_Test() | yoga-mod/tests/SmallValueBufferTest.cpp | TEST(SmallValueBuffer, push_32_after_64) {
uint32_t magic32 = 88567114u;
uint64_t magic64 = 118712305386210ull;
SmallValueBuffer<kBufferSize> buffer;
auto handle64 = buffer.push(magic64);
EXPECT_EQ(buffer.get64(handle64), magic64);
auto handle32 = buffer.push(magic32);
EXPECT_EQ(buffer.get32(handle32), magic32);
} | O0 | cpp | facebook::yoga::SmallValueBuffer_push_32_after_64_Test::~SmallValueBuffer_push_32_after_64_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x704850
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN8facebook4yoga38SmallValueBuffer_push_32_after_64_TestD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
call _ZN7testing4TestD2Ev; testing::Test::~Test()
add rsp, 10h
pop rbp
retn
| void facebook::yoga::SmallValueBuffer_push_32_after_64_Test::~SmallValueBuffer_push_32_after_64_Test(
facebook::yoga::SmallValueBuffer_push_32_after_64_Test *this)
{
testing::Test::~Test(this);
}
| ~SmallValueBuffer_push_32_after_64_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00804850
ADD RSP,0x10
POP RBP
RET
|
/* facebook::yoga::SmallValueBuffer_push_32_after_64_Test::~SmallValueBuffer_push_32_after_64_Test()
*/
void __thiscall
facebook::yoga::SmallValueBuffer_push_32_after_64_Test::~SmallValueBuffer_push_32_after_64_Test
(SmallValueBuffer_push_32_after_64_Test *this)
{
testing::Test::~Test((Test *)this);
return;
}
| |
23,028 | ggml_top_k | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_top_k(
struct ggml_context * ctx,
struct ggml_tensor * a,
int k) {
GGML_ASSERT(a->ne[0] >= k);
struct ggml_tensor * result = ggml_argsort(ctx, a, GGML_SORT_ORDER_DESC);
result = ggml_view_4d(ctx, result,
k, result->ne[1], result->ne[2], result->ne[3],
result->nb[1], result->nb[2], result->nb[3],
0);
return result;
} | O2 | c | ggml_top_k:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movslq %edx, %rbx
cmpq %rbx, 0x10(%rsi)
jl 0x24f43
movq %rdi, %r14
pushq $0x1
popq %rdx
callq 0x1d520
movq 0x18(%rax), %rcx
movq 0x20(%rax), %r8
movq 0x28(%rax), %r9
movups 0x38(%rax), %xmm0
movq 0x48(%rax), %rdx
movq %rdx, 0x10(%rsp)
movups %xmm0, (%rsp)
andq $0x0, 0x18(%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1ff80
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x29639(%rip), %rdi # 0x4e583
leaq 0x29684(%rip), %rdx # 0x4e5d5
leaq 0x29e49(%rip), %rcx # 0x4eda1
movl $0x10b4, %esi # imm = 0x10B4
xorl %eax, %eax
callq 0x1f9b0
| ggml_top_k:
push r14
push rbx
sub rsp, 28h
movsxd rbx, edx
cmp [rsi+10h], rbx
jl short loc_24F43
mov r14, rdi
push 1
pop rdx
call _ggml_argsort
mov rcx, [rax+18h]
mov r8, [rax+20h]
mov r9, [rax+28h]
movups xmm0, xmmword ptr [rax+38h]
mov rdx, [rax+48h]
mov [rsp+38h+var_28], rdx
movups [rsp+38h+var_38], xmm0
and [rsp+38h+var_20], 0
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _ggml_view_4d
add rsp, 28h
pop rbx
pop r14
retn
loc_24F43:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0K; "a->ne[0] >= k"
mov esi, 10B4h
xor eax, eax
call _ggml_abort
| long long ggml_top_k(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
long long v15; // rax
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-38h]
v14 = a3;
if ( *(_QWORD *)(a2 + 16) < a3 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4276,
(long long)"GGML_ASSERT(%s) failed",
(long long)"a->ne[0] >= k",
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v19);
v15 = ggml_argsort(a1, a2, 1, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6);
return ggml_view_4d(
a1,
(unsigned int *)v15,
v14,
*(_QWORD *)(v15 + 24),
*(_QWORD *)(v15 + 32),
*(_QWORD *)(v15 + 40),
*(__m128 *)(v15 + 56),
a8,
a9,
a10,
v16,
v17,
a13,
a14,
*(_OWORD *)(v15 + 56),
*(_QWORD *)(v15 + 72),
0LL);
}
| ggml_top_k:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOVSXD RBX,EDX
CMP qword ptr [RSI + 0x10],RBX
JL 0x00124f43
MOV R14,RDI
PUSH 0x1
POP RDX
CALL 0x0011d520
MOV RCX,qword ptr [RAX + 0x18]
MOV R8,qword ptr [RAX + 0x20]
MOV R9,qword ptr [RAX + 0x28]
MOVUPS XMM0,xmmword ptr [RAX + 0x38]
MOV RDX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x10],RDX
MOVUPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x18],0x0
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x0011ff80
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_00124f43:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14eda1]
MOV ESI,0x10b4
XOR EAX,EAX
CALL 0x0011f9b0
|
void ggml_top_k(int8 param_1,long param_2,int param_3)
{
long lVar1;
if ((long)param_3 <= *(long *)(param_2 + 0x10)) {
lVar1 = ggml_argsort(param_1,param_2,1);
ggml_view_4d(param_1,lVar1,(long)param_3,*(int8 *)(lVar1 + 0x18),
*(int8 *)(lVar1 + 0x20),*(int8 *)(lVar1 + 0x28),
*(int4 *)(lVar1 + 0x38),*(int4 *)(lVar1 + 0x40),
*(int8 *)(lVar1 + 0x48),0);
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x10b4,"GGML_ASSERT(%s) failed","a->ne[0] >= k");
}
| |
23,029 | ggml_top_k | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_top_k(
struct ggml_context * ctx,
struct ggml_tensor * a,
int k) {
GGML_ASSERT(a->ne[0] >= k);
struct ggml_tensor * result = ggml_argsort(ctx, a, GGML_SORT_ORDER_DESC);
result = ggml_view_4d(ctx, result,
k, result->ne[1], result->ne[2], result->ne[3],
result->nb[1], result->nb[2], result->nb[3],
0);
return result;
} | O3 | c | ggml_top_k:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movslq %edx, %r14
cmpq %r14, 0x10(%rsi)
jl 0x1e98d
movq %rdi, %rbx
movl $0x1, %edx
callq 0x16330
movq 0x28(%rax), %rdx
movq 0x48(%rax), %r15
leaq 0x10(%rsp), %rcx
movq %r14, (%rcx)
movups 0x18(%rax), %xmm0
movups %xmm0, 0x8(%rcx)
movq %rdx, 0x18(%rcx)
movups 0x38(%rax), %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
xorl %r8d, %r8d
callq 0x1c7ce
movaps (%rsp), %xmm0
movups %xmm0, 0x38(%rax)
movq %r15, 0x48(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2dc7f(%rip), %rdi # 0x4c613
leaq 0x2dcca(%rip), %rdx # 0x4c665
leaq 0x2e48f(%rip), %rcx # 0x4ce31
movl $0x10b4, %esi # imm = 0x10B4
xorl %eax, %eax
callq 0x17cd0
| ggml_top_k:
push r15
push r14
push rbx
sub rsp, 30h
movsxd r14, edx
cmp [rsi+10h], r14
jl short loc_1E98D
mov rbx, rdi
mov edx, 1
call _ggml_argsort
mov rdx, [rax+28h]
mov r15, [rax+48h]
lea rcx, [rsp+48h+var_38]
mov [rcx], r14
movups xmm0, xmmword ptr [rax+18h]
movups xmmword ptr [rcx+8], xmm0
mov [rcx+18h], rdx
movups xmm0, xmmword ptr [rax+38h]
movaps [rsp+48h+var_48], xmm0
mov rdi, rbx
mov rsi, rax
mov edx, 4
xor r8d, r8d
call ggml_view_impl
movaps xmm0, [rsp+48h+var_48]
movups xmmword ptr [rax+38h], xmm0
mov [rax+48h], r15
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_1E98D:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0K; "a->ne[0] >= k"
mov esi, 10B4h
xor eax, eax
call _ggml_abort
| long long ggml_top_k(long long a1, long long a2, int a3, long long a4, int a5, int a6, double a7)
{
long long v7; // r14
long long v8; // rax
long long v9; // rdx
long long v10; // r15
long long result; // rax
__int128 v12; // [rsp+0h] [rbp-48h]
long long v13; // [rsp+10h] [rbp-38h] BYREF
__int128 v14; // [rsp+18h] [rbp-30h]
long long v15; // [rsp+28h] [rbp-20h]
v7 = a3;
if ( *(_QWORD *)(a2 + 16) < a3 )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4276,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"a->ne[0] >= k",
a5,
a6);
v8 = ggml_argsort(a1, a2, 1, a7, a4, a5, a6);
v9 = *(_QWORD *)(v8 + 40);
v10 = *(_QWORD *)(v8 + 72);
v13 = v7;
v14 = *(_OWORD *)(v8 + 24);
v15 = v9;
v12 = *(_OWORD *)(v8 + 56);
result = ggml_view_impl(a1, (unsigned int *)v8, 4u, &v13, 0LL, *(double *)(v8 + 56));
*(_OWORD *)(result + 56) = v12;
*(_QWORD *)(result + 72) = v10;
return result;
}
| ggml_top_k:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOVSXD R14,EDX
CMP qword ptr [RSI + 0x10],R14
JL 0x0011e98d
MOV RBX,RDI
MOV EDX,0x1
CALL 0x00116330
MOV RDX,qword ptr [RAX + 0x28]
MOV R15,qword ptr [RAX + 0x48]
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],R14
MOVUPS XMM0,xmmword ptr [RAX + 0x18]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
MOV qword ptr [RCX + 0x18],RDX
MOVUPS XMM0,xmmword ptr [RAX + 0x38]
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,RAX
MOV EDX,0x4
XOR R8D,R8D
CALL 0x0011c7ce
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV qword ptr [RAX + 0x48],R15
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_0011e98d:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14ce31]
MOV ESI,0x10b4
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_top_k(int8 param_1,long param_2,int param_3)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
long lVar4;
long local_38;
int8 local_30;
int8 uStack_28;
int8 local_20;
if ((long)param_3 <= *(long *)(param_2 + 0x10)) {
lVar4 = ggml_argsort(param_1,param_2,1);
local_20 = *(int8 *)(lVar4 + 0x28);
uVar1 = *(int8 *)(lVar4 + 0x48);
local_30 = *(int8 *)(lVar4 + 0x18);
uStack_28 = *(int8 *)(lVar4 + 0x20);
uVar2 = *(int8 *)(lVar4 + 0x38);
uVar3 = *(int8 *)(lVar4 + 0x40);
local_38 = (long)param_3;
lVar4 = ggml_view_impl(param_1,lVar4,4,&local_38,0);
*(int8 *)(lVar4 + 0x38) = uVar2;
*(int8 *)(lVar4 + 0x40) = uVar3;
*(int8 *)(lVar4 + 0x48) = uVar1;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x10b4,"GGML_ASSERT(%s) failed","a->ne[0] >= k");
}
| |
23,030 | mysql_test_handler_read(Prepared_statement*, TABLE_LIST*) | eloqsql/sql/sql_prepare.cc | static int mysql_test_handler_read(Prepared_statement *stmt,
TABLE_LIST *tables)
{
THD *thd= stmt->thd;
LEX *lex= stmt->lex;
SQL_HANDLER *ha_table;
DBUG_ENTER("mysql_test_handler_read");
lex->first_select_lex()->context.resolve_in_select_list= TRUE;
/*
We don't have to test for permissions as this is already done during
HANDLER OPEN
*/
if (!(ha_table= mysql_ha_read_prepare(thd, tables, lex->ha_read_mode,
lex->ident.str,
lex->insert_list,
lex->ha_rkey_mode,
lex->first_select_lex()->where)))
DBUG_RETURN(1);
if (!stmt->is_sql_prepare())
{
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
DBUG_RETURN(1);
if (send_prep_stmt(stmt, ha_table->fields.elements) ||
lex->result->send_result_set_metadata(ha_table->fields, Protocol::SEND_EOF) ||
thd->protocol->flush())
DBUG_RETURN(1);
DBUG_RETURN(2);
}
DBUG_RETURN(0);
} | O0 | cpp | mysql_test_handler_read(Prepared_statement*, TABLE_LIST*):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4c17d0
movb $0x1, 0x88(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movl 0x17f0(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x28(%rbp), %rax
movq 0xdc8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq 0xf68(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movl 0x17f4(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4c17d0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl -0x6c(%rbp), %edx
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
movl -0x58(%rbp), %r9d
movq 0xc0(%rax), %rax
movq %rax, (%rsp)
callq 0x575750
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x5eb13e
jmp 0x5eb132
movl $0x1, -0x4(%rbp)
jmp 0x5eb284
movq -0x10(%rbp), %rdi
callq 0x5ec5a0
testb $0x1, %al
jne 0x5eb27b
movq -0x28(%rbp), %rax
movq 0xdb0(%rax), %rax
movb $0x0, -0x41(%rbp)
cmpq $0x0, %rax
jne 0x5eb218
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x98(%rbp)
movl $0x28, %edi
callq 0x4a34d0
movq %rax, %rcx
movq %rcx, -0x90(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x88(%rbp)
je 0x5eb1cf
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rdi, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movb $0x1, -0x41(%rbp)
movq -0x20(%rbp), %rsi
callq 0x5d2be0
jmp 0x5eb1bf
movq -0x90(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x5eb1cf
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0xdb0(%rcx)
cmpq $0x0, %rax
jne 0x5eb218
jmp 0x5eb1e9
movl $0x1, -0x4(%rbp)
jmp 0x5eb284
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x5eb209
jmp 0x5eb216
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4a3510
jmp 0x5eb290
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x5eb4c0
testb $0x1, %al
jne 0x5eb265
movq -0x28(%rbp), %rax
movq 0xdb0(%rax), %rdi
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
movq (%rdi), %rax
movl $0x2, %edx
callq *0x38(%rax)
testb $0x1, %al
jne 0x5eb265
movq -0x20(%rbp), %rax
movq 0x590(%rax), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
testb $0x1, %al
jne 0x5eb265
jmp 0x5eb270
jmp 0x5eb267
movl $0x1, -0x4(%rbp)
jmp 0x5eb284
jmp 0x5eb272
movl $0x2, -0x4(%rbp)
jmp 0x5eb284
jmp 0x5eb27d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x433ff0
nopl (%rax)
| _ZL23mysql_test_handler_readP18Prepared_statementP10TABLE_LIST:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+0C0h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]; this
call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void)
mov byte ptr [rax+88h], 1
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
mov rax, [rbp+var_18]
mov [rbp+var_78], rax
mov rax, [rbp+var_28]
mov eax, [rax+17F0h]
mov [rbp+var_6C], eax
mov rax, [rbp+var_28]
mov rax, [rax+0DC8h]
mov [rbp+var_68], rax
mov rax, [rbp+var_28]
mov rax, [rax+0F68h]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
mov eax, [rax+17F4h]
mov [rbp+var_58], eax
mov rdi, [rbp+var_28]; this
call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void)
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_78]
mov edx, [rbp+var_6C]
mov rcx, [rbp+var_68]
mov r8, [rbp+var_60]
mov r9d, [rbp+var_58]
mov rax, [rax+0C0h]
mov [rsp+0A0h+var_A0], rax
call _Z21mysql_ha_read_prepareP3THDP10TABLE_LIST18enum_ha_read_modesPKcP4ListI4ItemE16ha_rkey_functionPS7_; mysql_ha_read_prepare(THD *,TABLE_LIST *,enum_ha_read_modes,char const*,List<Item> *,ha_rkey_function,Item*)
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_5EB13E
jmp short $+2
loc_5EB132:
mov [rbp+var_4], 1
jmp loc_5EB284
loc_5EB13E:
mov rdi, [rbp+var_10]; this
call _ZNK18Prepared_statement14is_sql_prepareEv; Prepared_statement::is_sql_prepare(void)
test al, 1
jnz loc_5EB27B
mov rax, [rbp+var_28]
mov rax, [rax+0DB0h]
mov [rbp+var_41], 0
cmp rax, 0
jnz loc_5EB218
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
mov [rbp+var_98], rsi
mov edi, 28h ; '('
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_90], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_88], rax
jz short loc_5EB1CF
mov rdi, [rbp+var_90]; this
mov rax, [rbp+var_98]
mov [rbp+var_38], rdi
mov [rbp+var_40], rax
mov [rbp+var_41], 1
mov rsi, [rbp+var_20]; THD *
call _ZN11select_sendC2EP3THD; select_send::select_send(THD *)
jmp short $+2
loc_5EB1BF:
mov rax, [rbp+var_90]
mov [rbp+var_88], rax
jmp short $+2
loc_5EB1CF:
mov rax, [rbp+var_88]
mov rcx, [rbp+var_28]
mov [rcx+0DB0h], rax
cmp rax, 0
jnz short loc_5EB218
jmp short $+2
loc_5EB1E9:
mov [rbp+var_4], 1
jmp loc_5EB284
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
test [rbp+var_41], 1
jnz short loc_5EB209
jmp short loc_5EB216
loc_5EB209:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_5EB216:
jmp short loc_5EB290
loc_5EB218:
mov rdi, [rbp+var_10]; Prepared_statement *
mov rax, [rbp+var_30]
mov esi, [rax+18h]; unsigned int
call _ZL14send_prep_stmtP18Prepared_statementj; send_prep_stmt(Prepared_statement *,uint)
test al, 1
jnz short loc_5EB265
mov rax, [rbp+var_28]
mov rdi, [rax+0DB0h]
mov rsi, [rbp+var_30]
add rsi, 8
mov rax, [rdi]
mov edx, 2
call qword ptr [rax+38h]
test al, 1
jnz short loc_5EB265
mov rax, [rbp+var_20]
mov rdi, [rax+590h]
mov rax, [rdi]
call qword ptr [rax+60h]
test al, 1
jnz short loc_5EB265
jmp short loc_5EB270
loc_5EB265:
jmp short $+2
loc_5EB267:
mov [rbp+var_4], 1
jmp short loc_5EB284
loc_5EB270:
jmp short $+2
loc_5EB272:
mov [rbp+var_4], 2
jmp short loc_5EB284
loc_5EB27B:
jmp short $+2
loc_5EB27D:
mov [rbp+var_4], 0
loc_5EB284:
mov eax, [rbp+var_4]
add rsp, 0A0h
pop rbp
retn
loc_5EB290:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long mysql_test_handler_read(Prepared_statement *a1, TABLE_LIST *a2)
{
long long select_lex; // rax
select_send *v4; // [rsp+10h] [rbp-90h]
select_send *v5; // [rsp+18h] [rbp-88h]
unsigned int v6; // [rsp+34h] [rbp-6Ch]
long long v7; // [rsp+38h] [rbp-68h]
base_list *v8; // [rsp+40h] [rbp-60h]
int v9; // [rsp+48h] [rbp-58h]
long long *prepare; // [rsp+70h] [rbp-30h]
LEX *v11; // [rsp+78h] [rbp-28h]
THD *v12; // [rsp+80h] [rbp-20h]
v12 = (THD *)*((_QWORD *)a1 + 24);
v11 = (LEX *)*((_QWORD *)a1 + 11);
*(_BYTE *)(LEX::first_select_lex(v11) + 136) = 1;
v6 = *((_DWORD *)v11 + 1532);
v7 = *((_QWORD *)v11 + 441);
v8 = (base_list *)*((_QWORD *)v11 + 493);
v9 = *((_DWORD *)v11 + 1533);
select_lex = LEX::first_select_lex(v11);
prepare = mysql_ha_read_prepare(v12, (long long)a2, v6, v7, v8, v9, *(Item **)(select_lex + 192));
if ( prepare )
{
if ( (Prepared_statement::is_sql_prepare(a1) & 1) != 0 )
{
return 0;
}
else
{
if ( *((_QWORD *)v11 + 438) )
goto LABEL_11;
v4 = (select_send *)Sql_alloc::operator new(40LL, *((_QWORD *)a1 + 5));
v5 = 0LL;
if ( v4 )
{
select_send::select_send(v4, v12);
v5 = v4;
}
*((_QWORD *)v11 + 438) = v5;
if ( v5 )
{
LABEL_11:
if ( (send_prep_stmt(a1, *((_DWORD *)prepare + 6)) & 1) != 0
|| ((*(long long ( **)(_QWORD, long long *, long long))(**((_QWORD **)v11 + 438) + 56LL))(
*((_QWORD *)v11 + 438),
prepare + 1,
2LL) & 1) != 0
|| ((*(long long ( **)(_QWORD))(**((_QWORD **)v12 + 178) + 96LL))(*((_QWORD *)v12 + 178)) & 1) != 0 )
{
return 1;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
}
else
{
return 1;
}
}
| clear_warning_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x005c2770
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00671d50
ADD RSP,0x10
POP RBP
RET
|
/* Diagnostics_area::clear_warning_info(unsigned long long) */
void __thiscall Diagnostics_area::clear_warning_info(Diagnostics_area *this,ulonglong param_1)
{
Warning_info *this_00;
this_00 = (Warning_info *)get_warning_info(this);
Warning_info::clear(this_00,param_1);
return;
}
| |
23,031 | ma_remove_not_visible_states_with_lock | eloqsql/storage/maria/ma_state.c | void _ma_remove_not_visible_states_with_lock(MARIA_SHARE *share,
my_bool all)
{
my_bool is_lock_trman;
if ((is_lock_trman= trman_is_inited()))
trnman_lock();
mysql_mutex_lock(&share->intern_lock);
share->state_history= _ma_remove_not_visible_states(share->state_history,
all, 1);
mysql_mutex_unlock(&share->intern_lock);
if (is_lock_trman)
trnman_unlock();
} | O0 | c | ma_remove_not_visible_states_with_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movb $0x0, %al
callq 0x4daa0
movb %al, -0xa(%rbp)
cmpb $0x0, %al
je 0x366d7
movb $0x0, %al
callq 0x4da60
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x11ae74(%rip), %rsi # 0x15155d
movl $0xe1, %edx
callq 0x364d0
movq -0x8(%rbp), %rax
movq 0x450(%rax), %rdi
movl $0x1, %edx
movsbl -0x9(%rbp), %esi
callq 0x365a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x450(%rax)
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x36540
cmpb $0x0, -0xa(%rbp)
je 0x36737
movb $0x0, %al
callq 0x4da80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_remove_not_visible_states_with_lock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov al, 0
call trman_is_inited
mov [rbp+var_A], al
cmp al, 0
jz short loc_366D7
mov al, 0
call trnman_lock
loc_366D7:
mov rdi, [rbp+var_8]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0E1h
call inline_mysql_mutex_lock_3
mov rax, [rbp+var_8]
mov rdi, [rax+450h]
mov edx, 1
movsx esi, [rbp+var_9]
call _ma_remove_not_visible_states
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+450h], rcx
mov rdi, [rbp+var_8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_3
cmp [rbp+var_A], 0
jz short loc_36737
mov al, 0
call trnman_unlock
loc_36737:
add rsp, 10h
pop rbp
retn
| long long ma_remove_not_visible_states_with_lock(long long a1, char a2)
{
long long result; // rax
char is_inited; // [rsp+6h] [rbp-Ah]
is_inited = trman_is_inited();
if ( is_inited )
trnman_lock();
inline_mysql_mutex_lock_3(
a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0xE1u);
*(_QWORD *)(a1 + 1104) = ma_remove_not_visible_states(*(_QWORD **)(a1 + 1104), a2, 1);
result = inline_mysql_mutex_unlock_3(a1 + 2288);
if ( is_inited )
return trnman_unlock();
return result;
}
| _ma_remove_not_visible_states_with_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV AL,0x0
CALL 0x0014daa0
MOV byte ptr [RBP + -0xa],AL
CMP AL,0x0
JZ 0x001366d7
MOV AL,0x0
CALL 0x0014da60
LAB_001366d7:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
LEA RSI,[0x25155d]
MOV EDX,0xe1
CALL 0x001364d0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x450]
MOV EDX,0x1
MOVSX ESI,byte ptr [RBP + -0x9]
CALL 0x001365a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x450],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x00136540
CMP byte ptr [RBP + -0xa],0x0
JZ 0x00136737
MOV AL,0x0
CALL 0x0014da80
LAB_00136737:
ADD RSP,0x10
POP RBP
RET
|
void _ma_remove_not_visible_states_with_lock(long param_1,char param_2)
{
char cVar1;
int8 uVar2;
cVar1 = trman_is_inited();
if (cVar1 != '\0') {
trnman_lock();
}
inline_mysql_mutex_lock
(param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0xe1);
uVar2 = _ma_remove_not_visible_states(*(int8 *)(param_1 + 0x450),(int)param_2,1);
*(int8 *)(param_1 + 0x450) = uVar2;
inline_mysql_mutex_unlock(param_1 + 0x8f0);
if (cVar1 != '\0') {
trnman_unlock();
}
return;
}
| |
23,032 | ma_enlarge_root | eloqsql/storage/maria/ma_write.c | my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root)
{
uint t_length, nod_flag;
MARIA_KEY_PARAM s_temp;
MARIA_SHARE *share= info->s;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool res= 0;
DBUG_ENTER("_ma_enlarge_root");
page.info= info;
page.keyinfo= keyinfo;
page.buff= info->buff;
page.flag= 0;
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
/* Store pointer to prev page if nod */
_ma_kpointer(info, page.buff + share->keypage_header, *root);
t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
page.size= share->keypage_header + t_length + nod_flag;
bzero(page.buff, share->keypage_header);
_ma_store_keynr(share, page.buff, keyinfo->key_nr);
if (nod_flag)
page.flag|= KEYPAGE_FLAG_ISNOD;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
page.flag|= KEYPAGE_FLAG_HAS_TRANSID;
(*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header +
nod_flag, &s_temp);
/* Mark that info->buff was used */
info->keyread_buff_used= info->page_changed= 1;
if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(1);
*root= page.pos;
page_store_info(share, &page);
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(page.buff + page.size, share->block_size - page.size);
if (share->now_transactional && _ma_log_new(&page, 1))
res= 1;
if (_ma_write_keypage(&page, page_link->write_lock,
PAGECACHE_PRIORITY_HIGH))
res= 1;
DBUG_RETURN(res);
} | O0 | c | ma_enlarge_root:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
movb $0x0, -0xe1(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0xb4(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x68037
movq -0x80(%rbp), %rax
movl 0x3e4(%rax), %eax
movl %eax, -0xec(%rbp)
jmp 0x68041
xorl %eax, %eax
movl %eax, -0xec(%rbp)
jmp 0x68041
movl -0xec(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x958c0
movq -0xa8(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x28(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x78(%rbp), %r9
movq %r8, %rdx
movq %r8, %rcx
callq *%rax
movl %eax, -0x24(%rbp)
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0xa8(%rbp), %rax
movb 0xa5(%rax), %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
cmpl $0x0, -0x28(%rbp)
je 0x68108
movl -0xb4(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x180000, %eax # imm = 0x180000
cmpl $0x0, %eax
je 0x68128
movl -0xb4(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xb4(%rbp)
movq -0xa8(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0xa8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
leaq -0x78(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9a140
movq %rax, -0xc8(%rbp)
cmpq $-0x1, %rax
jne 0x681a0
jmp 0x68197
movb $0x1, -0x1(%rbp)
jmp 0x682a7
movq -0xc8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xb4(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0xc0(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x1(%rax,%rcx)
movl -0xe8(%rbp), %eax
shrl $0x8, %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x2(%rax,%rcx)
movq -0xd0(%rbp), %rdi
movl -0xc0(%rbp), %eax
addq %rax, %rdi
movq -0x80(%rbp), %rax
movl 0x7bc(%rax), %eax
subl -0xc0(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0x80(%rbp), %rax
movsbl 0x7e7(%rax), %eax
cmpl $0x0, %eax
je 0x68276
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x682c0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x68276
movb $0x1, -0xe1(%rbp)
movq -0xa0(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xe0(%rbp), %rdi
movl $0x6, %edx
callq 0x99b70
cmpb $0x0, %al
je 0x6829c
movb $0x1, -0xe1(%rbp)
jmp 0x6829e
movb -0xe1(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_enlarge_root:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_80], rax
lea rax, [rbp+var_98]
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_A8], rax
mov [rbp+var_E1], 0
mov rax, [rbp+var_10]
mov [rbp+var_E0], rax
mov rax, [rbp+var_A8]
mov [rbp+var_D8], rax
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov [rbp+var_D0], rax
mov [rbp+var_B4], 0
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_68037
mov rax, [rbp+var_80]
mov eax, [rax+3E4h]
mov [rbp+var_EC], eax
jmp short loc_68041
loc_68037:
xor eax, eax
mov [rbp+var_EC], eax
jmp short $+2
loc_68041:
mov eax, [rbp+var_EC]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add rsi, rax
mov rax, [rbp+var_20]
mov rdx, [rax]
call _ma_kpointer
mov rax, [rbp+var_A8]
mov rax, [rax+0F0h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_28]
xor ecx, ecx
mov r8d, ecx
lea r9, [rbp+var_78]
mov rdx, r8
mov rcx, r8
call rax
mov [rbp+var_24], eax
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add eax, [rbp+var_24]
add eax, [rbp+var_28]
mov [rbp+var_C0], eax
mov rdi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_A8]
mov dl, [rax+0A5h]
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 1
sub ecx, 1
sub ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
cmp [rbp+var_28], 0
jz short loc_68108
mov eax, [rbp+var_B4]
or eax, 1
mov [rbp+var_B4], eax
loc_68108:
mov rax, [rbp+var_18]
mov eax, [rax+18h]
and eax, 180000h
cmp eax, 0
jz short loc_68128
mov eax, [rbp+var_B4]
or eax, 2
mov [rbp+var_B4], eax
loc_68128:
mov rax, [rbp+var_A8]
mov rax, [rax+0F8h]
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
add rsi, rcx
mov ecx, [rbp+var_28]
add rsi, rcx
lea rdx, [rbp+var_78]
call rax
mov rax, [rbp+var_10]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
mov rdi, [rbp+var_10]
mov esi, 6
lea rdx, [rbp+var_A0]
call _ma_new
mov [rbp+var_C8], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_681A0
jmp short $+2
loc_68197:
mov [rbp+var_1], 1
jmp loc_682A7
loc_681A0:
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_20]
mov [rax], rcx
mov eax, [rbp+var_B4]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_C0]
mov [rbp+var_E8], eax
mov eax, [rbp+var_E8]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-1], dl
mov eax, [rbp+var_E8]
shr eax, 8
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-2], dl
mov rdi, [rbp+var_D0]
mov eax, [rbp+var_C0]
add rdi, rax
mov rax, [rbp+var_80]
mov eax, [rax+7BCh]
sub eax, [rbp+var_C0]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_80]
movsx eax, byte ptr [rax+7E7h]
cmp eax, 0
jz short loc_68276
lea rdi, [rbp+var_E0]
mov esi, 1
call _ma_log_new
movsx eax, al
cmp eax, 0
jz short loc_68276
mov [rbp+var_E1], 1
loc_68276:
mov rax, [rbp+var_A0]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_E0]
mov edx, 6
call _ma_write_keypage
cmp al, 0
jz short loc_6829C
mov [rbp+var_E1], 1
loc_6829C:
jmp short $+2
loc_6829E:
mov al, [rbp+var_E1]
mov [rbp+var_1], al
loc_682A7:
mov al, [rbp+var_1]
add rsp, 0F0h
pop rbp
retn
| char ma_enlarge_root(_QWORD *a1, long long a2, long long *a3)
{
unsigned int v4; // [rsp+4h] [rbp-ECh]
char v5; // [rsp+9h] [rbp-E7h]
char v6; // [rsp+Fh] [rbp-E1h]
_QWORD v7[2]; // [rsp+10h] [rbp-E0h] BYREF
long long v8; // [rsp+20h] [rbp-D0h]
long long v9; // [rsp+28h] [rbp-C8h]
unsigned int v10; // [rsp+30h] [rbp-C0h]
int v11; // [rsp+3Ch] [rbp-B4h]
long long v12; // [rsp+48h] [rbp-A8h]
char *v13; // [rsp+50h] [rbp-A0h] BYREF
char v14; // [rsp+58h] [rbp-98h] BYREF
long long v15; // [rsp+70h] [rbp-80h]
_BYTE v16[80]; // [rsp+78h] [rbp-78h] BYREF
unsigned int v17; // [rsp+C8h] [rbp-28h]
int v18; // [rsp+CCh] [rbp-24h]
long long *v19; // [rsp+D0h] [rbp-20h]
long long v20; // [rsp+D8h] [rbp-18h]
_QWORD *v21; // [rsp+E0h] [rbp-10h]
v21 = a1;
v20 = a2;
v19 = a3;
v15 = *a1;
v13 = &v14;
v12 = *(_QWORD *)(a2 + 8);
v6 = 0;
v7[0] = a1;
v7[1] = v12;
v8 = a1[111];
v11 = 0;
if ( *a3 == -1 )
v4 = 0;
else
v4 = *(_DWORD *)(v15 + 996);
v17 = v4;
ma_kpointer(v21, *(unsigned int *)(v15 + 1860) + v8, *v19);
v18 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))(v12 + 240))(
v20,
v17,
0LL,
0LL,
0LL,
v16);
v10 = v17 + v18 + *(_DWORD *)(v15 + 1860);
memset(v8, 0LL, *(unsigned int *)(v15 + 1860));
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 4)) = *(_BYTE *)(v12 + 165);
if ( v17 )
v11 |= 1u;
if ( (*(_DWORD *)(v20 + 24) & 0x180000) != 0 )
v11 |= 2u;
(*(void ( **)(long long, long long, _BYTE *))(v12 + 248))(v12, v17 + *(unsigned int *)(v15 + 1860) + v8, v16);
*((_BYTE *)v21 + 1668) = 1;
*((_BYTE *)v21 + 1669) = 1;
v9 = ma_new(v21, 6LL, &v13);
if ( v9 == -1 )
return 1;
*v19 = v9;
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 3)) = v11;
v5 = BYTE1(v10);
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 1) = v10;
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 2) = v5;
memset(v10 + v8, 0LL, *(_DWORD *)(v15 + 1980) - v10);
if ( *(_BYTE *)(v15 + 2023) && (unsigned __int8)ma_log_new(v7, 1LL) )
v6 = 1;
if ( (unsigned __int8)ma_write_keypage(v7, *((unsigned int *)v13 + 3), 6LL) )
return 1;
return v6;
}
| _ma_enlarge_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
LEA RAX,[RBP + -0x98]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa8],RAX
MOV byte ptr [RBP + -0xe1],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV qword ptr [RBP + -0xd0],RAX
MOV dword ptr [RBP + -0xb4],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],-0x1
JZ 0x00168037
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x3e4]
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00168041
LAB_00168037:
XOR EAX,EAX
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00168041
LAB_00168041:
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x001958c0
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x28]
XOR ECX,ECX
MOV R8D,ECX
LEA R9,[RBP + -0x78]
MOV RDX,R8
MOV RCX,R8
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD EAX,dword ptr [RBP + -0x24]
ADD EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0xc0],EAX
MOV RDI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0xa8]
MOV DL,byte ptr [RAX + 0xa5]
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x1
SUB ECX,0x1
SUB ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00168108
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x1
MOV dword ptr [RBP + -0xb4],EAX
LAB_00168108:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x180000
CMP EAX,0x0
JZ 0x00168128
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x2
MOV dword ptr [RBP + -0xb4],EAX
LAB_00168128:
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
ADD RSI,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
LEA RDX,[RBP + -0x78]
CALL RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x6
LEA RDX,[RBP + -0xa0]
CALL 0x0019a140
MOV qword ptr [RBP + -0xc8],RAX
CMP RAX,-0x1
JNZ 0x001681a0
JMP 0x00168197
LAB_00168197:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001682a7
LAB_001681a0:
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0xb4]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0xc0]
MOV dword ptr [RBP + -0xe8],EAX
MOV EAX,dword ptr [RBP + -0xe8]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],DL
MOV EAX,dword ptr [RBP + -0xe8]
SHR EAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x2],DL
MOV RDI,qword ptr [RBP + -0xd0]
MOV EAX,dword ptr [RBP + -0xc0]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x7bc]
SUB EAX,dword ptr [RBP + -0xc0]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0x80]
MOVSX EAX,byte ptr [RAX + 0x7e7]
CMP EAX,0x0
JZ 0x00168276
LEA RDI,[RBP + -0xe0]
MOV ESI,0x1
CALL 0x001682c0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00168276
MOV byte ptr [RBP + -0xe1],0x1
LAB_00168276:
MOV RAX,qword ptr [RBP + -0xa0]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xe0]
MOV EDX,0x6
CALL 0x00199b70
CMP AL,0x0
JZ 0x0016829c
MOV byte ptr [RBP + -0xe1],0x1
LAB_0016829c:
JMP 0x0016829e
LAB_0016829e:
MOV AL,byte ptr [RBP + -0xe1]
MOV byte ptr [RBP + -0x1],AL
LAB_001682a7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xf0
POP RBP
RET
|
int8 _ma_enlarge_root(long *param_1,long param_2,long *param_3)
{
char cVar1;
int8 uVar2;
int7 uVar3;
uint local_f4;
int1 local_e9;
long *local_e8;
long local_e0;
void *local_d8;
long local_d0;
uint local_c8;
uint local_bc;
long local_b0;
int1 *local_a8;
int1 local_a0 [24];
long local_88;
int1 local_80 [80];
uint local_30;
int local_2c;
long *local_28;
long local_20;
long *local_18;
int1 local_9;
local_88 = *param_1;
local_a8 = local_a0;
local_e0 = *(long *)(param_2 + 8);
local_e9 = 0;
local_d8 = (void *)param_1[0x6f];
local_bc = 0;
if (*param_3 == -1) {
local_f4 = 0;
}
else {
local_f4 = *(uint *)(local_88 + 0x3e4);
}
local_30 = local_f4;
local_e8 = param_1;
local_b0 = local_e0;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
_ma_kpointer(param_1,(long)local_d8 + (ulong)*(uint *)(local_88 + 0x744),*param_3);
local_2c = (**(code **)(local_b0 + 0xf0))(local_20,local_30,0,0,0,local_80);
local_c8 = *(int *)(local_88 + 0x744) + local_2c + local_30;
memset(local_d8,0,(ulong)*(uint *)(local_88 + 0x744));
*(int1 *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 4)) =
*(int1 *)(local_b0 + 0xa5);
if (local_30 != 0) {
local_bc = local_bc | 1;
}
if ((*(uint *)(local_20 + 0x18) & 0x180000) != 0) {
local_bc = local_bc | 2;
}
(**(code **)(local_b0 + 0xf8))
(local_b0,(long)local_d8 + (ulong)local_30 + (ulong)*(uint *)(local_88 + 0x744),local_80
);
*(int1 *)((long)local_18 + 0x684) = 1;
*(int1 *)((long)local_18 + 0x685) = 1;
local_d0 = _ma_new(local_18,6,&local_a8);
if (local_d0 == -1) {
local_9 = 1;
uVar3 = 0xffffffffffffff;
}
else {
*local_28 = local_d0;
*(char *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 3)) = (char)local_bc;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 1)) = (char)local_c8;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 2)) = (char)(local_c8 >> 8);
memset((void *)((long)local_d8 + (ulong)local_c8),0,
(ulong)(*(int *)(local_88 + 0x7bc) - local_c8));
if (*(char *)(local_88 + 0x7e7) != '\0') {
cVar1 = _ma_log_new(&local_e8,1);
if (cVar1 != '\0') {
local_e9 = 1;
}
}
uVar2 = _ma_write_keypage(&local_e8,*(int4 *)(local_a8 + 0xc),6);
if ((char)uVar2 != '\0') {
local_e9 = 1;
}
uVar3 = (int7)((ulong)uVar2 >> 8);
local_9 = local_e9;
}
return CONCAT71(uVar3,local_9);
}
| |
23,033 | my_caseup_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O0 | c | my_caseup_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x63c2a
jmp 0x63c2c
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x63c5c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x638c0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x63c65
jmp 0x63cb8
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x64a30
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x638f0
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x63c91
jmp 0x63cb8
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x63c2c
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_caseup_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_63C2A:
jmp short $+2
loc_63C2C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_63C5C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_63C5C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_63C65
jmp short loc_63CB8
loc_63C65:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf8mb3
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_63C91
jmp short loc_63CB8
loc_63C91:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_63C2C
loc_63CB8:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * my_caseup_utf8mb3(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_toupper_utf8mb3(v8, v14);
v12 = my_uni_utf8mb3(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
| my_caseup_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00163c2a
LAB_00163c2a:
JMP 0x00163c2c
LAB_00163c2c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x00163c5c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x001638c0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_00163c5c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x00163c65
JMP 0x00163cb8
LAB_00163c65:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x00164a30
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x001638f0
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x00163c91
JMP 0x00163cb8
LAB_00163c91:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00163c2c
LAB_00163cb8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_38);
iVar3 = my_uni_utf8mb3(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
| |
23,034 | getopt_ll_limit_value | eloqsql/mysys/my_getopt.c | longlong getopt_ll_limit_value(longlong num, const struct my_option *optp,
my_bool *fix)
{
longlong old= num;
my_bool adjusted= FALSE;
char buf1[255], buf2[255];
ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L);
DBUG_ENTER("getopt_ll_limit_value");
if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) &&
optp->max_value) /* if max value is not set -> no upper limit */
{
num= (ulonglong) optp->max_value;
adjusted= TRUE;
}
switch ((optp->var_type & GET_TYPE_MASK)) {
case GET_INT:
if (num > (longlong) INT_MAX)
{
num= ((longlong) INT_MAX);
adjusted= TRUE;
}
break;
case GET_LONG:
#if SIZEOF_LONG < SIZEOF_LONG_LONG
if (num > (longlong) LONG_MAX)
{
num= ((longlong) LONG_MAX);
adjusted= TRUE;
}
#endif
break;
default:
DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL);
break;
}
num= (num / block_size);
num= (longlong) (num * block_size);
if (num < optp->min_value)
{
num= optp->min_value;
if (old < optp->min_value)
adjusted= TRUE;
}
if (fix)
*fix= old != num;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': signed value %s adjusted to %s",
optp->name, llstr(old, buf1), llstr(num, buf2));
DBUG_RETURN(num);
} | O3 | c | getopt_ll_limit_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdx, %rcx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq 0x60(%rsi), %r10
cmpq $0x1, %r10
adcq $0x0, %r10
testq %rdi, %rdi
jle 0x2e7c0
movq 0x50(%rsi), %rax
cmpq %rdi, %rax
setae %dl
testq %rax, %rax
sete %r9b
orb %dl, %r9b
cmovneq %rdi, %rax
jmp 0x2e7c6
movb $0x1, %r9b
movq %rdi, %rax
movl 0x30(%rsi), %edx
andl $0x3f, %edx
cmpl $0x3, %edx
setne %dl
movl $0x80000000, %r8d # imm = 0x80000000
cmpq %r8, %rax
setl %r11b
orb %dl, %r11b
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
cmovneq %rax, %r8
movq %r8, %rax
xorl %edx, %edx
divq %r10
subq %rdx, %r8
movq 0x48(%rsi), %rax
cmpq %rax, %r8
movq %rax, %rbx
cmovgq %r8, %rbx
testq %rcx, %rcx
je 0x2e812
cmpq %rdi, %rbx
setne (%rcx)
jmp 0x2e86d
cmpq %rax, %r8
setge %cl
cmpq %rdi, %rax
setle %al
orb %cl, %al
andb %r11b, %al
testb %r9b, %al
jne 0x2e86d
leaq 0x2cbad9(%rip), %rax # 0x2fa308
movq (%rax), %r12
movq (%rsi), %r14
leaq -0x130(%rbp), %rsi
callq 0x618bc
movq %rax, %r15
leaq -0x230(%rbp), %rsi
movq %rbx, %rdi
callq 0x618bc
leaq 0x36094(%rip), %rsi # 0x648ee
movl $0x1, %edi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq *%r12
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x2e88f
movq %rbx, %rax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
| getopt_ll_limit_value:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 210h
mov rcx, rdx
mov rax, fs:28h
mov [rbp+var_28], rax
mov r10, [rsi+60h]
cmp r10, 1
adc r10, 0
test rdi, rdi
jle short loc_2E7C0
mov rax, [rsi+50h]
cmp rax, rdi
setnb dl
test rax, rax
setz r9b
or r9b, dl
cmovnz rax, rdi
jmp short loc_2E7C6
loc_2E7C0:
mov r9b, 1
mov rax, rdi
loc_2E7C6:
mov edx, [rsi+30h]
and edx, 3Fh
cmp edx, 3
setnz dl
mov r8d, 80000000h
cmp rax, r8
setl r11b
or r11b, dl
mov r8d, 7FFFFFFFh
cmovnz r8, rax
mov rax, r8
xor edx, edx
div r10
sub r8, rdx
mov rax, [rsi+48h]
cmp r8, rax
mov rbx, rax
cmovg rbx, r8
test rcx, rcx
jz short loc_2E812
cmp rbx, rdi
setnz byte ptr [rcx]
jmp short loc_2E86D
loc_2E812:
cmp r8, rax
setnl cl
cmp rax, rdi
setle al
or al, cl
and al, r11b
test al, r9b
jnz short loc_2E86D
lea rax, my_getopt_error_reporter
mov r12, [rax]
mov r14, [rsi]
lea rsi, [rbp+var_130]
call llstr
mov r15, rax
lea rsi, [rbp+var_230]
mov rdi, rbx
call llstr
lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"...
mov edi, 1
mov rdx, r14
mov rcx, r15
mov r8, rax
xor eax, eax
call r12
loc_2E86D:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_2E88F
mov rax, rbx
add rsp, 210h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2E88F:
call ___stack_chk_fail
| long long getopt_ll_limit_value(long long a1, long long a2, bool *a3)
{
long long v3; // rax
bool v4; // r9
bool v5; // r11
unsigned long long v6; // r8
signed long long v7; // r8
long long v8; // rax
long long v9; // rbx
long long (*v10)(int, const char *, ...); // r12
const char *v11; // r14
const char *v12; // r15
const char *v13; // rax
char v15[256]; // [rsp+0h] [rbp-230h] BYREF
char v16[264]; // [rsp+100h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+208h] [rbp-28h]
v17 = __readfsqword(0x28u);
if ( a1 <= 0 )
{
v4 = 1;
v3 = a1;
}
else
{
v3 = *(_QWORD *)(a2 + 80);
v4 = v3 >= (unsigned long long)a1 || v3 == 0;
if ( v4 )
v3 = a1;
}
v5 = (*(_DWORD *)(a2 + 48) & 0x3F) != 3 || v3 < 0x80000000LL;
v6 = 0x7FFFFFFFLL;
if ( v5 )
v6 = v3;
v7 = v6 - v6 % ((unsigned long long)(*(_QWORD *)(a2 + 96) == 0LL) + *(_QWORD *)(a2 + 96));
v8 = *(_QWORD *)(a2 + 72);
v9 = v8;
if ( v7 > v8 )
v9 = v7;
if ( a3 )
{
*a3 = v9 != a1;
}
else if ( !v4 || !v5 || v7 < v8 && v8 > a1 )
{
v10 = my_getopt_error_reporter;
v11 = *(const char **)a2;
v12 = (const char *)llstr(a1, v16);
v13 = (const char *)llstr(v9, v15);
v10(1, "option '%s': signed value %s adjusted to %s", v11, v12, v13);
}
return v9;
}
| getopt_ll_limit_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV RCX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R10,qword ptr [RSI + 0x60]
CMP R10,0x1
ADC R10,0x0
TEST RDI,RDI
JLE 0x0012e7c0
MOV RAX,qword ptr [RSI + 0x50]
CMP RAX,RDI
SETNC DL
TEST RAX,RAX
SETZ R9B
OR R9B,DL
CMOVNZ RAX,RDI
JMP 0x0012e7c6
LAB_0012e7c0:
MOV R9B,0x1
MOV RAX,RDI
LAB_0012e7c6:
MOV EDX,dword ptr [RSI + 0x30]
AND EDX,0x3f
CMP EDX,0x3
SETNZ DL
MOV R8D,0x80000000
CMP RAX,R8
SETL R11B
OR R11B,DL
MOV R8D,0x7fffffff
CMOVNZ R8,RAX
MOV RAX,R8
XOR EDX,EDX
DIV R10
SUB R8,RDX
MOV RAX,qword ptr [RSI + 0x48]
CMP R8,RAX
MOV RBX,RAX
CMOVG RBX,R8
TEST RCX,RCX
JZ 0x0012e812
CMP RBX,RDI
SETNZ byte ptr [RCX]
JMP 0x0012e86d
LAB_0012e812:
CMP R8,RAX
SETGE CL
CMP RAX,RDI
SETLE AL
OR AL,CL
AND AL,R11B
TEST AL,R9B
JNZ 0x0012e86d
LEA RAX,[0x3fa308]
MOV R12,qword ptr [RAX]
MOV R14,qword ptr [RSI]
LEA RSI,[RBP + -0x130]
CALL 0x001618bc
MOV R15,RAX
LEA RSI,[RBP + -0x230]
MOV RDI,RBX
CALL 0x001618bc
LEA RSI,[0x1648ee]
MOV EDI,0x1
MOV RDX,R14
MOV RCX,R15
MOV R8,RAX
XOR EAX,EAX
CALL R12
LAB_0012e86d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0012e88f
MOV RAX,RBX
ADD RSP,0x210
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012e88f:
CALL 0x001243e0
|
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3)
{
ulong uVar1;
int8 uVar2;
int *puVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
ulong uVar7;
ulong uVar8;
bool bVar9;
long in_FS_OFFSET;
bool bVar10;
int1 local_238 [256];
int1 local_138 [264];
long local_30;
puVar3 = my_getopt_error_reporter;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_1 < 1) {
bVar9 = true;
uVar4 = param_1;
}
else {
uVar4 = param_2[10];
bVar9 = uVar4 == 0 || param_1 <= uVar4;
if (uVar4 == 0 || param_1 <= uVar4) {
uVar4 = param_1;
}
}
bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 3;
uVar8 = 0x7fffffff;
if ((long)uVar4 < 0x80000000 || bVar10) {
uVar8 = uVar4;
}
uVar8 = uVar8 - uVar8 % (param_2[0xc] + (ulong)(param_2[0xc] == 0));
uVar1 = param_2[9];
uVar7 = uVar1;
if ((long)uVar1 < (long)uVar8) {
uVar7 = uVar8;
}
if (param_3 == 0) {
if (!(bool)((((long)uVar1 <= (long)param_1 || (long)uVar1 <= (long)uVar8) &&
((long)uVar4 < 0x80000000 || bVar10)) & bVar9)) {
uVar2 = *param_2;
uVar5 = llstr(param_1,local_138);
uVar6 = llstr(uVar7,local_238);
(*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar2,uVar5,uVar6);
}
}
else {
*(bool *)param_3 = uVar7 != param_1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar7;
}
| |
23,035 | qdevtools::BuiltinEditor::qt_metacall(QMetaObject::Call, int, void**) | HuaiminNotSleepYet[P]QDevTools/build_O0/QDevTools_autogen/EWIEGA46WW/moc_qdevtools.cpp | int qdevtools::BuiltinEditor::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 1)
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
_id -= 1;
}
return _id;
} | O0 | cpp | qdevtools::BuiltinEditor::qt_metacall(QMetaObject::Call, int, void**):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0xfab0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x104de
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1054c
cmpl $0x0, -0x14(%rbp)
jne 0x10508
cmpl $0x1, -0x18(%rbp)
jge 0x104fd
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x10300
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x10546
cmpl $0x7, -0x14(%rbp)
jne 0x10544
cmpl $0x1, -0x18(%rbp)
jge 0x1053b
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xf200
leaq -0x28(%rbp), %rdi
callq 0x10f20
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x10546
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN9qdevtools13BuiltinEditor11qt_metacallEN11QMetaObject4CallEiPPv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_10]
mov [rbp+var_30], rdi
mov esi, [rbp+var_14]
mov edx, [rbp+var_18]
mov rcx, [rbp+var_20]
call __ZN7QWidget11qt_metacallEN11QMetaObject4CallEiPPv; QWidget::qt_metacall(QMetaObject::Call,int,void **)
mov [rbp+var_18], eax
cmp [rbp+var_18], 0
jge short loc_104DE
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
jmp short loc_1054C
loc_104DE:
cmp [rbp+var_14], 0
jnz short loc_10508
cmp [rbp+var_18], 1
jge short loc_104FD
mov rdi, [rbp+var_30]
mov esi, [rbp+var_14]
mov edx, [rbp+var_18]
mov rcx, [rbp+var_20]
call _ZN9qdevtools13BuiltinEditor18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv; qdevtools::BuiltinEditor::qt_static_metacall(QObject *,QMetaObject::Call,int,void **)
loc_104FD:
mov eax, [rbp+var_18]
sub eax, 1
mov [rbp+var_18], eax
jmp short loc_10546
loc_10508:
cmp [rbp+var_14], 7
jnz short loc_10544
cmp [rbp+var_18], 1
jge short loc_1053B
lea rdi, [rbp+var_28]
xor esi, esi
mov edx, 8
call _memset
lea rdi, [rbp+var_28]; this
call _ZN9QMetaTypeC2Ev; QMetaType::QMetaType(void)
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rbp+var_28]
mov [rax], rcx
loc_1053B:
mov eax, [rbp+var_18]
sub eax, 1
mov [rbp+var_18], eax
loc_10544:
jmp short $+2
loc_10546:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_1054C:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long qdevtools::BuiltinEditor::qt_metacall(
qdevtools::BuiltinEditor *a1,
unsigned int a2,
unsigned int a3,
_QWORD *a4)
{
long long v5; // [rsp+8h] [rbp-28h] BYREF
_QWORD *v6; // [rsp+10h] [rbp-20h]
int v7; // [rsp+18h] [rbp-18h]
unsigned int v8; // [rsp+1Ch] [rbp-14h]
qdevtools::BuiltinEditor *v9; // [rsp+20h] [rbp-10h]
v9 = a1;
v8 = a2;
v6 = a4;
v7 = QWidget::qt_metacall(a1, a2, a3, a4);
if ( v7 >= 0 )
{
if ( v8 )
{
if ( v8 == 7 )
{
if ( v7 < 1 )
{
memset(&v5, 0LL, sizeof(v5));
QMetaType::QMetaType((QMetaType *)&v5);
*(_QWORD *)*v6 = v5;
}
--v7;
}
}
else
{
if ( v7 < 1 )
qdevtools::BuiltinEditor::qt_static_metacall(a1, v8, v7, v6);
--v7;
}
return (unsigned int)v7;
}
else
{
return (unsigned int)v7;
}
}
| qt_metacall:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RDI
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0010fab0
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x18],0x0
JGE 0x001104de
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011054c
LAB_001104de:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00110508
CMP dword ptr [RBP + -0x18],0x1
JGE 0x001104fd
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00110300
LAB_001104fd:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00110546
LAB_00110508:
CMP dword ptr [RBP + -0x14],0x7
JNZ 0x00110544
CMP dword ptr [RBP + -0x18],0x1
JGE 0x0011053b
LEA RDI,[RBP + -0x28]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010f200
LEA RDI,[RBP + -0x28]
CALL 0x00110f20
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_0011053b:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
LAB_00110544:
JMP 0x00110546
LAB_00110546:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_0011054c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* qdevtools::BuiltinEditor::qt_metacall(QMetaObject::Call, int, void**) */
int __thiscall
qdevtools::BuiltinEditor::qt_metacall
(BuiltinEditor *this,int param_2,int4 param_3,int8 *param_4)
{
int8 local_30;
int8 *local_28;
int local_20;
int local_1c;
BuiltinEditor *local_18;
int local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = this;
local_20 = QWidget::qt_metacall(this,param_2,param_3,param_4);
local_c = local_20;
if (-1 < local_20) {
if (local_1c == 0) {
if (local_20 < 1) {
qt_static_metacall(this,0,local_20,local_28);
}
local_20 = local_20 + -1;
}
else if (local_1c == 7) {
if (local_20 < 1) {
memset(&local_30,0,8);
QMetaType::QMetaType((QMetaType *)&local_30);
*(int8 *)*local_28 = local_30;
}
local_20 = local_20 + -1;
}
local_c = local_20;
}
return local_c;
}
| |
23,036 | sha256_init_h | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/sha256.h | static void sha256_init_h(unsigned int h[8])
{
h[0] = 0x6a09e667U;
h[1] = 0xbb67ae85U;
h[2] = 0x3c6ef372U;
h[3] = 0xa54ff53aU;
h[4] = 0x510e527fU;
h[5] = 0x9b05688cU;
h[6] = 0x1f83d9abU;
h[7] = 0x5be0cd19U;
} | O0 | c | sha256_init_h:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x6a09e667, (%rax) # imm = 0x6A09E667
movq -0x8(%rbp), %rax
movl $0xbb67ae85, 0x4(%rax) # imm = 0xBB67AE85
movq -0x8(%rbp), %rax
movl $0x3c6ef372, 0x8(%rax) # imm = 0x3C6EF372
movq -0x8(%rbp), %rax
movl $0xa54ff53a, 0xc(%rax) # imm = 0xA54FF53A
movq -0x8(%rbp), %rax
movl $0x510e527f, 0x10(%rax) # imm = 0x510E527F
movq -0x8(%rbp), %rax
movl $0x9b05688c, 0x14(%rax) # imm = 0x9B05688C
movq -0x8(%rbp), %rax
movl $0x1f83d9ab, 0x18(%rax) # imm = 0x1F83D9AB
movq -0x8(%rbp), %rax
movl $0x5be0cd19, 0x1c(%rax) # imm = 0x5BE0CD19
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| sha256_init_h:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov dword ptr [rax], 6A09E667h
mov rax, [rbp+var_8]
mov dword ptr [rax+4], 0BB67AE85h
mov rax, [rbp+var_8]
mov dword ptr [rax+8], 3C6EF372h
mov rax, [rbp+var_8]
mov dword ptr [rax+0Ch], 0A54FF53Ah
mov rax, [rbp+var_8]
mov dword ptr [rax+10h], 510E527Fh
mov rax, [rbp+var_8]
mov dword ptr [rax+14h], 9B05688Ch
mov rax, [rbp+var_8]
mov dword ptr [rax+18h], 1F83D9ABh
mov rax, [rbp+var_8]
mov dword ptr [rax+1Ch], 5BE0CD19h
pop rbp
retn
| _DWORD * sha256_init_h(_DWORD *a1)
{
_DWORD *result; // rax
*a1 = 1779033703;
a1[1] = -1150833019;
a1[2] = 1013904242;
a1[3] = -1521486534;
a1[4] = 1359893119;
a1[5] = -1694144372;
a1[6] = 528734635;
result = a1;
a1[7] = 1541459225;
return result;
}
| sha256_init_h:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x6a09e667
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4],0xbb67ae85
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8],0x3c6ef372
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],0xa54ff53a
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],0x510e527f
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],0x9b05688c
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x18],0x1f83d9ab
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1c],0x5be0cd19
POP RBP
RET
|
void sha256_init_h(int4 *param_1)
{
*param_1 = 0x6a09e667;
param_1[1] = 0xbb67ae85;
param_1[2] = 0x3c6ef372;
param_1[3] = 0xa54ff53a;
param_1[4] = 0x510e527f;
param_1[5] = 0x9b05688c;
param_1[6] = 0x1f83d9ab;
param_1[7] = 0x5be0cd19;
return;
}
| |
23,037 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7b44f
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x7eaa8
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7b4ad
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x43bae
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x39de1(%rip), %rsi # 0xb5252
leaq 0x8(%rsp), %rdi
callq 0x7e4d3
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x43a62
xorl %ebp, %ebp
leaq 0x80aac(%rip), %rsi # 0xfbf48
leaq -0x3ad65(%rip), %rdx # 0x4073e
movq %rbx, %rdi
callq 0x23ea0
jmp 0x7b517
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x273be
leaq 0x39db1(%rip), %rsi # 0xb5282
leaq 0x39db0(%rip), %rcx # 0xb5288
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7eadd
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x4230e
xorl %ebp, %ebp
leaq 0x809c0(%rip), %rsi # 0xfbec8
leaq -0x3add1(%rip), %rdx # 0x4073e
movq %rbx, %rdi
callq 0x23ea0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24158
jmp 0x7b52c
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7b53d
jmp 0x7b549
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x7b54c
jmp 0x7b554
movq %rax, %r14
movq %rbx, %rdi
callq 0x23670
movq %r14, %rdi
callq 0x23f20
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7B44F
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7B4AD
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7B44F:
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+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_7B517
loc_7B4AD:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7B517:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7B52C
mov r14, rax
mov bpl, 1
loc_7B52C:
lea rdi, [rsp+68h+var_40]
jmp short loc_7B53D
jmp short loc_7B549
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7B53D:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7B54C
jmp short loc_7B554
loc_7B549:
mov r14, rax
loc_7B54C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7B554:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(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);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v6,
"key '",
v7,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
403,
(long long)v6,
a1);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017b44f
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017eaa8
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017b4ad
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017b44f:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143bae
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017b46a:
LEA RSI,[0x1b5252]
LEA RDI,[RSP + 0x8]
CALL 0x0017e4d3
MOV BPL,0x1
LAB_0017b47e:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00143a62
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x14073e]
MOV RDI,RBX
CALL 0x00123ea0
LAB_0017b4ad:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
LAB_0017b4b8:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x001273be
LAB_0017b4ca:
LEA RSI,[0x1b5282]
LEA RCX,[0x1b5288]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017eadd
MOV BPL,0x1
LAB_0017b4ea:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0014230e
XOR EBP,EBP
LEA RSI,[0x1fbec8]
LEA RDX,[0x14073e]
MOV RDI,RBX
CALL 0x00123ea0
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0017b46a to 0017b47a has its CatchHandler @ 0017b549 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 0017b47e to 0017b4aa has its CatchHandler @ 0017b535 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,local_60,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);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0017b4b8 to 0017b4c9 has its CatchHandler @ 0017b533 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 0017b4ca to 0017b4e6 has its CatchHandler @ 0017b526 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 0017b4ea to 0017b516 has its CatchHandler @ 0017b517 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
23,038 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa5847
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa5831
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a210
testl %eax, %eax
je 0xa5826
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa5807
jmp 0xa5829
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa58a5
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5faf2
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4b9f9(%rip), %rsi # 0xf1262
leaq 0x20(%rsp), %rdi
callq 0xabac9
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x5f89a
xorl %ebp, %ebp
leaq 0x846c4(%rip), %rsi # 0x129f58
leaq -0x49b73(%rip), %rdx # 0x5bd28
movq %rbx, %rdi
callq 0x1aea0
jmp 0xa591e
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a3d0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x229de
leaq 0x4b9b8(%rip), %rsi # 0xf1292
leaq 0x4b9b7(%rip), %rcx # 0xf1298
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xac0a6
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x5de8a
xorl %ebp, %ebp
leaq 0x845c9(%rip), %rsi # 0x129ed8
leaq -0x49bee(%rip), %rdx # 0x5bd28
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa593c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5987
movq 0x10(%rsp), %rsi
jmp 0xa597f
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5991
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xa5991
jmp 0xa598e
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5987
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xa5991
jmp 0xa5999
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a650
movq %r14, %rdi
callq 0x1af20
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A5847
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A5831
loc_A5807:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A5826
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A5807
jmp short loc_A5829
loc_A5826:
mov rax, rbx
loc_A5829:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A5831:
cmp rax, rbx
jz short loc_A58A5
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A5847:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A591E
loc_A58A5:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A591E:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A593C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A593C:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A5987
mov rsi, [rsp+68h+var_58]
jmp short loc_A597F
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A5991
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A5991
jmp short loc_A598E
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5987
mov rsi, [rsp+68h+var_38]
loc_A597F:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5987:
test bpl, bpl
jnz short loc_A5991
jmp short loc_A5999
loc_A598E:
mov r14, rax
loc_A5991:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A5999:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a5847
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a5831
LAB_001a5807:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a210
TEST EAX,EAX
JZ 0x001a5826
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a5807
JMP 0x001a5829
LAB_001a5826:
MOV RAX,RBX
LAB_001a5829:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a5831:
CMP RAX,RBX
JZ 0x001a58a5
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a5847:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015faf2
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a5862:
LEA RSI,[0x1f1262]
LEA RDI,[RSP + 0x20]
CALL 0x001abac9
MOV BPL,0x1
LAB_001a5876:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0015f89a
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15bd28]
MOV RDI,RBX
CALL 0x0011aea0
LAB_001a58a5:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a3d0
LEA RDX,[RAX + R15*0x1]
LAB_001a58c8:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001229de
LAB_001a58d3:
LEA RSI,[0x1f1292]
LEA RCX,[0x1f1298]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001ac0a6
MOV BPL,0x1
LAB_001a58f1:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0015de8a
XOR EBP,EBP
LEA RSI,[0x229ed8]
LEA RDX,[0x15bd28]
MOV RDI,RBX
CALL 0x0011aea0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a5862 to 001a5872 has its CatchHandler @ 001a598e */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a5876 to 001a58a2 has its CatchHandler @ 001a5969 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a58c8 to 001a58d2 has its CatchHandler @ 001a5967 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a58d3 to 001a58ed has its CatchHandler @ 001a594c */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a58f1 to 001a591d has its CatchHandler @ 001a591e */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
23,039 | ring_buffer<int>::rat(unsigned long) const | monkey531[P]llama/common/sampling.cpp | const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
} | O0 | cpp | ring_buffer<int>::rat(unsigned long) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x8(%rcx), %rax
jb 0x1c7878
movl $0x10, %edi
callq 0x5a6b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x51512(%rip), %rsi # 0x218d51
callq 0x5a490
jmp 0x1c7846
movq 0x8(%rsp), %rdi
movq 0xde75e(%rip), %rsi # 0x2a5fb0
movq 0xde71f(%rip), %rdx # 0x2a5f78
callq 0x5ab10
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x5af90
jmp 0x1c78a7
movq 0x10(%rsp), %rcx
movq %rcx, %rdi
addq $0x20, %rdi
movq 0x10(%rcx), %rax
addq 0x8(%rcx), %rax
subq 0x28(%rsp), %rax
subq $0x1, %rax
xorl %edx, %edx
divq (%rcx)
movq %rdx, %rsi
callq 0xe90e0
addq $0x38, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x5abd0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZNK11ring_bufferIiE3ratEm:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_28], rcx
mov rax, [rsp+38h+var_10]
cmp rax, [rcx+8]
jb short loc_1C7878
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+38h+var_30], rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_1C7846:
mov rdi, [rsp+38h+var_30]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+38h+var_30]; void *
mov rcx, rax
mov eax, edx
mov [rsp+38h+var_18], rcx
mov [rsp+38h+var_1C], eax
call ___cxa_free_exception
jmp short loc_1C78A7
loc_1C7878:
mov rcx, [rsp+38h+var_28]
mov rdi, rcx
add rdi, 20h ; ' '
mov rax, [rcx+10h]
add rax, [rcx+8]
sub rax, [rsp+38h+var_10]
sub rax, 1
xor edx, edx
div qword ptr [rcx]
mov rsi, rdx
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
add rsp, 38h
retn
loc_1C78A7:
mov rdi, [rsp+38h+var_18]
call __Unwind_Resume
| long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
std::runtime_error *exception; // [rsp+8h] [rbp-30h]
if ( a2 >= a1[1] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<int>::operator[](a1 + 4, (a1[1] + a1[2] - a2 - 1) % *a1);
}
| |||
23,040 | ring_buffer<int>::rat(unsigned long) const | monkey531[P]llama/common/sampling.cpp | const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
} | O1 | cpp | ring_buffer<int>::rat(unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0xd0c82
notq %rsi
addq %rsi, %rax
addq 0x10(%rdi), %rax
xorl %edx, %edx
divq (%rdi)
leaq (,%rdx,4), %rax
addq 0x20(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1b430
movq %rax, %rbx
leaq 0x2771f(%rip), %rsi # 0xf83b5
movq %rax, %rdi
callq 0x1b310
movq 0x5e34b(%rip), %rsi # 0x12eff0
movq 0x5e2b4(%rip), %rdx # 0x12ef60
movq %rbx, %rdi
callq 0x1bf20
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1bfb0
nop
| _ZNK11ring_bufferIiE3ratEm:
push r14
push rbx
push rax
mov rax, [rdi+8]
cmp rax, rsi
jbe short loc_D0C82
not rsi
add rax, rsi
add rax, [rdi+10h]
xor edx, edx
div qword ptr [rdi]
lea rax, ds:0[rdx*4]
add rax, [rdi+20h]
add rsp, 8
pop rbx
pop r14
retn
loc_D0C82:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
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, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
unsigned long long v2; // rax
std::runtime_error *exception; // rbx
v2 = a1[1];
if ( v2 <= a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1[4] + 4 * ((a1[2] + ~a2 + v2) % *a1);
}
| rat:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RSI
JBE 0x001d0c82
NOT RSI
ADD RAX,RSI
ADD RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV qword ptr [RDI]
LEA RAX,[RDX*0x4]
ADD RAX,qword ptr [RDI + 0x20]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001d0c82:
MOV EDI,0x10
CALL 0x0011b430
MOV RBX,RAX
LAB_001d0c8f:
LEA RSI,[0x1f83b5]
MOV RDI,RAX
CALL 0x0011b310
LAB_001d0c9e:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,RBX
CALL 0x0011bf20
|
/* ring_buffer<int>::rat(unsigned long) const */
long __thiscall ring_buffer<int>::rat(ring_buffer<int> *this,ulong param_1)
{
runtime_error *this_00;
if (param_1 < *(ulong *)(this + 8)) {
return ((*(ulong *)(this + 8) + ~param_1 + *(long *)(this + 0x10)) % *(ulong *)this) * 4 +
*(long *)(this + 0x20);
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d0c8f to 001d0c9d has its CatchHandler @ 001d0cb4 */
std::runtime_error::runtime_error(this_00,"ring buffer: index out of bounds");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
| |
23,041 | ring_buffer<int>::rat(unsigned long) const | monkey531[P]llama/common/sampling.cpp | const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
} | O2 | cpp | ring_buffer<int>::rat(unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0x99554
notq %rsi
addq %rsi, %rax
addq 0x10(%rdi), %rax
xorl %edx, %edx
divq (%rdi)
leaq (,%rdx,4), %rax
addq 0x20(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %rbx
leaq 0x1fde3(%rip), %rsi # 0xb9349
movq %rax, %rdi
callq 0x23310
movq 0x64a7b(%rip), %rsi # 0xfdff0
movq 0x649dc(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f20
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x23fb0
nop
| _ZNK11ring_bufferIiE3ratEm:
push r14
push rbx
push rax
mov rax, [rdi+8]
cmp rax, rsi
jbe short loc_99554
not rsi
add rax, rsi
add rax, [rdi+10h]
xor edx, edx
div qword ptr [rdi]
lea rax, ds:0[rdx*4]
add rax, [rdi+20h]
add rsp, 8
pop rbx
pop r14
retn
loc_99554:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
unsigned long long v2; // rax
std::runtime_error *exception; // rbx
v2 = a1[1];
if ( v2 <= a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1[4] + 4 * ((a1[2] + ~a2 + v2) % *a1);
}
| rat:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RSI
JBE 0x00199554
NOT RSI
ADD RAX,RSI
ADD RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV qword ptr [RDI]
LEA RAX,[RDX*0x4]
ADD RAX,qword ptr [RDI + 0x20]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00199554:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV RBX,RAX
LAB_0019955f:
LEA RSI,[0x1b9349]
MOV RDI,RAX
CALL 0x00123310
LAB_0019956e:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f20
|
/* ring_buffer<int>::rat(unsigned long) const */
long __thiscall ring_buffer<int>::rat(ring_buffer<int> *this,ulong param_1)
{
runtime_error *this_00;
if (param_1 < *(ulong *)(this + 8)) {
return ((*(ulong *)(this + 8) + ~param_1 + *(long *)(this + 0x10)) % *(ulong *)this) * 4 +
*(long *)(this + 0x20);
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019955f to 0019956d has its CatchHandler @ 00199584 */
std::runtime_error::runtime_error(this_00,"ring buffer: index out of bounds");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
| |
23,042 | ring_buffer<int>::rat(unsigned long) const | monkey531[P]llama/common/sampling.cpp | const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
} | O3 | cpp | ring_buffer<int>::rat(unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0xcf00c
notq %rsi
addq %rsi, %rax
addq 0x10(%rdi), %rax
xorl %edx, %edx
divq (%rdi)
leaq (,%rdx,4), %rax
addq 0x20(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x26385(%rip), %rsi # 0xf53a5
movq %rax, %rdi
callq 0x1a310
movq 0x5cfc1(%rip), %rsi # 0x12bff0
movq 0x5cf2a(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
movq %r14, %rdi
callq 0x1afb0
nop
| _ZNK11ring_bufferIiE3ratEm:
push r14
push rbx
push rax
mov rax, [rdi+8]
cmp rax, rsi
jbe short loc_CF00C
not rsi
add rax, rsi
add rax, [rdi+10h]
xor edx, edx
div qword ptr [rdi]
lea rax, ds:0[rdx*4]
add rax, [rdi+20h]
add rsp, 8
pop rbx
pop r14
retn
loc_CF00C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
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, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
unsigned long long v2; // rax
std::runtime_error *exception; // rbx
v2 = a1[1];
if ( v2 <= a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1[4] + 4 * ((a1[2] + ~a2 + v2) % *a1);
}
| rat:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RSI
JBE 0x001cf00c
NOT RSI
ADD RAX,RSI
ADD RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV qword ptr [RDI]
LEA RAX,[RDX*0x4]
ADD RAX,qword ptr [RDI + 0x20]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001cf00c:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_001cf019:
LEA RSI,[0x1f53a5]
MOV RDI,RAX
CALL 0x0011a310
LAB_001cf028:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af20
|
/* ring_buffer<int>::rat(unsigned long) const */
long __thiscall ring_buffer<int>::rat(ring_buffer<int> *this,ulong param_1)
{
runtime_error *this_00;
if (param_1 < *(ulong *)(this + 8)) {
return ((*(ulong *)(this + 8) + ~param_1 + *(long *)(this + 0x10)) % *(ulong *)this) * 4 +
*(long *)(this + 0x20);
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001cf019 to 001cf027 has its CatchHandler @ 001cf03e */
std::runtime_error::runtime_error(this_00,"ring buffer: index out of bounds");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
| |
23,043 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O0 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x2d5e5
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0x2d5d8
movb $0x1, -0x1(%rbp)
jmp 0x2d5e9
jmp 0x2d5da
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2d5a6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_2D5A6:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_2D5E5
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_2D5D8
mov [rbp+var_1], 1
jmp short loc_2D5E9
loc_2D5D8:
jmp short $+2
loc_2D5DA:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_2D5A6
loc_2D5E5:
mov [rbp+var_1], 0
loc_2D5E9:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_0012d5a6:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0012d5e5
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x0012d5d8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012d5e9
LAB_0012d5d8:
JMP 0x0012d5da
LAB_0012d5da:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0012d5a6
LAB_0012d5e5:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012d5e9:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
| |
23,044 | my_strnxfrm_win1250ch | eloqsql/strings/ctype-win1250ch.c | static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
} | O0 | c | my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0xbf0b0
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0xbf0b2
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xbf299
jmp 0xbf0c2
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0xbf109
cmpl $0x0, -0x44(%rbp)
jne 0xbf0fb
movq -0x30(%rbp), %rax
cmpl $0x0, %eax
jle 0xbf0fb
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xbf107
movl $0x0, -0x34(%rbp)
jmp 0xbf25f
jmp 0xbf109
cmpl $0x0, -0x44(%rbp)
jne 0xbf128
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x14ec71(%rip), %rax # 0x20dd90
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
jmp 0xbf13f
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x32f948(%rip), %rax # 0x3eea80
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0xff, -0x34(%rbp)
jne 0xbf253
movl $0x0, -0x54(%rbp)
cmpl $0x50, -0x54(%rbp)
jge 0xbf251
movslq -0x54(%rbp), %rcx
leaq 0x174062(%rip), %rax # 0x2331d0
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6d(%rbp)
je 0xbf1c7
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x6d(%rbp)
jge 0xbf1c7
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0xbf1d0
jmp 0xbf1ea
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0xbf184
movq -0x60(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xbf241
cmpl $0x0, -0x44(%rbp)
jne 0xbf214
movslq -0x54(%rbp), %rcx
leaq 0x173fcc(%rip), %rax # 0x2331d0
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0xbf22d
movslq -0x54(%rbp), %rcx
leaq 0x173fb1(%rip), %rax # 0x2331d0
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xbf251
jmp 0xbf243
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xbf159
jmp 0xbf253
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0xbf267
jmp 0xbf299
movl -0x44(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0xbf294
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x50(%rbp)
movb %dl, (%rax,%rcx)
jmp 0xbf0b2
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xbf2cf
movq -0x18(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0xbf2cf
movq -0x10(%rbp), %rdi
addq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x37300
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
sub rsp, 80h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_44], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_BF0B0
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_BF0B0:
jmp short $+2
loc_BF0B2:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_18]
jnb loc_BF299
jmp short $+2
loc_BF0C2:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_BF109
cmp [rbp+var_44], 0
jnz short loc_BF0FB
mov rax, [rbp+var_30]
cmp eax, 0
jle short loc_BF0FB
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_BF107
loc_BF0FB:
mov [rbp+var_34], 0
jmp loc_BF25F
loc_BF107:
jmp short $+2
loc_BF109:
cmp [rbp+var_44], 0
jnz short loc_BF128
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch1
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
jmp short loc_BF13F
loc_BF128:
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch2
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
loc_BF13F:
mov eax, [rbp+var_6C]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0FFh
jnz loc_BF253
mov [rbp+var_54], 0
loc_BF159:
cmp [rbp+var_54], 50h ; 'P'
jge loc_BF251
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
loc_BF184:
mov rax, [rbp+var_60]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_6D], al
jz short loc_BF1C7
mov rcx, [rbp+var_68]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_6D], al
jge short loc_BF1C7
mov rax, [rbp+var_60]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
setz al
mov [rbp+var_6D], al
loc_BF1C7:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_BF1D0
jmp short loc_BF1EA
loc_BF1D0:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_68], rax
jmp short loc_BF184
loc_BF1EA:
mov rax, [rbp+var_60]
cmp byte ptr [rax], 0
jnz short loc_BF241
cmp [rbp+var_44], 0
jnz short loc_BF214
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+8]
mov [rbp+var_74], eax
jmp short loc_BF22D
loc_BF214:
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+9]
mov [rbp+var_74], eax
loc_BF22D:
mov eax, [rbp+var_74]
mov [rbp+var_34], eax
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_BF251
loc_BF241:
jmp short $+2
loc_BF243:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
jmp loc_BF159
loc_BF251:
jmp short $+2
loc_BF253:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_BF25F:
cmp [rbp+var_34], 0
jnz short loc_BF267
jmp short loc_BF299
loc_BF267:
mov ecx, [rbp+var_44]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
cmp eax, 0
jz short loc_BF294
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_50]
mov rsi, rcx
add rsi, 1
mov [rbp+var_50], rsi
mov [rax+rcx], dl
loc_BF294:
jmp loc_BF0B2
loc_BF299:
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_BF2CF
mov rax, [rbp+var_18]
cmp rax, [rbp+var_50]
jbe short loc_BF2CF
mov rdi, [rbp+var_10]
add rdi, [rbp+var_50]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_50]
xor esi, esi
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
loc_BF2CF:
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
| unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
long long v7; // rcx
int v9; // [rsp+Ch] [rbp-74h]
bool v10; // [rsp+13h] [rbp-6Dh]
int v11; // [rsp+14h] [rbp-6Ch]
unsigned __int8 *j; // [rsp+18h] [rbp-68h]
_BYTE *v13; // [rsp+20h] [rbp-60h]
int i; // [rsp+2Ch] [rbp-54h]
unsigned long long v15; // [rsp+30h] [rbp-50h]
int v16; // [rsp+3Ch] [rbp-44h]
unsigned __int8 *v17; // [rsp+40h] [rbp-40h]
int v18; // [rsp+4Ch] [rbp-34h]
v16 = 0;
v15 = 0LL;
v17 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
while ( v15 < a3 )
{
if ( v17 - a5 >= a6 )
{
if ( v16 || a6 <= 0 )
{
v18 = 0;
goto LABEL_28;
}
v17 = a5;
v16 = 1;
}
if ( v16 )
v11 = sort_order_win1250ch2[*v17];
else
v11 = sort_order_win1250ch1[*v17];
v18 = v11;
if ( v11 == 255 )
{
for ( i = 0; i < 80; ++i )
{
v13 = *(&doubles_0 + 2 * i);
for ( j = v17; ; ++j )
{
v10 = 0;
if ( *v13 )
{
v10 = 0;
if ( j - a5 < a6 )
v10 = (unsigned __int8)*v13 == *j;
}
if ( !v10 )
break;
++v13;
}
if ( !*v13 )
{
if ( v16 )
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 9);
else
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 8);
v18 = v9;
v17 = j - 1;
break;
}
}
}
++v17;
LABEL_28:
if ( !v18 )
break;
if ( (a7 & (1 << v16)) != 0 )
{
v7 = v15++;
*(_BYTE *)(a2 + v7) = v18;
}
}
if ( (a7 & 0x80) != 0 && a3 > v15 )
{
memset(v15 + a2, 0LL, a3 - v15);
return a3;
}
return v15;
}
| my_strnxfrm_win1250ch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x44],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x001bf0b0
MOV EAX,dword ptr [RBP + 0x10]
OR EAX,0xf
MOV dword ptr [RBP + 0x10],EAX
LAB_001bf0b0:
JMP 0x001bf0b2
LAB_001bf0b2:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001bf299
JMP 0x001bf0c2
LAB_001bf0c2:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x001bf109
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001bf0fb
MOV RAX,qword ptr [RBP + -0x30]
CMP EAX,0x0
JLE 0x001bf0fb
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001bf107
LAB_001bf0fb:
MOV dword ptr [RBP + -0x34],0x0
JMP 0x001bf25f
LAB_001bf107:
JMP 0x001bf109
LAB_001bf109:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001bf128
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x30dd90]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x001bf13f
LAB_001bf128:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x4eea80]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
LAB_001bf13f:
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0xff
JNZ 0x001bf253
MOV dword ptr [RBP + -0x54],0x0
LAB_001bf159:
CMP dword ptr [RBP + -0x54],0x50
JGE 0x001bf251
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x3331d0]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x68],RAX
LAB_001bf184:
MOV RAX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x6d],AL
JZ 0x001bf1c7
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,EAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x6d],AL
JGE 0x001bf1c7
MOV RAX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x6d],AL
LAB_001bf1c7:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x001bf1d0
JMP 0x001bf1ea
LAB_001bf1d0:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001bf184
LAB_001bf1ea:
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX],0x0
JNZ 0x001bf241
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001bf214
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x3331d0]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001bf22d
LAB_001bf214:
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x3331d0]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x9]
MOV dword ptr [RBP + -0x74],EAX
LAB_001bf22d:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001bf251
LAB_001bf241:
JMP 0x001bf243
LAB_001bf243:
MOV EAX,dword ptr [RBP + -0x54]
ADD EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001bf159
LAB_001bf251:
JMP 0x001bf253
LAB_001bf253:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_001bf25f:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x001bf267
JMP 0x001bf299
LAB_001bf267:
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,0x1
SHL EAX,CL
AND EAX,dword ptr [RBP + 0x10]
CMP EAX,0x0
JZ 0x001bf294
MOV EAX,dword ptr [RBP + -0x34]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RBP + -0x50],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_001bf294:
JMP 0x001bf0b2
LAB_001bf299:
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001bf2cf
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x50]
JBE 0x001bf2cf
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x00137300
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_001bf2cf:
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x80
POP RBP
RET
|
ulong my_strnxfrm_win1250ch
(int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5,
int param_6,uint param_7)
{
char cVar1;
bool bVar2;
bool bVar3;
byte *local_70;
byte *local_68;
int local_5c;
ulong local_58;
byte *local_48;
bVar2 = false;
local_58 = 0;
local_48 = param_5;
if ((param_7 & 0xf) == 0) {
param_7 = param_7 | 0xf;
}
while (local_58 < param_3) {
if ((long)local_48 - (long)param_5 < (long)param_6) {
LAB_001bf109:
if (bVar2) {
cVar1 = _sort_order_win1250ch2[*local_48];
}
else {
cVar1 = _sort_order_win1250ch1[*local_48];
}
if (cVar1 == -1) {
for (local_5c = 0; local_5c < 0x50; local_5c = local_5c + 1) {
local_68 = *(byte **)(doubles + (long)local_5c * 0x10);
local_70 = local_48;
while( true ) {
bVar3 = false;
if ((*local_68 != 0) && (bVar3 = false, (long)local_70 - (long)param_5 < (long)param_6))
{
bVar3 = *local_68 == *local_70;
}
if (!bVar3) break;
local_68 = local_68 + 1;
local_70 = local_70 + 1;
}
if (*local_68 == 0) {
if (bVar2) {
cVar1 = doubles[(long)local_5c * 0x10 + 9];
}
else {
cVar1 = doubles[(long)local_5c * 0x10 + 8];
}
local_48 = local_70 + -1;
break;
}
}
}
local_48 = local_48 + 1;
}
else {
if ((!bVar2) && (0 < param_6)) {
bVar2 = true;
local_48 = param_5;
goto LAB_001bf109;
}
cVar1 = '\0';
}
if (cVar1 == '\0') break;
if ((1 << bVar2 & param_7) != 0) {
*(char *)(param_2 + local_58) = cVar1;
local_58 = local_58 + 1;
}
}
if (((param_7 & 0x80) != 0) && (local_58 < param_3)) {
memset((void *)(param_2 + local_58),0,param_3 - local_58);
local_58 = param_3;
}
return local_58;
}
| |
23,045 | ftxui::VerticalContainer::OnMouseEvent(ftxui::Event) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/container.cpp | bool OnMouseEvent(Event event) override {
if (ContainerBase::OnMouseEvent(event)) {
return true;
}
if (event.mouse().button != Mouse::WheelUp &&
event.mouse().button != Mouse::WheelDown) {
return false;
}
if (!box_.Contain(event.mouse().x, event.mouse().y)) {
return false;
}
if (event.mouse().button == Mouse::WheelUp) {
MoveSelector(-1);
}
if (event.mouse().button == Mouse::WheelDown) {
MoveSelector(+1);
}
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
return true;
} | O2 | cpp | ftxui::VerticalContainer::OnMouseEvent(ftxui::Event):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x219dc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22c32
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0xc8c8
movb $0x1, %bl
testb %bpl, %bpl
jne 0x22bf6
movl 0xc(%r15), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
jne 0x22bf4
leaq 0x38(%r14), %rdi
movl 0x18(%r15), %esi
movl 0x1c(%r15), %edx
callq 0x2fd54
testb %al, %al
je 0x22bf4
movl 0xc(%r15), %eax
cmpl $0x4, %eax
jne 0x22bc0
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x22c80
movl 0xc(%r15), %eax
cmpl $0x5, %eax
jne 0x22bd0
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x22c80
movq 0x10(%r14), %rax
subq 0x8(%r14), %rax
movq 0x30(%r14), %rcx
shrq $0x4, %rax
decl %eax
movl (%rcx), %edx
cmpl %eax, %edx
cmovll %edx, %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
movl %edx, (%rcx)
jmp 0x22bf6
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xc8c8
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui17VerticalContainer12OnMouseEventENS_5EventE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r15, rsi
mov r14, rdi
lea rbx, [rsp+68h+var_60]
mov rdi, rbx; this
call _ZN5ftxui5EventC2ERKS0_; ftxui::Event::Event(ftxui::Event const&)
mov rdi, r14
mov rsi, rbx
call _ZN5ftxui13ContainerBase12OnMouseEventENS_5EventE; ftxui::ContainerBase::OnMouseEvent(ftxui::Event)
mov ebp, eax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov bl, 1
test bpl, bpl
jnz short loc_22BF6
mov eax, [r15+0Ch]
and eax, 0FFFFFFFEh
cmp eax, 4
jnz short loc_22BF4
lea rdi, [r14+38h]; this
mov esi, [r15+18h]; int
mov edx, [r15+1Ch]; int
call _ZNK5ftxui3Box7ContainEii; ftxui::Box::Contain(int,int)
test al, al
jz short loc_22BF4
mov eax, [r15+0Ch]
cmp eax, 4
jnz short loc_22BC0
push 0FFFFFFFFFFFFFFFFh
pop rsi; int
mov rdi, r14; this
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
mov eax, [r15+0Ch]
loc_22BC0:
cmp eax, 5
jnz short loc_22BD0
push 1
pop rsi; int
mov rdi, r14; this
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
loc_22BD0:
mov rax, [r14+10h]
sub rax, [r14+8]
mov rcx, [r14+30h]
shr rax, 4
dec eax
mov edx, [rcx]
cmp edx, eax
cmovl eax, edx
xor edx, edx
test eax, eax
cmovg edx, eax
mov [rcx], edx
jmp short loc_22BF6
loc_22BF4:
xor ebx, ebx
loc_22BF6:
mov eax, ebx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::VerticalContainer::OnMouseEvent(_QWORD *a1, const ftxui::Event *a2)
{
char v2; // bp
_BYTE *v3; // rbx
int v4; // eax
int *v5; // rcx
int v6; // eax
int v7; // edx
_BYTE v9[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[64]; // [rsp+28h] [rbp-40h] BYREF
v3 = v9;
ftxui::Event::Event((ftxui::Event *)v9, a2);
v2 = ftxui::ContainerBase::OnMouseEvent(a1, v9);
std::string::~string(v10);
LOBYTE(v3) = 1;
if ( !v2 )
{
if ( (*((_DWORD *)a2 + 3) & 0xFFFFFFFE) == 4
&& (unsigned __int8)ftxui::Box::Contain((ftxui::Box *)(a1 + 7), *((_DWORD *)a2 + 6), *((_DWORD *)a2 + 7)) )
{
v4 = *((_DWORD *)a2 + 3);
if ( v4 == 4 )
{
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1);
v4 = *((_DWORD *)a2 + 3);
}
if ( v4 == 5 )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1);
v5 = (int *)a1[6];
v6 = ((a1[2] - a1[1]) >> 4) - 1;
if ( *v5 < v6 )
v6 = *v5;
v7 = 0;
if ( v6 > 0 )
v7 = v6;
*v5 = v7;
}
else
{
LODWORD(v3) = 0;
}
}
return (unsigned int)v3;
}
| OnMouseEvent:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001219dc
LAB_00122b69:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00122c32
LAB_00122b74:
MOV EBP,EAX
LEA RDI,[RSP + 0x28]
CALL 0x0010c8c8
MOV BL,0x1
TEST BPL,BPL
JNZ 0x00122bf6
MOV EAX,dword ptr [R15 + 0xc]
AND EAX,0xfffffffe
CMP EAX,0x4
JNZ 0x00122bf4
LEA RDI,[R14 + 0x38]
MOV ESI,dword ptr [R15 + 0x18]
MOV EDX,dword ptr [R15 + 0x1c]
CALL 0x0012fd54
TEST AL,AL
JZ 0x00122bf4
MOV EAX,dword ptr [R15 + 0xc]
CMP EAX,0x4
JNZ 0x00122bc0
PUSH -0x1
POP RSI
MOV RDI,R14
CALL 0x00122c80
MOV EAX,dword ptr [R15 + 0xc]
LAB_00122bc0:
CMP EAX,0x5
JNZ 0x00122bd0
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x00122c80
LAB_00122bd0:
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x30]
SHR RAX,0x4
DEC EAX
MOV EDX,dword ptr [RCX]
CMP EDX,EAX
CMOVL EAX,EDX
XOR EDX,EDX
TEST EAX,EAX
CMOVG EDX,EAX
MOV dword ptr [RCX],EDX
JMP 0x00122bf6
LAB_00122bf4:
XOR EBX,EBX
LAB_00122bf6:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ftxui::VerticalContainer::OnMouseEvent(ftxui::Event) */
ulong __thiscall ftxui::VerticalContainer::OnMouseEvent(VerticalContainer *this,Event *param_2)
{
char cVar1;
int iVar2;
int iVar3;
ulong uVar4;
Event local_60 [32];
string local_40 [32];
Event::Event(local_60,param_2);
/* try { // try from 00122b69 to 00122b73 has its CatchHandler @ 00122c03 */
cVar1 = ftxui::ContainerBase::OnMouseEvent((ContainerBase *)this,local_60);
std::__cxx11::string::~string(local_40);
uVar4 = CONCAT71((int7)((ulong)local_60 >> 8),1);
if (cVar1 == '\0') {
if ((*(uint *)(param_2 + 0xc) & 0xfffffffe) == 4) {
cVar1 = Box::Contain((Box *)(this + 0x38),*(int *)(param_2 + 0x18),*(int *)(param_2 + 0x1c));
if (cVar1 != '\0') {
iVar2 = *(int *)(param_2 + 0xc);
if (iVar2 == 4) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,-1);
iVar2 = *(int *)(param_2 + 0xc);
}
if (iVar2 == 5) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,1);
}
iVar3 = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 4) + -1;
iVar2 = **(int **)(this + 0x30);
if (iVar2 < iVar3) {
iVar3 = iVar2;
}
iVar2 = 0;
if (0 < iVar3) {
iVar2 = iVar3;
}
**(int **)(this + 0x30) = iVar2;
goto LAB_00122bf6;
}
}
uVar4 = 0;
}
LAB_00122bf6:
return uVar4 & 0xffffffff;
}
| |
23,046 | fmt::v11::basic_appender<char> fmt::v11::detail::format_decimal<char, unsigned int, fmt::v11::basic_appender<char>, 0>(fmt::v11::basic_appender<char>, unsigned int, int) | zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto format_decimal(OutputIt out, UInt value, int num_digits)
-> OutputIt {
if (auto ptr = to_pointer<Char>(out, to_unsigned(num_digits))) {
do_format_decimal(ptr, value, num_digits);
return out;
}
// Buffer is large enough to hold all digits (digits10 + 1).
char buffer[digits10<UInt>() + 1];
if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0');
do_format_decimal(buffer, value, num_digits);
return copy_noinline<Char>(buffer, buffer + num_digits, out);
} | O0 | c | fmt::v11::basic_appender<char> fmt::v11::detail::format_decimal<char, unsigned int, fmt::v11::basic_appender<char>, 0>(fmt::v11::basic_appender<char>, unsigned int, int):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdx
movq %rdx, 0x88(%rsp)
movq %rax, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x7c(%rsp), %edi
callq 0xa6a90
movl %eax, %eax
movl %eax, %esi
movq 0x68(%rsp), %rdi
callq 0xac920
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0xad798
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rdx
movl 0x7c(%rsp), %ecx
movq %rdx, 0x58(%rsp)
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0xad920
movq 0xa8(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xad7fb
leaq 0x20(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rdx
movl 0x7c(%rsp), %ecx
movq %rdx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xad920
leaq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movslq 0x7c(%rsp), %rax
addq %rax, %rsi
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdx
callq 0xacca0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax,%rax)
| _ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_28], rsi
mov [rsp+0B8h+var_20], rdx
mov rax, [rsp+0B8h+var_28]
mov rdx, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_30], rdx
mov [rsp+0B8h+var_38], rax
mov [rsp+0B8h+var_3C], ecx
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_50], rax
mov edi, [rsp+0B8h+var_3C]
call _ZN3fmt3v116detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v11::detail::to_unsigned<int>(int)
mov eax, eax
mov esi, eax
mov rdi, [rsp+0B8h+var_50]
call _ZN3fmt3v116detail10to_pointerIcEEPT_NS0_14basic_appenderIS3_EEm; fmt::v11::detail::to_pointer<char>(fmt::v11::basic_appender<char>,ulong)
mov [rsp+0B8h+var_48], rax
cmp [rsp+0B8h+var_48], 0
jz short loc_AD798
mov rdi, [rsp+0B8h+var_48]
mov rax, [rsp+0B8h+var_38]
mov rdx, [rsp+0B8h+var_30]
mov ecx, [rsp+0B8h+var_3C]
mov [rsp+0B8h+var_60], rdx
mov [rsp+0B8h+var_68], rax
mov rsi, [rsp+0B8h+var_68]
mov rdx, [rsp+0B8h+var_60]
call _ZN3fmt3v116detail17do_format_decimalIcoEEPT_S4_T0_i; fmt::v11::detail::do_format_decimal<char,unsigned __int128>(char *,unsigned __int128,int)
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_8], rax
jmp short loc_AD7FB
loc_AD798:
lea rdi, [rsp+0B8h+var_98]
mov rax, [rsp+0B8h+var_38]
mov rdx, [rsp+0B8h+var_30]
mov ecx, [rsp+0B8h+var_3C]
mov [rsp+0B8h+var_A0], rdx
mov [rsp+0B8h+var_A8], rax
mov rsi, [rsp+0B8h+var_A8]
mov rdx, [rsp+0B8h+var_A0]
call _ZN3fmt3v116detail17do_format_decimalIcoEEPT_S4_T0_i; fmt::v11::detail::do_format_decimal<char,unsigned __int128>(char *,unsigned __int128,int)
lea rdi, [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_98]
movsxd rax, [rsp+0B8h+var_3C]
add rsi, rax
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_B0], rax
mov rdx, [rsp+0B8h+var_B0]
call _ZN3fmt3v116detail13copy_noinlineIcPcNS0_14basic_appenderIcEEEET1_T0_S7_S6_; fmt::v11::detail::copy_noinline<char,char *,fmt::v11::basic_appender<char>>(char *,char *,fmt::v11::basic_appender<char>)
mov [rsp+0B8h+var_8], rax
loc_AD7FB:
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i(
long long a1,
long long a2,
long long a3,
int a4)
{
unsigned int v4; // eax
long long v5; // rcx
long long v6; // r8
long long v7; // r9
_BYTE v9[48]; // [rsp+20h] [rbp-98h] BYREF
long long v10; // [rsp+50h] [rbp-68h]
long long v11; // [rsp+58h] [rbp-60h]
long long v12; // [rsp+68h] [rbp-50h]
long long v13; // [rsp+70h] [rbp-48h]
unsigned int v14; // [rsp+7Ch] [rbp-3Ch]
long long v15; // [rsp+80h] [rbp-38h]
long long v16; // [rsp+88h] [rbp-30h]
long long v17; // [rsp+90h] [rbp-28h]
long long v18; // [rsp+98h] [rbp-20h]
long long v19; // [rsp+A8h] [rbp-10h]
v19 = a1;
v17 = a2;
v18 = a3;
v16 = a3;
v15 = a2;
v14 = a4;
v12 = a1;
v4 = fmt::v11::detail::to_unsigned<int>(a4);
v13 = fmt::v11::detail::to_pointer<char>(a1, v4);
if ( v13 )
{
v11 = v16;
v10 = v15;
fmt::v11::detail::do_format_decimal<char,unsigned __int128>(v13, v15, v16, v14);
return v19;
}
else
{
fmt::v11::detail::do_format_decimal<char,unsigned __int128>(v9, v15, v16, v14);
return fmt::v11::detail::copy_noinline<char,char *,fmt::v11::basic_appender<char>>(
(long long)v9,
(long long)&v9[v14],
v19,
v5,
v6,
v7);
}
}
| _ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0x90],RSI
MOV qword ptr [RSP + 0x98],RDX
MOV RAX,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x88],RDX
MOV qword ptr [RSP + 0x80],RAX
MOV dword ptr [RSP + 0x7c],ECX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x68],RAX
MOV EDI,dword ptr [RSP + 0x7c]
CALL 0x001a6a90
MOV EAX,EAX
MOV ESI,EAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x001ac920
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JZ 0x001ad798
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV ECX,dword ptr [RSP + 0x7c]
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x001ad920
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001ad7fb
LAB_001ad798:
LEA RDI,[RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV ECX,dword ptr [RSP + 0x7c]
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x001ad920
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x7c]
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x001acca0
MOV qword ptr [RSP + 0xb0],RAX
LAB_001ad7fb:
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int8
_ZN3fmt3v116detail14format_decimalIcoNS0_14basic_appenderIcEETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEES8_S8_T0_i
(int8 param_1,char *param_2,int8 param_3,int param_4)
{
int4 uVar1;
detail local_98 [48];
char *local_68;
int8 local_60;
int8 local_50;
detail *local_48;
int local_3c;
char *local_38;
int8 local_30;
char *local_28;
int8 local_20;
int8 local_10;
int8 local_8;
local_50 = param_1;
local_3c = param_4;
local_38 = param_2;
local_30 = param_3;
local_28 = param_2;
local_20 = param_3;
local_10 = param_1;
uVar1 = fmt::v11::detail::to_unsigned<int>(param_4);
local_48 = (detail *)fmt::v11::detail::to_pointer<char>(local_50,uVar1);
if (local_48 == (detail *)0x0) {
fmt::v11::detail::do_format_decimal<char,unsigned__int128>
(local_98,local_38,(uint)local_30,local_3c);
local_8 = fmt::v11::detail::copy_noinline<char,char*,fmt::v11::basic_appender<char>>
(local_98,local_98 + local_3c,local_10);
}
else {
local_60 = local_30;
local_68 = local_38;
fmt::v11::detail::do_format_decimal<char,unsigned__int128>
(local_48,local_38,(uint)local_30,local_3c);
local_8 = local_10;
}
return local_8;
}
| |
23,047 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O1 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x1b250
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1b7d0
movl %eax, %r12d
testl %eax, %eax
js 0x75b0a
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1b250
jmp 0x75b35
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1b250
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1b7d0
cmpl %r12d, %eax
jne 0x75b47
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7cf73(%rip), %rdi # 0xf2ac1
leaq 0x7a12e(%rip), %rdx # 0xefc83
leaq 0x7d5f8(%rip), %rcx # 0xf3154
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x1be90
jmp 0x75b6c
jmp 0x75b6c
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x75b83
movq (%r13), %rsi
incq %rsi
callq 0x1b8c0
movq %r14, %rdi
callq 0x1bf90
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_75B0A
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_75B35
loc_75B0A:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_75B47
loc_75B35:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_75B47:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_75B6C
jmp short $+2
loc_75B6C:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_75B83
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75B83:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, unsigned __int8 a4)
{
long long v4; // rax
_QWORD *v7; // r13
int v8; // eax
long long v9; // r12
long long v11; // r14
long long v12; // [rsp-8h] [rbp-38h]
long long v13; // [rsp-8h] [rbp-38h]
v12 = v4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4, v12);
if ( v8 < 0 )
{
v9 = (unsigned int)-v8;
std::string::resize(a1, v9, 0LL);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4, v13) != (_DWORD)v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v11);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00175ace:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x0011b250
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00175ae0:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011b7d0
MOV R12D,EAX
TEST EAX,EAX
JS 0x00175b0a
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0011b250
JMP 0x00175b35
LAB_00175b0a:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x0011b250
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00175b20:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011b7d0
CMP EAX,R12D
JNZ 0x00175b47
LAB_00175b35:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00175b47:
LEA RDI,[0x1f2ac1]
LEA RDX,[0x1efc83]
LEA RCX,[0x1f3154]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x0011be90
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00175ace to 00175ad9 has its CatchHandler @ 00175b6a */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 00175ae0 to 00175b19 has its CatchHandler @ 00175b6c */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 00175b20 to 00175b67 has its CatchHandler @ 00175b68 */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
| |
23,048 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O3 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x1b250
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1b7d0
movl %eax, %r12d
testl %eax, %eax
js 0x761a2
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1b250
jmp 0x761cd
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1b250
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1b7d0
cmpl %r12d, %eax
jne 0x761df
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a8cb(%rip), %rdi # 0xf0ab1
leaq 0x77a96(%rip), %rdx # 0xedc83
leaq 0x7af50(%rip), %rcx # 0xf1144
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x1be90
jmp 0x76204
jmp 0x76204
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x7621b
movq (%r13), %rsi
incq %rsi
callq 0x1b8c0
movq %r14, %rdi
callq 0x1bf90
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_761A2
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_761CD
loc_761A2:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_761DF
loc_761CD:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_761DF:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_76204
jmp short $+2
loc_76204:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_7621B
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7621B:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
unsigned __int8 v5; // r15
_QWORD *v7; // r13
int v8; // eax
long long v9; // rcx
long long v10; // r12
long long v12; // r14
long long v13; // [rsp-8h] [rbp-38h]
long long v14; // [rsp-8h] [rbp-38h]
v13 = v4;
v5 = a4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL, a4);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v13);
if ( v8 < 0 )
{
v10 = (unsigned int)-v8;
std::string::resize(a1, v10, 0LL, v9);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v14) != (_DWORD)v10 )
{
v12 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v12);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL, v9);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00176166:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x0011b250
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00176178:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011b7d0
MOV R12D,EAX
TEST EAX,EAX
JS 0x001761a2
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0011b250
JMP 0x001761cd
LAB_001761a2:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x0011b250
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_001761b8:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011b7d0
CMP EAX,R12D
JNZ 0x001761df
LAB_001761cd:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001761df:
LEA RDI,[0x1f0ab1]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f1144]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x0011be90
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00176166 to 00176171 has its CatchHandler @ 00176202 */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 00176178 to 001761b1 has its CatchHandler @ 00176204 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 001761b8 to 001761ff has its CatchHandler @ 00176200 */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
| |
23,049 | Item_func_group_concat::clear() | eloqsql/sql/item_sum.cc | void Item_func_group_concat::clear()
{
result.length(0);
result.copy();
null_value= TRUE;
warning_for_row= FALSE;
result_finalized= false;
if (offset_limit)
copy_offset_limit= offset_limit->val_int();
if (row_limit)
copy_row_limit= row_limit->val_int();
if (tree)
{
reset_tree(tree);
tree_len= 0;
}
if (unique_filter)
unique_filter->reset();
if (table && table->blob_storage)
table->blob_storage->reset();
/* No need to reset the table as we never call write_row */
} | O0 | cpp | Item_func_group_concat::clear():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x110, %rdi # imm = 0x110
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x857e00
movq -0x10(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
callq 0xc12000
movq -0x10(%rbp), %rax
movb $0x1, 0x64(%rax)
movb $0x0, 0x415(%rax)
movb $0x0, 0x418(%rax)
cmpq $0x0, 0x428(%rax)
je 0xdf881a
movq -0x10(%rbp), %rax
movq 0x428(%rax), %rdi
movq (%rdi), %rax
callq *0xf0(%rax)
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x438(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x420(%rax)
je 0xdf884a
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rdi
movq (%rdi), %rax
callq *0xf0(%rax)
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x440(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x3d0(%rax)
je 0xdf8877
movq -0x10(%rbp), %rax
movq 0x3d0(%rax), %rdi
callq 0x132e720
movq -0x10(%rbp), %rax
movq $0x0, 0x3d8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x3e8(%rax)
je 0xdf8895
movq -0x10(%rbp), %rax
movq 0x3e8(%rax), %rdi
callq 0xb299a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x3f0(%rax)
je 0xdf88cf
movq -0x10(%rbp), %rax
movq 0x3f0(%rax), %rax
cmpq $0x0, 0x330(%rax)
je 0xdf88cf
movq -0x10(%rbp), %rax
movq 0x3f0(%rax), %rax
movq 0x330(%rax), %rdi
callq 0xdfb320
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN22Item_func_group_concat5clearEv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_10], rdi
add rdi, 110h
add rdi, 8; this
xor eax, eax
mov esi, eax; unsigned __int64
call _ZN13Binary_string6lengthEm; Binary_string::length(ulong)
mov rdi, [rbp+var_10]
add rdi, 110h; this
call _ZN6String4copyEv; String::copy(void)
mov rax, [rbp+var_10]
mov byte ptr [rax+64h], 1
mov byte ptr [rax+415h], 0
mov byte ptr [rax+418h], 0
cmp qword ptr [rax+428h], 0
jz short loc_DF881A
mov rax, [rbp+var_10]
mov rdi, [rax+428h]
mov rax, [rdi]
call qword ptr [rax+0F0h]
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+438h], rcx
loc_DF881A:
mov rax, [rbp+var_10]
cmp qword ptr [rax+420h], 0
jz short loc_DF884A
mov rax, [rbp+var_10]
mov rdi, [rax+420h]
mov rax, [rdi]
call qword ptr [rax+0F0h]
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+440h], rcx
loc_DF884A:
mov rax, [rbp+var_10]
cmp qword ptr [rax+3D0h], 0
jz short loc_DF8877
mov rax, [rbp+var_10]
mov rdi, [rax+3D0h]
call reset_tree
mov rax, [rbp+var_10]
mov qword ptr [rax+3D8h], 0
loc_DF8877:
mov rax, [rbp+var_10]
cmp qword ptr [rax+3E8h], 0
jz short loc_DF8895
mov rax, [rbp+var_10]
mov rdi, [rax+3E8h]; this
call _ZN6Unique5resetEv; Unique::reset(void)
loc_DF8895:
mov rax, [rbp+var_10]
cmp qword ptr [rax+3F0h], 0
jz short loc_DF88CF
mov rax, [rbp+var_10]
mov rax, [rax+3F0h]
cmp qword ptr [rax+330h], 0
jz short loc_DF88CF
mov rax, [rbp+var_10]
mov rax, [rax+3F0h]
mov rdi, [rax+330h]; this
call _ZN16Blob_mem_storage5resetEv; Blob_mem_storage::reset(void)
loc_DF88CF:
add rsp, 10h
pop rbp
retn
| Item_func_group_concat * Item_func_group_concat::clear(Item_func_group_concat *this)
{
Item_func_group_concat *result; // rax
Binary_string::length((Item_func_group_concat *)((char *)this + 280), 0);
String::copy((Item_func_group_concat *)((char *)this + 272));
*((_BYTE *)this + 100) = 1;
*((_BYTE *)this + 1045) = 0;
*((_BYTE *)this + 1048) = 0;
if ( *((_QWORD *)this + 133) )
*((_QWORD *)this + 135) = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 133) + 240LL))(*((_QWORD *)this + 133));
if ( *((_QWORD *)this + 132) )
*((_QWORD *)this + 136) = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 132) + 240LL))(*((_QWORD *)this + 132));
if ( *((_QWORD *)this + 122) )
{
reset_tree(*((_QWORD *)this + 122));
*((_QWORD *)this + 123) = 0LL;
}
if ( *((_QWORD *)this + 125) )
Unique::reset(*((Unique **)this + 125));
result = this;
if ( *((_QWORD *)this + 126) )
{
result = (Item_func_group_concat *)*((_QWORD *)this + 126);
if ( *((_QWORD *)result + 102) )
return (Item_func_group_concat *)Blob_mem_storage::reset(*(Blob_mem_storage **)(*((_QWORD *)this + 126) + 816LL));
}
return result;
}
| ~Field_float:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00df8780
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xd0
CALL 0x00a5a630
ADD RSP,0x10
POP RBP
RET
|
/* Field_float::~Field_float() */
void __thiscall Field_float::~Field_float(Field_float *this)
{
~Field_float(this);
Field::operator_delete(this,0xd0);
return;
}
| |
23,050 | common_arg::common_arg(std::initializer_list<char const*> const&, char 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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | llama.cpp/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const char * value_hint_2,
const std::string & help,
void (*handler)(common_params & params, const std::string &, const std::string &)
) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {} | O3 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char 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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x7(%rsp), %rcx
leaq 0x6(%rsp), %r8
movl $0x1, %edx
callq 0x83678
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), %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x5(%rsp), %rcx
movq %rbp, %rdi
callq 0x836fa
movq %r13, 0x78(%rbx)
movq %r12, 0x80(%rbx)
movq $0x0, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x27ffe
movb $0x0, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0xc8(%rbx)
movq $0x0, 0xd0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x63ffa
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x21170
jmp 0x63ffa
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x83740
movq %rbx, %rdi
callq 0x83740
movq %r14, %rdi
callq 0x21af0
nop
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+48h+var_34]
mov dword ptr [rsi], 0
lea rcx, [rsp+48h+var_41]
lea r8, [rsp+48h+var_42]
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 rbp, [rbx+60h]
mov rsi, [r14]
mov rdx, [r14+8]
lea rcx, [rsp+48h+var_43]
mov rdi, rbp
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r13
mov [rbx+80h], r12
mov qword ptr [rbx+88h], 0
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
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
xorps xmm0, xmm0
movups xmmword ptr [rbx+0B8h], xmm0
mov rax, [rsp+48h+var_40]
mov [rbx+0C8h], rax
mov qword ptr [rbx+0D0h], 0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbp+0]; void *
test rdi, rdi
jz short loc_63FFA
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_63FFA
mov r14, rax
loc_63FFA:
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, long long a6)
{
long long result; // rax
char v10; // [rsp+5h] [rbp-43h] BYREF
char v11; // [rsp+6h] [rbp-42h] BYREF
char v12; // [rsp+7h] [rbp-41h] BYREF
long long v13; // [rsp+8h] [rbp-40h]
_DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF
v13 = a6;
v14[0] = 0;
std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11);
*(_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], &v10);
*(_QWORD *)(a1 + 120) = a3;
*(_QWORD *)(a1 + 128) = a4;
*(_QWORD *)(a1 + 136) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_OWORD *)(a1 + 184) = 0LL;
result = v13;
*(_QWORD *)(a1 + 200) = v13;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x14]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0x7]
LEA R8,[RSP + 0x6]
MOV EDX,0x1
CALL 0x00183678
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 RBP,[RBX + 0x60]
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_00163f5f:
LEA RCX,[RSP + 0x5]
MOV RDI,RBP
CALL 0x001836fa
MOV qword ptr [RBX + 0x78],R13
MOV qword ptr [RBX + 0x80],R12
MOV qword ptr [RBX + 0x88],0x0
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00163fa1:
CALL 0x00127ffe
LAB_00163fa6:
MOV byte ptr [RBX + 0xb0],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0xc8],RAX
MOV qword ptr [RBX + 0xd0],0x0
ADD RSP,0x18
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*, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&,
std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4,
_func_void_common_params_ptr_string_ptr_string_ptr *param_5)
{
int1 local_43;
int1 local_42;
int1 local_41;
_func_void_common_params_ptr_string_ptr_string_ptr *local_40;
int4 local_34;
local_34 = 0;
local_40 = param_5;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_34,1,&local_41,&local_42);
*(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 00163f5f to 00163f6b has its CatchHandler @ 00163ff7 */
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),&local_43);
*(char **)(this + 0x78) = param_2;
*(char **)(this + 0x80) = param_3;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 00163fa1 to 00163fa5 has its CatchHandler @ 00163fdd */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_4,*(long *)(param_4 + 8) + *(long *)param_4);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
23,051 | google::protobuf::UnknownField::GetLengthDelimitedSize() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/unknown_field_set.h | inline size_t UnknownField::GetLengthDelimitedSize() const {
GOOGLE_DCHECK_EQ(TYPE_LENGTH_DELIMITED, type());
return data_.length_delimited_.string_value->size();
} | O0 | c | google::protobuf::UnknownField::GetLengthDelimitedSize() const:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x201d6e
jmp 0x201e15
movq 0x18(%rsp), %rdi
callq 0x1e79e0
movl %eax, %ecx
movb $0x0, 0x37(%rsp)
movl $0x3, %eax
cmpl %ecx, %eax
jne 0x201d8a
jmp 0x201dda
leaq 0x1e8237(%rip), %rdx # 0x3e9fc8
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x3, %esi
movl $0x18a, %ecx # imm = 0x18A
callq 0x19a670
movq 0x8(%rsp), %rdi
movb $0x1, 0x37(%rsp)
leaq 0x1e77ec(%rip), %rsi # 0x3e95a7
callq 0x199f30
movq %rax, 0x10(%rsp)
jmp 0x201dc7
movq 0x10(%rsp), %rsi
leaq 0x23(%rsp), %rdi
callq 0x19a0e0
jmp 0x201dd8
jmp 0x201dda
testb $0x1, 0x37(%rsp)
jne 0x201de3
jmp 0x201ded
leaq 0x38(%rsp), %rdi
callq 0x19a6b0
jmp 0x201d63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x201e09
jmp 0x201e13
leaq 0x38(%rsp), %rdi
callq 0x19a6b0
jmp 0x201e28
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x96720
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNK6google8protobuf12UnknownField22GetLengthDelimitedSizeEv:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_60], rax
loc_201D63:
xor eax, eax
test al, 1
jnz short loc_201D6E
jmp loc_201E15
loc_201D6E:
mov rdi, [rsp+78h+var_60]; this
call _ZNK6google8protobuf12UnknownField4typeEv; google::protobuf::UnknownField::type(void)
mov ecx, eax
mov [rsp+78h+var_41], 0
mov eax, 3
cmp eax, ecx
jnz short loc_201D8A
jmp short loc_201DDA
loc_201D8A:
lea rdx, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_70], rdi
mov esi, 3
mov ecx, 18Ah
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_41], 1
lea rsi, aCheckFailedTyp_0; "CHECK failed: (TYPE_LENGTH_DELIMITED) ="...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+78h+var_68], rax
jmp short $+2
loc_201DC7:
mov rsi, [rsp+78h+var_68]
lea rdi, [rsp+78h+var_55]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_201DD8:
jmp short $+2
loc_201DDA:
test [rsp+78h+var_41], 1
jnz short loc_201DE3
jmp short loc_201DED
loc_201DE3:
lea rdi, [rsp+78h+var_40]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_201DED:
jmp loc_201D63
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
test [rsp+arg_2F], 1
jnz short loc_201E09
jmp short loc_201E13
loc_201E09:
lea rdi, [rsp+arg_30]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_201E13:
jmp short loc_201E28
loc_201E15:
mov rax, [rsp+78h+var_60]
mov rdi, [rax+8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
add rsp, 78h
retn
loc_201E28:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long google::protobuf::UnknownField::GetLengthDelimitedSize(google::protobuf::UnknownField *this)
{
google::protobuf::UnknownField *v2; // [rsp+70h] [rbp-8h]
v2 = this;
return std::string::size(*((_QWORD *)this + 1));
}
| __uninit_default_n<char*,unsigned_long>:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
CMP qword ptr [RSP + 0x8],0x0
JBE 0x00201da2
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP]
CALL 0x00191f30
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
SUB RSI,0x1
MOV RDX,qword ptr [RSP]
CALL 0x0018eb50
MOV qword ptr [RSP + 0x10],RAX
LAB_00201da2:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x18
RET
|
/* char* std::__uninitialized_default_n_1<true>::__uninit_default_n<char*, unsigned long>(char*,
unsigned long) */
char * std::__uninitialized_default_n_1<true>::__uninit_default_n<char*,unsigned_long>
(char *param_1,ulong param_2)
{
char *local_8;
local_8 = param_1;
if (param_2 != 0) {
_Construct<char>(param_1);
local_8 = fill_n<char*,unsigned_long,char>(param_1 + 1,param_2 - 1,param_1);
}
return local_8;
}
| |
23,052 | bitmap_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O3 | c | bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xa0ea2
cmpq $0x0, 0x40(%rdi)
jne 0xa0ef5
callq 0x2a220
movq (%rbx), %rax
movl %r14d, %edx
andb $0x7, %r14b
movl $0x1, %r15d
movl %r14d, %ecx
shll %cl, %r15d
shrl $0x3, %edx
movb (%rax,%rdx), %r14b
movl %r15d, %ecx
notb %cl
andb %r14b, %cl
movb %cl, (%rax,%rdx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0xa0ee4
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xa0f08
movq %rbx, %rdi
callq 0x2a1e0
andb %r15b, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x43084(%rip), %rsi # 0xe3f80
movl $0x81, %edx
callq 0x30603
jmp 0xa0ea2
leaq 0x2ee349(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa0edc
| bitmap_test_and_clear:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_A0EA2
cmp qword ptr [rdi+40h], 0
jnz short loc_A0EF5
call _pthread_mutex_lock
loc_A0EA2:
mov rax, [rbx]
mov edx, r14d
and r14b, 7
mov r15d, 1
mov ecx, r14d
shl r15d, cl
shr edx, 3
mov r14b, [rax+rdx]
mov ecx, r15d
not cl
and cl, r14b
mov [rax+rdx], cl
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_A0EE4
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_A0F08
loc_A0EDC:
mov rdi, rbx
call _pthread_mutex_unlock
loc_A0EE4:
and r14b, r15b
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_A0EF5:
lea rsi, aWorkspaceLlm4b_41; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_A0EA2
loc_A0F08:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A0EDC
| long long bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // r14d
long long v4; // rdi
int v5; // r15d
long long v6; // rdx
long long v7; // rbx
long long v8; // rdi
v2 = a2;
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v4);
}
v5 = 1 << (a2 & 7);
v6 = a2 >> 3;
LOBYTE(v2) = *(_BYTE *)(*a1 + v6);
*(_BYTE *)(*a1 + v6) = v2 & ~(_BYTE)v5;
v7 = a1[2];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 64);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v7);
}
LOBYTE(v2) = v5 & v2;
return v2;
}
| bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x001a0ea2
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x001a0ef5
CALL 0x0012a220
LAB_001a0ea2:
MOV RAX,qword ptr [RBX]
MOV EDX,R14D
AND R14B,0x7
MOV R15D,0x1
MOV ECX,R14D
SHL R15D,CL
SHR EDX,0x3
MOV R14B,byte ptr [RAX + RDX*0x1]
MOV ECX,R15D
NOT CL
AND CL,R14B
MOV byte ptr [RAX + RDX*0x1],CL
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x001a0ee4
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001a0f08
LAB_001a0edc:
MOV RDI,RBX
CALL 0x0012a1e0
LAB_001a0ee4:
AND R14B,R15B
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001a0ef5:
LEA RSI,[0x1e3f80]
MOV EDX,0x81
CALL 0x00130603
JMP 0x001a0ea2
LAB_001a0f08:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a0edc
|
int8 bitmap_test_and_clear(long *param_1,uint param_2)
{
byte bVar1;
pthread_mutex_t *ppVar2;
byte bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = ~bVar3 & bVar1;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3);
}
| |
23,053 | 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>, double, 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&, double&) | hkr04[P]cpp-mcp/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>, double, 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&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0xecc8
cmpl $0x7, %eax
je 0xecc0
cmpl $0x6, %eax
jne 0xecdb
movsd 0x8(%r14), %xmm1
unpcklps 0xd556(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xd55e(%rip), %xmm1 # 0x1c210
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0xecce
movsd 0x8(%r14), %xmm0
jmp 0xecce
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x5220
movq %rax, %rbx
movq %r14, %rdi
callq 0x7c14
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xdf9b(%rip), %rsi # 0x1cc98
leaq 0x10(%rsp), %rdi
callq 0xadf2
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x7ac8
xorl %ebp, %ebp
leaq 0x1cb48(%rip), %rsi # 0x2b870
leaq -0x6af5(%rip), %rdx # 0x823a
movq %rbx, %rdi
callq 0x5730
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x51d0
testb %bpl, %bpl
jne 0xed4e
jmp 0xed56
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5750
| _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; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_ECC8
cmp eax, 7
jz short loc_ECC0
cmp eax, 6
jnz short loc_ECDB
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_1C200
subpd xmm1, cs:xmmword_1C210
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_ECCE
loc_ECC0:
movsd xmm0, qword ptr [r14+8]
jmp short loc_ECCE
loc_ECC8:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_ECCE:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_ECDB:
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]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_ED4E
jmp short loc_ED56
mov r14, rax
loc_ED4E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_ED56:
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::type_error *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_BYTE v7[56]; // [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_1C200),
(__m128d)xmmword_1C210);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__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,
0x12Eu,
(long long)v7,
(long long)a1);
__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 0x0010ecc8
CMP EAX,0x7
JZ 0x0010ecc0
CMP EAX,0x6
JNZ 0x0010ecdb
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x0011c200]
SUBPD XMM1,xmmword ptr [0x0011c210]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x0010ecce
LAB_0010ecc0:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x0010ecce
LAB_0010ecc8:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_0010ecce:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0010ecdb:
PUSH 0x20
POP RDI
CALL 0x00105220
MOV RBX,RAX
MOV RDI,R14
CALL 0x00107c14
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0010ecf6:
LEA RSI,[0x11cc98]
LEA RDI,[RSP + 0x10]
CALL 0x0010adf2
MOV BPL,0x1
LAB_0010ed0a:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00107ac8
XOR EBP,EBP
LEA RSI,[0x12b870]
LEA RDX,[0x10823a]
MOV RDI,RBX
CALL 0x00105730
|
/* 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 0010ecf6 to 0010ed06 has its CatchHandler @ 0010ed4b */
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 0010ed0a to 0010ed36 has its CatchHandler @ 0010ed37 */
_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_0011c204,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_0011c218) +
((double)CONCAT44(_DAT_0011c200,(int)*(int8 *)(param_1 + 8)) - _DAT_0011c210);
}
*param_2 = dVar3;
return;
}
| |
23,054 | escape_quotes_for_mysql | eloqsql/mysys/charset.c | size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O0 | c | escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb1235
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0xb1240
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb13b0
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb1389
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0xb12ff
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xb13e0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0xb12ff
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0xb12bb
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xb1389
jmp 0xb12bd
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0xb12f1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xb12bd
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb1378
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0xb1348
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0xb1322
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xb1389
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0xb1376
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0xb135f
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xb1389
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xb1378
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb126e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_B1235
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_B1240
loc_B1235:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_B1240:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_B126E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_B1389
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_B12FF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_B12FF
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_B12BB
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_B1389
loc_B12BB:
jmp short $+2
loc_B12BD:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_B12F1
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_B12BD
loc_B12F1:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_B1378
loc_B12FF:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_B1348
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_B1322
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_B1389
loc_B1322:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_B1376
loc_B1348:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_B135F
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_B1389
loc_B135F:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_B1376:
jmp short $+2
loc_B1378:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_B126E
loc_B1389:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
| escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001b1235
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001b1240
LAB_001b1235:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_001b1240:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001b13b0
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_001b126e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b1389
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x001b12ff
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001b13e0
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x001b12ff
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001b12bb
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001b1389
LAB_001b12bb:
JMP 0x001b12bd
LAB_001b12bd:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x001b12f1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001b12bd
LAB_001b12f1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b1378
LAB_001b12ff:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x001b1348
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001b1322
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001b1389
LAB_001b1322:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x001b1376
LAB_001b1348:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001b135f
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001b1389
LAB_001b135f:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_001b1376:
JMP 0x001b1378
LAB_001b1378:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b126e
LAB_001b1389:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_001b1389:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_001b1389;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_001b1389;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_001b1389;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
| |
23,055 | stbi__jpeg_reset(stbi__jpeg*) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static void stbi__jpeg_reset(stbi__jpeg *j)
{
j->code_bits = 0;
j->code_buffer = 0;
j->nomore = 0;
j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0;
j->marker = STBI__MARKER_none;
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
j->eob_run = 0;
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
// since we don't even allow 1<<30 pixels
} | O0 | c | stbi__jpeg_reset(stbi__jpeg*):
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x0, 0x4824(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x4820(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x482c(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x47d8(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x4778(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x4718(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x46b8(%rax)
movq -0x8(%rsp), %rax
movb $-0x1, 0x4828(%rax)
movq -0x8(%rsp), %rax
cmpl $0x0, 0x4868(%rax)
je 0x29ad9
movq -0x8(%rsp), %rax
movl 0x4868(%rax), %eax
movl %eax, -0xc(%rsp)
jmp 0x29ae4
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movl %eax, -0xc(%rsp)
jmp 0x29ae4
movl -0xc(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x486c(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x4844(%rax)
retq
nopw %cs:(%rax,%rax)
| _ZL16stbi__jpeg_resetP10stbi__jpeg:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov dword ptr [rax+4824h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+4820h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+482Ch], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+47D8h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+4778h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+4718h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+46B8h], 0
mov rax, [rsp+var_8]
mov byte ptr [rax+4828h], 0FFh
mov rax, [rsp+var_8]
cmp dword ptr [rax+4868h], 0
jz short loc_29AD9
mov rax, [rsp+var_8]
mov eax, [rax+4868h]
mov [rsp+var_C], eax
jmp short loc_29AE4
loc_29AD9:
mov eax, 7FFFFFFFh
mov [rsp+var_C], eax
jmp short $+2
loc_29AE4:
mov ecx, [rsp+var_C]
mov rax, [rsp+var_8]
mov [rax+486Ch], ecx
mov rax, [rsp+var_8]
mov dword ptr [rax+4844h], 0
retn
| long long stbi__jpeg_reset(long long a1)
{
long long result; // rax
int v2; // [rsp+0h] [rbp-Ch]
*(_DWORD *)(a1 + 18468) = 0;
*(_DWORD *)(a1 + 18464) = 0;
*(_DWORD *)(a1 + 18476) = 0;
*(_DWORD *)(a1 + 18392) = 0;
*(_DWORD *)(a1 + 18296) = 0;
*(_DWORD *)(a1 + 18200) = 0;
*(_DWORD *)(a1 + 18104) = 0;
*(_BYTE *)(a1 + 18472) = -1;
if ( *(_DWORD *)(a1 + 18536) )
v2 = *(_DWORD *)(a1 + 18536);
else
v2 = 0x7FFFFFFF;
*(_DWORD *)(a1 + 18540) = v2;
result = a1;
*(_DWORD *)(a1 + 18500) = 0;
return result;
}
| stbi__jpeg_reset:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4824],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4820],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x482c],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x47d8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4778],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4718],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x46b8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV byte ptr [RAX + 0x4828],0xff
MOV RAX,qword ptr [RSP + -0x8]
CMP dword ptr [RAX + 0x4868],0x0
JZ 0x00129ad9
MOV RAX,qword ptr [RSP + -0x8]
MOV EAX,dword ptr [RAX + 0x4868]
MOV dword ptr [RSP + -0xc],EAX
JMP 0x00129ae4
LAB_00129ad9:
MOV EAX,0x7fffffff
MOV dword ptr [RSP + -0xc],EAX
JMP 0x00129ae4
LAB_00129ae4:
MOV ECX,dword ptr [RSP + -0xc]
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x486c],ECX
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4844],0x0
RET
|
/* stbi__jpeg_reset(stbi__jpeg*) */
void stbi__jpeg_reset(stbi__jpeg *param_1)
{
int4 local_c;
*(int4 *)(param_1 + 0x4824) = 0;
*(int4 *)(param_1 + 0x4820) = 0;
*(int4 *)(param_1 + 0x482c) = 0;
*(int4 *)(param_1 + 0x47d8) = 0;
*(int4 *)(param_1 + 0x4778) = 0;
*(int4 *)(param_1 + 0x4718) = 0;
*(int4 *)(param_1 + 0x46b8) = 0;
param_1[0x4828] = (stbi__jpeg)0xff;
if (*(int *)(param_1 + 0x4868) == 0) {
local_c = 0x7fffffff;
}
else {
local_c = *(int4 *)(param_1 + 0x4868);
}
*(int4 *)(param_1 + 0x486c) = local_c;
*(int4 *)(param_1 + 0x4844) = 0;
return;
}
| |
23,056 | mi_read_cache | eloqsql/storage/myisam/mi_cache.c | int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, size_t length,
int flag)
{
size_t read_length,in_buff_length;
my_off_t offset;
uchar *in_buff_pos;
DBUG_ENTER("_mi_read_cache");
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
if (pos < info->pos_in_file)
{
read_length=length;
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(size_t)(info->pos_in_file-pos);
info->seek_not_done=1;
if (mysql_file_pread(info->file, buff, read_length, pos, MYF(MY_NABP)))
DBUG_RETURN(1);
if (!(length-=read_length))
DBUG_RETURN(0);
pos+=read_length;
buff+=read_length;
}
if (pos >= info->pos_in_file &&
(offset= (my_off_t) (pos - info->pos_in_file)) <
(my_off_t) (info->read_end - info->request_pos))
{
in_buff_pos=info->request_pos+ (uint)offset;
in_buff_length= MY_MIN(length, (size_t)(info->read_end-in_buff_pos));
memcpy(buff,info->request_pos+(uint) offset, in_buff_length);
if (!(length-=in_buff_length))
DBUG_RETURN(0);
pos+=in_buff_length;
buff+=in_buff_length;
}
else
in_buff_length=0;
if (flag & READING_NEXT)
{
if (pos != (info->pos_in_file +
(uint) (info->read_end - info->request_pos)))
{
info->pos_in_file=pos; /* Force start here */
info->read_pos=info->read_end=info->request_pos; /* Everything used */
info->seek_not_done=1;
}
else
info->read_pos=info->read_end; /* All block used */
if (!_my_b_read(info,buff,length))
DBUG_RETURN(0);
read_length=info->error;
}
else
{
info->seek_not_done=1;
if ((read_length= mysql_file_pread(info->file, buff, length, pos,
MYF(0))) == length)
DBUG_RETURN(0);
}
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
{
DBUG_PRINT("error",
("Error %d reading next-multi-part block (Got %d bytes)",
my_errno, (int) read_length));
if (!my_errno || my_errno == -1 || my_errno == HA_ERR_FILE_TOO_SHORT)
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
bzero(buff+read_length,MI_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
read_length);
DBUG_RETURN(0);
} | O3 | c | mi_read_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, -0x34(%rbp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq (%rdi), %rax
movq %rax, %r14
subq %rdx, %r14
jbe 0xa9eb7
cmpq %rcx, %r14
movq %rcx, -0x40(%rbp)
cmovaeq %rcx, %r14
movl $0x1, 0xe0(%r13)
movl 0xd4(%r13), %ebx
leaq 0x304bc7(%rip), %rax # 0x3aea18
movq (%rax), %rax
leaq -0x90(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
movq %r15, -0x30(%rbp)
jne 0xaa03f
movl $0x4, %r8d
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xbfbd0
movq %rax, %r15
movl $0x1, %ebx
testq %r15, %r15
movq -0x40(%rbp), %rcx
jne 0xaa02e
subq %r14, %rcx
je 0xa9ff4
addq %r14, %r12
movq -0x30(%rbp), %r15
addq %r14, %r15
movq (%r13), %rax
movq %r12, %rdx
subq %rax, %rdx
jb 0xa9f0d
movq 0x18(%r13), %r14
movq 0x28(%r13), %rsi
movq %r14, %rax
subq %rsi, %rax
xorl %ebx, %ebx
cmpq %rax, %rdx
jae 0xa9f0d
movl %edx, %eax
addq %rax, %rsi
subq %rsi, %r14
cmpq %r14, %rcx
cmovbq %rcx, %r14
movq %r15, -0x30(%rbp)
movq %r15, %rdi
movq %r14, %rdx
movq %rcx, %r15
callq 0x2a0b0
movq %r15, %rcx
subq %r14, %rcx
je 0xaa02e
addq %r14, %r12
movq -0x30(%rbp), %r15
addq %r14, %r15
jmp 0xa9f10
xorl %r14d, %r14d
testb $0x1, -0x34(%rbp)
jne 0xa9f7d
movq %rcx, -0x40(%rbp)
movq %r15, -0x30(%rbp)
movl $0x1, 0xe0(%r13)
movl 0xd4(%r13), %ebx
leaq 0x304ae1(%rip), %r13 # 0x3aea18
movq (%r13), %rax
leaq -0x90(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0xaa0a3
movl %ebx, %edi
movq -0x30(%rbp), %r15
movq %r15, %rsi
movq -0x40(%rbp), %r13
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0xbfbd0
movq %rax, %rbx
cmpq %r13, %rbx
jne 0xa9fc5
jmp 0xa9ff4
movq 0x18(%r13), %rsi
movq 0x28(%r13), %rax
movl %esi, %edx
subl %eax, %edx
addq (%r13), %rdx
cmpq %rdx, %r12
je 0xa9fa8
movq %r12, (%r13)
movq %rax, 0x18(%r13)
movl $0x1, 0xe0(%r13)
movq %rax, %rsi
movq %rsi, 0x10(%r13)
movq %r13, %rdi
movq %r15, %rsi
movq %rcx, %rdx
callq 0xb109e
testl %eax, %eax
je 0xa9ff4
movslq 0xe4(%r13), %rbx
testb $0x2, -0x34(%rbp)
je 0xa9ff8
movl %ebx, %eax
cmpl $-0x1, %eax
je 0xa9ff8
addq %rbx, %r14
cmpq $0x2, %r14
jbe 0xa9ff8
addq %rbx, %r15
movl $0x14, %edx
subq %r14, %rdx
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2a2e0
jmp 0xaa02e
xorl %ebx, %ebx
jmp 0xaa02e
callq 0xc14ee
cmpl $0x0, (%rax)
je 0xaa01e
callq 0xc14ee
cmpl $-0x1, (%rax)
je 0xaa01e
callq 0xc14ee
movl $0x1, %ebx
cmpl $0xaf, (%rax)
jne 0xaa02e
callq 0xc14ee
movl $0x7f, (%rax)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rcx
leaq 0x3049cf(%rip), %rax # 0x3aea18
movq (%rax), %rax
leaq 0x551c0(%rip), %rdx # 0xff213
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r14, %rsi
movl $0x35, %ecx
callq *0x210(%rax)
movl $0x4, %r8d
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xbfbd0
movq %rax, %r15
xorl %esi, %esi
testq %rax, %rax
cmoveq %r14, %rsi
leaq 0x304987(%rip), %rax # 0x3aea18
movq (%rax), %rax
movq -0x48(%rbp), %rdi
callq *0x218(%rax)
jmp 0xa9e8e
movq %rax, %r15
movq (%r13), %rax
leaq 0x55162(%rip), %rdx # 0xff213
movq %r15, %rdi
movq -0x40(%rbp), %r13
movq %r13, %rsi
movl $0x5d, %ecx
callq *0x210(%rax)
movl %ebx, %edi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0xbfbd0
movq %rax, %rbx
cmpq $-0x1, %rax
movl $0x0, %esi
cmovneq %rax, %rsi
leaq 0x304927(%rip), %rax # 0x3aea18
movq (%rax), %rax
movq %r15, %rdi
movq -0x30(%rbp), %r15
callq *0x218(%rax)
jmp 0xa9f76
nop
| _mi_read_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rbp+var_34], r8d
mov r12, rdx
mov r15, rsi
mov r13, rdi
mov rax, [rdi]
mov r14, rax
sub r14, rdx
jbe loc_A9EB7
cmp r14, rcx
mov [rbp+var_40], rcx
cmovnb r14, rcx
mov dword ptr [r13+0E0h], 1
mov ebx, [r13+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_90]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
mov [rbp+var_30], r15
jnz loc_AA03F
mov r8d, 4
mov edi, ebx
mov rsi, r15
mov rdx, r14
mov rcx, r12
call my_pread
mov r15, rax
loc_A9E8E:
mov ebx, 1
test r15, r15
mov rcx, [rbp+var_40]
jnz loc_AA02E
sub rcx, r14
jz loc_A9FF4
add r12, r14
mov r15, [rbp+var_30]
add r15, r14
mov rax, [r13+0]
loc_A9EB7:
mov rdx, r12
sub rdx, rax
jb short loc_A9F0D
mov r14, [r13+18h]
mov rsi, [r13+28h]
mov rax, r14
sub rax, rsi
xor ebx, ebx
cmp rdx, rax
jnb short loc_A9F0D
mov eax, edx
add rsi, rax
sub r14, rsi
cmp rcx, r14
cmovb r14, rcx
mov [rbp+var_30], r15
mov rdi, r15
mov rdx, r14
mov r15, rcx
call _memcpy
mov rcx, r15
sub rcx, r14
jz loc_AA02E
add r12, r14
mov r15, [rbp+var_30]
add r15, r14
jmp short loc_A9F10
loc_A9F0D:
xor r14d, r14d
loc_A9F10:
test byte ptr [rbp+var_34], 1
jnz short loc_A9F7D
mov [rbp+var_40], rcx
mov [rbp+var_30], r15
mov dword ptr [r13+0E0h], 1
mov ebx, [r13+0D4h]
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_90]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_AA0A3
mov edi, ebx
mov r15, [rbp+var_30]
mov rsi, r15
mov r13, [rbp+var_40]
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call my_pread
mov rbx, rax
loc_A9F76:
cmp rbx, r13
jnz short loc_A9FC5
jmp short loc_A9FF4
loc_A9F7D:
mov rsi, [r13+18h]
mov rax, [r13+28h]
mov edx, esi
sub edx, eax
add rdx, [r13+0]
cmp r12, rdx
jz short loc_A9FA8
mov [r13+0], r12
mov [r13+18h], rax
mov dword ptr [r13+0E0h], 1
mov rsi, rax
loc_A9FA8:
mov [r13+10h], rsi
mov rdi, r13
mov rsi, r15
mov rdx, rcx
call _my_b_read
test eax, eax
jz short loc_A9FF4
movsxd rbx, dword ptr [r13+0E4h]
loc_A9FC5:
test byte ptr [rbp+var_34], 2
jz short loc_A9FF8
mov eax, ebx
cmp eax, 0FFFFFFFFh
jz short loc_A9FF8
add r14, rbx
cmp r14, 2
jbe short loc_A9FF8
add r15, rbx
mov edx, 14h
sub rdx, r14
xor ebx, ebx
mov rdi, r15
xor esi, esi
call _memset
jmp short loc_AA02E
loc_A9FF4:
xor ebx, ebx
jmp short loc_AA02E
loc_A9FF8:
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_AA01E
call _my_thread_var
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_AA01E
call _my_thread_var
mov ebx, 1
cmp dword ptr [rax], 0AFh
jnz short loc_AA02E
loc_AA01E:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov ebx, 1
loc_AA02E:
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AA03F:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_49; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r14
mov ecx, 35h ; '5'
call qword ptr [rax+210h]
mov r8d, 4
mov edi, ebx
mov rsi, r15
mov rdx, r14
mov rcx, r12
call my_pread
mov r15, rax
xor esi, esi
test rax, rax
cmovz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
call qword ptr [rax+218h]
jmp loc_A9E8E
loc_AA0A3:
mov r15, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_49; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov r13, [rbp+var_40]
mov rsi, r13
mov ecx, 5Dh ; ']'
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call my_pread
mov rbx, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
mov esi, 0
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
mov r15, [rbp+var_30]
call qword ptr [rax+218h]
jmp loc_A9F76
| long long mi_read_cache(long long *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5)
{
unsigned long long v5; // r12
long long v6; // r15
unsigned long long v8; // rax
unsigned long long v9; // r14
unsigned int v10; // ebx
long long v11; // rax
long long v12; // r15
unsigned int v13; // ebx
unsigned long long v14; // rdx
long long v15; // rsi
long long v16; // rsi
unsigned long long v17; // r14
long long v18; // rdi
unsigned long long v19; // r15
unsigned int v20; // ebx
long long v21; // rax
long long v22; // rdi
unsigned long long v23; // r13
long long v24; // rbx
long long v25; // rsi
long long v26; // rax
unsigned long long v27; // r14
long long v28; // r15
unsigned long long v30; // rsi
long long v31; // r15
long long v32; // rax
long long v33; // rsi
_BYTE v34[72]; // [rsp+0h] [rbp-90h] BYREF
long long v35; // [rsp+48h] [rbp-48h]
unsigned long long v36; // [rsp+50h] [rbp-40h]
int v37; // [rsp+5Ch] [rbp-34h]
long long v38; // [rsp+60h] [rbp-30h]
v37 = a5;
v5 = a3;
v6 = a2;
v8 = *a1;
v9 = *a1 - a3;
if ( *a1 > a3 )
{
v36 = a4;
if ( v9 >= a4 )
v9 = a4;
*((_DWORD *)a1 + 56) = 1;
v10 = *((_DWORD *)a1 + 53);
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v10, 6LL);
v38 = a2;
if ( v11 )
{
v35 = v11;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v11,
v9,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",
53LL);
v12 = my_pread(v10, a2, v9, v5, 4LL);
v30 = 0LL;
if ( !v12 )
v30 = v9;
((void ( *)(long long, unsigned long long))PSI_server[67])(v35, v30);
}
else
{
v12 = my_pread(v10, a2, v9, v5, 4LL);
}
v13 = 1;
if ( v12 )
return v13;
a4 = v36 - v9;
if ( v36 == v9 )
return 0;
v5 += v9;
v6 = v9 + v38;
v8 = *a1;
}
v14 = v5 - v8;
if ( v5 < v8 || (v15 = a1[5], v13 = 0, v14 >= a1[3] - v15) )
{
v17 = 0LL;
}
else
{
v16 = (unsigned int)v14 + v15;
v17 = a1[3] - v16;
if ( a4 < v17 )
v17 = a4;
v38 = v6;
v18 = v6;
v19 = a4;
memcpy(v18, v16, v17);
a4 = v19 - v17;
if ( v19 == v17 )
return v13;
v5 += v17;
v6 = v17 + v38;
}
if ( (v37 & 1) != 0 )
{
v25 = a1[3];
v26 = a1[5];
if ( v5 != *a1 + (unsigned int)(v25 - v26) )
{
*a1 = v5;
a1[3] = v26;
*((_DWORD *)a1 + 56) = 1;
v25 = v26;
}
a1[2] = v25;
v22 = (long long)a1;
if ( !(unsigned int)my_b_read(a1, v6, a4) )
return 0;
v24 = *((int *)a1 + 57);
}
else
{
v36 = a4;
v38 = v6;
*((_DWORD *)a1 + 56) = 1;
v20 = *((_DWORD *)a1 + 53);
v21 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v20, 6LL);
if ( v21 )
{
v31 = v21;
v23 = v36;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v21,
v36,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",
93LL);
v32 = my_pread(v20, v38, v23, v5, 0LL);
v24 = v32;
v33 = 0LL;
if ( v32 != -1 )
v33 = v32;
v22 = v31;
v6 = v38;
((void ( *)(long long, long long))PSI_server[67])(v22, v33);
}
else
{
v22 = v20;
v6 = v38;
v23 = v36;
v24 = my_pread(v20, v38, v36, v5, 0LL);
}
if ( v24 == v23 )
return 0;
}
if ( (v37 & 2) == 0 || (_DWORD)v24 == -1 || (v27 = v24 + v17, v27 <= 2) )
{
if ( !*(_DWORD *)my_thread_var(v22)
|| *(_DWORD *)my_thread_var(v22) == -1
|| (v13 = 1, *(_DWORD *)my_thread_var(v22) == 175) )
{
*(_DWORD *)my_thread_var(v22) = 127;
return 1;
}
}
else
{
v28 = v24 + v6;
v13 = 0;
memset(v28, 0LL, 20 - v27);
}
return v13;
}
| _mi_read_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV dword ptr [RBP + -0x34],R8D
MOV R12,RDX
MOV R15,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI]
MOV R14,RAX
SUB R14,RDX
JBE 0x001a9eb7
CMP R14,RCX
MOV qword ptr [RBP + -0x40],RCX
CMOVNC R14,RCX
MOV dword ptr [R13 + 0xe0],0x1
MOV EBX,dword ptr [R13 + 0xd4]
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x90]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
MOV qword ptr [RBP + -0x30],R15
JNZ 0x001aa03f
MOV R8D,0x4
MOV EDI,EBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
CALL 0x001bfbd0
MOV R15,RAX
LAB_001a9e8e:
MOV EBX,0x1
TEST R15,R15
MOV RCX,qword ptr [RBP + -0x40]
JNZ 0x001aa02e
SUB RCX,R14
JZ 0x001a9ff4
ADD R12,R14
MOV R15,qword ptr [RBP + -0x30]
ADD R15,R14
MOV RAX,qword ptr [R13]
LAB_001a9eb7:
MOV RDX,R12
SUB RDX,RAX
JC 0x001a9f0d
MOV R14,qword ptr [R13 + 0x18]
MOV RSI,qword ptr [R13 + 0x28]
MOV RAX,R14
SUB RAX,RSI
XOR EBX,EBX
CMP RDX,RAX
JNC 0x001a9f0d
MOV EAX,EDX
ADD RSI,RAX
SUB R14,RSI
CMP RCX,R14
CMOVC R14,RCX
MOV qword ptr [RBP + -0x30],R15
MOV RDI,R15
MOV RDX,R14
MOV R15,RCX
CALL 0x0012a0b0
MOV RCX,R15
SUB RCX,R14
JZ 0x001aa02e
ADD R12,R14
MOV R15,qword ptr [RBP + -0x30]
ADD R15,R14
JMP 0x001a9f10
LAB_001a9f0d:
XOR R14D,R14D
LAB_001a9f10:
TEST byte ptr [RBP + -0x34],0x1
JNZ 0x001a9f7d
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x30],R15
MOV dword ptr [R13 + 0xe0],0x1
MOV EBX,dword ptr [R13 + 0xd4]
LEA R13,[0x4aea18]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x90]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001aa0a3
MOV EDI,EBX
MOV R15,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV R13,qword ptr [RBP + -0x40]
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x001bfbd0
MOV RBX,RAX
LAB_001a9f76:
CMP RBX,R13
JNZ 0x001a9fc5
JMP 0x001a9ff4
LAB_001a9f7d:
MOV RSI,qword ptr [R13 + 0x18]
MOV RAX,qword ptr [R13 + 0x28]
MOV EDX,ESI
SUB EDX,EAX
ADD RDX,qword ptr [R13]
CMP R12,RDX
JZ 0x001a9fa8
MOV qword ptr [R13],R12
MOV qword ptr [R13 + 0x18],RAX
MOV dword ptr [R13 + 0xe0],0x1
MOV RSI,RAX
LAB_001a9fa8:
MOV qword ptr [R13 + 0x10],RSI
MOV RDI,R13
MOV RSI,R15
MOV RDX,RCX
CALL 0x001b109e
TEST EAX,EAX
JZ 0x001a9ff4
MOVSXD RBX,dword ptr [R13 + 0xe4]
LAB_001a9fc5:
TEST byte ptr [RBP + -0x34],0x2
JZ 0x001a9ff8
MOV EAX,EBX
CMP EAX,-0x1
JZ 0x001a9ff8
ADD R14,RBX
CMP R14,0x2
JBE 0x001a9ff8
ADD R15,RBX
MOV EDX,0x14
SUB RDX,R14
XOR EBX,EBX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0012a2e0
JMP 0x001aa02e
LAB_001a9ff4:
XOR EBX,EBX
JMP 0x001aa02e
LAB_001a9ff8:
CALL 0x001c14ee
CMP dword ptr [RAX],0x0
JZ 0x001aa01e
CALL 0x001c14ee
CMP dword ptr [RAX],-0x1
JZ 0x001aa01e
CALL 0x001c14ee
MOV EBX,0x1
CMP dword ptr [RAX],0xaf
JNZ 0x001aa02e
LAB_001aa01e:
CALL 0x001c14ee
MOV dword ptr [RAX],0x7f
MOV EBX,0x1
LAB_001aa02e:
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001aa03f:
MOV RCX,RAX
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1ff213]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R14
MOV ECX,0x35
CALL qword ptr [RAX + 0x210]
MOV R8D,0x4
MOV EDI,EBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
CALL 0x001bfbd0
MOV R15,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVZ RSI,R14
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
CALL qword ptr [RAX + 0x218]
JMP 0x001a9e8e
LAB_001aa0a3:
MOV R15,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1ff213]
MOV RDI,R15
MOV R13,qword ptr [RBP + -0x40]
MOV RSI,R13
MOV ECX,0x5d
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x001bfbd0
MOV RBX,RAX
CMP RAX,-0x1
MOV ESI,0x0
CMOVNZ RSI,RAX
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
MOV R15,qword ptr [RBP + -0x30]
CALL qword ptr [RAX + 0x218]
JMP 0x001a9f76
|
int8 _mi_read_cache(ulong *param_1,void *param_2,ulong param_3,ulong param_4,uint param_5)
{
int4 uVar1;
int iVar2;
long lVar3;
int *piVar4;
int4 *puVar5;
void *__src;
ulong uVar6;
ulong uVar7;
ulong uVar8;
int1 local_98 [72];
long local_50;
ulong local_48;
uint local_3c;
void *local_38;
uVar8 = *param_1;
uVar7 = uVar8 - param_3;
local_3c = param_5;
if (param_3 <= uVar8 && uVar7 != 0) {
if (param_4 <= uVar7) {
uVar7 = param_4;
}
*(int4 *)(param_1 + 0x1c) = 1;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_48 = param_4;
lVar3 = (**(code **)(PSI_server + 0x158))(local_98,uVar1,6);
local_38 = param_2;
if (lVar3 == 0) {
lVar3 = my_pread(uVar1,param_2,uVar7,param_3,4);
}
else {
local_50 = lVar3;
(**(code **)(PSI_server + 0x210))
(lVar3,uVar7,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",
0x35);
lVar3 = my_pread(uVar1,param_2,uVar7,param_3,4);
uVar8 = 0;
if (lVar3 == 0) {
uVar8 = uVar7;
}
(**(code **)(PSI_server + 0x218))(local_50,uVar8);
}
if (lVar3 != 0) {
return 1;
}
param_4 = local_48 - uVar7;
if (param_4 == 0) {
return 0;
}
param_3 = param_3 + uVar7;
param_2 = (void *)((long)local_38 + uVar7);
uVar8 = *param_1;
}
if (param_3 < uVar8) {
LAB_001a9f0d:
uVar8 = 0;
}
else {
if (param_1[3] - param_1[5] <= param_3 - uVar8) goto LAB_001a9f0d;
__src = (void *)(param_1[5] + (param_3 - uVar8 & 0xffffffff));
uVar8 = param_1[3] - (long)__src;
if (param_4 < uVar8) {
uVar8 = param_4;
}
local_38 = param_2;
memcpy(param_2,__src,uVar8);
param_4 = param_4 - uVar8;
if (param_4 == 0) {
return 0;
}
param_3 = param_3 + uVar8;
param_2 = (void *)((long)local_38 + uVar8);
}
if ((local_3c & 1) == 0) {
*(int4 *)(param_1 + 0x1c) = 1;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_48 = param_4;
local_38 = param_2;
lVar3 = (**(code **)(PSI_server + 0x158))(local_98,uVar1,6);
param_2 = local_38;
uVar6 = local_48;
if (lVar3 == 0) {
uVar7 = my_pread(uVar1,local_38,local_48,param_3,0);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,local_48,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c"
,0x5d);
uVar7 = my_pread(uVar1,local_38,uVar6,param_3,0);
param_2 = local_38;
(**(code **)(PSI_server + 0x218))(lVar3);
}
if (uVar7 != uVar6) {
LAB_001a9fc5:
if ((((local_3c & 2) != 0) && ((int)uVar7 != -1)) && (2 < uVar8 + uVar7)) {
memset((void *)((long)param_2 + uVar7),0,0x14 - (uVar8 + uVar7));
return 0;
}
piVar4 = (int *)_my_thread_var();
if (((*piVar4 != 0) && (piVar4 = (int *)_my_thread_var(), *piVar4 != -1)) &&
(piVar4 = (int *)_my_thread_var(), *piVar4 != 0xaf)) {
return 1;
}
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
return 1;
}
}
else {
uVar7 = param_1[5];
uVar6 = param_1[3];
if (param_3 != (ulong)(uint)((int)param_1[3] - (int)uVar7) + *param_1) {
*param_1 = param_3;
param_1[3] = uVar7;
*(int4 *)(param_1 + 0x1c) = 1;
uVar6 = uVar7;
}
param_1[2] = uVar6;
iVar2 = _my_b_read(param_1,param_2,param_4);
if (iVar2 != 0) {
uVar7 = (ulong)*(int *)((long)param_1 + 0xe4);
goto LAB_001a9fc5;
}
}
return 0;
}
| |
23,057 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const | monkey531[P]llama/common/./json.hpp | const noexcept(noexcept(
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
{
auto ret = ValueType();
JSONSerializer<ValueType>::from_json(*this, ret);
return ret;
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x3f9f7
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3f9ef
movq (%r15), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18b90
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::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> 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>::string_t &)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_3F9EF
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F9EF:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
long long a1,
long long a2)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a2,
a1);
return a1;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0013f9c5:
MOV RDI,RSI
MOV RSI,RBX
CALL 0x0013f9f7
LAB_0013f9d0:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
string_t *
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(string_t *param_1,basic_json *param_2)
{
*(string_t **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string_t)0x0;
/* try { // try from 0013f9c5 to 0013f9cf has its CatchHandler @ 0013f9d9 */
nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_2,param_1);
return param_1;
}
| |
23,058 | ma_apply_undo_key_insert | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length)
{
LSN lsn;
my_bool res;
uint keynr;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
MARIA_KEY key;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
DBUG_ENTER("_ma_apply_undo_key_insert");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
length-= KEY_NR_STORE_SIZE;
/* We have to copy key as _ma_ck_real_delete() may change it */
memcpy(key_buff, header + KEY_NR_STORE_SIZE, length);
DBUG_DUMP("key_buff", key_buff, length);
new_root= share->state.key_root[keynr];
/*
Change the key to an internal structure.
It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't
a transaction id, as ha_key_cmp() will stop comparison when key length
is reached.
For index with transid flag, the ref_length of the key is not correct.
This should however be safe as long as this key is only used for
comparsion against other keys (not for packing or for read-next etc as
in this case we use data_length + ref_length, which is correct.
*/
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_real_delete(info, &key, &new_root) :
_ma_ck_real_delete(info, &key, &new_root));
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ?
LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT,
0, 0, &lsn, (void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
} | O3 | c | ma_apply_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa48, %rsp # imm = 0xA48
movl %ecx, %r12d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r15
orl $0x1b1, 0x170(%r15) # imm = 0x1B1
movq %rsi, -0xa20(%rbp)
movzbl (%rdx), %r14d
decl %r12d
leaq 0x1(%rdx), %rsi
leaq -0xa10(%rbp), %r13
movl $0x9d3, %ecx # imm = 0x9D3
movq %r13, %rdi
movq %r12, %rdx
callq 0x29420
movq 0x118(%r15), %rax
movq (%rax,%r14,8), %rax
movq %rax, -0xa18(%rbp)
movq 0x570(%r15), %rax
imulq $0x118, %r14, %rcx # imm = 0x118
leaq (%rax,%rcx), %rdx
movq %rdx, -0xa40(%rbp)
movq %r13, -0xa48(%rbp)
movl 0x740(%r15), %edx
subl %edx, %r12d
movl %r12d, -0xa38(%rbp)
movl %edx, -0xa34(%rbp)
movl $0x80000, -0xa30(%rbp) # imm = 0x80000
cmpb $0x2, 0xa4(%rax,%rcx)
jne 0x5aaad
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x6c1fb
jmp 0x5aac3
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x676e4
movl %eax, %r12d
testb %al, %al
je 0x5aad2
movq %r15, %rdi
callq 0x3824a
movq 0x118(%r15), %rax
leaq (%rax,%r14,8), %rax
leaq -0xa68(%rbp), %rcx
movq %rax, (%rcx)
movq -0xa18(%rbp), %rsi
movq %rsi, 0x8(%rcx)
movl %r14d, 0x10(%rcx)
xorl %edx, %edx
cmpq %rsi, (%rax)
setne %dl
addl $0x15, %edx
movq %rcx, (%rsp)
leaq -0xa28(%rbp), %r9
movq %rbx, %rdi
movq -0xa20(%rbp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x59875
movl %eax, %r14d
cmpb $0x0, 0x67e(%rbx)
je 0x5ab34
movq %rbx, %rdi
callq 0x5aeb2
testb %r14b, %r14b
movzbl %r12b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq -0xa28(%rbp), %rsi
movq %rbx, %rdi
callq 0x597f8
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5ab87
movl %r14d, %eax
addq $0xa48, %rsp # imm = 0xA48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_apply_undo_key_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A48h
mov r12d, ecx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r15, [rdi]
or dword ptr [r15+170h], 1B1h
mov [rbp+var_A20], rsi
movzx r14d, byte ptr [rdx]
dec r12d
lea rsi, [rdx+1]
lea r13, [rbp+var_A10]
mov ecx, 9D3h
mov rdi, r13
mov rdx, r12
call ___memcpy_chk
mov rax, [r15+118h]
mov rax, [rax+r14*8]
mov [rbp+var_A18], rax
mov rax, [r15+570h]
imul rcx, r14, 118h
lea rdx, [rax+rcx]
mov [rbp+var_A40], rdx
mov [rbp+var_A48], r13
mov edx, [r15+740h]
sub r12d, edx
mov [rbp+var_A38], r12d
mov [rbp+var_A34], edx
mov [rbp+var_A30], 80000h
cmp byte ptr [rax+rcx+0A4h], 2
jnz short loc_5AAAD
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call maria_rtree_real_delete
jmp short loc_5AAC3
loc_5AAAD:
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call _ma_ck_real_delete
loc_5AAC3:
mov r12d, eax
test al, al
jz short loc_5AAD2
mov rdi, r15
call _ma_mark_file_crashed
loc_5AAD2:
mov rax, [r15+118h]
lea rax, [rax+r14*8]
lea rcx, [rbp+var_A68]
mov [rcx], rax
mov rsi, [rbp+var_A18]
mov [rcx+8], rsi
mov [rcx+10h], r14d
xor edx, edx
cmp [rax], rsi
setnz dl
add edx, 15h
mov [rsp+0A70h+var_A70], rcx
lea r9, [rbp+var_A28]
mov rdi, rbx
mov rsi, [rbp+var_A20]
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
mov r14d, eax
cmp byte ptr [rbx+67Eh], 0
jz short loc_5AB34
mov rdi, rbx
call _ma_unlock_key_del
loc_5AB34:
test r14b, r14b
movzx eax, r12b
mov r14d, 1
cmovz r14d, eax
mov rsi, [rbp+var_A28]
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5AB87
mov eax, r14d
add rsp, 0A48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5AB87:
call ___stack_chk_fail
| long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4)
{
long long v4; // r15
long long v5; // r14
long long v6; // r12
int v7; // edx
unsigned __int8 v8; // al
unsigned __int8 v9; // r12
char v10; // r14
bool v11; // zf
unsigned int v12; // r14d
_QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF
int v15; // [rsp+18h] [rbp-A58h]
_BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF
long long v17; // [rsp+30h] [rbp-A40h]
int v18; // [rsp+38h] [rbp-A38h]
int v19; // [rsp+3Ch] [rbp-A34h]
int v20; // [rsp+40h] [rbp-A30h]
signed long long v21; // [rsp+48h] [rbp-A28h] BYREF
long long v22; // [rsp+50h] [rbp-A20h]
long long v23; // [rsp+58h] [rbp-A18h] BYREF
_BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF
unsigned long long v25; // [rsp+A40h] [rbp-30h]
v25 = __readfsqword(0x28u);
v4 = *(_QWORD *)a1;
*(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u;
v22 = a2;
v5 = *a3;
v6 = (unsigned int)(a4 - 1);
__memcpy_chk(v24, a3 + 1, v6, 2515LL);
v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5);
v17 = *(_QWORD *)(v4 + 1392) + 280 * v5;
v16 = v24;
v7 = *(_DWORD *)(v4 + 1856);
v18 = v6 - v7;
v19 = v7;
v20 = 0x80000;
if ( *(_BYTE *)(v17 + 164) == 2 )
v8 = maria_rtree_real_delete(a1, &v16, &v23);
else
v8 = ma_ck_real_delete(a1, &v16, &v23);
v9 = v8;
if ( v8 )
ma_mark_file_crashed(v4);
v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5;
v14[1] = v23;
v15 = v5;
v10 = ma_write_clr(
(long long *)a1,
v22,
(unsigned int)(*(_QWORD *)v14[0] != v23) + 21,
0,
0,
(unsigned long long)&v21,
(long long)v14);
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del(a1);
v11 = v10 == 0;
v12 = 1;
if ( v11 )
v12 = v9;
ma_unpin_all_pages(a1, v21);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v12;
}
| _ma_apply_undo_key_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa48
MOV R12D,ECX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R15,qword ptr [RDI]
OR dword ptr [R15 + 0x170],0x1b1
MOV qword ptr [RBP + -0xa20],RSI
MOVZX R14D,byte ptr [RDX]
DEC R12D
LEA RSI,[RDX + 0x1]
LEA R13,[RBP + -0xa10]
MOV ECX,0x9d3
MOV RDI,R13
MOV RDX,R12
CALL 0x00129420
MOV RAX,qword ptr [R15 + 0x118]
MOV RAX,qword ptr [RAX + R14*0x8]
MOV qword ptr [RBP + -0xa18],RAX
MOV RAX,qword ptr [R15 + 0x570]
IMUL RCX,R14,0x118
LEA RDX,[RAX + RCX*0x1]
MOV qword ptr [RBP + -0xa40],RDX
MOV qword ptr [RBP + -0xa48],R13
MOV EDX,dword ptr [R15 + 0x740]
SUB R12D,EDX
MOV dword ptr [RBP + -0xa38],R12D
MOV dword ptr [RBP + -0xa34],EDX
MOV dword ptr [RBP + -0xa30],0x80000
CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2
JNZ 0x0015aaad
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x0016c1fb
JMP 0x0015aac3
LAB_0015aaad:
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x001676e4
LAB_0015aac3:
MOV R12D,EAX
TEST AL,AL
JZ 0x0015aad2
MOV RDI,R15
CALL 0x0013824a
LAB_0015aad2:
MOV RAX,qword ptr [R15 + 0x118]
LEA RAX,[RAX + R14*0x8]
LEA RCX,[RBP + -0xa68]
MOV qword ptr [RCX],RAX
MOV RSI,qword ptr [RBP + -0xa18]
MOV qword ptr [RCX + 0x8],RSI
MOV dword ptr [RCX + 0x10],R14D
XOR EDX,EDX
CMP qword ptr [RAX],RSI
SETNZ DL
ADD EDX,0x15
MOV qword ptr [RSP],RCX
LEA R9,[RBP + -0xa28]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0xa20]
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00159875
MOV R14D,EAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0015ab34
MOV RDI,RBX
CALL 0x0015aeb2
LAB_0015ab34:
TEST R14B,R14B
MOVZX EAX,R12B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV RSI,qword ptr [RBP + -0xa28]
MOV RDI,RBX
CALL 0x001597f8
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015ab87
MOV EAX,R14D
ADD RSP,0xa48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015ab87:
CALL 0x00129270
|
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4)
{
byte bVar1;
long lVar2;
char cVar3;
char cVar4;
char cVar5;
ulong uVar6;
long in_FS_OFFSET;
long *local_a70;
long local_a68;
uint local_a60;
int1 *local_a50;
long local_a48;
int local_a40;
int local_a3c;
int4 local_a38;
int8 local_a30;
int8 local_a28;
long local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = *param_1;
*(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1;
bVar1 = *param_3;
uVar6 = (ulong)bVar1;
local_a28 = param_2;
__memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3);
local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118;
local_a3c = *(int *)(lVar2 + 0x740);
local_a40 = (param_4 + -1) - local_a3c;
local_a38 = 0x80000;
local_a50 = local_a18;
if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') {
cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20);
}
else {
cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20);
}
if (cVar3 != '\0') {
_ma_mark_file_crashed(lVar2);
}
local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a68 = local_a20;
local_a60 = (uint)bVar1;
cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30,
&local_a70);
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
cVar5 = '\x01';
if (cVar4 == '\0') {
cVar5 = cVar3;
}
_ma_unpin_all_pages(param_1,local_a30);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return cVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,059 | alloc_dynamic | eloqsql/mysys/array.c | void *alloc_dynamic(DYNAMIC_ARRAY *array)
{
DBUG_ENTER("alloc_dynamic");
DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */
if (array->elements == array->max_element)
{
char *new_ptr;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this scenario, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (char *) my_malloc(array->m_psi_key,
(array->max_element+
array->alloc_increment) *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
if (array->elements)
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr=(char*)
my_realloc(array->m_psi_key, array->buffer,
(array->max_element+ array->alloc_increment) *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(0);
array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element));
} | O3 | c | alloc_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x2c58f
movq 0x20(%rbx), %rcx
btl $0x8, %ecx
movl 0x18(%rbx), %edi
jb 0x2c594
addl 0x10(%rbx), %eax
movq (%rbx), %rsi
imull 0x14(%rbx), %eax
orq $0x50, %rcx
movq %rax, %rdx
callq 0x2b7f0
movq %rax, %r14
testq %rax, %rax
jne 0x2c5d1
jmp 0x2c5ef
movq (%rbx), %r14
jmp 0x2c5dd
addl 0x10(%rbx), %eax
imull 0x14(%rbx), %eax
orq $0x10, %rcx
movq %rax, %rsi
movq %rcx, %rdx
callq 0x2b6cd
testq %rax, %rax
je 0x2c5ef
movq %rax, %r14
movl 0x8(%rbx), %edx
testl %edx, %edx
je 0x2c5c8
movq (%rbx), %rsi
imull 0x14(%rbx), %edx
movq %r14, %rdi
callq 0x24240
movl $0xfffffeff, %eax # imm = 0xFFFFFEFF
andq %rax, 0x20(%rbx)
movq %r14, (%rbx)
movl 0x8(%rbx), %eax
movl 0x10(%rbx), %ecx
addl %ecx, 0xc(%rbx)
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
imull 0x14(%rbx), %eax
addq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x2c5ea
| alloc_dynamic:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
cmp eax, [rdi+0Ch]
jnz short loc_2C58F
mov rcx, [rbx+20h]
bt ecx, 8
mov edi, [rbx+18h]
jb short loc_2C594
add eax, [rbx+10h]
mov rsi, [rbx]
imul eax, [rbx+14h]
or rcx, 50h
mov rdx, rax
call my_realloc
mov r14, rax
test rax, rax
jnz short loc_2C5D1
jmp short loc_2C5EF
loc_2C58F:
mov r14, [rbx]
jmp short loc_2C5DD
loc_2C594:
add eax, [rbx+10h]
imul eax, [rbx+14h]
or rcx, 10h
mov rsi, rax
mov rdx, rcx
call my_malloc
test rax, rax
jz short loc_2C5EF
mov r14, rax
mov edx, [rbx+8]
test edx, edx
jz short loc_2C5C8
mov rsi, [rbx]
imul edx, [rbx+14h]
mov rdi, r14
call _memcpy
loc_2C5C8:
mov eax, 0FFFFFEFFh
and [rbx+20h], rax
loc_2C5D1:
mov [rbx], r14
mov eax, [rbx+8]
mov ecx, [rbx+10h]
add [rbx+0Ch], ecx
loc_2C5DD:
lea ecx, [rax+1]
mov [rbx+8], ecx
imul eax, [rbx+14h]
add rax, r14
loc_2C5EA:
pop rbx
pop r14
pop rbp
retn
loc_2C5EF:
xor eax, eax
jmp short loc_2C5EA
| long long alloc_dynamic(long long *a1)
{
int v2; // eax
long long v3; // rcx
unsigned int v4; // edi
long long v5; // r14
long long v6; // rax
int v7; // edx
v2 = *((_DWORD *)a1 + 2);
if ( v2 != *((_DWORD *)a1 + 3) )
{
v5 = *a1;
LABEL_11:
*((_DWORD *)a1 + 2) = v2 + 1;
return v5 + (unsigned int)(*((_DWORD *)a1 + 5) * v2);
}
v3 = a1[4];
v4 = *((_DWORD *)a1 + 6);
if ( (v3 & 0x100) == 0 )
{
v5 = my_realloc(
v4,
*a1,
(unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2)),
(unsigned __int8)v3 | 0x50u);
if ( !v5 )
return 0LL;
goto LABEL_10;
}
v6 = my_malloc(v4, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2)), (unsigned int)v3 | 0x10);
if ( v6 )
{
v5 = v6;
v7 = *((_DWORD *)a1 + 2);
if ( v7 )
memcpy(v6, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * v7));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_10:
*a1 = v5;
v2 = *((_DWORD *)a1 + 2);
*((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4);
goto LABEL_11;
}
return 0LL;
}
| alloc_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,dword ptr [RDI + 0xc]
JNZ 0x0012c58f
MOV RCX,qword ptr [RBX + 0x20]
BT ECX,0x8
MOV EDI,dword ptr [RBX + 0x18]
JC 0x0012c594
ADD EAX,dword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x50
MOV RDX,RAX
CALL 0x0012b7f0
MOV R14,RAX
TEST RAX,RAX
JNZ 0x0012c5d1
JMP 0x0012c5ef
LAB_0012c58f:
MOV R14,qword ptr [RBX]
JMP 0x0012c5dd
LAB_0012c594:
ADD EAX,dword ptr [RBX + 0x10]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x10
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0012b6cd
TEST RAX,RAX
JZ 0x0012c5ef
MOV R14,RAX
MOV EDX,dword ptr [RBX + 0x8]
TEST EDX,EDX
JZ 0x0012c5c8
MOV RSI,qword ptr [RBX]
IMUL EDX,dword ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x00124240
LAB_0012c5c8:
MOV EAX,0xfffffeff
AND qword ptr [RBX + 0x20],RAX
LAB_0012c5d1:
MOV qword ptr [RBX],R14
MOV EAX,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0x10]
ADD dword ptr [RBX + 0xc],ECX
LAB_0012c5dd:
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8],ECX
IMUL EAX,dword ptr [RBX + 0x14]
ADD RAX,R14
LAB_0012c5ea:
POP RBX
POP R14
POP RBP
RET
LAB_0012c5ef:
XOR EAX,EAX
JMP 0x0012c5ea
|
long alloc_dynamic(long *param_1)
{
ulong uVar1;
int iVar2;
void *__dest;
long lVar3;
iVar2 = (int)param_1[1];
if (iVar2 == *(int *)((long)param_1 + 0xc)) {
uVar1 = param_1[4];
if (((uint)uVar1 >> 8 & 1) == 0) {
__dest = (void *)my_realloc((int)param_1[3],*param_1,
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x50);
if (__dest != (void *)0x0) {
LAB_0012c5d1:
*param_1 = (long)__dest;
iVar2 = (int)param_1[1];
*(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + (int)param_1[2];
goto LAB_0012c5dd;
}
}
else {
__dest = (void *)my_malloc((int)param_1[3],
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x10);
if (__dest != (void *)0x0) {
if ((int)param_1[1] != 0) {
memcpy(__dest,(void *)*param_1,
(ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
}
param_1[4] = param_1[4] & 0xfffffeff;
goto LAB_0012c5d1;
}
}
lVar3 = 0;
}
else {
__dest = (void *)*param_1;
LAB_0012c5dd:
*(int *)(param_1 + 1) = iVar2 + 1;
lVar3 = (ulong)(uint)(iVar2 * *(int *)((long)param_1 + 0x14)) + (long)__dest;
}
return lVar3;
}
| |
23,060 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O0 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
leaq 0x7fafd(%rip), %rax # 0x15d5a2
leaq 0x7faee(%rip), %rcx # 0x15d59a
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0xbafc15(%rip), %rdi # 0xc8d6d4
leaq -0x306(%rip), %rsi # 0xdd7c0
callq 0x2a240
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xddb60
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0xddae7
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xddb4a
leaq 0x293902(%rip), %rax # 0x3713f0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rsi
leaq 0x2938ec(%rip), %rdi # 0x3713f0
leaq 0x7fa9f(%rip), %rdx # 0x15d5aa
callq *%rax
cmpl $0x0, %eax
jne 0xddb1c
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xddb24
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xddb24
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xddb43
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xddb60
movl %eax, -0x4(%rbp)
jmp 0xddb4a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charset_number:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdx, [rbp+var_20]
and rdx, 400h
lea rax, aUtf8mb4; "utf8mb4"
lea rcx, aUtf8mb3; "utf8mb3"
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_30], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_DDAE7
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_DDB4A
loc_DDAE7:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_10]
lea rdi, my_charset_latin1
lea rdx, aUtf8; "utf8"
call rax
cmp eax, 0
jnz short loc_DDB1C
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_DDB24
loc_DDB1C:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_DDB24:
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_DDB43
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_4], eax
jmp short loc_DDB4A
loc_DDB43:
mov [rbp+var_4], 0
loc_DDB4A:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-38h]
const char *v6; // [rsp+10h] [rbp-30h]
unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h]
v3 = "utf8mb4";
if ( (a3 & 0x400) != 0 )
v3 = "utf8mb3";
v6 = v3;
pthread_once(&charsets_initialized, init_available_charsets);
charset_number_internal = get_charset_number_internal(a1, a2);
if ( charset_number_internal )
{
return charset_number_internal;
}
else
{
if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8") )
{
v5 = 0LL;
}
else
{
v5 = v6;
}
if ( v5 )
return (unsigned int)get_charset_number_internal(v5, a2);
else
return 0;
}
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x400
LEA RAX,[0x25d5a2]
LEA RCX,[0x25d59a]
CMP RDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0xd8d6d4]
LEA RSI,[0x1dd7c0]
CALL 0x0012a240
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001ddb60
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x001ddae7
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ddb4a
LAB_001ddae7:
LEA RAX,[0x4713f0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x4713f0]
LEA RDX,[0x25d5aa]
CALL RAX
CMP EAX,0x0
JNZ 0x001ddb1c
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001ddb24
LAB_001ddb1c:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001ddb24
LAB_001ddb24:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x001ddb43
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001ddb60
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ddb4a
LAB_001ddb43:
MOV dword ptr [RBP + -0x4],0x0
LAB_001ddb4a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int get_charset_number(int8 param_1,int4 param_2,ulong param_3)
{
int iVar1;
char *local_40;
int local_c;
local_40 = "utf8mb4";
if ((param_3 & 0x400) != 0) {
local_40 = "utf8mb3";
}
pthread_once(&charsets_initialized,init_available_charsets);
local_c = get_charset_number_internal(param_1,param_2);
if (local_c == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004714b0 + 0x40))
(&my_charset_latin1,param_1,&DAT_0025d5aa);
if (iVar1 != 0) {
local_40 = (char *)0x0;
}
if (local_40 == (char *)0x0) {
local_c = 0;
}
else {
local_c = get_charset_number_internal(local_40,param_2);
}
}
return local_c;
}
| |
23,061 | blst_core_verify_pk_in_g2 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/aggregate.c | BLST_ERROR blst_core_verify_pk_in_g2(const POINTonE2_affine *pk,
const POINTonE1_affine *signature,
int hash_or_encode,
const void *msg, size_t msg_len,
const void *DST, size_t DST_len,
const void *aug, size_t aug_len)
{
PAIRING ctx;
BLST_ERROR ret;
ctx.ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0);
ctx.nelems = 0;
ctx.DST = DST;
ctx.DST_len = DST_len;
ret = PAIRING_Aggregate_PK_in_G2(&ctx, pk, 1, signature, 1, NULL, 0,
msg, msg_len, aug, aug_len);
if (ret != BLST_SUCCESS)
return ret;
PAIRING_Commit(&ctx);
return PAIRING_FinalVerify(&ctx, NULL) ? BLST_SUCCESS : BLST_VERIFY_FAIL;
} | O1 | c | blst_core_verify_pk_in_g2:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xca8, %rsp # imm = 0xCA8
movq %rcx, %rax
movq %rsi, %rcx
movq %rdi, %rsi
xorl %r10d, %r10d
testl %edx, %edx
setne %r10b
movups 0x18(%rbp), %xmm0
movq 0x10(%rbp), %rdx
shll $0x6, %r10d
leaq -0xc80(%rbp), %rdi
movl %r10d, (%rdi)
movl $0x0, 0x4(%rdi)
movq %r9, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movups %xmm0, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movl $0x1, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x657b2
testl %eax, %eax
jne 0x6676c
leaq -0xc80(%rbp), %rbx
movq %rbx, %rdi
callq 0x66003
movq %rbx, %rdi
xorl %esi, %esi
callq 0x661bd
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leal (%rcx,%rcx,4), %eax
addq $0xca8, %rsp # imm = 0xCA8
popq %rbx
popq %rbp
retq
| blst_core_verify_pk_in_g2:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0CA8h
mov rax, rcx
mov rcx, rsi
mov rsi, rdi
xor r10d, r10d
test edx, edx
setnz r10b
movups xmm0, [rbp+arg_8]
mov rdx, [rbp+arg_0]
shl r10d, 6
lea rdi, [rbp+var_C80]
mov [rdi], r10d
mov dword ptr [rdi+4], 0
mov [rdi+8], r9
mov [rdi+10h], rdx
movups [rsp+0CB0h+var_C98], xmm0
mov [rsp+0CB0h+var_CA0], r8
mov [rsp+0CB0h+var_CA8], rax
mov [rsp+0CB0h+var_CB0], 0
mov edx, 1
mov r8d, 1
xor r9d, r9d
call PAIRING_Aggregate_PK_in_G2
test eax, eax
jnz short loc_6676C
lea rbx, [rbp+var_C80]
mov rdi, rbx
call PAIRING_Commit
mov rdi, rbx
xor esi, esi
call PAIRING_FinalVerify
xor ecx, ecx
test rax, rax
setz cl
lea eax, [rcx+rcx*4]
loc_6676C:
add rsp, 0CA8h
pop rbx
pop rbp
retn
| long long blst_core_verify_pk_in_g2(
long long a1,
const void *a2,
int a3,
long long a4,
long long a5,
long long a6,
long long a7,
__int128 a8)
{
long long result; // rax
_QWORD v9[400]; // [rsp+30h] [rbp-C80h] BYREF
v9[0] = (unsigned __int8)(a3 != 0) << 6;
v9[1] = a6;
v9[2] = a7;
result = PAIRING_Aggregate_PK_in_G2((long long)v9, a1, 1LL, a2, 1LL, 0LL, 0LL, a4, a5, a8, *((long long *)&a8 + 1));
if ( !(_DWORD)result )
{
PAIRING_Commit((long long)v9);
return 5 * (unsigned int)(PAIRING_FinalVerify(v9, 0LL) == 0);
}
return result;
}
| blst_core_verify_pk_in_g2:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xca8
MOV RAX,RCX
MOV RCX,RSI
MOV RSI,RDI
XOR R10D,R10D
TEST EDX,EDX
SETNZ R10B
MOVUPS XMM0,xmmword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + 0x10]
SHL R10D,0x6
LEA RDI,[RBP + -0xc80]
MOV dword ptr [RDI],R10D
MOV dword ptr [RDI + 0x4],0x0
MOV qword ptr [RDI + 0x8],R9
MOV qword ptr [RDI + 0x10],RDX
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV EDX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x001657b2
TEST EAX,EAX
JNZ 0x0016676c
LEA RBX,[RBP + -0xc80]
MOV RDI,RBX
CALL 0x00166003
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001661bd
XOR ECX,ECX
TEST RAX,RAX
SETZ CL
LEA EAX,[RCX + RCX*0x4]
LAB_0016676c:
ADD RSP,0xca8
POP RBX
POP RBP
RET
|
ulong blst_core_verify_pk_in_g2
(int8 param_1,int8 param_2,int param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int4 param_8,
int4 param_9)
{
ulong uVar1;
long lVar2;
int local_c88 [2];
int8 local_c80;
int8 local_c78;
local_c88[0] = (uint)(param_3 != 0) << 6;
local_c88[1] = 0;
local_c78 = param_7;
local_c80 = param_6;
uVar1 = PAIRING_Aggregate_PK_in_G2
(local_c88,param_1,1,param_2,1,0,0,param_4,param_5,param_8,param_9);
if ((int)uVar1 == 0) {
PAIRING_Commit(local_c88);
lVar2 = PAIRING_FinalVerify(local_c88,0);
uVar1 = (ulong)((uint)(lVar2 == 0) * 5);
}
return uVar1;
}
| |
23,062 | strlength | eloqsql/mysys/mf_format.c | size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
} | O3 | c | strlength:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %dl
movq %rdi, %rax
movq %rdi, %rcx
cmpb $0x20, %dl
je 0xb05f9
movzbl %dl, %edx
testl %edx, %edx
je 0xb0612
movzbl 0x1(%rcx), %eax
incq %rcx
testl %eax, %eax
je 0xb060f
cmpl $0x20, %eax
jne 0xb05e9
movq %rcx, %rsi
movb 0x1(%rsi), %dl
incq %rsi
cmpb $0x20, %dl
je 0xb05fc
movq %rcx, %rax
movq %rsi, %rcx
jmp 0xb05dd
movq %rcx, %rax
subq %rdi, %rax
popq %rbp
retq
nop
| strlength:
push rbp
mov rbp, rsp
mov dl, [rdi]
mov rax, rdi
mov rcx, rdi
loc_B05DD:
cmp dl, 20h ; ' '
jz short loc_B05F9
movzx edx, dl
test edx, edx
jz short loc_B0612
loc_B05E9:
movzx eax, byte ptr [rcx+1]
inc rcx
test eax, eax
jz short loc_B060F
cmp eax, 20h ; ' '
jnz short loc_B05E9
loc_B05F9:
mov rsi, rcx
loc_B05FC:
mov dl, [rsi+1]
inc rsi
cmp dl, 20h ; ' '
jz short loc_B05FC
mov rax, rcx
mov rcx, rsi
jmp short loc_B05DD
loc_B060F:
mov rax, rcx
loc_B0612:
sub rax, rdi
pop rbp
retn
| long long strlength(_BYTE *a1)
{
char v1; // dl
_BYTE *v2; // rax
_BYTE *v3; // rcx
int v4; // eax
_BYTE *v5; // rsi
v1 = *a1;
v2 = a1;
v3 = a1;
while ( v1 == 32 )
{
LABEL_6:
v5 = v3;
do
v1 = *++v5;
while ( v1 == 32 );
v2 = v3;
v3 = v5;
}
if ( v1 )
{
while ( 1 )
{
v4 = (unsigned __int8)*++v3;
if ( !v4 )
break;
if ( v4 == 32 )
goto LABEL_6;
}
v2 = v3;
}
return v2 - a1;
}
| strlength:
PUSH RBP
MOV RBP,RSP
MOV DL,byte ptr [RDI]
MOV RAX,RDI
MOV RCX,RDI
LAB_001b05dd:
CMP DL,0x20
JZ 0x001b05f9
MOVZX EDX,DL
TEST EDX,EDX
JZ 0x001b0612
LAB_001b05e9:
MOVZX EAX,byte ptr [RCX + 0x1]
INC RCX
TEST EAX,EAX
JZ 0x001b060f
CMP EAX,0x20
JNZ 0x001b05e9
LAB_001b05f9:
MOV RSI,RCX
LAB_001b05fc:
MOV DL,byte ptr [RSI + 0x1]
INC RSI
CMP DL,0x20
JZ 0x001b05fc
MOV RAX,RCX
MOV RCX,RSI
JMP 0x001b05dd
LAB_001b060f:
MOV RAX,RCX
LAB_001b0612:
SUB RAX,RDI
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
cVar4 = *param_1;
pcVar3 = param_1;
pcVar5 = param_1;
do {
pcVar2 = pcVar5;
if (cVar4 != ' ') {
if (cVar4 == '\0') {
LAB_001b0612:
return (long)pcVar3 - (long)param_1;
}
do {
pcVar1 = pcVar5 + 1;
pcVar3 = pcVar5 + 1;
if (*pcVar1 == '\0') goto LAB_001b0612;
pcVar5 = pcVar3;
pcVar2 = pcVar3;
} while (*pcVar1 != ' ');
}
do {
pcVar3 = pcVar2;
cVar4 = pcVar5[1];
pcVar5 = pcVar5 + 1;
pcVar2 = pcVar3;
} while (cVar4 == ' ');
} while( true );
}
| |
23,063 | cxxopts::exceptions::parsing::~parsing() | zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp | explicit parsing(const std::string& message)
: exception(message)
{
} | O1 | cpp | cxxopts::exceptions::parsing::~parsing():
pushq %rbx
movq %rdi, %rbx
leaq 0x30a101(%rip), %rax # 0x333118
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
leaq 0x18(%rbx), %rax
cmpq %rax, %rdi
je 0x29032
movq (%rax), %rsi
incq %rsi
callq 0xfa70
movq %rbx, %rdi
callq 0x10260
movl $0x28, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xfa70
| _ZN7cxxopts10exceptions7parsingD0Ev:
push rbx
mov rbx, rdi
lea rax, off_333118
mov [rdi], rax
mov rdi, [rdi+8]; void *
lea rax, [rbx+18h]
cmp rdi, rax
jz short loc_29032
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29032:
mov rdi, rbx; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov esi, 28h ; '('; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void cxxopts::exceptions::parsing::~parsing(cxxopts::exceptions::parsing *this)
{
char *v2; // rdi
*(_QWORD *)this = off_333118;
v2 = (char *)*((_QWORD *)this + 1);
if ( v2 != (char *)this + 24 )
operator delete(v2, *((_QWORD *)this + 3) + 1LL);
std::exception::~exception(this);
operator delete(this, 0x28uLL);
}
| ~parsing:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x433118]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x8]
LEA RAX,[RBX + 0x18]
CMP RDI,RAX
JZ 0x00129032
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010fa70
LAB_00129032:
MOV RDI,RBX
CALL 0x00110260
MOV ESI,0x28
MOV RDI,RBX
POP RBX
JMP 0x0010fa70
|
/* cxxopts::exceptions::parsing::~parsing() */
void __thiscall cxxopts::exceptions::parsing::~parsing(parsing *this)
{
*(int ***)this = &PTR__exception_00433118;
if (*(parsing **)(this + 8) != this + 0x18) {
operator_delete(*(parsing **)(this + 8),*(long *)(this + 0x18) + 1);
}
std::exception::~exception((exception *)this);
operator_delete(this,0x28);
return;
}
| |
23,064 | check_struct_option | eloqsql/mysys/my_getopt.c | static char *check_struct_option(char *cur_arg, char *key_name)
{
char *ptr, *end;
DBUG_ENTER("check_struct_option");
ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */
end= strcend(cur_arg, '=');
/*
If the first dot is after an equal sign, then it is part
of a variable value and the option is not a struct option.
Also, if the last character in the string before the ending
NULL, or the character right before equal sign is the first
dot found, the option is not a struct option.
*/
if (end - ptr > 1)
{
uint len= (uint) (ptr - cur_arg);
set_if_smaller(len, FN_REFLEN-1);
strmake(key_name, cur_arg, len);
DBUG_RETURN(++ptr);
}
else
{
key_name[0]= 0;
DBUG_RETURN(cur_arg);
}
} | O0 | c | check_struct_option:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x2e, %esi
callq 0x87860
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3d, %esi
callq 0x87860
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x2f0ed
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x2c(%rbp)
cmpl $0x1ff, -0x2c(%rbp) # imm = 0x1FF
jbe 0x2f0c7
movl $0x1ff, -0x2c(%rbp) # imm = 0x1FF
jmp 0x2f0c9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x87940
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq %rax, -0x8(%rbp)
jmp 0x2f0fc
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_struct_option:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 2Eh ; '.'
call strcend
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov esi, 3Dh ; '='
call strcend
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
sub rax, rcx
cmp rax, 1
jle short loc_2F0ED
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 1FFh
jbe short loc_2F0C7
mov [rbp+var_2C], 1FFh
loc_2F0C7:
jmp short $+2
loc_2F0C9:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_2C]
mov edx, eax
call strmake
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov [rbp+var_8], rax
jmp short loc_2F0FC
loc_2F0ED:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_2F0FC:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long check_struct_option(long long a1, _BYTE *a2)
{
unsigned int v3; // [rsp+4h] [rbp-2Ch]
long long v4; // [rsp+10h] [rbp-20h]
v4 = strcend(a1 + 1, 46LL);
if ( strcend(a1, 61LL) - v4 <= 1 )
{
*a2 = 0;
return a1;
}
else
{
v3 = v4 - a1;
if ( (unsigned int)(v4 - a1) > 0x1FF )
v3 = 511;
strmake(a2, a1, v3);
return v4 + 1;
}
}
| check_struct_option:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x2e
CALL 0x00187860
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x3d
CALL 0x00187860
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x0012f0ed
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x1ff
JBE 0x0012f0c7
MOV dword ptr [RBP + -0x2c],0x1ff
LAB_0012f0c7:
JMP 0x0012f0c9
LAB_0012f0c9:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
CALL 0x00187940
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012f0fc
LAB_0012f0ed:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012f0fc:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long check_struct_option(long param_1,int1 *param_2)
{
long lVar1;
int4 local_34;
int8 local_10;
local_10 = strcend(param_1 + 1,0x2e);
lVar1 = strcend(param_1,0x3d);
if (lVar1 - local_10 < 2) {
*param_2 = 0;
local_10 = param_1;
}
else {
local_34 = (int)local_10 - (int)param_1;
if (0x1ff < local_34) {
local_34 = 0x1ff;
}
strmake(param_2,param_1,local_34);
local_10 = local_10 + 1;
}
return local_10;
}
| |
23,065 | rlSetBlendFactorsSeparate | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h | void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
if ((RLGL.State.glBlendSrcFactorRGB != glSrcRGB) ||
(RLGL.State.glBlendDestFactorRGB != glDstRGB) ||
(RLGL.State.glBlendSrcFactorAlpha != glSrcAlpha) ||
(RLGL.State.glBlendDestFactorAlpha != glDstAlpha) ||
(RLGL.State.glBlendEquationRGB != glEqRGB) ||
(RLGL.State.glBlendEquationAlpha != glEqAlpha))
{
RLGL.State.glBlendSrcFactorRGB = glSrcRGB;
RLGL.State.glBlendDestFactorRGB = glDstRGB;
RLGL.State.glBlendSrcFactorAlpha = glSrcAlpha;
RLGL.State.glBlendDestFactorAlpha = glDstAlpha;
RLGL.State.glBlendEquationRGB = glEqRGB;
RLGL.State.glBlendEquationAlpha = glEqAlpha;
RLGL.State.glCustomBlendModeModified = true;
}
#endif
} | O0 | c | rlSetBlendFactorsSeparate:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
movl 0x16787e(%rip), %eax # 0x21ac3c
cmpl -0x4(%rbp), %eax
jne 0xb33fa
movl 0x167877(%rip), %eax # 0x21ac40
cmpl -0x8(%rbp), %eax
jne 0xb33fa
movl 0x167870(%rip), %eax # 0x21ac44
cmpl -0xc(%rbp), %eax
jne 0xb33fa
movl 0x167869(%rip), %eax # 0x21ac48
cmpl -0x10(%rbp), %eax
jne 0xb33fa
movl 0x167862(%rip), %eax # 0x21ac4c
cmpl -0x14(%rbp), %eax
jne 0xb33fa
movl 0x16785b(%rip), %eax # 0x21ac50
cmpl -0x18(%rbp), %eax
je 0xb3437
movl -0x4(%rbp), %eax
movl %eax, 0x167839(%rip) # 0x21ac3c
movl -0x8(%rbp), %eax
movl %eax, 0x167834(%rip) # 0x21ac40
movl -0xc(%rbp), %eax
movl %eax, 0x16782f(%rip) # 0x21ac44
movl -0x10(%rbp), %eax
movl %eax, 0x16782a(%rip) # 0x21ac48
movl -0x14(%rbp), %eax
movl %eax, 0x167825(%rip) # 0x21ac4c
movl -0x18(%rbp), %eax
movl %eax, 0x167820(%rip) # 0x21ac50
movb $0x1, 0x16781d(%rip) # 0x21ac54
popq %rbp
retq
nopl (%rax)
| rlSetBlendFactorsSeparate:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov [rbp+var_10], ecx
mov [rbp+var_14], r8d
mov [rbp+var_18], r9d
mov eax, cs:dword_21AC3C
cmp eax, [rbp+var_4]
jnz short loc_B33FA
mov eax, cs:dword_21AC40
cmp eax, [rbp+var_8]
jnz short loc_B33FA
mov eax, cs:dword_21AC44
cmp eax, [rbp+var_C]
jnz short loc_B33FA
mov eax, cs:dword_21AC48
cmp eax, [rbp+var_10]
jnz short loc_B33FA
mov eax, cs:dword_21AC4C
cmp eax, [rbp+var_14]
jnz short loc_B33FA
mov eax, cs:dword_21AC50
cmp eax, [rbp+var_18]
jz short loc_B3437
loc_B33FA:
mov eax, [rbp+var_4]
mov cs:dword_21AC3C, eax
mov eax, [rbp+var_8]
mov cs:dword_21AC40, eax
mov eax, [rbp+var_C]
mov cs:dword_21AC44, eax
mov eax, [rbp+var_10]
mov cs:dword_21AC48, eax
mov eax, [rbp+var_14]
mov cs:dword_21AC4C, eax
mov eax, [rbp+var_18]
mov cs:dword_21AC50, eax
mov cs:byte_21AC54, 1
loc_B3437:
pop rbp
retn
| long long rlSetBlendFactorsSeparate(int a1, int a2, int a3, int a4, int a5, unsigned int a6)
{
long long result; // rax
if ( dword_21AC3C != a1
|| dword_21AC40 != a2
|| dword_21AC44 != a3
|| dword_21AC48 != a4
|| dword_21AC4C != a5
|| (result = (unsigned int)dword_21AC50, dword_21AC50 != a6) )
{
dword_21AC3C = a1;
dword_21AC40 = a2;
dword_21AC44 = a3;
dword_21AC48 = a4;
dword_21AC4C = a5;
result = a6;
dword_21AC50 = a6;
byte_21AC54 = 1;
}
return result;
}
| rlSetBlendFactorsSeparate:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV dword ptr [RBP + -0x10],ECX
MOV dword ptr [RBP + -0x14],R8D
MOV dword ptr [RBP + -0x18],R9D
MOV EAX,dword ptr [0x0031ac3c]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x001b33fa
MOV EAX,dword ptr [0x0031ac40]
CMP EAX,dword ptr [RBP + -0x8]
JNZ 0x001b33fa
MOV EAX,dword ptr [0x0031ac44]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001b33fa
MOV EAX,dword ptr [0x0031ac48]
CMP EAX,dword ptr [RBP + -0x10]
JNZ 0x001b33fa
MOV EAX,dword ptr [0x0031ac4c]
CMP EAX,dword ptr [RBP + -0x14]
JNZ 0x001b33fa
MOV EAX,dword ptr [0x0031ac50]
CMP EAX,dword ptr [RBP + -0x18]
JZ 0x001b3437
LAB_001b33fa:
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [0x0031ac3c],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [0x0031ac40],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [0x0031ac44],EAX
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [0x0031ac48],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [0x0031ac4c],EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [0x0031ac50],EAX
MOV byte ptr [0x0031ac54],0x1
LAB_001b3437:
POP RBP
RET
|
void rlSetBlendFactorsSeparate
(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
if ((((DAT_0031ac3c != param_1) || (DAT_0031ac40 != param_2)) || (DAT_0031ac44 != param_3)) ||
(((DAT_0031ac48 != param_4 || (DAT_0031ac4c != param_5)) || (DAT_0031ac50 != param_6)))) {
DAT_0031ac54 = 1;
DAT_0031ac3c = param_1;
DAT_0031ac40 = param_2;
DAT_0031ac44 = param_3;
DAT_0031ac48 = param_4;
DAT_0031ac4c = param_5;
DAT_0031ac50 = param_6;
}
return;
}
| |
23,066 | void nlohmann::json_abi_v3_12_0::detail::get_arithmetic_value<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&) | shubhamoy[P]dir2txt/include/nlohmann/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));
}
} | O0 | cpp | void nlohmann::json_abi_v3_12_0::detail::get_arithmetic_value<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7ecf0
movzbl %al, %ecx
movq %rcx, -0x50(%rbp)
subb $0x9, %al
ja 0x7ec3f
movq -0x50(%rbp), %rax
leaq 0x137d5(%rip), %rcx # 0x92398
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x7ed00
movq (%rax), %xmm0
movaps 0x132c0(%rip), %xmm1 # 0x91ea0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x132c4(%rip), %xmm1 # 0x91eb0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x7ecdf
movq -0x8(%rbp), %rdi
callq 0x7ed20
cvtsi2sdq (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x7ecdf
movq -0x8(%rbp), %rdi
callq 0x7ed40
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x7ecdf
jmp 0x7ec3f
movb $0x1, -0x45(%rbp)
movl $0x20, %edi
callq 0xa250
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7ac20
movq %rax, -0x38(%rbp)
leaq 0x15a6a(%rip), %rsi # 0x946cf
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x756e0
jmp 0x7ec74
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq -0x30(%rbp), %rdx
callq 0x7aa70
jmp 0x7ec8c
movq -0x58(%rbp), %rdi
movb $0x0, -0x45(%rbp)
leaq 0x61f55(%rip), %rsi # 0xe0bf0
leaq -0x12752(%rip), %rdx # 0x6c550
callq 0xa690
jmp 0x7ecee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x7eccc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb6c0
testb $0x1, -0x45(%rbp)
jne 0x7ecd4
jmp 0x7ecdd
movq -0x58(%rbp), %rdi
callq 0xa350
jmp 0x7ece5
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xa6c0
nop
| _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_12_0::detail::value_t(void)
movzx ecx, al
mov [rbp+var_50], rcx
sub al, 9; switch 10 cases
ja def_7EBCA; jumptable 000000000007EBCA default case
mov rax, [rbp+var_50]
lea rcx, jpt_7EBCA
movsxd rax, ds:(jpt_7EBCA - 92398h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_7EBCC:
mov rdi, [rbp+var_8]; jumptable 000000000007EBCA case 6
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
movq xmm0, qword ptr [rax]
movaps xmm1, cs:xmmword_91EA0
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_91EB0
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
mov rax, [rbp+var_10]
movsd qword ptr [rax], xmm0
jmp loc_7ECDF
loc_7EC08:
mov rdi, [rbp+var_8]; jumptable 000000000007EBCA case 5
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
cvtsi2sd xmm0, qword ptr [rax]
mov rax, [rbp+var_10]
movsd qword ptr [rax], xmm0
jmp loc_7ECDF
loc_7EC23:
mov rdi, [rbp+var_8]; jumptable 000000000007EBCA case 7
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_10]
movsd qword ptr [rax], xmm0
jmp loc_7ECDF
loc_7EC3D:
jmp short $+2; jumptable 000000000007EBCA cases 0-4,8,9
def_7EBCA:
mov [rbp+var_45], 1; jumptable 000000000007EBCA default case
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_58], rax
mov rdi, [rbp+var_8]
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov [rbp+var_38], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rbp+var_30]
lea rdx, [rbp+var_38]
call _ZN8nlohmann16json_abi_v3_12_06detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_7EC74:
mov rdi, [rbp+var_58]
mov rcx, [rbp+var_8]
mov esi, 12Eh
lea rdx, [rbp+var_30]
call _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_7EC8C:
mov rdi, [rbp+var_58]; void *
mov [rbp+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_7ECEE
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_7ECCC
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_7ECCC:
test [rbp+var_45], 1
jnz short loc_7ECD4
jmp short loc_7ECDD
loc_7ECD4:
mov rdi, [rbp+var_58]; void *
call ___cxa_free_exception
loc_7ECDD:
jmp short loc_7ECE5
loc_7ECDF:
add rsp, 60h
pop rbp
retn
loc_7ECE5:
mov rdi, [rbp+var_40]
call __Unwind_Resume
loc_7ECEE:
xchg ax, ax
| double * ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
_BYTE *a1,
double *a2)
{
__m128d v2; // xmm1
double *result; // rax
double v4; // xmm0_8
long long v5; // xmm0_8
nlohmann::json_abi_v3_12_0::detail::type_error *exception; // [rsp+8h] [rbp-58h]
nlohmann::json_abi_v3_12_0::detail *v7; // [rsp+28h] [rbp-38h] BYREF
_QWORD v8[4]; // [rsp+30h] [rbp-30h] BYREF
double *v9; // [rsp+50h] [rbp-10h]
_BYTE *v10; // [rsp+58h] [rbp-8h]
v10 = a1;
v9 = a2;
switch ( (unsigned __int8)nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::operator nlohmann::json_abi_v3_12_0::detail::value_t(a1) )
{
case 5u:
v4 = (double)(int)*(_QWORD *)ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v10);
result = v9;
*v9 = v4;
break;
case 6u:
v2 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(
_mm_loadl_epi64((const __m128i *)ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v10)),
(__m128i)xmmword_91EA0),
(__m128d)xmmword_91EB0);
result = v9;
*v9 = _mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0];
break;
case 7u:
v5 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v10);
result = v9;
*(_QWORD *)v9 = v5;
break;
default:
exception = (nlohmann::json_abi_v3_12_0::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7 = (nlohmann::json_abi_v3_12_0::detail *)nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::type_name(v10);
nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[29],char const*>(
v8,
(long long)"type must be number, but is ",
&v7);
ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)v8,
(long long)v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_12_0::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_12_0::detail::type_error::~type_error);
}
return result;
}
| _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017ecf0
MOVZX ECX,AL
MOV qword ptr [RBP + -0x50],RCX
SUB AL,0x9
JA 0x0017ec3f
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[0x192398]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_6:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017ed00
MOVQ XMM0,qword ptr [RAX]
MOVAPS XMM1,xmmword ptr [0x00191ea0]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x00191eb0]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x10]
MOVSD qword ptr [RAX],XMM0
JMP 0x0017ecdf
caseD_5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017ed20
CVTSI2SD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD qword ptr [RAX],XMM0
JMP 0x0017ecdf
caseD_7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017ed40
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD qword ptr [RAX],XMM0
JMP 0x0017ecdf
caseD_0:
JMP 0x0017ec3f
default:
MOV byte ptr [RBP + -0x45],0x1
MOV EDI,0x20
CALL 0x0010a250
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017ac20
MOV qword ptr [RBP + -0x38],RAX
LAB_0017ec5e:
LEA RSI,[0x1946cf]
LEA RDI,[RBP + -0x30]
LEA RDX,[RBP + -0x38]
CALL 0x001756e0
JMP 0x0017ec74
LAB_0017ec74:
MOV RDI,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x8]
LAB_0017ec7c:
MOV ESI,0x12e
LEA RDX,[RBP + -0x30]
CALL 0x0017aa70
JMP 0x0017ec8c
LAB_0017ec8c:
MOV RDI,qword ptr [RBP + -0x58]
MOV byte ptr [RBP + -0x45],0x0
LEA RSI,[0x1e0bf0]
LEA RDX,[0x16c550]
CALL 0x0010a690
LAB_0017ecdf:
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json *param_1,double *param_2)
{
int1 uVar1;
int8 *puVar2;
long *plVar3;
double *pdVar4;
int8 uVar5;
int1 auVar6 [16];
char *local_40;
detail local_38 [32];
double *local_18;
basic_json *local_10;
local_18 = param_2;
local_10 = param_1;
uVar1 = nlohmann::json_abi_v3_12_0::basic_json::operator_cast_to_value_t(param_1);
switch(uVar1) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 8:
case 9:
default:
uVar5 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_12_0::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_10);
/* try { // try from 0017ec5e to 0017ec71 has its CatchHandler @ 0017eca9 */
nlohmann::json_abi_v3_12_0::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0017ec7c to 0017eca6 has its CatchHandler @ 0017ecb7 */
_ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar5,0x12e,local_38,local_10);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&nlohmann::json_abi_v3_12_0::detail::type_error::typeinfo,
nlohmann::json_abi_v3_12_0::detail::type_error::~type_error);
case 5:
plVar3 = (long *)_ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = (double)*plVar3;
break;
case 6:
puVar2 = (int8 *)
_ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
uVar5 = *puVar2;
auVar6._8_4_ = (int)((ulong)uVar5 >> 0x20);
auVar6._0_8_ = uVar5;
auVar6._12_4_ = _UNK_00191ea4;
*local_18 = (auVar6._8_8_ - _UNK_00191eb8) +
((double)CONCAT44(_DAT_00191ea0,(int)uVar5) - _DAT_00191eb0);
break;
case 7:
pdVar4 = (double *)
_ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = *pdVar4;
}
return;
}
| |
23,067 | void nlohmann::json_abi_v3_12_0::detail::get_arithmetic_value<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&) | shubhamoy[P]dir2txt/include/nlohmann/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_12_0::detail::get_arithmetic_value<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x2ea3c
cmpl $0x7, %eax
je 0x2ea42
cmpl $0x6, %eax
jne 0x2ea73
movq 0x8(%r14), %rax
jmp 0x2ea67
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x8644(%rip), %xmm0 # 0x370a0
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x81d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2d976
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8e27(%rip), %rsi # 0x378be
leaq 0x10(%rsp), %rdi
callq 0x2c211
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x2d7aa
xorl %ebp, %ebp
leaq 0x1f15e(%rip), %rsi # 0x4dc20
leaq -0x459(%rip), %rdx # 0x2e670
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2eaef
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8380
testb %bpl, %bpl
jne 0x2eaf9
jmp 0x2eb01
movq %rax, %r14
movq %rbx, %rdi
callq 0x82a0
movq %r14, %rdi
callq 0x85d0
nop
| _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_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_2EA3C
cmp eax, 7
jz short loc_2EA42
cmp eax, 6
jnz short loc_2EA73
loc_2EA3C:
mov rax, [r14+8]
jmp short loc_2EA67
loc_2EA42:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_370A0
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_2EA67:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_2EA73:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::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_12_06detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_12_0::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_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail9exceptionD2Ev; 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_2EAEF
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2EAEF:
test bpl, bpl
jnz short loc_2EAF9
jmp short loc_2EB01
mov r14, rax
loc_2EAF9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_2EB01:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__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_12_0::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_BYTE v6[16]; // [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_12_0::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
(long long *)&v5);
ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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_12_0::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_12_0::detail::exception::~exception);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__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 0x0012ea3c
CMP EAX,0x7
JZ 0x0012ea42
CMP EAX,0x6
JNZ 0x0012ea73
LAB_0012ea3c:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x0012ea67
LAB_0012ea42:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001370a0]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_0012ea67:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0012ea73:
MOV EDI,0x20
CALL 0x001081d0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012d976
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0012ea90:
LEA RSI,[0x1378be]
LEA RDI,[RSP + 0x10]
CALL 0x0012c211
MOV BPL,0x1
LAB_0012eaa4:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0012d7aa
XOR EBP,EBP
LEA RSI,[0x14dc20]
LEA RDX,[0x12e670]
MOV RDI,RBX
CALL 0x001085c0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_12_06detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,ulong *param_2)
{
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::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<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
if (bVar1 == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::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_001370a0) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_0012ea67;
}
if (bVar1 != (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_12_0::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0012ea90 to 0012eaa0 has its CatchHandler @ 0012eaf6 */
nlohmann::json_abi_v3_12_0::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0012eaa4 to 0012ead0 has its CatchHandler @ 0012ead1 */
_ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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_12_0::detail::type_error::typeinfo,
nlohmann::json_abi_v3_12_0::detail::exception::~exception);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_0012ea67:
*param_2 = uVar3;
return;
}
| |
23,068 | check_rules | eloqsql/strings/ctype-uca.c | static int
check_rules(MY_CHARSET_LOADER *loader,
const MY_COLL_RULES *rules,
const MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
const MY_COLL_RULE *r, *rlast;
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (r->curr[0] > dst->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Shift character out of range: u%04X", (uint) r->curr[0]);
return TRUE;
}
else if (r->base[0] > src->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Reset character out of range: u%04X", (uint) r->base[0]);
return TRUE;
}
}
return FALSE;
} | O0 | c | check_rules:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x50168
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x50118
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2bb4c(%rip), %rdx # 0x7bc54
movb $0x0, %al
callq 0x768d0
movl $0x1, -0x4(%rbp)
jmp 0x5016f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x50151
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2bb37(%rip), %rdx # 0x7bc78
movb $0x0, %al
callq 0x768d0
movl $0x1, -0x4(%rbp)
jmp 0x5016f
jmp 0x50153
jmp 0x50155
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x500cf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| check_rules:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_500CF:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_50168
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_50118
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov ecx, eax
mov esi, 80h
lea rdx, aShiftCharacter; "Shift character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5016F
loc_50118:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jbe short loc_50151
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov esi, 80h
lea rdx, aResetCharacter; "Reset character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5016F
loc_50151:
jmp short $+2
loc_50153:
jmp short $+2
loc_50155:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_500CF
loc_50168:
mov [rbp+var_4], 0
loc_5016F:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long check_rules(int a1, long long a2, _QWORD *a3, _QWORD *a4, int a5, int a6)
{
_QWORD *i; // [rsp+10h] [rbp-30h]
for ( i = *(_QWORD **)(a2 + 32); (unsigned long long)i < 160LL * *(_QWORD *)(a2 + 16) + *(_QWORD *)(a2 + 32); i += 20 )
{
if ( i[10] > *a3 )
{
my_snprintf(a1, 128, (unsigned int)"Shift character out of range: u%04X", i[10], a5, a6);
return 1;
}
if ( *i > *a4 )
{
my_snprintf(a1, 128, (unsigned int)"Reset character out of range: u%04X", *i, a5, a6);
return 1;
}
}
return 0;
}
| check_rules:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001500cf:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00150168
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x00150118
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x17bc54]
MOV AL,0x0
CALL 0x001768d0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015016f
LAB_00150118:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JBE 0x00150151
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x17bc78]
MOV AL,0x0
CALL 0x001768d0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015016f
LAB_00150151:
JMP 0x00150153
LAB_00150153:
JMP 0x00150155
LAB_00150155:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001500cf
LAB_00150168:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015016f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 check_rules(int8 param_1,long param_2,ulong *param_3,ulong *param_4)
{
ulong *local_38;
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if ((ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0) <= local_38) {
return 0;
}
if (*param_3 < local_38[10]) break;
if (*param_4 < *local_38) {
my_snprintf(param_1,0x80,"Reset character out of range: u%04X",*local_38 & 0xffffffff);
return 1;
}
local_38 = local_38 + 0x14;
}
my_snprintf(param_1,0x80,"Shift character out of range: u%04X",local_38[10] & 0xffffffff);
return 1;
}
| |
23,069 | common_chat_params_init_functionary_v3_2(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_functionary_v3_2(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
// >>>all\nlet's call functions>>>fn1\n{"arg1": 1...}\n>>>fn2\n{"arg1": 1...}...
// Using ">>>f1\n", ">>>f2\n"... as trigger words for the grammar
common_chat_params data;
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2;
if (!inputs.tools.is_null() && !inputs.tools.empty()) {
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> first_tool_rules;
std::vector<std::string> subsequent_tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
std::string name = function["name"];
auto parameters = function["parameters"];
auto args_rule = builder.add_schema(name + "-args", parameters);
first_tool_rules.push_back(builder.add_rule(name + "-call", "\"" + name + "\\n\" " + args_rule));
subsequent_tool_rules.push_back(builder.add_rule(name + "-call2", "\">>>" + name + "\\n\" " + args_rule));
data.grammar_triggers.push_back({name, /* .at_start = */ true});
data.grammar_triggers.push_back({">>>" + name, /* .at_start = */ false});
});
auto first_rule = first_tool_rules.empty() ? "" : builder.add_rule("first_tool_call", string_join(first_tool_rules, " | ")) + " space";
if (inputs.parallel_tool_calls) {
auto subsequent_rule = builder.add_rule("subsequent_tool_call", string_join(subsequent_tool_rules, " | ")) + " space";
builder.add_rule("root", first_rule + " (" + subsequent_rule + ")*");
} else {
builder.add_rule("root", first_rule);
}
}, grammar_options);
}
return data;
} | O0 | cpp | common_chat_params_init_functionary_v3_2(minja::chat_template const&, common_chat_inputs const&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movb $0x0, 0xff(%rsp)
callq 0x1fea30
movq 0x108(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x100(%rsp), %rdi
addq $0x10, %rdi
callq 0x117710
testb $0x1, %al
jne 0x1cd39a
jmp 0x1cd3ad
leaq 0xb8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa2750
jmp 0x1cd3ca
movq 0x100(%rsp), %rsi
addq $0x10, %rsi
leaq 0xb8(%rsp), %rdi
callq 0xb3070
jmp 0x1cd3c8
jmp 0x1cd3ca
movq 0x100(%rsp), %rax
movzbl 0x68(%rax), %eax
movl %eax, 0x1c(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x98(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xa2750
movl 0x1c(%rsp), %r8d
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x20(%rsp), %r9
movq %rsp, %rax
movl $0x1, (%rax)
andl $0x1, %r8d
leaq 0xc8(%rsp), %rdi
leaq 0xb8(%rsp), %rcx
callq 0x15f7a0
jmp 0x1cd428
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x107b70
jmp 0x1cd43f
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
leaq 0xe8(%rsp), %rsi
callq 0xab8f0
leaq 0xe8(%rsp), %rdi
callq 0xa2710
leaq 0xc8(%rsp), %rdi
callq 0x5b578
leaq 0x98(%rsp), %rdi
callq 0xa2710
leaq 0xb8(%rsp), %rdi
callq 0xa2710
movq 0x28(%rsp), %rax
movl $0x7, (%rax)
movq 0x100(%rsp), %rdi
addq $0x10, %rdi
callq 0x116860
testb $0x1, %al
jne 0x1cd5de
movq 0x100(%rsp), %rdi
addq $0x10, %rdi
callq 0x117710
testb $0x1, %al
jne 0x1cd5de
movq 0x100(%rsp), %rdi
addq $0x20, %rdi
leaq 0x45ae3(%rip), %rsi # 0x212fbc
callq 0x164bb0
movb %al, %cl
movq 0x28(%rsp), %rax
movb %cl, 0x38(%rax)
movq 0x100(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x48(%rsp), %rsi
callq 0x1d8960
movq 0x10(%rsp), %rsi
leaq 0x4c99e(%rip), %rdx # 0x219eb8
leaq 0x78(%rsp), %rdi
callq 0x19f670
jmp 0x1cd526
movq 0x28(%rsp), %rdi
addq $0x18, %rdi
leaq 0x78(%rsp), %rsi
callq 0x5a960
leaq 0x78(%rsp), %rdi
callq 0x5b578
leaq 0x58(%rsp), %rdi
callq 0x1a4640
jmp 0x1cd5de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x1cd607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x1cd5a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x5b578
leaq 0x98(%rsp), %rdi
callq 0xa2710
leaq 0xb8(%rsp), %rdi
callq 0xa2710
jmp 0x1cd607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x1a4640
jmp 0x1cd607
movb $0x1, 0xff(%rsp)
testb $0x1, 0xff(%rsp)
jne 0x1cd5fa
movq 0x28(%rsp), %rdi
callq 0x104060
movq 0x30(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
retq
movq 0x28(%rsp), %rdi
callq 0x104060
movq 0xb0(%rsp), %rdi
callq 0x5abd0
nop
| _ZL40common_chat_params_init_functionary_v3_2RKN5minja13chat_templateERK18common_chat_inputs:
sub rsp, 118h
mov [rsp+118h+var_F0], rdi
mov rax, rdi
mov [rsp+118h+var_E8], rax
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_10], rsi
mov [rsp+118h+var_18], rdx
mov [rsp+118h+var_19], 0
call _ZN18common_chat_paramsC2Ev; common_chat_params::common_chat_params(void)
mov rax, [rsp+118h+var_10]
mov [rsp+118h+var_E0], rax
mov rax, [rsp+118h+var_18]
mov [rsp+118h+var_D8], rax
mov rdi, [rsp+118h+var_18]
add rdi, 10h
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void)
test al, 1
jnz short loc_1CD39A
jmp short loc_1CD3AD
loc_1CD39A:
lea rdi, [rsp+118h+var_60]
xor eax, eax
mov esi, eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr))
jmp short loc_1CD3CA
loc_1CD3AD:
mov rsi, [rsp+118h+var_18]
add rsi, 10h
lea rdi, [rsp+118h+var_60]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short $+2
loc_1CD3C8:
jmp short $+2
loc_1CD3CA:
mov rax, [rsp+118h+var_18]
movzx eax, byte ptr [rax+68h]
mov [rsp+118h+var_FC], eax
xor eax, eax
mov esi, eax
lea rdi, [rsp+118h+var_80]
mov [rsp+118h+var_F8], rdi
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr))
mov r8d, [rsp+118h+var_FC]
mov rsi, [rsp+118h+var_E0]
mov rdx, [rsp+118h+var_D8]
mov r9, [rsp+118h+var_F8]
mov rax, rsp
mov dword ptr [rax], 1
and r8d, 1
lea rdi, [rsp+118h+var_50]
lea rcx, [rsp+118h+var_60]
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
jmp short $+2
loc_1CD428:
lea rdi, [rsp+118h+var_30]
lea rsi, [rsp+118h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
jmp short $+2
loc_1CD43F:
mov rdi, [rsp+118h+var_F0]
add rdi, 8
lea rsi, [rsp+118h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::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>)
lea rdi, [rsp+118h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
lea rdi, [rsp+118h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
lea rdi, [rsp+118h+var_60]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
mov rax, [rsp+118h+var_F0]
mov dword ptr [rax], 7
mov rdi, [rsp+118h+var_18]
add rdi, 10h
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; 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>::is_null(void)
test al, 1
jnz loc_1CD5DE
mov rdi, [rsp+118h+var_18]
add rdi, 10h
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void)
test al, 1
jnz loc_1CD5DE
mov rdi, [rsp+118h+var_18]
add rdi, 20h ; ' '
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov cl, al
mov rax, [rsp+118h+var_F0]
mov [rax+38h], cl
mov rcx, [rsp+118h+var_18]
mov [rsp+118h+var_D0], rcx
mov [rsp+118h+var_C8], rax
lea rdi, [rsp+118h+var_C0]
mov [rsp+118h+var_108], rdi
lea rsi, [rsp+118h+var_D0]
call _ZNSt8functionIFvRK22common_grammar_builderEEC2IZL40common_chat_params_init_functionary_v3_2RKN5minja13chat_templateERK18common_chat_inputsE3$_0vEEOT_; std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0,void>(common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0 &&)
mov rsi, [rsp+118h+var_108]
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+118h+var_A0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
jmp short $+2
loc_1CD526:
mov rdi, [rsp+118h+var_F0]
add rdi, 18h
lea rsi, [rsp+118h+var_A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+118h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_C0]
call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function()
jmp loc_1CD5DE
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_1CD607
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_1CD5A2
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1CD5A2:
lea rdi, [rsp+arg_90]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
lea rdi, [rsp+arg_B0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
jmp short loc_1CD607
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_50]
call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function()
jmp short loc_1CD607
loc_1CD5DE:
mov [rsp+118h+var_19], 1
test [rsp+118h+var_19], 1
jnz short loc_1CD5FA
mov rdi, [rsp+118h+var_F0]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
loc_1CD5FA:
mov rax, [rsp+118h+var_E8]
add rsp, 118h
retn
loc_1CD607:
mov rdi, [rsp+arg_20]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
| const minja::chat_template * common_chat_params_init_functionary_v3_2(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v8; // [rsp+1Ch] [rbp-FCh]
long long v9; // [rsp+40h] [rbp-D8h]
_QWORD v10[2]; // [rsp+48h] [rbp-D0h] BYREF
_BYTE v11[32]; // [rsp+58h] [rbp-C0h] BYREF
_BYTE v12[32]; // [rsp+78h] [rbp-A0h] BYREF
_BYTE v13[32]; // [rsp+98h] [rbp-80h] BYREF
_BYTE v14[16]; // [rsp+B8h] [rbp-60h] BYREF
_BYTE v15[32]; // [rsp+C8h] [rbp-50h] BYREF
_BYTE v16[24]; // [rsp+E8h] [rbp-30h] BYREF
long long v17; // [rsp+100h] [rbp-18h]
const common_chat_inputs *v18; // [rsp+108h] [rbp-10h]
const minja::chat_template *v19; // [rsp+110h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16[23] = 0;
common_chat_params::common_chat_params(a1);
v9 = v17;
if ( (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>::empty(v17 + 16) & 1) != 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>::basic_json((long long)v14);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v14,
v17 + 16);
v8 = *(_BYTE *)(v17 + 104);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)v13);
minja::chat_template::apply((long long)v15, a2, v9, (long long)v14, v8 & 1, v13, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(
v16,
(long long)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>::operator=(
(long long)a1 + 8,
(long long)v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16);
std::string::~string(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>::~basic_json((long long)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>::~basic_json((long long)v14);
*(_DWORD *)a1 = 7;
if ( !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>::is_null((_BYTE *)(v17 + 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>::empty(v17 + 16) & 1) == 0 )
{
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
v17 + 32,
(long long)"required",
v3,
v4,
v5,
v6);
v10[0] = v17;
v10[1] = a1;
std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0,void>(
v11,
v10);
build_grammar[abi:cxx11]((long long)v12, (long long)v11, grammar_options);
std::string::operator=((char *)a1 + 24, v12);
std::string::~string(v12);
std::function<void ()(common_grammar_builder const&)>::~function((std::_Function_base *)v11);
}
return a1;
}
| _CharMatcher:
SUB RSP,0x28
MOV AL,SIL
MOV qword ptr [RSP + 0x20],RDI
MOV byte ptr [RSP + 0x1f],AL
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001cb060
MOV RDI,qword ptr [RSP + 0x8]
MOVSX ESI,byte ptr [RSP + 0x1f]
CALL 0x001cb310
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + 0x8],CL
ADD RSP,0x28
RET
|
/* std::__detail::_CharMatcher<std::__cxx11::regex_traits<char>, true, true>::_CharMatcher(char,
std::__cxx11::regex_traits<char> const&) */
void __thiscall
std::__detail::_CharMatcher<std::__cxx11::regex_traits<char>,true,true>::_CharMatcher
(_CharMatcher<std::__cxx11::regex_traits<char>,true,true> *this,char param_1,
regex_traits *param_2)
{
_CharMatcher<std::__cxx11::regex_traits<char>,true,true> _Var1;
_RegexTranslator<std::__cxx11::regex_traits<char>,true,true>::_RegexTranslatorBase
((_RegexTranslator<std::__cxx11::regex_traits<char>,true,true> *)this,param_2);
_Var1 = (_CharMatcher<std::__cxx11::regex_traits<char>,true,true>)
_RegexTranslatorBase<std::__cxx11::regex_traits<char>,true,true>::_M_translate((char)this)
;
this[8] = _Var1;
return;
}
| |
23,070 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xc1e09
cmpq $0x0, 0x20(%r14)
jne 0xc1e09
cmpq $0x0, 0x30(%r14)
jne 0xc1e09
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc1ed7
movq (%rbx), %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6084
leaq 0x5f87b(%rip), %rsi # 0x1216aa
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf924
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0xa316b(%rip), %rsi # 0x164fc0
movq 0xa311c(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1e82
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1e9d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xc1ec7
jmp 0xc1ecf
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1ec7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xc1ec7
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f00
movq %r14, %rdi
callq 0x21af0
| _ZNK5minja5Value3getIlEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_C1E09
cmp qword ptr [r14+20h], 0
jnz short loc_C1E09
cmp qword ptr [r14+30h], 0
jnz short loc_C1E09
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov rax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_C1E09:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C1E82
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1E82:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C1E9D
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1E9D:
test bpl, bpl
jnz short loc_C1EC7
jmp short loc_C1ECF
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C1EC7
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C1EC7
mov r14, rax
loc_C1EC7:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C1ECF:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<long>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v4);
return v4[0];
}
| get<long>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001c1e09
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001c1e09
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001c1e09
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001c1ed7
MOV RAX,qword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001c1e09:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001c1e16:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6084
LAB_001c1e28:
LEA RSI,[0x2216aa]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af924
MOV BPL,0x1
LAB_001c1e3f:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* long minja::Value::get<long>() const */
long __thiscall minja::Value::get<long>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
long local_38 [4];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c1e16 to 001c1e27 has its CatchHandler @ 001c1ec4 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001c1e28 to 001c1e3b has its CatchHandler @ 001c1ea4 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001c1e3f to 001c1e63 has its CatchHandler @ 001c1e64 */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
| |
23,071 | google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(google::protobuf::Message*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const FieldDescriptor* FindExtension(Message* message,
const std::string& name) const override {
assert_mutex_held(builder_->pool_);
const Descriptor* descriptor = message->GetDescriptor();
Symbol result =
builder_->LookupSymbolNoPlaceholder(name, descriptor->full_name());
if (auto* field = result.field_descriptor()) {
return field;
} else if (result.type() == Symbol::MESSAGE &&
descriptor->options().message_set_wire_format()) {
const Descriptor* foreign_type = result.descriptor();
// The text format allows MessageSet items to be specified using
// the type name, rather than the extension identifier. If the symbol
// lookup returned a Message, and the enclosing Message has
// message_set_wire_format = true, then return the message set
// extension, if one exists.
for (int i = 0; i < foreign_type->extension_count(); i++) {
const FieldDescriptor* extension = foreign_type->extension(i);
if (extension->containing_type() == descriptor &&
extension->type() == FieldDescriptor::TYPE_MESSAGE &&
extension->is_optional() &&
extension->message_type() == foreign_type) {
// Found it.
return extension;
}
}
}
return nullptr;
} | O3 | cpp | google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(google::protobuf::Message*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %r15
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x80(%rax)
movq %rax, %rbx
movq 0x8(%r15), %rdi
movq 0x8(%rax), %rdx
addq $0x20, %rdx
movq %r14, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x2875a
movq %rax, %r14
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x40dc3
cmpl $0x1, %eax
jne 0x40dbe
movq 0x20(%rbx), %rax
cmpb $0x1, 0x48(%rax)
jne 0x40dbe
cmpl $0x0, 0x7c(%r14)
jle 0x40dbe
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x50(%r14), %r12
cmpq %rbx, 0x20(%r12,%rbp)
jne 0x40dae
leaq (%r12,%rbp), %r13
movq 0x18(%r12,%rbp), %rdi
testq %rdi, %rdi
je 0x40d8e
leaq -0x6155(%rip), %rax # 0x3ac20
movq %rax, 0x10(%rsp)
movq %r13, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x3fc96
cmpb $0xb, 0x2(%r12,%rbp)
jne 0x40dae
movb 0x1(%r12,%rbp), %al
andb $0x60, %al
cmpb $0x20, %al
jne 0x40dae
movq %r13, %rdi
callq 0x1e7ba
cmpq %r14, %rax
je 0x40dc6
incq %r15
movslq 0x7c(%r14), %rax
addq $0x48, %rbp
cmpq %rax, %r15
jl 0x40d55
xorl %r13d, %r13d
jmp 0x40dc6
movq %r14, %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK6google8protobuf17DescriptorBuilder17OptionInterpreter21AggregateOptionFinder13FindExtensionEPNS0_7MessageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov r15, rdi
mov rax, [rsi]
mov rdi, rsi
call qword ptr [rax+80h]
mov rbx, rax
mov rdi, [r15+8]
mov rdx, [rax+8]
add rdx, 20h ; ' '
mov rsi, r14
xor ecx, ecx
mov r8d, 1
call _ZN6google8protobuf17DescriptorBuilder25LookupSymbolNoPlaceholderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_NS1_11ResolveModeEb; google::protobuf::DescriptorBuilder::LookupSymbolNoPlaceholder(std::string const&,std::string const&,google::protobuf::DescriptorBuilder::ResolveMode,bool)
mov r14, rax
movzx eax, byte ptr [rax]
cmp eax, 2
jz loc_40DC3
cmp eax, 1
jnz short loc_40DBE
mov rax, [rbx+20h]
cmp byte ptr [rax+48h], 1
jnz short loc_40DBE
cmp dword ptr [r14+7Ch], 0
jle short loc_40DBE
xor ebp, ebp
xor r15d, r15d
loc_40D55:
mov r12, [r14+50h]
cmp [r12+rbp+20h], rbx
jnz short loc_40DAE
lea r13, [r12+rbp]
mov rdi, [r12+rbp+18h]
test rdi, rdi
jz short loc_40D8E
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_40], r13
lea rsi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_40]
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_40D8E:
cmp byte ptr [r12+rbp+2], 0Bh
jnz short loc_40DAE
mov al, [r12+rbp+1]
and al, 60h
cmp al, 20h ; ' '
jnz short loc_40DAE
mov rdi, r13; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
cmp rax, r14
jz short loc_40DC6
loc_40DAE:
inc r15
movsxd rax, dword ptr [r14+7Ch]
add rbp, 48h ; 'H'
cmp r15, rax
jl short loc_40D55
loc_40DBE:
xor r13d, r13d
jmp short loc_40DC6
loc_40DC3:
mov r13, r14
loc_40DC6:
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| int * google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(
long long a1,
long long a2,
long long *a3)
{
long long v4; // rbx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
int *v8; // r14
int v9; // eax
long long v10; // rbp
long long v11; // r15
long long v12; // r12
long long v13; // r13
long long v14; // rdi
long long v16; // [rsp+8h] [rbp-40h] BYREF
long long ( *v17[7])(google::protobuf::FieldDescriptor *, const google::protobuf::FieldDescriptor *); // [rsp+10h] [rbp-38h] BYREF
v4 = (*(long long ( **)(long long))(*(_QWORD *)a2 + 128LL))(a2);
v8 = (int *)google::protobuf::DescriptorBuilder::LookupSymbolNoPlaceholder(
*(_QWORD **)(a1 + 8),
a3,
*(_QWORD *)(v4 + 8) + 32LL,
0,
1u);
v9 = *(unsigned __int8 *)v8;
if ( v9 == 2 )
return v8;
if ( v9 != 1 || *(_BYTE *)(*(_QWORD *)(v4 + 32) + 72LL) != 1 || v8[31] <= 0 )
return 0LL;
v10 = 0LL;
v11 = 0LL;
while ( 1 )
{
v12 = *((_QWORD *)v8 + 10);
if ( *(_QWORD *)(v12 + v10 + 32) == v4 )
{
v13 = v12 + v10;
v14 = *(_QWORD *)(v12 + v10 + 24);
if ( v14 )
{
v17[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v16 = v12 + v10;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v14,
(long long)v17,
(long long)&v16,
v5,
v6,
v7);
}
if ( *(_BYTE *)(v12 + v10 + 2) == 11
&& (*(_BYTE *)(v12 + v10 + 1) & 0x60) == 0x20
&& (int *)google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)(v12 + v10)) == v8 )
{
break;
}
}
++v11;
v10 += 72LL;
if ( v11 >= v8[31] )
return 0LL;
}
return (int *)v13;
}
| FindExtension:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV R15,RDI
MOV RAX,qword ptr [RSI]
MOV RDI,RSI
CALL qword ptr [RAX + 0x80]
MOV RBX,RAX
MOV RDI,qword ptr [R15 + 0x8]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,0x20
MOV RSI,R14
XOR ECX,ECX
MOV R8D,0x1
CALL 0x0012875a
MOV R14,RAX
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00140dc3
CMP EAX,0x1
JNZ 0x00140dbe
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX + 0x48],0x1
JNZ 0x00140dbe
CMP dword ptr [R14 + 0x7c],0x0
JLE 0x00140dbe
XOR EBP,EBP
XOR R15D,R15D
LAB_00140d55:
MOV R12,qword ptr [R14 + 0x50]
CMP qword ptr [R12 + RBP*0x1 + 0x20],RBX
JNZ 0x00140dae
LEA R13,[R12 + RBP*0x1]
MOV RDI,qword ptr [R12 + RBP*0x1 + 0x18]
TEST RDI,RDI
JZ 0x00140d8e
LEA RAX,[0x13ac20]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],R13
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x8]
CALL 0x0013fc96
LAB_00140d8e:
CMP byte ptr [R12 + RBP*0x1 + 0x2],0xb
JNZ 0x00140dae
MOV AL,byte ptr [R12 + RBP*0x1 + 0x1]
AND AL,0x60
CMP AL,0x20
JNZ 0x00140dae
MOV RDI,R13
CALL 0x0011e7ba
CMP RAX,R14
JZ 0x00140dc6
LAB_00140dae:
INC R15
MOVSXD RAX,dword ptr [R14 + 0x7c]
ADD RBP,0x48
CMP R15,RAX
JL 0x00140d55
LAB_00140dbe:
XOR R13D,R13D
JMP 0x00140dc6
LAB_00140dc3:
MOV R13,R14
LAB_00140dc6:
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(google::protobuf::Message*,
std::__cxx11::string const&) const */
FieldDescriptor * __thiscall
google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension
(AggregateOptionFinder *this,Message *param_1,string *param_2)
{
FieldDescriptor *this_00;
long lVar1;
once_flag *poVar2;
long lVar3;
FieldDescriptor *pFVar4;
FieldDescriptor *pFVar5;
long lVar6;
long lVar7;
FieldDescriptor *local_40;
code *local_38;
lVar3 = (**(code **)(*(long *)param_1 + 0x80))(param_1);
pFVar4 = (FieldDescriptor *)
LookupSymbolNoPlaceholder
(*(DescriptorBuilder **)(this + 8),param_2,*(long *)(lVar3 + 8) + 0x20,0,1);
if (*pFVar4 != (FieldDescriptor)0x2) {
if (((*pFVar4 == (FieldDescriptor)0x1) && (*(char *)(*(long *)(lVar3 + 0x20) + 0x48) == '\x01'))
&& (0 < *(int *)(pFVar4 + 0x7c))) {
lVar6 = 0;
lVar7 = 0;
do {
lVar1 = *(long *)(pFVar4 + 0x50);
if (*(long *)(lVar1 + 0x20 + lVar6) == lVar3) {
this_00 = (FieldDescriptor *)(lVar1 + lVar6);
poVar2 = *(once_flag **)(lVar1 + 0x18 + lVar6);
if (poVar2 != (once_flag *)0x0) {
local_38 = FieldDescriptor::TypeOnceInit;
local_40 = this_00;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(poVar2,(_func_void_FieldDescriptor_ptr *)&local_38,&local_40);
}
if (((*(char *)(lVar1 + 2 + lVar6) == '\v') &&
((*(byte *)(lVar1 + 1 + lVar6) & 0x60) == 0x20)) &&
(pFVar5 = (FieldDescriptor *)FieldDescriptor::message_type(this_00), pFVar5 == pFVar4))
{
return this_00;
}
}
lVar7 = lVar7 + 1;
lVar6 = lVar6 + 0x48;
} while (lVar7 < *(int *)(pFVar4 + 0x7c));
}
pFVar4 = (FieldDescriptor *)0x0;
}
return pFVar4;
}
| |
23,072 | ma_ck_write_tree | eloqsql/storage/maria/ma_write.c | static my_bool _ma_ck_write_tree(register MARIA_HA *info, MARIA_KEY *key)
{
my_bool error;
uint keynr= key->keyinfo->key_nr;
DBUG_ENTER("_ma_ck_write_tree");
/* Store ref_length as this is always constant */
info->bulk_insert_ref_length= key->ref_length;
error= tree_insert(&info->bulk_insert[keynr], key->data,
key->data_length + key->ref_length,
info->bulk_insert[keynr].custom_arg) == 0;
DBUG_RETURN(error);
} | O0 | c | ma_ck_write_tree:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0xa5(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x640(%rax)
movq -0x8(%rbp), %rax
movq 0x310(%rax), %rdi
movl -0x18(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
addl 0x14(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x310(%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq 0x230(%rax), %rcx
callq 0xfc200
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_ck_write_tree:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+8]
movzx eax, byte ptr [rax+0A5h]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov ecx, [rax+14h]
mov rax, [rbp+var_8]
mov [rax+640h], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+310h]
mov eax, [rbp+var_18]
imul rax, 298h
add rdi, rax
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov edx, [rax+10h]
mov rax, [rbp+var_10]
add edx, [rax+14h]
mov rax, [rbp+var_8]
mov rax, [rax+310h]
mov ecx, [rbp+var_18]
imul rcx, 298h
add rax, rcx
mov rcx, [rax+230h]
call tree_insert
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_11], al
mov al, [rbp+var_11]
mov [rbp+var_19], al
mov al, [rbp+var_19]
add rsp, 20h
pop rbp
retn
| _BOOL8 ma_ck_write_tree(long long a1, long long a2)
{
unsigned int v3; // [rsp+8h] [rbp-18h]
v3 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL);
*(_DWORD *)(a1 + 1600) = *(_DWORD *)(a2 + 20);
return tree_insert(
664LL * v3 + *(_QWORD *)(a1 + 784),
*(_QWORD *)a2,
(unsigned int)(*(_DWORD *)(a2 + 20) + *(_DWORD *)(a2 + 16)),
*(_QWORD *)(664LL * v3 + *(_QWORD *)(a1 + 784) + 560)) == 0;
}
| _ma_ck_write_tree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0xa5]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x640],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x310]
MOV EAX,dword ptr [RBP + -0x18]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD EDX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x310]
MOV ECX,dword ptr [RBP + -0x18]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV RCX,qword ptr [RAX + 0x230]
CALL 0x001fc200
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x11],AL
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x19],AL
MOV AL,byte ptr [RBP + -0x19]
ADD RSP,0x20
POP RBP
RET
|
bool _ma_ck_write_tree(long param_1,int8 *param_2)
{
byte bVar1;
long lVar2;
bVar1 = *(byte *)(param_2[1] + 0xa5);
*(int4 *)(param_1 + 0x640) = *(int4 *)((long)param_2 + 0x14);
lVar2 = tree_insert(*(long *)(param_1 + 0x310) + (ulong)(uint)bVar1 * 0x298,*param_2,
*(int *)(param_2 + 2) + *(int *)((long)param_2 + 0x14),
*(int8 *)
(*(long *)(param_1 + 0x310) + (ulong)(uint)bVar1 * 0x298 + 0x230));
return lVar2 == 0;
}
| |
23,073 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O0 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
movl -0x4(%rbp), %edx
addl $0x1, %edx
movl $0x20, %esi
callq 0x4a800
movl %eax, -0x124(%rbp)
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl -0x124(%rbp), %eax
jge 0x4ca82
leaq 0x26447(%rip), %rax # 0x72e69
testb $0x1, (%rax)
je 0x4ca4c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x33d7(%rip), %rcx # 0x4fe1c
callq 0x4cc40
jmp 0x4ca6f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x33b2(%rip), %rcx # 0x4fe1c
callq 0x4ccf0
jmp 0x4ca71
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x4ca0d
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_120]; this
mov edx, [rbp+var_4]
add edx, 1; int
mov esi, offset qword_20; void **
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbp+var_124], eax
mov [rbp+var_128], 0
loc_4CA0D:
mov eax, [rbp+var_128]
cmp eax, [rbp+var_124]
jge short loc_4CA82
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
test byte ptr [rax], 1
jz short loc_4CA4C
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_4FE1C; " "
call _ZN5nglogL15DumpPCAndSymbolEPFvPKcPvES2_S2_S1_; nglog::DumpPCAndSymbol(void (*)(char const*,void *),void *,void *,char const*)
jmp short loc_4CA6F
loc_4CA4C:
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_4FE1C; " "
call _ZN5nglogL6DumpPCEPFvPKcPvES2_S2_S1_; nglog::DumpPC(void (*)(char const*,void *),void *,void *,char const*)
loc_4CA6F:
jmp short $+2
loc_4CA71:
mov eax, [rbp+var_128]
add eax, 1
mov [rbp+var_128], eax
jmp short loc_4CA0D
loc_4CA82:
add rsp, 130h
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, nglog *a2, void (*a3)(const char *, void *), void *a4)
{
const char *v4; // r8
long long result; // rax
unsigned int i; // [rsp+8h] [rbp-128h]
int StackTrace; // [rsp+Ch] [rbp-124h]
void *v8[33]; // [rsp+10h] [rbp-120h] BYREF
void (*v9)(const char *, void *); // [rsp+118h] [rbp-18h]
nglog *v10; // [rsp+120h] [rbp-10h]
int v11; // [rsp+12Ch] [rbp-4h]
v11 = (int)this;
v10 = a2;
v9 = a3;
StackTrace = nglog::tools::GetStackTrace((nglog::tools *)v8, (void **)&qword_20, (int)this + 1);
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= StackTrace )
break;
if ( (fLB::FLAGS_symbolize_stacktrace & 1) != 0 )
nglog::DumpPCAndSymbol(v10, v9, v8[i], " ", v4);
else
nglog::DumpPC(v10, v9, v8[i], " ", v4);
}
return result;
}
| DumpStackTrace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x4]
ADD EDX,0x1
MOV ESI,0x20
CALL 0x0014a800
MOV dword ptr [RBP + -0x124],EAX
MOV dword ptr [RBP + -0x128],0x0
LAB_0014ca0d:
MOV EAX,dword ptr [RBP + -0x128]
CMP EAX,dword ptr [RBP + -0x124]
JGE 0x0014ca82
LEA RAX,[0x172e69]
TEST byte ptr [RAX],0x1
JZ 0x0014ca4c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x14fe1c]
CALL 0x0014cc40
JMP 0x0014ca6f
LAB_0014ca4c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x14fe1c]
CALL 0x0014ccf0
LAB_0014ca6f:
JMP 0x0014ca71
LAB_0014ca71:
MOV EAX,dword ptr [RBP + -0x128]
ADD EAX,0x1
MOV dword ptr [RBP + -0x128],EAX
JMP 0x0014ca0d
LAB_0014ca82:
ADD RSP,0x130
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
int iVar1;
int local_130;
void *local_128 [33];
void *local_20;
_func_void_char_ptr_void_ptr *local_18;
int local_c;
local_20 = param_3;
local_18 = param_2;
local_c = param_1;
iVar1 = tools::GetStackTrace(local_128,0x20,param_1 + 1);
for (local_130 = 0; local_130 < iVar1; local_130 = local_130 + 1) {
if ((fLB::FLAGS_symbolize_stacktrace & 1) == 0) {
DumpPC(local_18,local_20,local_128[local_130]," ");
}
else {
DumpPCAndSymbol(local_18,local_20,local_128[local_130]," ");
}
}
return;
}
| |
23,074 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O1 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp # imm = 0x918
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
movl $0x2, %edx
callq 0x20650
testl %eax, %eax
jle 0x2185c
movl %eax, %r13d
leaq 0x110(%rsp), %r15
xorl %ebp, %ebp
movq 0x10(%rsp,%rbp,8), %r12
leaq 0xe4af(%rip), %rax # 0x2fc59
cmpb $0x1, (%rax)
jne 0x21821
leaq -0x1(%r12), %rdi
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x208f6
testb %al, %al
leaq 0xdf4(%rip), %rax # 0x225c0
cmovneq %r15, %rax
movq %rax, (%rsp)
movl $0x400, %esi # imm = 0x400
movq %r13, %r15
movq %r14, %r13
movq %rbx, %r14
leaq 0x510(%rsp), %rbx
movq %rbx, %rdi
leaq 0x27a7(%rip), %rdx # 0x23f9b
leaq 0x2501(%rip), %rcx # 0x23cfc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x7860
movq %rbx, %rdi
movq %r14, %rbx
movq %r13, %r14
movq %r15, %r13
leaq 0x110(%rsp), %r15
jmp 0x2184a
movl $0x64, %esi
movq %r15, %rdi
leaq 0x2778(%rip), %rdx # 0x23fa8
leaq 0x24c5(%rip), %rcx # 0x23cfc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x7860
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
incq %rbp
cmpq %rbp, %r13
jne 0x2179e
addq $0x918, %rsp # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 918h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+948h+var_938]; this
mov esi, offset qword_20; void **
mov edx, 2; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
test eax, eax
jle loc_2185C
mov r13d, eax
lea r15, [rsp+948h+var_838]
xor ebp, ebp
loc_2179E:
mov r12, [rsp+rbp*8+948h+var_938]
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
cmp byte ptr [rax], 1
jnz short loc_21821
lea rdi, [r12-1]
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, al
lea rax, aUnknown; "(unknown)"
cmovnz rax, r15
mov [rsp+948h+var_948], rax
mov esi, 400h
mov r15, r13
mov r13, r14
mov r14, rbx
lea rbx, [rsp+948h+var_438]
mov rdi, rbx
lea rdx, aSPS; "%s@ %*p %s\n"
lea rcx, asc_23CFC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, rbx
mov rbx, r14
mov r14, r13
mov r13, r15
lea r15, [rsp+948h+var_838]
jmp short loc_2184A
loc_21821:
mov esi, 64h ; 'd'
mov rdi, r15
lea rdx, aSP; "%s@ %*p\n"
lea rcx, asc_23CFC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, r15
loc_2184A:
mov rsi, rbx
call r14
inc rbp
cmp r13, rbp
jnz loc_2179E
loc_2185C:
add rsp, 918h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, long long a2, void (*a3)(const char *, void *), void *a4)
{
long long result; // rax
long long v5; // r13
long long i; // rbp
const void *v7; // r12
bool v8; // zf
const char *v9; // rax
_QWORD v10[32]; // [rsp+10h] [rbp-938h] BYREF
_BYTE v11[1024]; // [rsp+110h] [rbp-838h] BYREF
_BYTE v12[1080]; // [rsp+510h] [rbp-438h] BYREF
result = nglog::tools::GetStackTrace((nglog::tools *)v10, (void **)&qword_20, 2);
if ( (int)result > 0 )
{
v5 = (unsigned int)result;
for ( i = 0LL; i != v5; ++i )
{
v7 = (const void *)v10[i];
if ( fLB::FLAGS_symbolize_stacktrace == 1 )
{
v8 = (unsigned __int8)nglog::tools::Symbolize(
(unsigned long long)v7 - 1,
(nglog::tools::_anonymous_namespace_ *)v11,
(char *)&stru_3F0.st_size) == 0;
v9 = "(unknown)";
if ( !v8 )
v9 = v11;
snprintf(v12, 1024LL, "%s@ %*p %s\n", " ", 18, v7, v9);
result = ((long long ( *)(_BYTE *, long long))this)(v12, a2);
}
else
{
snprintf(v11, 100LL, "%s@ %*p\n", " ", 18, (const void *)v10[i]);
result = ((long long ( *)(_BYTE *, long long))this)(v11, a2);
}
}
}
return result;
}
| DumpStackTrace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x918
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x10]
MOV ESI,0x20
MOV EDX,0x2
CALL 0x00120650
TEST EAX,EAX
JLE 0x0012185c
MOV R13D,EAX
LEA R15,[RSP + 0x110]
XOR EBP,EBP
LAB_0012179e:
MOV R12,qword ptr [RSP + RBP*0x8 + 0x10]
LEA RAX,[0x12fc59]
CMP byte ptr [RAX],0x1
JNZ 0x00121821
LEA RDI,[R12 + -0x1]
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x001208f6
TEST AL,AL
LEA RAX,[0x1225c0]
CMOVNZ RAX,R15
MOV qword ptr [RSP],RAX
MOV ESI,0x400
MOV R15,R13
MOV R13,R14
MOV R14,RBX
LEA RBX,[RSP + 0x510]
MOV RDI,RBX
LEA RDX,[0x123f9b]
LEA RCX,[0x123cfc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x00107860
MOV RDI,RBX
MOV RBX,R14
MOV R14,R13
MOV R13,R15
LEA R15,[RSP + 0x110]
JMP 0x0012184a
LAB_00121821:
MOV ESI,0x64
MOV RDI,R15
LEA RDX,[0x123fa8]
LEA RCX,[0x123cfc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x00107860
MOV RDI,R15
LAB_0012184a:
MOV RSI,RBX
CALL R14
INC RBP
CMP R13,RBP
JNZ 0x0012179e
LAB_0012185c:
ADD RSP,0x918
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
void *pvVar1;
char cVar2;
uint uVar3;
char *pcVar4;
ulong uVar5;
int4 in_register_0000003c;
char *__s;
void *local_938 [32];
char local_838 [1024];
char local_438 [1032];
uVar3 = tools::GetStackTrace(local_938,0x20,2);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
__s = local_838;
pvVar1 = local_938[uVar5];
if (fLB::FLAGS_symbolize_stacktrace == '\x01') {
cVar2 = tools::Symbolize((long)pvVar1 + -1,__s,0x400,0);
pcVar4 = "(unknown)";
if (cVar2 != '\0') {
pcVar4 = __s;
}
__s = local_438;
snprintf(__s,0x400,"%s@ %*p %s\n",&DAT_00123cfc,0x12,pvVar1,pcVar4);
}
else {
snprintf(__s,100,"%s@ %*p\n",&DAT_00123cfc,0x12,pvVar1);
}
(*(code *)CONCAT44(in_register_0000003c,param_1))(__s,param_2);
uVar5 = uVar5 + 1;
} while (uVar3 != uVar5);
}
return;
}
| |
23,075 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O3 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp # imm = 0x918
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
movl $0x2, %edx
callq 0x203c4
testl %eax, %eax
jle 0x21550
movl %eax, %r13d
leaq 0x110(%rsp), %r15
xorl %ebp, %ebp
movq 0x10(%rsp,%rbp,8), %r12
leaq 0xe7bb(%rip), %rax # 0x2fc59
cmpb $0x1, (%rax)
jne 0x21515
leaq -0x1(%r12), %rdi
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x206a4
testb %al, %al
leaq 0x10e8(%rip), %rax # 0x225a8
cmovneq %r15, %rax
movq %rax, (%rsp)
movl $0x400, %esi # imm = 0x400
movq %r13, %r15
movq %r14, %r13
movq %rbx, %r14
leaq 0x510(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2a8f(%rip), %rdx # 0x23f77
leaq 0x27ed(%rip), %rcx # 0x23cdc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x7860
movq %rbx, %rdi
movq %r14, %rbx
movq %r13, %r14
movq %r15, %r13
leaq 0x110(%rsp), %r15
jmp 0x2153e
movl $0x64, %esi
movq %r15, %rdi
leaq 0x2a60(%rip), %rdx # 0x23f84
leaq 0x27b1(%rip), %rcx # 0x23cdc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x7860
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
incq %rbp
cmpq %rbp, %r13
jne 0x21492
addq $0x918, %rsp # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 918h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+948h+var_938]; this
mov esi, offset qword_20; void **
mov edx, 2; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
test eax, eax
jle loc_21550
mov r13d, eax
lea r15, [rsp+948h+var_838]
xor ebp, ebp
loc_21492:
mov r12, [rsp+rbp*8+948h+var_938]
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
cmp byte ptr [rax], 1
jnz short loc_21515
lea rdi, [r12-1]
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, al
lea rax, aUnknown; "(unknown)"
cmovnz rax, r15
mov [rsp+948h+var_948], rax
mov esi, 400h
mov r15, r13
mov r13, r14
mov r14, rbx
lea rbx, [rsp+948h+var_438]
mov rdi, rbx
lea rdx, aSPS; "%s@ %*p %s\n"
lea rcx, asc_23CDC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, rbx
mov rbx, r14
mov r14, r13
mov r13, r15
lea r15, [rsp+948h+var_838]
jmp short loc_2153E
loc_21515:
mov esi, 64h ; 'd'
mov rdi, r15
lea rdx, aSP; "%s@ %*p\n"
lea rcx, asc_23CDC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, r15
loc_2153E:
mov rsi, rbx
call r14
inc rbp
cmp r13, rbp
jnz loc_21492
loc_21550:
add rsp, 918h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, long long a2, void (*a3)(const char *, void *), void *a4)
{
long long result; // rax
long long v5; // r13
long long i; // rbp
const void *v7; // r12
bool v8; // zf
const char *v9; // rax
_QWORD v10[32]; // [rsp+10h] [rbp-938h] BYREF
_BYTE v11[1024]; // [rsp+110h] [rbp-838h] BYREF
_BYTE v12[1080]; // [rsp+510h] [rbp-438h] BYREF
result = nglog::tools::GetStackTrace((nglog::tools *)v10, (void **)&qword_20, 2);
if ( (int)result > 0 )
{
v5 = (unsigned int)result;
for ( i = 0LL; i != v5; ++i )
{
v7 = (const void *)v10[i];
if ( fLB::FLAGS_symbolize_stacktrace == 1 )
{
v8 = (unsigned __int8)nglog::tools::Symbolize(
(unsigned long long)v7 - 1,
(nglog::tools::_anonymous_namespace_ *)v11,
(char *)&stru_3F0.st_size) == 0;
v9 = "(unknown)";
if ( !v8 )
v9 = v11;
snprintf(v12, 1024LL, "%s@ %*p %s\n", " ", 18, v7, v9);
result = ((long long ( *)(_BYTE *, long long))this)(v12, a2);
}
else
{
snprintf(v11, 100LL, "%s@ %*p\n", " ", 18, (const void *)v10[i]);
result = ((long long ( *)(_BYTE *, long long))this)(v11, a2);
}
}
}
return result;
}
| DumpStackTrace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x918
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x10]
MOV ESI,0x20
MOV EDX,0x2
CALL 0x001203c4
TEST EAX,EAX
JLE 0x00121550
MOV R13D,EAX
LEA R15,[RSP + 0x110]
XOR EBP,EBP
LAB_00121492:
MOV R12,qword ptr [RSP + RBP*0x8 + 0x10]
LEA RAX,[0x12fc59]
CMP byte ptr [RAX],0x1
JNZ 0x00121515
LEA RDI,[R12 + -0x1]
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x001206a4
TEST AL,AL
LEA RAX,[0x1225a8]
CMOVNZ RAX,R15
MOV qword ptr [RSP],RAX
MOV ESI,0x400
MOV R15,R13
MOV R13,R14
MOV R14,RBX
LEA RBX,[RSP + 0x510]
MOV RDI,RBX
LEA RDX,[0x123f77]
LEA RCX,[0x123cdc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x00107860
MOV RDI,RBX
MOV RBX,R14
MOV R14,R13
MOV R13,R15
LEA R15,[RSP + 0x110]
JMP 0x0012153e
LAB_00121515:
MOV ESI,0x64
MOV RDI,R15
LEA RDX,[0x123f84]
LEA RCX,[0x123cdc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x00107860
MOV RDI,R15
LAB_0012153e:
MOV RSI,RBX
CALL R14
INC RBP
CMP R13,RBP
JNZ 0x00121492
LAB_00121550:
ADD RSP,0x918
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
void *pvVar1;
char cVar2;
uint uVar3;
char *pcVar4;
ulong uVar5;
int4 in_register_0000003c;
char *__s;
void *local_938 [32];
char local_838 [1024];
char local_438 [1032];
uVar3 = tools::GetStackTrace(local_938,0x20,2);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
__s = local_838;
pvVar1 = local_938[uVar5];
if (fLB::FLAGS_symbolize_stacktrace == '\x01') {
cVar2 = tools::Symbolize((long)pvVar1 + -1,__s,0x400,0);
pcVar4 = "(unknown)";
if (cVar2 != '\0') {
pcVar4 = __s;
}
__s = local_438;
snprintf(__s,0x400,"%s@ %*p %s\n",&DAT_00123cdc,0x12,pvVar1,pcVar4);
}
else {
snprintf(__s,100,"%s@ %*p\n",&DAT_00123cdc,0x12,pvVar1);
}
(*(code *)CONCAT44(in_register_0000003c,param_1))(__s,param_2);
uVar5 = uVar5 + 1;
} while (uVar3 != uVar5);
}
return;
}
| |
23,076 | my_strnncoll_simple | eloqsql/strings/ctype-simple.c | int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
} | O0 | c | my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x92912
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x9291a
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x0, %eax
je 0x92949
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x92949
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x9294b
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x40(%rbp)
cmpq $0x0, %rax
je 0x929c1
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%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 0x929bf
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl -0x1(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x929f3
jmp 0x9294b
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x929d5
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x929ed
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_strnncoll_simple:
push rbp
mov rbp, rsp
mov al, r9b
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 [rbp+var_31], al
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_92912
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
jmp short loc_9291A
loc_92912:
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
loc_9291A:
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_48], rax
movsx eax, [rbp+var_31]
cmp eax, 0
jz short loc_92949
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_92949
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
loc_92949:
jmp short $+2
loc_9294B:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rcx
cmp rax, 0
jz short loc_929C1
mov rax, [rbp+var_48]
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_48]
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_929BF
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
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 short loc_929F3
loc_929BF:
jmp short loc_9294B
loc_929C1:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_929D5
mov eax, 1
mov [rbp+var_54], eax
jmp short loc_929ED
loc_929D5:
mov rdx, [rbp+var_20]
mov rsi, [rbp+var_30]
xor eax, eax
mov ecx, 0FFFFFFFFh
cmp rdx, rsi
cmovb eax, ecx
mov [rbp+var_54], eax
loc_929ED:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_929F3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_strnncoll_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
unsigned __int8 *v7; // rcx
unsigned __int8 *v8; // rdx
unsigned int v9; // eax
unsigned long long v12; // [rsp+4h] [rbp-50h]
long long v13; // [rsp+Ch] [rbp-48h]
unsigned long long v14; // [rsp+14h] [rbp-40h]
unsigned long long v16; // [rsp+34h] [rbp-20h]
v16 = a3;
if ( a3 <= a5 )
v12 = a3;
else
v12 = a5;
v14 = v12;
v13 = *(_QWORD *)(a1 + 88);
if ( a6 && a3 > a5 )
v16 = a5;
while ( v14-- )
{
v7 = a2++;
v8 = a4++;
if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) )
return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1)));
}
if ( v16 <= a5 )
{
v9 = 0;
if ( v16 < a5 )
v9 = -1;
return v9;
}
else
{
return 1;
}
}
| my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
MOV AL,R9B
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 byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00192912
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0019291a
LAB_00192912:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
LAB_0019291a:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x48],RAX
MOVSX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x0
JZ 0x00192949
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00192949
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
LAB_00192949:
JMP 0x0019294b
LAB_0019294b:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x40],RCX
CMP RAX,0x0
JZ 0x001929c1
MOV RAX,qword ptr [RBP + -0x48]
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 + -0x48]
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 0x001929bf
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
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 0x001929f3
LAB_001929bf:
JMP 0x0019294b
LAB_001929c1:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x001929d5
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001929ed
LAB_001929d5:
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
XOR EAX,EAX
MOV ECX,0xffffffff
CMP RDX,RSI
CMOVC EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
LAB_001929ed:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x4],EAX
LAB_001929f3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
long lVar1;
byte *pbVar2;
byte *pbVar3;
int local_5c;
ulong local_58;
ulong local_48;
byte *local_30;
ulong local_28;
byte *local_20;
local_58 = param_3;
if (param_5 < param_3) {
local_58 = param_5;
}
local_48 = local_58;
lVar1 = *(long *)(param_1 + 0x58);
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_3;
if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) {
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_5;
}
do {
local_20 = pbVar3;
local_30 = pbVar2;
if (local_48 == 0) {
if (param_5 < local_28) {
local_5c = 1;
}
else {
local_5c = 0;
if (local_28 < param_5) {
local_5c = -1;
}
}
return local_5c;
}
local_48 = local_48 - 1;
pbVar2 = local_30 + 1;
pbVar3 = 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);
}
| |
23,077 | parse_date | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static int parse_date(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm)
{
int err = 0;
const char *p = str;
const char *end = str + length;
int ret = 1;
tm->year = my_strtoui(p, end - p, &p, &err);
if (err || tm->year > 9999 || p == end || *p != '-')
goto end;
if (p - str == 2) // 2-digit year
tm->year += (tm->year >= 70) ? 1900 : 2000;
p++;
tm->month = my_strtoui(p,end -p, &p, &err);
if (err || tm->month > 12 || p == end || *p != '-')
goto end;
p++;
tm->day = my_strtoui(p, end -p , &p, &err);
if (err || tm->day > 31)
goto end;
ret = 0;
end:
*end_ptr = p;
return ret;
} | O0 | c | parse_date:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x2f550
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x24(%rbp)
jne 0x2e406
movq -0x20(%rbp), %rax
cmpl $0x270f, (%rax) # imm = 0x270F
ja 0x2e406
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x2e406
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x2e40b
jmp 0x2e4dd
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jne 0x2e43a
movq -0x20(%rbp), %rax
movl (%rax), %edx
movl $0x7d0, %ecx # imm = 0x7D0
movl $0x76c, %eax # imm = 0x76C
cmpl $0x46, %edx
cmovael %eax, %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x2f550
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0x24(%rbp)
jne 0x2e491
movq -0x20(%rbp), %rax
cmpl $0xc, 0x4(%rax)
ja 0x2e491
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x2e491
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x2e493
jmp 0x2e4dd
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x2f550
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x0, -0x24(%rbp)
jne 0x2e4d4
movq -0x20(%rbp), %rax
cmpl $0x1f, 0x8(%rax)
jbe 0x2e4d6
jmp 0x2e4dd
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| parse_date:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_38], rax
mov [rbp+var_3C], 1
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
cmp [rbp+var_24], 0
jnz short loc_2E406
mov rax, [rbp+var_20]
cmp dword ptr [rax], 270Fh
ja short loc_2E406
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_2E406
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_2E40B
loc_2E406:
jmp loc_2E4DD
loc_2E40B:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_8]
sub rax, rcx
cmp rax, 2
jnz short loc_2E43A
mov rax, [rbp+var_20]
mov edx, [rax]
mov ecx, 7D0h
mov eax, 76Ch
cmp edx, 46h ; 'F'
cmovnb ecx, eax
mov rax, [rbp+var_20]
add ecx, [rax]
mov [rax], ecx
loc_2E43A:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+4], ecx
cmp [rbp+var_24], 0
jnz short loc_2E491
mov rax, [rbp+var_20]
cmp dword ptr [rax+4], 0Ch
ja short loc_2E491
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_2E491
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_2E493
loc_2E491:
jmp short loc_2E4DD
loc_2E493:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_30]
sub rsi, rax
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_24]
call my_strtoui
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+8], ecx
cmp [rbp+var_24], 0
jnz short loc_2E4D4
mov rax, [rbp+var_20]
cmp dword ptr [rax+8], 1Fh
jbe short loc_2E4D6
loc_2E4D4:
jmp short loc_2E4DD
loc_2E4D6:
mov [rbp+var_3C], 0
loc_2E4DD:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long parse_date(_BYTE *a1, long long a2, _QWORD *a3, _DWORD *a4)
{
int v4; // eax
int v5; // ecx
int v6; // eax
int v7; // eax
unsigned int v9; // [rsp+4h] [rbp-3Ch]
_BYTE *v10; // [rsp+8h] [rbp-38h]
_BYTE *v11; // [rsp+10h] [rbp-30h] BYREF
int v12; // [rsp+1Ch] [rbp-24h] BYREF
_DWORD *v13; // [rsp+20h] [rbp-20h]
_QWORD *v14; // [rsp+28h] [rbp-18h]
long long v15; // [rsp+30h] [rbp-10h]
_BYTE *v16; // [rsp+38h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = 0;
v11 = a1;
v10 = &a1[a2];
v9 = 1;
v4 = my_strtoui(a1, a2, &v11, &v12);
*v13 = v4;
if ( !v12 && *v13 <= 0x270Fu && v11 != v10 && *v11 == 45 )
{
if ( v11 - v16 == 2 )
{
v5 = 2000;
if ( *v13 >= 0x46u )
v5 = 1900;
*v13 += v5;
}
++v11;
v6 = my_strtoui(v11, v10 - v11, &v11, &v12);
v13[1] = v6;
if ( !v12 && v13[1] <= 0xCu && v11 != v10 && *v11 == 45 )
{
++v11;
v7 = my_strtoui(v11, v10 - v11, &v11, &v12);
v13[2] = v7;
if ( !v12 && v13[2] <= 0x1Fu )
v9 = 0;
}
}
*v14 = v11;
return v9;
}
| parse_date:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x1
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x0012f550
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x0012e406
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x270f
JA 0x0012e406
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0012e406
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x0012e40b
LAB_0012e406:
JMP 0x0012e4dd
LAB_0012e40b:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
CMP RAX,0x2
JNZ 0x0012e43a
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX]
MOV ECX,0x7d0
MOV EAX,0x76c
CMP EDX,0x46
CMOVNC ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
LAB_0012e43a:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x0012f550
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x0012e491
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x4],0xc
JA 0x0012e491
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0012e491
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x0012e493
LAB_0012e491:
JMP 0x0012e4dd
LAB_0012e493:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
SUB RSI,RAX
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x24]
CALL 0x0012f550
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x0012e4d4
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x8],0x1f
JBE 0x0012e4d6
LAB_0012e4d4:
JMP 0x0012e4dd
LAB_0012e4d6:
MOV dword ptr [RBP + -0x3c],0x0
LAB_0012e4dd:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4 parse_date(char *param_1,long param_2,int8 *param_3,uint *param_4)
{
uint uVar1;
char *pcVar2;
int iVar3;
int4 local_44;
char *local_38;
int local_2c;
uint *local_28;
int8 *local_20;
long local_18;
char *local_10;
local_2c = 0;
pcVar2 = param_1 + param_2;
local_44 = 1;
local_38 = param_1;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
uVar1 = my_strtoui(param_1,(long)pcVar2 - (long)param_1,&local_38,&local_2c);
*local_28 = uVar1;
if ((((local_2c == 0) && (*local_28 < 10000)) && (local_38 != pcVar2)) && (*local_38 == '-')) {
if ((long)local_38 - (long)local_10 == 2) {
iVar3 = 2000;
if (0x45 < *local_28) {
iVar3 = 0x76c;
}
*local_28 = iVar3 + *local_28;
}
local_38 = local_38 + 1;
uVar1 = my_strtoui(local_38,(long)pcVar2 - (long)local_38,&local_38,&local_2c);
local_28[1] = uVar1;
if (((local_2c == 0) && (local_28[1] < 0xd)) && ((local_38 != pcVar2 && (*local_38 == '-')))) {
local_38 = local_38 + 1;
uVar1 = my_strtoui(local_38,(long)pcVar2 - (long)local_38,&local_38,&local_2c);
local_28[2] = uVar1;
if ((local_2c == 0) && (local_28[2] < 0x20)) {
local_44 = 0;
}
}
}
*local_20 = local_38;
return local_44;
}
| |
23,078 | test_if_hard_path | eloqsql/mysys/my_getwd.c | int test_if_hard_path(register const char *dir_name)
{
if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
return (home_dir != NullS && test_if_hard_path(home_dir));
if (dir_name[0] == FN_LIBCHAR)
return (TRUE);
#ifdef FN_DEVCHAR
return (strchr(dir_name,FN_DEVCHAR) != 0);
#else
return FALSE;
#endif
} | O0 | c | test_if_hard_path:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0xf040c
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xf040c
xorl %eax, %eax
leaq 0xb925ba(%rip), %rcx # 0xc82998
cmpq $0x0, (%rcx)
movb %al, -0x11(%rbp)
je 0xf03ff
leaq 0xb925aa(%rip), %rax # 0xc82998
movq (%rax), %rdi
callq 0xf03b0
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0xf0428
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xf0421
movl $0x1, -0x4(%rbp)
jmp 0xf0428
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_if_hard_path:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz short loc_F040C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 2Fh ; '/'
jnz short loc_F040C
xor eax, eax
lea rcx, home_dir
cmp qword ptr [rcx], 0
mov [rbp+var_11], al
jz short loc_F03FF
lea rax, home_dir
mov rdi, [rax]
call test_if_hard_path
cmp eax, 0
setnz al
mov [rbp+var_11], al
loc_F03FF:
mov al, [rbp+var_11]
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp short loc_F0428
loc_F040C:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_F0421
mov [rbp+var_4], 1
jmp short loc_F0428
loc_F0421:
mov [rbp+var_4], 0
loc_F0428:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| _BOOL8 test_if_hard_path(char *a1)
{
bool v2; // [rsp+Fh] [rbp-11h]
if ( *a1 == 126 && a1[1] == 47 )
{
v2 = 0;
if ( home_dir )
return (unsigned int)test_if_hard_path(home_dir) != 0;
return v2;
}
else
{
return *a1 == 47;
}
}
| test_if_hard_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x001f040c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2f
JNZ 0x001f040c
XOR EAX,EAX
LEA RCX,[0xd82998]
CMP qword ptr [RCX],0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x001f03ff
LEA RAX,[0xd82998]
MOV RDI,qword ptr [RAX]
CALL 0x001f03b0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_001f03ff:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f0428
LAB_001f040c:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001f0421
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001f0428
LAB_001f0421:
MOV dword ptr [RBP + -0x4],0x0
LAB_001f0428:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool test_if_hard_path(char *param_1)
{
int iVar1;
bool local_19;
if ((*param_1 == '~') && (param_1[1] == '/')) {
local_19 = false;
if (home_dir != 0) {
iVar1 = test_if_hard_path(home_dir);
local_19 = iVar1 != 0;
}
}
else if (*param_1 == '/') {
local_19 = true;
}
else {
local_19 = false;
}
return local_19;
}
| |
23,079 | minja::Value::push_back(minja::Value const&) | monkey531[P]llama/common/minja.hpp | void push_back(const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->push_back(v);
} | O3 | cpp | minja::Value::push_back(minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x93e5f
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x93f2e
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8c0b0
leaq 0x614a3(%rip), %rsi # 0xf5328
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7e879
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
xorl %ebp, %ebp
movq 0x9d13d(%rip), %rsi # 0x130fe8
movq 0x9d0a6(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93ed8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93ef3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0x93f1d
jmp 0x93f25
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93f1d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x93f1d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
nop
| _ZN5minja5Value9push_backERKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_93E5F
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&)
loc_93E5F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93ED8
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93ED8:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93EF3
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93EF3:
test bpl, bpl
jnz short loc_93F1D
jmp short loc_93F25
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93F1D
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_93F1D
mov r14, rax
loc_93F1D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_93F25:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::push_back(minja::Value *this, const minja::Value *a2)
{
long long v3; // rdi
void *exception; // rbx
_BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF
v3 = *((_QWORD *)this + 2);
if ( !v3 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Value is not an array: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::push_back(v3, a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x00193e5f
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x00193f2e
LAB_00193e5f:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00193e6c:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018c0b0
LAB_00193e7e:
LEA RSI,[0x1f5328]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017e879
MOV BPL,0x1
LAB_00193e95:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011be70
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* minja::Value::push_back(minja::Value const&) */
void __thiscall minja::Value::push_back(Value *this,Value *param_1)
{
runtime_error *this_00;
int1 auStack_58 [32];
string local_38 [32];
if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) !=
(vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::push_back
(*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00193e6c to 00193e7d has its CatchHandler @ 00193f1a */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00193e7e to 00193e91 has its CatchHandler @ 00193efa */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 00193e95 to 00193eb9 has its CatchHandler @ 00193eba */
std::runtime_error::runtime_error(this_00,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
| |
23,080 | mimi_conv_transpose_1d(ggml_easy::ctx::build_utils&, ggml_context*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int, bool) | ngxson[P]ggml-easy/demo/kyutai-mimi.cpp | static ggml_tensor * mimi_conv_transpose_1d(ggml_easy::ctx::build_utils & utils, ggml_context * ctx0, ggml_tensor * x,
ggml_tensor * kernel, ggml_tensor * bias, int stride, int dilation, bool depthwise) {
GGML_ASSERT(x->ne[1] == kernel->ne[2]);
int64_t n_rows = x->ne[1];
int64_t kernel_size = kernel->ne[0];
int64_t p_total = kernel_size - stride; // padding total
int64_t p_right = mimi_config.causal
? (float)p_total / mimi_config.trim_right_ratio
: p_total / 2;
int64_t p_left = p_total - p_right;
ggml_tensor * out = nullptr;
kernel = ggml_cast(ctx0, kernel, GGML_TYPE_F16); // TODO: do this at conversion time
if (depthwise) {
for (int64_t ir = 0; ir < n_rows; ir++) {
ggml_tensor * row = ggml_view_1d(ctx0, x,
x->ne[0], ir*x->ne[0]*ggml_element_size(x));
ggml_tensor * krn = ggml_view_1d(ctx0, kernel,
kernel->ne[0], ir*kernel->ne[0]*ggml_element_size(kernel));
if (ir == 0) {
ggml_set_name(krn, "krn");
ggml_easy::debug::print_tensor_shape(krn);
}
row = ggml_conv_transpose_1d(ctx0, krn, row, stride, 0, dilation);
if (ir == 0) {
ggml_set_name(row, "ggml_conv_transpose_1d __________");
ggml_easy::debug::print_tensor_shape(row);
}
// unpad (remove p_right and p_left columns)
row = ggml_view_1d(ctx0, row, row->ne[0] - p_total, p_left*ggml_element_size(row));
// TODO: concat can be slow, we should use ggml_view_1d/ggml_cpy to avoid realloc
out = out ? ggml_concat(ctx0, out, row, 1) : row;
}
} else {
out = ggml_conv_transpose_1d(ctx0, kernel, x, stride, 0, dilation);
// unpad
out = ggml_view_2d(ctx0, out,
out->ne[0] - p_total, out->ne[1],
out->nb[1], p_left*ggml_element_size(out));
}
if (bias) {
bias = ggml_cont(ctx0, ggml_transpose(ctx0, bias)); // TODO: do this at conversion time
out = ggml_add(ctx0, out, bias);
}
return out;
} | O0 | cpp | mimi_conv_transpose_1d(ggml_easy::ctx::build_utils&, ggml_context*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int, bool):
subq $0x128, %rsp # imm = 0x128
movb 0x138(%rsp), %al
movl 0x130(%rsp), %r10d
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq %rcx, 0x108(%rsp)
movq %r8, 0x100(%rsp)
movl %r9d, 0xfc(%rsp)
andb $0x1, %al
movb %al, 0xfb(%rsp)
movq 0x110(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x20(%rcx), %rax
je 0xdeaa
leaq 0x16e89(%rip), %rdi # 0x24d19
movl $0xb2, %esi
leaq 0x1627b(%rip), %rdx # 0x24117
leaq 0x16f46(%rip), %rcx # 0x24de9
movb $0x0, %al
callq 0xa8c0
movq 0x110(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0x108(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movslq 0xfc(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0xe0(%rsp)
testb $0x1, 0x23644(%rip) # 0x31538
je 0xdf13
cvtsi2ssq 0xe0(%rsp), %xmm0
divss 0x23694(%rip), %xmm0 # 0x3159c
movss %xmm0, 0xac(%rsp)
jmp 0xdf33
movq 0xe0(%rsp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cvtsi2ss %rax, %xmm0
movss %xmm0, 0xac(%rsp)
movss 0xac(%rsp), %xmm0
cvttss2si %xmm0, %rax
movq %rax, 0xd8(%rsp)
movq 0xe0(%rsp), %rax
subq 0xd8(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq $0x0, 0xc8(%rsp)
movq 0x118(%rsp), %rdi
movq 0x108(%rsp), %rsi
movl $0x1, %edx
callq 0xa1a0
movq %rax, 0x108(%rsp)
testb $0x1, 0xfb(%rsp)
je 0xe238
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xf0(%rsp), %rax
jge 0xe233
movq 0x118(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xc0(%rsp), %rax
movq 0x110(%rsp), %rcx
imulq 0x10(%rcx), %rax
movq %rax, 0x68(%rsp)
movq 0x110(%rsp), %rdi
callq 0xa550
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
imulq %rax, %rcx
callq 0xa790
movq %rax, 0xb8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x108(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movq 0x108(%rsp), %rcx
imulq 0x10(%rcx), %rax
movq %rax, 0x88(%rsp)
movq 0x108(%rsp), %rdi
callq 0xa550
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
imulq %rax, %rcx
callq 0xa790
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xc0(%rsp)
jne 0xe0f7
movq 0xb0(%rsp), %rdi
leaq 0x16d1e(%rip), %rsi # 0x24e03
callq 0xa940
movq 0xb0(%rsp), %rdi
callq 0xcfe0
movq 0x118(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movl 0xfc(%rsp), %ecx
movl 0x130(%rsp), %r9d
xorl %r8d, %r8d
callq 0xa9c0
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xc0(%rsp)
jne 0xe15a
movq 0xb8(%rsp), %rdi
leaq 0x16cbf(%rip), %rsi # 0x24e07
callq 0xa940
movq 0xb8(%rsp), %rdi
callq 0xcfe0
movq 0x118(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rax
subq 0xe0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rdi
callq 0xa550
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
imulq %rax, %rcx
callq 0xa790
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xc8(%rsp)
je 0xe200
movq 0x118(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movl $0x1, %ecx
callq 0xa9b0
movq %rax, 0x40(%rsp)
jmp 0xe20d
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0xdfa9
jmp 0xe30d
movq 0x118(%rsp), %rdi
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
movl 0xfc(%rsp), %ecx
movl 0x130(%rsp), %r9d
xorl %r8d, %r8d
callq 0xa9c0
movq %rax, 0xc8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
subq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xc8(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rdi
callq 0xa550
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
imulq %rax, %r9
callq 0xa690
movq %rax, 0xc8(%rsp)
cmpq $0x0, 0x100(%rsp)
je 0xe374
movq 0x118(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0xa6f0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xa120
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0x100(%rsp), %rdx
callq 0xa2d0
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
nopw %cs:(%rax,%rax)
| _ZL22mimi_conv_transpose_1dRN9ggml_easy3ctx11build_utilsEP12ggml_contextP11ggml_tensorS6_S6_iib:
sub rsp, 128h
mov al, [rsp+128h+arg_8]
mov r10d, [rsp+128h+arg_0]
mov [rsp+128h+var_8], rdi
mov [rsp+128h+var_10], rsi
mov [rsp+128h+var_18], rdx
mov [rsp+128h+var_20], rcx
mov [rsp+128h+var_28], r8
mov [rsp+128h+var_2C], r9d
and al, 1
mov [rsp+128h+var_2D], al
mov rax, [rsp+128h+var_18]
mov rax, [rax+18h]
mov rcx, [rsp+128h+var_20]
cmp rax, [rcx+20h]
jz short loc_DEAA
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B2h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXNe1KernelNe2; "x->ne[1] == kernel->ne[2]"
mov al, 0
call _ggml_abort
loc_DEAA:
mov rax, [rsp+128h+var_18]
mov rax, [rax+18h]
mov [rsp+128h+var_38], rax
mov rax, [rsp+128h+var_20]
mov rax, [rax+10h]
mov [rsp+128h+var_40], rax
mov rax, [rsp+128h+var_40]
movsxd rcx, [rsp+128h+var_2C]
sub rax, rcx
mov [rsp+128h+var_48], rax
test cs:mimi_config, 1
jz short loc_DF13
cvtsi2ss xmm0, [rsp+128h+var_48]
divss xmm0, cs:dword_3159C
movss [rsp+128h+var_7C], xmm0
jmp short loc_DF33
loc_DF13:
mov rax, [rsp+128h+var_48]
mov ecx, 2
cqo
idiv rcx
cvtsi2ss xmm0, rax
movss [rsp+128h+var_7C], xmm0
loc_DF33:
movss xmm0, [rsp+128h+var_7C]
cvttss2si rax, xmm0
mov [rsp+128h+var_50], rax
mov rax, [rsp+128h+var_48]
sub rax, [rsp+128h+var_50]
mov [rsp+128h+var_58], rax
mov [rsp+128h+var_60], 0
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_20]
mov edx, 1
call _ggml_cast
mov [rsp+128h+var_20], rax
test [rsp+128h+var_2D], 1
jz loc_E238
mov [rsp+128h+var_68], 0
loc_DFA9:
mov rax, [rsp+128h+var_68]
cmp rax, [rsp+128h+var_38]
jge loc_E233
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_B8], rax
mov rax, [rsp+128h+var_18]
mov [rsp+128h+var_B0], rax
mov rax, [rsp+128h+var_18]
mov rax, [rax+10h]
mov [rsp+128h+var_A8], rax
mov rax, [rsp+128h+var_68]
mov rcx, [rsp+128h+var_18]
imul rax, [rcx+10h]
mov [rsp+128h+var_C0], rax
mov rdi, [rsp+128h+var_18]
call _ggml_element_size
mov rcx, [rsp+128h+var_C0]
mov rdi, [rsp+128h+var_B8]
mov rsi, [rsp+128h+var_B0]
mov rdx, [rsp+128h+var_A8]
imul rcx, rax
call _ggml_view_1d
mov [rsp+128h+var_70], rax
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_98], rax
mov rax, [rsp+128h+var_20]
mov [rsp+128h+var_90], rax
mov rax, [rsp+128h+var_20]
mov rax, [rax+10h]
mov [rsp+128h+var_88], rax
mov rax, [rsp+128h+var_68]
mov rcx, [rsp+128h+var_20]
imul rax, [rcx+10h]
mov [rsp+128h+var_A0], rax
mov rdi, [rsp+128h+var_20]
call _ggml_element_size
mov rcx, [rsp+128h+var_A0]
mov rdi, [rsp+128h+var_98]
mov rsi, [rsp+128h+var_90]
mov rdx, [rsp+128h+var_88]
imul rcx, rax
call _ggml_view_1d
mov [rsp+128h+var_78], rax
cmp [rsp+128h+var_68], 0
jnz short loc_E0F7
mov rdi, [rsp+128h+var_78]
lea rsi, aKrn; "krn"
call _ggml_set_name
mov rdi, [rsp+128h+var_78]
call _ZN9ggml_easy5debugL18print_tensor_shapeEP11ggml_tensor; ggml_easy::debug::print_tensor_shape(ggml_tensor *)
loc_E0F7:
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_78]
mov rdx, [rsp+128h+var_70]
mov ecx, [rsp+128h+var_2C]
mov r9d, [rsp+128h+arg_0]
xor r8d, r8d
call _ggml_conv_transpose_1d
mov [rsp+128h+var_70], rax
cmp [rsp+128h+var_68], 0
jnz short loc_E15A
mov rdi, [rsp+128h+var_70]
lea rsi, aGgmlConvTransp_0; "ggml_conv_transpose_1d __________"
call _ggml_set_name
mov rdi, [rsp+128h+var_70]
call _ZN9ggml_easy5debugL18print_tensor_shapeEP11ggml_tensor; ggml_easy::debug::print_tensor_shape(ggml_tensor *)
loc_E15A:
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_D8], rax
mov rax, [rsp+128h+var_70]
mov [rsp+128h+var_D0], rax
mov rax, [rsp+128h+var_70]
mov rax, [rax+10h]
sub rax, [rsp+128h+var_48]
mov [rsp+128h+var_C8], rax
mov rax, [rsp+128h+var_58]
mov [rsp+128h+var_E0], rax
mov rdi, [rsp+128h+var_70]
call _ggml_element_size
mov rcx, [rsp+128h+var_E0]
mov rdi, [rsp+128h+var_D8]
mov rsi, [rsp+128h+var_D0]
mov rdx, [rsp+128h+var_C8]
imul rcx, rax
call _ggml_view_1d
mov [rsp+128h+var_70], rax
cmp [rsp+128h+var_60], 0
jz short loc_E200
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_60]
mov rdx, [rsp+128h+var_70]
mov ecx, 1
call _ggml_concat
mov [rsp+128h+var_E8], rax
jmp short loc_E20D
loc_E200:
mov rax, [rsp+128h+var_70]
mov [rsp+128h+var_E8], rax
loc_E20D:
mov rax, [rsp+128h+var_E8]
mov [rsp+128h+var_60], rax
mov rax, [rsp+128h+var_68]
add rax, 1
mov [rsp+128h+var_68], rax
jmp loc_DFA9
loc_E233:
jmp loc_E30D
loc_E238:
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_20]
mov rdx, [rsp+128h+var_18]
mov ecx, [rsp+128h+var_2C]
mov r9d, [rsp+128h+arg_0]
xor r8d, r8d
call _ggml_conv_transpose_1d
mov [rsp+128h+var_60], rax
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_110], rax
mov rax, [rsp+128h+var_60]
mov [rsp+128h+var_108], rax
mov rax, [rsp+128h+var_60]
mov rax, [rax+10h]
sub rax, [rsp+128h+var_48]
mov [rsp+128h+var_100], rax
mov rax, [rsp+128h+var_60]
mov rax, [rax+18h]
mov [rsp+128h+var_F8], rax
mov rax, [rsp+128h+var_60]
mov rax, [rax+38h]
mov [rsp+128h+var_F0], rax
mov rax, [rsp+128h+var_58]
mov [rsp+128h+var_118], rax
mov rdi, [rsp+128h+var_60]
call _ggml_element_size
mov r9, [rsp+128h+var_118]
mov rdi, [rsp+128h+var_110]
mov rsi, [rsp+128h+var_108]
mov rdx, [rsp+128h+var_100]
mov rcx, [rsp+128h+var_F8]
mov r8, [rsp+128h+var_F0]
imul r9, rax
call _ggml_view_2d
mov [rsp+128h+var_60], rax
loc_E30D:
cmp [rsp+128h+var_28], 0
jz short loc_E374
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_120], rax
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_28]
call _ggml_transpose
mov rdi, [rsp+128h+var_120]
mov rsi, rax
call _ggml_cont
mov [rsp+128h+var_28], rax
mov rdi, [rsp+128h+var_10]
mov rsi, [rsp+128h+var_60]
mov rdx, [rsp+128h+var_28]
call _ggml_add
mov [rsp+128h+var_60], rax
loc_E374:
mov rax, [rsp+128h+var_60]
add rsp, 128h
retn
| long long mimi_conv_transpose_1d(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
unsigned int a6,
unsigned int a7,
char a8)
{
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
_QWORD *v14; // [rsp+20h] [rbp-108h]
long long v15; // [rsp+28h] [rbp-100h]
long long v16; // [rsp+30h] [rbp-F8h]
long long v17; // [rsp+38h] [rbp-F0h]
long long v18; // [rsp+40h] [rbp-E8h]
long long v19; // [rsp+60h] [rbp-C8h]
long long v20; // [rsp+80h] [rbp-A8h]
long long v21; // [rsp+A0h] [rbp-88h]
float v22; // [rsp+ACh] [rbp-7Ch]
long long v23; // [rsp+B0h] [rbp-78h]
long long v24; // [rsp+B8h] [rbp-70h]
long long v25; // [rsp+B8h] [rbp-70h]
long long v26; // [rsp+B8h] [rbp-70h]
long long i; // [rsp+C0h] [rbp-68h]
long long v28; // [rsp+C8h] [rbp-60h]
long long v29; // [rsp+D0h] [rbp-58h]
long long v30; // [rsp+E0h] [rbp-48h]
long long v31; // [rsp+F0h] [rbp-38h]
long long v34; // [rsp+100h] [rbp-28h]
long long v36; // [rsp+108h] [rbp-20h]
if ( *(_QWORD *)(a3 + 24) != *(_QWORD *)(a4 + 32) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/kyutai-mimi.cpp",
178LL,
"GGML_ASSERT(%s) failed",
"x->ne[1] == kernel->ne[2]");
v31 = *(_QWORD *)(a3 + 24);
v30 = *(_QWORD *)(a4 + 16) - (int)a6;
if ( (mimi_config & 1) != 0 )
v22 = (float)(int)v30 / *(float *)&dword_3159C;
else
v22 = (float)(int)(v30 / 2);
v29 = v30 - (unsigned int)(int)v22;
v28 = 0LL;
v36 = ggml_cast(a2, a4, 1LL);
if ( (a8 & 1) != 0 )
{
for ( i = 0LL; i < v31; ++i )
{
v20 = *(_QWORD *)(a3 + 16);
v8 = ggml_element_size(a3);
v24 = ggml_view_1d(a2, a3, v20, v8 * v20 * i);
v21 = *(_QWORD *)(v36 + 16);
v9 = ggml_element_size(v36);
v23 = ggml_view_1d(a2, v36, v21, v9 * v21 * i);
if ( !i )
{
ggml_set_name(v23, "krn");
ggml_easy::debug::print_tensor_shape(v23);
}
v25 = ggml_conv_transpose_1d(a2, v23, v24, a6, 0LL, a7);
if ( !i )
{
ggml_set_name(v25, "ggml_conv_transpose_1d __________");
ggml_easy::debug::print_tensor_shape(v25);
}
v19 = *(_QWORD *)(v25 + 16) - v30;
v10 = ggml_element_size(v25);
v26 = ggml_view_1d(a2, v25, v19, v10 * v29);
if ( v28 )
v18 = ggml_concat(a2, v28, v26, 1LL);
else
v18 = v26;
v28 = v18;
}
}
else
{
v14 = (_QWORD *)ggml_conv_transpose_1d(a2, v36, a3, a6, 0LL, a7);
v15 = v14[2] - v30;
v16 = v14[3];
v17 = v14[7];
v11 = ggml_element_size(v14);
v28 = ggml_view_2d(a2, v14, v15, v16, v17, v11 * v29);
}
if ( a5 )
{
v12 = ggml_transpose(a2, a5);
v34 = ggml_cont(a2, v12);
return ggml_add(a2, v28, v34);
}
return v28;
}
| mimi_conv_transpose_1d:
SUB RSP,0x128
MOV AL,byte ptr [RSP + 0x138]
MOV R10D,dword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x120],RDI
MOV qword ptr [RSP + 0x118],RSI
MOV qword ptr [RSP + 0x110],RDX
MOV qword ptr [RSP + 0x108],RCX
MOV qword ptr [RSP + 0x100],R8
MOV dword ptr [RSP + 0xfc],R9D
AND AL,0x1
MOV byte ptr [RSP + 0xfb],AL
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x108]
CMP RAX,qword ptr [RCX + 0x20]
JZ 0x0010deaa
LEA RDI,[0x124d19]
MOV ESI,0xb2
LEA RDX,[0x124117]
LEA RCX,[0x124de9]
MOV AL,0x0
CALL 0x0010a8c0
LAB_0010deaa:
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0xe8]
MOVSXD RCX,dword ptr [RSP + 0xfc]
SUB RAX,RCX
MOV qword ptr [RSP + 0xe0],RAX
TEST byte ptr [0x00131538],0x1
JZ 0x0010df13
CVTSI2SS XMM0,qword ptr [RSP + 0xe0]
DIVSS XMM0,dword ptr [0x0013159c]
MOVSS dword ptr [RSP + 0xac],XMM0
JMP 0x0010df33
LAB_0010df13:
MOV RAX,qword ptr [RSP + 0xe0]
MOV ECX,0x2
CQO
IDIV RCX
CVTSI2SS XMM0,RAX
MOVSS dword ptr [RSP + 0xac],XMM0
LAB_0010df33:
MOVSS XMM0,dword ptr [RSP + 0xac]
CVTTSS2SI RAX,XMM0
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0xe0]
SUB RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xd0],RAX
MOV qword ptr [RSP + 0xc8],0x0
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0x108]
MOV EDX,0x1
CALL 0x0010a1a0
MOV qword ptr [RSP + 0x108],RAX
TEST byte ptr [RSP + 0xfb],0x1
JZ 0x0010e238
MOV qword ptr [RSP + 0xc0],0x0
LAB_0010dfa9:
MOV RAX,qword ptr [RSP + 0xc0]
CMP RAX,qword ptr [RSP + 0xf0]
JGE 0x0010e233
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0x110]
IMUL RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x0010a550
MOV RCX,qword ptr [RSP + 0x68]
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
IMUL RCX,RAX
CALL 0x0010a790
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0x108]
IMUL RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0010a550
MOV RCX,qword ptr [RSP + 0x88]
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
IMUL RCX,RAX
CALL 0x0010a790
MOV qword ptr [RSP + 0xb0],RAX
CMP qword ptr [RSP + 0xc0],0x0
JNZ 0x0010e0f7
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x124e03]
CALL 0x0010a940
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x0010cfe0
LAB_0010e0f7:
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RSP + 0xb8]
MOV ECX,dword ptr [RSP + 0xfc]
MOV R9D,dword ptr [RSP + 0x130]
XOR R8D,R8D
CALL 0x0010a9c0
MOV qword ptr [RSP + 0xb8],RAX
CMP qword ptr [RSP + 0xc0],0x0
JNZ 0x0010e15a
MOV RDI,qword ptr [RSP + 0xb8]
LEA RSI,[0x124e07]
CALL 0x0010a940
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x0010cfe0
LAB_0010e15a:
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RAX + 0x10]
SUB RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x0010a550
MOV RCX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
IMUL RCX,RAX
CALL 0x0010a790
MOV qword ptr [RSP + 0xb8],RAX
CMP qword ptr [RSP + 0xc8],0x0
JZ 0x0010e200
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xb8]
MOV ECX,0x1
CALL 0x0010a9b0
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0010e20d
LAB_0010e200:
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x40],RAX
LAB_0010e20d:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xc0]
ADD RAX,0x1
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x0010dfa9
LAB_0010e233:
JMP 0x0010e30d
LAB_0010e238:
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0x108]
MOV RDX,qword ptr [RSP + 0x110]
MOV ECX,dword ptr [RSP + 0xfc]
MOV R9D,dword ptr [RSP + 0x130]
XOR R8D,R8D
CALL 0x0010a9c0
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RAX,qword ptr [RAX + 0x10]
SUB RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xc8]
CALL 0x0010a550
MOV R9,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
IMUL R9,RAX
CALL 0x0010a690
MOV qword ptr [RSP + 0xc8],RAX
LAB_0010e30d:
CMP qword ptr [RSP + 0x100],0x0
JZ 0x0010e374
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0x100]
CALL 0x0010a6f0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
CALL 0x0010a120
MOV qword ptr [RSP + 0x100],RAX
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0x100]
CALL 0x0010a2d0
MOV qword ptr [RSP + 0xc8],RAX
LAB_0010e374:
MOV RAX,qword ptr [RSP + 0xc8]
ADD RSP,0x128
RET
|
/* mimi_conv_transpose_1d(ggml_easy::ctx::build_utils&, ggml_context*, ggml_tensor*, ggml_tensor*,
ggml_tensor*, int, int, bool) */
long mimi_conv_transpose_1d
(build_utils *param_1,ggml_context *param_2,ggml_tensor *param_3,ggml_tensor *param_4
,ggml_tensor *param_5,int param_6,int param_7,bool param_8)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
int8 uVar5;
ggml_tensor *pgVar6;
long lVar7;
int8 uVar8;
long local_e8;
float local_7c;
long local_68;
long local_60;
if (*(long *)(param_3 + 0x18) != *(long *)(param_4 + 0x20)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/demo/kyutai-mimi.cpp",
0xb2,"GGML_ASSERT(%s) failed","x->ne[1] == kernel->ne[2]");
}
lVar1 = *(long *)(param_3 + 0x18);
lVar2 = *(long *)(param_4 + 0x10) - (long)param_6;
if ((mimi_config[0] & 1) == 0) {
local_7c = (float)(lVar2 / 2);
}
else {
local_7c = (float)lVar2 / (float)mimi_config._100_4_;
}
local_60 = 0;
lVar3 = ggml_cast(param_2,param_4,1);
if (param_8) {
for (local_68 = 0; local_68 < lVar1; local_68 = local_68 + 1) {
uVar8 = *(int8 *)(param_3 + 0x10);
lVar7 = *(long *)(param_3 + 0x10);
lVar4 = ggml_element_size(param_3);
uVar5 = ggml_view_1d(param_2,param_3,uVar8,local_68 * lVar7 * lVar4);
uVar8 = *(int8 *)(lVar3 + 0x10);
lVar7 = *(long *)(lVar3 + 0x10);
lVar4 = ggml_element_size(lVar3);
pgVar6 = (ggml_tensor *)ggml_view_1d(param_2,lVar3,uVar8,local_68 * lVar7 * lVar4);
if (local_68 == 0) {
ggml_set_name(pgVar6,&DAT_00124e03);
ggml_easy::debug::print_tensor_shape(pgVar6);
}
pgVar6 = (ggml_tensor *)ggml_conv_transpose_1d(param_2,pgVar6,uVar5,param_6,0,param_7);
if (local_68 == 0) {
ggml_set_name(pgVar6,"ggml_conv_transpose_1d __________");
ggml_easy::debug::print_tensor_shape(pgVar6);
}
lVar7 = *(long *)(pgVar6 + 0x10);
lVar4 = ggml_element_size(pgVar6);
local_e8 = ggml_view_1d(param_2,pgVar6,lVar7 - lVar2,(lVar2 - (long)local_7c) * lVar4);
if (local_60 != 0) {
local_e8 = ggml_concat(param_2,local_60,local_e8,1);
}
local_60 = local_e8;
}
}
else {
lVar3 = ggml_conv_transpose_1d(param_2,lVar3,param_3,param_6,0,param_7);
lVar1 = *(long *)(lVar3 + 0x10);
uVar8 = *(int8 *)(lVar3 + 0x18);
uVar5 = *(int8 *)(lVar3 + 0x38);
lVar7 = ggml_element_size(lVar3);
local_60 = ggml_view_2d(param_2,lVar3,lVar1 - lVar2,uVar8,uVar5,(lVar2 - (long)local_7c) * lVar7
);
}
if (param_5 != (ggml_tensor *)0x0) {
uVar8 = ggml_transpose(param_2,param_5);
uVar8 = ggml_cont(param_2,uVar8);
local_60 = ggml_add(param_2,local_60,uVar8);
}
return local_60;
}
| |
23,081 | google::protobuf::Reflection::IsInlinedStringDonated(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc | bool Reflection::IsInlinedStringDonated(const Message& message,
const FieldDescriptor* field) const {
uint32_t index = schema_.InlinedStringIndex(field);
GOOGLE_DCHECK_GT(index, 0);
return IsIndexInHasBitSet(GetInlinedStringDonatedArray(message), index);
} | O0 | cpp | google::protobuf::Reflection::IsInlinedStringDonated(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
callq 0x31bbe0
movl %eax, 0x6c(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x31be63
jmp 0x31bef9
movl 0x6c(%rsp), %eax
movb $0x0, 0x2f(%rsp)
cmpl $0x0, %eax
jbe 0x31be73
jmp 0x31bec1
leaq 0xe8cb6(%rip), %rdx # 0x404b30
leaq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x9cd, %ecx # imm = 0x9CD
callq 0x219560
movq (%rsp), %rdi
movb $0x1, 0x2f(%rsp)
leaq 0xe9217(%rip), %rsi # 0x4050b9
callq 0x218e20
movq %rax, 0x8(%rsp)
jmp 0x31beae
movq 0x8(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x218fd0
jmp 0x31bebf
jmp 0x31bec1
testb $0x1, 0x2f(%rsp)
jne 0x31beca
jmp 0x31bed4
leaq 0x30(%rsp), %rdi
callq 0x2195a0
jmp 0x31be58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x31beed
jmp 0x31bef7
leaq 0x30(%rsp), %rdi
callq 0x2195a0
jmp 0x31bf1e
movq 0x10(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x31d730
movq %rax, %rdi
movl 0x6c(%rsp), %esi
callq 0x30bf90
andb $0x1, %al
addq $0x88, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x21700
nopl (%rax,%rax)
| _ZNK6google8protobuf10Reflection22IsInlinedStringDonatedERKNS0_7MessageEPKNS0_15FieldDescriptorE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_1C+4], rdx
mov rdi, [rsp+88h+var_8]
mov [rsp+88h+var_78], rdi
add rdi, 8; this
mov rsi, [rsp+88h+var_1C+4]; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema18InlinedStringIndexEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::InlinedStringIndex(google::protobuf::FieldDescriptor const*)
mov dword ptr [rsp+88h+var_1C], eax
loc_31BE58:
xor eax, eax
test al, 1
jnz short loc_31BE63
jmp loc_31BEF9
loc_31BE63:
mov eax, dword ptr [rsp+88h+var_1C]
mov [rsp+88h+var_59], 0
cmp eax, 0
jbe short loc_31BE73
jmp short loc_31BEC1
loc_31BE73:
lea rdx, aWorkspaceLlm4b_88; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+88h+var_58]
mov [rsp+88h+var_88], rdi
mov esi, 3
mov ecx, 9CDh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+88h+var_88]
mov [rsp+88h+var_59], 1
lea rsi, aCheckFailedInd_1; "CHECK failed: (index) > (0): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+88h+var_80], rax
jmp short $+2
loc_31BEAE:
mov rsi, [rsp+88h+var_80]
lea rdi, [rsp+88h+var_6D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_31BEBF:
jmp short $+2
loc_31BEC1:
test [rsp+88h+var_59], 1
jnz short loc_31BECA
jmp short loc_31BED4
loc_31BECA:
lea rdi, [rsp+88h+var_58]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_31BED4:
jmp short loc_31BE58
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
test [rsp+arg_27], 1
jnz short loc_31BEED
jmp short loc_31BEF7
loc_31BEED:
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_31BEF7:
jmp short loc_31BF1E
loc_31BEF9:
mov rdi, [rsp+88h+var_78]; this
mov rsi, [rsp+88h+var_10]; google::protobuf::Message *
call _ZNK6google8protobuf10Reflection28GetInlinedStringDonatedArrayERKNS0_7MessageE; google::protobuf::Reflection::GetInlinedStringDonatedArray(google::protobuf::Message const&)
mov rdi, rax; this
mov esi, dword ptr [rsp+88h+var_1C]; unsigned int *
call _ZN6google8protobuf12_GLOBAL__N_118IsIndexInHasBitSetEPKjj; google::protobuf::`anonymous namespace'::IsIndexInHasBitSet(uint const*,uint)
and al, 1
add rsp, 88h
retn
loc_31BF1E:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| bool google::protobuf::Reflection::IsInlinedStringDonated(
google::protobuf::Reflection *this,
const google::protobuf::Message *a2,
const google::protobuf::FieldDescriptor *a3)
{
google::protobuf::_anonymous_namespace_ *InlinedStringDonatedArray; // rax
_DWORD v5[3]; // [rsp+6Ch] [rbp-1Ch]
google::protobuf::Message *v6; // [rsp+78h] [rbp-10h]
google::protobuf::Reflection *v7; // [rsp+80h] [rbp-8h]
v7 = this;
v6 = a2;
*(_QWORD *)&v5[1] = a3;
v5[0] = google::protobuf::internal::ReflectionSchema::InlinedStringIndex(
(google::protobuf::Reflection *)((char *)this + 8),
a3);
InlinedStringDonatedArray = (google::protobuf::_anonymous_namespace_ *)google::protobuf::Reflection::GetInlinedStringDonatedArray(
this,
a2);
return google::protobuf::`anonymous namespace'::IsIndexInHasBitSet(
InlinedStringDonatedArray,
(const unsigned int *)v5[0]);
}
| UnauthenticatedError:
SUB RSP,0x38
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV ESI,0x10
CALL 0x0031ad40
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x38
RET
|
/* google::protobuf::util::status_internal::UnauthenticatedError(google::protobuf::stringpiece_internal::StringPiece)
*/
Status * google::protobuf::util::status_internal::UnauthenticatedError
(Status *param_1,int8 param_2,int8 param_3)
{
Status::Status(param_1,0x10,param_2,param_3);
return param_1;
}
| |
23,082 | mbedtls_pk_parse_public_key | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkparse.c | int mbedtls_pk_parse_public_key(mbedtls_pk_context *ctx,
const unsigned char *key, size_t keylen)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned char *p;
#if defined(MBEDTLS_RSA_C)
const mbedtls_pk_info_t *pk_info;
#endif
#if defined(MBEDTLS_PEM_PARSE_C)
size_t len;
mbedtls_pem_context pem;
#endif
PK_VALIDATE_RET(ctx != NULL);
if (keylen == 0) {
return MBEDTLS_ERR_PK_KEY_INVALID_FORMAT;
}
PK_VALIDATE_RET(key != NULL || keylen == 0);
#if defined(MBEDTLS_PEM_PARSE_C)
mbedtls_pem_init(&pem);
#if defined(MBEDTLS_RSA_C)
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
if (key[keylen - 1] != '\0') {
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
} else {
ret = mbedtls_pem_read_buffer(&pem,
"-----BEGIN RSA PUBLIC KEY-----",
"-----END RSA PUBLIC KEY-----",
key, NULL, 0, &len);
}
if (ret == 0) {
p = pem.buf;
if ((pk_info = mbedtls_pk_info_from_type(MBEDTLS_PK_RSA)) == NULL) {
mbedtls_pem_free(&pem);
return MBEDTLS_ERR_PK_UNKNOWN_PK_ALG;
}
if ((ret = mbedtls_pk_setup(ctx, pk_info)) != 0) {
mbedtls_pem_free(&pem);
return ret;
}
if ((ret = pk_get_rsapubkey(&p, p + pem.buflen, mbedtls_pk_rsa(*ctx))) != 0) {
mbedtls_pk_free(ctx);
}
mbedtls_pem_free(&pem);
return ret;
} else if (ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT) {
mbedtls_pem_free(&pem);
return ret;
}
#endif /* MBEDTLS_RSA_C */
/* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */
if (key[keylen - 1] != '\0') {
ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT;
} else {
ret = mbedtls_pem_read_buffer(&pem,
"-----BEGIN PUBLIC KEY-----",
"-----END PUBLIC KEY-----",
key, NULL, 0, &len);
}
if (ret == 0) {
/*
* Was PEM encoded
*/
p = pem.buf;
ret = mbedtls_pk_parse_subpubkey(&p, p + pem.buflen, ctx);
mbedtls_pem_free(&pem);
return ret;
} else if (ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT) {
mbedtls_pem_free(&pem);
return ret;
}
mbedtls_pem_free(&pem);
#endif /* MBEDTLS_PEM_PARSE_C */
#if defined(MBEDTLS_RSA_C)
if ((pk_info = mbedtls_pk_info_from_type(MBEDTLS_PK_RSA)) == NULL) {
return MBEDTLS_ERR_PK_UNKNOWN_PK_ALG;
}
if ((ret = mbedtls_pk_setup(ctx, pk_info)) != 0) {
return ret;
}
p = (unsigned char *) key;
ret = pk_get_rsapubkey(&p, p + keylen, mbedtls_pk_rsa(*ctx));
if (ret == 0) {
return ret;
}
mbedtls_pk_free(ctx);
if (ret != (MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_INVALID_PUBKEY,
MBEDTLS_ERR_ASN1_UNEXPECTED_TAG))) {
return ret;
}
#endif /* MBEDTLS_RSA_C */
p = (unsigned char *) key;
ret = mbedtls_pk_parse_subpubkey(&p, p + keylen, ctx);
return ret;
} | O3 | c | mbedtls_pk_parse_public_key:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdx, %rdx
je 0x8c8b9
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
callq 0x97f98
leaq (%r14,%r12), %r15
cmpb $0x0, -0x1(%r14,%r12)
je 0x8c8c4
leaq 0x18(%rsp), %rdi
callq 0x987b6
movl $0x1, %edi
callq 0x8b736
testq %rax, %rax
je 0x8ca19
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8b74e
testl %eax, %eax
je 0x8c938
movl %eax, %r12d
jmp 0x8ca6f
movl $0xffffc300, %r12d # imm = 0xFFFFC300
jmp 0x8ca6f
leaq 0x40(%rsp), %r13
movq %r13, (%rsp)
leaq 0x23f91(%rip), %rsi # 0xb0865
leaq 0x23fa9(%rip), %rdx # 0xb0884
leaq 0x18(%rsp), %rdi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x97fa7
cmpl $0xffffef80, %eax # imm = 0xFFFFEF80
je 0x8c95c
movl %eax, %r12d
testl %eax, %eax
jne 0x8ca65
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1, %edi
callq 0x8b736
testq %rax, %rax
je 0x8ca0f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8b74e
testl %eax, %eax
je 0x8ca21
movl %eax, %r12d
jmp 0x8ca65
movq %r14, 0x10(%rsp)
movups (%rbx), %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
callq 0x8bbd7
xorl %r12d, %r12d
cmpl $0x1, %eax
jne 0x8c9c9
movq 0x38(%rsp), %rdx
jmp 0x8c9cb
cmpb $0x0, -0x1(%r15)
jne 0x8c881
movq %r13, (%rsp)
leaq 0x23f2f(%rip), %rsi # 0xb08a1
leaq 0x23f43(%rip), %rdx # 0xb08bc
leaq 0x18(%rsp), %rdi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x97fa7
cmpl $0xffffef80, %eax # imm = 0xFFFFEF80
je 0x8c881
movl %eax, %r12d
testl %eax, %eax
jne 0x8ca65
leaq 0x18(%rsp), %r14
movq (%r14), %rsi
leaq 0x10(%rsp), %rdi
movq %rsi, (%rdi)
addq 0x8(%r14), %rsi
movq %rbx, %rdx
callq 0x8ca81
movl %eax, %r12d
movq %r14, %rdi
jmp 0x8ca6a
xorl %edx, %edx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x8cc69
testl %eax, %eax
je 0x8ca6f
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8b70f
cmpl $0xffffc49e, %ebp # imm = 0xFFFFC49E
jne 0x8ca0a
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8ca81
jmp 0x8c8b1
movl %ebp, %r12d
jmp 0x8ca6f
leaq 0x18(%rsp), %rdi
callq 0x987b6
movl $0xffffc380, %r12d # imm = 0xFFFFC380
jmp 0x8ca6f
movq 0x10(%rsp), %r14
addq 0x20(%rsp), %r14
movups (%rbx), %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
callq 0x8bbd7
cmpl $0x1, %eax
jne 0x8ca47
movq 0x38(%rsp), %rdx
jmp 0x8ca49
xorl %edx, %edx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8cc69
movl %eax, %r12d
testl %eax, %eax
je 0x8ca65
movq %rbx, %rdi
callq 0x8b70f
leaq 0x18(%rsp), %rdi
callq 0x987b6
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mbedtls_pk_parse_public_key:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
test rdx, rdx
jz short loc_8C8B9
mov r12, rdx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+78h+var_60]
call mbedtls_pem_init
lea r15, [r14+r12]
cmp byte ptr [r14+r12-1], 0
jz short loc_8C8C4
loc_8C881:
lea rdi, [rsp+78h+var_60]
call mbedtls_pem_free
mov edi, 1
call mbedtls_pk_info_from_type
test rax, rax
jz loc_8CA19
mov rdi, rbx
mov rsi, rax
call mbedtls_pk_setup
test eax, eax
jz loc_8C938
loc_8C8B1:
mov r12d, eax
jmp loc_8CA6F
loc_8C8B9:
mov r12d, 0FFFFC300h
jmp loc_8CA6F
loc_8C8C4:
lea r13, [rsp+78h+var_38]
mov [rsp+78h+var_78], r13
lea rsi, aBeginRsaPublic; "-----BEGIN RSA PUBLIC KEY-----"
lea rdx, aEndRsaPublicKe; "-----END RSA PUBLIC KEY-----"
lea rdi, [rsp+78h+var_60]
mov rcx, r14
xor r8d, r8d
xor r9d, r9d
call mbedtls_pem_read_buffer
cmp eax, 0FFFFEF80h
jz short loc_8C95C
mov r12d, eax
test eax, eax
jnz loc_8CA65
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_68], rax
mov edi, 1
call mbedtls_pk_info_from_type
test rax, rax
jz loc_8CA0F
mov rdi, rbx
mov rsi, rax
call mbedtls_pk_setup
test eax, eax
jz loc_8CA21
mov r12d, eax
jmp loc_8CA65
loc_8C938:
mov [rsp+78h+var_68], r14
movups xmm0, xmmword ptr [rbx]
lea rdi, [rsp+78h+var_48]
movaps xmmword ptr [rdi], xmm0
call mbedtls_pk_get_type
xor r12d, r12d
cmp eax, 1
jnz short loc_8C9C9
mov rdx, [rsp+78h+var_40]
jmp short loc_8C9CB
loc_8C95C:
cmp byte ptr [r15-1], 0
jnz loc_8C881
mov [rsp+78h+var_78], r13
lea rsi, aBeginPublicKey; "-----BEGIN PUBLIC KEY-----"
lea rdx, aEndPublicKey; "-----END PUBLIC KEY-----"
lea rdi, [rsp+78h+var_60]
mov rcx, r14
xor r8d, r8d
xor r9d, r9d
call mbedtls_pem_read_buffer
cmp eax, 0FFFFEF80h
jz loc_8C881
mov r12d, eax
test eax, eax
jnz loc_8CA65
lea r14, [rsp+78h+var_60]
mov rsi, [r14]
lea rdi, [rsp+78h+var_68]
mov [rdi], rsi
add rsi, [r14+8]
mov rdx, rbx
call mbedtls_pk_parse_subpubkey
mov r12d, eax
mov rdi, r14
jmp loc_8CA6A
loc_8C9C9:
xor edx, edx
loc_8C9CB:
lea rdi, [rsp+78h+var_68]
mov rsi, r15
call pk_get_rsapubkey
test eax, eax
jz loc_8CA6F
mov ebp, eax
mov rdi, rbx
call mbedtls_pk_free
cmp ebp, 0FFFFC49Eh
jnz short loc_8CA0A
lea rdi, [rsp+78h+var_68]
mov [rdi], r14
mov rsi, r15
mov rdx, rbx
call mbedtls_pk_parse_subpubkey
jmp loc_8C8B1
loc_8CA0A:
mov r12d, ebp
jmp short loc_8CA6F
loc_8CA0F:
lea rdi, [rsp+78h+var_60]
call mbedtls_pem_free
loc_8CA19:
mov r12d, 0FFFFC380h
jmp short loc_8CA6F
loc_8CA21:
mov r14, [rsp+78h+var_68]
add r14, [rsp+78h+var_58]
movups xmm0, xmmword ptr [rbx]
lea rdi, [rsp+78h+var_48]
movaps xmmword ptr [rdi], xmm0
call mbedtls_pk_get_type
cmp eax, 1
jnz short loc_8CA47
mov rdx, [rsp+78h+var_40]
jmp short loc_8CA49
loc_8CA47:
xor edx, edx
loc_8CA49:
lea rdi, [rsp+78h+var_68]
mov rsi, r14
call pk_get_rsapubkey
mov r12d, eax
test eax, eax
jz short loc_8CA65
mov rdi, rbx
call mbedtls_pk_free
loc_8CA65:
lea rdi, [rsp+78h+var_60]
loc_8CA6A:
call mbedtls_pem_free
loc_8CA6F:
mov eax, r12d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mbedtls_pk_parse_public_key(_QWORD *a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
unsigned int v6; // eax
unsigned int rsapubkey; // r12d
unsigned int buffer; // eax
long long v9; // rax
unsigned int v10; // eax
long long v11; // rdx
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // ebp
long long v15; // r14
long long v16; // rdx
long long v18; // [rsp+10h] [rbp-68h] BYREF
long long v19; // [rsp+18h] [rbp-60h] BYREF
long long v20; // [rsp+20h] [rbp-58h]
__int128 v21; // [rsp+30h] [rbp-48h] BYREF
_BYTE v22[56]; // [rsp+40h] [rbp-38h] BYREF
if ( !a3 )
return (unsigned int)-15616;
mbedtls_pem_init(&v19);
v4 = a2 + a3;
if ( !*(_BYTE *)(a2 + a3 - 1) )
{
buffer = mbedtls_pem_read_buffer(
(unsigned int)&v19,
(unsigned int)"-----BEGIN RSA PUBLIC KEY-----",
(unsigned int)"-----END RSA PUBLIC KEY-----",
a2,
0,
0,
(long long)v22);
if ( buffer == -4224 )
{
if ( *(_BYTE *)(v4 - 1) )
goto LABEL_3;
v12 = mbedtls_pem_read_buffer(
(unsigned int)&v19,
(unsigned int)"-----BEGIN PUBLIC KEY-----",
(unsigned int)"-----END PUBLIC KEY-----",
a2,
0,
0,
(long long)v22);
if ( v12 == -4224 )
goto LABEL_3;
rsapubkey = v12;
if ( !v12 )
{
v18 = v19;
rsapubkey = mbedtls_pk_parse_subpubkey(&v18, v20 + v19, a1);
}
}
else
{
rsapubkey = buffer;
if ( !buffer )
{
v18 = v19;
v9 = mbedtls_pk_info_from_type(1);
if ( !v9 )
{
mbedtls_pem_free(&v19);
return (unsigned int)-15488;
}
v10 = mbedtls_pk_setup(a1, v9);
if ( v10 )
{
rsapubkey = v10;
}
else
{
v15 = v20 + v18;
v21 = *(_OWORD *)a1;
if ( (unsigned int)mbedtls_pk_get_type((unsigned int **)&v21) == 1 )
v16 = *((_QWORD *)&v21 + 1);
else
v16 = 0LL;
rsapubkey = pk_get_rsapubkey(&v18, v15, v16);
if ( rsapubkey )
mbedtls_pk_free(a1);
}
}
}
mbedtls_pem_free(&v19);
return rsapubkey;
}
LABEL_3:
mbedtls_pem_free(&v19);
v5 = mbedtls_pk_info_from_type(1);
if ( !v5 )
return (unsigned int)-15488;
v6 = mbedtls_pk_setup(a1, v5);
if ( v6 )
return v6;
v18 = a2;
v21 = *(_OWORD *)a1;
rsapubkey = 0;
if ( (unsigned int)mbedtls_pk_get_type((unsigned int **)&v21) == 1 )
v11 = *((_QWORD *)&v21 + 1);
else
v11 = 0LL;
v13 = pk_get_rsapubkey(&v18, v4, v11);
if ( v13 )
{
v14 = v13;
mbedtls_pk_free(a1);
if ( v14 != -15202 )
return v14;
v18 = a2;
return (unsigned int)mbedtls_pk_parse_subpubkey(&v18, v4, a1);
}
return rsapubkey;
}
| mbedtls_pk_parse_public_key:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
TEST RDX,RDX
JZ 0x0018c8b9
MOV R12,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x18]
CALL 0x00197f98
LEA R15,[R14 + R12*0x1]
CMP byte ptr [R14 + R12*0x1 + -0x1],0x0
JZ 0x0018c8c4
LAB_0018c881:
LEA RDI,[RSP + 0x18]
CALL 0x001987b6
MOV EDI,0x1
CALL 0x0018b736
TEST RAX,RAX
JZ 0x0018ca19
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0018b74e
TEST EAX,EAX
JZ 0x0018c938
LAB_0018c8b1:
MOV R12D,EAX
JMP 0x0018ca6f
LAB_0018c8b9:
MOV R12D,0xffffc300
JMP 0x0018ca6f
LAB_0018c8c4:
LEA R13,[RSP + 0x40]
MOV qword ptr [RSP],R13
LEA RSI,[0x1b0865]
LEA RDX,[0x1b0884]
LEA RDI,[RSP + 0x18]
MOV RCX,R14
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00197fa7
CMP EAX,0xffffef80
JZ 0x0018c95c
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x0018ca65
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,0x1
CALL 0x0018b736
TEST RAX,RAX
JZ 0x0018ca0f
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0018b74e
TEST EAX,EAX
JZ 0x0018ca21
MOV R12D,EAX
JMP 0x0018ca65
LAB_0018c938:
MOV qword ptr [RSP + 0x10],R14
MOVUPS XMM0,xmmword ptr [RBX]
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
CALL 0x0018bbd7
XOR R12D,R12D
CMP EAX,0x1
JNZ 0x0018c9c9
MOV RDX,qword ptr [RSP + 0x38]
JMP 0x0018c9cb
LAB_0018c95c:
CMP byte ptr [R15 + -0x1],0x0
JNZ 0x0018c881
MOV qword ptr [RSP],R13
LEA RSI,[0x1b08a1]
LEA RDX,[0x1b08bc]
LEA RDI,[RSP + 0x18]
MOV RCX,R14
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00197fa7
CMP EAX,0xffffef80
JZ 0x0018c881
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x0018ca65
LEA R14,[RSP + 0x18]
MOV RSI,qword ptr [R14]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RSI
ADD RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
CALL 0x0018ca81
MOV R12D,EAX
MOV RDI,R14
JMP 0x0018ca6a
LAB_0018c9c9:
XOR EDX,EDX
LAB_0018c9cb:
LEA RDI,[RSP + 0x10]
MOV RSI,R15
CALL 0x0018cc69
TEST EAX,EAX
JZ 0x0018ca6f
MOV EBP,EAX
MOV RDI,RBX
CALL 0x0018b70f
CMP EBP,0xffffc49e
JNZ 0x0018ca0a
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0018ca81
JMP 0x0018c8b1
LAB_0018ca0a:
MOV R12D,EBP
JMP 0x0018ca6f
LAB_0018ca0f:
LEA RDI,[RSP + 0x18]
CALL 0x001987b6
LAB_0018ca19:
MOV R12D,0xffffc380
JMP 0x0018ca6f
LAB_0018ca21:
MOV R14,qword ptr [RSP + 0x10]
ADD R14,qword ptr [RSP + 0x20]
MOVUPS XMM0,xmmword ptr [RBX]
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
CALL 0x0018bbd7
CMP EAX,0x1
JNZ 0x0018ca47
MOV RDX,qword ptr [RSP + 0x38]
JMP 0x0018ca49
LAB_0018ca47:
XOR EDX,EDX
LAB_0018ca49:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0018cc69
MOV R12D,EAX
TEST EAX,EAX
JZ 0x0018ca65
MOV RDI,RBX
CALL 0x0018b70f
LAB_0018ca65:
LEA RDI,[RSP + 0x18]
LAB_0018ca6a:
CALL 0x001987b6
LAB_0018ca6f:
MOV EAX,R12D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int mbedtls_pk_parse_public_key(int4 *param_1,long param_2,long param_3)
{
int iVar1;
long lVar2;
long lVar3;
int8 uVar4;
long local_68;
long local_60;
long local_58;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int1 local_38 [8];
if (param_3 == 0) {
return -0x3d00;
}
mbedtls_pem_init(&local_60);
lVar3 = param_2 + param_3;
if (*(char *)(param_2 + -1 + param_3) == '\0') {
iVar1 = mbedtls_pem_read_buffer
(&local_60,"-----BEGIN RSA PUBLIC KEY-----","-----END RSA PUBLIC KEY-----",
param_2,0,0,local_38);
if (iVar1 == -0x1080) {
if ((*(char *)(lVar3 + -1) != '\0') ||
(iVar1 = mbedtls_pem_read_buffer
(&local_60,"-----BEGIN PUBLIC KEY-----","-----END PUBLIC KEY-----",
param_2,0,0,local_38), iVar1 == -0x1080)) goto LAB_0018c881;
if (iVar1 == 0) {
local_68 = local_60;
iVar1 = mbedtls_pk_parse_subpubkey(&local_68,local_60 + local_58,param_1);
}
}
else if (iVar1 == 0) {
local_68 = local_60;
lVar3 = mbedtls_pk_info_from_type(1);
if (lVar3 == 0) {
mbedtls_pem_free(&local_60);
goto LAB_0018ca19;
}
iVar1 = mbedtls_pk_setup(param_1,lVar3);
if (iVar1 == 0) {
lVar3 = local_68 + local_58;
local_48 = *param_1;
uStack_44 = param_1[1];
uStack_40 = param_1[2];
uStack_3c = param_1[3];
iVar1 = mbedtls_pk_get_type();
if (iVar1 == 1) {
uVar4 = CONCAT44(uStack_3c,uStack_40);
}
else {
uVar4 = 0;
}
iVar1 = pk_get_rsapubkey(&local_68,lVar3,uVar4);
if (iVar1 != 0) {
mbedtls_pk_free(param_1);
}
}
}
mbedtls_pem_free(&local_60);
}
else {
LAB_0018c881:
mbedtls_pem_free(&local_60);
lVar2 = mbedtls_pk_info_from_type(1);
if (lVar2 != 0) {
iVar1 = mbedtls_pk_setup(param_1,lVar2);
if (iVar1 != 0) {
return iVar1;
}
local_48 = *param_1;
uStack_44 = param_1[1];
uStack_40 = param_1[2];
uStack_3c = param_1[3];
local_68 = param_2;
iVar1 = mbedtls_pk_get_type();
if (iVar1 == 1) {
uVar4 = CONCAT44(uStack_3c,uStack_40);
}
else {
uVar4 = 0;
}
iVar1 = pk_get_rsapubkey(&local_68,lVar3,uVar4);
if (iVar1 == 0) {
return 0;
}
mbedtls_pk_free(param_1);
if (iVar1 != -0x3b62) {
return iVar1;
}
local_68 = param_2;
iVar1 = mbedtls_pk_parse_subpubkey(&local_68,lVar3,param_1);
return iVar1;
}
LAB_0018ca19:
iVar1 = -0x3c80;
}
return iVar1;
}
| |
23,083 | find_private_class_field | bluesky950520[P]quickjs/quickjs.c | static int find_private_class_field(JSContext *ctx, JSFunctionDef *fd,
JSAtom name, int scope_level)
{
int idx;
idx = fd->scopes[scope_level].first;
while (idx != -1) {
if (fd->vars[idx].scope_level != scope_level)
break;
if (fd->vars[idx].var_name == name)
return idx;
idx = fd->vars[idx].scope_next;
}
return -1;
} | O0 | c | find_private_class_field:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movl %ecx, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq 0xf8(%rax), %rax
movslq -0x20(%rsp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x24(%rsp)
cmpl $-0x1, -0x24(%rsp)
je 0xae310
movq -0x18(%rsp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x20(%rsp), %eax
je 0xae2c5
jmp 0xae310
movq -0x18(%rsp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x1c(%rsp), %eax
jne 0xae2ef
movl -0x24(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0xae318
movq -0x18(%rsp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rsp)
jmp 0xae29b
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
movl -0x4(%rsp), %eax
retq
nopl (%rax)
| find_private_class_field:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_1C], edx
mov [rsp+var_20], ecx
mov rax, [rsp+var_18]
mov rax, [rax+0F8h]
movsxd rcx, [rsp+var_20]
mov eax, [rax+rcx*8+4]
mov [rsp+var_24], eax
loc_AE29B:
cmp [rsp+var_24], 0FFFFFFFFh
jz short loc_AE310
mov rax, [rsp+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+var_24]
shl rcx, 4
add rax, rcx
mov eax, [rax+4]
cmp eax, [rsp+var_20]
jz short loc_AE2C5
jmp short loc_AE310
loc_AE2C5:
mov rax, [rsp+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+var_24]
shl rcx, 4
add rax, rcx
mov eax, [rax]
cmp eax, [rsp+var_1C]
jnz short loc_AE2EF
mov eax, [rsp+var_24]
mov [rsp+var_4], eax
jmp short loc_AE318
loc_AE2EF:
mov rax, [rsp+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+var_24]
shl rcx, 4
add rax, rcx
mov eax, [rax+8]
mov [rsp+var_24], eax
jmp short loc_AE29B
loc_AE310:
mov [rsp+var_4], 0FFFFFFFFh
loc_AE318:
mov eax, [rsp+var_4]
retn
| long long find_private_class_field(long long a1, long long a2, int a3, int a4)
{
unsigned int i; // [rsp+0h] [rbp-24h]
for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 248) + 8LL * a4 + 4);
i != -1 && *(_DWORD *)(16LL * (int)i + *(_QWORD *)(a2 + 144) + 4) == a4;
i = *(_DWORD *)(16LL * (int)i + *(_QWORD *)(a2 + 144) + 8) )
{
if ( *(_DWORD *)(16LL * (int)i + *(_QWORD *)(a2 + 144)) == a3 )
return i;
}
return (unsigned int)-1;
}
| find_private_class_field:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV dword ptr [RSP + -0x1c],EDX
MOV dword ptr [RSP + -0x20],ECX
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4]
MOV dword ptr [RSP + -0x24],EAX
LAB_001ae29b:
CMP dword ptr [RSP + -0x24],-0x1
JZ 0x001ae310
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + -0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + -0x20]
JZ 0x001ae2c5
JMP 0x001ae310
LAB_001ae2c5:
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + -0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + -0x1c]
JNZ 0x001ae2ef
MOV EAX,dword ptr [RSP + -0x24]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x001ae318
LAB_001ae2ef:
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + -0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + -0x24],EAX
JMP 0x001ae29b
LAB_001ae310:
MOV dword ptr [RSP + -0x4],0xffffffff
LAB_001ae318:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int find_private_class_field(int8 param_1,long param_2,int param_3,int param_4)
{
int local_24;
local_24 = *(int *)(*(long *)(param_2 + 0xf8) + 4 + (long)param_4 * 8);
while ((local_24 != -1 &&
(*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10 + 4) == param_4))) {
if (*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10) == param_3) {
return local_24;
}
local_24 = *(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10 + 8);
}
return -1;
}
| |
23,084 | find_private_class_field | bluesky950520[P]quickjs/quickjs.c | static int find_private_class_field(JSContext *ctx, JSFunctionDef *fd,
JSAtom name, int scope_level)
{
int idx;
idx = fd->scopes[scope_level].first;
while (idx != -1) {
if (fd->vars[idx].scope_level != scope_level)
break;
if (fd->vars[idx].var_name == name)
return idx;
idx = fd->vars[idx].scope_next;
}
return -1;
} | O2 | c | find_private_class_field:
movq 0xf8(%rdi), %rax
movslq %edx, %rcx
leaq (%rax,%rcx,8), %r9
addq $0x4, %r9
pushq $-0x1
popq %rax
movslq (%r9), %rcx
cmpq $-0x1, %rcx
je 0x5a1ac
movq 0x90(%rdi), %r8
movq %rcx, %r9
shlq $0x4, %r9
cmpl %edx, 0x4(%r8,%r9)
jne 0x5a1ac
addq %r9, %r8
leaq 0x8(%r8), %r9
cmpl %esi, (%r8)
jne 0x5a180
movl %ecx, %eax
retq
| find_private_class_field:
mov rax, [rdi+0F8h]
movsxd rcx, edx
lea r9, [rax+rcx*8]
add r9, 4
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_5A180:
movsxd rcx, dword ptr [r9]
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short locret_5A1AC
mov r8, [rdi+90h]
mov r9, rcx
shl r9, 4
cmp [r8+r9+4], edx
jnz short locret_5A1AC
add r8, r9
lea r9, [r8+8]
cmp [r8], esi
jnz short loc_5A180
mov eax, ecx
locret_5A1AC:
retn
| long long find_private_class_field(long long a1, int a2, int a3)
{
int *v3; // r9
long long result; // rax
long long v5; // rcx
long long v6; // r8
_DWORD *v7; // r8
v3 = (int *)(*(_QWORD *)(a1 + 248) + 8LL * a3 + 4);
result = -1LL;
while ( 1 )
{
v5 = *v3;
if ( v5 == -1 )
break;
v6 = *(_QWORD *)(a1 + 144);
if ( *(_DWORD *)(v6 + 16 * v5 + 4) != a3 )
break;
v7 = (_DWORD *)(16 * v5 + v6);
v3 = v7 + 2;
if ( *v7 == a2 )
return (unsigned int)v5;
}
return result;
}
| find_private_class_field:
MOV RAX,qword ptr [RDI + 0xf8]
MOVSXD RCX,EDX
LEA R9,[RAX + RCX*0x8]
ADD R9,0x4
PUSH -0x1
POP RAX
LAB_0015a180:
MOVSXD RCX,dword ptr [R9]
CMP RCX,-0x1
JZ 0x0015a1ac
MOV R8,qword ptr [RDI + 0x90]
MOV R9,RCX
SHL R9,0x4
CMP dword ptr [R8 + R9*0x1 + 0x4],EDX
JNZ 0x0015a1ac
ADD R8,R9
LEA R9,[R8 + 0x8]
CMP dword ptr [R8],ESI
JNZ 0x0015a180
MOV EAX,ECX
LAB_0015a1ac:
RET
|
ulong find_private_class_field(long param_1,int param_2,int param_3)
{
uint uVar1;
int *piVar2;
uint *puVar3;
long lVar4;
puVar3 = (uint *)(*(long *)(param_1 + 0xf8) + (long)param_3 * 8 + 4);
while( true ) {
uVar1 = *puVar3;
if ((long)(int)uVar1 == -1) {
return 0xffffffffffffffff;
}
lVar4 = (long)(int)uVar1 * 0x10;
if (*(int *)(*(long *)(param_1 + 0x90) + 4 + lVar4) != param_3) break;
piVar2 = (int *)(*(long *)(param_1 + 0x90) + lVar4);
puVar3 = (uint *)(piVar2 + 2);
if (*piVar2 == param_2) {
return (ulong)uVar1;
}
}
return 0xffffffffffffffff;
}
| |
23,085 | ps_fetch_bin | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_bin(MYSQL_BIND *r_param,
const MYSQL_FIELD *field,
unsigned char **row)
{
if (field->charsetnr == 63)
{
ulong field_length= *r_param->length= net_field_length(row);
uchar *current_pos= (*row) + r_param->offset,
*end= (*row) + field_length;
size_t copylen= 0;
if (current_pos < end)
{
copylen= end - current_pos;
if (r_param->buffer_length)
memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length));
}
if (copylen < r_param->buffer_length &&
(r_param->buffer_type == MYSQL_TYPE_STRING ||
r_param->buffer_type == MYSQL_TYPE_JSON))
((char *)r_param->buffer)[copylen]= 0;
*r_param->error= copylen > r_param->buffer_length;
(*row)+= field_length;
}
else
ps_fetch_string(r_param, field, row);
} | O3 | c | ps_fetch_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
movl 0x6c(%rsi), %r13d
movq %rdx, %rdi
callq 0x1c669
movq %rax, %r14
cmpl $0x3f, %r13d
jne 0x2b12f
movq %rax, %r12
movq (%r15), %rax
movq %r14, (%rax)
movq 0x48(%r15), %rsi
subq %rsi, %r12
jle 0x2b13f
movq 0x40(%r15), %rdx
testq %rdx, %rdx
je 0x2b142
addq (%rbx), %rsi
movq 0x10(%r15), %rdi
cmpq %rdx, %r12
cmovbq %r12, %rdx
callq 0x133a0
jmp 0x2b142
movq (%rbx), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x2b579
jmp 0x2b176
xorl %r12d, %r12d
movq 0x40(%r15), %rax
cmpq %rax, %r12
jae 0x2b16c
movl 0x60(%r15), %ecx
cmpl $0xfe, %ecx
je 0x2b15f
cmpl $0xf5, %ecx
jne 0x2b16c
movq 0x10(%r15), %rax
movb $0x0, (%rax,%r12)
movq 0x40(%r15), %rax
cmpq %rax, %r12
movq 0x18(%r15), %rax
seta (%rax)
addq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ps_fetch_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rdi
mov r13d, [rsi+6Ch]
mov rdi, rdx
call net_field_length
mov r14, rax
cmp r13d, 3Fh ; '?'
jnz short loc_2B12F
mov r12, rax
mov rax, [r15]
mov [rax], r14
mov rsi, [r15+48h]
sub r12, rsi
jle short loc_2B13F
mov rdx, [r15+40h]
test rdx, rdx
jz short loc_2B142
add rsi, [rbx]
mov rdi, [r15+10h]
cmp r12, rdx
cmovb rdx, r12
call _memcpy
jmp short loc_2B142
loc_2B12F:
mov rsi, [rbx]
mov rdi, r15
mov rdx, r14
call convert_froma_string
jmp short loc_2B176
loc_2B13F:
xor r12d, r12d
loc_2B142:
mov rax, [r15+40h]
cmp r12, rax
jnb short loc_2B16C
mov ecx, [r15+60h]
cmp ecx, 0FEh
jz short loc_2B15F
cmp ecx, 0F5h
jnz short loc_2B16C
loc_2B15F:
mov rax, [r15+10h]
mov byte ptr [rax+r12], 0
mov rax, [r15+40h]
loc_2B16C:
cmp r12, rax
mov rax, [r15+18h]
setnbe byte ptr [rax]
loc_2B176:
add [rbx], r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool * ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3)
{
int v5; // r13d
signed long long v6; // rax
signed long long v7; // r14
long long v8; // rsi
unsigned long long v9; // r12
unsigned long long v10; // rdx
unsigned __int8 *v11; // rsi
long long v12; // rdi
bool *result; // rax
unsigned long long v14; // rax
int v15; // ecx
bool v16; // cf
bool v17; // zf
v5 = *(_DWORD *)(a2 + 108);
v6 = net_field_length(a3);
v7 = v6;
if ( v5 == 63 )
{
**(_QWORD **)a1 = v6;
v8 = *(_QWORD *)(a1 + 72);
v9 = v6 - v8;
if ( v6 <= v8 )
{
v9 = 0LL;
}
else
{
v10 = *(_QWORD *)(a1 + 64);
if ( v10 )
{
v11 = &(*a3)[v8];
v12 = *(_QWORD *)(a1 + 16);
if ( v9 < v10 )
v10 = v9;
memcpy(v12, v11, v10);
}
}
v14 = *(_QWORD *)(a1 + 64);
if ( v9 < v14 )
{
v15 = *(_DWORD *)(a1 + 96);
if ( v15 == 254 || v15 == 245 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 16) + v9) = 0;
v14 = *(_QWORD *)(a1 + 64);
}
}
v16 = v9 < v14;
v17 = v9 == v14;
result = *(bool **)(a1 + 24);
*result = !v16 && !v17;
}
else
{
result = (bool *)convert_froma_string(a1, *a3, v6);
}
*a3 += v7;
return result;
}
| ps_fetch_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RDI
MOV R13D,dword ptr [RSI + 0x6c]
MOV RDI,RDX
CALL 0x0011c669
MOV R14,RAX
CMP R13D,0x3f
JNZ 0x0012b12f
MOV R12,RAX
MOV RAX,qword ptr [R15]
MOV qword ptr [RAX],R14
MOV RSI,qword ptr [R15 + 0x48]
SUB R12,RSI
JLE 0x0012b13f
MOV RDX,qword ptr [R15 + 0x40]
TEST RDX,RDX
JZ 0x0012b142
ADD RSI,qword ptr [RBX]
MOV RDI,qword ptr [R15 + 0x10]
CMP R12,RDX
CMOVC RDX,R12
CALL 0x001133a0
JMP 0x0012b142
LAB_0012b12f:
MOV RSI,qword ptr [RBX]
MOV RDI,R15
MOV RDX,R14
CALL 0x0012b579
JMP 0x0012b176
LAB_0012b13f:
XOR R12D,R12D
LAB_0012b142:
MOV RAX,qword ptr [R15 + 0x40]
CMP R12,RAX
JNC 0x0012b16c
MOV ECX,dword ptr [R15 + 0x60]
CMP ECX,0xfe
JZ 0x0012b15f
CMP ECX,0xf5
JNZ 0x0012b16c
LAB_0012b15f:
MOV RAX,qword ptr [R15 + 0x10]
MOV byte ptr [RAX + R12*0x1],0x0
MOV RAX,qword ptr [R15 + 0x40]
LAB_0012b16c:
CMP R12,RAX
MOV RAX,qword ptr [R15 + 0x18]
SETA byte ptr [RAX]
LAB_0012b176:
ADD qword ptr [RBX],R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
iVar1 = *(int *)(param_2 + 0x6c);
lVar3 = net_field_length(param_3);
if (iVar1 == 0x3f) {
*(long *)*param_1 = lVar3;
lVar2 = param_1[9];
uVar5 = lVar3 - lVar2;
if (uVar5 == 0 || lVar3 < lVar2) {
uVar5 = 0;
}
else {
uVar4 = param_1[8];
if (uVar4 != 0) {
if (uVar5 < uVar4) {
uVar4 = uVar5;
}
memcpy((void *)param_1[2],(void *)(lVar2 + *param_3),uVar4);
}
}
uVar4 = param_1[8];
if ((uVar5 < uVar4) && ((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5))))
{
*(int1 *)(param_1[2] + uVar5) = 0;
uVar4 = param_1[8];
}
*(bool *)param_1[3] = uVar4 < uVar5;
}
else {
convert_froma_string(param_1,*param_3,lVar3);
}
*param_3 = *param_3 + lVar3;
return;
}
| |
23,086 | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::compressMemberIndices() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
DynamicRelation::compressMemberIndices() {
if (_irregIndices.size() == 0) {
int memberCount = _countsAndOffsets[0];
int memberMax = _countsAndOffsets[0];
for (int i = 1; i < _compCount; ++i) {
int count = _countsAndOffsets[2*i];
int offset = _countsAndOffsets[2*i + 1];
memmove(&_regIndices[memberCount], &_regIndices[offset], count * sizeof(Index));
_countsAndOffsets[2*i + 1] = memberCount;
memberCount += count;
memberMax = std::max(memberMax, count);
}
_regIndices.resize(memberCount);
return memberMax;
} else {
// Assign new offsets-per-component while determining if we can trivially compress in place:
bool cannotBeCompressedInPlace = false;
int memberCount = _countsAndOffsets[0];
for (int i = 1; i < _compCount; ++i) {
_countsAndOffsets[2*i + 1] = memberCount;
cannotBeCompressedInPlace |= (memberCount > (_memberCountPerComp * i));
memberCount += _countsAndOffsets[2*i];
}
cannotBeCompressedInPlace |= (memberCount > (_memberCountPerComp * _compCount));
// Copy members into the original or temporary vector accordingly:
IndexVector tmpIndices;
if (cannotBeCompressedInPlace) {
tmpIndices.resize(memberCount);
}
IndexVector& dstIndices = cannotBeCompressedInPlace ? tmpIndices : _regIndices;
int memberMax = _memberCountPerComp;
for (int i = 0; i < _compCount; ++i) {
int count = _countsAndOffsets[2*i];
Index *dstMembers = &dstIndices[0] + _countsAndOffsets[2*i + 1];
Index *srcMembers = 0;
if (count <= _memberCountPerComp) {
srcMembers = &_regIndices[i * _memberCountPerComp];
} else {
srcMembers = &_irregIndices[i][0];
memberMax = std::max(memberMax, count);
}
memmove(dstMembers, srcMembers, count * sizeof(Index));
}
if (cannotBeCompressedInPlace) {
_regIndices.swap(tmpIndices);
} else {
_regIndices.resize(memberCount);
}
return memberMax;
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::compressMemberIndices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
cmpq $0x0, 0x40(%rdi)
movq 0x8(%rdi), %rax
movq (%rax), %rax
movl (%rax), %ebx
je 0x5d5cc
leaq 0x18(%r14), %rcx
movq %rcx, 0x30(%rsp)
pushq $0x1
popq %rcx
xorl %r15d, %r15d
movslq (%r14), %rdx
cmpq %rdx, %rcx
jge 0x5d58b
movl %ebx, 0x4(%rax,%rcx,8)
movl 0x4(%r14), %edx
imull %ecx, %edx
cmpl %edx, %ebx
setg %dl
orb %dl, %r15b
addl (%rax,%rcx,8), %ebx
incq %rcx
jmp 0x5d568
movl 0x4(%r14), %ecx
imull %ecx, %edx
cmpl %edx, %ebx
setg %al
orb %al, %r15b
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movslq %ebx, %rbx
testb $0x1, %r15b
movq %rbx, 0x28(%rsp)
je 0x5d62e
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x514b0
movl 0x4(%r14), %ecx
jmp 0x5d632
pushq $0x1
popq %r12
movl %ebx, %r15d
movslq (%r14), %rcx
movslq %r15d, %r15
cmpq %rcx, %r12
jge 0x5d61d
movslq (%rax,%r12,8), %r13
movslq 0x4(%rax,%r12,8), %rax
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
leaq (%rcx,%r15,4), %rdi
leaq (%rcx,%rax,4), %rsi
movq %r13, %rdx
shlq $0x2, %rdx
callq 0x54a00
movq 0x8(%r14), %rax
movq (%rax), %rax
movl %r15d, 0x4(%rax,%r12,8)
addl %r13d, %r15d
cmpl %r13d, %ebx
cmovlel %r13d, %ebx
incq %r12
jmp 0x5d5d3
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x514b0
jmp 0x5d6f4
movq 0x10(%r14), %r13
xorl %eax, %eax
movl %ecx, %ebx
movl %eax, 0xc(%rsp)
cmpl (%r14), %eax
jge 0x5d6b2
movq 0x8(%r14), %rcx
leal (%rax,%rax), %edx
movslq %edx, %rdx
movq (%rcx), %rcx
movslq (%rcx,%rdx,4), %r12
leal 0x1(,%rax,2), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rbp
shlq $0x2, %rbp
addq (%r13), %rbp
movl 0x4(%r14), %ecx
cmpl %ecx, %r12d
jle 0x5d68a
movq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x50210
movq (%rax), %rsi
cmpl %r12d, %ebx
cmovlel %r12d, %ebx
jmp 0x5d69b
movq 0x10(%r14), %rdx
imull %eax, %ecx
movslq %ecx, %rsi
shlq $0x2, %rsi
addq (%rdx), %rsi
shlq $0x2, %r12
movq %rbp, %rdi
movq %r12, %rdx
callq 0x54a00
movl 0xc(%rsp), %eax
incl %eax
jmp 0x5d636
movq 0x10(%r14), %rdi
testb $0x1, %r15b
je 0x5d6e0
movq 0x10(%rdi), %rax
movaps 0x10(%rsp), %xmm0
movups (%rdi), %xmm1
movups %xmm0, (%rdi)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rdi)
movaps %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x5d6ea
movq 0x28(%rsp), %rsi
callq 0x514b0
leaq 0x10(%rsp), %rdi
callq 0x52f00
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5d709
jmp 0x5d709
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x52f00
movq %rbx, %rdi
callq 0x55300
| _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_115DynamicRelation21compressMemberIndicesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdi
cmp qword ptr [rdi+40h], 0
mov rax, [rdi+8]
mov rax, [rax]
mov ebx, [rax]
jz short loc_5D5CC
lea rcx, [r14+18h]
mov [rsp+68h+var_38], rcx
push 1
pop rcx
xor r15d, r15d
loc_5D568:
movsxd rdx, dword ptr [r14]
cmp rcx, rdx
jge short loc_5D58B
mov [rax+rcx*8+4], ebx
mov edx, [r14+4]
imul edx, ecx
cmp ebx, edx
setnle dl
or r15b, dl
add ebx, [rax+rcx*8]
inc rcx
jmp short loc_5D568
loc_5D58B:
mov ecx, [r14+4]
imul edx, ecx
cmp ebx, edx
setnle al
or r15b, al
and [rsp+68h+var_48], 0
xorps xmm0, xmm0
movaps [rsp+68h+var_58], xmm0
movsxd rbx, ebx
test r15b, 1
mov [rsp+68h+var_40], rbx
jz short loc_5D62E
lea r13, [rsp+68h+var_58]
mov rdi, r13
mov rsi, rbx
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov ecx, [r14+4]
jmp short loc_5D632
loc_5D5CC:
push 1
pop r12
mov r15d, ebx
loc_5D5D3:
movsxd rcx, dword ptr [r14]
movsxd r15, r15d
cmp r12, rcx
jge short loc_5D61D
movsxd r13, dword ptr [rax+r12*8]
movsxd rax, dword ptr [rax+r12*8+4]
mov rcx, [r14+10h]
mov rcx, [rcx]
lea rdi, [rcx+r15*4]
lea rsi, [rcx+rax*4]
mov rdx, r13
shl rdx, 2
call _memmove
mov rax, [r14+8]
mov rax, [rax]
mov [rax+r12*8+4], r15d
add r15d, r13d
cmp ebx, r13d
cmovle ebx, r13d
inc r12
jmp short loc_5D5D3
loc_5D61D:
mov rdi, [r14+10h]
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp loc_5D6F4
loc_5D62E:
mov r13, [r14+10h]
loc_5D632:
xor eax, eax
mov ebx, ecx
loc_5D636:
mov [rsp+68h+var_5C], eax
cmp eax, [r14]
jge short loc_5D6B2
mov rcx, [r14+8]
lea edx, [rax+rax]
movsxd rdx, edx
mov rcx, [rcx]
movsxd r12, dword ptr [rcx+rdx*4]
lea edx, ds:1[rax*2]
movsxd rdx, edx
movsxd rbp, dword ptr [rcx+rdx*4]
shl rbp, 2
add rbp, [r13+0]
mov ecx, [r14+4]
cmp r12d, ecx
jle short loc_5D68A
mov rdi, [rsp+68h+var_38]
lea rsi, [rsp+68h+var_5C]
call __ZNSt3mapIiSt6vectorIiSaIiEESt4lessIiESaISt4pairIKiS2_EEEixERS6_; std::map<int,std::vector<int>>::operator[](int const&)
mov rsi, [rax]
cmp ebx, r12d
cmovle ebx, r12d
jmp short loc_5D69B
loc_5D68A:
mov rdx, [r14+10h]
imul ecx, eax
movsxd rsi, ecx
shl rsi, 2
add rsi, [rdx]
loc_5D69B:
shl r12, 2
mov rdi, rbp
mov rdx, r12
call _memmove
mov eax, [rsp+68h+var_5C]
inc eax
jmp short loc_5D636
loc_5D6B2:
mov rdi, [r14+10h]
test r15b, 1
jz short loc_5D6E0
mov rax, [rdi+10h]
movaps xmm0, [rsp+68h+var_58]
movups xmm1, xmmword ptr [rdi]
movups xmmword ptr [rdi], xmm0
mov rcx, [rsp+68h+var_48]
mov [rdi+10h], rcx
movaps [rsp+68h+var_58], xmm1
mov [rsp+68h+var_48], rax
jmp short loc_5D6EA
loc_5D6E0:
mov rsi, [rsp+68h+var_40]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
loc_5D6EA:
lea rdi, [rsp+68h+var_58]
call __ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
loc_5D6F4:
mov eax, ebx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_5D709
jmp short $+2
loc_5D709:
mov rbx, rax
lea rdi, [rsp+arg_8]
call __ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::DynamicRelation::compressMemberIndices(
OpenSubdiv::v3_6_0::Vtr::internal::_anonymous_namespace_::DynamicRelation *this)
{
int *v1; // rax
int v2; // ebx
long long v3; // rcx
char v4; // r15
long long v5; // rdx
int v6; // ecx
char v7; // r15
__int128 *v8; // r13
long long v9; // r12
int v10; // r15d
int v11; // r13d
int v12; // eax
long long v13; // rcx
int v14; // r12d
long long v15; // rbp
__int128 *v16; // rdi
long long v17; // rax
__int128 v18; // xmm1
int v20; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v21; // [rsp+10h] [rbp-58h] BYREF
long long v22; // [rsp+20h] [rbp-48h]
long long v23; // [rsp+28h] [rbp-40h]
char *v24; // [rsp+30h] [rbp-38h]
v1 = (int *)**((_QWORD **)this + 1);
v2 = *v1;
if ( *((_QWORD *)this + 8) )
{
v24 = (char *)this + 24;
v3 = 1LL;
v4 = 0;
while ( 1 )
{
v5 = *(int *)this;
if ( v3 >= v5 )
break;
v1[2 * v3 + 1] = v2;
v4 |= v2 > (int)v3 * *((_DWORD *)this + 1);
v2 += v1[2 * v3++];
}
v6 = *((_DWORD *)this + 1);
v7 = (v2 > v6 * (int)v5) | v4;
v22 = 0LL;
v21 = 0LL;
v23 = v2;
if ( (v7 & 1) != 0 )
{
v8 = &v21;
std::vector<int>::resize(&v21, v2);
v6 = *((_DWORD *)this + 1);
}
else
{
v8 = (__int128 *)*((_QWORD *)this + 2);
}
v12 = 0;
v2 = v6;
while ( 1 )
{
v20 = v12;
if ( v12 >= *(_DWORD *)this )
break;
v13 = **((_QWORD **)this + 1);
v14 = *(_DWORD *)(v13 + 8LL * v12);
v15 = *(_QWORD *)v8 + 4LL * *(int *)(v13 + 4LL * (2 * v12 + 1));
if ( v14 > *((_DWORD *)this + 1) )
{
std::map<int,std::vector<int>>::operator[](v24, &v20);
if ( v2 <= v14 )
v2 = v14;
}
memmove(v15);
v12 = v20 + 1;
}
v16 = (__int128 *)*((_QWORD *)this + 2);
if ( (v7 & 1) != 0 )
{
v17 = *((_QWORD *)v16 + 2);
v18 = *v16;
*v16 = v21;
*((_QWORD *)v16 + 2) = v22;
v21 = v18;
v22 = v17;
}
else
{
std::vector<int>::resize(v16, v23);
}
std::_Vector_base<int>::~_Vector_base(&v21);
}
else
{
v9 = 1LL;
v10 = *v1;
while ( v9 < *(int *)this )
{
v11 = v1[2 * v9];
memmove(**((_QWORD **)this + 2) + 4LL * v10);
v1 = (int *)**((_QWORD **)this + 1);
v1[2 * v9 + 1] = v10;
v10 += v11;
if ( v2 <= v11 )
v2 = v11;
++v9;
}
std::vector<int>::resize(*((_QWORD *)this + 2), v10);
}
return (unsigned int)v2;
}
| compressMemberIndices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
CMP qword ptr [RDI + 0x40],0x0
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX]
MOV EBX,dword ptr [RAX]
JZ 0x0015d5cc
LEA RCX,[R14 + 0x18]
MOV qword ptr [RSP + 0x30],RCX
PUSH 0x1
POP RCX
XOR R15D,R15D
LAB_0015d568:
MOVSXD RDX,dword ptr [R14]
CMP RCX,RDX
JGE 0x0015d58b
MOV dword ptr [RAX + RCX*0x8 + 0x4],EBX
MOV EDX,dword ptr [R14 + 0x4]
IMUL EDX,ECX
CMP EBX,EDX
SETG DL
OR R15B,DL
ADD EBX,dword ptr [RAX + RCX*0x8]
INC RCX
JMP 0x0015d568
LAB_0015d58b:
MOV ECX,dword ptr [R14 + 0x4]
IMUL EDX,ECX
CMP EBX,EDX
SETG AL
OR R15B,AL
AND qword ptr [RSP + 0x20],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVSXD RBX,EBX
TEST R15B,0x1
MOV qword ptr [RSP + 0x28],RBX
JZ 0x0015d62e
LAB_0015d5b6:
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,RBX
CALL 0x001514b0
LAB_0015d5c6:
MOV ECX,dword ptr [R14 + 0x4]
JMP 0x0015d632
LAB_0015d5cc:
PUSH 0x1
POP R12
MOV R15D,EBX
LAB_0015d5d3:
MOVSXD RCX,dword ptr [R14]
MOVSXD R15,R15D
CMP R12,RCX
JGE 0x0015d61d
MOVSXD R13,dword ptr [RAX + R12*0x8]
MOVSXD RAX,dword ptr [RAX + R12*0x8 + 0x4]
MOV RCX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RCX]
LEA RDI,[RCX + R15*0x4]
LEA RSI,[RCX + RAX*0x4]
MOV RDX,R13
SHL RDX,0x2
CALL 0x00154a00
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + R12*0x8 + 0x4],R15D
ADD R15D,R13D
CMP EBX,R13D
CMOVLE EBX,R13D
INC R12
JMP 0x0015d5d3
LAB_0015d61d:
MOV RDI,qword ptr [R14 + 0x10]
MOV RSI,R15
CALL 0x001514b0
JMP 0x0015d6f4
LAB_0015d62e:
MOV R13,qword ptr [R14 + 0x10]
LAB_0015d632:
XOR EAX,EAX
MOV EBX,ECX
LAB_0015d636:
MOV dword ptr [RSP + 0xc],EAX
CMP EAX,dword ptr [R14]
JGE 0x0015d6b2
MOV RCX,qword ptr [R14 + 0x8]
LEA EDX,[RAX + RAX*0x1]
MOVSXD RDX,EDX
MOV RCX,qword ptr [RCX]
MOVSXD R12,dword ptr [RCX + RDX*0x4]
LEA EDX,[0x1 + RAX*0x2]
MOVSXD RDX,EDX
MOVSXD RBP,dword ptr [RCX + RDX*0x4]
SHL RBP,0x2
ADD RBP,qword ptr [R13]
MOV ECX,dword ptr [R14 + 0x4]
CMP R12D,ECX
JLE 0x0015d68a
LAB_0015d66f:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0xc]
CALL 0x00150210
LAB_0015d67e:
MOV RSI,qword ptr [RAX]
CMP EBX,R12D
CMOVLE EBX,R12D
JMP 0x0015d69b
LAB_0015d68a:
MOV RDX,qword ptr [R14 + 0x10]
IMUL ECX,EAX
MOVSXD RSI,ECX
SHL RSI,0x2
ADD RSI,qword ptr [RDX]
LAB_0015d69b:
SHL R12,0x2
MOV RDI,RBP
MOV RDX,R12
CALL 0x00154a00
MOV EAX,dword ptr [RSP + 0xc]
INC EAX
JMP 0x0015d636
LAB_0015d6b2:
MOV RDI,qword ptr [R14 + 0x10]
TEST R15B,0x1
JZ 0x0015d6e0
MOV RAX,qword ptr [RDI + 0x10]
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVUPS XMM1,xmmword ptr [RDI]
MOVUPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RDI + 0x10],RCX
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0015d6ea
LAB_0015d6e0:
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001514b0
LAB_0015d6ea:
LEA RDI,[RSP + 0x10]
CALL 0x00152f00
LAB_0015d6f4:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::(anonymous
namespace)::DynamicRelation::compressMemberIndices() */
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::(anonymous_namespace)::DynamicRelation::compressMemberIndices
(DynamicRelation *this)
{
int iVar1;
int8 uVar2;
bool bVar3;
int8 uVar4;
int8 uVar5;
bool bVar6;
int *piVar7;
int8 *puVar8;
long lVar9;
int iVar10;
void *__src;
vector<int,std::allocator<int>> *pvVar11;
int iVar12;
int local_5c;
int8 local_58;
int8 uStack_50;
int8 local_48;
ulong local_40;
DynamicRelation *local_38;
piVar7 = (int *)**(int8 **)(this + 8);
iVar10 = *piVar7;
if (*(long *)(this + 0x40) == 0) {
iVar12 = iVar10;
for (lVar9 = 1; lVar9 < *(int *)this; lVar9 = lVar9 + 1) {
iVar1 = piVar7[lVar9 * 2];
memmove((void *)(**(long **)(this + 0x10) + (long)iVar12 * 4),
(void *)(**(long **)(this + 0x10) + (long)piVar7[lVar9 * 2 + 1] * 4),(long)iVar1 << 2)
;
piVar7 = (int *)**(int8 **)(this + 8);
piVar7[lVar9 * 2 + 1] = iVar12;
iVar12 = iVar12 + iVar1;
if (iVar10 <= iVar1) {
iVar10 = iVar1;
}
}
std::vector<int,std::allocator<int>>::resize
(*(vector<int,std::allocator<int>> **)(this + 0x10),(long)iVar12);
}
else {
local_38 = this + 0x18;
bVar6 = false;
for (lVar9 = 1; lVar9 < *(int *)this; lVar9 = lVar9 + 1) {
piVar7[lVar9 * 2 + 1] = iVar10;
bVar6 = (bool)(bVar6 | *(int *)(this + 4) * (int)lVar9 < iVar10);
iVar10 = iVar10 + piVar7[lVar9 * 2];
}
bVar3 = *(int *)this * *(int *)(this + 4) < iVar10;
local_48 = 0;
local_58 = 0;
uStack_50 = 0;
local_40 = (long)iVar10;
if ((bool)(bVar6 | bVar3)) {
/* try { // try from 0015d5b6 to 0015d5c5 has its CatchHandler @ 0015d707 */
pvVar11 = (vector<int,std::allocator<int>> *)&local_58;
std::vector<int,std::allocator<int>>::resize(pvVar11,(long)iVar10);
iVar10 = *(int *)(this + 4);
}
else {
pvVar11 = *(vector<int,std::allocator<int>> **)(this + 0x10);
iVar10 = *(int *)(this + 4);
}
for (local_5c = 0; local_5c < *(int *)this; local_5c = local_5c + 1) {
iVar12 = *(int *)(**(long **)(this + 8) + (long)(local_5c * 2) * 4);
iVar1 = *(int *)(**(long **)(this + 8) + (long)(local_5c * 2 + 1) * 4);
lVar9 = *(long *)pvVar11;
if (*(int *)(this + 4) < iVar12) {
/* try { // try from 0015d66f to 0015d67d has its CatchHandler @ 0015d709 */
puVar8 = (int8 *)
std::
map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
::operator[]((map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
*)local_38,&local_5c);
__src = (void *)*puVar8;
if (iVar10 <= iVar12) {
iVar10 = iVar12;
}
}
else {
__src = (void *)((long)(*(int *)(this + 4) * local_5c) * 4 + **(long **)(this + 0x10));
}
memmove((void *)((long)iVar1 * 4 + lVar9),__src,(long)iVar12 << 2);
}
pvVar11 = *(vector<int,std::allocator<int>> **)(this + 0x10);
if (bVar6 || bVar3) {
uVar2 = *(int8 *)(pvVar11 + 0x10);
uVar4 = *(int8 *)pvVar11;
uVar5 = *(int8 *)(pvVar11 + 8);
*(int8 *)pvVar11 = local_58;
*(int8 *)(pvVar11 + 8) = uStack_50;
*(int8 *)(pvVar11 + 0x10) = local_48;
local_58 = uVar4;
uStack_50 = uVar5;
local_48 = uVar2;
}
else {
/* try { // try from 0015d6e0 to 0015d6e9 has its CatchHandler @ 0015d705 */
std::vector<int,std::allocator<int>>::resize(pvVar11,local_40);
}
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)&local_58);
}
return iVar10;
}
| |
23,087 | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::compressMemberIndices() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
DynamicRelation::compressMemberIndices() {
if (_irregIndices.size() == 0) {
int memberCount = _countsAndOffsets[0];
int memberMax = _countsAndOffsets[0];
for (int i = 1; i < _compCount; ++i) {
int count = _countsAndOffsets[2*i];
int offset = _countsAndOffsets[2*i + 1];
memmove(&_regIndices[memberCount], &_regIndices[offset], count * sizeof(Index));
_countsAndOffsets[2*i + 1] = memberCount;
memberCount += count;
memberMax = std::max(memberMax, count);
}
_regIndices.resize(memberCount);
return memberMax;
} else {
// Assign new offsets-per-component while determining if we can trivially compress in place:
bool cannotBeCompressedInPlace = false;
int memberCount = _countsAndOffsets[0];
for (int i = 1; i < _compCount; ++i) {
_countsAndOffsets[2*i + 1] = memberCount;
cannotBeCompressedInPlace |= (memberCount > (_memberCountPerComp * i));
memberCount += _countsAndOffsets[2*i];
}
cannotBeCompressedInPlace |= (memberCount > (_memberCountPerComp * _compCount));
// Copy members into the original or temporary vector accordingly:
IndexVector tmpIndices;
if (cannotBeCompressedInPlace) {
tmpIndices.resize(memberCount);
}
IndexVector& dstIndices = cannotBeCompressedInPlace ? tmpIndices : _regIndices;
int memberMax = _memberCountPerComp;
for (int i = 0; i < _compCount; ++i) {
int count = _countsAndOffsets[2*i];
Index *dstMembers = &dstIndices[0] + _countsAndOffsets[2*i + 1];
Index *srcMembers = 0;
if (count <= _memberCountPerComp) {
srcMembers = &_regIndices[i * _memberCountPerComp];
} else {
srcMembers = &_irregIndices[i][0];
memberMax = std::max(memberMax, count);
}
memmove(dstMembers, srcMembers, count * sizeof(Index));
}
if (cannotBeCompressedInPlace) {
_regIndices.swap(tmpIndices);
} else {
_regIndices.resize(memberCount);
}
return memberMax;
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::compressMemberIndices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
cmpq $0x0, 0x40(%rdi)
movq 0x8(%rdi), %rax
movq (%rax), %rax
movl (%rax), %r12d
movl (%rdi), %ecx
je 0x46d4b
cmpl $0x2, %ecx
jl 0x46daa
movl $0x1, %esi
xorl %edx, %edx
movl %r12d, 0x4(%rax,%rsi,8)
movl 0x4(%r14), %ebx
movl %esi, %ecx
imull %ebx, %ecx
cmpl %ecx, %r12d
setg %cl
addl (%rax,%rsi,8), %r12d
orb %cl, %dl
incq %rsi
movslq (%r14), %rcx
cmpq %rcx, %rsi
jl 0x46d24
jmp 0x46db0
cmpl $0x2, %ecx
jl 0x46edc
movl $0x1, %r15d
movl %r12d, %ebx
movslq (%rax,%r15,8), %r13
movslq 0x4(%rax,%r15,8), %rax
movq 0x10(%r14), %rcx
movslq %r12d, %r12
movq (%rcx), %rcx
leaq (%rcx,%r12,4), %rdi
leaq (%rcx,%rax,4), %rsi
movq %r13, %rdx
shlq $0x2, %rdx
callq 0x3b730
movq 0x8(%r14), %rax
movq (%rax), %rax
movl %r12d, 0x4(%rax,%r15,8)
addl %r13d, %r12d
cmpl %r13d, %ebx
cmovlel %r13d, %ebx
incq %r15
movslq (%r14), %rcx
cmpq %rcx, %r15
jl 0x46d5d
jmp 0x46edf
movl 0x4(%r14), %ebx
xorl %edx, %edx
movl %ebx, %eax
imull %ecx, %eax
cmpl %eax, %r12d
setg %bpl
orb %dl, %bpl
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testb $0x1, %bpl
je 0x46def
movslq %r12d, %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x39670
movl (%r14), %ecx
movl 0x4(%r14), %ebx
jmp 0x46df3
movq 0x10(%r14), %r15
movb %bpl, 0xb(%rsp)
movl $0x0, 0xc(%rsp)
testl %ecx, %ecx
jle 0x46e89
leaq 0x18(%r14), %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
movq 0x8(%r14), %rcx
leal (%rax,%rax), %edx
movslq %edx, %rdx
movq (%rcx), %rcx
movslq (%rcx,%rdx,4), %rbp
leal 0x1(,%rax,2), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %r13
shlq $0x2, %r13
addq (%r15), %r13
movl 0x4(%r14), %ecx
cmpl %ecx, %ebp
jle 0x46e5a
movq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x38bc0
movq (%rax), %rsi
cmpl %ebp, %ebx
cmovlel %ebp, %ebx
jmp 0x46e6b
movq 0x10(%r14), %rdx
imull %eax, %ecx
movslq %ecx, %rsi
shlq $0x2, %rsi
addq (%rdx), %rsi
shlq $0x2, %rbp
movq %r13, %rdi
movq %rbp, %rdx
callq 0x3b730
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl (%r14), %eax
jl 0x46e13
movq 0x10(%r14), %rax
testb $0x1, 0xb(%rsp)
je 0x46eb8
movq (%rax), %rdi
movaps 0x10(%rsp), %xmm0
movups 0x8(%rax), %xmm1
movups %xmm0, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rdi, 0x10(%rsp)
movups %xmm1, 0x18(%rsp)
jmp 0x46ec8
movslq %r12d, %rsi
movq %rax, %rdi
callq 0x39670
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x46eeb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2b0
jmp 0x46eeb
movl %r12d, %ebx
movq 0x10(%r14), %rdi
movslq %r12d, %rsi
callq 0x39670
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x46f00
jmp 0x46f00
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x46f1a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq %rbx, %rdi
callq 0x3bd30
| _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_115DynamicRelation21compressMemberIndicesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdi
cmp qword ptr [rdi+40h], 0
mov rax, [rdi+8]
mov rax, [rax]
mov r12d, [rax]
mov ecx, [rdi]
jz short loc_46D4B
cmp ecx, 2
jl loc_46DAA
mov esi, 1
xor edx, edx
loc_46D24:
mov [rax+rsi*8+4], r12d
mov ebx, [r14+4]
mov ecx, esi
imul ecx, ebx
cmp r12d, ecx
setnle cl
add r12d, [rax+rsi*8]
or dl, cl
inc rsi
movsxd rcx, dword ptr [r14]
cmp rsi, rcx
jl short loc_46D24
jmp short loc_46DB0
loc_46D4B:
cmp ecx, 2
jl loc_46EDC
mov r15d, 1
mov ebx, r12d
loc_46D5D:
movsxd r13, dword ptr [rax+r15*8]
movsxd rax, dword ptr [rax+r15*8+4]
mov rcx, [r14+10h]
movsxd r12, r12d
mov rcx, [rcx]
lea rdi, [rcx+r12*4]
lea rsi, [rcx+rax*4]
mov rdx, r13
shl rdx, 2
call _memmove
mov rax, [r14+8]
mov rax, [rax]
mov [rax+r15*8+4], r12d
add r12d, r13d
cmp ebx, r13d
cmovle ebx, r13d
inc r15
movsxd rcx, dword ptr [r14]
cmp r15, rcx
jl short loc_46D5D
jmp loc_46EDF
loc_46DAA:
mov ebx, [r14+4]
xor edx, edx
loc_46DB0:
mov eax, ebx
imul eax, ecx
cmp r12d, eax
setnle bpl
or bpl, dl
xorps xmm0, xmm0
movaps xmmword ptr [rsp+68h+var_58], xmm0
mov [rsp+68h+var_48], 0
test bpl, 1
jz short loc_46DEF
movsxd rsi, r12d
lea r15, [rsp+68h+var_58]
mov rdi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov ecx, [r14]
mov ebx, [r14+4]
jmp short loc_46DF3
loc_46DEF:
mov r15, [r14+10h]
loc_46DF3:
mov [rsp+68h+var_5D], bpl
mov [rsp+68h+var_5C], 0
test ecx, ecx
jle loc_46E89
lea rax, [r14+18h]
mov [rsp+68h+var_38], rax
xor eax, eax
loc_46E13:
mov rcx, [r14+8]
lea edx, [rax+rax]
movsxd rdx, edx
mov rcx, [rcx]
movsxd rbp, dword ptr [rcx+rdx*4]
lea edx, ds:1[rax*2]
movsxd rdx, edx
movsxd r13, dword ptr [rcx+rdx*4]
shl r13, 2
add r13, [r15]
mov ecx, [r14+4]
cmp ebp, ecx
jle short loc_46E5A
mov rdi, [rsp+68h+var_38]
lea rsi, [rsp+68h+var_5C]
call __ZNSt3mapIiSt6vectorIiSaIiEESt4lessIiESaISt4pairIKiS2_EEEixERS6_; std::map<int,std::vector<int>>::operator[](int const&)
mov rsi, [rax]
cmp ebx, ebp
cmovle ebx, ebp
jmp short loc_46E6B
loc_46E5A:
mov rdx, [r14+10h]
imul ecx, eax
movsxd rsi, ecx
shl rsi, 2
add rsi, [rdx]
loc_46E6B:
shl rbp, 2
mov rdi, r13
mov rdx, rbp
call _memmove
mov eax, [rsp+68h+var_5C]
inc eax
mov [rsp+68h+var_5C], eax
cmp eax, [r14]
jl short loc_46E13
loc_46E89:
mov rax, [r14+10h]
test [rsp+68h+var_5D], 1
jz short loc_46EB8
mov rdi, [rax]
movaps xmm0, xmmword ptr [rsp+68h+var_58]
movups xmm1, xmmword ptr [rax+8]
movups xmmword ptr [rax], xmm0
mov rcx, [rsp+68h+var_48]
mov [rax+10h], rcx
mov [rsp+68h+var_58], rdi
movups xmmword ptr [rsp+68h+var_58+8], xmm1
jmp short loc_46EC8
loc_46EB8:
movsxd rsi, r12d
mov rdi, rax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rdi, [rsp+68h+var_58]; void *
loc_46EC8:
test rdi, rdi
jz short loc_46EEB
mov rsi, [rsp+68h+var_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_46EEB
loc_46EDC:
mov ebx, r12d
loc_46EDF:
mov rdi, [r14+10h]
movsxd rsi, r12d
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
loc_46EEB:
mov eax, ebx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_46F00
jmp short $+2
loc_46F00:
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_46F1A
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_46F1A:
mov rdi, rbx
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::DynamicRelation::compressMemberIndices(
OpenSubdiv::v3_6_0::Vtr::internal::_anonymous_namespace_::DynamicRelation *this)
{
int *v1; // rax
int v2; // r12d
long long v3; // rcx
long long v4; // rsi
char v5; // dl
int v6; // ebx
bool v7; // cl
long long v8; // r15
int v9; // r13d
char v10; // bp
void **v11; // r15
int v12; // eax
long long v13; // rcx
int v14; // ebp
long long v15; // r13
int v16; // ecx
long long v17; // rsi
long long v18; // rax
void *v19; // rdi
__int128 v20; // xmm1
char v22; // [rsp+Bh] [rbp-5Dh]
int v23; // [rsp+Ch] [rbp-5Ch] BYREF
void *v24[4]; // [rsp+10h] [rbp-58h] BYREF
char *v25; // [rsp+30h] [rbp-38h]
v1 = (int *)**((_QWORD **)this + 1);
v2 = *v1;
LODWORD(v3) = *(_DWORD *)this;
if ( *((_QWORD *)this + 8) )
{
if ( (int)v3 < 2 )
{
v6 = *((_DWORD *)this + 1);
v5 = 0;
}
else
{
v4 = 1LL;
v5 = 0;
do
{
v1[2 * v4 + 1] = v2;
v6 = *((_DWORD *)this + 1);
v7 = v2 > v6 * (int)v4;
v2 += v1[2 * v4];
v5 |= v7;
++v4;
v3 = *(int *)this;
}
while ( v4 < v3 );
}
v10 = v5 | (v2 > (int)v3 * v6);
memset(v24, 0, 24);
if ( v5 & 1 | (v2 > (int)v3 * v6) )
{
v11 = v24;
std::vector<int>::resize(v24, v2);
LODWORD(v3) = *(_DWORD *)this;
v6 = *((_DWORD *)this + 1);
}
else
{
v11 = (void **)*((_QWORD *)this + 2);
}
v22 = v10;
v23 = 0;
if ( (int)v3 > 0 )
{
v25 = (char *)this + 24;
v12 = 0;
do
{
v13 = **((_QWORD **)this + 1);
v14 = *(_DWORD *)(v13 + 8LL * v12);
v15 = (long long)*v11 + 4 * *(int *)(v13 + 4LL * (2 * v12 + 1));
v16 = *((_DWORD *)this + 1);
if ( v14 <= v16 )
{
v17 = **((_QWORD **)this + 2) + 4LL * v12 * v16;
}
else
{
v17 = *(_QWORD *)std::map<int,std::vector<int>>::operator[](v25, &v23);
if ( v6 <= v14 )
v6 = v14;
}
memmove(v15, v17);
v12 = v23 + 1;
v23 = v12;
}
while ( v12 < *(_DWORD *)this );
}
v18 = *((_QWORD *)this + 2);
if ( (v22 & 1) != 0 )
{
v19 = *(void **)v18;
v20 = *(_OWORD *)(v18 + 8);
*(_OWORD *)v18 = *(_OWORD *)v24;
*(void **)(v18 + 16) = v24[2];
v24[0] = v19;
*(_OWORD *)&v24[1] = v20;
}
else
{
std::vector<int>::resize(*((_QWORD *)this + 2), v2);
v19 = v24[0];
}
if ( v19 )
operator delete(v19, (char *)v24[2] - (char *)v19);
}
else
{
if ( (int)v3 < 2 )
{
v6 = *v1;
}
else
{
v8 = 1LL;
v6 = *v1;
do
{
v9 = v1[2 * v8];
memmove(**((_QWORD **)this + 2) + 4LL * v2, **((_QWORD **)this + 2) + 4LL * v1[2 * v8 + 1]);
v1 = (int *)**((_QWORD **)this + 1);
v1[2 * v8 + 1] = v2;
v2 += v9;
if ( v6 <= v9 )
v6 = v9;
++v8;
}
while ( v8 < *(int *)this );
}
std::vector<int>::resize(*((_QWORD *)this + 2), v2);
}
return (unsigned int)v6;
}
| compressMemberIndices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
CMP qword ptr [RDI + 0x40],0x0
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX]
MOV R12D,dword ptr [RAX]
MOV ECX,dword ptr [RDI]
JZ 0x00146d4b
CMP ECX,0x2
JL 0x00146daa
MOV ESI,0x1
XOR EDX,EDX
LAB_00146d24:
MOV dword ptr [RAX + RSI*0x8 + 0x4],R12D
MOV EBX,dword ptr [R14 + 0x4]
MOV ECX,ESI
IMUL ECX,EBX
CMP R12D,ECX
SETG CL
ADD R12D,dword ptr [RAX + RSI*0x8]
OR DL,CL
INC RSI
MOVSXD RCX,dword ptr [R14]
CMP RSI,RCX
JL 0x00146d24
JMP 0x00146db0
LAB_00146d4b:
CMP ECX,0x2
JL 0x00146edc
MOV R15D,0x1
MOV EBX,R12D
LAB_00146d5d:
MOVSXD R13,dword ptr [RAX + R15*0x8]
MOVSXD RAX,dword ptr [RAX + R15*0x8 + 0x4]
MOV RCX,qword ptr [R14 + 0x10]
MOVSXD R12,R12D
MOV RCX,qword ptr [RCX]
LEA RDI,[RCX + R12*0x4]
LEA RSI,[RCX + RAX*0x4]
MOV RDX,R13
SHL RDX,0x2
CALL 0x0013b730
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + R15*0x8 + 0x4],R12D
ADD R12D,R13D
CMP EBX,R13D
CMOVLE EBX,R13D
INC R15
MOVSXD RCX,dword ptr [R14]
CMP R15,RCX
JL 0x00146d5d
JMP 0x00146edf
LAB_00146daa:
MOV EBX,dword ptr [R14 + 0x4]
XOR EDX,EDX
LAB_00146db0:
MOV EAX,EBX
IMUL EAX,ECX
CMP R12D,EAX
SETG BPL
OR BPL,DL
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
TEST BPL,0x1
JZ 0x00146def
MOVSXD RSI,R12D
LAB_00146dd9:
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00139670
MOV ECX,dword ptr [R14]
MOV EBX,dword ptr [R14 + 0x4]
JMP 0x00146df3
LAB_00146def:
MOV R15,qword ptr [R14 + 0x10]
LAB_00146df3:
MOV byte ptr [RSP + 0xb],BPL
MOV dword ptr [RSP + 0xc],0x0
TEST ECX,ECX
JLE 0x00146e89
LEA RAX,[R14 + 0x18]
MOV qword ptr [RSP + 0x30],RAX
XOR EAX,EAX
LAB_00146e13:
MOV RCX,qword ptr [R14 + 0x8]
LEA EDX,[RAX + RAX*0x1]
MOVSXD RDX,EDX
MOV RCX,qword ptr [RCX]
MOVSXD RBP,dword ptr [RCX + RDX*0x4]
LEA EDX,[0x1 + RAX*0x2]
MOVSXD RDX,EDX
MOVSXD R13,dword ptr [RCX + RDX*0x4]
SHL R13,0x2
ADD R13,qword ptr [R15]
MOV ECX,dword ptr [R14 + 0x4]
CMP EBP,ECX
JLE 0x00146e5a
LAB_00146e41:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0xc]
CALL 0x00138bc0
LAB_00146e50:
MOV RSI,qword ptr [RAX]
CMP EBX,EBP
CMOVLE EBX,EBP
JMP 0x00146e6b
LAB_00146e5a:
MOV RDX,qword ptr [R14 + 0x10]
IMUL ECX,EAX
MOVSXD RSI,ECX
SHL RSI,0x2
ADD RSI,qword ptr [RDX]
LAB_00146e6b:
SHL RBP,0x2
MOV RDI,R13
MOV RDX,RBP
CALL 0x0013b730
MOV EAX,dword ptr [RSP + 0xc]
INC EAX
MOV dword ptr [RSP + 0xc],EAX
CMP EAX,dword ptr [R14]
JL 0x00146e13
LAB_00146e89:
MOV RAX,qword ptr [R14 + 0x10]
TEST byte ptr [RSP + 0xb],0x1
JZ 0x00146eb8
MOV RDI,qword ptr [RAX]
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVUPS XMM1,xmmword ptr [RAX + 0x8]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RSP + 0x10],RDI
MOVUPS xmmword ptr [RSP + 0x18],XMM1
JMP 0x00146ec8
LAB_00146eb8:
MOVSXD RSI,R12D
LAB_00146ebb:
MOV RDI,RAX
CALL 0x00139670
LAB_00146ec3:
MOV RDI,qword ptr [RSP + 0x10]
LAB_00146ec8:
TEST RDI,RDI
JZ 0x00146eeb
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0013a2b0
JMP 0x00146eeb
LAB_00146edc:
MOV EBX,R12D
LAB_00146edf:
MOV RDI,qword ptr [R14 + 0x10]
MOVSXD RSI,R12D
CALL 0x00139670
LAB_00146eeb:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::(anonymous
namespace)::DynamicRelation::compressMemberIndices() */
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::(anonymous_namespace)::DynamicRelation::compressMemberIndices
(DynamicRelation *this)
{
int iVar1;
bool bVar2;
int8 uVar3;
bool bVar4;
int *piVar5;
int8 *puVar6;
int iVar7;
int iVar8;
long lVar9;
void *pvVar10;
int iVar11;
vector<int,std::allocator<int>> *pvVar12;
int local_5c;
void *local_58;
int8 uStack_50;
long local_48;
DynamicRelation *local_38;
piVar5 = (int *)**(int8 **)(this + 8);
iVar11 = *piVar5;
iVar7 = *(int *)this;
if (*(long *)(this + 0x40) == 0) {
iVar8 = iVar11;
if (1 < iVar7) {
lVar9 = 1;
do {
iVar7 = piVar5[lVar9 * 2];
memmove((void *)(**(long **)(this + 0x10) + (long)iVar11 * 4),
(void *)(**(long **)(this + 0x10) + (long)piVar5[lVar9 * 2 + 1] * 4),
(long)iVar7 << 2);
piVar5 = (int *)**(int8 **)(this + 8);
piVar5[lVar9 * 2 + 1] = iVar11;
iVar11 = iVar11 + iVar7;
if (iVar8 <= iVar7) {
iVar8 = iVar7;
}
lVar9 = lVar9 + 1;
} while (lVar9 < *(int *)this);
}
std::vector<int,std::allocator<int>>::resize
(*(vector<int,std::allocator<int>> **)(this + 0x10),(long)iVar11);
}
else {
if (iVar7 < 2) {
iVar8 = *(int *)(this + 4);
bVar4 = false;
}
else {
lVar9 = 1;
bVar4 = false;
do {
piVar5[lVar9 * 2 + 1] = iVar11;
iVar8 = *(int *)(this + 4);
bVar2 = (int)lVar9 * iVar8 < iVar11;
iVar11 = iVar11 + piVar5[lVar9 * 2];
bVar4 = (bool)(bVar4 | bVar2);
lVar9 = lVar9 + 1;
iVar7 = *(int *)this;
} while (lVar9 < iVar7);
}
bVar2 = iVar11 <= iVar8 * iVar7;
local_58 = (void *)0x0;
uStack_50 = 0;
local_48 = 0;
if (bVar2 && !bVar4) {
pvVar12 = *(vector<int,std::allocator<int>> **)(this + 0x10);
}
else {
/* try { // try from 00146dd9 to 00146de5 has its CatchHandler @ 00146efe */
pvVar12 = (vector<int,std::allocator<int>> *)&local_58;
std::vector<int,std::allocator<int>>::resize(pvVar12,(long)iVar11);
iVar7 = *(int *)this;
iVar8 = *(int *)(this + 4);
}
local_5c = 0;
if (0 < iVar7) {
local_38 = this + 0x18;
do {
iVar7 = *(int *)(**(long **)(this + 8) + (long)(local_5c * 2) * 4);
iVar1 = *(int *)(**(long **)(this + 8) + (long)(local_5c * 2 + 1) * 4);
lVar9 = *(long *)pvVar12;
if (*(int *)(this + 4) < iVar7) {
/* try { // try from 00146e41 to 00146e4f has its CatchHandler @ 00146f00 */
puVar6 = (int8 *)
std::
map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
::operator[]((map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
*)local_38,&local_5c);
pvVar10 = (void *)*puVar6;
if (iVar8 <= iVar7) {
iVar8 = iVar7;
}
}
else {
pvVar10 = (void *)((long)(*(int *)(this + 4) * local_5c) * 4 + **(long **)(this + 0x10));
}
memmove((void *)((long)iVar1 * 4 + lVar9),pvVar10,(long)iVar7 << 2);
local_5c = local_5c + 1;
} while (local_5c < *(int *)this);
}
pvVar12 = *(vector<int,std::allocator<int>> **)(this + 0x10);
if (bVar2 && !bVar4) {
/* try { // try from 00146ebb to 00146ec2 has its CatchHandler @ 00146efc */
std::vector<int,std::allocator<int>>::resize(pvVar12,(long)iVar11);
}
else {
pvVar10 = *(void **)pvVar12;
uVar3 = *(int8 *)(pvVar12 + 8);
lVar9 = *(long *)(pvVar12 + 0x10);
*(void **)pvVar12 = local_58;
*(int8 *)(pvVar12 + 8) = uStack_50;
*(long *)(pvVar12 + 0x10) = local_48;
local_58 = pvVar10;
uStack_50 = uVar3;
local_48 = lVar9;
}
if (local_58 != (void *)0x0) {
operator_delete(local_58,local_48 - (long)local_58);
}
}
return iVar8;
}
| |
23,088 | spdlog::details::a_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
string_view_t field_value{days[static_cast<size_t>(tm_time.tm_wday)]};
ScopedPadder p(field_value.size(), padinfo_, dest);
fmt_helper::append_string_view(field_value, dest);
} | O0 | c | spdlog::details::a_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movslq 0x18(%rax), %rsi
leaq 0x1160e6(%rip), %rdi # 0x1857e8
callq 0x5d770
movq (%rax), %rax
leaq 0x28(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq 0x58(%rsp), %rdi
callq 0x16290
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x2a430
movq 0x8(%rsp), %rdx
movq %rax, %rsi
addq $0x8, %rdx
movq 0x38(%rsp), %rcx
leaq 0x27(%rsp), %rdi
callq 0x546d0
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x43a00
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN6spdlog7details11a_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov [rsp+68h+var_30], rcx
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_28]
movsxd rsi, dword ptr [rax+18h]
lea rdi, _ZN6spdlog7detailsL4daysE; spdlog::details::days
call _ZNSt5arrayIPKcLm7EEixEm; std::array<char const*,7ul>::operator[](ulong)
mov rax, [rax]
lea rcx, [rsp+68h+var_40]
mov [rsp+68h+var_8], rcx
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_68], rax
mov rcx, [rsp+68h+var_10]
mov [rax], rcx
mov rdi, [rsp+68h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+68h+var_68]
mov [rax+8], rcx
lea rdi, [rsp+68h+var_40]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdx, [rsp+68h+var_60]
mov rsi, rax
add rdx, 8
mov rcx, [rsp+68h+var_30]
lea rdi, [rsp+68h+var_41]
call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_50], rax
mov rdx, [rsp+68h+var_30]
mov rdi, [rsp+68h+var_58]
mov rsi, [rsp+68h+var_50]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add rsp, 68h
retn
| long long spdlog::details::a_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v4; // rax
long long v6; // [rsp+28h] [rbp-40h] BYREF
long long v7; // [rsp+30h] [rbp-38h]
_QWORD *v8; // [rsp+38h] [rbp-30h]
long long v9; // [rsp+40h] [rbp-28h]
long long v10; // [rsp+48h] [rbp-20h]
long long v11; // [rsp+50h] [rbp-18h]
long long v12; // [rsp+58h] [rbp-10h]
long long *v13; // [rsp+60h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v4 = *(_QWORD *)std::array<char const*,7ul>::operator[]((long long)spdlog::details::days, *(int *)(a3 + 24));
v13 = &v6;
v12 = v4;
v6 = v4;
v7 = strlen(v4);
fmt::v10::basic_string_view<char>::size((long long)&v6);
spdlog::details::null_scoped_padder::null_scoped_padder();
return spdlog::details::fmt_helper::append_string_view(v6, v7, v8);
}
| format:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RSI,dword ptr [RAX + 0x18]
LEA RDI,[0x2857e8]
CALL 0x0015d770
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x28]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00116290
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
LEA RDI,[RSP + 0x28]
CALL 0x0012a430
MOV RDX,qword ptr [RSP + 0x8]
MOV RSI,RAX
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x27]
CALL 0x001546d0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00143a00
ADD RSP,0x68
RET
|
/* spdlog::details::a_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::a_formatter<spdlog::details::null_scoped_padder>::format
(a_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
int8 *puVar1;
ulong uVar2;
null_scoped_padder local_41;
fmt_helper *local_40;
size_t local_38;
basic_memory_buffer *local_30;
tm *local_28;
log_msg *local_20;
a_formatter<spdlog::details::null_scoped_padder> *local_18;
fmt_helper *local_10;
fmt_helper **local_8;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
puVar1 = (int8 *)
std::array<char_const*,7ul>::operator[]
((array<char_const*,7ul> *)days,(long)param_2->tm_wday);
local_40 = (fmt_helper *)*puVar1;
local_8 = &local_40;
local_10 = local_40;
local_38 = strlen((char *)local_40);
uVar2 = fmt::v10::basic_string_view<char>::size((basic_string_view<char> *)&local_40);
null_scoped_padder::null_scoped_padder(&local_41,uVar2,(padding_info *)(this + 8),local_30);
fmt_helper::append_string_view(local_40,local_38,local_30);
return;
}
| |
23,089 | my_fprintf | eloqsql/strings/my_vsnprintf.c | int my_fprintf(FILE *stream, const char* format, ...)
{
int result;
va_list args;
va_start(args, format);
result= my_vfprintf(stream, format, args);
va_end(args);
return result;
} | O0 | c | my_fprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xd4f68
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xd4d80
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
| my_fprintf:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_D4F68
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_D4F68:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_E0]
mov [rbp+var_20], rax
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_2C], 30h ; '0'
mov [rbp+var_30], 10h
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call my_vfprintf
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 0E0h
pop rbp
retn
| long long my_fprintf(
long long a1,
char *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
int v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
return (unsigned int)my_vfprintf(a1, a2, v29);
}
| my_fprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001d4f68
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001d4f68:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0xe0]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x2c],0x30
MOV dword ptr [RBP + -0x30],0x10
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x001d4d80
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0xe0
POP RBP
RET
|
int4
my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 uVar1;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vfprintf(param_9,param_10,&local_38);
return uVar1;
}
| |
23,090 | ggml_compute_forward_cross_entropy_loss_back | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_cross_entropy_loss_back(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_cross_entropy_loss_back_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_cross_entropy_loss_back:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x1989a
jmp 0x1988b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d3b0
jmp 0x198b4
leaq 0x5a2c1(%rip), %rdi # 0x73b62
movl $0x310f, %esi # imm = 0x310F
leaq 0x5a510(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ggml_compute_forward_cross_entropy_loss_back:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_1989A
jmp short $+2
loc_1988B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_cross_entropy_loss_back_f32
jmp short loc_198B4
loc_1989A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 310Fh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_198B4:
add rsp, 20h
pop rbp
retn
| double ggml_compute_forward_cross_entropy_loss_back(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
12559LL,
"fatal error");
ggml_compute_forward_cross_entropy_loss_back_f32(a1, a2);
return result;
}
| ggml_compute_forward_cross_entropy_loss_back:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x0011989a
JMP 0x0011988b
LAB_0011988b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0013d3b0
JMP 0x001198b4
LAB_0011989a:
LEA RDI,[0x173b62]
MOV ESI,0x310f
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001198b4:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_cross_entropy_loss_back(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_cross_entropy_loss_back_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x310f,"fatal error");
}
return;
}
| |
23,091 | ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> (bool)>)::Impl::Render() | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/renderer.cpp | Element Render() override { return render_(Focused()) | reflect(box_); } | O3 | cpp | ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> (bool)>)::Impl::Render():
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x271c2
movb %al, 0x7(%rsp)
cmpq $0x0, 0x48(%r14)
je 0x2cd28
leaq 0x38(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq *0x50(%r14)
addq $0x28, %r14
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x38cb8
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x25a96
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x2cd0e
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cd1d
callq 0x14af8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
callq 0xb140
jmp 0x2cd4d
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x2cd58
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2cd58
movq %rax, %rdi
callq 0x1049a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cd67
callq 0x14af8
movq %rbx, %rdi
callq 0xb780
nop
| _ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEbEEEN4Impl6RenderEv:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi; this
call _ZNK5ftxui13ComponentBase7FocusedEv; ftxui::ComponentBase::Focused(void)
mov [rsp+48h+var_41], al
cmp qword ptr [r14+48h], 0
jz short loc_2CD28
lea rsi, [r14+38h]
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call qword ptr [r14+50h]
add r14, 28h ; '('
lea rdi, [rsp+48h+var_30]
mov rsi, r14
call _ZN5ftxui7reflectERNS_3BoxE; ftxui::reflect(ftxui::Box &)
lea rsi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_30]
mov rdi, rbx
call _ZN5ftxuiorESt10shared_ptrINS_4NodeEESt8functionIFS2_S2_EE; ftxui::operator|(std::shared_ptr<ftxui::Node>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)
mov rax, [rsp+48h+var_20]
test rax, rax
jz short loc_2CD0E
lea rdi, [rsp+48h+var_30]
mov rsi, rdi
mov edx, 3
call rax
loc_2CD0E:
mov rdi, [rsp+48h+var_38]
test rdi, rdi
jz short loc_2CD1D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2CD1D:
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
loc_2CD28:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_2CD4D
mov rbx, rax
mov rax, [rsp+48h+var_20]
test rax, rax
jz short loc_2CD58
lea rdi, [rsp+48h+var_30]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_2CD58
loc_2CD4D:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_2CD58:
mov rdi, [rsp+48h+var_38]
test rdi, rdi
jz short loc_2CD67
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2CD67:
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(bool)>)::Impl::Render(
long long a1,
long long a2)
{
char v3; // [rsp+7h] [rbp-41h] BYREF
__int128 v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[16]; // [rsp+18h] [rbp-30h] BYREF
void ( *v6)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-20h]
v3 = ftxui::ComponentBase::Focused((ftxui::ComponentBase *)a2);
if ( !*(_QWORD *)(a2 + 72) )
std::__throw_bad_function_call();
(*(void ( **)(__int128 *, long long, char *))(a2 + 80))(&v4, a2 + 56, &v3);
ftxui::reflect((ftxui *)v5, (ftxui::Box *)(a2 + 40));
ftxui::operator|(a1, &v4, (long long)v5);
if ( v6 )
v6(v5, v5, 3LL);
if ( *((_QWORD *)&v4 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v4 + 1));
return a1;
}
| Render:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001271c2
MOV byte ptr [RSP + 0x7],AL
CMP qword ptr [R14 + 0x48],0x0
JZ 0x0012cd28
LEA RSI,[R14 + 0x38]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL qword ptr [R14 + 0x50]
ADD R14,0x28
LAB_0012ccd6:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x00138cb8
LAB_0012cce3:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00125a96
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0012cd0e
LAB_0012ccff:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0012cd0e:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0012cd1d
CALL 0x00114af8
LAB_0012cd1d:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_0012cd28:
CALL 0x0010b140
|
/* Render() */
void ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>(bool)>)::Impl::Render(void)
{
ComponentBase *in_RSI;
int1 local_41;
int1 local_40 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
ftxui local_30 [16];
code *local_20;
local_41 = ComponentBase::Focused(in_RSI);
if (*(long *)(in_RSI + 0x48) != 0) {
(**(code **)(in_RSI + 0x50))(local_40,in_RSI + 0x38,&local_41);
/* try { // try from 0012ccd6 to 0012cce2 has its CatchHandler @ 0012cd55 */
reflect(local_30,in_RSI + 0x28);
/* try { // try from 0012cce3 to 0012ccf4 has its CatchHandler @ 0012cd2f */
operator|();
if (local_20 != (code *)0x0) {
/* try { // try from 0012ccff to 0012cd0d has its CatchHandler @ 0012cd2d */
(*local_20)(local_30,local_30,3);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
return;
}
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
| |
23,092 | ggml_rope_multi | ngxson[P]ggml-easy/ggml/src/ggml.c | struct ggml_tensor * ggml_rope_multi(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int sections[4],
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow) {
// Multimodal Rotary Position Embedding
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] * 4 == b->ne[0]); // mrope expecting 4 position ids per token
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
struct ggml_tensor * result = ggml_dup_tensor(ctx, a);
int32_t params[11 + 4] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(¶ms[11], sections, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
} | O0 | c | ggml_rope_multi:
subq $0xa8, %rsp
movl 0xb8(%rsp), %eax
movl 0xb0(%rsp), %eax
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movl %r8d, 0x84(%rsp)
movq %r9, 0x78(%rsp)
movss %xmm0, 0x74(%rsp)
movss %xmm1, 0x70(%rsp)
movss %xmm2, 0x6c(%rsp)
movss %xmm3, 0x68(%rsp)
movss %xmm4, 0x64(%rsp)
movss %xmm5, 0x60(%rsp)
movl 0xb0(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4f53d
movb $0x1, %al
testb $0x1, %al
jne 0x4f55e
jmp 0x4f53d
leaq 0x65073(%rip), %rdi # 0xb45b7
movl $0xe22, %esi # imm = 0xE22
leaq 0x650b2(%rip), %rdx # 0xb4602
leaq 0x65663(%rip), %rcx # 0xb4bba
movb $0x0, %al
callq 0x46780
movq 0x90(%rsp), %rdi
callq 0x46140
testb $0x1, %al
jne 0x4f590
leaq 0x65041(%rip), %rdi # 0xb45b7
movl $0xe24, %esi # imm = 0xE24
leaq 0x65080(%rip), %rdx # 0xb4602
leaq 0x6566b(%rip), %rcx # 0xb4bf4
movb $0x0, %al
callq 0x46780
movq 0x90(%rsp), %rax
cmpl $0x1a, (%rax)
je 0x4f5be
leaq 0x65013(%rip), %rdi # 0xb45b7
movl $0xe25, %esi # imm = 0xE25
leaq 0x65052(%rip), %rdx # 0xb4602
leaq 0x6558b(%rip), %rcx # 0xb4b42
movb $0x0, %al
callq 0x46780
movq 0x98(%rsp), %rax
movq 0x20(%rax), %rax
shlq $0x2, %rax
movq 0x90(%rsp), %rcx
cmpq 0x10(%rcx), %rax
je 0x4f5fd
leaq 0x64fd4(%rip), %rdi # 0xb45b7
movl $0xe26, %esi # imm = 0xE26
leaq 0x65013(%rip), %rdx # 0xb4602
leaq 0x65610(%rip), %rcx # 0xb4c06
movb $0x0, %al
callq 0x46780
cmpq $0x0, 0x88(%rsp)
je 0x4f68c
movq 0x88(%rsp), %rax
cmpl $0x0, (%rax)
je 0x4f63a
leaq 0x64f97(%rip), %rdi # 0xb45b7
movl $0xe29, %esi # imm = 0xE29
leaq 0x64fd6(%rip), %rdx # 0xb4602
leaq 0x6636a(%rip), %rcx # 0xb599d
movb $0x0, %al
callq 0x46780
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x84(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x4f68a
leaq 0x64f47(%rip), %rdi # 0xb45b7
movl $0xe2a, %esi # imm = 0xE2A
leaq 0x64f86(%rip), %rdx # 0xb4602
leaq 0x6559c(%rip), %rcx # 0xb4c1f
movb $0x0, %al
callq 0x46780
jmp 0x4f68c
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x43c20
movq %rax, 0x58(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0x41fb0
movl 0x84(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0xb0(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0xb8(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x30(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x3c(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x44(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x3c, %edx
callq 0x4c4d0
movq 0x58(%rsp), %rax
movl $0x2d, 0x50(%rax)
movq 0x98(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x90(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x88(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x58(%rsp), %rax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)
| ggml_rope_multi:
sub rsp, 0A8h
mov eax, [rsp+0A8h+arg_8]
mov eax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_20], rcx
mov [rsp+0A8h+var_24], r8d
mov [rsp+0A8h+var_30], r9
movss [rsp+0A8h+var_34], xmm0
movss [rsp+0A8h+var_38], xmm1
movss [rsp+0A8h+var_3C], xmm2
movss [rsp+0A8h+var_40], xmm3
movss [rsp+0A8h+var_44], xmm4
movss [rsp+0A8h+var_48], xmm5
mov eax, [rsp+0A8h+arg_0]
and eax, 1
cmp eax, 0
jnz short loc_4F53D
mov al, 1
test al, 1
jnz short loc_4F55E
jmp short $+2
loc_4F53D:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E22h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov al, 0
call _ggml_abort
loc_4F55E:
mov rdi, [rsp+0A8h+var_18]
call _ggml_is_vector
test al, 1
jnz short loc_4F590
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E24h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov al, 0
call _ggml_abort
loc_4F590:
mov rax, [rsp+0A8h+var_18]
cmp dword ptr [rax], 1Ah
jz short loc_4F5BE
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E25h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov al, 0
call _ggml_abort
loc_4F5BE:
mov rax, [rsp+0A8h+var_10]
mov rax, [rax+20h]
shl rax, 2
mov rcx, [rsp+0A8h+var_18]
cmp rax, [rcx+10h]
jz short loc_4F5FD
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E26h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe24BNe0; "a->ne[2] * 4 == b->ne[0]"
mov al, 0
call _ggml_abort
loc_4F5FD:
cmp [rsp+0A8h+var_20], 0
jz loc_4F68C
mov rax, [rsp+0A8h+var_20]
cmp dword ptr [rax], 0
jz short loc_4F63A
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E29h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov al, 0
call _ggml_abort
loc_4F63A:
mov rax, [rsp+0A8h+var_20]
mov rax, [rax+10h]
mov [rsp+0A8h+var_A0], rax
mov eax, [rsp+0A8h+var_24]
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov rax, [rsp+0A8h+var_A0]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_4F68A
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0E2Ah
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov al, 0
call _ggml_abort
loc_4F68A:
jmp short $+2
loc_4F68C:
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_10]
call _ggml_dup_tensor
mov [rsp+0A8h+var_50], rax
lea rdi, [rsp+0A8h+var_98]
xor esi, esi
mov edx, 3Ch ; '<'
call _memset
mov eax, [rsp+0A8h+var_24]
mov [rsp+0A8h+var_94], eax
mov eax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_90], eax
mov eax, [rsp+0A8h+arg_8]
mov [rsp+0A8h+var_88], eax
mov eax, [rsp+0A8h+var_34]
mov [rsp+0A8h+var_84], eax
mov eax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_80], eax
mov eax, [rsp+0A8h+var_3C]
mov [rsp+0A8h+var_7C], eax
mov eax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_78], eax
mov eax, [rsp+0A8h+var_44]
mov [rsp+0A8h+var_74], eax
mov eax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_70], eax
mov rax, [rsp+0A8h+var_30]
mov rcx, [rax]
mov [rsp+0A8h+var_6C], rcx
mov rax, [rax+8]
mov [rsp+0A8h+var_64], rax
mov rdi, [rsp+0A8h+var_50]
lea rsi, [rsp+0A8h+var_98]
mov edx, 3Ch ; '<'
call ggml_set_op_params
mov rax, [rsp+0A8h+var_50]
mov dword ptr [rax+50h], 2Dh ; '-'
mov rcx, [rsp+0A8h+var_10]
mov rax, [rsp+0A8h+var_50]
mov [rax+98h], rcx
mov rcx, [rsp+0A8h+var_18]
mov rax, [rsp+0A8h+var_50]
mov [rax+0A0h], rcx
mov rcx, [rsp+0A8h+var_20]
mov rax, [rsp+0A8h+var_50]
mov [rax+0A8h], rcx
mov rax, [rsp+0A8h+var_50]
add rsp, 0A8h
retn
| long long ggml_rope_multi(
long long a1,
unsigned int *a2,
_QWORD *a3,
long long a4,
int a5,
long long *a6,
float a7,
float a8,
float a9,
float a10,
float a11,
float a12,
int a13,
int a14)
{
_BYTE v15[4]; // [rsp+10h] [rbp-98h] BYREF
int v16; // [rsp+14h] [rbp-94h]
int v17; // [rsp+18h] [rbp-90h]
int v18; // [rsp+20h] [rbp-88h]
float v19; // [rsp+24h] [rbp-84h]
float v20; // [rsp+28h] [rbp-80h]
float v21; // [rsp+2Ch] [rbp-7Ch]
float v22; // [rsp+30h] [rbp-78h]
float v23; // [rsp+34h] [rbp-74h]
float v24; // [rsp+38h] [rbp-70h]
long long v25; // [rsp+3Ch] [rbp-6Ch]
long long v26; // [rsp+44h] [rbp-64h]
long long v27; // [rsp+58h] [rbp-50h]
float v28; // [rsp+60h] [rbp-48h]
float v29; // [rsp+64h] [rbp-44h]
float v30; // [rsp+68h] [rbp-40h]
float v31; // [rsp+6Ch] [rbp-3Ch]
float v32; // [rsp+70h] [rbp-38h]
float v33; // [rsp+74h] [rbp-34h]
long long *v34; // [rsp+78h] [rbp-30h]
int v35; // [rsp+84h] [rbp-24h]
long long v36; // [rsp+88h] [rbp-20h]
_QWORD *v37; // [rsp+90h] [rbp-18h]
unsigned int *v38; // [rsp+98h] [rbp-10h]
long long v39; // [rsp+A0h] [rbp-8h]
v39 = a1;
v38 = a2;
v37 = a3;
v36 = a4;
v35 = a5;
v34 = a6;
v33 = a7;
v32 = a8;
v31 = a9;
v30 = a10;
v29 = a11;
v28 = a12;
if ( (a13 & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3618,
(long long)"GGML_ASSERT(%s) failed",
"(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"");
if ( !ggml_is_vector(v37) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3620,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_vector(b)");
if ( *(_DWORD *)v37 != 26 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3621,
(long long)"GGML_ASSERT(%s) failed",
"b->type == GGML_TYPE_I32");
if ( 4LL * *((_QWORD *)v38 + 4) != v37[2] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3622,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[2] * 4 == b->ne[0]");
if ( v36 )
{
if ( *(_DWORD *)v36 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3625,
(long long)"GGML_ASSERT(%s) failed",
"c->type == GGML_TYPE_F32");
if ( *(_QWORD *)(v36 + 16) < v35 / 2 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3626,
(long long)"GGML_ASSERT(%s) failed",
"c->ne[0] >= n_dims / 2");
}
v27 = ggml_dup_tensor(v39, v38);
memset(v15, 0LL, 60LL);
v16 = v35;
v17 = a13;
v18 = a14;
v19 = v33;
v20 = v32;
v21 = v31;
v22 = v30;
v23 = v29;
v24 = v28;
v25 = *v34;
v26 = v34[1];
ggml_set_op_params(v27, (long long)v15, 60LL);
*(_DWORD *)(v27 + 80) = 45;
*(_QWORD *)(v27 + 152) = v38;
*(_QWORD *)(v27 + 160) = v37;
*(_QWORD *)(v27 + 168) = v36;
return v27;
}
| ggml_rope_multi:
SUB RSP,0xa8
MOV EAX,dword ptr [RSP + 0xb8]
MOV EAX,dword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x88],RCX
MOV dword ptr [RSP + 0x84],R8D
MOV qword ptr [RSP + 0x78],R9
MOVSS dword ptr [RSP + 0x74],XMM0
MOVSS dword ptr [RSP + 0x70],XMM1
MOVSS dword ptr [RSP + 0x6c],XMM2
MOVSS dword ptr [RSP + 0x68],XMM3
MOVSS dword ptr [RSP + 0x64],XMM4
MOVSS dword ptr [RSP + 0x60],XMM5
MOV EAX,dword ptr [RSP + 0xb0]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0014f53d
MOV AL,0x1
TEST AL,0x1
JNZ 0x0014f55e
JMP 0x0014f53d
LAB_0014f53d:
LEA RDI,[0x1b45b7]
MOV ESI,0xe22
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4bba]
MOV AL,0x0
CALL 0x00146780
LAB_0014f55e:
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x00146140
TEST AL,0x1
JNZ 0x0014f590
LEA RDI,[0x1b45b7]
MOV ESI,0xe24
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4bf4]
MOV AL,0x0
CALL 0x00146780
LAB_0014f590:
MOV RAX,qword ptr [RSP + 0x90]
CMP dword ptr [RAX],0x1a
JZ 0x0014f5be
LEA RDI,[0x1b45b7]
MOV ESI,0xe25
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4b42]
MOV AL,0x0
CALL 0x00146780
LAB_0014f5be:
MOV RAX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RAX + 0x20]
SHL RAX,0x2
MOV RCX,qword ptr [RSP + 0x90]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x0014f5fd
LEA RDI,[0x1b45b7]
MOV ESI,0xe26
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4c06]
MOV AL,0x0
CALL 0x00146780
LAB_0014f5fd:
CMP qword ptr [RSP + 0x88],0x0
JZ 0x0014f68c
MOV RAX,qword ptr [RSP + 0x88]
CMP dword ptr [RAX],0x0
JZ 0x0014f63a
LEA RDI,[0x1b45b7]
MOV ESI,0xe29
LEA RDX,[0x1b4602]
LEA RCX,[0x1b599d]
MOV AL,0x0
CALL 0x00146780
LAB_0014f63a:
MOV RAX,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x84]
MOV ECX,0x2
CDQ
IDIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x0014f68a
LEA RDI,[0x1b45b7]
MOV ESI,0xe2a
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4c1f]
MOV AL,0x0
CALL 0x00146780
LAB_0014f68a:
JMP 0x0014f68c
LAB_0014f68c:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x00143c20
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x10]
XOR ESI,ESI
MOV EDX,0x3c
CALL 0x00141fb0
MOV EAX,dword ptr [RSP + 0x84]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0xb8]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x28],EAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0x2c],EAX
MOV EAX,dword ptr [RSP + 0x68]
MOV dword ptr [RSP + 0x30],EAX
MOV EAX,dword ptr [RSP + 0x64]
MOV dword ptr [RSP + 0x34],EAX
MOV EAX,dword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x38],EAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x3c],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x44],RAX
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x10]
MOV EDX,0x3c
CALL 0x0014c4d0
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x50],0x2d
MOV RCX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0xa8],RCX
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0xa8
RET
|
/* WARNING: Removing unreachable block (ram,0x0014f53b) */
long ggml_rope_multi(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,long param_8,
int *param_9,int *param_10,int param_11,int8 *param_12,uint param_13,
int4 param_14)
{
ulong extraout_RDX;
ulong extraout_RDX_00;
ulong extraout_RDX_01;
ulong uVar1;
ulong extraout_RDX_02;
int1 auVar2 [16];
int1 local_98 [4];
int local_94;
uint local_90;
int4 local_88;
int4 local_84;
int4 local_80;
int4 local_7c;
int4 local_78;
int4 local_74;
int4 local_70;
int8 local_6c;
int8 local_64;
long local_50;
int4 local_48;
int4 local_44;
int4 local_40;
int4 local_3c;
int4 local_38;
int4 local_34;
int8 *local_30;
int local_24;
int *local_20;
int *local_18;
long local_10;
int8 local_8;
local_48 = param_6;
local_44 = param_5;
local_40 = param_4;
local_3c = param_3;
local_38 = param_2;
local_34 = param_1;
local_30 = param_12;
local_24 = param_11;
local_20 = param_10;
local_18 = param_9;
local_10 = param_8;
local_8 = param_7;
if ((param_13 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe22,
"GGML_ASSERT(%s) failed",
"(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"");
}
auVar2 = ggml_is_vector(local_18);
uVar1 = auVar2._8_8_;
if ((auVar2 & (int1 [16])0x1) == (int1 [16])0x0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe24,
"GGML_ASSERT(%s) failed","ggml_is_vector(b)");
uVar1 = extraout_RDX;
}
if (*local_18 != 0x1a) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe25,
"GGML_ASSERT(%s) failed","b->type == GGML_TYPE_I32");
uVar1 = extraout_RDX_00;
}
if (*(long *)(local_10 + 0x20) << 2 != *(long *)(local_18 + 4)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe26,
"GGML_ASSERT(%s) failed","a->ne[2] * 4 == b->ne[0]");
uVar1 = extraout_RDX_01;
}
if (local_20 != (int *)0x0) {
if (*local_20 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe29,
"GGML_ASSERT(%s) failed","c->type == GGML_TYPE_F32");
}
uVar1 = (long)local_24 % 2 & 0xffffffff;
if (*(long *)(local_20 + 4) < (long)(local_24 / 2)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xe2a,
"GGML_ASSERT(%s) failed","c->ne[0] >= n_dims / 2");
uVar1 = extraout_RDX_02;
}
}
local_50 = ggml_dup_tensor(local_8,local_10,uVar1);
memset(local_98,0,0x3c);
local_94 = local_24;
local_90 = param_13;
local_88 = param_14;
local_84 = local_34;
local_80 = local_38;
local_7c = local_3c;
local_78 = local_40;
local_74 = local_44;
local_70 = local_48;
local_6c = *local_30;
local_64 = local_30[1];
ggml_set_op_params(local_50,local_98,0x3c);
*(int4 *)(local_50 + 0x50) = 0x2d;
*(long *)(local_50 + 0x98) = local_10;
*(int **)(local_50 + 0xa0) = local_18;
*(int **)(local_50 + 0xa8) = local_20;
return local_50;
}
| |
23,093 | ggml_rope_multi | ngxson[P]ggml-easy/ggml/src/ggml.c | struct ggml_tensor * ggml_rope_multi(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int sections[4],
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow) {
// Multimodal Rotary Position Embedding
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] * 4 == b->ne[0]); // mrope expecting 4 position ids per token
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
struct ggml_tensor * result = ggml_dup_tensor(ctx, a);
int32_t params[11 + 4] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(¶ms[11], sections, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
} | O2 | c | ggml_rope_multi:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movss %xmm5, 0x1c(%rsp)
movss %xmm4, 0x18(%rsp)
movss %xmm3, 0x14(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movl 0xa0(%rsp), %eax
testb $0x1, %al
jne 0x22a90
movq %r9, %r12
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq %rdx, %rdi
callq 0x1e4b0
testb %al, %al
je 0x22aaf
cmpl $0x1a, (%r14)
jne 0x22acb
movq 0x20(%r15), %rax
shlq $0x2, %rax
cmpq 0x10(%r14), %rax
jne 0x22ae7
testq %rbx, %rbx
je 0x229db
cmpl $0x0, (%rbx)
jne 0x22b03
movq 0x10(%rbx), %rcx
pushq $0x2
popq %rsi
movl %ebp, %eax
cltd
idivl %esi
cltq
cmpq %rax, %rcx
jl 0x22b1f
movq %r13, %rdi
movq %r15, %rsi
callq 0x1d660
movq %rax, %r13
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movl %ebp, 0x4(%rsi)
movl 0xa0(%rsp), %eax
movl %eax, 0x8(%rsi)
movl 0xa8(%rsp), %eax
movl %eax, 0x10(%rsi)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x14(%rsi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x18(%rsi)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x1c(%rsi)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x20(%rsi)
movss 0x18(%rsp), %xmm0
movss %xmm0, 0x24(%rsi)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x28(%rsi)
movups (%r12), %xmm0
movups %xmm0, 0x2c(%rsi)
pushq $0x3c
popq %rdx
movq %r13, %rdi
callq 0x20fbc
movl $0x2d, 0x50(%r13)
movq %r15, 0x98(%r13)
movq %r14, 0xa0(%r13)
movq %rbx, 0xa8(%r13)
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28aec(%rip), %rdi # 0x4b583
leaq 0x28b30(%rip), %rdx # 0x4b5ce
leaq 0x290bc(%rip), %rcx # 0x4bb61
movl $0xe22, %esi # imm = 0xE22
jmp 0x22b39
leaq 0x28acd(%rip), %rdi # 0x4b583
leaq 0x28b11(%rip), %rdx # 0x4b5ce
leaq 0x290d7(%rip), %rcx # 0x4bb9b
movl $0xe24, %esi # imm = 0xE24
jmp 0x22b39
leaq 0x28ab1(%rip), %rdi # 0x4b583
leaq 0x28af5(%rip), %rdx # 0x4b5ce
leaq 0x2902e(%rip), %rcx # 0x4bb0e
movl $0xe25, %esi # imm = 0xE25
jmp 0x22b39
leaq 0x28a95(%rip), %rdi # 0x4b583
leaq 0x28ad9(%rip), %rdx # 0x4b5ce
leaq 0x290b1(%rip), %rcx # 0x4bbad
movl $0xe26, %esi # imm = 0xE26
jmp 0x22b39
leaq 0x28a79(%rip), %rdi # 0x4b583
leaq 0x28abd(%rip), %rdx # 0x4b5ce
leaq 0x29cd0(%rip), %rcx # 0x4c7e8
movl $0xe29, %esi # imm = 0xE29
jmp 0x22b39
leaq 0x28a5d(%rip), %rdi # 0x4b583
leaq 0x28aa1(%rip), %rdx # 0x4b5ce
leaq 0x29092(%rip), %rcx # 0x4bbc6
movl $0xe2a, %esi # imm = 0xE2A
xorl %eax, %eax
callq 0x1e770
| ggml_rope_multi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
movss [rsp+98h+var_7C], xmm5
movss [rsp+98h+var_80], xmm4
movss [rsp+98h+var_84], xmm3
movss [rsp+98h+var_88], xmm2
movss [rsp+98h+var_8C], xmm1
movss [rsp+98h+var_90], xmm0
mov eax, [rsp+98h+arg_0]
test al, 1
jnz loc_22A90
mov r12, r9
mov ebp, r8d
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov rdi, rdx
call _ggml_is_vector
test al, al
jz loc_22AAF
cmp dword ptr [r14], 1Ah
jnz loc_22ACB
mov rax, [r15+20h]
shl rax, 2
cmp rax, [r14+10h]
jnz loc_22AE7
test rbx, rbx
jz short loc_229DB
cmp dword ptr [rbx], 0
jnz loc_22B03
mov rcx, [rbx+10h]
push 2
pop rsi
mov eax, ebp
cdq
idiv esi
cdqe
cmp rcx, rax
jl loc_22B1F
loc_229DB:
mov rdi, r13
mov rsi, r15
call _ggml_dup_tensor
mov r13, rax
xorps xmm0, xmm0
lea rsi, [rsp+98h+var_78]
movaps xmmword ptr [rsi], xmm0
mov [rsi+4], ebp
mov eax, [rsp+98h+arg_0]
mov [rsi+8], eax
mov eax, [rsp+98h+arg_8]
mov [rsi+10h], eax
movss xmm0, [rsp+98h+var_90]
movss dword ptr [rsi+14h], xmm0
movss xmm0, [rsp+98h+var_8C]
movss dword ptr [rsi+18h], xmm0
movss xmm0, [rsp+98h+var_88]
movss dword ptr [rsi+1Ch], xmm0
movss xmm0, [rsp+98h+var_84]
movss dword ptr [rsi+20h], xmm0
movss xmm0, [rsp+98h+var_80]
movss dword ptr [rsi+24h], xmm0
movss xmm0, [rsp+98h+var_7C]
movss dword ptr [rsi+28h], xmm0
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rsi+2Ch], xmm0
push 3Ch ; '<'
pop rdx
mov rdi, r13
call ggml_set_op_params
mov dword ptr [r13+50h], 2Dh ; '-'
mov [r13+98h], r15
mov [r13+0A0h], r14
mov [r13+0A8h], rbx
mov rax, r13
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22A90:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov esi, 0E22h
jmp loc_22B39
loc_22AAF:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov esi, 0E24h
jmp short loc_22B39
loc_22ACB:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov esi, 0E25h
jmp short loc_22B39
loc_22AE7:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe24BNe0; "a->ne[2] * 4 == b->ne[0]"
mov esi, 0E26h
jmp short loc_22B39
loc_22B03:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov esi, 0E29h
jmp short loc_22B39
loc_22B1F:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov esi, 0E2Ah
loc_22B39:
xor eax, eax
call _ggml_abort
| long long ggml_rope_multi(
long long a1,
long long a2,
_QWORD *a3,
long long a4,
long long a5,
__m128 *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
unsigned int a15,
int a16)
{
signed int v17; // ebp
long long v20; // r13
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
char *v27; // rcx
int v28; // esi
char v29; // [rsp+0h] [rbp-98h]
__int32 v30; // [rsp+18h] [rbp-80h]
__int32 v31; // [rsp+1Ch] [rbp-7Ch]
__int128 v32; // [rsp+20h] [rbp-78h] BYREF
int v33; // [rsp+30h] [rbp-68h]
__int32 v34; // [rsp+34h] [rbp-64h]
__int32 v35; // [rsp+38h] [rbp-60h]
__int32 v36; // [rsp+3Ch] [rbp-5Ch]
__int32 v37; // [rsp+40h] [rbp-58h]
__int32 v38; // [rsp+44h] [rbp-54h]
__int32 v39; // [rsp+48h] [rbp-50h]
__m128 v40; // [rsp+4Ch] [rbp-4Ch]
v31 = a12.m128_i32[0];
v30 = a11.m128_i32[0];
if ( (a15 & 1) != 0 )
{
v27 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
v28 = 3618;
goto LABEL_15;
}
v17 = a5;
if ( !ggml_is_vector(a3) )
{
v27 = "ggml_is_vector(b)";
v28 = 3620;
goto LABEL_15;
}
if ( *(_DWORD *)a3 != 26 )
{
v27 = "b->type == GGML_TYPE_I32";
v28 = 3621;
goto LABEL_15;
}
if ( 4LL * *(_QWORD *)(a2 + 32) != a3[2] )
{
v27 = "a->ne[2] * 4 == b->ne[0]";
v28 = 3622;
goto LABEL_15;
}
if ( a4 )
{
if ( *(_DWORD *)a4 )
{
v27 = "c->type == GGML_TYPE_F32";
v28 = 3625;
}
else
{
if ( *(_QWORD *)(a4 + 16) >= v17 / 2 )
goto LABEL_8;
v27 = "c->ne[0] >= n_dims / 2";
v28 = 3626;
}
LABEL_15:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v28,
(long long)"GGML_ASSERT(%s) failed",
(long long)v27,
a5,
(long long)a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v29);
}
LABEL_8:
v20 = ggml_dup_tensor(a1, (unsigned int *)a2);
v32 = 0LL;
*(_QWORD *)((char *)&v32 + 4) = __PAIR64__(a15, v17);
v33 = a16;
v34 = a7.m128_i32[0];
v35 = a8.m128_i32[0];
v36 = a9.m128_i32[0];
v37 = a10.m128_i32[0];
v38 = v30;
v39 = v31;
v40 = *a6;
ggml_set_op_params(v20, (long long)&v32, 60LL, v40, a8, a9, a10, v24, v25, a13, a14, v21, v22, v23);
*(_DWORD *)(v20 + 80) = 45;
*(_QWORD *)(v20 + 152) = a2;
*(_QWORD *)(v20 + 160) = a3;
*(_QWORD *)(v20 + 168) = a4;
return v20;
}
| ggml_rope_multi:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOVSS dword ptr [RSP + 0x1c],XMM5
MOVSS dword ptr [RSP + 0x18],XMM4
MOVSS dword ptr [RSP + 0x14],XMM3
MOVSS dword ptr [RSP + 0x10],XMM2
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x8],XMM0
MOV EAX,dword ptr [RSP + 0xa0]
TEST AL,0x1
JNZ 0x00122a90
MOV R12,R9
MOV EBP,R8D
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV RDI,RDX
CALL 0x0011e4b0
TEST AL,AL
JZ 0x00122aaf
CMP dword ptr [R14],0x1a
JNZ 0x00122acb
MOV RAX,qword ptr [R15 + 0x20]
SHL RAX,0x2
CMP RAX,qword ptr [R14 + 0x10]
JNZ 0x00122ae7
TEST RBX,RBX
JZ 0x001229db
CMP dword ptr [RBX],0x0
JNZ 0x00122b03
MOV RCX,qword ptr [RBX + 0x10]
PUSH 0x2
POP RSI
MOV EAX,EBP
CDQ
IDIV ESI
CDQE
CMP RCX,RAX
JL 0x00122b1f
LAB_001229db:
MOV RDI,R13
MOV RSI,R15
CALL 0x0011d660
MOV R13,RAX
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x20]
MOVAPS xmmword ptr [RSI],XMM0
MOV dword ptr [RSI + 0x4],EBP
MOV EAX,dword ptr [RSP + 0xa0]
MOV dword ptr [RSI + 0x8],EAX
MOV EAX,dword ptr [RSP + 0xa8]
MOV dword ptr [RSI + 0x10],EAX
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x14],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI + 0x18],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RSI + 0x1c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [RSI + 0x20],XMM0
MOVSS XMM0,dword ptr [RSP + 0x18]
MOVSS dword ptr [RSI + 0x24],XMM0
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS dword ptr [RSI + 0x28],XMM0
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RSI + 0x2c],XMM0
PUSH 0x3c
POP RDX
MOV RDI,R13
CALL 0x00120fbc
MOV dword ptr [R13 + 0x50],0x2d
MOV qword ptr [R13 + 0x98],R15
MOV qword ptr [R13 + 0xa0],R14
MOV qword ptr [R13 + 0xa8],RBX
MOV RAX,R13
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122a90:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bb61]
MOV ESI,0xe22
JMP 0x00122b39
LAB_00122aaf:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bb9b]
MOV ESI,0xe24
JMP 0x00122b39
LAB_00122acb:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bb0e]
MOV ESI,0xe25
JMP 0x00122b39
LAB_00122ae7:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bbad]
MOV ESI,0xe26
JMP 0x00122b39
LAB_00122b03:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c7e8]
MOV ESI,0xe29
JMP 0x00122b39
LAB_00122b1f:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14bbc6]
MOV ESI,0xe2a
LAB_00122b39:
XOR EAX,EAX
CALL 0x0011e770
|
long ggml_rope_multi(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,long param_8,
int *param_9,int *param_10,uint param_11,int4 *param_12,uint param_13,
int4 param_14)
{
char cVar1;
long lVar2;
char *pcVar3;
ulong extraout_RDX;
ulong uVar4;
int8 uVar5;
long local_78;
ulong uStack_70;
int4 local_68;
int4 local_64;
int4 local_60;
int4 local_5c;
int4 local_58;
int4 local_54;
int4 local_50;
int4 local_4c;
int4 uStack_48;
int4 uStack_44;
int4 uStack_40;
if ((param_13 & 1) == 0) {
cVar1 = ggml_is_vector(param_9);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_vector(b)";
uVar5 = 0xe24;
}
else if (*param_9 == 0x1a) {
if (*(long *)(param_8 + 0x20) << 2 == *(long *)(param_9 + 4)) {
uVar4 = extraout_RDX;
if (param_10 == (int *)0x0) {
LAB_001229db:
lVar2 = ggml_dup_tensor(param_7,param_8,uVar4);
local_78 = (ulong)param_11 << 0x20;
uStack_70 = (ulong)param_13;
local_68 = param_14;
local_4c = *param_12;
uStack_48 = param_12[1];
uStack_44 = param_12[2];
uStack_40 = param_12[3];
local_64 = param_1;
local_60 = param_2;
local_5c = param_3;
local_58 = param_4;
local_54 = param_5;
local_50 = param_6;
ggml_set_op_params(lVar2,&local_78,0x3c);
*(int4 *)(lVar2 + 0x50) = 0x2d;
*(long *)(lVar2 + 0x98) = param_8;
*(int **)(lVar2 + 0xa0) = param_9;
*(int **)(lVar2 + 0xa8) = param_10;
return lVar2;
}
if (*param_10 == 0) {
uVar4 = (long)(int)param_11 % 2 & 0xffffffff;
if ((long)((int)param_11 / 2) <= *(long *)(param_10 + 4)) goto LAB_001229db;
pcVar3 = "c->ne[0] >= n_dims / 2";
uVar5 = 0xe2a;
}
else {
pcVar3 = "c->type == GGML_TYPE_F32";
uVar5 = 0xe29;
}
}
else {
pcVar3 = "a->ne[2] * 4 == b->ne[0]";
uVar5 = 0xe26;
}
}
else {
pcVar3 = "b->type == GGML_TYPE_I32";
uVar5 = 0xe25;
}
}
else {
pcVar3 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
uVar5 = 0xe22;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar5,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
23,094 | testing::internal::posix::IsATTY(int) | seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | inline int IsATTY(int fd) {
// DoIsATTY might change errno (for example ENOTTY in case you redirect stdout
// to a file on Linux), which is unexpected, so save the previous value, and
// restore it after the call.
int savedErrno = errno;
int isAttyValue = DoIsATTY(fd);
errno = savedErrno;
return isAttyValue;
} | O2 | c | testing::internal::posix::IsATTY(int):
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x9060
movq %rax, %r14
movl (%rax), %ebp
movl %ebx, %edi
callq 0x99c0
movl %ebp, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
| _ZN7testing8internal5posix6IsATTYEi:
push rbp
push r14
push rbx
mov ebx, edi
call ___errno_location
mov r14, rax
mov ebp, [rax]
mov edi, ebx
call _isatty
mov [r14], ebp
pop rbx
pop r14
pop rbp
retn
| long long testing::internal::posix::IsATTY(testing::internal::posix *this, long long a2)
{
int *v2; // r14
int v3; // ebp
long long result; // rax
v2 = (int *)__errno_location(this, a2);
v3 = *v2;
result = isatty((unsigned int)this);
*v2 = v3;
return result;
}
| IsATTY:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,EDI
CALL 0x00109060
MOV R14,RAX
MOV EBP,dword ptr [RAX]
MOV EDI,EBX
CALL 0x001099c0
MOV dword ptr [R14],EBP
POP RBX
POP R14
POP RBP
RET
|
/* testing::internal::posix::IsATTY(int) */
void testing::internal::posix::IsATTY(int param_1)
{
int iVar1;
int *piVar2;
piVar2 = __errno_location();
iVar1 = *piVar2;
isatty(param_1);
*piVar2 = iVar1;
return;
}
| |
23,095 | lunasvg::FontFaceCache::getFontFace(std::basic_string_view<char, std::char_traits<char>> const&, bool, bool) | dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp | FontFace FontFaceCache::getFontFace(const std::string_view& family, bool bold, bool italic)
{
auto it = m_table.find(family);
if(it == m_table.end()) {
return FontFace();
}
auto select = [bold, italic](const FontFaceEntry& a, const FontFaceEntry& b) {
if(std::get<2>(a).isNull())
return b;
if(std::get<2>(b).isNull())
return a;
int aScore = (bold == std::get<0>(a)) + (italic == std::get<1>(a));
int bScore = (bold == std::get<0>(b)) + (italic == std::get<1>(b));
return aScore > bScore ? a : b;
};
FontFaceEntry entry;
for(const auto& item : it->second) {
entry = select(entry, item);
}
return std::get<2>(entry);
} | O1 | cpp | lunasvg::FontFaceCache::getFontFace(std::basic_string_view<char, std::char_traits<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xe938
addq $0x8, %r15
cmpq %r15, %rax
je 0xd600
movq %rbx, 0x18(%rsp)
movq 0x40(%rax), %r13
movq 0x48(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %r13
je 0xd609
leaq 0x9(%r13), %rbp
xorl %r15d, %r15d
movq $0x0, (%rsp)
movq $0x0, 0x10(%rsp)
movq -0x9(%rbp), %rdi
testq %r15, %r15
je 0xd5ab
testq %rdi, %rdi
je 0xd5c7
xorl %eax, %eax
movl 0x8(%rsp), %edx
cmpb %dl, 0x10(%rsp)
sete %al
xorl %r14d, %r14d
movl 0xc(%rsp), %ecx
cmpb %cl, (%rsp)
sete %r14b
addl %eax, %r14d
xorl %eax, %eax
cmpb %dl, (%rbp)
sete %al
xorl %ebx, %ebx
cmpb %cl, -0x1(%rbp)
sete %bl
addl %eax, %ebx
cmpl %ebx, %r14d
cmovaq %r15, %rdi
callq 0x24ea8
movq %rax, %r12
cmpl %ebx, %r14d
ja 0xd5a1
movb -0x1(%rbp), %al
movq %rax, (%rsp)
movq %rbp, %rax
cmpl %ebx, %r14d
jbe 0xd5be
jmp 0xd5d2
callq 0x24ea8
movq %rax, %r12
movb -0x1(%rbp), %al
movq %rax, (%rsp)
leaq 0x9(%r13), %rax
movb (%rax), %al
movq %rax, 0x10(%rsp)
jmp 0xd5d2
movq %r15, %rdi
callq 0x24ea8
movq %rax, %r12
movq %r15, %rdi
callq 0x24eb6
xorl %edi, %edi
callq 0x24eb6
addq $0x10, %r13
leaq 0x10(%rbp), %rax
addq $0x7, %rbp
movq %r12, %r15
cmpq 0x20(%rsp), %rbp
movq %rax, %rbp
jne 0xd548
jmp 0xd60c
movq $0x0, (%rbx)
jmp 0xd624
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x24ea8
movq 0x18(%rsp), %rbx
movq %rax, (%rbx)
movq %r12, %rdi
callq 0x24eb6
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd657
movq %rax, %rbx
movq %r12, %r15
jmp 0xd643
movq %rax, %rbx
movq %r15, %rdi
callq 0x24eb6
movq %rbx, %rdi
callq 0xa5c0
jmp 0xd657
jmp 0xd657
movq %rax, %rdi
callq 0xc48f
nop
| _ZN7lunasvg13FontFaceCache11getFontFaceERKSt17basic_string_viewIcSt11char_traitsIcEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_4C], r8d
mov [rsp+58h+var_50], ecx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorISt5tupleIJbbN7lunasvg8FontFaceEEESaISC_EEESt10_Select1stISF_ESt4lessIvESaISF_EE10_M_find_trISt17basic_string_viewIcS3_EvEESt23_Rb_tree_const_iteratorISF_ERKT_; std::_Rb_tree<std::string,std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>,std::_Select1st<std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::less<void>,std::allocator<std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>>>::_M_find_tr<std::string_view,void>(std::string_view const&)
add r15, 8
cmp rax, r15
jz loc_D600
mov [rsp+58h+var_40], rbx
mov r13, [rax+40h]
mov rax, [rax+48h]
mov [rsp+58h+var_38], rax
cmp r13, rax
jz loc_D609
lea rbp, [r13+9]
xor r15d, r15d
mov [rsp+58h+var_58], 0
mov [rsp+58h+var_48], 0
loc_D548:
mov rdi, [rbp-9]
test r15, r15
jz short loc_D5AB
test rdi, rdi
jz short loc_D5C7
xor eax, eax
mov edx, [rsp+58h+var_50]
cmp byte ptr [rsp+58h+var_48], dl
setz al
xor r14d, r14d
mov ecx, [rsp+58h+var_4C]
cmp byte ptr [rsp+58h+var_58], cl
setz r14b
add r14d, eax
xor eax, eax
cmp [rbp+0], dl
setz al
xor ebx, ebx
cmp [rbp-1], cl
setz bl
add ebx, eax
cmp r14d, ebx
cmova rdi, r15
call plutovg_font_face_reference
mov r12, rax
cmp r14d, ebx
ja short loc_D5A1
mov al, [rbp-1]
mov [rsp+58h+var_58], rax
loc_D5A1:
mov rax, rbp
cmp r14d, ebx
jbe short loc_D5BE
jmp short loc_D5D2
loc_D5AB:
call plutovg_font_face_reference
mov r12, rax
mov al, [rbp-1]
mov [rsp+58h+var_58], rax
lea rax, [r13+9]
loc_D5BE:
mov al, [rax]
mov [rsp+58h+var_48], rax
jmp short loc_D5D2
loc_D5C7:
mov rdi, r15
call plutovg_font_face_reference
mov r12, rax
loc_D5D2:
mov rdi, r15
call plutovg_font_face_destroy
xor edi, edi
call plutovg_font_face_destroy
add r13, 10h
lea rax, [rbp+10h]
add rbp, 7
mov r15, r12
cmp rbp, [rsp+58h+var_38]
mov rbp, rax
jnz loc_D548
jmp short loc_D60C
loc_D600:
mov qword ptr [rbx], 0
jmp short loc_D624
loc_D609:
xor r12d, r12d
loc_D60C:
mov rdi, r12
call plutovg_font_face_reference
mov rbx, [rsp+58h+var_40]
mov [rbx], rax
mov rdi, r12
call plutovg_font_face_destroy
loc_D624:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_D657
mov rbx, rax
mov r15, r12
jmp short loc_D643
mov rbx, rax
loc_D643:
mov rdi, r15
call plutovg_font_face_destroy
mov rdi, rbx
call __Unwind_Resume
jmp short loc_D657
jmp short $+2
loc_D657:
mov rdi, rax
call __clang_call_terminate
| _QWORD * lunasvg::FontFaceCache::getFontFace(
_QWORD *a1,
long long a2,
long long a3,
unsigned __int8 a4,
unsigned __int8 a5)
{
_QWORD *v5; // rbx
long long v6; // rax
char *v7; // r13
char *v8; // rbp
long long v9; // r15
long long v10; // rdi
unsigned int v11; // r14d
unsigned int v12; // ebx
long long v13; // r12
char *v14; // rax
bool v15; // zf
char v17; // [rsp+0h] [rbp-58h]
char v20; // [rsp+10h] [rbp-48h]
char *v22; // [rsp+20h] [rbp-38h]
v5 = a1;
v6 = std::_Rb_tree<std::string,std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>,std::_Select1st<std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::less<void>,std::allocator<std::pair<std::string const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>>>>>::_M_find_tr<std::string_view,void>(
a2,
a3);
if ( v6 == a2 + 8 )
{
*a1 = 0LL;
}
else
{
v7 = *(char **)(v6 + 64);
v22 = *(char **)(v6 + 72);
if ( v7 != v22 )
{
v8 = v7 + 9;
v9 = 0LL;
v17 = 0;
v20 = 0;
while ( 1 )
{
v10 = *(_QWORD *)(v8 - 9);
if ( v9 )
{
if ( !v10 )
{
v13 = plutovg_font_face_reference(v9);
goto LABEL_15;
}
v11 = (v20 == (char)a4) + (v17 == (char)a5);
v12 = (*v8 == (char)a4) + (*(v8 - 1) == (char)a5);
if ( v11 > v12 )
v10 = v9;
v13 = plutovg_font_face_reference(v10);
if ( v11 <= v12 )
v17 = *(v8 - 1);
v14 = v8;
if ( v11 > v12 )
goto LABEL_15;
}
else
{
v13 = plutovg_font_face_reference(v10);
v17 = *(v8 - 1);
v14 = v7 + 9;
}
v20 = *v14;
LABEL_15:
plutovg_font_face_destroy(v9);
plutovg_font_face_destroy(0LL);
v7 += 16;
v9 = v13;
v15 = v8 + 7 == v22;
v8 += 16;
if ( v15 )
goto LABEL_19;
}
}
v13 = 0LL;
LABEL_19:
v5 = a1;
*a1 = plutovg_font_face_reference(v13);
plutovg_font_face_destroy(v13);
}
return v5;
}
| getFontFace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RSP + 0xc],R8D
MOV dword ptr [RSP + 0x8],ECX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0010e938
ADD R15,0x8
CMP RAX,R15
JZ 0x0010d600
MOV qword ptr [RSP + 0x18],RBX
MOV R13,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x20],RAX
CMP R13,RAX
JZ 0x0010d609
LEA RBP,[R13 + 0x9]
XOR R15D,R15D
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x10],0x0
LAB_0010d548:
MOV RDI,qword ptr [RBP + -0x9]
TEST R15,R15
JZ 0x0010d5ab
TEST RDI,RDI
JZ 0x0010d5c7
XOR EAX,EAX
MOV EDX,dword ptr [RSP + 0x8]
CMP byte ptr [RSP + 0x10],DL
SETZ AL
XOR R14D,R14D
MOV ECX,dword ptr [RSP + 0xc]
CMP byte ptr [RSP],CL
SETZ R14B
ADD R14D,EAX
XOR EAX,EAX
CMP byte ptr [RBP],DL
SETZ AL
XOR EBX,EBX
CMP byte ptr [RBP + -0x1],CL
SETZ BL
ADD EBX,EAX
CMP R14D,EBX
CMOVA RDI,R15
LAB_0010d58d:
CALL 0x00124ea8
MOV R12,RAX
CMP R14D,EBX
JA 0x0010d5a1
MOV AL,byte ptr [RBP + -0x1]
MOV qword ptr [RSP],RAX
LAB_0010d5a1:
MOV RAX,RBP
CMP R14D,EBX
JBE 0x0010d5be
JMP 0x0010d5d2
LAB_0010d5ab:
CALL 0x00124ea8
MOV R12,RAX
MOV AL,byte ptr [RBP + -0x1]
MOV qword ptr [RSP],RAX
LEA RAX,[R13 + 0x9]
LAB_0010d5be:
MOV AL,byte ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0010d5d2
LAB_0010d5c7:
MOV RDI,R15
CALL 0x00124ea8
MOV R12,RAX
LAB_0010d5d2:
MOV RDI,R15
CALL 0x00124eb6
LAB_0010d5da:
XOR EDI,EDI
CALL 0x00124eb6
ADD R13,0x10
LEA RAX,[RBP + 0x10]
ADD RBP,0x7
MOV R15,R12
CMP RBP,qword ptr [RSP + 0x20]
MOV RBP,RAX
JNZ 0x0010d548
JMP 0x0010d60c
LAB_0010d600:
MOV qword ptr [RBX],0x0
JMP 0x0010d624
LAB_0010d609:
XOR R12D,R12D
LAB_0010d60c:
MOV RDI,R12
CALL 0x00124ea8
MOV RBX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX],RAX
LAB_0010d61c:
MOV RDI,R12
CALL 0x00124eb6
LAB_0010d624:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::FontFaceCache::getFontFace(std::basic_string_view<char, std::char_traits<char> > const&,
bool, bool) */
basic_string_view *
lunasvg::FontFaceCache::getFontFace(basic_string_view *param_1,bool param_2,bool param_3)
{
char cVar1;
char cVar2;
char *pcVar3;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>>
*p_Var4;
long lVar5;
int8 uVar6;
char in_CL;
int7 in_register_00000011;
byte bVar7;
char *pcVar8;
char *pcVar9;
int7 in_register_00000031;
char in_R8B;
char *pcVar10;
byte bVar11;
long lVar12;
p_Var4 = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>>
*)std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>>
::_M_find_tr<std::basic_string_view<char,std::char_traits<char>>,void>
((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>>
*)CONCAT71(in_register_00000031,param_2),
(basic_string_view *)CONCAT71(in_register_00000011,param_3));
if (p_Var4 == (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>,std::_Select1st<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<std::tuple<bool,bool,lunasvg::FontFace>,std::allocator<std::tuple<bool,bool,lunasvg::FontFace>>>>>>
*)CONCAT71(in_register_00000031,param_2) + 8) {
*(int8 *)param_1 = 0;
}
else {
pcVar10 = *(char **)(p_Var4 + 0x40);
pcVar3 = *(char **)(p_Var4 + 0x48);
if (pcVar10 == pcVar3) {
lVar5 = 0;
}
else {
cVar1 = '\0';
cVar2 = '\0';
pcVar8 = pcVar10 + 9;
lVar12 = 0;
do {
if (lVar12 == 0) {
lVar5 = plutovg_font_face_reference();
cVar1 = pcVar8[-1];
pcVar9 = pcVar10 + 9;
LAB_0010d5be:
cVar2 = *pcVar9;
}
else if (*(long *)(pcVar8 + -9) == 0) {
lVar5 = plutovg_font_face_reference(lVar12);
}
else {
bVar11 = (cVar1 == in_R8B) + (cVar2 == in_CL);
bVar7 = (pcVar8[-1] == in_R8B) + (*pcVar8 == in_CL);
lVar5 = *(long *)(pcVar8 + -9);
if (bVar7 < bVar11) {
lVar5 = lVar12;
}
/* try { // try from 0010d58d to 0010d5ce has its CatchHandler @ 0010d640 */
lVar5 = plutovg_font_face_reference(lVar5);
if (bVar11 <= bVar7) {
cVar1 = pcVar8[-1];
pcVar9 = pcVar8;
goto LAB_0010d5be;
}
}
/* try { // try from 0010d5d2 to 0010d5d9 has its CatchHandler @ 0010d655 */
plutovg_font_face_destroy(lVar12);
/* try { // try from 0010d5da to 0010d5e0 has its CatchHandler @ 0010d657 */
plutovg_font_face_destroy(0);
pcVar10 = pcVar10 + 0x10;
pcVar9 = pcVar8 + 7;
pcVar8 = pcVar8 + 0x10;
lVar12 = lVar5;
} while (pcVar9 != pcVar3);
}
/* try { // try from 0010d60c to 0010d613 has its CatchHandler @ 0010d638 */
uVar6 = plutovg_font_face_reference(lVar5);
*(int8 *)param_1 = uVar6;
/* try { // try from 0010d61c to 0010d623 has its CatchHandler @ 0010d636 */
plutovg_font_face_destroy(lVar5);
}
return param_1;
}
| |
23,096 | testing::internal::ColoredPrintf(testing::internal::(anonymous namespace)::GTestColor, char const*, ...) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | static void ColoredPrintf(GTestColor color, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
static const bool in_color_mode =
// We don't condition this on GTEST_HAS_FILE_SYSTEM because we still need
// to be able to detect terminal I/O regardless.
ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
const bool use_color = in_color_mode && (color != GTestColor::kDefault);
if (!use_color) {
vprintf(fmt, args);
va_end(args);
return;
}
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MOBILE) && \
!defined(GTEST_OS_WINDOWS_GAMES) && !defined(GTEST_OS_WINDOWS_PHONE) && \
!defined(GTEST_OS_WINDOWS_RT) && !defined(GTEST_OS_WINDOWS_MINGW)
const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
// Gets the current text color.
CONSOLE_SCREEN_BUFFER_INFO buffer_info;
GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
const WORD old_color_attrs = buffer_info.wAttributes;
const WORD new_color = GetNewColor(color, old_color_attrs);
// We need to flush the stream buffers into the console before each
// SetConsoleTextAttribute call lest it affect the text that is already
// printed but has not yet reached the console.
fflush(stdout);
SetConsoleTextAttribute(stdout_handle, new_color);
vprintf(fmt, args);
fflush(stdout);
// Restores the text color.
SetConsoleTextAttribute(stdout_handle, old_color_attrs);
#else
printf("\033[0;3%sm", GetAnsiColorCode(color));
vprintf(fmt, args);
printf("\033[m"); // Resets the terminal to default.
#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
va_end(args);
} | O1 | cpp | testing::internal::ColoredPrintf(testing::internal::(anonymous namespace)::GTestColor, char const*, ...):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x225e6
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rsp)
movb 0x371cc(%rip), %al # 0x597d8
testb %al, %al
je 0x22673
testl %ebp, %ebp
je 0x22658
cmpb $0x0, 0x371b5(%rip) # 0x597d0
je 0x22658
movslq %ebp, %rax
leaq 0x1f7d1(%rip), %rcx # 0x41df8
movslq -0x4(%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0x21c09(%rip), %rdi # 0x4423f
xorl %eax, %eax
callq 0x8080
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x84f0
leaq 0x21bf9(%rip), %rdi # 0x44248
xorl %eax, %eax
callq 0x8080
jmp 0x22663
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x84f0
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3715e(%rip), %rdi # 0x597d8
callq 0x89e0
testl %eax, %eax
je 0x22610
movq 0x368f6(%rip), %rax # 0x58f80
movq (%rax), %rdi
callq 0x8530
movl %eax, %r14d
callq 0x8070
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x8970
movl %r12d, (%r15)
xorl %edi, %edi
testl %eax, %eax
setne %dil
callq 0x2207d
movb %al, 0x37112(%rip) # 0x597d0
leaq 0x37113(%rip), %rdi # 0x597d8
callq 0x8300
jmp 0x22610
movq %rax, %rbx
leaq 0x370ff(%rip), %rdi # 0x597d8
callq 0x82f0
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0D0h
mov rbx, rsi
mov ebp, edi
lea rsi, [rsp+0F8h+var_D8]; bool
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_225E6
movaps [rsp+0F8h+var_A8], xmm0
movaps [rsp+0F8h+var_98], xmm1
movaps [rsp+0F8h+var_88], xmm2
movaps [rsp+0F8h+var_78], xmm3
movaps [rsp+0F8h+var_68], xmm4
movaps [rsp+0F8h+var_58], xmm5
movaps [rsp+0F8h+var_48], xmm6
movaps [rsp+0F8h+var_38], xmm7
loc_225E6:
mov [rsp+0F8h+var_E8], rsi
lea rax, [rsp+0F8h+arg_0]
mov [rsp+0F8h+var_F0], rax
mov rax, 3000000010h
mov [rsp+0F8h+var_F8], rax
mov al, cs:_ZGVZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode; `guard variable for'testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode
test al, al
jz short loc_22673
loc_22610:
test ebp, ebp
jz short loc_22658
cmp cs:_ZZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode, 0; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode
jz short loc_22658
movsxd rax, ebp
lea rcx, unk_41DF8
movsxd rsi, dword ptr [rcx+rax*4-4]
add rsi, rcx
lea rdi, a03Sm; "\x1B[0;3%sm"
xor eax, eax
call _printf
mov rsi, rsp
mov rdi, rbx
call _vprintf
lea rdi, aM; "\x1B[m"
xor eax, eax
call _printf
jmp short loc_22663
loc_22658:
mov rsi, rsp
mov rdi, rbx
call _vprintf
loc_22663:
add rsp, 0D0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_22673:
lea rdi, _ZGVZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_22610
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fileno
mov r14d, eax
call ___errno_location
mov r15, rax
mov r12d, [rax]
mov edi, r14d
call _isatty
mov [r15], r12d
xor edi, edi
test eax, eax
setnz dil; this
call _ZN7testing8internal14ShouldUseColorEb; testing::internal::ShouldUseColor(bool)
mov cs:_ZZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode, al; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode
lea rdi, _ZGVZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode; __guard *
call ___cxa_guard_release
jmp loc_22610
mov rbx, rax
lea rdi, _ZGVZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKczE13in_color_mode; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::ColoredPrintf(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
unsigned int v20; // r14d
int *v21; // r15
int v22; // r12d
int v23; // eax
long long v24; // [rsp+0h] [rbp-F8h] BYREF
char *v25; // [rsp+8h] [rbp-F0h]
bool *v26; // [rsp+10h] [rbp-E8h]
bool v27[16]; // [rsp+20h] [rbp-D8h] BYREF
long long v28; // [rsp+30h] [rbp-C8h]
long long v29; // [rsp+38h] [rbp-C0h]
long long v30; // [rsp+40h] [rbp-B8h]
long long v31; // [rsp+48h] [rbp-B0h]
__m128 v32; // [rsp+50h] [rbp-A8h]
__m128 v33; // [rsp+60h] [rbp-98h]
__m128 v34; // [rsp+70h] [rbp-88h]
__m128 v35; // [rsp+80h] [rbp-78h]
__m128 v36; // [rsp+90h] [rbp-68h]
__m128 v37; // [rsp+A0h] [rbp-58h]
__m128 v38; // [rsp+B0h] [rbp-48h]
__m128 v39; // [rsp+C0h] [rbp-38h]
v32 = a7;
v33 = a8;
v34 = a9;
v35 = a10;
v36 = a11;
v37 = a12;
v38 = a13;
v39 = a14;
v28 = a3;
v29 = a4;
v30 = a5;
v31 = a6;
v26 = v27;
v25 = &a15;
v24 = 0x3000000010LL;
if ( !(_BYTE)`guard variable for'testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode
&& __cxa_guard_acquire(&`guard variable for'testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode) )
{
v20 = fileno(stdout, v27, v16, v17, v18, v19, v24, v25, v26);
v21 = (int *)__errno_location();
v22 = *v21;
v23 = isatty(v20);
*v21 = v22;
testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode = testing::internal::ShouldUseColor((testing::internal *)(v23 != 0));
__cxa_guard_release(&`guard variable for'testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode);
}
if ( !a1
|| !testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)::in_color_mode )
{
return vprintf(a2, &v24);
}
printf("\x1B[0;3%sm", (const char *)&unk_41DF8 + *((int *)&unk_41DF8 + a1 - 1));
vprintf(a2, &v24);
return printf("\x1B[m");
}
| ColoredPrintf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xd0
MOV RBX,RSI
MOV EBP,EDI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x001225e6
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_001225e6:
MOV qword ptr [RSP + 0x10],RSI
LEA RAX,[RSP + 0x100]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RSP],RAX
MOV AL,byte ptr [0x001597d8]
TEST AL,AL
JZ 0x00122673
LAB_00122610:
TEST EBP,EBP
JZ 0x00122658
CMP byte ptr [0x001597d0],0x0
JZ 0x00122658
MOVSXD RAX,EBP
LEA RCX,[0x141df8]
MOVSXD RSI,dword ptr [RCX + RAX*0x4 + -0x4]
ADD RSI,RCX
LEA RDI,[0x14423f]
XOR EAX,EAX
CALL 0x00108080
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001084f0
LEA RDI,[0x144248]
XOR EAX,EAX
CALL 0x00108080
JMP 0x00122663
LAB_00122658:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001084f0
LAB_00122663:
ADD RSP,0xd0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00122673:
LEA RDI,[0x1597d8]
CALL 0x001089e0
TEST EAX,EAX
JZ 0x00122610
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
CALL 0x00108530
MOV R14D,EAX
CALL 0x00108070
MOV R15,RAX
MOV R12D,dword ptr [RAX]
MOV EDI,R14D
CALL 0x00108970
MOV dword ptr [R15],R12D
XOR EDI,EDI
TEST EAX,EAX
SETNZ DIL
LAB_001226b3:
CALL 0x0012207d
LAB_001226b8:
MOV byte ptr [0x001597d0],AL
LEA RDI,[0x1597d8]
CALL 0x00108300
JMP 0x00122610
|
/* testing::internal::ColoredPrintf(testing::internal::(anonymous namespace)::GTestColor, char
const*, ...) */
void testing::internal::ColoredPrintf
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14,...)
{
char in_AL;
int iVar1;
int iVar2;
int *piVar3;
int8 local_f8;
int1 *local_f0;
int1 *local_e8;
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
local_e8 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_f0 = &stack0x00000008;
local_f8 = 0x3000000010;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
if (ColoredPrintf(testing::internal::(anonymous_namespace)::GTestColor,char_const*,...)::
in_color_mode == '\0') {
iVar1 = __cxa_guard_acquire(&ColoredPrintf(testing::internal::(anonymous_namespace)::GTestColor,char_const*,...)
::in_color_mode);
if (iVar1 != 0) {
iVar2 = fileno(*(FILE **)PTR_stdout_00158f80);
piVar3 = __errno_location();
iVar1 = *piVar3;
iVar2 = isatty(iVar2);
*piVar3 = iVar1;
/* try { // try from 001226b3 to 001226b7 has its CatchHandler @ 001226cf */
ColoredPrintf(testing::internal::(anonymous_namespace)::GTestColor,char_const*,...)::
in_color_mode = ShouldUseColor(iVar2 != 0);
__cxa_guard_release(&ColoredPrintf(testing::internal::(anonymous_namespace)::GTestColor,char_const*,...)
::in_color_mode);
}
}
if ((param_9 == 0) ||
(ColoredPrintf(testing::internal::(anonymous_namespace)::GTestColor,char_const*,...)::
in_color_mode == '\0')) {
vprintf(param_10,&local_f8);
}
else {
printf("\x1b[0;3%sm",&DAT_00141df8 + *(int *)(&DAT_00141df4 + (long)param_9 * 4));
vprintf(param_10,&local_f8);
printf("\x1b[m");
}
return;
}
| |
23,097 | minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | monkey531[P]llama/common/minja.hpp | std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
return match[0].str();
}
it = start;
return "";
} | O3 | cpp | minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0x84302
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x6d587
testb %al, %al
je 0x83577
movq 0x18(%rsp), %rsi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
je 0x8355e
movq (%rax), %r8
cmpq $0x48, %rdx
jne 0x8356f
cmpq %rsi, %r8
jne 0x83577
jmp 0x83565
cmpq %rsi, -0x48(%rax,%rdx)
jne 0x83577
leaq (%rax,%rdx), %rdi
addq $-0x48, %rdi
jmp 0x835b9
movq %rax, %rdi
cmpq %rsi, %r8
je 0x835b9
movq %r12, 0x20(%r14)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x62df8(%rip), %rdx # 0xe6381
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x21af4
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x835aa
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rdi), %r8
subq %rsi, %r8
xorl %esi, %esi
cmpb $0x0, 0x10(%rdi)
cmovneq %r8, %rsi
addq %rsi, 0x20(%r14)
cmpq $0x48, %rdx
leaq -0x48(%rax,%rdx), %rsi
movq %rax, %rdx
cmoveq %rsi, %rdx
cmpq %rcx, %rax
cmoveq %rsi, %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x83603
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x70172
jmp 0x83594
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x83594
jmp 0x8361d
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x83636
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8f0
movq %rbx, %rdi
callq 0x1afd0
| _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
mov rdx, rsp
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
mov rcx, r15
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz short loc_83577
mov rsi, [rsp+48h+var_30]
mov rax, [rsp+48h+var_48]
mov rcx, [rsp+48h+var_40]
mov rdx, rcx
sub rdx, rax
jz short loc_8355E
mov r8, [rax]
cmp rdx, 48h ; 'H'
jnz short loc_8356F
cmp r8, rsi
jnz short loc_83577
jmp short loc_83565
loc_8355E:
cmp [rax+rdx-48h], rsi
jnz short loc_83577
loc_83565:
lea rdi, [rax+rdx]
add rdi, 0FFFFFFFFFFFFFFB8h
jmp short loc_835B9
loc_8356F:
mov rdi, rax
cmp r8, rsi
jz short loc_835B9
loc_83577:
mov [r14+20h], r12
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aTarget+9; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_83594:
mov rdi, [rsp+48h+var_48]; void *
test rdi, rdi
jz short loc_835AA
mov rsi, [rsp+48h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_835AA:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_835B9:
mov r8, [rdi+8]
sub r8, rsi
xor esi, esi
cmp byte ptr [rdi+10h], 0
cmovnz rsi, r8
add [r14+20h], rsi
cmp rdx, 48h ; 'H'
lea rsi, [rax+rdx-48h]
mov rdx, rax
cmovz rdx, rsi
cmp rax, rcx
cmovz rdx, rsi
cmp byte ptr [rdx+10h], 1
jnz short loc_83603
mov rsi, [rdx]
mov rdx, [rdx+8]
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
jmp short loc_83594
loc_83603:
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
jmp loc_83594
jmp short $+2
loc_8361D:
mov rbx, rax
mov rdi, [rsp+0]; void *
test rdi, rdi
jz short loc_83636
mov rsi, [rsp+arg_8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_83636:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v7; // r12
__int128 v8; // kr00_16
long long v9; // rdx
long long v10; // r8
long long v11; // rdi
long long v13; // rsi
bool v14; // zf
long long v15; // rsi
long long v16; // rdx
_BYTE *v17; // rsi
long long v18; // rdx
__int128 v19; // [rsp+0h] [rbp-48h] BYREF
__int128 v20; // [rsp+10h] [rbp-38h]
v7 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v20 = 0LL;
v19 = 0LL;
if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(long long **)&v19,
a3,
0) )
goto LABEL_9;
v8 = v19;
v9 = *((_QWORD *)&v19 + 1) - v19;
if ( *((_QWORD *)&v19 + 1) != (_QWORD)v19 )
{
v10 = *(_QWORD *)v19;
if ( v9 == 72 )
{
if ( v10 == *((_QWORD *)&v20 + 1) )
goto LABEL_7;
}
else
{
v11 = v19;
if ( v10 == *((_QWORD *)&v20 + 1) )
goto LABEL_13;
}
LABEL_9:
*(_QWORD *)(a2 + 32) = v7;
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char const*>(a1, "", (long long)"");
goto LABEL_10;
}
if ( *(_QWORD *)(*((_QWORD *)&v19 + 1) - 72LL) != *((_QWORD *)&v20 + 1) )
goto LABEL_9;
LABEL_7:
v11 = *((_QWORD *)&v19 + 1) - 72LL;
LABEL_13:
v13 = 0LL;
if ( *(_BYTE *)(v11 + 16) )
v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v20 + 1);
*(_QWORD *)(a2 + 32) += v13;
v14 = v9 == 72;
v15 = v8 + v9 - 72;
v16 = v8;
if ( v14 )
v16 = v15;
if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) )
v16 = v15;
if ( *(_BYTE *)(v16 + 16) == 1 )
{
v17 = *(_BYTE **)v16;
v18 = *(_QWORD *)(v16 + 8);
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v17, v18);
}
else
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
LABEL_10:
if ( (_QWORD)v19 )
operator delete((void *)v19, v20 - v19);
return a1;
}
| consumeToken:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x00184302
XORPS XMM0,XMM0
MOV RDX,RSP
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LAB_00183529:
MOV RCX,R15
XOR R8D,R8D
CALL 0x0016d587
TEST AL,AL
JZ 0x00183577
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RCX
SUB RDX,RAX
JZ 0x0018355e
MOV R8,qword ptr [RAX]
CMP RDX,0x48
JNZ 0x0018356f
CMP R8,RSI
JNZ 0x00183577
JMP 0x00183565
LAB_0018355e:
CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI
JNZ 0x00183577
LAB_00183565:
LEA RDI,[RAX + RDX*0x1]
ADD RDI,-0x48
JMP 0x001835b9
LAB_0018356f:
MOV RDI,RAX
CMP R8,RSI
JZ 0x001835b9
LAB_00183577:
MOV qword ptr [R14 + 0x20],R12
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LAB_00183582:
LEA RDX,[0x1e6381]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00121af4
LAB_00183594:
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x001835aa
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x0011a8f0
LAB_001835aa:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001835b9:
MOV R8,qword ptr [RDI + 0x8]
SUB R8,RSI
XOR ESI,ESI
CMP byte ptr [RDI + 0x10],0x0
CMOVNZ RSI,R8
ADD qword ptr [R14 + 0x20],RSI
CMP RDX,0x48
LEA RSI,[RAX + RDX*0x1 + -0x48]
MOV RDX,RAX
CMOVZ RDX,RSI
CMP RAX,RCX
CMOVZ RDX,RSI
CMP byte ptr [RDX + 0x10],0x1
JNZ 0x00183603
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LAB_001835f9:
MOV RDI,RBX
CALL 0x00170172
LAB_00183601:
JMP 0x00183594
LAB_00183603:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
JMP 0x00183594
|
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >
const&, minja::SpaceHandling) */
long * minja::Parser::consumeToken
(long *param_1,Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
bool bVar2;
long lVar3;
long *plVar4;
long lVar5;
long *plVar6;
long *local_48;
long *plStack_40;
long local_38;
long lStack_30;
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_38 = 0;
lStack_30 = 0;
local_48 = (long *)0x0;
plStack_40 = (long *)0x0;
/* try { // try from 00183529 to 00183533 has its CatchHandler @ 0018361d */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48,
param_3,0);
if (bVar2) {
lVar3 = (long)plStack_40 - (long)local_48;
if (lVar3 == 0) {
lVar5 = local_48[-9];
joined_r0x00183563:
if (lVar5 != lStack_30) goto LAB_00183577;
plVar6 = (long *)((long)local_48 + lVar3 + -0x48);
}
else {
lVar5 = *local_48;
if (lVar3 == 0x48) goto joined_r0x00183563;
plVar6 = local_48;
if (lVar5 != lStack_30) goto LAB_00183577;
}
lVar5 = 0;
if ((char)plVar6[2] != '\0') {
lVar5 = plVar6[1] - lStack_30;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar5;
plVar6 = (long *)((long)local_48 + lVar3 + -0x48);
plVar4 = local_48;
if (lVar3 == 0x48) {
plVar4 = plVar6;
}
if (local_48 == plStack_40) {
plVar4 = plVar6;
}
if ((char)plVar4[2] == '\x01') {
lVar3 = *plVar4;
lVar5 = plVar4[1];
*param_1 = (long)(param_1 + 2);
/* try { // try from 001835f9 to 00183600 has its CatchHandler @ 0018361d */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(param_1,lVar3,lVar5);
}
else {
*param_1 = (long)(param_1 + 2);
param_1[1] = 0;
*(int1 *)(param_1 + 2) = 0;
}
}
else {
LAB_00183577:
*(int8 *)(param_2 + 0x20) = uVar1;
*param_1 = (long)(param_1 + 2);
/* try { // try from 00183582 to 00183593 has its CatchHandler @ 0018361b */
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
if (local_48 != (long *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
| |
23,098 | common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
auto schemas = json::array();
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
schemas.push_back({
{"type", "object"},
{"properties", {
{"tool_call_id", {
{"type", "string"},
// Command-R's template expects an integer string.
{"pattern", "^[0-9]{1,10}$"},
}},
{"tool_name", {
{"type", "string"},
{"const", function["name"]},
}},
{"parameters", function["parameters"]},
}},
{"required", json::array({"tool_call_id", "tool_name", "parameters"})},
});
});
auto schema = json {
{"type", "array"},
{"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}},
{"minItems", 1},
};
if (!inputs.parallel_tool_calls) {
schema["maxItems"] = 1;
}
builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\"");
}, grammar_options);
data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false});
data.preserved_tokens = {
"<|START_RESPONSE|>",
"<|END_RESPONSE|>",
"<|START_THINKING|>",
"<|END_THINKING|>",
"<|END_ACTION|>",
};
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_COMMAND_R7B;
return data;
} | O1 | cpp | common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x20(%rdx), %rdi
leaq 0x1e9ea(%rip), %rsi # 0xf35f5
callq 0xa5fcd
movb %al, 0x38(%rbx)
leaq 0x10(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
leaq 0xf2de(%rip), %rax # 0xe3f0a
movq %rax, 0x18(%rsi)
leaq 0xfc4d(%rip), %rax # 0xe4884
movq %rax, 0x10(%rsi)
leaq 0x24ae6(%rip), %rdx # 0xf9728
leaq 0x38(%rsp), %rdi
callq 0xbc26e
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r12
movq %r12, %rsi
callq 0x1ba80
movq (%r12), %rdi
leaq 0x48(%rsp), %r15
cmpq %r15, %rdi
je 0xd4c78
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xd4c91
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x38(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x25b74(%rip), %rsi # 0xfa814
leaq 0x25b7d(%rip), %rdx # 0xfa824
callq 0x22630
leaq 0x40(%rbx), %rdi
leaq 0x38(%rsp), %rsi
movb $0x0, 0x20(%rsi)
callq 0xe8aa2
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0xd4cd5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8c0
leaq 0x38(%rsp), %r12
movq %r15, (%r12)
leaq 0x26005(%rip), %rsi # 0xfacea
leaq 0x26010(%rip), %rdx # 0xfacfc
movq %r12, %rdi
callq 0x22630
leaq 0x58(%rsp), %r12
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x25ff4(%rip), %rsi # 0xfacfd
leaq 0x25ffd(%rip), %rdx # 0xfad0d
movq %r12, %rdi
callq 0x22630
leaq 0x78(%rsp), %r12
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x25fde(%rip), %rsi # 0xfad0e
leaq 0x25fe9(%rip), %rdx # 0xfad20
movq %r12, %rdi
callq 0x22630
leaq 0x98(%rsp), %r12
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x25fc7(%rip), %rsi # 0xfad21
leaq 0x25fd0(%rip), %rdx # 0xfad31
movq %r12, %rdi
callq 0x22630
leaq 0xb8(%rsp), %r12
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x25fae(%rip), %rsi # 0xfad32
leaq 0x25fb5(%rip), %rdx # 0xfad40
movq %r12, %rdi
callq 0x22630
leaq 0x58(%rbx), %rdi
leaq 0xd8(%rsp), %r15
leaq 0x38(%rsp), %rsi
movq %r15, %rdx
callq 0xe8e7c
movq $-0xa0, %r12
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0xd4dc8
movq (%r13), %rsi
incq %rsi
callq 0x1b8c0
addq $-0x20, %r13
addq $0x20, %r12
jne 0xd4db3
movzbl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0xd4dfc
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0xd4e00
leaq 0x10(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x5d92a
jmp 0xd4e0e
testl %eax, %eax
jne 0xd4dec
movb $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0xd8(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %rbp, %rsi
movq %r14, %rdx
callq 0xa268c
leaq 0xe8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x48(%rsp), %r15
callq 0x803b4
movb 0x8(%rbx), %al
leaq 0xe8(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x5de8a
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0xd4e98
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8c0
leaq 0xd8(%rsp), %rdi
callq 0x5de8a
leaq 0x10(%rsp), %rdi
callq 0x5de8a
movl $0xa, (%rbx)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd4f8d
jmp 0xd4fbe
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0xd4ef3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xd4ef3
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0x5de8a
leaq 0x10(%rsp), %rdi
callq 0x5de8a
jmp 0xd4fae
movq %rax, %r14
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x1d82f
movb $0x1, %al
jmp 0xd4f30
jmp 0xd4f2b
jmp 0xd4f2b
jmp 0xd4f2b
jmp 0xd4f2b
movq %rax, %r14
xorl %eax, %eax
leaq 0x38(%rsp), %rcx
cmpq %r12, %rcx
sete %cl
orb %al, %cl
jne 0xd4fae
addq $-0x10, %r12
leaq 0x38(%rsp), %r15
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0xd4f5e
movq (%r12), %rsi
incq %rsi
callq 0x1b8c0
leaq -0x20(%r12), %rax
addq $-0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0xd4f48
jmp 0xd4fae
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0xd4fae
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xd4fae
movq %rax, %r14
jmp 0xd4fae
movq %rax, %r14
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xd4fae
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x7ee4e
movq %r14, %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x21597
| _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r14, rdx
mov rbp, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea rdi, [rdx+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
lea rsi, [rsp+128h+var_118]
xorps xmm0, xmm0
movaps xmmword ptr [rsi], xmm0
movaps xmmword ptr [rsi+10h], xmm0
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+128h+var_F0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r12, [rsp+128h+var_F0]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea r15, [rsp+128h+var_E0]
cmp rdi, r15
jz short loc_D4C78
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D4C78:
mov rax, [rsp+128h+var_108]
test rax, rax
jz short loc_D4C91
lea rdi, [rsp+128h+var_118]
mov rsi, rdi
mov edx, 3
call rax
loc_D4C91:
lea rdi, [rsp+128h+var_F0]
mov [rdi], r15
lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>"
lea rdx, aEndThinkingSta+20h; ""
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 rdi, [rbx+40h]
lea rsi, [rsp+128h+var_F0]
mov byte ptr [rsi+20h], 0
call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&)
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_D4CD5
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D4CD5:
lea r12, [rsp+128h+var_F0]
mov [r12], r15
lea rsi, aStartResponse; "<|START_RESPONSE|>"
lea rdx, aStartResponse+12h; ""
mov rdi, r12
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 r12, [rsp+128h+var_D0]
lea rax, [rsp+128h+var_C0]
mov [rax-10h], rax
lea rsi, aEndResponse; "<|END_RESPONSE|>"
lea rdx, aEndResponse+10h; ""
mov rdi, r12
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 r12, [rsp+128h+var_B0]
lea rax, [rsp+128h+var_A0]
mov [rax-10h], rax
lea rsi, aStartThinking; "<|START_THINKING|>"
lea rdx, aStartThinking+12h; ""
mov rdi, r12
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 r12, [rsp+128h+var_90]
lea rax, [rsp+128h+var_80]
mov [rax-10h], rax
lea rsi, aEndThinking; "<|END_THINKING|>"
lea rdx, aEndThinking+10h; ""
mov rdi, r12
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 r12, [rsp+128h+var_70]
lea r13, [rsp+128h+var_60]
mov [r13-10h], r13
lea rsi, aEndAction; "<|END_ACTION|>"
lea rdx, aEndAction+0Eh; ""
mov rdi, r12
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 rdi, [rbx+58h]
lea r15, [rsp+128h+var_50]
lea rsi, [rsp+128h+var_F0]
mov rdx, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag)
mov r12, 0FFFFFFFFFFFFFF60h
loc_D4DB3:
mov rdi, [r13-10h]; void *
cmp r13, rdi
jz short loc_D4DC8
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D4DC8:
add r13, 0FFFFFFFFFFFFFFE0h
add r12, 20h ; ' '
jnz short loc_D4DB3
movzx eax, byte ptr [r14+10h]
lea ecx, [rax-1]
cmp ecx, 2
jnb short loc_D4DFC
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_D4E00
loc_D4DEC:
lea rsi, [r14+10h]
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_D4E0E
loc_D4DFC:
test eax, eax
jnz short loc_D4DEC
loc_D4E00:
mov [rsp+128h+var_118], 0
mov [rsp+128h+var_110], 0
loc_D4E0E:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+128h+var_50]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+128h+var_128], 1
lea rdi, [rsp+128h+var_F0]
lea rcx, [rsp+128h+var_118]
mov rsi, rbp
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+128h+var_40]
lea rsi, [rsp+128h+var_F0]
lea r15, [rsp+128h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+128h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
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+128h+var_F0]; void *
cmp rdi, r15
jz short loc_D4E98
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D4E98:
lea rdi, [rsp+128h+var_50]
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()
lea rdi, [rsp+128h+var_118]
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 dword ptr [rbx], 0Ah
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_D4F8D
jmp loc_D4FBE
mov r14, rax
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_D4EF3
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D4EF3
mov r14, rax
loc_D4EF3:
lea rdi, [rsp+128h+var_50]
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()
lea rdi, [rsp+128h+var_118]
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()
jmp loc_D4FAE
mov r14, rax
lea rsi, [rsp+128h+var_F0]
mov rdi, r15
call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone]
mov al, 1
jmp short loc_D4F30
jmp short loc_D4F2B
jmp short loc_D4F2B
jmp short loc_D4F2B
jmp short $+2
loc_D4F2B:
mov r14, rax
xor eax, eax
loc_D4F30:
lea rcx, [rsp+128h+var_F0]
cmp rcx, r12
setz cl
or cl, al
jnz short loc_D4FAE
add r12, 0FFFFFFFFFFFFFFF0h
lea r15, [rsp+128h+var_F0]
loc_D4F48:
mov rdi, [r12-10h]; void *
cmp r12, rdi
jz short loc_D4F5E
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D4F5E:
lea rax, [r12-20h]
add r12, 0FFFFFFFFFFFFFFF0h
cmp r12, r15
mov r12, rax
jnz short loc_D4F48
jmp short loc_D4FAE
mov r14, rax
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_D4FAE
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D4FAE
loc_D4F8D:
mov r14, rax
jmp short loc_D4FAE
mov r14, rax
mov rax, [rsp+128h+var_108]
test rax, rax
jz short loc_D4FAE
lea rdi, [rsp+128h+var_118]
mov rsi, rdi
mov edx, 3
call rax
loc_D4FAE:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
loc_D4FBE:
mov rdi, rax
call __clang_call_terminate
| const minja::chat_template * common_chat_params_init_command_r7b(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
long long v5; // rcx
int v6; // r8d
int v7; // r9d
_QWORD *v8; // r13
long long v9; // r12
_QWORD *v10; // rdi
int v11; // r8d
char v12; // al
long long v13; // rax
__int128 v15; // [rsp+10h] [rbp-118h] BYREF
long long ( *v16)(); // [rsp+20h] [rbp-108h]
long long ( *v17)(); // [rsp+28h] [rbp-100h]
void *v18[2]; // [rsp+38h] [rbp-F0h] BYREF
_QWORD v19[2]; // [rsp+48h] [rbp-E0h] BYREF
char *v20; // [rsp+58h] [rbp-D0h] BYREF
char v21; // [rsp+68h] [rbp-C0h] BYREF
char *v22; // [rsp+78h] [rbp-B0h] BYREF
char v23; // [rsp+88h] [rbp-A0h] BYREF
char *v24; // [rsp+98h] [rbp-90h] BYREF
char v25; // [rsp+A8h] [rbp-80h] BYREF
_BYTE *v26; // [rsp+B8h] [rbp-70h] BYREF
_BYTE v27[16]; // [rsp+C8h] [rbp-60h] BYREF
unsigned __int8 v28[8]; // [rsp+D8h] [rbp-50h] BYREF
long long v29; // [rsp+E0h] [rbp-48h]
char v30[8]; // [rsp+E8h] [rbp-40h] BYREF
long long v31; // [rsp+F0h] [rbp-38h]
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v15 = 0LL;
*(_QWORD *)&v15 = a3;
v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11]((long long)v18, (long long)&v15, grammar_options, v5, v6, v7);
std::string::operator=((char *)a1 + 24, v18);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
if ( v16 )
((void ( *)(__int128 *, __int128 *, long long))v16)(&v15, &v15, 3LL);
v18[0] = v19;
std::string::_M_construct<char const*>(v18, "<|START_ACTION|>", (long long)"");
LOBYTE(v20) = 0;
std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
v18[0] = v19;
std::string::_M_construct<char const*>(v18, "<|START_RESPONSE|>", (long long)"");
v20 = &v21;
std::string::_M_construct<char const*>(&v20, "<|END_RESPONSE|>", (long long)"");
v22 = &v23;
std::string::_M_construct<char const*>(&v22, "<|START_THINKING|>", (long long)"");
v24 = &v25;
std::string::_M_construct<char const*>(&v24, "<|END_THINKING|>", (long long)"");
v8 = v27;
v26 = v27;
std::string::_M_construct<char const*>(&v26, "<|END_ACTION|>", (long long)"");
std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v18, v28);
v9 = -160LL;
do
{
v10 = (_QWORD *)*(v8 - 2);
if ( v8 != v10 )
operator delete(v10, *v8 + 1LL);
v8 -= 4;
v9 += 32LL;
}
while ( v9 );
if ( (unsigned int)*(unsigned __int8 *)(a3 + 16) - 1 >= 2 )
{
if ( *(_BYTE *)(a3 + 16) )
goto LABEL_13;
}
else if ( **(_QWORD **)(a3 + 24) != *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LABEL_13:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)&v15,
(unsigned __int8 *)(a3 + 16));
goto LABEL_16;
}
LOBYTE(v15) = 0;
*((_QWORD *)&v15 + 1) = 0LL;
LABEL_16:
v11 = *(unsigned __int8 *)(a3 + 104);
v28[0] = 0;
v29 = 0LL;
minja::chat_template::apply((long long)v18, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v15, v11, v28, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v30);
v12 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v30[0];
v30[0] = v12;
v13 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v31;
v31 = 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(v30);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
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(v28);
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(&v15);
*(_DWORD *)a1 = 10;
return a1;
}
| common_chat_params_init_command_r7b:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R14,RDX
MOV RBP,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA RDI,[RDX + 0x20]
LEA RSI,[0x1f35f5]
CALL 0x001a5fcd
MOV byte ptr [RBX + 0x38],AL
LEA RSI,[RSP + 0x10]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOV qword ptr [RSI],R14
LEA RAX,[0x1e3f0a]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1e4884]
MOV qword ptr [RSI + 0x10],RAX
LAB_001d4c3b:
LEA RDX,[0x1f9728]
LEA RDI,[RSP + 0x38]
CALL 0x001bc26e
LEA RDI,[RBX + 0x18]
LEA R12,[RSP + 0x38]
MOV RSI,R12
CALL 0x0011ba80
MOV RDI,qword ptr [R12]
LEA R15,[RSP + 0x48]
CMP RDI,R15
JZ 0x001d4c78
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011b8c0
LAB_001d4c78:
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x001d4c91
LAB_001d4c82:
LEA RDI,[RSP + 0x10]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d4c91:
LEA RDI,[RSP + 0x38]
MOV qword ptr [RDI],R15
LAB_001d4c99:
LEA RSI,[0x1fa814]
LEA RDX,[0x1fa824]
CALL 0x00122630
LEA RDI,[RBX + 0x40]
LEA RSI,[RSP + 0x38]
MOV byte ptr [RSI + 0x20],0x0
LAB_001d4cb9:
CALL 0x001e8aa2
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x001d4cd5
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011b8c0
LAB_001d4cd5:
LEA R12,[RSP + 0x38]
MOV qword ptr [R12],R15
LAB_001d4cde:
LEA RSI,[0x1facea]
LEA RDX,[0x1facfc]
MOV RDI,R12
CALL 0x00122630
LEA R12,[RSP + 0x58]
LEA RAX,[RSP + 0x68]
MOV qword ptr [RAX + -0x10],RAX
LAB_001d4d02:
LEA RSI,[0x1facfd]
LEA RDX,[0x1fad0d]
MOV RDI,R12
CALL 0x00122630
LEA R12,[RSP + 0x78]
LEA RAX,[RSP + 0x88]
MOV qword ptr [RAX + -0x10],RAX
LAB_001d4d29:
LEA RSI,[0x1fad0e]
LEA RDX,[0x1fad20]
MOV RDI,R12
CALL 0x00122630
LEA R12,[RSP + 0x98]
LEA RAX,[RSP + 0xa8]
MOV qword ptr [RAX + -0x10],RAX
LAB_001d4d53:
LEA RSI,[0x1fad21]
LEA RDX,[0x1fad31]
MOV RDI,R12
CALL 0x00122630
LEA R12,[RSP + 0xb8]
LEA R13,[RSP + 0xc8]
MOV qword ptr [R13 + -0x10],R13
LAB_001d4d7d:
LEA RSI,[0x1fad32]
LEA RDX,[0x1fad40]
MOV RDI,R12
CALL 0x00122630
LEA RDI,[RBX + 0x58]
LEA R15,[RSP + 0xd8]
LAB_001d4d9f:
LEA RSI,[RSP + 0x38]
MOV RDX,R15
CALL 0x001e8e7c
MOV R12,-0xa0
LAB_001d4db3:
MOV RDI,qword ptr [R13 + -0x10]
CMP R13,RDI
JZ 0x001d4dc8
MOV RSI,qword ptr [R13]
INC RSI
CALL 0x0011b8c0
LAB_001d4dc8:
ADD R13,-0x20
ADD R12,0x20
JNZ 0x001d4db3
MOVZX EAX,byte ptr [R14 + 0x10]
LEA ECX,[RAX + -0x1]
CMP ECX,0x2
JNC 0x001d4dfc
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x001d4e00
LAB_001d4dec:
LEA RSI,[R14 + 0x10]
LEA RDI,[RSP + 0x10]
CALL 0x0015d92a
JMP 0x001d4e0e
LAB_001d4dfc:
TEST EAX,EAX
JNZ 0x001d4dec
LAB_001d4e00:
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
LAB_001d4e0e:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0xd8]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_001d4e27:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x10]
MOV RSI,RBP
MOV RDX,R14
CALL 0x001a268c
LAB_001d4e43:
LEA RDI,[RSP + 0xe8]
LEA RSI,[RSP + 0x38]
LEA R15,[RSP + 0x48]
CALL 0x001803b4
LAB_001d4e5a:
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0xe8]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0015de8a
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x001d4e98
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011b8c0
LAB_001d4e98:
LEA RDI,[RSP + 0xd8]
CALL 0x0015de8a
LEA RDI,[RSP + 0x10]
CALL 0x0015de8a
MOV dword ptr [RBX],0xa
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */
chat_template *
common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2)
{
int8 uVar1;
chat_template cVar2;
ulong in_RDX;
long lVar3;
long *plVar4;
ulong local_118 [2];
code *local_108;
code *pcStack_100;
long *local_f0 [2];
long local_e0 [2];
int1 *local_d0 [2];
int1 local_c0 [16];
int1 *local_b0 [2];
int1 local_a0 [16];
int1 *local_90 [2];
int1 local_80 [16];
long *local_70 [2];
long local_60 [2];
data local_50 [8];
int8 local_48;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
cVar2 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar2;
local_118[1] = 0;
pcStack_100 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_108 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 001d4c3b to 001d4c4b has its CatchHandler @ 001d4f92 */
local_118[0] = in_RDX;
build_grammar_abi_cxx11_((function *)local_f0,(common_grammar_options *)local_118);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_f0);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
if (local_108 != (code *)0x0) {
/* try { // try from 001d4c82 to 001d4c90 has its CatchHandler @ 001d4ecf */
(*local_108)(local_118,local_118,3);
}
local_f0[0] = local_e0;
/* try { // try from 001d4c99 to 001d4cab has its CatchHandler @ 001d4f8d */
std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_ACTION|>","");
local_d0[0] = (int1 *)((ulong)local_d0[0] & 0xffffffffffffff00);
/* try { // try from 001d4cb9 to 001d4cbd has its CatchHandler @ 001d4f71 */
std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::
emplace_back<common_grammar_trigger>
((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *)
(param_1 + 0x40),(common_grammar_trigger *)local_f0);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
local_f0[0] = local_e0;
/* try { // try from 001d4cde to 001d4cf3 has its CatchHandler @ 001d4f2b */
std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_RESPONSE|>","");
local_d0[0] = local_c0;
/* try { // try from 001d4d02 to 001d4d17 has its CatchHandler @ 001d4f29 */
std::__cxx11::string::_M_construct<char_const*>(local_d0,"<|END_RESPONSE|>","");
local_b0[0] = local_a0;
/* try { // try from 001d4d29 to 001d4d3e has its CatchHandler @ 001d4f27 */
std::__cxx11::string::_M_construct<char_const*>(local_b0,"<|START_THINKING|>","");
local_90[0] = local_80;
/* try { // try from 001d4d53 to 001d4d68 has its CatchHandler @ 001d4f25 */
std::__cxx11::string::_M_construct<char_const*>(local_90,"<|END_THINKING|>","");
plVar4 = local_60;
local_70[0] = plVar4;
/* try { // try from 001d4d7d to 001d4d92 has its CatchHandler @ 001d4f23 */
std::__cxx11::string::_M_construct<char_const*>(local_70,"<|END_ACTION|>","");
/* try { // try from 001d4d9f to 001d4dab has its CatchHandler @ 001d4f0f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
_M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_f0,local_50);
lVar3 = -0xa0;
do {
if (plVar4 != (long *)plVar4[-2]) {
operator_delete((long *)plVar4[-2],*plVar4 + 1);
}
plVar4 = plVar4 + -4;
lVar3 = lVar3 + 0x20;
} while (lVar3 != 0);
if (*(byte *)(in_RDX + 0x10) - 1 < 2) {
if (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1]) {
LAB_001d4e00:
local_118[0] = local_118[0] & 0xffffffffffffff00;
local_118[1] = 0;
goto LAB_001d4e0e;
}
}
else if (*(byte *)(in_RDX + 0x10) == 0) goto LAB_001d4e00;
/* try { // try from 001d4dec to 001d4df9 has its CatchHandler @ 001d4eca */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_118,(basic_json *)(in_RDX + 0x10));
LAB_001d4e0e:
local_50[0] = (data)0x0;
local_48 = 0;
/* try { // try from 001d4e27 to 001d4e42 has its CatchHandler @ 001d4ef0 */
minja::chat_template::apply
((basic_json *)local_f0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_118,
*(bool *)(in_RDX + 0x68));
/* try { // try from 001d4e43 to 001d4e59 has its CatchHandler @ 001d4ed4 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_f0);
cVar2 = param_1[8];
param_1[8] = local_40[0];
uVar1 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar2;
local_38 = uVar1;
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((data *)local_40);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
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_50);
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((data *)local_118);
*(int4 *)param_1 = 10;
return param_1;
}
| |
23,099 | common_arg::set_env(char const*) | monkey531[P]llama/common/arg.cpp | common_arg & common_arg::set_env(const char * env) {
help = help + "\n(env: " + env + ")";
this->env = env;
return *this;
} | O2 | cpp | common_arg::set_env(char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90(%rdi), %r15
leaq 0x820d5(%rip), %rdx # 0xa9b50
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x37db7
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x37d98
leaq 0x8fb91(%rip), %rdx # 0xb7633
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x37d98
leaq 0x48(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x23ae0
movq %r12, %rdi
callq 0x241d8
leaq 0x8(%rsp), %rdi
callq 0x241d8
leaq 0x28(%rsp), %rdi
callq 0x241d8
movq %r14, 0x88(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241d8
jmp 0x27b05
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x241d8
movq %rbx, %rdi
callq 0x23fa0
nop
| _ZN10common_arg7set_envEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+90h]
lea rdx, aEnv; "\n(env: "
lea r12, [rsp+88h+var_60]
mov rdi, r12
mov rsi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r12
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdx, a09401910201912+51h; ")"
lea rdi, [rsp+88h+var_40]
lea rsi, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea r12, [rsp+88h+var_40]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov [rbx+88h], r14
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27B05
mov rbx, rax
loc_27B05:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| common_arg * common_arg::set_env(common_arg *this, const char *a2)
{
_BYTE v3[32]; // [rsp+8h] [rbp-80h] BYREF
_BYTE v4[32]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v5[64]; // [rsp+48h] [rbp-40h] BYREF
std::operator+<char>(v4, (char *)this + 144, "\n(env: ");
std::operator+<char>(v3, v4, a2);
std::operator+<char>(v5, v3, ")");
std::string::operator=((char *)this + 144, v5);
std::string::~string(v5);
std::string::~string(v3);
std::string::~string(v4);
*((_QWORD *)this + 17) = a2;
return this;
}
| set_env:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x90]
LEA RDX,[0x1a9b50]
LEA R12,[RSP + 0x28]
MOV RDI,R12
MOV RSI,R15
CALL 0x00137db7
LAB_00127a8b:
LEA RDI,[RSP + 0x8]
MOV RSI,R12
MOV RDX,R14
CALL 0x00137d98
LAB_00127a9b:
LEA RDX,[0x1b7633]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x8]
CALL 0x00137d98
LAB_00127ab1:
LEA R12,[RSP + 0x48]
MOV RDI,R15
MOV RSI,R12
CALL 0x00123ae0
MOV RDI,R12
CALL 0x001241d8
LEA RDI,[RSP + 0x8]
CALL 0x001241d8
LEA RDI,[RSP + 0x28]
CALL 0x001241d8
MOV qword ptr [RBX + 0x88],R14
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_arg::set_env(char const*) */
common_arg * __thiscall common_arg::set_env(common_arg *this,char *param_1)
{
string local_80 [32];
string local_60 [32];
string local_40 [32];
std::operator+(local_60,(char *)(this + 0x90));
/* try { // try from 00127a8b to 00127a9a has its CatchHandler @ 00127b02 */
std::operator+(local_80,(char *)local_60);
/* try { // try from 00127a9b to 00127ab0 has its CatchHandler @ 00127af3 */
std::operator+(local_40,(char *)local_80);
std::__cxx11::string::operator=((string *)(this + 0x90),local_40);
std::__cxx11::string::~string(local_40);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string(local_60);
*(char **)(this + 0x88) = param_1;
return this;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
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.