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
|
---|---|---|---|---|---|---|---|---|---|---|---|
1,100 | testing::UnitTest::PushGTestTrace(testing::internal::TraceInfo const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | GTEST_LOCK_EXCLUDED_(mutex_) {
internal::MutexLock lock(&mutex_);
impl_->gtest_trace_stack().push_back(trace);
} | O1 | cpp | testing::UnitTest::PushGTestTrace(testing::internal::TraceInfo const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x370dc
movl $0x2b8, %edi # imm = 0x2B8
addq 0x40(%r15), %rdi
callq 0x37838
movq %rax, %rdi
movq %r14, %rsi
callq 0x34eda
movq %rbx, %rdi
callq 0x3717a
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2deef
movq %rax, %r14
movq %rbx, %rdi
callq 0x3717a
movq %r14, %rdi
callq 0x8990
movq %rax, %rdi
callq 0x326a4
nop
| _ZN7testing8UnitTest14PushGTestTraceERKNS_8internal9TraceInfoE:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
lea rbx, [rdi+8]
mov rdi, rbx; this
call _ZN7testing8internal9MutexBase4LockEv; testing::internal::MutexBase::Lock(void)
mov edi, 2B8h
add rdi, [r15+40h]
call _ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv; testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::GetOrCreateValue(void)
mov rdi, rax
mov rsi, r14
call _ZNSt6vectorIN7testing8internal9TraceInfoESaIS2_EE9push_backERKS2_; std::vector<testing::internal::TraceInfo>::push_back(testing::internal::TraceInfo const&)
mov rdi, rbx; this
call _ZN7testing8internal9MutexBase6UnlockEv; testing::internal::MutexBase::Unlock(void)
pop rbx
pop r14
pop r15
retn
jmp short loc_2DEEF
mov r14, rax
mov rdi, rbx; this
call _ZN7testing8internal9MutexBase6UnlockEv; testing::internal::MutexBase::Unlock(void)
mov rdi, r14
call __Unwind_Resume
loc_2DEEF:
mov rdi, rax
call __clang_call_terminate
| long long testing::UnitTest::PushGTestTrace(long long a1, long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long Value; // rax
testing::internal::MutexBase::Lock((testing::internal::MutexBase *)(a1 + 8));
Value = testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::GetOrCreateValue(
*(_DWORD *)(a1 + 64) + 696,
a2,
v2,
v3,
v4,
v5);
std::vector<testing::internal::TraceInfo>::push_back(Value, a2);
return testing::internal::MutexBase::Unlock((testing::internal::MutexBase *)(a1 + 8));
}
| PushGTestTrace:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
LEA RBX,[RDI + 0x8]
MOV RDI,RBX
CALL 0x001370dc
MOV EDI,0x2b8
ADD RDI,qword ptr [R15 + 0x40]
LAB_0012debc:
CALL 0x00137838
MOV RDI,RAX
MOV RSI,R14
CALL 0x00134eda
LAB_0012decc:
MOV RDI,RBX
CALL 0x0013717a
POP RBX
POP R14
POP R15
RET
|
/* testing::UnitTest::PushGTestTrace(testing::internal::TraceInfo const&) */
void __thiscall testing::UnitTest::PushGTestTrace(UnitTest *this,TraceInfo *param_1)
{
vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>> *this_00;
internal::MutexBase::Lock((MutexBase *)(this + 8));
/* try { // try from 0012debc to 0012decb has its CatchHandler @ 0012dedc */
this_00 = (vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>> *)
internal::
ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>
::GetOrCreateValue((ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>
*)(*(long *)(this + 0x40) + 0x2b8));
std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>::push_back
(this_00,param_1);
/* try { // try from 0012decc to 0012ded3 has its CatchHandler @ 0012deda */
internal::MutexBase::Unlock((MutexBase *)(this + 8));
return;
}
|
|
1,101 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | hkr04[P]cpp-mcp/common/json.hpp | const_reference operator[](const typename object_t::key_type& key) const
{
// const operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto it = m_data.m_value.object->find(key);
JSON_ASSERT(it != m_data.m_value.object->end());
return it->second;
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x11208
movq 0x8(%r14), %rdi
callq 0x112a2
addq $0x20, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x5200
movq %rax, %rbx
movq %r14, %rdi
callq 0x8d88
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xe183(%rip), %rsi # 0x1f3af
leaq 0x10(%rsp), %rdi
callq 0x986b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8b34
xorl %ebp, %ebp
leaq 0x1a5e1(%rip), %rsi # 0x2b838
leaq -0x81ac(%rip), %rdx # 0x90b2
movq %rbx, %rdi
callq 0x5720
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1128c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5460
jmp 0x1128c
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x11299
movq %rbx, %rdi
callq 0x5300
movq %r14, %rdi
callq 0x5740
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_11208
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,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>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&)
add rax, 20h ; ' '
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_11208:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1128C
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1128C
mov r14, rax
mov bpl, 1
loc_1128C:
test bpl, bpl
jz short loc_11299
mov rdi, rbx; void *
call ___cxa_free_exception
loc_11299:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
(long long)v4,
(long long)"cannot use operator[] with a string argument with ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return nlohmann::json_abi_v3_11_3::ordered_map<std::string,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>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8))
+ 32;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00111208
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x001112a2
ADD RAX,0x20
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00111208:
MOV EDI,0x20
CALL 0x00105200
MOV RBX,RAX
MOV RDI,R14
CALL 0x00108d88
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00111225:
LEA RSI,[0x11f3af]
LEA RDI,[RSP + 0x10]
CALL 0x0010986b
MOV BPL,0x1
LAB_00111239:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00108b34
XOR EBP,EBP
LEA RSI,[0x12b838]
LEA RDX,[0x1090b2]
MOV RDI,RBX
CALL 0x00105720
|
/* 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>::operator[](std::__cxx11::string const&) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_1)
{
long lVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00111225 to 00111235 has its CatchHandler @ 00111286 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_38,"cannot use operator[] with a string argument with ",&local_40);
/* try { // try from 00111239 to 00111265 has its CatchHandler @ 00111266 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
1,102 | js_instantiate_prototype | bluesky950520[P]quickjs/quickjs.c | static JSValue js_instantiate_prototype(JSContext *ctx, JSObject *p, JSAtom atom, void *opaque)
{
JSValue obj, this_val;
int ret;
this_val = JS_MKPTR(JS_TAG_OBJECT, p);
obj = JS_NewObject(ctx);
if (JS_IsException(obj))
return JS_EXCEPTION;
set_cycle_flag(ctx, obj);
set_cycle_flag(ctx, this_val);
ret = JS_DefinePropertyValue(ctx, obj, JS_ATOM_constructor,
js_dup(this_val),
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
if (ret < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
} | O1 | c | js_instantiate_prototype:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x1, %ecx
callq 0x20f05
movq %rdx, %r14
movl $0x6, %ebx
cmpl $0x6, %r14d
je 0x3de62
movq %rax, %r12
movq 0x8(%rsp), %xmm0
movq %xmm0, %r8
movq %xmm0, 0x10(%rsp)
movq 0x10(%rsp), %rax
incl (%rax)
movl $0x3, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl $0x3d, %ecx
movq $-0x1, %r9
callq 0x26abb
testl %eax, %eax
js 0x3de53
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
andq %rax, %rcx
movl %r12d, %eax
movq %r14, %rbx
jmp 0x3de66
movq 0x18(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1d8c6
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_instantiate_prototype:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov [rsp+38h+var_30], rsi
mov rax, [rdi+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov ecx, 1
call JS_NewObjectProtoClass
mov r14, rdx
mov ebx, 6
cmp r14d, 6
jz short loc_3DE62
mov r12, rax
movq xmm0, [rsp+38h+var_30]
movq r8, xmm0
movq [rsp+38h+var_28], xmm0
mov rax, [rsp+38h+var_28]
inc dword ptr [rax]
mov [rsp+38h+var_38], 3
mov rdi, r15
mov rsi, r12
mov rdx, r14
mov ecx, 3Dh ; '='
mov r9, 0FFFFFFFFFFFFFFFFh
call JS_DefinePropertyValue
test eax, eax
js short loc_3DE53
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
and rcx, rax
mov eax, r12d
mov rbx, r14
jmp short loc_3DE66
loc_3DE53:
mov rdi, [r15+18h]
mov rsi, r12
mov rdx, r14
call JS_FreeValueRT
loc_3DE62:
xor eax, eax
xor ecx, ecx
loc_3DE66:
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long js_instantiate_prototype(
long long a1,
_DWORD *a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned long long v10; // rax
long long v11; // rdx
__m128 v12; // xmm4
__m128 v13; // xmm5
long long v14; // r14
unsigned long long v15; // r12
_DWORD *v16; // xmm0_8
unsigned long long v17; // rcx
long long v18; // rax
_DWORD *v20; // [rsp+8h] [rbp-30h]
_DWORD *v21; // [rsp+10h] [rbp-28h]
v20 = a2;
v10 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL),
1u);
v14 = v11;
if ( (_DWORD)v11 == 6 )
goto LABEL_5;
v15 = v10;
v16 = v20;
v21 = v20;
++*v20;
if ( (int)JS_DefinePropertyValue(a1, v10, v11, 61LL, v16, -1LL, *(double *)&v16, a4, a5, a6, v12, v13, a9, a10, 3) < 0 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v15, v14);
LABEL_5:
v18 = 0LL;
v17 = 0LL;
return v17 | v18;
}
v17 = v15 & 0xFFFFFFFF00000000LL;
v18 = (unsigned int)v15;
return v17 | v18;
}
| |||
1,103 | js_instantiate_prototype | bluesky950520[P]quickjs/quickjs.c | static JSValue js_instantiate_prototype(JSContext *ctx, JSObject *p, JSAtom atom, void *opaque)
{
JSValue obj, this_val;
int ret;
this_val = JS_MKPTR(JS_TAG_OBJECT, p);
obj = JS_NewObject(ctx);
if (JS_IsException(obj))
return JS_EXCEPTION;
set_cycle_flag(ctx, obj);
set_cycle_flag(ctx, this_val);
ret = JS_DefinePropertyValue(ctx, obj, JS_ATOM_constructor,
js_dup(this_val),
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
if (ret < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
} | O3 | c | js_instantiate_prototype:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r13
movq %rdi, %r12
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x1, %ecx
callq 0x21651
movq %rdx, %r14
movl $0x6, %ebx
cmpl $0x6, %r14d
jne 0x3f440
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x3f485
movq %rax, %r15
incl (%r13)
movl $0x3, (%rsp)
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl $0x3d, %ecx
movq %r13, %r8
movq $-0x1, %r9
callq 0x2717d
testl %eax, %eax
js 0x3f499
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movl %r15d, %eax
movq %r14, %rbx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpl $-0x9, %r14d
jb 0x3f43a
movq 0x18(%r12), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x3f43a
movq %r15, %rsi
movq %r14, %rdx
callq 0x219cc
jmp 0x3f43a
| js_instantiate_prototype:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, rsi
mov r12, rdi
mov rax, [rdi+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov ecx, 1
call JS_NewObjectProtoClass
mov r14, rdx
mov ebx, 6
cmp r14d, 6
jnz short loc_3F440
loc_3F43A:
xor eax, eax
xor ecx, ecx
jmp short loc_3F485
loc_3F440:
mov r15, rax
inc dword ptr [r13+0]
mov [rsp+38h+var_38], 3
mov rdi, r12
mov rsi, rax
mov rdx, r14
mov ecx, 3Dh ; '='
mov r8, r13
mov r9, 0FFFFFFFFFFFFFFFFh
call JS_DefinePropertyValue
test eax, eax
js short loc_3F499
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov eax, r15d
mov rbx, r14
loc_3F485:
or rax, rcx
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_3F499:
cmp r14d, 0FFFFFFF7h
jb short loc_3F43A
mov rdi, [r12+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_3F43A
mov rsi, r15
mov rdx, r14
call js_free_value_rt
jmp loc_3F43A
| unsigned long long js_instantiate_prototype(
long long a1,
_DWORD *a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rax
long long v11; // rdx
__m128 v12; // xmm4
__m128 v13; // xmm5
unsigned int v14; // r14d
long long v15; // rax
unsigned long long v16; // rcx
long long v17; // r15
long long v19; // rdi
int v20; // eax
v10 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL),
1u);
v14 = v11;
if ( (_DWORD)v11 != 6 )
{
v17 = v10;
++*a2;
if ( (int)JS_DefinePropertyValue(a1, v10, v11, 61LL, a2, -1LL, a3, a4, a5, a6, v12, v13, a9, a10, 3) >= 0 )
{
v16 = v17 & 0xFFFFFFFF00000000LL;
v15 = (unsigned int)v17;
return v16 | v15;
}
if ( v14 >= 0xFFFFFFF7 )
{
v19 = *(_QWORD *)(a1 + 24);
v20 = (*(_DWORD *)v17)--;
if ( v20 <= 1 )
js_free_value_rt(v19, (_QWORD *)v17, v14);
}
}
v15 = 0LL;
v16 = 0LL;
return v16 | v15;
}
| js_instantiate_prototype:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,RSI
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV ECX,0x1
CALL 0x00121651
MOV R14,RDX
MOV EBX,0x6
CMP R14D,0x6
JNZ 0x0013f440
LAB_0013f43a:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x0013f485
LAB_0013f440:
MOV R15,RAX
INC dword ptr [R13]
MOV dword ptr [RSP],0x3
MOV RDI,R12
MOV RSI,RAX
MOV RDX,R14
MOV ECX,0x3d
MOV R8,R13
MOV R9,-0x1
CALL 0x0012717d
TEST EAX,EAX
JS 0x0013f499
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV EAX,R15D
MOV RBX,R14
LAB_0013f485:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0013f499:
CMP R14D,-0x9
JC 0x0013f43a
MOV RDI,qword ptr [R12 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0013f43a
MOV RSI,R15
MOV RDX,R14
CALL 0x001219cc
JMP 0x0013f43a
|
int1 [16] js_instantiate_prototype(long param_1,int *param_2)
{
int8 uVar1;
int iVar2;
int *piVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
auVar7 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
uVar6 = auVar7._8_8_;
piVar3 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
*param_2 = *param_2 + 1;
iVar2 = JS_DefinePropertyValue(param_1,piVar3,uVar6,0x3d,param_2,0xffffffffffffffff,3);
if (-1 < iVar2) {
uVar5 = (ulong)piVar3 & 0xffffffff00000000;
uVar4 = (ulong)piVar3 & 0xffffffff;
goto LAB_0013f485;
}
if (0xfffffff6 < auVar7._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar3,uVar6);
}
}
}
uVar4 = 0;
uVar5 = 0;
uVar6 = 6;
LAB_0013f485:
auVar7._0_8_ = uVar4 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
|
|
1,104 | get_charset_name | eloqsql/mysys/charset.c | const char *get_charset_name(uint charset_number)
{
my_pthread_once(&charsets_initialized, init_available_charsets);
if (charset_number < array_elements(all_charsets))
{
CHARSET_INFO *cs= all_charsets[charset_number];
if (cs && (cs->number == charset_number) && cs->coll_name.str)
return cs->coll_name.str;
}
return "?"; /* this mimics find_type() */
} | O0 | c | get_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0xbaea52(%rip), %rdi # 0xc8d814
leaq -0x479(%rip), %rsi # 0xde950
callq 0x2a230
cmpl $0x800, -0xc(%rbp) # imm = 0x800
jae 0xdee18
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xba69bd(%rip), %rax # 0xc857a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xdee16
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xdee16
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xdee16
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xdee23
jmp 0xdee18
leaq 0x7e2e1(%rip), %rax # 0x15d100
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| get_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_C], 800h
jnb short loc_DEE18
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_DEE16
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_DEE16
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_DEE16
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_DEE23
loc_DEE16:
jmp short $+2
loc_DEE18:
lea rax, asc_15D100; "?"
mov [rbp+var_8], rax
loc_DEE23:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| const char * get_charset_name(unsigned int a1)
{
long long v2; // [rsp+8h] [rbp-18h]
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 && (v2 = all_charsets[a1]) != 0 && *(_DWORD *)v2 == a1 && *(_QWORD *)(v2 + 32) )
return *(const char **)(v2 + 32);
else
return "?";
}
| get_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RDI,[0xd8d814]
LEA RSI,[0x1de950]
CALL 0x0012a230
CMP dword ptr [RBP + -0xc],0x800
JNC 0x001dee18
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0xd857a0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001dee16
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001dee16
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001dee16
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001dee23
LAB_001dee16:
JMP 0x001dee18
LAB_001dee18:
LEA RAX,[0x25d100]
MOV qword ptr [RBP + -0x8],RAX
LAB_001dee23:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * get_charset_name(uint param_1)
{
uint *puVar1;
int *local_10;
pthread_once(&charsets_initialized,init_available_charsets);
if ((((param_1 < 0x800) && (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 != (uint *)0x0)) &&
(*puVar1 == param_1)) && (*(long *)(puVar1 + 8) != 0)) {
local_10 = *(int **)(puVar1 + 8);
}
else {
local_10 = &DAT_0025d100;
}
return local_10;
}
|
|
1,105 | verify_merkle_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_tx_proof.c | static bool verify_merkle_proof(verify_ctx_t* ctx, ssz_ob_t proof, bytes_t block_hash, bytes_t block_number, bytes_t base_fee_per_gas, bytes_t raw, uint32_t tx_index, bytes32_t body_root) {
uint8_t leafes[128] = {0}; // 4 leafes, 32 bytes each
bytes32_t root_hash = {0}; // calculated body root hash
gindex_t gindexes[] = {GINDEX_BLOCKUMBER, GINDEX_BLOCHASH, GINDEX_BASEFEEPERGAS, GINDEX_TXINDEX_G + tx_index}; // calculate the gindexes for the proof
// copy leaf data
memcpy(leafes, block_number.data, block_number.len);
memcpy(leafes + 32, block_hash.data, block_hash.len);
memcpy(leafes + 64, base_fee_per_gas.data, base_fee_per_gas.len);
ssz_hash_tree_root(ssz_ob(ssz_transactions_bytes, raw), leafes + 96);
if (!ssz_verify_multi_merkle_proof(proof.bytes, bytes(leafes, sizeof(leafes)), gindexes, root_hash)) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, missing nodes!");
if (memcmp(root_hash, body_root, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, body root mismatch!");
return true;
} | O0 | c | verify_merkle_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq 0x48(%rbp), %rax
leaq 0x38(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movl %esi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x28(%rbp)
movq %r8, -0x20(%rbp)
movq %rdi, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x23140
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq $0x326, -0x100(%rbp) # imm = 0x326
movq $0x32c, -0xf8(%rbp) # imm = 0x32C
movq $0x32b, -0xf0(%rbp) # imm = 0x32B
movl -0x34(%rbp), %eax
addq $0x65a00000, %rax # imm = 0x65A00000
movq %rax, -0xe8(%rbp)
leaq -0xc0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x28(%rbp), %eax
movl %eax, %edx
callq 0x231c0
leaq -0xc0(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x231c0
movq -0x140(%rbp), %rax
leaq -0xc0(%rbp), %rdi
addq $0x40, %rdi
movq 0x8(%rax), %rsi
movl (%rax), %eax
movl %eax, %edx
callq 0x231c0
movq -0x138(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x118(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x110(%rbp)
leaq 0xfb8f3(%rip), %rax # 0x122ad0
movq %rax, -0x108(%rbp)
leaq -0xc0(%rbp), %rdi
addq $0x60, %rdi
leaq -0x118(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0a50
movq -0x130(%rbp), %rax
movl $0x80, -0x128(%rbp)
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x120(%rbp)
leaq -0x100(%rbp), %r8
leaq -0xe0(%rbp), %r9
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl -0x128(%rbp), %edx
movq -0x120(%rbp), %rcx
callq 0xa10c0
testb $0x1, %al
jne 0x27281
jmp 0x2725f
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb3c56(%rip), %rsi # 0xdaec4
callq 0xa6370
movq -0x30(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x272c3
leaq -0xe0(%rbp), %rdi
movq 0x48(%rbp), %rsi
movl $0x20, %edx
callq 0x23100
cmpl $0x0, %eax
je 0x272bf
jmp 0x2729d
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb3c39(%rip), %rsi # 0xdaee5
callq 0xa6370
movq -0x30(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x272c3
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)
| verify_merkle_proof:
push rbp
mov rbp, rsp
sub rsp, 160h
mov rax, [rbp+arg_38]
lea rax, [rbp+arg_28]
mov [rbp+var_138], rax
lea rax, [rbp+arg_18]
mov [rbp+var_140], rax
lea rax, [rbp+arg_0]
mov [rbp+var_130], rax
mov [rbp+var_18], esi
mov [rbp+var_10], rdx
mov [rbp+var_28], ecx
mov [rbp+var_20], r8
mov [rbp+var_30], rdi
mov [rbp+var_34], r9d
lea rdi, [rbp+var_C0]
xor esi, esi
mov edx, 80h
call _memset
lea rdi, [rbp+var_E0]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov [rbp+var_100], 326h
mov [rbp+var_F8], 32Ch
mov [rbp+var_F0], 32Bh
mov eax, [rbp+var_34]
add rax, 65A00000h
mov [rbp+var_E8], rax
lea rdi, [rbp+var_C0]
mov rsi, [rbp+var_20]
mov eax, [rbp+var_28]
mov edx, eax
call _memcpy
lea rdi, [rbp+var_C0]
add rdi, 20h ; ' '
mov rsi, [rbp+var_10]
mov eax, [rbp+var_18]
mov edx, eax
call _memcpy
mov rax, [rbp+var_140]
lea rdi, [rbp+var_C0]
add rdi, 40h ; '@'
mov rsi, [rax+8]
mov eax, [rax]
mov edx, eax
call _memcpy
mov rax, [rbp+var_138]
mov rcx, [rax]
mov [rbp+var_118], rcx
mov rax, [rax+8]
mov [rbp+var_110], rax
lea rax, ssz_transactions_bytes
mov [rbp+var_108], rax
lea rdi, [rbp+var_C0]
add rdi, 60h ; '`'
lea rax, [rbp+var_118]
mov rcx, [rax]
mov [rsp+160h+var_160], rcx
mov rcx, [rax+8]
mov [rsp+160h+var_158], rcx
mov rax, [rax+10h]
mov [rsp+160h+var_150], rax
call ssz_hash_tree_root
mov rax, [rbp+var_130]
mov [rbp+var_128], 80h
lea rcx, [rbp+var_C0]
mov [rbp+var_120], rcx
lea r8, [rbp+var_100]
lea r9, [rbp+var_E0]
mov edi, [rax]
mov rsi, [rax+8]
mov edx, [rbp+var_128]
mov rcx, [rbp+var_120]
call ssz_verify_multi_merkle_proof
test al, 1
jnz short loc_27281
jmp short $+2
loc_2725F:
mov rdi, [rbp+var_30]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_0; "invalid tx proof, missing nodes!"
call c4_state_add_error
mov rax, [rbp+var_30]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_272C3
loc_27281:
lea rdi, [rbp+var_E0]
mov rsi, [rbp+arg_38]
mov edx, 20h ; ' '
call _memcmp
cmp eax, 0
jz short loc_272BF
jmp short $+2
loc_2729D:
mov rdi, [rbp+var_30]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_1; "invalid tx proof, body root mismatch!"
call c4_state_add_error
mov rax, [rbp+var_30]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_272C3
loc_272BF:
mov [rbp+var_1], 1
loc_272C3:
mov al, [rbp+var_1]
and al, 1
add rsp, 160h
pop rbp
retn
| char verify_merkle_proof(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
unsigned int a7,
long long a8,
int a9,
unsigned int a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
int v14; // edx
int v15; // r8d
int v16; // r9d
_QWORD v18[4]; // [rsp+60h] [rbp-100h] BYREF
_BYTE v19[32]; // [rsp+80h] [rbp-E0h] BYREF
_BYTE v20[32]; // [rsp+A0h] [rbp-C0h] BYREF
long long v21; // [rsp+C0h] [rbp-A0h] BYREF
long long v22; // [rsp+E0h] [rbp-80h] BYREF
long long v23; // [rsp+100h] [rbp-60h] BYREF
unsigned int v24; // [rsp+12Ch] [rbp-34h]
long long v25; // [rsp+130h] [rbp-30h]
unsigned int v26; // [rsp+138h] [rbp-28h]
long long v27; // [rsp+140h] [rbp-20h]
unsigned int v28; // [rsp+148h] [rbp-18h]
long long v29; // [rsp+150h] [rbp-10h]
v28 = a2;
v29 = a3;
v26 = a4;
v27 = a5;
v25 = a1;
v24 = a6;
memset(v20, 0LL, 128LL);
memset(v19, 0LL, sizeof(v19));
v18[0] = 806LL;
v18[1] = 812LL;
v18[2] = 811LL;
v18[3] = v24 + 1704984576LL;
memcpy(v20, v27, v26);
memcpy(&v21, v29, v28);
memcpy(&v22, a11, a10);
ssz_hash_tree_root((unsigned int)&v23, a11, v14, a13, v15, v16, a12, a13, &ssz_transactions_bytes);
if ( (ssz_verify_multi_merkle_proof(a7, a8, 128LL, v20, v18, v19) & 1) != 0 )
{
if ( !(unsigned int)memcmp(v19, a14, 32LL) )
{
return 1;
}
else
{
c4_state_add_error(v25 + 112, "invalid tx proof, body root mismatch!");
*(_BYTE *)(v25 + 104) = 0;
return 0;
}
}
else
{
c4_state_add_error(v25 + 112, "invalid tx proof, missing nodes!");
*(_BYTE *)(v25 + 104) = 0;
return 0;
}
}
| verify_merkle_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV RAX,qword ptr [RBP + 0x48]
LEA RAX,[RBP + 0x38]
MOV qword ptr [RBP + -0x138],RAX
LEA RAX,[RBP + 0x28]
MOV qword ptr [RBP + -0x140],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x130],RAX
MOV dword ptr [RBP + -0x18],ESI
MOV qword ptr [RBP + -0x10],RDX
MOV dword ptr [RBP + -0x28],ECX
MOV qword ptr [RBP + -0x20],R8
MOV qword ptr [RBP + -0x30],RDI
MOV dword ptr [RBP + -0x34],R9D
LEA RDI,[RBP + -0xc0]
XOR ESI,ESI
MOV EDX,0x80
CALL 0x00123140
LEA RDI,[RBP + -0xe0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV qword ptr [RBP + -0x100],0x326
MOV qword ptr [RBP + -0xf8],0x32c
MOV qword ptr [RBP + -0xf0],0x32b
MOV EAX,dword ptr [RBP + -0x34]
ADD RAX,0x65a00000
MOV qword ptr [RBP + -0xe8],RAX
LEA RDI,[RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x28]
MOV EDX,EAX
CALL 0x001231c0
LEA RDI,[RBP + -0xc0]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x001231c0
MOV RAX,qword ptr [RBP + -0x140]
LEA RDI,[RBP + -0xc0]
ADD RDI,0x40
MOV RSI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
CALL 0x001231c0
MOV RAX,qword ptr [RBP + -0x138]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x118],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x110],RAX
LEA RAX,[0x222ad0]
MOV qword ptr [RBP + -0x108],RAX
LEA RDI,[RBP + -0xc0]
ADD RDI,0x60
LEA RAX,[RBP + -0x118]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0a50
MOV RAX,qword ptr [RBP + -0x130]
MOV dword ptr [RBP + -0x128],0x80
LEA RCX,[RBP + -0xc0]
MOV qword ptr [RBP + -0x120],RCX
LEA R8,[RBP + -0x100]
LEA R9,[RBP + -0xe0]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RBP + -0x128]
MOV RCX,qword ptr [RBP + -0x120]
CALL 0x001a10c0
TEST AL,0x1
JNZ 0x00127281
JMP 0x0012725f
LAB_0012725f:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x70
LEA RSI,[0x1daec4]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001272c3
LAB_00127281:
LEA RDI,[RBP + -0xe0]
MOV RSI,qword ptr [RBP + 0x48]
MOV EDX,0x20
CALL 0x00123100
CMP EAX,0x0
JZ 0x001272bf
JMP 0x0012729d
LAB_0012729d:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x70
LEA RSI,[0x1daee5]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001272c3
LAB_001272bf:
MOV byte ptr [RBP + -0x1],0x1
LAB_001272c3:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x160
POP RBP
RET
|
int1
verify_merkle_proof(long param_1,uint param_2,void *param_3,uint param_4,void *param_5,uint param_6,
int4 param_7,int8 param_8,int8 param_9,uint param_10,
void *param_11,int8 param_12,int8 param_13,void *param_14)
{
int iVar1;
ulong uVar2;
int1 *puVar3;
int8 local_108;
int8 local_100;
int8 local_f8;
long local_f0;
int1 local_e8 [32];
int1 local_c8 [32];
int1 auStack_a8 [32];
int1 auStack_88 [32];
int1 auStack_68 [44];
uint local_3c;
long local_38;
uint local_30;
void *local_28;
uint local_20;
void *local_18;
int1 local_9;
local_3c = param_6;
local_38 = param_1;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
memset(local_c8,0,0x80);
memset(local_e8,0,0x20);
local_108 = 0x326;
local_100 = 0x32c;
local_f8 = 0x32b;
local_f0 = (ulong)local_3c + 0x65a00000;
memcpy(local_c8,local_28,(ulong)local_30);
memcpy(auStack_a8,local_18,(ulong)local_20);
memcpy(auStack_88,param_11,(ulong)param_10);
puVar3 = ssz_transactions_bytes;
ssz_hash_tree_root(auStack_68);
uVar2 = ssz_verify_multi_merkle_proof
(param_7,param_8,0x80,local_c8,&local_108,local_e8,param_12,param_13,puVar3);
if ((uVar2 & 1) == 0) {
c4_state_add_error(local_38 + 0x70,"invalid tx proof, missing nodes!");
*(int1 *)(local_38 + 0x68) = 0;
local_9 = 0;
}
else {
iVar1 = memcmp(local_e8,param_14,0x20);
if (iVar1 == 0) {
local_9 = 1;
}
else {
c4_state_add_error(local_38 + 0x70,"invalid tx proof, body root mismatch!");
*(int1 *)(local_38 + 0x68) = 0;
local_9 = 0;
}
}
return local_9;
}
|
|
1,106 | verify_merkle_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_tx_proof.c | static bool verify_merkle_proof(verify_ctx_t* ctx, ssz_ob_t proof, bytes_t block_hash, bytes_t block_number, bytes_t base_fee_per_gas, bytes_t raw, uint32_t tx_index, bytes32_t body_root) {
uint8_t leafes[128] = {0}; // 4 leafes, 32 bytes each
bytes32_t root_hash = {0}; // calculated body root hash
gindex_t gindexes[] = {GINDEX_BLOCKUMBER, GINDEX_BLOCHASH, GINDEX_BASEFEEPERGAS, GINDEX_TXINDEX_G + tx_index}; // calculate the gindexes for the proof
// copy leaf data
memcpy(leafes, block_number.data, block_number.len);
memcpy(leafes + 32, block_hash.data, block_hash.len);
memcpy(leafes + 64, base_fee_per_gas.data, base_fee_per_gas.len);
ssz_hash_tree_root(ssz_ob(ssz_transactions_bytes, raw), leafes + 96);
if (!ssz_verify_multi_merkle_proof(proof.bytes, bytes(leafes, sizeof(leafes)), gindexes, root_hash)) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, missing nodes!");
if (memcmp(root_hash, body_root, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, body root mismatch!");
return true;
} | O3 | c | verify_merkle_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, 0x28(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdi, 0x20(%rsp)
movl 0x178(%rsp), %eax
movq 0x150(%rsp), %rsi
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movaps %xmm0, -0x10(%r15)
movaps %xmm0, -0x20(%r15)
movaps %xmm0, -0x30(%r15)
movaps %xmm0, -0x40(%r15)
movaps %xmm0, -0x50(%r15)
movaps %xmm0, -0x60(%r15)
leaq 0x50(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x70(%rsp), %r13
movq $0x326, (%r13) # imm = 0x326
movq $0x32c, 0x8(%r13) # imm = 0x32C
movq $0x32b, 0x10(%r13) # imm = 0x32B
addq $0x65a00000, %rax # imm = 0x65A00000
movq %rax, 0x18(%r13)
movl %r9d, %edx
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
callq 0x211a0
movl %r14d, %edx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x211a0
leaq 0xd0(%rsp), %rdi
movq 0x160(%rsp), %rsi
movl 0x158(%rsp), %edx
callq 0x211a0
movups 0x168(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x84f0c(%rip), %rax # 0xa9c30
movq %rax, 0x40(%rsp)
movq %rax, 0x10(%rsp)
movdqa 0x30(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movq %r15, %rdi
callq 0x53496
movl 0x1c(%rsp), %edi
movq 0x28(%rsp), %rsi
movl $0x80, %edx
movq %rbp, %rcx
movq %r13, %r8
movq %r12, %r9
callq 0x53995
testb %al, %al
je 0x24d96
movq 0x180(%rsp), %rax
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
pcmpeqb 0x60(%rsp), %xmm1
pcmpeqb 0x50(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x24dc3
leaq 0x5b22d(%rip), %rsi # 0x7ffc1
jmp 0x24d9d
leaq 0x5b203(%rip), %rsi # 0x7ffa0
movq 0x20(%rsp), %rbx
leaq 0x70(%rbx), %rdi
callq 0x56981
movb $0x0, 0x68(%rbx)
xorl %eax, %eax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x24db1
| verify_merkle_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov rbx, r8
mov r14d, ecx
mov [rsp+148h+var_120], rdx
mov [rsp+148h+var_12C], esi
mov [rsp+148h+var_128], rdi
mov eax, [rsp+148h+arg_28]
mov rsi, [rsp+148h+arg_0]
xorps xmm0, xmm0
lea r15, [rsp+148h+var_58]
movaps xmmword ptr [r15+10h], xmm0
movaps xmmword ptr [r15], xmm0
movaps xmmword ptr [r15-10h], xmm0
movaps xmmword ptr [r15-20h], xmm0
movaps xmmword ptr [r15-30h], xmm0
movaps xmmword ptr [r15-40h], xmm0
movaps xmmword ptr [r15-50h], xmm0
movaps xmmword ptr [r15-60h], xmm0
lea r12, [rsp+148h+var_F8]
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
lea r13, [rsp+148h+var_D8]
mov qword ptr [r13+0], 326h
mov qword ptr [r13+8], 32Ch
mov qword ptr [r13+10h], 32Bh
add rax, 65A00000h
mov [r13+18h], rax
mov edx, r9d
lea rbp, [rsp+148h+var_B8]
mov rdi, rbp
call _memcpy
mov edx, r14d
lea rdi, [rsp+148h+var_98]
mov rsi, rbx
call _memcpy
lea rdi, [rsp+148h+var_78]
mov rsi, [rsp+148h+arg_10]
mov edx, [rsp+148h+arg_8]
call _memcpy
movups xmm0, [rsp+148h+arg_18]
movaps [rsp+148h+var_118], xmm0
lea rax, ssz_transactions_bytes
mov [rsp+148h+var_108], rax
mov [rsp+148h+var_138], rax
movdqa xmm0, [rsp+148h+var_118]
movdqu [rsp+148h+var_148], xmm0
mov rdi, r15
call ssz_hash_tree_root
mov edi, [rsp+148h+var_12C]
mov rsi, [rsp+148h+var_120]
mov edx, 80h
mov rcx, rbp
mov r8, r13
mov r9, r12
call ssz_verify_multi_merkle_proof
test al, al
jz short loc_24D96
mov rax, [rsp+148h+arg_30]
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
pcmpeqb xmm1, [rsp+148h+var_E8]
pcmpeqb xmm0, [rsp+148h+var_F8]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_24DC3
lea rsi, aInvalidTxProof_0; "invalid tx proof, body root mismatch!"
jmp short loc_24D9D
loc_24D96:
lea rsi, aInvalidTxProof_1; "invalid tx proof, missing nodes!"
loc_24D9D:
mov rbx, [rsp+148h+var_128]
lea rdi, [rbx+70h]
call c4_state_add_error
mov byte ptr [rbx+68h], 0
xor eax, eax
loc_24DB1:
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_24DC3:
mov al, 1
jmp short loc_24DB1
| char verify_merkle_proof(
long long a1,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
int a8,
long long a9,
__m128i a10,
unsigned int a11,
const __m128i *a12)
{
__m128i v12; // xmm0
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
const char *v17; // rsi
__m128i v20; // [rsp+30h] [rbp-118h] BYREF
char **v21; // [rsp+40h] [rbp-108h]
__m128i v22; // [rsp+50h] [rbp-F8h] BYREF
__m128i v23; // [rsp+60h] [rbp-E8h]
_QWORD v24[4]; // [rsp+70h] [rbp-D8h] BYREF
_BYTE v25[32]; // [rsp+90h] [rbp-B8h] BYREF
_BYTE v26[32]; // [rsp+B0h] [rbp-98h] BYREF
_BYTE v27[32]; // [rsp+D0h] [rbp-78h] BYREF
_BYTE v28[88]; // [rsp+F0h] [rbp-58h] BYREF
memset(v28, 0, 32);
memset(v27, 0, sizeof(v27));
memset(v26, 0, sizeof(v26));
memset(v25, 0, sizeof(v25));
v23 = 0LL;
v22 = 0LL;
v24[0] = 806LL;
v24[1] = 812LL;
v24[2] = 811LL;
v24[3] = a11 + 1704984576LL;
memcpy(v25);
memcpy(v26);
memcpy(v27);
v20 = a10;
v21 = &ssz_transactions_bytes;
v12 = _mm_load_si128(&v20);
ssz_hash_tree_root(v28, a9, v13, v14, v15, v16, v12.m128i_i64[0], v12.m128i_i64[1], &ssz_transactions_bytes);
if ( !(unsigned __int8)ssz_verify_multi_merkle_proof(a2, a3, 128LL, v25, v24, &v22) )
{
v17 = "invalid tx proof, missing nodes!";
goto LABEL_5;
}
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(a12), v22), _mm_cmpeq_epi8(_mm_loadu_si128(a12 + 1), v23))) != 0xFFFF )
{
v17 = "invalid tx proof, body root mismatch!";
LABEL_5:
c4_state_add_error(a1 + 112, v17);
*(_BYTE *)(a1 + 104) = 0;
return 0;
}
return 1;
}
| verify_merkle_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV RBX,R8
MOV R14D,ECX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x1c],ESI
MOV qword ptr [RSP + 0x20],RDI
MOV EAX,dword ptr [RSP + 0x178]
MOV RSI,qword ptr [RSP + 0x150]
XORPS XMM0,XMM0
LEA R15,[RSP + 0xf0]
MOVAPS xmmword ptr [R15 + 0x10],XMM0
MOVAPS xmmword ptr [R15],XMM0
MOVAPS xmmword ptr [R15 + -0x10],XMM0
MOVAPS xmmword ptr [R15 + -0x20],XMM0
MOVAPS xmmword ptr [R15 + -0x30],XMM0
MOVAPS xmmword ptr [R15 + -0x40],XMM0
MOVAPS xmmword ptr [R15 + -0x50],XMM0
MOVAPS xmmword ptr [R15 + -0x60],XMM0
LEA R12,[RSP + 0x50]
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
LEA R13,[RSP + 0x70]
MOV qword ptr [R13],0x326
MOV qword ptr [R13 + 0x8],0x32c
MOV qword ptr [R13 + 0x10],0x32b
ADD RAX,0x65a00000
MOV qword ptr [R13 + 0x18],RAX
MOV EDX,R9D
LEA RBP,[RSP + 0x90]
MOV RDI,RBP
CALL 0x001211a0
MOV EDX,R14D
LEA RDI,[RSP + 0xb0]
MOV RSI,RBX
CALL 0x001211a0
LEA RDI,[RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x160]
MOV EDX,dword ptr [RSP + 0x158]
CALL 0x001211a0
MOVUPS XMM0,xmmword ptr [RSP + 0x168]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RAX,[0x1a9c30]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x10],RAX
MOVDQA XMM0,xmmword ptr [RSP + 0x30]
MOVDQU xmmword ptr [RSP],XMM0
MOV RDI,R15
CALL 0x00153496
MOV EDI,dword ptr [RSP + 0x1c]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,0x80
MOV RCX,RBP
MOV R8,R13
MOV R9,R12
CALL 0x00153995
TEST AL,AL
JZ 0x00124d96
MOV RAX,qword ptr [RSP + 0x180]
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
PCMPEQB XMM1,xmmword ptr [RSP + 0x60]
PCMPEQB XMM0,xmmword ptr [RSP + 0x50]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x00124dc3
LEA RSI,[0x17ffc1]
JMP 0x00124d9d
LAB_00124d96:
LEA RSI,[0x17ffa0]
LAB_00124d9d:
MOV RBX,qword ptr [RSP + 0x20]
LEA RDI,[RBX + 0x70]
CALL 0x00156981
MOV byte ptr [RBX + 0x68],0x0
XOR EAX,EAX
LAB_00124db1:
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00124dc3:
MOV AL,0x1
JMP 0x00124db1
|
int8
verify_merkle_proof(long param_1,int4 param_2,int8 param_3,uint param_4,void *param_5,
ulong param_6,void *param_7,uint param_8,void *param_9,int8 param_10,
int8 param_11,uint param_12,char *param_13)
{
char cVar1;
char *pcVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 *puVar5;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
long local_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
uStack_a0 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_e8 = 0;
uStack_e0 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_d8 = 0x326;
local_d0 = 0x32c;
local_c8 = 0x32b;
local_c0 = (ulong)param_12 + 0x65a00000;
memcpy(&local_b8,param_7,param_6 & 0xffffffff);
memcpy(&local_98,param_5,(ulong)param_4);
memcpy(&local_78,param_9,(ulong)param_8);
puVar5 = ssz_transactions_bytes;
ssz_hash_tree_root(&local_58);
cVar1 = ssz_verify_multi_merkle_proof
(param_2,param_3,0x80,&local_b8,&local_d8,&local_f8,param_10,param_11,puVar5);
if (cVar1 == '\0') {
pcVar2 = "invalid tx proof, missing nodes!";
}
else {
auVar4[0] = -(param_13[0x10] == (char)local_e8);
auVar4[1] = -(param_13[0x11] == local_e8._1_1_);
auVar4[2] = -(param_13[0x12] == local_e8._2_1_);
auVar4[3] = -(param_13[0x13] == local_e8._3_1_);
auVar4[4] = -(param_13[0x14] == local_e8._4_1_);
auVar4[5] = -(param_13[0x15] == local_e8._5_1_);
auVar4[6] = -(param_13[0x16] == local_e8._6_1_);
auVar4[7] = -(param_13[0x17] == local_e8._7_1_);
auVar4[8] = -(param_13[0x18] == (char)uStack_e0);
auVar4[9] = -(param_13[0x19] == uStack_e0._1_1_);
auVar4[10] = -(param_13[0x1a] == uStack_e0._2_1_);
auVar4[0xb] = -(param_13[0x1b] == uStack_e0._3_1_);
auVar4[0xc] = -(param_13[0x1c] == uStack_e0._4_1_);
auVar4[0xd] = -(param_13[0x1d] == uStack_e0._5_1_);
auVar4[0xe] = -(param_13[0x1e] == uStack_e0._6_1_);
auVar4[0xf] = -(param_13[0x1f] == uStack_e0._7_1_);
auVar3[0] = -(*param_13 == (char)local_f8);
auVar3[1] = -(param_13[1] == local_f8._1_1_);
auVar3[2] = -(param_13[2] == local_f8._2_1_);
auVar3[3] = -(param_13[3] == local_f8._3_1_);
auVar3[4] = -(param_13[4] == local_f8._4_1_);
auVar3[5] = -(param_13[5] == local_f8._5_1_);
auVar3[6] = -(param_13[6] == local_f8._6_1_);
auVar3[7] = -(param_13[7] == local_f8._7_1_);
auVar3[8] = -(param_13[8] == (char)uStack_f0);
auVar3[9] = -(param_13[9] == uStack_f0._1_1_);
auVar3[10] = -(param_13[10] == uStack_f0._2_1_);
auVar3[0xb] = -(param_13[0xb] == uStack_f0._3_1_);
auVar3[0xc] = -(param_13[0xc] == uStack_f0._4_1_);
auVar3[0xd] = -(param_13[0xd] == uStack_f0._5_1_);
auVar3[0xe] = -(param_13[0xe] == uStack_f0._6_1_);
auVar3[0xf] = -(param_13[0xf] == uStack_f0._7_1_);
auVar3 = auVar3 & auVar4;
if ((ushort)((ushort)(SUB161(auVar3 >> 7,0) & 1) | (ushort)(SUB161(auVar3 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar3 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar3 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar3 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar3 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar3 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar3 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar3 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar3 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar3 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar3 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar3 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar3 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar3 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar3[0xf] >> 7) << 0xf) == 0xffff) {
return 0xff01;
}
pcVar2 = "invalid tx proof, body root mismatch!";
}
c4_state_add_error(param_1 + 0x70,pcVar2);
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
|
|
1,107 | lf_hash_insert | eloqsql/mysys/lf_hash.cc | int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data)
{
int csize, bucket, hashnr;
LF_SLIST *node, **el;
node= (LF_SLIST *)lf_alloc_new(pins);
if (unlikely(!node))
return -1;
hash->initializer(hash, node + 1, data);
node->key= hash_key(hash, (uchar *)(node+1), &node->keylen);
hashnr= hash->hash_function(hash->charset, node->key, node->keylen) & INT_MAX32;
bucket= hashnr % hash->size;
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (unlikely(!el))
return -1;
if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins)))
return -1;
node->hashnr= my_reverse_bits(hashnr) | 1; /* normal node */
if (l_insert(el, hash->charset, node, pins, hash->flags))
{
lf_alloc_free(pins, node);
return 1;
}
csize= hash->size;
if ((my_atomic_add32(&hash->count, 1)+1.0) / csize > MAX_LOAD)
my_atomic_cas32(&hash->size, &csize, csize*2);
return 0;
} | O3 | cpp | lf_hash_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xa6f57
pushq $-0x1
popq %rdx
testq %rax, %rax
je 0x2f874
movq %rax, %r12
movq %r14, -0x30(%rbp)
leaq 0x20(%rax), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x98(%rbx)
movq %r12, %r15
addq $0x10, %r15
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x2f74d
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *%rax
movq %rax, %r14
movq (%r15), %rdx
jmp 0x2f75f
movl 0xb4(%rbx), %edx
movq %rdx, (%r15)
movl 0xb0(%rbx), %eax
addq %rax, %r14
movq %r12, -0x38(%rbp)
movq %r14, 0x8(%r12)
movq 0xa8(%rbx), %rdi
movq %r14, %rsi
callq *0xa0(%rbx)
movl %eax, %r13d
movl %eax, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
movl %r12d, %eax
xorl %edx, %edx
idivl 0xc0(%rbx)
movl %edx, %r15d
movq %rbx, %rdi
movl %edx, %esi
callq 0x2f59a
testq %rax, %rax
je 0x2f8a4
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x2f885
movl $0xff, %eax
movl %r13d, %ecx
andl %eax, %ecx
leaq 0xb356c(%rip), %rdx # 0xe2d30
movzbl (%rdx,%rcx), %ecx
shll $0x18, %ecx
movl %r13d, %esi
shrl $0x8, %esi
andl %eax, %esi
movzbl (%rdx,%rsi), %esi
shll $0x10, %esi
orl %ecx, %esi
shrl $0x10, %r13d
andl %eax, %r13d
movzbl (%rdx,%r13), %eax
shll $0x8, %eax
orl %esi, %eax
shrl $0x18, %r12d
movzbl (%rdx,%r12), %ecx
orl %eax, %ecx
orl $0x1, %ecx
movq -0x38(%rbp), %r15
movl %ecx, 0x18(%r15)
movq 0xa8(%rbx), %rsi
movl 0xbc(%rbx), %r8d
movq %r14, %rdi
movq %r15, %rdx
movq -0x30(%rbp), %r14
movq %r14, %rcx
callq 0xa7405
testq %rax, %rax
je 0x2f838
movq %r14, %rdi
movq %r15, %rsi
callq 0xa6e2f
pushq $0x1
popq %rdx
jmp 0x2f874
movl 0xc0(%rbx), %eax
pushq $0x1
popq %rcx
lock
xaddl %ecx, 0xc4(%rbx)
cvtsi2sd %ecx, %xmm0
movsd 0xb254b(%rip), %xmm1 # 0xe1da0
addsd %xmm1, %xmm0
cvtsi2sd %eax, %xmm2
divsd %xmm2, %xmm0
xorl %edx, %edx
ucomisd %xmm1, %xmm0
jbe 0x2f874
leal (%rax,%rax), %ecx
lock
cmpxchgl %ecx, 0xc0(%rbx)
movl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movq -0x30(%rbp), %rcx
callq 0x2f8a8
pushq $-0x1
popq %rdx
testl %eax, %eax
je 0x2f7b3
jmp 0x2f874
pushq $-0x1
jmp 0x2f835
| lf_hash_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call lf_alloc_new
push 0FFFFFFFFFFFFFFFFh
pop rdx
test rax, rax
jz loc_2F874
mov r12, rax
mov [rbp+var_30], r14
lea r14, [rax+20h]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call qword ptr [rbx+98h]
mov r15, r12
add r15, 10h
mov rax, [rbx+90h]
test rax, rax
jz short loc_2F74D
mov rdi, r14
mov rsi, r15
xor edx, edx
call rax
mov r14, rax
mov rdx, [r15]
jmp short loc_2F75F
loc_2F74D:
mov edx, [rbx+0B4h]
mov [r15], rdx
mov eax, [rbx+0B0h]
add r14, rax
loc_2F75F:
mov [rbp+var_38], r12
mov [r12+8], r14
mov rdi, [rbx+0A8h]
mov rsi, r14
call qword ptr [rbx+0A0h]
mov r13d, eax
mov r12d, eax
and r12d, 7FFFFFFFh
mov eax, r12d
xor edx, edx
idiv dword ptr [rbx+0C0h]
mov r15d, edx
mov rdi, rbx
mov esi, edx
call lf_dynarray_lvalue
test rax, rax
jz loc_2F8A4
mov r14, rax
cmp qword ptr [rax], 0
jz loc_2F885
loc_2F7B3:
mov eax, 0FFh
mov ecx, r13d
and ecx, eax
lea rdx, _my_bits_reverse_table
movzx ecx, byte ptr [rdx+rcx]
shl ecx, 18h
mov esi, r13d
shr esi, 8
and esi, eax
movzx esi, byte ptr [rdx+rsi]
shl esi, 10h
or esi, ecx
shr r13d, 10h
and r13d, eax
movzx eax, byte ptr [rdx+r13]
shl eax, 8
or eax, esi
shr r12d, 18h
movzx ecx, byte ptr [rdx+r12]
or ecx, eax
or ecx, 1
mov r15, [rbp+var_38]
mov [r15+18h], ecx
mov rsi, [rbx+0A8h]
mov r8d, [rbx+0BCh]
mov rdi, r14
mov rdx, r15
mov r14, [rbp+var_30]
mov rcx, r14
call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint)
test rax, rax
jz short loc_2F838
mov rdi, r14
mov rsi, r15
call lf_pinbox_free
push 1
loc_2F835:
pop rdx
jmp short loc_2F874
loc_2F838:
mov eax, [rbx+0C0h]
push 1
pop rcx
lock xadd [rbx+0C4h], ecx
cvtsi2sd xmm0, ecx
movsd xmm1, cs:qword_E1DA0
addsd xmm0, xmm1
cvtsi2sd xmm2, eax
divsd xmm0, xmm2
xor edx, edx
ucomisd xmm0, xmm1
jbe short loc_2F874
lea ecx, [rax+rax]
lock cmpxchg [rbx+0C0h], ecx
loc_2F874:
mov eax, edx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F885:
mov rdi, rbx
mov rsi, r14
mov edx, r15d
mov rcx, [rbp+var_30]
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
push 0FFFFFFFFFFFFFFFFh
pop rdx
test eax, eax
jz loc_2F7B3
jmp short loc_2F874
loc_2F8A4:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_2F835
| long long lf_hash_insert(long long a1, long long a2, long long a3)
{
long long v4; // rax
unsigned int v5; // edx
long long v6; // r12
long long v7; // r14
long long *v8; // r15
long long ( *v9)(long long, long long, _QWORD); // rax
long long v10; // r14
long long v11; // rdx
int v12; // r13d
unsigned int v13; // r15d
_QWORD *v14; // rax
_QWORD *v15; // r14
signed __int32 v16; // eax
int v18; // eax
v4 = lf_alloc_new(a2);
v5 = -1;
if ( v4 )
{
v6 = v4;
v7 = v4 + 32;
(*(void ( **)(long long, long long, long long))(a1 + 152))(a1, v4 + 32, a3);
v8 = (long long *)(v6 + 16);
v9 = *(long long ( **)(long long, long long, _QWORD))(a1 + 144);
if ( v9 )
{
v10 = v9(v7, v6 + 16, 0LL);
v11 = *v8;
}
else
{
v11 = *(unsigned int *)(a1 + 180);
*v8 = v11;
v10 = *(unsigned int *)(a1 + 176) + v7;
}
*(_QWORD *)(v6 + 8) = v10;
v12 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 160))(*(_QWORD *)(a1 + 168), v10, v11);
v13 = (v12 & 0x7FFFFFFFu) % (long long)*(int *)(a1 + 192);
v14 = (_QWORD *)lf_dynarray_lvalue(a1, v13);
if ( !v14 )
return (unsigned int)-1;
v15 = v14;
if ( !*v14 )
{
v18 = initialize_bucket(a1, v14, v13, a2);
v5 = -1;
if ( v18 )
return v5;
}
*(_DWORD *)(v6 + 24) = (my_bits_reverse_table[(unsigned __int8)v12] << 24) | (my_bits_reverse_table[BYTE1(v12)] << 16) | (my_bits_reverse_table[BYTE2(v12)] << 8) | my_bits_reverse_table[(v12 & 0x7FFFFFFFu) >> 24] | 1;
if ( l_insert(v15, *(_QWORD *)(a1 + 168), v6, a2, *(unsigned int *)(a1 + 188)) )
{
lf_pinbox_free(a2, v6);
return 1;
}
v16 = *(_DWORD *)(a1 + 192);
v5 = 0;
if ( ((double)_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 196), 1u) + 1.0) / (double)v16 > 1.0 )
_InterlockedCompareExchange((volatile signed __int32 *)(a1 + 192), 2 * v16, v16);
}
return v5;
}
| lf_hash_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001a6f57
PUSH -0x1
POP RDX
TEST RAX,RAX
JZ 0x0012f874
MOV R12,RAX
MOV qword ptr [RBP + -0x30],R14
LEA R14,[RAX + 0x20]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL qword ptr [RBX + 0x98]
MOV R15,R12
ADD R15,0x10
MOV RAX,qword ptr [RBX + 0x90]
TEST RAX,RAX
JZ 0x0012f74d
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
CALL RAX
MOV R14,RAX
MOV RDX,qword ptr [R15]
JMP 0x0012f75f
LAB_0012f74d:
MOV EDX,dword ptr [RBX + 0xb4]
MOV qword ptr [R15],RDX
MOV EAX,dword ptr [RBX + 0xb0]
ADD R14,RAX
LAB_0012f75f:
MOV qword ptr [RBP + -0x38],R12
MOV qword ptr [R12 + 0x8],R14
MOV RDI,qword ptr [RBX + 0xa8]
MOV RSI,R14
CALL qword ptr [RBX + 0xa0]
MOV R13D,EAX
MOV R12D,EAX
AND R12D,0x7fffffff
MOV EAX,R12D
XOR EDX,EDX
IDIV dword ptr [RBX + 0xc0]
MOV R15D,EDX
MOV RDI,RBX
MOV ESI,EDX
CALL 0x0012f59a
TEST RAX,RAX
JZ 0x0012f8a4
MOV R14,RAX
CMP qword ptr [RAX],0x0
JZ 0x0012f885
LAB_0012f7b3:
MOV EAX,0xff
MOV ECX,R13D
AND ECX,EAX
LEA RDX,[0x1e2d30]
MOVZX ECX,byte ptr [RDX + RCX*0x1]
SHL ECX,0x18
MOV ESI,R13D
SHR ESI,0x8
AND ESI,EAX
MOVZX ESI,byte ptr [RDX + RSI*0x1]
SHL ESI,0x10
OR ESI,ECX
SHR R13D,0x10
AND R13D,EAX
MOVZX EAX,byte ptr [RDX + R13*0x1]
SHL EAX,0x8
OR EAX,ESI
SHR R12D,0x18
MOVZX ECX,byte ptr [RDX + R12*0x1]
OR ECX,EAX
OR ECX,0x1
MOV R15,qword ptr [RBP + -0x38]
MOV dword ptr [R15 + 0x18],ECX
MOV RSI,qword ptr [RBX + 0xa8]
MOV R8D,dword ptr [RBX + 0xbc]
MOV RDI,R14
MOV RDX,R15
MOV R14,qword ptr [RBP + -0x30]
MOV RCX,R14
CALL 0x001a7405
TEST RAX,RAX
JZ 0x0012f838
MOV RDI,R14
MOV RSI,R15
CALL 0x001a6e2f
PUSH 0x1
LAB_0012f835:
POP RDX
JMP 0x0012f874
LAB_0012f838:
MOV EAX,dword ptr [RBX + 0xc0]
PUSH 0x1
POP RCX
XADD.LOCK dword ptr [RBX + 0xc4],ECX
CVTSI2SD XMM0,ECX
MOVSD XMM1,qword ptr [0x001e1da0]
ADDSD XMM0,XMM1
CVTSI2SD XMM2,EAX
DIVSD XMM0,XMM2
XOR EDX,EDX
UCOMISD XMM0,XMM1
JBE 0x0012f874
LEA ECX,[RAX + RAX*0x1]
CMPXCHG.LOCK dword ptr [RBX + 0xc0],ECX
LAB_0012f874:
MOV EAX,EDX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f885:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0012f8a8
PUSH -0x1
POP RDX
TEST EAX,EAX
JZ 0x0012f7b3
JMP 0x0012f874
LAB_0012f8a4:
PUSH -0x1
JMP 0x0012f835
|
int4 lf_hash_insert(st_lf_hash *param_1,LF_PINS *param_2,int8 param_3)
{
st_lf_hash *psVar1;
int iVar2;
uint uVar3;
int iVar4;
LF_SLIST *pLVar5;
LF_SLIST *pLVar6;
LF_SLIST **ppLVar7;
long lVar8;
int4 uVar9;
ulong uVar10;
LF_SLIST *pLVar11;
pLVar5 = (LF_SLIST *)lf_alloc_new(param_2);
uVar9 = 0xffffffff;
if (pLVar5 != (LF_SLIST *)0x0) {
pLVar6 = pLVar5 + 0x20;
(**(code **)(param_1 + 0x98))(param_1,pLVar6,param_3);
pLVar11 = pLVar5 + 0x10;
if (*(code **)(param_1 + 0x90) == (code *)0x0) {
uVar10 = (ulong)*(uint *)(param_1 + 0xb4);
*(ulong *)pLVar11 = uVar10;
pLVar6 = pLVar6 + *(uint *)(param_1 + 0xb0);
}
else {
pLVar6 = (LF_SLIST *)(**(code **)(param_1 + 0x90))(pLVar6,pLVar11,0);
uVar10 = *(ulong *)pLVar11;
}
*(LF_SLIST **)(pLVar5 + 8) = pLVar6;
uVar3 = (**(code **)(param_1 + 0xa0))(*(int8 *)(param_1 + 0xa8),pLVar6,uVar10);
uVar10 = (long)(ulong)(uVar3 & 0x7fffffff) % (long)*(int *)(param_1 + 0xc0);
ppLVar7 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar10 & 0xffffffff);
if (ppLVar7 == (LF_SLIST **)0x0) {
uVar9 = 0xffffffff;
}
else {
if ((*ppLVar7 == (LF_SLIST *)0x0) &&
(iVar4 = initialize_bucket(param_1,ppLVar7,(uint)uVar10,param_2), iVar4 != 0)) {
return 0xffffffff;
}
*(uint *)(pLVar5 + 0x18) =
(uint)(byte)_my_bits_reverse_table[(uVar3 & 0x7fffffff) >> 0x18] |
(uint)(byte)_my_bits_reverse_table[uVar3 >> 0x10 & 0xff] << 8 |
(uint)(byte)_my_bits_reverse_table[uVar3 >> 8 & 0xff] << 0x10 |
(uint)(byte)_my_bits_reverse_table[uVar3 & 0xff] << 0x18 | 1;
lVar8 = l_insert(ppLVar7,*(charset_info_st **)(param_1 + 0xa8),pLVar5,param_2,
*(uint *)(param_1 + 0xbc));
if (lVar8 == 0) {
iVar2 = *(int *)(param_1 + 0xc0);
LOCK();
psVar1 = param_1 + 0xc4;
iVar4 = *(int *)psVar1;
*(int *)psVar1 = *(int *)psVar1 + 1;
UNLOCK();
uVar9 = 0;
if (DAT_001e1da0 < ((double)iVar4 + DAT_001e1da0) / (double)iVar2) {
LOCK();
if (iVar2 == *(int *)(param_1 + 0xc0)) {
*(int *)(param_1 + 0xc0) = iVar2 * 2;
}
UNLOCK();
uVar9 = 0;
}
}
else {
lf_pinbox_free(param_2,pLVar5);
uVar9 = 1;
}
}
}
return uVar9;
}
|
|
1,108 | coro::net::make_socket(coro::net::socket::options const&) | AlayaLite/build_O3/_deps/libcoro-src/src/net/socket.cpp | auto make_socket(const socket::options& opts) -> socket
{
socket s{::socket(static_cast<int>(opts.domain), socket::type_to_os(opts.type), 0)};
if (s.native_handle() < 0)
{
throw std::runtime_error{"Failed to create socket."};
}
if (opts.blocking == socket::blocking_t::no)
{
if (s.blocking(socket::blocking_t::no) == false)
{
throw std::runtime_error{"Failed to set socket to non-blocking mode."};
}
}
return s;
} | O3 | cpp | coro::net::make_socket(coro::net::socket::options const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ebp
movl 0x4(%rsi), %edi
callq 0x84b0
movl %ebp, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x3080
movl %eax, (%rbx)
testl %eax, %eax
js 0x864f
cmpl $0x1, 0x8(%r14)
jne 0x8641
movq %rbx, %rdi
movl $0x1, %esi
callq 0x857a
testb %al, %al
je 0x866d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1e3b(%rip), %rsi # 0xa49e
movq %rax, %rdi
callq 0x3100
jmp 0x8689
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1e36(%rip), %rsi # 0xa4b7
movq %rax, %rdi
callq 0x3100
movq 0x6960(%rip), %rsi # 0xeff0
movq 0x6909(%rip), %rdx # 0xefa0
movq %r14, %rdi
callq 0x3410
jmp 0x86a1
movq %rax, %r15
movq %r14, %rdi
callq 0x31f0
jmp 0x86b1
movq %rax, %r15
movq %rbx, %rdi
callq 0x8808
movq %r15, %rdi
callq 0x3430
| _ZN4coro3net11make_socketERKNS0_6socket7optionsE:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov ebp, [rsi]
mov edi, [rsi+4]
call _ZN4coro3net6socket10type_to_osENS1_6type_tE; coro::net::socket::type_to_os(coro::net::socket::type_t)
mov edi, ebp
mov esi, eax
xor edx, edx
call _socket
mov [rbx], eax
test eax, eax
js short loc_864F
cmp dword ptr [r14+8], 1
jnz short loc_8641
mov rdi, rbx
mov esi, 1
call _ZN4coro3net6socket8blockingENS1_10blocking_tE; coro::net::socket::blocking(coro::net::socket::blocking_t)
test al, al
jz short loc_866D
loc_8641:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_864F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFailedToCreate; "Failed to create socket."
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_8689
loc_866D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFailedToSetSoc; "Failed to set socket to non-blocking mo"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_8689:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_86A1:
mov r15, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_86B1
mov r15, rax
loc_86B1:
mov rdi, rbx; this
call _ZN4coro3net6socketD2Ev; coro::net::socket::~socket()
mov rdi, r15
call __Unwind_Resume
| unsigned int * coro::net::make_socket(unsigned int *a1, unsigned int *a2)
{
unsigned int v2; // ebp
unsigned int v3; // eax
int v4; // eax
std::runtime_error *exception; // r14
v2 = *a2;
v3 = coro::net::socket::type_to_os(a2[1]);
v4 = socket(v2, v3, 0LL);
*a1 = v4;
if ( v4 < 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Failed to create socket.");
goto LABEL_7;
}
if ( a2[2] == 1 && !(unsigned __int8)coro::net::socket::blocking(a1, 1) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Failed to set socket to non-blocking mode.");
LABEL_7:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1;
}
| make_socket:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EBP,dword ptr [RSI]
MOV EDI,dword ptr [RSI + 0x4]
CALL 0x001084b0
MOV EDI,EBP
MOV ESI,EAX
XOR EDX,EDX
CALL 0x00103080
MOV dword ptr [RBX],EAX
TEST EAX,EAX
JS 0x0010864f
CMP dword ptr [R14 + 0x8],0x1
JNZ 0x00108641
LAB_00108630:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0010857a
LAB_0010863d:
TEST AL,AL
JZ 0x0010866d
LAB_00108641:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0010864f:
MOV EDI,0x10
CALL 0x00103150
MOV R14,RAX
LAB_0010865c:
LEA RSI,[0x10a49e]
MOV RDI,RAX
CALL 0x00103100
LAB_0010866b:
JMP 0x00108689
LAB_0010866d:
MOV EDI,0x10
CALL 0x00103150
MOV R14,RAX
LAB_0010867a:
LEA RSI,[0x10a4b7]
MOV RDI,RAX
CALL 0x00103100
LAB_00108689:
MOV RSI,qword ptr [0x0010eff0]
MOV RDX,qword ptr [0x0010efa0]
MOV RDI,R14
CALL 0x00103410
|
/* coro::net::make_socket(coro::net::socket::options const&) */
net * __thiscall coro::net::make_socket(net *this,options *param_1)
{
char cVar1;
int __type;
int iVar2;
runtime_error *this_00;
iVar2 = *(int *)param_1;
__type = socket::type_to_os(*(int4 *)(param_1 + 4));
iVar2 = ::socket(iVar2,__type,0);
*(int *)this = iVar2;
if (iVar2 < 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0010865c to 0010866a has its CatchHandler @ 001086a1 */
std::runtime_error::runtime_error(this_00,"Failed to create socket.");
LAB_00108689:
/* try { // try from 00108689 to 0010869e has its CatchHandler @ 001086ae */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0010eff0,PTR__runtime_error_0010efa0);
}
if (*(int *)(param_1 + 8) == 1) {
/* try { // try from 00108630 to 0010863c has its CatchHandler @ 001086ae */
cVar1 = socket::blocking((socket *)this,1);
if (cVar1 == '\0') {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0010867a to 00108688 has its CatchHandler @ 0010869f */
std::runtime_error::runtime_error(this_00,"Failed to set socket to non-blocking mode.");
goto LAB_00108689;
}
}
return this;
}
|
|
1,109 | common_init() | monkey531[P]llama/common/common.cpp | void common_init() {
llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) {
if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) {
common_log_add(common_log_main(), level, "%s", text);
}
}, NULL);
#ifdef NDEBUG
const char * build_type = "";
#else
const char * build_type = " (debug)";
#endif
LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type);
} | O2 | cpp | common_init():
pushq %rax
leaq 0x44f4(%rip), %rdi # 0x57f44
xorl %esi, %esi
callq 0x24ff0
leaq 0xad9da(%rip), %rax # 0x101438
cmpl $0x0, (%rax)
js 0x53aae
callq 0x9685e
leaq 0xad2c9(%rip), %rcx # 0x100d38
movl (%rcx), %ecx
leaq 0xad2c8(%rip), %rdx # 0x100d40
movq (%rdx), %r8
leaq 0xad2c6(%rip), %rdx # 0x100d48
movq (%rdx), %r9
leaq 0xad2c4(%rip), %r10 # 0x100d50
leaq 0x5de46(%rip), %r11 # 0xb18d9
leaq 0x60f43(%rip), %rdx # 0xb49dd
pushq $0x2
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
pushq %r11
pushq (%r10)
callq 0x968f6
popq %rax
popq %rcx
popq %rax
retq
| _Z11common_initv:
push rax
lea rdi, _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv; common_init(void)::$_0::__invoke(ggml_log_level,char const*,void *)
xor esi, esi
call _llama_log_set
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_53AAE
call _Z15common_log_mainv; common_log_main(void)
lea rcx, LLAMA_BUILD_NUMBER
mov ecx, [rcx]
lea rdx, LLAMA_COMMIT
mov r8, [rdx]
lea rdx, LLAMA_COMPILER
mov r9, [rdx]
lea r10, LLAMA_BUILD_TARGET
lea r11, aErrorWhileHand_0+34h; ""
lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n"
push 2
pop rsi
mov rdi, rax
xor eax, eax
push r11
push qword ptr [r10]
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
pop rax
pop rcx
loc_53AAE:
pop rax
retn
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> common_init(void)
{
int v0; // eax
llama_log_set(common_init(void)::$_0::__invoke, 0LL);
if ( common_log_verbosity_thold >= 0 )
{
v0 = common_log_main();
common_log_add(
v0,
2,
(unsigned int)"build: %d (%s) with %s for %s%s\n",
LLAMA_BUILD_NUMBER,
LLAMA_COMMIT[0],
LLAMA_COMPILER[0]);
}
}
| common_init:
PUSH RAX
LEA RDI,[0x157f44]
XOR ESI,ESI
CALL 0x00124ff0
LEA RAX,[0x201438]
CMP dword ptr [RAX],0x0
JS 0x00153aae
CALL 0x0019685e
LEA RCX,[0x200d38]
MOV ECX,dword ptr [RCX]
LEA RDX,[0x200d40]
MOV R8,qword ptr [RDX]
LEA RDX,[0x200d48]
MOV R9,qword ptr [RDX]
LEA R10,[0x200d50]
LEA R11,[0x1b18d9]
LEA RDX,[0x1b49dd]
PUSH 0x2
POP RSI
MOV RDI,RAX
XOR EAX,EAX
PUSH R11
PUSH qword ptr [R10]
CALL 0x001968f6
POP RAX
POP RCX
LAB_00153aae:
POP RAX
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* common_init() */
int8 common_init(void)
{
int8 in_RAX;
int8 uVar1;
llama_log_set(common_init()::$_0::__invoke,0);
if (-1 < common_log_verbosity_thold) {
uVar1 = common_log_main();
common_log_add(uVar1,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT,
LLAMA_COMPILER,LLAMA_BUILD_TARGET,"");
}
return in_RAX;
}
|
|
1,110 | minja::Value::Value(char const*) | monkey531[P]llama/common/minja.hpp | Value(const char * v) : primitive_(std::string(v)) {} | O3 | cpp | minja::Value::Value(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x52796
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7f906
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9c0c0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9c0eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x9c0eb
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x9c0f9
callq 0x6d59a
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x9c107
callq 0x6d59a
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9c115
callq 0x6d59a
movq %rbx, %rdi
callq 0x875b2
movq %r14, %rdi
callq 0x1afc0
nop
| _ZN5minja5ValueC2EPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
lea rdi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rbx+40h]
lea rsi, [rsp+38h+var_30]
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_
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9C0C0
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9C0C0:
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9C0EB
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9C0EB
mov r14, rax
loc_9C0EB:
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_9C0F9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C0F9:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_9C107
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C107:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9C115
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C115:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| void minja::Value::Value(minja::Value *this, char *a2)
{
long long *v2; // [rsp+8h] [rbp-30h] BYREF
long long v3; // [rsp+18h] [rbp-20h] BYREF
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
std::string::basic_string<std::allocator<char>>(&v2, a2);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((char *)this + 64);
if ( v2 != &v3 )
operator delete(v2, v3 + 1);
}
| Value:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_0019c088:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00152796
LEA RDI,[RBX + 0x40]
LAB_0019c09b:
LEA RSI,[RSP + 0x8]
CALL 0x0017f906
LAB_0019c0a5:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019c0c0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8d0
LAB_0019c0c0:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::Value(char const*) */
void __thiscall minja::Value::Value(Value *this,char *param_1)
{
allocator local_31;
long *local_30 [2];
long local_20 [2];
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 0019c088 to 0019c096 has its CatchHandler @ 0019c0e8 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 0019c09b to 0019c0a4 has its CatchHandler @ 0019c0c8 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(this + 0x40,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return;
}
|
|
1,111 | link_to_file_list | eloqsql/mysys/mf_keycache.c | static void link_to_file_list(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block, int file,
my_bool unlink_block)
{
DBUG_ASSERT(block->status & BLOCK_IN_USE);
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
if (unlink_block)
unlink_changed(block);
link_changed(block, &keycache->file_blocks[FILE_HASH(file, keycache)]);
if (block->status & BLOCK_CHANGED)
{
block->status&= ~BLOCK_CHANGED;
keycache->blocks_changed--;
keycache->global_blocks_changed--;
}
} | O3 | c | link_to_file_list:
pushq %rbp
movq %rsp, %rbp
testb %cl, %cl
je 0x9853e
movq 0x10(%rsi), %rcx
movq 0x18(%rsi), %rax
testq %rcx, %rcx
je 0x98539
movq %rax, 0x18(%rcx)
movq 0x10(%rsi), %rcx
jmp 0x9853b
xorl %ecx, %ecx
movq %rcx, (%rax)
movq 0x130(%rdi), %rax
movl 0x3c(%rdi), %ecx
decl %ecx
andl %edx, %ecx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsi)
movq (%rax), %rcx
movq %rcx, 0x10(%rsi)
testq %rcx, %rcx
je 0x98568
leaq 0x10(%rsi), %rdx
movq %rdx, 0x18(%rcx)
movq %rsi, (%rax)
movl 0x50(%rsi), %eax
testb $0x20, %al
je 0x98583
andl $-0x21, %eax
movl %eax, 0x50(%rsi)
decq 0x60(%rdi)
decq 0x138(%rdi)
popq %rbp
retq
| link_to_file_list_0:
push rbp
mov rbp, rsp
test cl, cl
jz short loc_9853E
mov rcx, [rsi+10h]
mov rax, [rsi+18h]
test rcx, rcx
jz short loc_98539
mov [rcx+18h], rax
mov rcx, [rsi+10h]
jmp short loc_9853B
loc_98539:
xor ecx, ecx
loc_9853B:
mov [rax], rcx
loc_9853E:
mov rax, [rdi+130h]
mov ecx, [rdi+3Ch]
dec ecx
and ecx, edx
lea rax, [rax+rcx*8]
mov [rsi+18h], rax
mov rcx, [rax]
mov [rsi+10h], rcx
test rcx, rcx
jz short loc_98568
lea rdx, [rsi+10h]
mov [rcx+18h], rdx
loc_98568:
mov [rax], rsi
mov eax, [rsi+50h]
test al, 20h
jz short loc_98583
and eax, 0FFFFFFDFh
mov [rsi+50h], eax
dec qword ptr [rdi+60h]
dec qword ptr [rdi+138h]
loc_98583:
pop rbp
retn
| long long link_to_file_list_0(long long a1, long long a2, int a3, char a4)
{
long long v4; // rcx
_QWORD *v5; // rax
long long v6; // rcx
long long *v7; // rax
long long v8; // rcx
long long result; // rax
if ( a4 )
{
v4 = *(_QWORD *)(a2 + 16);
v5 = *(_QWORD **)(a2 + 24);
if ( v4 )
{
*(_QWORD *)(v4 + 24) = v5;
v6 = *(_QWORD *)(a2 + 16);
}
else
{
v6 = 0LL;
}
*v5 = v6;
}
v7 = (long long *)(*(_QWORD *)(a1 + 304) + 8LL * (a3 & (unsigned int)(*(_DWORD *)(a1 + 60) - 1)));
*(_QWORD *)(a2 + 24) = v7;
v8 = *v7;
*(_QWORD *)(a2 + 16) = *v7;
if ( v8 )
*(_QWORD *)(v8 + 24) = a2 + 16;
*v7 = a2;
result = *(unsigned int *)(a2 + 80);
if ( (result & 0x20) != 0 )
{
result = (unsigned int)result & 0xFFFFFFDF;
*(_DWORD *)(a2 + 80) = result;
--*(_QWORD *)(a1 + 96);
--*(_QWORD *)(a1 + 312);
}
return result;
}
| link_to_file_list:
PUSH RBP
MOV RBP,RSP
TEST CL,CL
JZ 0x0019853e
MOV RCX,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x18]
TEST RCX,RCX
JZ 0x00198539
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RSI + 0x10]
JMP 0x0019853b
LAB_00198539:
XOR ECX,ECX
LAB_0019853b:
MOV qword ptr [RAX],RCX
LAB_0019853e:
MOV RAX,qword ptr [RDI + 0x130]
MOV ECX,dword ptr [RDI + 0x3c]
DEC ECX
AND ECX,EDX
LEA RAX,[RAX + RCX*0x8]
MOV qword ptr [RSI + 0x18],RAX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSI + 0x10],RCX
TEST RCX,RCX
JZ 0x00198568
LEA RDX,[RSI + 0x10]
MOV qword ptr [RCX + 0x18],RDX
LAB_00198568:
MOV qword ptr [RAX],RSI
MOV EAX,dword ptr [RSI + 0x50]
TEST AL,0x20
JZ 0x00198583
AND EAX,0xffffffdf
MOV dword ptr [RSI + 0x50],EAX
DEC qword ptr [RDI + 0x60]
DEC qword ptr [RDI + 0x138]
LAB_00198583:
POP RBP
RET
|
void link_to_file_list(long param_1,long param_2,uint param_3,char param_4)
{
long *plVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
if (param_4 != '\0') {
puVar2 = *(int8 **)(param_2 + 0x18);
if (*(long *)(param_2 + 0x10) == 0) {
uVar4 = 0;
}
else {
*(int8 **)(*(long *)(param_2 + 0x10) + 0x18) = puVar2;
uVar4 = *(int8 *)(param_2 + 0x10);
}
*puVar2 = uVar4;
}
plVar1 = (long *)(*(long *)(param_1 + 0x130) +
(ulong)(*(int *)(param_1 + 0x3c) - 1U & param_3) * 8);
*(long **)(param_2 + 0x18) = plVar1;
lVar3 = *plVar1;
*(long *)(param_2 + 0x10) = lVar3;
if (lVar3 != 0) {
*(long *)(lVar3 + 0x18) = param_2 + 0x10;
}
*plVar1 = param_2;
if ((*(uint *)(param_2 + 0x50) & 0x20) != 0) {
*(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xffffffdf;
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1;
*(long *)(param_1 + 0x138) = *(long *)(param_1 + 0x138) + -1;
}
return;
}
|
|
1,112 | mysql_list_tables_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_tables_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_tables,
(parms->mysql, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_tables_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq %rax, %rdi
callq 0x1f1e6
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_tables_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdi, rax
call mysql_list_tables
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_tables_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8));
*(_QWORD *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_list_tables_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDI,RAX
CALL 0x0011f1e6
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_tables_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_tables(*param_1,param_1[1]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
1,113 | mi_open_keyfile | eloqsql/storage/myisam/mi_open.c | int mi_open_keyfile(MYISAM_SHARE *share)
{
if ((share->kfile= mysql_file_open(mi_key_file_kfile,
share->unique_file_name,
share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS | MY_WME))) < 0)
return 1;
return 0;
} | O0 | c | mi_open_keyfile:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xbc0739(%rip), %rax # 0xc7a29c
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x258(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x358(%rax), %r8d
orl $0x0, %r8d
orl $0x20000, %r8d # imm = 0x20000
orl $0x80000, %r8d # imm = 0x80000
leaq 0x99e08(%rip), %rsi # 0x15399c
movl $0x504, %edx # imm = 0x504
movl $0x210, %r9d # imm = 0x210
callq 0xb48e0
movq -0x10(%rbp), %rcx
movl %eax, 0x350(%rcx)
cmpl $0x0, %eax
jge 0xb9bbc
movl $0x1, -0x4(%rbp)
jmp 0xb9bc3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| mi_open_keyfile:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
lea rax, mi_key_file_kfile
mov edi, [rax]
mov rax, [rbp+var_10]
mov rcx, [rax+258h]
mov rax, [rbp+var_10]
mov r8d, [rax+358h]
or r8d, 0
or r8d, 20000h
or r8d, 80000h
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 504h
mov r9d, 210h
call inline_mysql_file_open_2
mov rcx, [rbp+var_10]
mov [rcx+350h], eax
cmp eax, 0
jge short loc_B9BBC
mov [rbp+var_4], 1
jmp short loc_B9BC3
loc_B9BBC:
mov [rbp+var_4], 0
loc_B9BC3:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| _BOOL8 mi_open_keyfile(long long a1)
{
int v1; // eax
v1 = inline_mysql_file_open_2(
mi_key_file_kfile,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x504u,
*(_QWORD *)(a1 + 600),
*(_DWORD *)(a1 + 856) | 0xA0000u,
528LL);
*(_DWORD *)(a1 + 848) = v1;
return v1 < 0;
}
| mi_open_keyfile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0xd7a29c]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x258]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0x358]
OR R8D,0x0
OR R8D,0x20000
OR R8D,0x80000
LEA RSI,[0x25399c]
MOV EDX,0x504
MOV R9D,0x210
CALL 0x001b48e0
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX + 0x350],EAX
CMP EAX,0x0
JGE 0x001b9bbc
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b9bc3
LAB_001b9bbc:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b9bc3:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
bool mi_open_keyfile(long param_1)
{
int iVar1;
iVar1 = inline_mysql_file_open
(mi_key_file_kfile,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504,
*(int8 *)(param_1 + 600),*(uint *)(param_1 + 0x358) | 0xa0000,0x210);
*(int *)(param_1 + 0x350) = iVar1;
return iVar1 < 0;
}
|
|
1,114 | mi_open_keyfile | eloqsql/storage/myisam/mi_open.c | int mi_open_keyfile(MYISAM_SHARE *share)
{
if ((share->kfile= mysql_file_open(mi_key_file_kfile,
share->unique_file_name,
share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS | MY_WME))) < 0)
return 1;
return 0;
} | O3 | c | mi_open_keyfile:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0xb7ef08(%rip), %rax # 0xbff51c
movl (%rax), %esi
movq 0x258(%rdi), %r15
movl $0xa0000, %r14d # imm = 0xA0000
orl 0x358(%rdi), %r14d
leaq 0x3059df(%rip), %r13 # 0x386010
movq (%r13), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r12
movl $0x2, %edx
movq %r15, %rcx
movq %r12, %r8
callq *0x148(%rax)
movq %rax, (%r12)
testq %rax, %rax
jne 0x80687
movl $0x210, %edx # imm = 0x210
movq %r15, %rdi
movl %r14d, %esi
callq 0xa0380
movl %eax, %r14d
movl %r14d, 0x350(%rbx)
shrl $0x1f, %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rcx
leaq 0x5b4a2(%rip), %rsi # 0xdbb34
movq %rax, %rdi
movl $0x504, %edx # imm = 0x504
callq *0x1f0(%rcx)
movl $0x210, %edx # imm = 0x210
movq %r15, %rdi
movl %r14d, %esi
callq 0xa0380
movl %eax, %r14d
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %r14d, %esi
callq *0x200(%rax)
jmp 0x8066a
| mi_open_keyfile:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
lea rax, mi_key_file_kfile
mov esi, [rax]
mov r15, [rdi+258h]
mov r14d, offset loc_A0000
or r14d, [rdi+358h]
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_78]
lea r12, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r12
call qword ptr [rax+148h]
mov [r12], rax
test rax, rax
jnz short loc_80687
mov edx, 210h
mov rdi, r15
mov esi, r14d
call my_open
mov r14d, eax
loc_8066A:
mov [rbx+350h], r14d
shr r14d, 1Fh
mov eax, r14d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_80687:
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, 504h
call qword ptr [rcx+1F0h]
mov edx, 210h
mov rdi, r15
mov esi, r14d
call my_open
mov r14d, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, r14d
call qword ptr [rax+200h]
jmp short loc_8066A
| long long mi_open_keyfile(long long a1)
{
long long v1; // r15
unsigned int v2; // r14d
long long v3; // rax
long long v4; // r14
_BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF
long long v7[6]; // [rsp+50h] [rbp-30h] BYREF
v1 = *(_QWORD *)(a1 + 600);
v2 = *(_DWORD *)(a1 + 856) | (unsigned int)&loc_A0000;
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(
v6,
mi_key_file_kfile,
2LL,
v1,
v7);
v7[0] = v3;
if ( v3 )
{
((void ( *)(long long, const char *, long long))PSI_server[62])(
v3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
1284LL);
v4 = (unsigned int)my_open(v1, v2, 528LL);
((void ( *)(long long, long long))PSI_server[64])(v7[0], v4);
}
else
{
LODWORD(v4) = my_open(v1, v2, 528LL);
}
*(_DWORD *)(a1 + 848) = v4;
return (unsigned int)v4 >> 31;
}
| mi_open_keyfile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
LEA RAX,[0xcff51c]
MOV ESI,dword ptr [RAX]
MOV R15,qword ptr [RDI + 0x258]
MOV R14D,0xa0000
OR R14D,dword ptr [RDI + 0x358]
LEA R13,[0x486010]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x78]
LEA R12,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R12
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R12],RAX
TEST RAX,RAX
JNZ 0x00180687
MOV EDX,0x210
MOV RDI,R15
MOV ESI,R14D
CALL 0x001a0380
MOV R14D,EAX
LAB_0018066a:
MOV dword ptr [RBX + 0x350],R14D
SHR R14D,0x1f
MOV EAX,R14D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00180687:
MOV RCX,qword ptr [R13]
LEA RSI,[0x1dbb34]
MOV RDI,RAX
MOV EDX,0x504
CALL qword ptr [RCX + 0x1f0]
MOV EDX,0x210
MOV RDI,R15
MOV ESI,R14D
CALL 0x001a0380
MOV R14D,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,R14D
CALL qword ptr [RAX + 0x200]
JMP 0x0018066a
|
uint mi_open_keyfile(long param_1)
{
int8 uVar1;
uint uVar2;
int1 local_80 [72];
long local_38;
uVar1 = *(int8 *)(param_1 + 600);
uVar2 = *(uint *)(param_1 + 0x358) | 0xa0000;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,mi_key_file_kfile,2,uVar1,&local_38);
if (local_38 == 0) {
uVar2 = my_open(uVar1,uVar2,0x210);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504);
uVar2 = my_open(uVar1,uVar2,0x210);
(**(code **)(PSI_server + 0x200))(local_38,uVar2);
}
*(uint *)(param_1 + 0x350) = uVar2;
return uVar2 >> 0x1f;
}
|
|
1,115 | arena_add_block | eshkol/src/core/memory/arena.c | static Block* arena_add_block(Arena* arena, size_t min_size) {
assert(arena != NULL);
assert(min_size > 0);
// Double the block size for each new block, but at least min_size
size_t new_size = arena->current->size * 2;
if (new_size < min_size) new_size = min_size;
// Allocate new block
size_t header_size = sizeof(Block);
Block* block = malloc(header_size + new_size);
if (!block) return NULL;
// Initialize the block
block->next = NULL;
block->size = new_size;
block->used = 0;
// Add to arena
arena->current->next = block;
arena->current = block;
return block;
} | O0 | c | arena_add_block:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3259
jmp 0x3278
leaq 0x1e08(%rip), %rdi # 0x5068
leaq 0x2769(%rip), %rsi # 0x59d0
movl $0x6e, %edx
leaq 0x2930(%rip), %rcx # 0x5ba3
callq 0x1080
cmpq $0x0, -0x18(%rbp)
jbe 0x3281
jmp 0x32a0
leaq 0x2943(%rip), %rdi # 0x5bcb
leaq 0x2741(%rip), %rsi # 0x59d0
movl $0x6f, %edx
leaq 0x2908(%rip), %rcx # 0x5ba3
callq 0x1080
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x32c4
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x18, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq -0x20(%rbp), %rdi
callq 0x10d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x32ee
movq $0x0, -0x8(%rbp)
jmp 0x3332
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| arena_add_block:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_3259
jmp short loc_3278
loc_3259:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eshkol"...
mov edx, 6Eh ; 'n'
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
call ___assert_fail
loc_3278:
cmp [rbp+var_18], 0
jbe short loc_3281
jmp short loc_32A0
loc_3281:
lea rdi, aMinSize0; "min_size > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eshkol"...
mov edx, 6Fh ; 'o'
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
call ___assert_fail
loc_32A0:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+8]
shl rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_18]
jnb short loc_32C4
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_32C4:
mov [rbp+var_28], 18h
mov rdi, [rbp+var_28]
add rdi, [rbp+var_20]
call _malloc
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_32EE
mov [rbp+var_8], 0
jmp short loc_3332
loc_32EE:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov qword ptr [rax+10h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_3332:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _QWORD * arena_add_block(long long a1, unsigned long long a2)
{
_QWORD *v3; // [rsp+0h] [rbp-30h]
unsigned long long v4; // [rsp+10h] [rbp-20h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
110LL,
"Block *arena_add_block(Arena *, size_t)");
if ( !a2 )
__assert_fail(
"min_size > 0",
"/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
111LL,
"Block *arena_add_block(Arena *, size_t)");
v4 = 2LL * *(_QWORD *)(*(_QWORD *)a1 + 8LL);
if ( v4 < a2 )
v4 = a2;
v3 = (_QWORD *)malloc(v4 + 24);
if ( !v3 )
return 0LL;
*v3 = 0LL;
v3[1] = v4;
v3[2] = 0LL;
**(_QWORD **)a1 = v3;
*(_QWORD *)a1 = v3;
return v3;
}
| arena_add_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00103259
JMP 0x00103278
LAB_00103259:
LEA RDI,[0x105068]
LEA RSI,[0x1059d0]
MOV EDX,0x6e
LEA RCX,[0x105ba3]
CALL 0x00101080
LAB_00103278:
CMP qword ptr [RBP + -0x18],0x0
JBE 0x00103281
JMP 0x001032a0
LAB_00103281:
LEA RDI,[0x105bcb]
LEA RSI,[0x1059d0]
MOV EDX,0x6f
LEA RCX,[0x105ba3]
CALL 0x00101080
LAB_001032a0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SHL RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001032c4
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_001032c4:
MOV qword ptr [RBP + -0x28],0x18
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,qword ptr [RBP + -0x20]
CALL 0x001010d0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001032ee
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00103332
LAB_001032ee:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00103332:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 * arena_add_block(long *param_1,ulong param_2)
{
ulong local_28;
int8 *local_10;
if (param_1 == (long *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x6e,"Block *arena_add_block(Arena *, size_t)");
}
if (param_2 != 0) {
local_28 = *(long *)(*param_1 + 8) << 1;
if (local_28 < param_2) {
local_28 = param_2;
}
local_10 = (int8 *)malloc(local_28 + 0x18);
if (local_10 == (int8 *)0x0) {
local_10 = (int8 *)0x0;
}
else {
*local_10 = 0;
local_10[1] = local_28;
local_10[2] = 0;
*(int8 **)*param_1 = local_10;
*param_1 = (long)local_10;
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("min_size > 0","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x6f,"Block *arena_add_block(Arena *, size_t)");
}
|
|
1,116 | Test_CheckNOTNULL_Simple::RunTest() | ng-log[P]ng-log/src/logging_unittest.cc | TEST(CheckNOTNULL, Simple) {
int64 t;
void* ptr = static_cast<void*>(&t);
void* ref = CHECK_NOTNULL(ptr);
EXPECT_EQ(ptr, ref);
CHECK_NOTNULL(reinterpret_cast<char*>(ptr));
CHECK_NOTNULL(reinterpret_cast<unsigned char*>(ptr));
CHECK_NOTNULL(reinterpret_cast<int*>(ptr));
CHECK_NOTNULL(reinterpret_cast<int64*>(ptr));
} | O0 | cpp | Test_CheckNOTNULL_Simple::RunTest():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x5270d(%rip), %rdi # 0x6d114
movl $0x2de, %esi # imm = 0x2DE
leaq 0x52d90(%rip), %rdx # 0x6d7a3
leaq -0x10(%rbp), %rcx
callq 0x22b20
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x1aa64
movq 0x80564(%rip), %rax # 0x9af98
movq (%rax), %rdi
leaq 0x52d7f(%rip), %rsi # 0x6d7bd
leaq 0x541f6(%rip), %rdx # 0x6ec3b
leaq 0x52d89(%rip), %rcx # 0x6d7d5
leaq 0x52d85(%rip), %r8 # 0x6d7d8
movb $0x0, %al
callq 0xac60
movl $0x1, %edi
callq 0xaa10
jmp 0x1aa66
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x5269f(%rip), %rdi # 0x6d114
movl $0x2e0, %esi # imm = 0x2E0
leaq 0x52d5b(%rip), %rdx # 0x6d7dc
leaq -0x20(%rbp), %rcx
callq 0x22c10
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x5267b(%rip), %rdi # 0x6d114
movl $0x2e1, %esi # imm = 0x2E1
leaq 0x52d6a(%rip), %rdx # 0x6d80f
leaq -0x28(%rbp), %rcx
callq 0x22d00
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x52657(%rip), %rdi # 0x6d114
movl $0x2e2, %esi # imm = 0x2E2
leaq 0x52d82(%rip), %rdx # 0x6d84b
leaq -0x30(%rbp), %rcx
callq 0x22df0
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x52633(%rip), %rdi # 0x6d114
movl $0x2e3, %esi # imm = 0x2E3
leaq 0x52d90(%rip), %rdx # 0x6d87d
leaq -0x38(%rbp), %rcx
callq 0x22ee0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN24Test_CheckNOTNULL_Simple7RunTestEv:
push rbp
mov rbp, rsp
sub rsp, 40h
lea rax, [rbp+var_8]
mov [rbp+var_10], rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2DEh
lea rdx, aPtrMustBeNonNu; "'ptr' Must be non nullptr"
lea rcx, [rbp+var_10]
call _ZN5nglog8internal12CheckNotNullIRPvEET_PKciS6_OS4_; nglog::internal::CheckNotNull<void *&>(char const*,int,char const*,void *&&&)
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jz short loc_1AA64
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aCheckFailedSSS; "Check failed: %s %s %s\n"
lea rdx, aPtrOrigPtr+0Ch; "ptr"
lea rcx, asc_6D7D5; "=="
lea r8, aRef; "ref"
mov al, 0
call _fprintf
mov edi, 1
call _exit
loc_1AA64:
jmp short $+2
loc_1AA66:
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2E0h
lea rdx, aReinterpretCas; "'reinterpret_cast<char*>(ptr)' Must be "...
lea rcx, [rbp+var_20]
call _ZN5nglog8internal12CheckNotNullIPcEET_PKciS5_OS3_; nglog::internal::CheckNotNull<char *>(char const*,int,char const*,char *&&)
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2E1h
lea rdx, aReinterpretCas_0; "'reinterpret_cast<unsigned char*>(ptr)'"...
lea rcx, [rbp+var_28]
call _ZN5nglog8internal12CheckNotNullIPhEET_PKciS5_OS3_; nglog::internal::CheckNotNull<uchar *>(char const*,int,char const*,uchar *&&)
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2E2h
lea rdx, aReinterpretCas_1; "'reinterpret_cast<int*>(ptr)' Must be n"...
lea rcx, [rbp+var_30]
call _ZN5nglog8internal12CheckNotNullIPiEET_PKciS5_OS3_; nglog::internal::CheckNotNull<int *>(char const*,int,char const*,int *&&)
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 2E3h
lea rdx, aReinterpretCas_2; "'reinterpret_cast<int64*>(ptr)' Must be"...
lea rcx, [rbp+var_38]
call _ZN5nglog8internal12CheckNotNullIPlEET_PKciS5_OS3_; nglog::internal::CheckNotNull<long *>(char const*,int,char const*,long *&&)
add rsp, 40h
pop rbp
retn
| long long Test_CheckNOTNULL_Simple::RunTest(Test_CheckNOTNULL_Simple *this)
{
char *v2; // [rsp+8h] [rbp-38h] BYREF
char *v3; // [rsp+10h] [rbp-30h] BYREF
char *v4; // [rsp+18h] [rbp-28h] BYREF
char *v5; // [rsp+20h] [rbp-20h] BYREF
char *v6; // [rsp+28h] [rbp-18h]
char *v7; // [rsp+30h] [rbp-10h] BYREF
char v8; // [rsp+38h] [rbp-8h] BYREF
v7 = &v8;
v6 = *(char **)nglog::internal::CheckNotNull<void *&>(
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",
734LL,
"'ptr' Must be non nullptr",
&v7);
if ( v7 != v6 )
{
fprintf(stderr, "Check failed: %s %s %s\n", "ptr", "==", "ref");
exit(1LL);
}
v5 = v7;
nglog::internal::CheckNotNull<char *>(
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",
736LL,
"'reinterpret_cast<char*>(ptr)' Must be non nullptr",
&v5);
v4 = v7;
nglog::internal::CheckNotNull<unsigned char *>(
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",
737LL,
"'reinterpret_cast<unsigned char*>(ptr)' Must be non nullptr",
&v4);
v3 = v7;
nglog::internal::CheckNotNull<int *>(
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",
738LL,
"'reinterpret_cast<int*>(ptr)' Must be non nullptr",
&v3);
v2 = v7;
return nglog::internal::CheckNotNull<long *>(
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",
739LL,
"'reinterpret_cast<int64*>(ptr)' Must be non nullptr",
&v2);
}
| RunTest:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RAX,[RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[0x16d114]
MOV ESI,0x2de
LEA RDX,[0x16d7a3]
LEA RCX,[RBP + -0x10]
CALL 0x00122b20
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x0011aa64
MOV RAX,qword ptr [0x0019af98]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x16d7bd]
LEA RDX,[0x16ec3b]
LEA RCX,[0x16d7d5]
LEA R8,[0x16d7d8]
MOV AL,0x0
CALL 0x0010ac60
MOV EDI,0x1
CALL 0x0010aa10
LAB_0011aa64:
JMP 0x0011aa66
LAB_0011aa66:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[0x16d114]
MOV ESI,0x2e0
LEA RDX,[0x16d7dc]
LEA RCX,[RBP + -0x20]
CALL 0x00122c10
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x16d114]
MOV ESI,0x2e1
LEA RDX,[0x16d80f]
LEA RCX,[RBP + -0x28]
CALL 0x00122d00
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x16d114]
MOV ESI,0x2e2
LEA RDX,[0x16d84b]
LEA RCX,[RBP + -0x30]
CALL 0x00122df0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[0x16d114]
MOV ESI,0x2e3
LEA RDX,[0x16d87d]
LEA RCX,[RBP + -0x38]
CALL 0x00122ee0
ADD RSP,0x40
POP RBP
RET
|
/* Test_CheckNOTNULL_Simple::RunTest() */
void Test_CheckNOTNULL_Simple::RunTest(void)
{
void **ppvVar1;
long *local_40;
long *local_38;
long *local_30;
long *local_28;
long *local_20;
long *local_18;
long local_10;
local_18 = &local_10;
ppvVar1 = nglog::internal::CheckNotNull<void*&>
("/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc"
,0x2de,"\'ptr\' Must be non nullptr",&local_18);
local_20 = (long *)*ppvVar1;
if (local_18 != local_20) {
fprintf(*(FILE **)PTR_stderr_0019af98,"Check failed: %s %s %s\n","ptr",&DAT_0016d7d5,
&DAT_0016d7d8);
/* WARNING: Subroutine does not return */
exit(1);
}
local_28 = local_18;
nglog::internal::CheckNotNull<char*>
("/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x2e0
,"\'reinterpret_cast<char*>(ptr)\' Must be non nullptr",(char **)&local_28);
local_30 = local_18;
nglog::internal::CheckNotNull<unsigned_char*>
("/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x2e1
,"\'reinterpret_cast<unsigned char*>(ptr)\' Must be non nullptr",(uchar **)&local_30);
local_38 = local_18;
nglog::internal::CheckNotNull<int*>
("/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x2e2
,"\'reinterpret_cast<int*>(ptr)\' Must be non nullptr",(int **)&local_38);
local_40 = local_18;
nglog::internal::CheckNotNull<long*>
("/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging_unittest.cc",0x2e3
,"\'reinterpret_cast<int64*>(ptr)\' Must be non nullptr",&local_40);
return;
}
|
|
1,117 | Test_CheckNOTNULL_Simple::RunTest() | ng-log[P]ng-log/src/logging_unittest.cc | TEST(CheckNOTNULL, Simple) {
int64 t;
void* ptr = static_cast<void*>(&t);
void* ref = CHECK_NOTNULL(ptr);
EXPECT_EQ(ptr, ref);
CHECK_NOTNULL(reinterpret_cast<char*>(ptr));
CHECK_NOTNULL(reinterpret_cast<unsigned char*>(ptr));
CHECK_NOTNULL(reinterpret_cast<int*>(ptr));
CHECK_NOTNULL(reinterpret_cast<int64*>(ptr));
} | O2 | cpp | Test_CheckNOTNULL_Simple::RunTest():
pushq %rbx
subq $0x30, %rsp
movq %rsp, %rdi
callq 0x148de
callq 0x10ab2
movq %rsp, %rdi
callq 0x14920
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x14920
movq %rbx, %rdi
callq 0x8c30
nop
| _ZN24Test_CheckNOTNULL_Simple3RunEv:
push rbx
sub rsp, 30h
mov rdi, rsp; this
call _ZN5nglog9FlagSaverC2Ev; nglog::FlagSaver::FlagSaver(void)
call _ZN24Test_CheckNOTNULL_Simple7RunTestEv; Test_CheckNOTNULL_Simple::RunTest(void)
mov rdi, rsp; this
call _ZN5nglog9FlagSaverD2Ev; nglog::FlagSaver::~FlagSaver()
add rsp, 30h
pop rbx
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5nglog9FlagSaverD2Ev; nglog::FlagSaver::~FlagSaver()
mov rdi, rbx
call __Unwind_Resume
| void Test_CheckNOTNULL_Simple::Run(Test_CheckNOTNULL_Simple *this)
{
_BYTE v1[56]; // [rsp+0h] [rbp-38h] BYREF
nglog::FlagSaver::FlagSaver((nglog::FlagSaver *)v1);
Test_CheckNOTNULL_Simple::RunTest((Test_CheckNOTNULL_Simple *)v1);
nglog::FlagSaver::~FlagSaver((nglog::FlagSaver *)v1);
}
| Run:
PUSH RBX
SUB RSP,0x30
MOV RDI,RSP
CALL 0x001148de
LAB_0011612d:
CALL 0x00110ab2
LAB_00116132:
MOV RDI,RSP
CALL 0x00114920
ADD RSP,0x30
POP RBX
RET
|
/* Test_CheckNOTNULL_Simple::Run() */
void Test_CheckNOTNULL_Simple::Run(void)
{
FlagSaver aFStack_38 [48];
nglog::FlagSaver::FlagSaver(aFStack_38);
/* try { // try from 0011612d to 00116131 has its CatchHandler @ 00116140 */
RunTest();
nglog::FlagSaver::~FlagSaver(aFStack_38);
return;
}
|
|
1,118 | wqueue_add_to_queue | eloqsql/mysys/wqueue.c | void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread)
{
struct st_my_thread_var *last;
if (!(last= wqueue->last_thread))
thread->next= thread;
else
{
thread->next= last->next;
last->next= thread;
}
#ifndef DBUG_OFF
thread->prev= NULL; /* force segfault if used */
#endif
wqueue->last_thread= thread;
} | O3 | c | wqueue_add_to_queue:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
testq %rax, %rax
je 0xad2f9
movq 0x88(%rax), %rcx
addq $0x88, %rax
movq %rcx, 0x88(%rsi)
jmp 0xad300
leaq 0x88(%rsi), %rax
movq %rsi, (%rax)
movq %rsi, (%rdi)
popq %rbp
retq
| wqueue_add_to_queue:
push rbp
mov rbp, rsp
mov rax, [rdi]
test rax, rax
jz short loc_AD2F9
mov rcx, [rax+88h]
add rax, 88h
mov [rsi+88h], rcx
jmp short loc_AD300
loc_AD2F9:
lea rax, [rsi+88h]
loc_AD300:
mov [rax], rsi
mov [rdi], rsi
pop rbp
retn
| _QWORD * wqueue_add_to_queue(long long *a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_QWORD *result; // rax
v2 = *a1;
if ( *a1 )
{
v3 = *(_QWORD *)(v2 + 136);
result = (_QWORD *)(v2 + 136);
*(_QWORD *)(a2 + 136) = v3;
}
else
{
result = (_QWORD *)(a2 + 136);
}
*result = a2;
*a1 = a2;
return result;
}
| wqueue_add_to_queue:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001ad2f9
MOV RCX,qword ptr [RAX + 0x88]
ADD RAX,0x88
MOV qword ptr [RSI + 0x88],RCX
JMP 0x001ad300
LAB_001ad2f9:
LEA RAX,[RSI + 0x88]
LAB_001ad300:
MOV qword ptr [RAX],RSI
MOV qword ptr [RDI],RSI
POP RBP
RET
|
void wqueue_add_to_queue(long *param_1,long param_2)
{
long lVar1;
long *plVar2;
lVar1 = *param_1;
if (lVar1 == 0) {
plVar2 = (long *)(param_2 + 0x88);
}
else {
plVar2 = (long *)(lVar1 + 0x88);
*(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88);
}
*plVar2 = param_2;
*param_1 = param_2;
return;
}
|
|
1,119 | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) | Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h | void SetCell(const size_t pColumnIdx, const size_t pRowIdx, const T& pCell)
{
const size_t dataColumnIdx = GetDataColumnIndex(pColumnIdx);
const size_t dataRowIdx = GetDataRowIndex(pRowIdx);
while ((dataRowIdx + 1) > GetDataRowCount())
{
std::vector<std::string> row;
row.resize(GetDataColumnCount());
mData.push_back(row);
}
if ((dataColumnIdx + 1) > GetDataColumnCount())
{
for (auto itRow = mData.begin(); itRow != mData.end(); ++itRow)
{
if (std::distance(mData.begin(), itRow) >= mLabelParams.mColumnNameIdx)
{
itRow->resize(dataColumnIdx + 1);
}
}
}
std::string str;
Converter<T> converter(mConverterParams);
converter.ToStr(pCell, str);
mData.at(dataRowIdx).at(dataColumnIdx) = str;
} | O1 | c | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, %r14
movl 0x20(%rdi), %eax
movl 0x24(%rdi), %ecx
leal 0x1(%rcx), %esi
xorl %ebx, %ebx
cmpl $-0x1, %ecx
cmovll %ebx, %esi
movq %rsi, 0x48(%rsp)
leal 0x1(%rax), %ecx
cmpl $-0x1, %eax
cmovll %ebx, %ecx
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
leaq (%rcx,%rdx), %rbp
incq %rbp
movq 0x70(%rdi), %rax
movq 0x68(%rdi), %r13
subq %r13, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %rbp
jbe 0x201eb
leaq 0x68(%r14), %r12
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl 0x20(%r14), %ecx
testl %ecx, %ecx
cmovlel %ebx, %ecx
cmpq %rcx, %rax
jbe 0x201ac
leaq (%rcx,%rcx,2), %rax
movq 0x8(%r13,%rax,8), %rsi
subq (%r13,%rax,8), %rsi
sarq $0x5, %rsi
jmp 0x201ae
xorl %esi, %esi
movq %r15, %rdi
callq 0x1119c
movq %r12, %rdi
movq %r15, %rsi
callq 0x1e0ce
movq %r15, %rdi
callq 0x1064e
movq 0x68(%r14), %r13
movq 0x70(%r14), %rax
subq %r13, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %rbp
ja 0x2017a
movq 0x48(%rsp), %r12
addq 0x38(%rsp), %r12
leaq 0x1(%r12), %r15
movl 0x20(%r14), %ecx
testl %ecx, %ecx
cmovlel %ebx, %ecx
cmpq %rcx, %rax
jbe 0x2021a
leaq (%rcx,%rcx,2), %rax
movq 0x8(%r13,%rax,8), %rbx
subq (%r13,%rax,8), %rbx
sarq $0x5, %rbx
cmpq %rbx, %r15
jbe 0x20263
cmpq 0x70(%r14), %r13
je 0x20263
movq %r13, %rbx
movq %rbx, %rax
subq 0x68(%r14), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movslq 0x20(%r14), %rcx
cmpq %rcx, %rax
jl 0x20255
movq %r13, %rdi
movq %r15, %rsi
callq 0x1119c
addq $0x18, %r13
addq $0x18, %rbx
cmpq 0x70(%r14), %r13
jne 0x20228
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x30(%r14), %rax
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
movq %rsp, %rdx
movq 0x40(%rsp), %rsi
callq 0x2034a
movq 0x30(%rsp), %rsi
addq 0x28(%rsp), %rsi
movq 0x68(%r14), %rax
movq 0x70(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x2030d
leaq (%rsi,%rsi,2), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq %r12, %rdx
jbe 0x2030a
shlq $0x5, %r12
addq %r12, %rdi
movq %rsp, %rsi
callq 0xb1f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x202fb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb400
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rsi
leaq 0x1d879(%rip), %rdi # 0x3db8d
xorl %eax, %eax
callq 0xb650
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x20341
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x20341
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1064e
movq %rbx, %rdi
callq 0xb780
nop
| _ZN8rapidcsv8Document7SetCellIiEEvmmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_48], rcx
mov [rsp+88h+var_50], rsi
mov r14, rdi
mov eax, [rdi+20h]
mov ecx, [rdi+24h]
lea esi, [rcx+1]
xor ebx, ebx
cmp ecx, 0FFFFFFFFh
cmovl esi, ebx
mov [rsp+88h+var_40], rsi
lea ecx, [rax+1]
cmp eax, 0FFFFFFFFh
cmovl ecx, ebx
mov [rsp+88h+var_58], rcx
mov [rsp+88h+var_60], rdx
lea rbp, [rcx+rdx]
inc rbp
mov rax, [rdi+70h]
mov r13, [rdi+68h]
sub rax, r13
sar rax, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
cmp rbp, rax
jbe short loc_201EB
lea r12, [r14+68h]
mov r15, rsp
loc_2017A:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+88h+var_88], xmm0
mov [rsp+88h+var_78], 0
mov ecx, [r14+20h]
test ecx, ecx
cmovle ecx, ebx
cmp rax, rcx
jbe short loc_201AC
lea rax, [rcx+rcx*2]
mov rsi, [r13+rax*8+8]
sub rsi, [r13+rax*8+0]
sar rsi, 5
jmp short loc_201AE
loc_201AC:
xor esi, esi
loc_201AE:
mov rdi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE9push_backERKS7_; std::vector<std::vector<std::string>>::push_back(std::vector<std::string> const&)
mov rdi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov r13, [r14+68h]
mov rax, [r14+70h]
sub rax, r13
sar rax, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
cmp rbp, rax
ja short loc_2017A
loc_201EB:
mov r12, [rsp+88h+var_40]
add r12, [rsp+88h+var_50]
lea r15, [r12+1]
mov ecx, [r14+20h]
test ecx, ecx
cmovle ecx, ebx
cmp rax, rcx
jbe short loc_2021A
lea rax, [rcx+rcx*2]
mov rbx, [r13+rax*8+8]
sub rbx, [r13+rax*8+0]
sar rbx, 5
loc_2021A:
cmp r15, rbx
jbe short loc_20263
cmp r13, [r14+70h]
jz short loc_20263
mov rbx, r13
loc_20228:
mov rax, rbx
sub rax, [r14+68h]
sar rax, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
movsxd rcx, dword ptr [r14+20h]
cmp rax, rcx
jl short loc_20255
mov rdi, r13
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
loc_20255:
add r13, 18h
add rbx, 18h
cmp r13, [r14+70h]
jnz short loc_20228
loc_20263:
lea r15, [rsp+88h+var_78]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
lea rax, [r14+30h]
lea rdi, [rsp+88h+var_38]
mov [rdi], rax
mov rdx, rsp
mov rsi, [rsp+88h+var_48]
call _ZNK8rapidcsv9ConverterIiE5ToStrERKiRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; rapidcsv::Converter<int>::ToStr(int const&,std::string &)
mov rsi, [rsp+88h+var_58]
add rsi, [rsp+88h+var_60]
mov rax, [r14+68h]
mov rdx, [r14+70h]
sub rdx, rax
sar rdx, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_2030D
lea rcx, [rsi+rsi*2]
mov rdi, [rax+rcx*8]
mov rdx, [rax+rcx*8+8]
sub rdx, rdi
sar rdx, 5
cmp rdx, r12
jbe short loc_2030A
shl r12, 5
add rdi, r12
mov rsi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r15
jz short loc_202FB
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_202FB:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2030A:
mov rsi, r12
loc_2030D:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r15
jz short loc_20341
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_20341
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_20341:
mov rdi, rbx
call __Unwind_Resume
| SetCell<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RCX
MOV qword ptr [RSP + 0x38],RSI
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x20]
MOV ECX,dword ptr [RDI + 0x24]
LEA ESI,[RCX + 0x1]
XOR EBX,EBX
CMP ECX,-0x1
CMOVL ESI,EBX
MOV qword ptr [RSP + 0x48],RSI
LEA ECX,[RAX + 0x1]
CMP EAX,-0x1
CMOVL ECX,EBX
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x28],RDX
LEA RBP,[RCX + RDX*0x1]
INC RBP
MOV RAX,qword ptr [RDI + 0x70]
MOV R13,qword ptr [RDI + 0x68]
SUB RAX,R13
SAR RAX,0x3
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
CMP RBP,RAX
JBE 0x001201eb
LEA R12,[R14 + 0x68]
MOV R15,RSP
LAB_0012017a:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV ECX,dword ptr [R14 + 0x20]
TEST ECX,ECX
CMOVLE ECX,EBX
CMP RAX,RCX
JBE 0x001201ac
LEA RAX,[RCX + RCX*0x2]
MOV RSI,qword ptr [R13 + RAX*0x8 + 0x8]
SUB RSI,qword ptr [R13 + RAX*0x8]
SAR RSI,0x5
JMP 0x001201ae
LAB_001201ac:
XOR ESI,ESI
LAB_001201ae:
MOV RDI,R15
CALL 0x0011119c
MOV RDI,R12
MOV RSI,R15
CALL 0x0011e0ce
LAB_001201c1:
MOV RDI,R15
CALL 0x0011064e
MOV R13,qword ptr [R14 + 0x68]
MOV RAX,qword ptr [R14 + 0x70]
SUB RAX,R13
SAR RAX,0x3
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
CMP RBP,RAX
JA 0x0012017a
LAB_001201eb:
MOV R12,qword ptr [RSP + 0x48]
ADD R12,qword ptr [RSP + 0x38]
LEA R15,[R12 + 0x1]
MOV ECX,dword ptr [R14 + 0x20]
TEST ECX,ECX
CMOVLE ECX,EBX
CMP RAX,RCX
JBE 0x0012021a
LEA RAX,[RCX + RCX*0x2]
MOV RBX,qword ptr [R13 + RAX*0x8 + 0x8]
SUB RBX,qword ptr [R13 + RAX*0x8]
SAR RBX,0x5
LAB_0012021a:
CMP R15,RBX
JBE 0x00120263
CMP R13,qword ptr [R14 + 0x70]
JZ 0x00120263
MOV RBX,R13
LAB_00120228:
MOV RAX,RBX
SUB RAX,qword ptr [R14 + 0x68]
SAR RAX,0x3
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOVSXD RCX,dword ptr [R14 + 0x20]
CMP RAX,RCX
JL 0x00120255
MOV RDI,R13
MOV RSI,R15
CALL 0x0011119c
LAB_00120255:
ADD R13,0x18
ADD RBX,0x18
CMP R13,qword ptr [R14 + 0x70]
JNZ 0x00120228
LAB_00120263:
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
LEA RAX,[R14 + 0x30]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RDI],RAX
LAB_00120284:
MOV RDX,RSP
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0012034a
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [R14 + 0x68]
MOV RDX,qword ptr [R14 + 0x70]
SUB RDX,RAX
SAR RDX,0x3
MOV RCX,-0x5555555555555555
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x0012030d
LEA RCX,[RSI + RSI*0x2]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RDX,qword ptr [RAX + RCX*0x8 + 0x8]
SUB RDX,RDI
SAR RDX,0x5
CMP RDX,R12
JBE 0x0012030a
SHL R12,0x5
ADD RDI,R12
MOV RSI,RSP
CALL 0x0010b1f0
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x001202fb
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b400
LAB_001202fb:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012030a:
MOV RSI,R12
LAB_0012030d:
LEA RDI,[0x13db8d]
XOR EAX,EAX
CALL 0x0010b650
LAB_0012031b:
MOV RBX,RAX
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00120341
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b400
JMP 0x00120341
LAB_00120341:
MOV RDI,RBX
CALL 0x0010b780
|
/* void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) */
void __thiscall
rapidcsv::Document::SetCell<int>(Document *this,ulong param_1,ulong param_2,int *param_3)
{
long lVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
ulong uVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6;
ulong uVar7;
ulong uVar8;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
ulong *local_88;
int8 uStack_80;
ulong local_78 [3];
ulong local_60;
ulong local_58;
ulong local_50;
int *local_48;
ulong local_40;
Document *local_38;
uVar5 = 0;
local_40 = (ulong)(*(int *)(this + 0x24) + 1);
if (*(int *)(this + 0x24) < -1) {
local_40 = uVar5;
}
local_58 = (ulong)(*(int *)(this + 0x20) + 1);
if (*(int *)(this + 0x20) < -1) {
local_58 = uVar5;
}
uVar7 = local_58 + param_2 + 1;
pvVar6 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x68);
uVar3 = (*(long *)(this + 0x70) - (long)pvVar6 >> 3) * -0x5555555555555555;
local_60 = param_2;
local_50 = param_1;
local_48 = param_3;
if (uVar3 < uVar7) {
do {
local_88 = (ulong *)0x0;
uStack_80 = 0;
local_78[0] = 0;
uVar8 = (ulong)*(uint *)(this + 0x20);
if ((int)*(uint *)(this + 0x20) < 1) {
uVar8 = uVar5;
}
if (uVar8 < uVar3) {
uVar3 = *(long *)(pvVar6 + uVar8 * 0x18 + 8) - *(long *)(pvVar6 + uVar8 * 0x18) >> 5;
}
else {
uVar3 = 0;
}
/* try { // try from 001201ae to 001201c0 has its CatchHandler @ 00120336 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88,
uVar3);
std::
vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::push_back((vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)(this + 0x68),(vector *)&local_88);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
pvVar6 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x68);
uVar3 = (*(long *)(this + 0x70) - (long)pvVar6 >> 3) * -0x5555555555555555;
} while (uVar3 < uVar7);
}
uVar8 = local_40 + local_50;
uVar7 = (ulong)*(uint *)(this + 0x20);
if ((int)*(uint *)(this + 0x20) < 1) {
uVar7 = uVar5;
}
if (uVar7 < uVar3) {
uVar5 = *(long *)(pvVar6 + uVar7 * 0x18 + 8) - *(long *)(pvVar6 + uVar7 * 0x18) >> 5;
}
if ((uVar5 < uVar8 + 1) &&
(this_00 = pvVar6,
pvVar6 != *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x70))
) {
do {
if ((long)*(int *)(this + 0x20) <=
((long)pvVar6 - *(long *)(this + 0x68) >> 3) * -0x5555555555555555) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
(this_00,uVar8 + 1);
}
this_00 = this_00 + 0x18;
pvVar6 = pvVar6 + 0x18;
} while (this_00 !=
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x70));
}
uStack_80 = 0;
local_78[0] = local_78[0] & 0xffffffffffffff00;
local_38 = this + 0x30;
local_88 = local_78;
/* try { // try from 00120284 to 0012031a has its CatchHandler @ 0012031b */
Converter<int>::ToStr((Converter<int> *)&local_38,local_48,(string *)&local_88);
uVar7 = local_58 + local_60;
lVar1 = *(long *)(this + 0x68);
uVar3 = (*(long *)(this + 0x70) - lVar1 >> 3) * -0x5555555555555555;
uVar5 = uVar7;
if ((uVar7 <= uVar3 && uVar3 - uVar7 != 0) &&
(lVar2 = *(long *)(lVar1 + uVar7 * 0x18), uVar5 = uVar8,
uVar8 < (ulong)(*(long *)(lVar1 + 8 + uVar7 * 0x18) - lVar2 >> 5))) {
std::__cxx11::string::_M_assign((string *)(lVar2 + uVar8 * 0x20));
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
return;
}
uVar4 = std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
uVar5);
/* catch() { ... } // from try @ 00120284 with catch @ 0012031b */
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
|
||
1,120 | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) | Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h | void SetCell(const size_t pColumnIdx, const size_t pRowIdx, const T& pCell)
{
const size_t dataColumnIdx = GetDataColumnIndex(pColumnIdx);
const size_t dataRowIdx = GetDataRowIndex(pRowIdx);
while ((dataRowIdx + 1) > GetDataRowCount())
{
std::vector<std::string> row;
row.resize(GetDataColumnCount());
mData.push_back(row);
}
if ((dataColumnIdx + 1) > GetDataColumnCount())
{
for (auto itRow = mData.begin(); itRow != mData.end(); ++itRow)
{
if (std::distance(mData.begin(), itRow) >= mLabelParams.mColumnNameIdx)
{
itRow->resize(dataColumnIdx + 1);
}
}
}
std::string str;
Converter<T> converter(mConverterParams);
converter.ToStr(pCell, str);
mData.at(dataRowIdx).at(dataColumnIdx) = str;
} | O2 | c | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x38(%rsp)
movq %rdi, %r15
movl 0x24(%rdi), %eax
leal 0x1(%rax), %ebx
xorl %ecx, %ecx
cmpl $-0x1, %eax
cmovll %ecx, %ebx
movl 0x20(%rdi), %eax
addq %rsi, %rbx
leal 0x1(%rax), %esi
cmpl $-0x1, %eax
cmovll %ecx, %esi
leaq (%rsi,%rdx), %rax
movq %rax, 0x30(%rsp)
leaq (%rsi,%rdx), %r14
incq %r14
leaq 0x68(%rdi), %r13
pushq $0x18
popq %r12
movq %rsp, %rbp
movq 0x70(%r15), %rax
subq 0x68(%r15), %rax
cqto
idivq %r12
cmpq %rax, %r14
jbe 0x1b791
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movq %r15, %rdi
callq 0x1b864
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10996
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1910e
movq %rbp, %rdi
callq 0x1010a
jmp 0x1b74a
movq %rbx, 0x28(%rsp)
leaq 0x1(%rbx), %rbp
movq %r15, %rdi
callq 0x1b864
cmpq %rax, %rbp
jbe 0x1b7de
movq (%r13), %rbx
movq %rbx, %r14
cmpq 0x70(%r15), %r14
je 0x1b7de
movq %rbx, %rax
subq 0x68(%r15), %rax
cqto
idivq %r12
movslq 0x20(%r15), %rcx
cmpq %rcx, %rax
jl 0x1b7d4
movq %r14, %rdi
movq %rbp, %rsi
callq 0x10996
addq $0x18, %r14
addq $0x18, %rbx
jmp 0x1b7ae
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x30, %r15
leaq 0x40(%rsp), %rdi
movq %r15, (%rdi)
movq %rsp, %rdx
movq 0x38(%rsp), %rsi
callq 0x1b8a2
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0x1bab0
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x190ec
movq %rsp, %rsi
movq %rax, %rdi
callq 0xc240
movq %rsp, %rdi
callq 0xc8c8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc8c8
jmp 0x1b85c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1010a
movq %rbx, %rdi
callq 0xc7f0
| _ZN8rapidcsv8Document7SetCellIiEEvmmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_40], rcx
mov r15, rdi
mov eax, [rdi+24h]
lea ebx, [rax+1]
xor ecx, ecx
cmp eax, 0FFFFFFFFh
cmovl ebx, ecx
mov eax, [rdi+20h]
add rbx, rsi
lea esi, [rax+1]
cmp eax, 0FFFFFFFFh
cmovl esi, ecx
lea rax, [rsi+rdx]
mov [rsp+78h+var_48], rax
lea r14, [rsi+rdx]
inc r14
lea r13, [rdi+68h]
push 18h
pop r12
mov rbp, rsp
loc_1B74A:
mov rax, [r15+70h]
sub rax, [r15+68h]
cqo
idiv r12
cmp r14, rax
jbe short loc_1B791
xorps xmm0, xmm0
movaps [rsp+78h+var_78], xmm0
and [rsp+78h+var_68], 0
mov rdi, r15; this
call _ZNK8rapidcsv8Document18GetDataColumnCountEv; rapidcsv::Document::GetDataColumnCount(void)
mov rdi, rbp
mov rsi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
mov rdi, r13
mov rsi, rbp
call _ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE9push_backERKS7_; std::vector<std::vector<std::string>>::push_back(std::vector<std::string> const&)
mov rdi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_1B74A
loc_1B791:
mov [rsp+78h+var_50], rbx
lea rbp, [rbx+1]
mov rdi, r15; this
call _ZNK8rapidcsv8Document18GetDataColumnCountEv; rapidcsv::Document::GetDataColumnCount(void)
cmp rbp, rax
jbe short loc_1B7DE
mov rbx, [r13+0]
mov r14, rbx
loc_1B7AE:
cmp r14, [r15+70h]
jz short loc_1B7DE
mov rax, rbx
sub rax, [r15+68h]
cqo
idiv r12
movsxd rcx, dword ptr [r15+20h]
cmp rax, rcx
jl short loc_1B7D4
mov rdi, r14
mov rsi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
loc_1B7D4:
add r14, 18h
add rbx, 18h
jmp short loc_1B7AE
loc_1B7DE:
lea rax, [rsp+78h+var_68]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
add r15, 30h ; '0'
lea rdi, [rsp+78h+var_38]
mov [rdi], r15
mov rdx, rsp
mov rsi, [rsp+78h+var_40]
call _ZNK8rapidcsv9ConverterIiE5ToStrERKiRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; rapidcsv::Converter<int>::ToStr(int const&,std::string &)
mov rdi, r13
mov rsi, [rsp+78h+var_48]
call _ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE2atEm; std::vector<std::vector<std::string>>::at(ulong)
mov rdi, rax
mov rsi, [rsp+78h+var_50]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE2atEm; std::vector<std::string>::at(ulong)
mov rsi, rsp
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1B85C
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_1B85C:
mov rdi, rbx
call __Unwind_Resume
| void rapidcsv::Document::SetCell<int>(rapidcsv::Document *this, long long a2, long long a3, long long a4)
{
int v4; // eax
long long v5; // rbx
int v6; // eax
long long v7; // rbx
long long v8; // rsi
unsigned long long v9; // r14
long long **v10; // r13
unsigned long long DataColumnCount; // rax
long long v12; // rdx
int v13; // ecx
int v14; // r8d
int v15; // r9d
unsigned long long v16; // rbp
long long *v17; // rbx
long long *i; // r14
_QWORD *v19; // rax
long long v20; // rax
__int128 v21; // [rsp+0h] [rbp-78h] BYREF
long long v22; // [rsp+10h] [rbp-68h] BYREF
long long v23; // [rsp+28h] [rbp-50h]
long long v24; // [rsp+30h] [rbp-48h]
long long v25; // [rsp+38h] [rbp-40h]
char *v26; // [rsp+40h] [rbp-38h] BYREF
v25 = a4;
v4 = *((_DWORD *)this + 9);
v5 = (unsigned int)(v4 + 1);
if ( v4 < -1 )
v5 = 0LL;
v6 = *((_DWORD *)this + 8);
v7 = a2 + v5;
v8 = (unsigned int)(v6 + 1);
if ( v6 < -1 )
v8 = 0LL;
v24 = v8 + a3;
v9 = v8 + a3 + 1;
v10 = (long long **)((char *)this + 104);
while ( v9 > (*((_QWORD *)this + 14) - *((_QWORD *)this + 13)) / 24LL )
{
v21 = 0LL;
v22 = 0LL;
DataColumnCount = rapidcsv::Document::GetDataColumnCount(this);
std::vector<std::string>::resize((long long *)&v21, DataColumnCount);
std::vector<std::vector<std::string>>::push_back((long long)v10, (long long)&v21, v12, v13, v14, v15, v21);
std::vector<std::string>::~vector((long long)&v21);
}
v23 = v7;
v16 = v7 + 1;
if ( v7 + 1 > (unsigned long long)rapidcsv::Document::GetDataColumnCount(this) )
{
v17 = *v10;
for ( i = *v10; i != *((long long **)this + 14); i += 3 )
{
if ( ((long long)v17 - *((_QWORD *)this + 13)) / 24 >= *((int *)this + 8) )
std::vector<std::string>::resize(i, v16);
v17 += 3;
}
}
*(_QWORD *)&v21 = &v22;
*((_QWORD *)&v21 + 1) = 0LL;
LOBYTE(v22) = 0;
v26 = (char *)this + 48;
((void ( *)(char **, long long, __int128 *))rapidcsv::Converter<int>::ToStr)(&v26, v25, &v21);
v19 = (_QWORD *)std::vector<std::vector<std::string>>::at(v10, v24);
v20 = std::vector<std::string>::at(v19, v23);
std::string::_M_assign(v20, &v21);
std::string::~string(&v21);
}
| SetCell<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RCX
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x24]
LEA EBX,[RAX + 0x1]
XOR ECX,ECX
CMP EAX,-0x1
CMOVL EBX,ECX
MOV EAX,dword ptr [RDI + 0x20]
ADD RBX,RSI
LEA ESI,[RAX + 0x1]
CMP EAX,-0x1
CMOVL ESI,ECX
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RSP + 0x30],RAX
LEA R14,[RSI + RDX*0x1]
INC R14
LEA R13,[RDI + 0x68]
PUSH 0x18
POP R12
MOV RBP,RSP
LAB_0011b74a:
MOV RAX,qword ptr [R15 + 0x70]
SUB RAX,qword ptr [R15 + 0x68]
CQO
IDIV R12
CMP R14,RAX
JBE 0x0011b791
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
LAB_0011b769:
MOV RDI,R15
CALL 0x0011b864
MOV RDI,RBP
MOV RSI,RAX
CALL 0x00110996
MOV RDI,R13
MOV RSI,RBP
CALL 0x0011910e
LAB_0011b787:
MOV RDI,RBP
CALL 0x0011010a
JMP 0x0011b74a
LAB_0011b791:
MOV qword ptr [RSP + 0x28],RBX
LEA RBP,[RBX + 0x1]
MOV RDI,R15
CALL 0x0011b864
CMP RBP,RAX
JBE 0x0011b7de
MOV RBX,qword ptr [R13]
MOV R14,RBX
LAB_0011b7ae:
CMP R14,qword ptr [R15 + 0x70]
JZ 0x0011b7de
MOV RAX,RBX
SUB RAX,qword ptr [R15 + 0x68]
CQO
IDIV R12
MOVSXD RCX,dword ptr [R15 + 0x20]
CMP RAX,RCX
JL 0x0011b7d4
MOV RDI,R14
MOV RSI,RBP
CALL 0x00110996
LAB_0011b7d4:
ADD R14,0x18
ADD RBX,0x18
JMP 0x0011b7ae
LAB_0011b7de:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
ADD R15,0x30
LEA RDI,[RSP + 0x40]
MOV qword ptr [RDI],R15
LAB_0011b7fb:
MOV RDX,RSP
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0011b8a2
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0011bab0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001190ec
MOV RSI,RSP
MOV RDI,RAX
CALL 0x0010c240
LAB_0011b82d:
MOV RDI,RSP
CALL 0x0010c8c8
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) */
void __thiscall
rapidcsv::Document::SetCell<int>(Document *this,ulong param_1,ulong param_2,int *param_3)
{
vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*this_00;
ulong uVar1;
ulong uVar2;
string *psVar3;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar4;
ulong uVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_01;
ulong *local_78;
int8 uStack_70;
ulong local_68 [3];
ulong local_50;
ulong local_48;
int *local_40;
Document *local_38;
uVar2 = (ulong)(*(int *)(this + 0x24) + 1);
if (*(int *)(this + 0x24) < -1) {
uVar2 = 0;
}
uVar5 = (ulong)(*(int *)(this + 0x20) + 1);
if (*(int *)(this + 0x20) < -1) {
uVar5 = 0;
}
local_48 = uVar5 + param_2;
this_00 = (vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)(this + 0x68);
local_40 = param_3;
while ((ulong)((*(long *)(this + 0x70) - *(long *)(this + 0x68)) / 0x18) < uVar5 + param_2 + 1) {
local_78 = (ulong *)0x0;
uStack_70 = 0;
local_68[0] = 0;
/* try { // try from 0011b769 to 0011b786 has its CatchHandler @ 0011b851 */
uVar1 = GetDataColumnCount(this);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_78,uVar1)
;
std::
vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::push_back(this_00,(vector *)&local_78);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_78);
}
uVar5 = uVar2 + param_1 + 1;
local_50 = uVar2 + param_1;
uVar2 = GetDataColumnCount(this);
if (uVar2 < uVar5) {
pvVar4 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)this_00;
for (this_01 = pvVar4;
this_01 !=
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x70);
this_01 = this_01 + 0x18) {
if ((long)*(int *)(this + 0x20) <= ((long)pvVar4 - *(long *)(this + 0x68)) / 0x18) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
(this_01,uVar5);
}
pvVar4 = pvVar4 + 0x18;
}
}
local_78 = local_68;
uStack_70 = 0;
local_68[0] = local_68[0] & 0xffffffffffffff00;
local_38 = this + 0x30;
/* try { // try from 0011b7fb to 0011b82c has its CatchHandler @ 0011b844 */
Converter<int>::ToStr((Converter<int> *)&local_38,local_40,(string *)&local_78);
pvVar4 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
std::
vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::at(this_00,local_48);
psVar3 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::at
(pvVar4,local_50);
std::__cxx11::string::_M_assign(psVar3);
std::__cxx11::string::~string((string *)&local_78);
return;
}
|
|
1,121 | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) | Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h | void SetCell(const size_t pColumnIdx, const size_t pRowIdx, const T& pCell)
{
const size_t dataColumnIdx = GetDataColumnIndex(pColumnIdx);
const size_t dataRowIdx = GetDataRowIndex(pRowIdx);
while ((dataRowIdx + 1) > GetDataRowCount())
{
std::vector<std::string> row;
row.resize(GetDataColumnCount());
mData.push_back(row);
}
if ((dataColumnIdx + 1) > GetDataColumnCount())
{
for (auto itRow = mData.begin(); itRow != mData.end(); ++itRow)
{
if (std::distance(mData.begin(), itRow) >= mLabelParams.mColumnNameIdx)
{
itRow->resize(dataColumnIdx + 1);
}
}
}
std::string str;
Converter<T> converter(mConverterParams);
converter.ToStr(pCell, str);
mData.at(dataRowIdx).at(dataColumnIdx) = str;
} | O3 | c | void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x48(%rsp)
movq %rdi, %r14
movl 0x20(%rdi), %edi
movl 0x24(%r14), %eax
leal 0x1(%rax), %r12d
xorl %ebx, %ebx
cmpl $-0x1, %eax
cmovll %ebx, %r12d
leal 0x1(%rdi), %eax
cmpl $-0x1, %edi
cmovll %ebx, %eax
movq %rax, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
leaq (%rax,%rdx), %rbp
incq %rbp
movq 0x70(%r14), %rax
movq 0x68(%r14), %r13
movq %rax, %rcx
subq %r13, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rcx, %rbp
jbe 0x2011c
movq %rsi, 0x28(%rsp)
movq %r12, 0x30(%rsp)
leaq 0x68(%r14), %r12
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl 0x20(%r14), %eax
testl %eax, %eax
cmovlel %ebx, %eax
cmpq %rax, %rcx
jbe 0x200cc
leaq (%rax,%rax,2), %rax
movq 0x8(%r13,%rax,8), %rsi
subq (%r13,%rax,8), %rsi
sarq $0x5, %rsi
jmp 0x200ce
xorl %esi, %esi
movq %r15, %rdi
callq 0x10f4a
movq %r12, %rdi
movq %r15, %rsi
callq 0x1df5c
movq %r15, %rdi
callq 0x1043c
movq 0x68(%r14), %r13
movq 0x70(%r14), %rax
movq %rax, %rcx
subq %r13, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rcx, %rbp
ja 0x2009a
movl 0x20(%r14), %edi
movq 0x30(%rsp), %r12
movq 0x28(%rsp), %rsi
addq %rsi, %r12
leaq 0x1(%r12), %rbp
testl %edi, %edi
cmovlel %ebx, %edi
cmpq %rdi, %rcx
jbe 0x20140
leaq (%rdi,%rdi,2), %rcx
movq 0x8(%r13,%rcx,8), %rbx
subq (%r13,%rcx,8), %rbx
sarq $0x5, %rbx
cmpq %rbx, %rbp
jbe 0x2018b
cmpq %rax, %r13
je 0x2018b
movq %r13, %rbx
movq %rbx, %rcx
subq 0x68(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
movslq 0x20(%r14), %rdx
cmpq %rdx, %rcx
jl 0x2017e
movq %r13, %rdi
movq %rbp, %rsi
callq 0x10f4a
movq 0x70(%r14), %rax
addq $0x18, %r13
addq $0x18, %rbx
cmpq %rax, %r13
jne 0x2014d
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x30(%r14), %rax
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
movq %rsp, %rdx
movq 0x48(%rsp), %rsi
callq 0x20272
movq 0x40(%rsp), %rsi
addq 0x38(%rsp), %rsi
movq 0x68(%r14), %rax
movq 0x70(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x20235
leaq (%rsi,%rsi,2), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq %r12, %rdx
jbe 0x20232
shlq $0x5, %r12
addq %r12, %rdi
movq %rsp, %rsi
callq 0xb1f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x20223
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb400
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rsi
leaq 0x1c981(%rip), %rdi # 0x3cbbd
xorl %eax, %eax
callq 0xb650
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x20269
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x20269
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1043c
movq %rbx, %rdi
callq 0xb780
nop
| _ZN8rapidcsv8Document7SetCellIiEEvmmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_40], rcx
mov r14, rdi
mov edi, [rdi+20h]
mov eax, [r14+24h]
lea r12d, [rax+1]
xor ebx, ebx
cmp eax, 0FFFFFFFFh
cmovl r12d, ebx
lea eax, [rdi+1]
cmp edi, 0FFFFFFFFh
cmovl eax, ebx
mov [rsp+88h+var_48], rax
mov [rsp+88h+var_50], rdx
lea rbp, [rax+rdx]
inc rbp
mov rax, [r14+70h]
mov r13, [r14+68h]
mov rcx, rax
sub rcx, r13
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
cmp rbp, rcx
jbe loc_2011C
mov [rsp+88h+var_60], rsi
mov [rsp+88h+var_58], r12
lea r12, [r14+68h]
mov r15, rsp
loc_2009A:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+88h+var_88], xmm0
mov [rsp+88h+var_78], 0
mov eax, [r14+20h]
test eax, eax
cmovle eax, ebx
cmp rcx, rax
jbe short loc_200CC
lea rax, [rax+rax*2]
mov rsi, [r13+rax*8+8]
sub rsi, [r13+rax*8+0]
sar rsi, 5
jmp short loc_200CE
loc_200CC:
xor esi, esi
loc_200CE:
mov rdi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE9push_backERKS7_; std::vector<std::vector<std::string>>::push_back(std::vector<std::string> const&)
mov rdi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov r13, [r14+68h]
mov rax, [r14+70h]
mov rcx, rax
sub rcx, r13
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
cmp rbp, rcx
ja short loc_2009A
mov edi, [r14+20h]
mov r12, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_60]
loc_2011C:
add r12, rsi
lea rbp, [r12+1]
test edi, edi
cmovle edi, ebx
cmp rcx, rdi
jbe short loc_20140
lea rcx, [rdi+rdi*2]
mov rbx, [r13+rcx*8+8]
sub rbx, [r13+rcx*8+0]
sar rbx, 5
loc_20140:
cmp rbp, rbx
jbe short loc_2018B
cmp r13, rax
jz short loc_2018B
mov rbx, r13
loc_2014D:
mov rcx, rbx
sub rcx, [r14+68h]
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
movsxd rdx, dword ptr [r14+20h]
cmp rcx, rdx
jl short loc_2017E
mov rdi, r13
mov rsi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm; std::vector<std::string>::resize(ulong)
mov rax, [r14+70h]
loc_2017E:
add r13, 18h
add rbx, 18h
cmp r13, rax
jnz short loc_2014D
loc_2018B:
lea r15, [rsp+88h+var_78]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
lea rax, [r14+30h]
lea rdi, [rsp+88h+var_38]
mov [rdi], rax
mov rdx, rsp
mov rsi, [rsp+88h+var_40]
call _ZNK8rapidcsv9ConverterIiE5ToStrERKiRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; rapidcsv::Converter<int>::ToStr(int const&,std::string &)
mov rsi, [rsp+88h+var_48]
add rsi, [rsp+88h+var_50]
mov rax, [r14+68h]
mov rdx, [r14+70h]
sub rdx, rax
sar rdx, 3
mov rcx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_20235
lea rcx, [rsi+rsi*2]
mov rdi, [rax+rcx*8]
mov rdx, [rax+rcx*8+8]
sub rdx, rdi
sar rdx, 5
cmp rdx, r12
jbe short loc_20232
shl r12, 5
add rdi, r12
mov rsi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r15
jz short loc_20223
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20223:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_20232:
mov rsi, r12
loc_20235:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r15
jz short loc_20269
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_20269
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_20269:
mov rdi, rbx
call __Unwind_Resume
| SetCell<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RCX
MOV R14,RDI
MOV EDI,dword ptr [RDI + 0x20]
MOV EAX,dword ptr [R14 + 0x24]
LEA R12D,[RAX + 0x1]
XOR EBX,EBX
CMP EAX,-0x1
CMOVL R12D,EBX
LEA EAX,[RDI + 0x1]
CMP EDI,-0x1
CMOVL EAX,EBX
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x38],RDX
LEA RBP,[RAX + RDX*0x1]
INC RBP
MOV RAX,qword ptr [R14 + 0x70]
MOV R13,qword ptr [R14 + 0x68]
MOV RCX,RAX
SUB RCX,R13
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
CMP RBP,RCX
JBE 0x0012011c
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],R12
LEA R12,[R14 + 0x68]
MOV R15,RSP
LAB_0012009a:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV EAX,dword ptr [R14 + 0x20]
TEST EAX,EAX
CMOVLE EAX,EBX
CMP RCX,RAX
JBE 0x001200cc
LEA RAX,[RAX + RAX*0x2]
MOV RSI,qword ptr [R13 + RAX*0x8 + 0x8]
SUB RSI,qword ptr [R13 + RAX*0x8]
SAR RSI,0x5
JMP 0x001200ce
LAB_001200cc:
XOR ESI,ESI
LAB_001200ce:
MOV RDI,R15
CALL 0x00110f4a
MOV RDI,R12
MOV RSI,R15
CALL 0x0011df5c
LAB_001200e1:
MOV RDI,R15
CALL 0x0011043c
MOV R13,qword ptr [R14 + 0x68]
MOV RAX,qword ptr [R14 + 0x70]
MOV RCX,RAX
SUB RCX,R13
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
CMP RBP,RCX
JA 0x0012009a
MOV EDI,dword ptr [R14 + 0x20]
MOV R12,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
LAB_0012011c:
ADD R12,RSI
LEA RBP,[R12 + 0x1]
TEST EDI,EDI
CMOVLE EDI,EBX
CMP RCX,RDI
JBE 0x00120140
LEA RCX,[RDI + RDI*0x2]
MOV RBX,qword ptr [R13 + RCX*0x8 + 0x8]
SUB RBX,qword ptr [R13 + RCX*0x8]
SAR RBX,0x5
LAB_00120140:
CMP RBP,RBX
JBE 0x0012018b
CMP R13,RAX
JZ 0x0012018b
MOV RBX,R13
LAB_0012014d:
MOV RCX,RBX
SUB RCX,qword ptr [R14 + 0x68]
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
MOVSXD RDX,dword ptr [R14 + 0x20]
CMP RCX,RDX
JL 0x0012017e
MOV RDI,R13
MOV RSI,RBP
CALL 0x00110f4a
MOV RAX,qword ptr [R14 + 0x70]
LAB_0012017e:
ADD R13,0x18
ADD RBX,0x18
CMP R13,RAX
JNZ 0x0012014d
LAB_0012018b:
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
LEA RAX,[R14 + 0x30]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RDI],RAX
LAB_001201ac:
MOV RDX,RSP
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00120272
MOV RSI,qword ptr [RSP + 0x40]
ADD RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [R14 + 0x68]
MOV RDX,qword ptr [R14 + 0x70]
SUB RDX,RAX
SAR RDX,0x3
MOV RCX,-0x5555555555555555
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x00120235
LEA RCX,[RSI + RSI*0x2]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RDX,qword ptr [RAX + RCX*0x8 + 0x8]
SUB RDX,RDI
SAR RDX,0x5
CMP RDX,R12
JBE 0x00120232
SHL R12,0x5
ADD RDI,R12
MOV RSI,RSP
CALL 0x0010b1f0
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00120223
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b400
LAB_00120223:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00120232:
MOV RSI,R12
LAB_00120235:
LEA RDI,[0x13cbbd]
XOR EAX,EAX
CALL 0x0010b650
LAB_00120243:
MOV RBX,RAX
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00120269
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b400
JMP 0x00120269
LAB_00120269:
MOV RDI,RBX
CALL 0x0010b780
|
/* void rapidcsv::Document::SetCell<int>(unsigned long, unsigned long, int const&) */
void __thiscall
rapidcsv::Document::SetCell<int>(Document *this,ulong param_1,ulong param_2,int *param_3)
{
long lVar1;
long lVar2;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3;
int8 uVar4;
ulong uVar5;
ulong uVar6;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
ulong *local_88;
int8 uStack_80;
ulong local_78 [3];
ulong local_60;
ulong local_58;
ulong local_50;
ulong local_48;
int *local_40;
Document *local_38;
uVar10 = *(uint *)(this + 0x20);
uVar6 = 0;
uVar9 = (ulong)(*(int *)(this + 0x24) + 1);
if (*(int *)(this + 0x24) < -1) {
uVar9 = uVar6;
}
local_48 = (ulong)(uVar10 + 1);
if ((int)uVar10 < -1) {
local_48 = uVar6;
}
uVar8 = local_48 + param_2 + 1;
pvVar3 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x70);
pvVar7 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x68);
uVar5 = ((long)pvVar3 - (long)pvVar7 >> 3) * -0x5555555555555555;
local_50 = param_2;
local_40 = param_3;
if (uVar5 < uVar8) {
local_60 = param_1;
local_58 = uVar9;
do {
local_88 = (ulong *)0x0;
uStack_80 = 0;
local_78[0] = 0;
uVar9 = (ulong)*(uint *)(this + 0x20);
if ((int)*(uint *)(this + 0x20) < 1) {
uVar9 = uVar6;
}
if (uVar9 < uVar5) {
uVar9 = *(long *)(pvVar7 + uVar9 * 0x18 + 8) - *(long *)(pvVar7 + uVar9 * 0x18) >> 5;
}
else {
uVar9 = 0;
}
/* try { // try from 001200ce to 001200e0 has its CatchHandler @ 0012025e */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88,
uVar9);
std::
vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::push_back((vector<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)(this + 0x68),(vector *)&local_88);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
pvVar7 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x68);
pvVar3 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this + 0x70);
uVar5 = ((long)pvVar3 - (long)pvVar7 >> 3) * -0x5555555555555555;
} while (uVar5 < uVar8);
uVar10 = *(uint *)(this + 0x20);
param_1 = local_60;
uVar9 = local_58;
}
uVar9 = uVar9 + param_1;
uVar8 = (ulong)uVar10;
if ((int)uVar10 < 1) {
uVar8 = uVar6;
}
if (uVar8 < uVar5) {
uVar6 = *(long *)(pvVar7 + uVar8 * 0x18 + 8) - *(long *)(pvVar7 + uVar8 * 0x18) >> 5;
}
if ((uVar6 < uVar9 + 1) && (this_00 = pvVar7, pvVar7 != pvVar3)) {
do {
if ((long)*(int *)(this + 0x20) <=
((long)pvVar7 - *(long *)(this + 0x68) >> 3) * -0x5555555555555555) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::resize
(this_00,uVar9 + 1);
pvVar3 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)
(this + 0x70);
}
this_00 = this_00 + 0x18;
pvVar7 = pvVar7 + 0x18;
} while (this_00 != pvVar3);
}
uStack_80 = 0;
local_78[0] = local_78[0] & 0xffffffffffffff00;
local_38 = this + 0x30;
local_88 = local_78;
/* try { // try from 001201ac to 00120242 has its CatchHandler @ 00120243 */
Converter<int>::ToStr((Converter<int> *)&local_38,local_40,(string *)&local_88);
uVar8 = local_48 + local_50;
lVar1 = *(long *)(this + 0x68);
uVar5 = (*(long *)(this + 0x70) - lVar1 >> 3) * -0x5555555555555555;
uVar6 = uVar8;
if ((uVar8 <= uVar5 && uVar5 - uVar8 != 0) &&
(lVar2 = *(long *)(lVar1 + uVar8 * 0x18), uVar6 = uVar9,
uVar9 < (ulong)(*(long *)(lVar1 + 8 + uVar8 * 0x18) - lVar2 >> 5))) {
std::__cxx11::string::_M_assign((string *)(lVar2 + uVar9 * 0x20));
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
return;
}
uVar4 = std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
uVar6);
/* catch() { ... } // from try @ 001201ac with catch @ 00120243 */
if (local_88 != local_78) {
operator_delete(local_88,local_78[0] + 1);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
|
||
1,122 | unicode_get_cc | bluesky950520[P]quickjs/libunicode.c | static int unicode_get_cc(uint32_t c)
{
uint32_t code, n, type, cc, c1, b;
int pos;
const uint8_t *p;
pos = get_index_pos(&code, c,
unicode_cc_index, sizeof(unicode_cc_index) / 3);
if (pos < 0)
return 0;
p = unicode_cc_table + pos;
for(;;) {
b = *p++;
type = b >> 6;
n = b & 0x3f;
if (n < 48) {
} else if (n < 56) {
n = (n - 48) << 8;
n |= *p++;
n += 48;
} else {
n = (n - 56) << 8;
n |= *p++ << 8;
n |= *p++;
n += 48 + (1 << 11);
}
if (type <= 1)
p++;
c1 = code + n + 1;
if (c < c1) {
switch(type) {
case 0:
cc = p[-1];
break;
case 1:
cc = p[-1] + c - code;
break;
case 2:
cc = 0;
break;
default:
case 3:
cc = 230;
break;
}
return cc;
}
code = c1;
}
} | O1 | c | unicode_get_cc:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x113cf(%rip), %rdx # 0xaa2e0
leaq 0xc(%rsp), %rdi
movl %ebx, %esi
movl $0x1d, %ecx
callq 0x9a557
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x98fd7
movl %ecx, %ecx
leaq 0x11409(%rip), %rdx # 0xaa340
addq %rcx, %rdx
movl 0xc(%rsp), %ecx
movzbl (%rdx), %esi
movl %esi, %edi
andl $0x3f, %edi
cmpl $0x30, %edi
jae 0x98f50
incq %rdx
jmp 0x98f8f
cmpl $0x37, %edi
ja 0x98f6c
shll $0x8, %edi
movzbl 0x1(%rdx), %r8d
addq $0x2, %rdx
addl %r8d, %edi
addl $0xffffd030, %edi # imm = 0xFFFFD030
jmp 0x98f8f
movzbl 0x1(%rdx), %r8d
addl $0xffffc8, %edi # imm = 0xFFFFC8
orl %r8d, %edi
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
addq $0x3, %rdx
addl %r8d, %edi
addl $0x830, %edi # imm = 0x830
movq %rdx, %r8
xorl %edx, %edx
testb %sil, %sil
setns %dl
addq %r8, %rdx
addl %ecx, %edi
incl %edi
cmpl %ebx, %edi
ja 0x98fad
movl %edi, 0xc(%rsp)
movl %edi, %ecx
jmp 0x98f3e
shrl $0x6, %esi
leaq 0xa77d(%rip), %rdi # 0xa3734
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movzbl -0x1(%rdx), %eax
jmp 0x98fd7
movzbl -0x1(%rdx), %eax
subl %ecx, %ebx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x98fd7
movl $0xe6, %eax
addq $0x10, %rsp
popq %rbx
retq
| unicode_get_cc:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdx, unicode_cc_index
lea rdi, [rsp+18h+var_C]
mov esi, ebx
mov ecx, 1Dh
call get_index_pos
mov ecx, eax
xor eax, eax
test ecx, ecx
js loc_98FD7; jumptable 0000000000098FBE case 2
mov ecx, ecx
lea rdx, unicode_cc_table
add rdx, rcx
mov ecx, [rsp+18h+var_C]
loc_98F3E:
movzx esi, byte ptr [rdx]
mov edi, esi
and edi, 3Fh
cmp edi, 30h ; '0'
jnb short loc_98F50
inc rdx
jmp short loc_98F8F
loc_98F50:
cmp edi, 37h ; '7'
ja short loc_98F6C
shl edi, 8
movzx r8d, byte ptr [rdx+1]
add rdx, 2
add edi, r8d
add edi, 0FFFFD030h
jmp short loc_98F8F
loc_98F6C:
movzx r8d, byte ptr [rdx+1]
add edi, 0FFFFC8h
or edi, r8d
shl edi, 8
movzx r8d, byte ptr [rdx+2]
add rdx, 3
add edi, r8d
add edi, 830h
loc_98F8F:
mov r8, rdx
xor edx, edx
test sil, sil
setns dl
add rdx, r8
add edi, ecx
inc edi
cmp edi, ebx
ja short loc_98FAD
mov [rsp+18h+var_C], edi
mov ecx, edi
jmp short loc_98F3E
loc_98FAD:
shr esi, 6
lea rdi, jpt_98FBE
movsxd rsi, ds:(jpt_98FBE - 0A3734h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_98FC0:
movzx eax, byte ptr [rdx-1]; jumptable 0000000000098FBE case 0
jmp short loc_98FD7; jumptable 0000000000098FBE case 2
loc_98FC6:
movzx eax, byte ptr [rdx-1]; jumptable 0000000000098FBE case 1
sub ebx, ecx
add ebx, eax
mov eax, ebx
jmp short loc_98FD7; jumptable 0000000000098FBE case 2
loc_98FD2:
mov eax, 0E6h; jumptable 0000000000098FBE case 3
loc_98FD7:
add rsp, 10h; jumptable 0000000000098FBE case 2
pop rbx
retn
| long long unicode_get_cc(unsigned int a1)
{
int index_pos; // ecx
long long result; // rax
_BYTE *v4; // rdx
unsigned int i; // ecx
unsigned int v6; // esi
unsigned int v7; // edi
_BYTE *v8; // rdx
int v9; // r8d
int v10; // edi
int v11; // r8d
unsigned int v12; // edi
unsigned int v13[3]; // [rsp+Ch] [rbp-Ch] BYREF
index_pos = get_index_pos(v13, a1);
result = 0LL;
if ( index_pos >= 0 )
{
v4 = (char *)&unicode_cc_table + (unsigned int)index_pos;
for ( i = v13[0]; ; i = v12 )
{
v6 = (unsigned __int8)*v4;
v7 = *v4 & 0x3F;
if ( v7 >= 0x30 )
{
if ( v7 > 0x37 )
{
v10 = ((unsigned __int8)v4[1] | (v7 + 16777160)) << 8;
v11 = (unsigned __int8)v4[2];
v8 = v4 + 3;
v7 = v11 + v10 + 2096;
}
else
{
v9 = (unsigned __int8)v4[1];
v8 = v4 + 2;
v7 = v9 + (v7 << 8) - 12240;
}
}
else
{
v8 = v4 + 1;
}
v4 = &v8[(v6 & 0x80u) == 0];
v12 = i + v7 + 1;
if ( v12 > a1 )
break;
v13[0] = v12;
}
switch ( v6 >> 6 )
{
case 0u:
result = (unsigned __int8)*(v4 - 1);
break;
case 1u:
result = (unsigned __int8)*(v4 - 1) + a1 - i;
break;
case 2u:
return result;
case 3u:
result = 230LL;
break;
}
}
return result;
}
| unicode_get_cc:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDX,[0x1aa2e0]
LEA RDI,[RSP + 0xc]
MOV ESI,EBX
MOV ECX,0x1d
CALL 0x0019a557
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JS 0x00198fd7
MOV ECX,ECX
LEA RDX,[0x1aa340]
ADD RDX,RCX
MOV ECX,dword ptr [RSP + 0xc]
LAB_00198f3e:
MOVZX ESI,byte ptr [RDX]
MOV EDI,ESI
AND EDI,0x3f
CMP EDI,0x30
JNC 0x00198f50
INC RDX
JMP 0x00198f8f
LAB_00198f50:
CMP EDI,0x37
JA 0x00198f6c
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x1]
ADD RDX,0x2
ADD EDI,R8D
ADD EDI,0xffffd030
JMP 0x00198f8f
LAB_00198f6c:
MOVZX R8D,byte ptr [RDX + 0x1]
ADD EDI,0xffffc8
OR EDI,R8D
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x2]
ADD RDX,0x3
ADD EDI,R8D
ADD EDI,0x830
LAB_00198f8f:
MOV R8,RDX
XOR EDX,EDX
TEST SIL,SIL
SETNS DL
ADD RDX,R8
ADD EDI,ECX
INC EDI
CMP EDI,EBX
JA 0x00198fad
MOV dword ptr [RSP + 0xc],EDI
MOV ECX,EDI
JMP 0x00198f3e
LAB_00198fad:
SHR ESI,0x6
LEA RDI,[0x1a3734]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
JMP RSI
LAB_00198fd7:
ADD RSP,0x10
POP RBX
RET
|
int8 unicode_get_cc(uint param_1)
{
byte bVar1;
uint uVar2;
int8 uVar3;
byte *pbVar4;
byte *pbVar5;
uint local_c;
uVar2 = get_index_pos(&local_c,param_1,unicode_cc_index,0x1d);
if ((int)uVar2 < 0) {
return 0;
}
pbVar4 = unicode_cc_table + uVar2;
uVar2 = local_c;
do {
local_c = uVar2;
bVar1 = *pbVar4;
uVar2 = bVar1 & 0x3f;
if (uVar2 < 0x30) {
pbVar5 = pbVar4 + 1;
}
else if (uVar2 < 0x38) {
pbVar5 = pbVar4 + 2;
uVar2 = (uVar2 * 0x100 + (uint)pbVar4[1]) - 0x2fd0;
}
else {
pbVar5 = pbVar4 + 3;
uVar2 = (uVar2 + 0xffffc8 | (uint)pbVar4[1]) * 0x100 + (uint)pbVar4[2] + 0x830;
}
pbVar4 = pbVar5 + (-1 < (char)bVar1);
uVar2 = uVar2 + local_c + 1;
} while (uVar2 <= param_1);
/* WARNING: Could not recover jumptable at 0x00198fbe. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*(code *)(&DAT_001a3734 + *(int *)(&DAT_001a3734 + (ulong)(bVar1 >> 6) * 4)))
(&DAT_001a3734,&DAT_001a3734 + *(int *)(&DAT_001a3734 + (ulong)(bVar1 >> 6) * 4)
);
return uVar3;
}
|
|
1,123 | unicode_get_cc | bluesky950520[P]quickjs/libunicode.c | static int unicode_get_cc(uint32_t c)
{
uint32_t code, n, type, cc, c1, b;
int pos;
const uint8_t *p;
pos = get_index_pos(&code, c,
unicode_cc_index, sizeof(unicode_cc_index) / 3);
if (pos < 0)
return 0;
p = unicode_cc_table + pos;
for(;;) {
b = *p++;
type = b >> 6;
n = b & 0x3f;
if (n < 48) {
} else if (n < 56) {
n = (n - 48) << 8;
n |= *p++;
n += 48;
} else {
n = (n - 56) << 8;
n |= *p++ << 8;
n |= *p++;
n += 48 + (1 << 11);
}
if (type <= 1)
p++;
c1 = code + n + 1;
if (c < c1) {
switch(type) {
case 0:
cc = p[-1];
break;
case 1:
cc = p[-1] + c - code;
break;
case 2:
cc = 0;
break;
default:
case 3:
cc = 230;
break;
}
return cc;
}
code = c1;
}
} | O2 | c | unicode_get_cc:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x115cc(%rip), %rdx # 0x911f0
leaq 0xc(%rsp), %rdi
pushq $0x1d
popq %rcx
movl %ebx, %esi
callq 0x80da5
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x7fce2
movl %ecx, %ecx
leaq 0x11608(%rip), %rdx # 0x91250
addq %rcx, %rdx
movl 0xc(%rsp), %edi
movl %edi, %ecx
movzbl (%rdx), %esi
movl %esi, %edi
andl $0x3f, %edi
cmpl $0x30, %edi
jae 0x7fc63
incq %rdx
jmp 0x7fca2
cmpl $0x37, %edi
ja 0x7fc7f
shll $0x8, %edi
movzbl 0x1(%rdx), %r8d
addq $0x2, %rdx
addl %r8d, %edi
addl $0xffffd030, %edi # imm = 0xFFFFD030
jmp 0x7fca2
movzbl 0x1(%rdx), %r8d
addl $0xffffc8, %edi # imm = 0xFFFFC8
orl %r8d, %edi
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
addq $0x3, %rdx
addl %r8d, %edi
addl $0x830, %edi # imm = 0x830
movq %rdx, %r8
xorl %edx, %edx
testb %sil, %sil
setns %dl
addq %r8, %rdx
addl %ecx, %edi
incl %edi
cmpl %ebx, %edi
jbe 0x7fc4f
shrl $0x6, %esi
leaq 0xa982(%rip), %rdi # 0x8a644
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movzbl -0x1(%rdx), %eax
jmp 0x7fce2
movzbl -0x1(%rdx), %eax
subl %ecx, %ebx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x7fce2
movl $0xe6, %eax
addq $0x10, %rsp
popq %rbx
retq
| unicode_get_cc:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdx, unicode_cc_index
lea rdi, [rsp+18h+var_C]
push 1Dh
pop rcx
mov esi, ebx
call get_index_pos
mov ecx, eax
xor eax, eax
test ecx, ecx
js loc_7FCE2; jumptable 000000000007FCC9 case 2
mov ecx, ecx
lea rdx, unicode_cc_table
add rdx, rcx
mov edi, [rsp+18h+var_C]
loc_7FC4F:
mov ecx, edi
movzx esi, byte ptr [rdx]
mov edi, esi
and edi, 3Fh
cmp edi, 30h ; '0'
jnb short loc_7FC63
inc rdx
jmp short loc_7FCA2
loc_7FC63:
cmp edi, 37h ; '7'
ja short loc_7FC7F
shl edi, 8
movzx r8d, byte ptr [rdx+1]
add rdx, 2
add edi, r8d
add edi, 0FFFFD030h
jmp short loc_7FCA2
loc_7FC7F:
movzx r8d, byte ptr [rdx+1]
add edi, 0FFFFC8h
or edi, r8d
shl edi, 8
movzx r8d, byte ptr [rdx+2]
add rdx, 3
add edi, r8d
add edi, 830h
loc_7FCA2:
mov r8, rdx
xor edx, edx
test sil, sil
setns dl
add rdx, r8
add edi, ecx
inc edi
cmp edi, ebx
jbe short loc_7FC4F
shr esi, 6
lea rdi, jpt_7FCC9
movsxd rsi, ds:(jpt_7FCC9 - 8A644h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_7FCCB:
movzx eax, byte ptr [rdx-1]; jumptable 000000000007FCC9 case 0
jmp short loc_7FCE2; jumptable 000000000007FCC9 case 2
loc_7FCD1:
movzx eax, byte ptr [rdx-1]; jumptable 000000000007FCC9 case 1
sub ebx, ecx
add ebx, eax
mov eax, ebx
jmp short loc_7FCE2; jumptable 000000000007FCC9 case 2
loc_7FCDD:
mov eax, 0E6h; jumptable 000000000007FCC9 case 3
loc_7FCE2:
add rsp, 10h; jumptable 000000000007FCC9 case 2
pop rbx
retn
| long long unicode_get_cc(unsigned int a1)
{
int index_pos; // ecx
long long result; // rax
_BYTE *v4; // rdx
unsigned int v5; // edi
unsigned int v6; // ecx
unsigned int v7; // esi
unsigned int v8; // edi
_BYTE *v9; // rdx
int v10; // r8d
int v11; // edi
int v12; // r8d
unsigned int v13[3]; // [rsp+Ch] [rbp-Ch] BYREF
index_pos = get_index_pos(v13, a1);
result = 0LL;
if ( index_pos >= 0 )
{
v4 = (char *)&unicode_cc_table + (unsigned int)index_pos;
v5 = v13[0];
do
{
v6 = v5;
v7 = (unsigned __int8)*v4;
v8 = *v4 & 0x3F;
if ( v8 >= 0x30 )
{
if ( v8 > 0x37 )
{
v11 = ((unsigned __int8)v4[1] | (v8 + 16777160)) << 8;
v12 = (unsigned __int8)v4[2];
v9 = v4 + 3;
v8 = v12 + v11 + 2096;
}
else
{
v10 = (unsigned __int8)v4[1];
v9 = v4 + 2;
v8 = v10 + (v8 << 8) - 12240;
}
}
else
{
v9 = v4 + 1;
}
v4 = &v9[(v7 & 0x80u) == 0];
v5 = v6 + v8 + 1;
}
while ( v5 <= a1 );
switch ( v7 >> 6 )
{
case 0u:
result = (unsigned __int8)*(v4 - 1);
break;
case 1u:
result = (unsigned __int8)*(v4 - 1) + a1 - v6;
break;
case 2u:
return result;
case 3u:
result = 230LL;
break;
}
}
return result;
}
| unicode_get_cc:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDX,[0x1911f0]
LEA RDI,[RSP + 0xc]
PUSH 0x1d
POP RCX
MOV ESI,EBX
CALL 0x00180da5
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JS 0x0017fce2
MOV ECX,ECX
LEA RDX,[0x191250]
ADD RDX,RCX
MOV EDI,dword ptr [RSP + 0xc]
LAB_0017fc4f:
MOV ECX,EDI
MOVZX ESI,byte ptr [RDX]
MOV EDI,ESI
AND EDI,0x3f
CMP EDI,0x30
JNC 0x0017fc63
INC RDX
JMP 0x0017fca2
LAB_0017fc63:
CMP EDI,0x37
JA 0x0017fc7f
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x1]
ADD RDX,0x2
ADD EDI,R8D
ADD EDI,0xffffd030
JMP 0x0017fca2
LAB_0017fc7f:
MOVZX R8D,byte ptr [RDX + 0x1]
ADD EDI,0xffffc8
OR EDI,R8D
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x2]
ADD RDX,0x3
ADD EDI,R8D
ADD EDI,0x830
LAB_0017fca2:
MOV R8,RDX
XOR EDX,EDX
TEST SIL,SIL
SETNS DL
ADD RDX,R8
ADD EDI,ECX
INC EDI
CMP EDI,EBX
JBE 0x0017fc4f
SHR ESI,0x6
LEA RDI,[0x18a644]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
JMP RSI
LAB_0017fce2:
ADD RSP,0x10
POP RBX
RET
|
int8 unicode_get_cc(uint param_1)
{
byte bVar1;
uint uVar2;
int8 uVar3;
byte *pbVar4;
byte *pbVar5;
uint local_c;
uVar2 = get_index_pos(&local_c,param_1,unicode_cc_index,0x1d);
if (-1 < (int)uVar2) {
pbVar4 = unicode_cc_table + uVar2;
do {
bVar1 = *pbVar4;
uVar2 = bVar1 & 0x3f;
if (uVar2 < 0x30) {
pbVar5 = pbVar4 + 1;
}
else if (uVar2 < 0x38) {
pbVar5 = pbVar4 + 2;
uVar2 = (uVar2 * 0x100 + (uint)pbVar4[1]) - 0x2fd0;
}
else {
pbVar5 = pbVar4 + 3;
uVar2 = (uVar2 + 0xffffc8 | (uint)pbVar4[1]) * 0x100 + (uint)pbVar4[2] + 0x830;
}
pbVar4 = pbVar5 + (-1 < (char)bVar1);
local_c = uVar2 + local_c + 1;
} while (local_c <= param_1);
/* WARNING: Could not recover jumptable at 0x0017fcc9. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*(code *)(&DAT_0018a644 + *(int *)(&DAT_0018a644 + (ulong)(bVar1 >> 6) * 4)))
(&DAT_0018a644,
&DAT_0018a644 + *(int *)(&DAT_0018a644 + (ulong)(bVar1 >> 6) * 4));
return uVar3;
}
return 0;
}
|
|
1,124 | ftxui::(anonymous namespace)::Dim::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/dim.cpp | void Render(Screen& screen) override {
Node::Render(screen);
for (int y = box_.y_min; y <= box_.y_max; ++y) {
for (int x = box_.x_min; x <= box_.x_max; ++x) {
screen.PixelAt(x, y).dim = true;
}
}
} | O3 | cpp | ftxui::(anonymous namespace)::Dim::Render(ftxui::Screen&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x23eae
movl 0x54(%r14), %r15d
movl 0x58(%r14), %ecx
cmpl %ecx, %r15d
jg 0x37971
movl 0x50(%r14), %eax
movl 0x4c(%r14), %r12d
cmpl %eax, %r12d
jg 0x37965
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3985c
orb $0x4, (%rax)
leal 0x1(%r12), %ecx
movl 0x50(%r14), %eax
cmpl %eax, %r12d
movl %ecx, %r12d
jl 0x3793f
movl 0x58(%r14), %ecx
leal 0x1(%r15), %edx
cmpl %ecx, %r15d
movl %edx, %r15d
jl 0x37936
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
| _ZN5ftxui12_GLOBAL__N_13Dim6RenderERNS_6ScreenE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &)
mov r15d, [r14+54h]
mov ecx, [r14+58h]
cmp r15d, ecx
jg short loc_37971
mov eax, [r14+50h]
loc_37936:
mov r12d, [r14+4Ch]
cmp r12d, eax
jg short loc_37965
loc_3793F:
mov rdi, rbx; this
mov esi, r12d; int
mov edx, r15d; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
or byte ptr [rax], 4
lea ecx, [r12+1]
mov eax, [r14+50h]
cmp r12d, eax
mov r12d, ecx
jl short loc_3793F
mov ecx, [r14+58h]
loc_37965:
lea edx, [r15+1]
cmp r15d, ecx
mov r15d, edx
jl short loc_37936
loc_37971:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long ftxui::`anonymous namespace'::Dim::Render(
ftxui::_anonymous_namespace_::Dim *this,
ftxui::Screen *a2)
{
long long result; // rax
int v3; // r15d
int v4; // ecx
int v5; // r12d
_BYTE *v6; // rax
bool v7; // cc
result = ftxui::Node::Render(this, a2);
v3 = *((_DWORD *)this + 21);
v4 = *((_DWORD *)this + 22);
if ( v3 <= v4 )
{
result = *((unsigned int *)this + 20);
do
{
v5 = *((_DWORD *)this + 19);
if ( v5 <= (int)result )
{
do
{
v6 = (_BYTE *)ftxui::Screen::PixelAt(a2, v5, v3);
*v6 |= 4u;
result = *((unsigned int *)this + 20);
v7 = v5++ < (int)result;
}
while ( v7 );
v4 = *((_DWORD *)this + 22);
}
v7 = v3++ < v4;
}
while ( v7 );
}
return result;
}
| Render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00123eae
MOV R15D,dword ptr [R14 + 0x54]
MOV ECX,dword ptr [R14 + 0x58]
CMP R15D,ECX
JG 0x00137971
MOV EAX,dword ptr [R14 + 0x50]
LAB_00137936:
MOV R12D,dword ptr [R14 + 0x4c]
CMP R12D,EAX
JG 0x00137965
LAB_0013793f:
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
CALL 0x0013985c
OR byte ptr [RAX],0x4
LEA ECX,[R12 + 0x1]
MOV EAX,dword ptr [R14 + 0x50]
CMP R12D,EAX
MOV R12D,ECX
JL 0x0013793f
MOV ECX,dword ptr [R14 + 0x58]
LAB_00137965:
LEA EDX,[R15 + 0x1]
CMP R15D,ECX
MOV R15D,EDX
JL 0x00137936
LAB_00137971:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* ftxui::(anonymous namespace)::Dim::Render(ftxui::Screen&) */
void __thiscall ftxui::(anonymous_namespace)::Dim::Render(Dim *this,Screen *param_1)
{
bool bVar1;
int iVar2;
byte *pbVar3;
int iVar4;
int iVar5;
int iVar6;
Node::Render((Node *)this,param_1);
iVar4 = *(int *)(this + 0x58);
if (*(int *)(this + 0x54) <= iVar4) {
iVar2 = *(int *)(this + 0x50);
iVar6 = *(int *)(this + 0x54);
do {
iVar5 = *(int *)(this + 0x4c);
if (*(int *)(this + 0x4c) <= iVar2) {
do {
pbVar3 = (byte *)Screen::PixelAt(param_1,iVar5,iVar6);
*pbVar3 = *pbVar3 | 4;
iVar2 = *(int *)(this + 0x50);
bVar1 = iVar5 < iVar2;
iVar5 = iVar5 + 1;
} while (bVar1);
iVar4 = *(int *)(this + 0x58);
}
bVar1 = iVar6 < iVar4;
iVar6 = iVar6 + 1;
} while (bVar1);
}
return;
}
|
|
1,125 | nglog::tools::InitializeLoggingUtilities(char const*) | ng-log[P]ng-log/src/utilities.cc | void InitializeLoggingUtilities(const char* argv0) {
CHECK(!IsLoggingInitialized()) << "You called InitializeLogging() twice!";
g_program_invocation_short_name = const_basename(argv0);
#ifdef HAVE_STACKTRACE
InstallFailureFunction(&DumpStackTraceAndExit);
#endif
} | O0 | cpp | nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
callq 0x6ab00
xorb $-0x1, %al
xorb $-0x1, %al
movb $0x0, -0x71(%rbp)
testb $0x1, %al
jne 0x6ac92
jmp 0x6ad0f
leaq 0x67d5(%rip), %rsi # 0x7146e
leaq -0x70(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movl $0x12b, %edx # imm = 0x12B
callq 0x35ba0
movq -0x98(%rbp), %rdi
movb $0x1, -0x71(%rbp)
callq 0x316d0
movq %rax, -0x90(%rbp)
jmp 0x6acc7
movq -0x90(%rbp), %rdi
leaq 0x67e2(%rip), %rsi # 0x714b7
callq 0xa7f0
movq %rax, -0xa0(%rbp)
jmp 0x6ace3
movq -0xa0(%rbp), %rdi
leaq 0x67ed(%rip), %rsi # 0x714de
callq 0xa7f0
movq %rax, -0xa8(%rbp)
jmp 0x6acff
movq -0xa8(%rbp), %rsi
leaq -0x9(%rbp), %rdi
callq 0x231c0
testb $0x1, -0x71(%rbp)
jne 0x6ad17
jmp 0x6ad37
leaq -0x70(%rbp), %rdi
callq 0x35c10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x6ad5c
jmp 0x6ad67
movq -0x8(%rbp), %rdi
callq 0x6ab40
movq %rax, 0x415f1(%rip) # 0xac338
leaq 0x32(%rip), %rdi # 0x6ad80
callq 0x326c0
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x70(%rbp), %rdi
callq 0x35c10
jmp 0x6ad67
jmp 0x6ad69
movq -0x80(%rbp), %rdi
callq 0xaf50
movq %rax, %rdi
callq 0x226c0
nopw (%rax,%rax)
| _ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
xor al, 0FFh
xor al, 0FFh
mov [rbp+var_71], 0
test al, 1
jnz short loc_6AC92
jmp short loc_6AD0F
loc_6AC92:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_70]; this
mov [rbp+var_98], rdi
mov edx, 12Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, [rbp+var_98]; this
mov [rbp+var_71], 1
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov [rbp+var_90], rax
jmp short $+2
loc_6ACC7:
mov rdi, [rbp+var_90]
lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_A0], rax
jmp short $+2
loc_6ACE3:
mov rdi, [rbp+var_A0]
lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_A8], rax
jmp short $+2
loc_6ACFF:
mov rsi, [rbp+var_A8]; void (*)(void)
lea rdi, [rbp+var_9]
call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &)
loc_6AD0F:
test [rbp+var_71], 1
jnz short loc_6AD17
jmp short loc_6AD37
loc_6AD17:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
test [rbp+var_71], 1
jnz short loc_6AD5C
jmp short loc_6AD67
loc_6AD37:
mov rdi, [rbp+var_8]; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rax; nglog::g_program_invocation_short_name
lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this
call _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void))
add rsp, 0B0h
pop rbp
retn
loc_6AD5C:
lea rdi, [rbp+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_6AD67:
jmp short $+2
loc_6AD69:
mov rdi, [rbp+var_80]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long nglog::tools::InitializeLoggingUtilities(nglog::tools *this, char *a2)
{
long long v3; // [rsp+10h] [rbp-A0h]
long long v4; // [rsp+20h] [rbp-90h]
char v5; // [rsp+3Fh] [rbp-71h]
nglog::LogDestination *v6[12]; // [rsp+40h] [rbp-70h] BYREF
nglog::tools *v7; // [rsp+A8h] [rbp-8h]
v7 = this;
v5 = 0;
if ( nglog::IsLoggingInitialized(this) )
{
nglog::LogMessageFatal::LogMessageFatal(
v6,
(std::this_thread *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
0x12Bu);
v5 = 1;
v4 = nglog::LogMessage::stream((nglog::LogMessage *)v6);
v3 = std::operator<<<std::char_traits<char>>(v4, "Check failed: !IsLoggingInitialized() ");
a2 = (char *)std::operator<<<std::char_traits<char>>(v3, "You called InitializeLogging() twice!");
nglog::internal::LogMessageVoidify::operator&();
}
if ( (v5 & 1) != 0 )
nglog::LogMessageFatal::~LogMessageFatal(v6);
nglog::g_program_invocation_short_name = (long long)nglog::tools::const_basename(v7, a2);
return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))a2);
}
| InitializeLoggingUtilities:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
CALL 0x0016ab00
XOR AL,0xff
XOR AL,0xff
MOV byte ptr [RBP + -0x71],0x0
TEST AL,0x1
JNZ 0x0016ac92
JMP 0x0016ad0f
LAB_0016ac92:
LEA RSI,[0x17146e]
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0x98],RDI
MOV EDX,0x12b
CALL 0x00135ba0
MOV RDI,qword ptr [RBP + -0x98]
MOV byte ptr [RBP + -0x71],0x1
LAB_0016acb9:
CALL 0x001316d0
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0016acc7
LAB_0016acc7:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[0x1714b7]
CALL 0x0010a7f0
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0016ace3
LAB_0016ace3:
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[0x1714de]
CALL 0x0010a7f0
LAB_0016acf6:
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0016acff
LAB_0016acff:
MOV RSI,qword ptr [RBP + -0xa8]
LEA RDI,[RBP + -0x9]
CALL 0x001231c0
LAB_0016ad0f:
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0016ad17
JMP 0x0016ad37
LAB_0016ad17:
LEA RDI,[RBP + -0x70]
CALL 0x00135c10
LAB_0016ad20:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x80],RCX
MOV dword ptr [RBP + -0x84],EAX
TEST byte ptr [RBP + -0x71],0x1
JNZ 0x0016ad5c
JMP 0x0016ad67
LAB_0016ad37:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0016ab40
MOV qword ptr [0x001ac338],RAX
LEA RDI,[0x16ad80]
CALL 0x001326c0
ADD RSP,0xb0
POP RBP
RET
LAB_0016ad5c:
LEA RDI,[RBP + -0x70]
CALL 0x00135c10
LAB_0016ad65:
JMP 0x0016ad67
LAB_0016ad67:
JMP 0x0016ad69
LAB_0016ad69:
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0010af50
|
/* nglog::tools::InitializeLoggingUtilities(char const*) */
void nglog::tools::InitializeLoggingUtilities(char *param_1)
{
byte bVar1;
ostream *poVar2;
int8 uVar3;
bool bVar4;
LogMessageFatal local_78 [103];
LogMessageVoidify local_11;
char *local_10;
local_10 = param_1;
bVar1 = IsLoggingInitialized();
bVar4 = (bVar1 & 1) != 0;
if (bVar4) {
LogMessageFatal::LogMessageFatal
(local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
/* try { // try from 0016acb9 to 0016acf5 has its CatchHandler @ 0016ad20 */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78);
poVar2 = std::operator<<(poVar2,"Check failed: !IsLoggingInitialized() ");
poVar2 = std::operator<<(poVar2,"You called InitializeLogging() twice!");
internal::LogMessageVoidify::operator&(&local_11,poVar2);
uVar3 = LogMessageFatal::~LogMessageFatal(local_78);
/* catch(type#1 @ 00000000) { ... } // from try @ 0016acb9 with catch @ 0016ad20
*/
if (bVar4) {
/* try { // try from 0016ad5c to 0016ad64 has its CatchHandler @ 0016ad72 */
LogMessageFatal::~LogMessageFatal(local_78);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar3);
}
g_program_invocation_short_name = const_basename(local_10);
InstallFailureFunction(DumpStackTraceAndExit);
return;
}
|
|
1,126 | crypto_sign_ed25519_ref10_fe_frombytes | eloqsql/plugin/auth_ed25519/ref10/fe_frombytes.c | void fe_frombytes(fe h,const unsigned char *s)
{
crypto_int64 h0 = load_4(s);
crypto_int64 h1 = load_3(s + 4) << 6;
crypto_int64 h2 = load_3(s + 7) << 5;
crypto_int64 h3 = load_3(s + 10) << 3;
crypto_int64 h4 = load_3(s + 13) << 2;
crypto_int64 h5 = load_4(s + 16);
crypto_int64 h6 = load_3(s + 20) << 7;
crypto_int64 h7 = load_3(s + 23) << 5;
crypto_int64 h8 = load_3(s + 26) << 4;
crypto_int64 h9 = (load_3(s + 29) & 8388607) << 2;
crypto_int64 carry0;
crypto_int64 carry1;
crypto_int64 carry2;
crypto_int64 carry3;
crypto_int64 carry4;
crypto_int64 carry5;
crypto_int64 carry6;
crypto_int64 carry7;
crypto_int64 carry8;
crypto_int64 carry9;
carry9 = (h9 + (crypto_int64) (1<<24)) >> 25; h0 += carry9 * 19; h9 -= carry9 << 25;
carry1 = (h1 + (crypto_int64) (1<<24)) >> 25; h2 += carry1; h1 -= carry1 << 25;
carry3 = (h3 + (crypto_int64) (1<<24)) >> 25; h4 += carry3; h3 -= carry3 << 25;
carry5 = (h5 + (crypto_int64) (1<<24)) >> 25; h6 += carry5; h5 -= carry5 << 25;
carry7 = (h7 + (crypto_int64) (1<<24)) >> 25; h8 += carry7; h7 -= carry7 << 25;
carry0 = (h0 + (crypto_int64) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
carry2 = (h2 + (crypto_int64) (1<<25)) >> 26; h3 += carry2; h2 -= carry2 << 26;
carry4 = (h4 + (crypto_int64) (1<<25)) >> 26; h5 += carry4; h4 -= carry4 << 26;
carry6 = (h6 + (crypto_int64) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26;
carry8 = (h8 + (crypto_int64) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26;
h[0] = h0;
h[1] = h1;
h[2] = h2;
h[3] = h3;
h[4] = h4;
h[5] = h5;
h[6] = h6;
h[7] = h7;
h[8] = h8;
h[9] = h9;
} | O3 | c | crypto_sign_ed25519_ref10_fe_frombytes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r9
movzwl 0x4(%rsi), %ecx
movzbl 0x6(%rsi), %eax
shll $0x16, %eax
shll $0x6, %ecx
orl %eax, %ecx
movzwl 0x7(%rsi), %r14d
movzbl 0x9(%rsi), %eax
shll $0x15, %eax
shll $0x5, %r14d
orl %eax, %r14d
movzwl 0xa(%rsi), %eax
movzbl 0xc(%rsi), %edx
shll $0x13, %edx
leal (%rdx,%rax,8), %edi
movq %rdi, -0x40(%rbp)
movzwl 0xd(%rsi), %eax
movzbl 0xf(%rsi), %edx
shll $0x12, %edx
leal (%rdx,%rax,4), %eax
movl %eax, -0x30(%rbp)
movzwl 0x14(%rsi), %r15d
movzbl 0x16(%rsi), %eax
shll $0x17, %eax
shll $0x7, %r15d
orl %eax, %r15d
movzwl 0x17(%rsi), %r12d
movzbl 0x19(%rsi), %eax
shll $0x15, %eax
shll $0x5, %r12d
orl %eax, %r12d
movl %r12d, -0x2c(%rbp)
movzwl 0x1a(%rsi), %r13d
movzbl 0x1c(%rsi), %eax
shll $0x14, %eax
shll $0x4, %r13d
orl %eax, %r13d
movzwl 0x1d(%rsi), %eax
movzbl 0x1f(%rsi), %edx
andl $0x7f, %edx
shll $0x12, %edx
leal (%rdx,%rax,4), %eax
movq %rax, -0x48(%rbp)
movl $0x1000000, %r11d # imm = 0x1000000
addl %r11d, %eax
movl %eax, -0x34(%rbp)
shrl $0x19, %eax
leaq (%rax,%rax,8), %rdx
leal (%rax,%rdx,2), %r10d
movl (%rsi), %eax
addq %rax, %r10
leal (%rcx,%r11), %eax
movl %eax, %ebx
shrl $0x19, %ebx
addl %r14d, %ebx
andl $0x7e000000, %eax # imm = 0x7E000000
subl %eax, %ecx
addl %r11d, %edi
movl %edi, %r14d
shrl $0x19, %r14d
addl -0x30(%rbp), %r14d
movl 0x10(%rsi), %r8d
movq %r8, %rax
addq $0x1000000, %rax # imm = 0x1000000
movq %rax, %rsi
shrq $0x19, %rsi
addq %r15, %rsi
andl $0xfe000000, %eax # imm = 0xFE000000
subl %eax, %r8d
addl %r12d, %r11d
movl %r11d, %r15d
shrl $0x19, %r15d
addl %r13d, %r15d
movl $0x2000000, %r13d # imm = 0x2000000
leaq (%r10,%r13), %rax
movq %rax, %r12
shrq $0x1a, %r12
addl %ecx, %r12d
movl $0xfc000000, %ecx # imm = 0xFC000000
andl %ecx, %eax
subl %eax, %r10d
movl $0x2000000, %eax # imm = 0x2000000
leal (%rbx,%rax), %ecx
movl %ecx, %edx
shrl $0x1a, %edx
addl -0x40(%rbp), %edx
andl $0xe000000, %edi # imm = 0xE000000
subl %edi, %edx
andl $0x7c000000, %ecx # imm = 0x7C000000
subl %ecx, %ebx
leal (%r14,%rax), %edi
movl %edi, %ecx
shrl $0x1a, %ecx
addl %r8d, %ecx
andl $0xc000000, %edi # imm = 0xC000000
subl %edi, %r14d
addq %rsi, %r13
movq %r13, %rdi
shrq $0x1a, %rdi
addl -0x2c(%rbp), %edi
andl $0x3e000000, %r11d # imm = 0x3E000000
subl %r11d, %edi
movl $0xfc000000, %r8d # imm = 0xFC000000
andl %r8d, %r13d
subl %r13d, %esi
movl -0x34(%rbp), %r11d
andl %eax, %r11d
addl %r15d, %eax
movl %eax, %r8d
shrl $0x1a, %r8d
addl -0x48(%rbp), %r8d
subl %r11d, %r8d
andl $0x3c000000, %eax # imm = 0x3C000000
subl %eax, %r15d
movl %r10d, (%r9)
movl %r12d, 0x4(%r9)
movl %ebx, 0x8(%r9)
movl %edx, 0xc(%r9)
movl %r14d, 0x10(%r9)
movl %ecx, 0x14(%r9)
movl %esi, 0x18(%r9)
movl %edi, 0x1c(%r9)
movl %r15d, 0x20(%r9)
movl %r8d, 0x24(%r9)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| crypto_sign_ed25519_ref10_fe_frombytes:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r9, rdi
movzx ecx, word ptr [rsi+4]
movzx eax, byte ptr [rsi+6]
shl eax, 16h
shl ecx, 6
or ecx, eax
movzx r14d, word ptr [rsi+7]
movzx eax, byte ptr [rsi+9]
shl eax, 15h
shl r14d, 5
or r14d, eax
movzx eax, word ptr [rsi+0Ah]
movzx edx, byte ptr [rsi+0Ch]
shl edx, 13h
lea edi, [rdx+rax*8]
mov [rbp+var_40], rdi
movzx eax, word ptr [rsi+0Dh]
movzx edx, byte ptr [rsi+0Fh]
shl edx, 12h
lea eax, [rdx+rax*4]
mov [rbp+var_30], eax
movzx r15d, word ptr [rsi+14h]
movzx eax, byte ptr [rsi+16h]
shl eax, 17h
shl r15d, 7
or r15d, eax
movzx r12d, word ptr [rsi+17h]
movzx eax, byte ptr [rsi+19h]
shl eax, 15h
shl r12d, 5
or r12d, eax
mov [rbp+var_2C], r12d
movzx r13d, word ptr [rsi+1Ah]
movzx eax, byte ptr [rsi+1Ch]
shl eax, 14h
shl r13d, 4
or r13d, eax
movzx eax, word ptr [rsi+1Dh]
movzx edx, byte ptr [rsi+1Fh]
and edx, 7Fh
shl edx, 12h
lea eax, [rdx+rax*4]
mov [rbp+var_48], rax
mov r11d, 1000000h
add eax, r11d
mov [rbp+var_34], eax
shr eax, 19h
lea rdx, [rax+rax*8]
lea r10d, [rax+rdx*2]
mov eax, [rsi]
add r10, rax
lea eax, [rcx+r11]
mov ebx, eax
shr ebx, 19h
add ebx, r14d
and eax, 7E000000h
sub ecx, eax
add edi, r11d
mov r14d, edi
shr r14d, 19h
add r14d, [rbp+var_30]
mov r8d, [rsi+10h]
mov rax, r8
add rax, 1000000h
mov rsi, rax
shr rsi, 19h
add rsi, r15
and eax, 0FE000000h
sub r8d, eax
add r11d, r12d
mov r15d, r11d
shr r15d, 19h
add r15d, r13d
mov r13d, 2000000h
lea rax, [r10+r13]
mov r12, rax
shr r12, 1Ah
add r12d, ecx
mov ecx, 0FC000000h
and eax, ecx
sub r10d, eax
mov eax, 2000000h
lea ecx, [rbx+rax]
mov edx, ecx
shr edx, 1Ah
add edx, dword ptr [rbp+var_40]
and edi, 0E000000h
sub edx, edi
and ecx, 7C000000h
sub ebx, ecx
lea edi, [r14+rax]
mov ecx, edi
shr ecx, 1Ah
add ecx, r8d
and edi, 0C000000h
sub r14d, edi
add r13, rsi
mov rdi, r13
shr rdi, 1Ah
add edi, [rbp+var_2C]
and r11d, 3E000000h
sub edi, r11d
mov r8d, 0FC000000h
and r13d, r8d
sub esi, r13d
mov r11d, [rbp+var_34]
and r11d, eax
add eax, r15d
mov r8d, eax
shr r8d, 1Ah
add r8d, dword ptr [rbp+var_48]
sub r8d, r11d
and eax, 3C000000h
sub r15d, eax
mov [r9], r10d
mov [r9+4], r12d
mov [r9+8], ebx
mov [r9+0Ch], edx
mov [r9+10h], r14d
mov [r9+14h], ecx
mov [r9+18h], esi
mov [r9+1Ch], edi
mov [r9+20h], r15d
mov [r9+24h], r8d
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long crypto_sign_ed25519_ref10_fe_frombytes(_DWORD *a1, unsigned int *a2)
{
int v2; // ecx
int v3; // r13d
unsigned long long v4; // r10
unsigned int v5; // ebx
unsigned int v6; // r14d
unsigned int v7; // r8d
unsigned long long v8; // rsi
unsigned int v9; // r15d
long long result; // rax
int v11; // [rsp+0h] [rbp-48h]
int v12; // [rsp+8h] [rbp-40h]
int v13; // [rsp+1Ch] [rbp-2Ch]
v2 = (*((unsigned __int8 *)a2 + 6) << 22) | (*((unsigned __int16 *)a2 + 2) << 6);
v12 = (*((unsigned __int8 *)a2 + 12) << 19) + 8 * *((unsigned __int16 *)a2 + 5);
v13 = (*((unsigned __int8 *)a2 + 25) << 21) | (32 * *(unsigned __int16 *)((char *)a2 + 23));
v3 = (*((unsigned __int8 *)a2 + 28) << 20) | (16 * *((unsigned __int16 *)a2 + 13));
v11 = ((*((_BYTE *)a2 + 31) & 0x7F) << 18) + 4 * *(unsigned __int16 *)((char *)a2 + 29);
v4 = *a2 + (unsigned long long)(19 * ((unsigned int)(v11 + 0x1000000) >> 25));
v5 = ((*((unsigned __int8 *)a2 + 9) << 21) | (32 * *(unsigned __int16 *)((char *)a2 + 7)))
+ ((unsigned int)(v2 + 0x1000000) >> 25);
v6 = (*((unsigned __int8 *)a2 + 15) << 18)
+ 4 * *(unsigned __int16 *)((char *)a2 + 13)
+ ((unsigned int)(v12 + 0x1000000) >> 25);
v7 = a2[4];
v8 = ((*((unsigned __int8 *)a2 + 22) << 23) | (*((unsigned __int16 *)a2 + 10) << 7))
+ (((unsigned long long)v7 + 0x1000000) >> 25);
v9 = v3 + ((unsigned int)(v13 + 0x1000000) >> 25);
result = (v9 + 0x2000000) & 0x3C000000;
*a1 = v4 - ((v4 + 0x2000000) & 0xFC000000);
a1[1] = v2 - ((v2 + 0x1000000) & 0x7E000000) + ((v4 + 0x2000000) >> 26);
a1[2] = v5 - ((v5 + 0x2000000) & 0x7C000000);
a1[3] = v12 + ((v5 + 0x2000000) >> 26) - ((v12 + 0x1000000) & 0xE000000);
a1[4] = v6 - ((v6 + 0x2000000) & 0xC000000);
a1[5] = v7 - ((v7 + 0x1000000) & 0xFE000000) + ((v6 + 0x2000000) >> 26);
a1[6] = v8 - ((v8 + 0x2000000) & 0xFC000000);
a1[7] = v13 + ((v8 + 0x2000000) >> 26) - ((v13 + 0x1000000) & 0x3E000000);
a1[8] = v9 - result;
a1[9] = v11 + ((v9 + 0x2000000) >> 26) - ((v11 + 0x1000000) & 0x2000000);
return result;
}
| crypto_sign_ed25519_ref10_fe_frombytes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R9,RDI
MOVZX ECX,word ptr [RSI + 0x4]
MOVZX EAX,byte ptr [RSI + 0x6]
SHL EAX,0x16
SHL ECX,0x6
OR ECX,EAX
MOVZX R14D,word ptr [RSI + 0x7]
MOVZX EAX,byte ptr [RSI + 0x9]
SHL EAX,0x15
SHL R14D,0x5
OR R14D,EAX
MOVZX EAX,word ptr [RSI + 0xa]
MOVZX EDX,byte ptr [RSI + 0xc]
SHL EDX,0x13
LEA EDI,[RDX + RAX*0x8]
MOV qword ptr [RBP + -0x40],RDI
MOVZX EAX,word ptr [RSI + 0xd]
MOVZX EDX,byte ptr [RSI + 0xf]
SHL EDX,0x12
LEA EAX,[RDX + RAX*0x4]
MOV dword ptr [RBP + -0x30],EAX
MOVZX R15D,word ptr [RSI + 0x14]
MOVZX EAX,byte ptr [RSI + 0x16]
SHL EAX,0x17
SHL R15D,0x7
OR R15D,EAX
MOVZX R12D,word ptr [RSI + 0x17]
MOVZX EAX,byte ptr [RSI + 0x19]
SHL EAX,0x15
SHL R12D,0x5
OR R12D,EAX
MOV dword ptr [RBP + -0x2c],R12D
MOVZX R13D,word ptr [RSI + 0x1a]
MOVZX EAX,byte ptr [RSI + 0x1c]
SHL EAX,0x14
SHL R13D,0x4
OR R13D,EAX
MOVZX EAX,word ptr [RSI + 0x1d]
MOVZX EDX,byte ptr [RSI + 0x1f]
AND EDX,0x7f
SHL EDX,0x12
LEA EAX,[RDX + RAX*0x4]
MOV qword ptr [RBP + -0x48],RAX
MOV R11D,0x1000000
ADD EAX,R11D
MOV dword ptr [RBP + -0x34],EAX
SHR EAX,0x19
LEA RDX,[RAX + RAX*0x8]
LEA R10D,[RAX + RDX*0x2]
MOV EAX,dword ptr [RSI]
ADD R10,RAX
LEA EAX,[RCX + R11*0x1]
MOV EBX,EAX
SHR EBX,0x19
ADD EBX,R14D
AND EAX,0x7e000000
SUB ECX,EAX
ADD EDI,R11D
MOV R14D,EDI
SHR R14D,0x19
ADD R14D,dword ptr [RBP + -0x30]
MOV R8D,dword ptr [RSI + 0x10]
MOV RAX,R8
ADD RAX,0x1000000
MOV RSI,RAX
SHR RSI,0x19
ADD RSI,R15
AND EAX,0xfe000000
SUB R8D,EAX
ADD R11D,R12D
MOV R15D,R11D
SHR R15D,0x19
ADD R15D,R13D
MOV R13D,0x2000000
LEA RAX,[R10 + R13*0x1]
MOV R12,RAX
SHR R12,0x1a
ADD R12D,ECX
MOV ECX,0xfc000000
AND EAX,ECX
SUB R10D,EAX
MOV EAX,0x2000000
LEA ECX,[RBX + RAX*0x1]
MOV EDX,ECX
SHR EDX,0x1a
ADD EDX,dword ptr [RBP + -0x40]
AND EDI,0xe000000
SUB EDX,EDI
AND ECX,0x7c000000
SUB EBX,ECX
LEA EDI,[R14 + RAX*0x1]
MOV ECX,EDI
SHR ECX,0x1a
ADD ECX,R8D
AND EDI,0xc000000
SUB R14D,EDI
ADD R13,RSI
MOV RDI,R13
SHR RDI,0x1a
ADD EDI,dword ptr [RBP + -0x2c]
AND R11D,0x3e000000
SUB EDI,R11D
MOV R8D,0xfc000000
AND R13D,R8D
SUB ESI,R13D
MOV R11D,dword ptr [RBP + -0x34]
AND R11D,EAX
ADD EAX,R15D
MOV R8D,EAX
SHR R8D,0x1a
ADD R8D,dword ptr [RBP + -0x48]
SUB R8D,R11D
AND EAX,0x3c000000
SUB R15D,EAX
MOV dword ptr [R9],R10D
MOV dword ptr [R9 + 0x4],R12D
MOV dword ptr [R9 + 0x8],EBX
MOV dword ptr [R9 + 0xc],EDX
MOV dword ptr [R9 + 0x10],R14D
MOV dword ptr [R9 + 0x14],ECX
MOV dword ptr [R9 + 0x18],ESI
MOV dword ptr [R9 + 0x1c],EDI
MOV dword ptr [R9 + 0x20],R15D
MOV dword ptr [R9 + 0x24],R8D
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void crypto_sign_ed25519_ref10_fe_frombytes(int *param_1,uint *param_2)
{
int iVar1;
uint uVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
uint uVar10;
int iVar11;
long lVar12;
int iVar13;
uint uVar14;
long lVar15;
uint uVar16;
uint uVar17;
ulong uVar18;
int iVar19;
int iVar20;
uVar10 = (uint)(ushort)param_2[1] << 6 | (uint)*(byte *)((long)param_2 + 6) << 0x16;
iVar13 = (uint)(byte)param_2[3] * 0x80000 + (uint)*(ushort *)((long)param_2 + 10) * 8;
uVar17 = (uint)*(ushort *)((long)param_2 + 0x17) << 5 |
(uint)*(byte *)((long)param_2 + 0x19) << 0x15;
iVar1 = (*(byte *)((long)param_2 + 0x1f) & 0x7f) * 0x40000 +
(uint)*(ushort *)((long)param_2 + 0x1d) * 4;
uVar7 = iVar1 + 0x1000000;
lVar15 = (ulong)((uVar7 >> 0x19) * 0x13) + (ulong)*param_2;
uVar2 = uVar10 + 0x1000000;
iVar11 = (uVar2 >> 0x19) +
((uint)*(ushort *)((long)param_2 + 7) << 5 | (uint)*(byte *)((long)param_2 + 9) << 0x15);
uVar14 = iVar13 + 0x1000000;
iVar19 = (uVar14 >> 0x19) +
(uint)*(byte *)((long)param_2 + 0xf) * 0x40000 +
(uint)*(ushort *)((long)param_2 + 0xd) * 4;
uVar6 = param_2[4];
uVar9 = (ulong)uVar6 + 0x1000000;
lVar12 = (uVar9 >> 0x19) +
(ulong)((uint)(ushort)param_2[5] << 7 | (uint)*(byte *)((long)param_2 + 0x16) << 0x17);
uVar16 = uVar17 + 0x1000000;
iVar20 = (uVar16 >> 0x19) +
((uint)*(ushort *)((long)param_2 + 0x1a) << 4 | (uint)(byte)param_2[7] << 0x14);
uVar5 = lVar15 + 0x2000000;
uVar3 = iVar11 + 0x2000000;
uVar4 = iVar19 + 0x2000000;
uVar18 = lVar12 + 0x2000000;
uVar8 = iVar20 + 0x2000000;
*param_1 = (int)lVar15 - ((uint)uVar5 & 0xfc000000);
param_1[1] = (int)(uVar5 >> 0x1a) + (uVar10 - (uVar2 & 0x7e000000));
param_1[2] = iVar11 - (uVar3 & 0x7c000000);
param_1[3] = ((uVar3 >> 0x1a) + iVar13) - (uVar14 & 0xe000000);
param_1[4] = iVar19 - (uVar4 & 0xc000000);
param_1[5] = (uVar4 >> 0x1a) + (uVar6 - ((uint)uVar9 & 0xfe000000));
param_1[6] = (int)lVar12 - ((uint)uVar18 & 0xfc000000);
param_1[7] = ((int)(uVar18 >> 0x1a) + uVar17) - (uVar16 & 0x3e000000);
param_1[8] = iVar20 - (uVar8 & 0x3c000000);
param_1[9] = ((uVar8 >> 0x1a) + iVar1) - (uVar7 & 0x2000000);
return;
}
|
|
1,127 | LEX::add_alter_list(st_mysql_const_lex_string, Virtual_column_info*, bool) | eloqsql/sql/sql_lex.cc | bool LEX::add_alter_list(LEX_CSTRING name, Virtual_column_info *expr,
bool exists)
{
MEM_ROOT *mem_root= thd->mem_root;
Alter_column *ac= new (mem_root) Alter_column(name, expr, exists);
if (unlikely(ac == NULL))
return true;
alter_info.alter_list.push_back(ac, mem_root);
alter_info.flags|= ALTER_CHANGE_COLUMN_DEFAULT;
return false;
} | O0 | cpp | LEX::add_alter_list(st_mysql_const_lex_string, Virtual_column_info*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %r8b, %al
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0xde8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movl $0x30, %edi
callq 0x7dbfd0
movq %rax, %rcx
movq %rcx, -0x80(%rbp)
movb $0x0, -0x41(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x78(%rbp)
je 0x8bf5cf
movq -0x80(%rbp), %rdi
movb $0x1, -0x41(%rbp)
movups -0x18(%rbp), %xmm0
movaps %xmm0, -0x60(%rbp)
movq -0x28(%rbp), %rcx
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movzbl -0x29(%rbp), %r8d
andl $0x1, %r8d
callq 0x8df080
jmp 0x8bf5c5
movq -0x80(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x8bf5cf
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x8bf615
movb $0x1, -0x1(%rbp)
jmp 0x8bf654
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x8bf603
jmp 0x8bf613
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdi
callq 0x7dc010
jmp 0x8bf662
movq -0x90(%rbp), %rdi
addq $0x1840, %rdi # imm = 0x1840
addq $0x18, %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8df0e0
movq -0x90(%rbp), %rax
movq 0x18e8(%rax), %rcx
orq $0x100, %rcx # imm = 0x100
movq %rcx, 0x18e8(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x7589b0
nopl (%rax,%rax)
| _ZN3LEX14add_alter_listE25st_mysql_const_lex_stringP19Virtual_column_infob:
push rbp
mov rbp, rsp
sub rsp, 90h
mov al, r8b
mov qword ptr [rbp+var_18], rsi
mov qword ptr [rbp+var_18+8], rdx
mov [rbp+var_20], rdi
mov [rbp+var_28], rcx
and al, 1
mov [rbp+var_29], al
mov rax, [rbp+var_20]
mov [rbp+var_90], rax
mov rax, [rax+0DE8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rsi, [rbp+var_38]
mov [rbp+var_88], rsi
mov edi, 30h ; '0'
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_80], rcx
mov [rbp+var_41], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_78], rax
jz short loc_8BF5CF
mov rdi, [rbp+var_80]
mov [rbp+var_41], 1
movups xmm0, [rbp+var_18]
movaps [rbp+var_60], xmm0
mov rcx, [rbp+var_28]
mov rsi, qword ptr [rbp+var_60]
mov rdx, qword ptr [rbp+var_60+8]
movzx r8d, [rbp+var_29]
and r8d, 1
call _ZN12Alter_columnC2E25st_mysql_const_lex_stringP19Virtual_column_infob; Alter_column::Alter_column(st_mysql_const_lex_string,Virtual_column_info *,bool)
jmp short $+2
loc_8BF5C5:
mov rax, [rbp+var_80]
mov [rbp+var_78], rax
jmp short $+2
loc_8BF5CF:
mov rax, [rbp+var_78]
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_8BF615
mov [rbp+var_1], 1
jmp short loc_8BF654
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
test [rbp+var_41], 1
jnz short loc_8BF603
jmp short loc_8BF613
loc_8BF603:
mov rsi, [rbp+var_88]
mov rdi, [rbp+var_80]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_8BF613:
jmp short loc_8BF662
loc_8BF615:
mov rdi, [rbp+var_90]
add rdi, 1840h
add rdi, 18h
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
call _ZN4ListI12Alter_columnE9push_backEPS0_P11st_mem_root; List<Alter_column>::push_back(Alter_column*,st_mem_root *)
mov rax, [rbp+var_90]
mov rcx, [rax+18E8h]
or rcx, 100h
mov [rax+18E8h], rcx
mov [rbp+var_1], 0
loc_8BF654:
mov al, [rbp+var_1]
and al, 1
add rsp, 90h
pop rbp
retn
loc_8BF662:
mov rdi, [rbp+var_68]
call __Unwind_Resume
| char LEX::add_alter_list(long long a1, long long a2, long long a3, long long a4, char a5)
{
long long v6; // [rsp+10h] [rbp-80h]
long long v7; // [rsp+18h] [rbp-78h]
long long v8; // [rsp+58h] [rbp-38h]
char v9; // [rsp+67h] [rbp-29h]
v9 = a5 & 1;
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 3560) + 40LL);
v6 = Sql_alloc::operator new(48LL, v8);
v7 = 0LL;
if ( v6 )
{
Alter_column::Alter_column(v6, a2, a3, a4, v9 & 1);
v7 = v6;
}
if ( !v7 )
return 1;
List<Alter_column>::push_back(a1 + 6232, v7, v8);
*(_QWORD *)(a1 + 6376) |= 0x100uLL;
return 0;
}
| __cxx_global_var_init.9:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x26926d0]
MOV ESI,0x3800000
CALL 0x008db900
POP RBP
RET
|
void __cxx_global_var_init_9(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_MODE_FOR_XXX_TO_DATE,0x3800000);
return;
}
|
|
1,128 | get_charset_name | eloqsql/mysys/charset.c | const char *get_charset_name(uint charset_number)
{
my_pthread_once(&charsets_initialized, init_available_charsets);
if (charset_number < array_elements(all_charsets))
{
CHARSET_INFO *cs= all_charsets[charset_number];
if (cs && (cs->number == charset_number) && cs->coll_name.str)
return cs->coll_name.str;
}
return "?"; /* this mimics find_type() */
} | O0 | c | get_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x363052(%rip), %rdi # 0x38c5f4
leaq -0x479(%rip), %rsi # 0x29130
callq 0x24270
cmpl $0x800, -0xc(%rbp) # imm = 0x800
jae 0x295f8
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x35afbd(%rip), %rax # 0x384580
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x295f6
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x295f6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x295f6
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x29603
jmp 0x295f8
leaq 0x4efdb(%rip), %rax # 0x785da
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| get_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_C], 800h
jnb short loc_295F8
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_295F6
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_295F6
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_295F6
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_29603
loc_295F6:
jmp short $+2
loc_295F8:
lea rax, asc_785DA; "?"
mov [rbp+var_8], rax
loc_29603:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| const char * get_charset_name(unsigned int a1)
{
long long v2; // [rsp+8h] [rbp-18h]
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 && (v2 = all_charsets[a1]) != 0 && *(_DWORD *)v2 == a1 && *(_QWORD *)(v2 + 32) )
return *(const char **)(v2 + 32);
else
return "?";
}
| get_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RDI,[0x48c5f4]
LEA RSI,[0x129130]
CALL 0x00124270
CMP dword ptr [RBP + -0xc],0x800
JNC 0x001295f8
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x484580]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001295f6
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001295f6
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001295f6
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00129603
LAB_001295f6:
JMP 0x001295f8
LAB_001295f8:
LEA RAX,[0x1785da]
MOV qword ptr [RBP + -0x8],RAX
LAB_00129603:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * get_charset_name(uint param_1)
{
uint *puVar1;
int *local_10;
pthread_once(&charsets_initialized,init_available_charsets);
if ((((param_1 < 0x800) && (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 != (uint *)0x0)) &&
(*puVar1 == param_1)) && (*(long *)(puVar1 + 8) != 0)) {
local_10 = *(int **)(puVar1 + 8);
}
else {
local_10 = &DAT_001785da;
}
return local_10;
}
|
|
1,129 | ma_crypt_data_pre_write_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint size= share->block_size;
uint key_version;
uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0));
if (crypt_buf == NULL)
{
args->crypt_buf= NULL; /* for post-hook */
return 1;
}
if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
}
maria_page_crc_set_normal(args);
{
const uchar *src= args->page;
uchar* dst= crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uchar page_type= src[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK;
const uint head= (page_type <= TAIL_PAGE) ?
PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share);
const uint tail= CRC_SIZE;
const uint32 key_version_offset= (page_type <= TAIL_PAGE) ?
KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET;
DBUG_ASSERT(page_type < MAX_PAGE_TYPE);
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - encrypt page */
if (ma_encrypt(share, share->crypt_data,
src + head, dst + head, size - (head + tail), pageno, lsn,
&key_version))
return 1;
/* 3 - copy tail */
memcpy(dst + size - tail, src + size - tail, tail);
/* 4 - store key version */
int4store(dst + key_version_offset, key_version);
}
/* swap pointers to instead write out the encrypted block */
args->crypt_buf= args->page;
args->page= crypt_buf;
return 0;
} | O0 | c | ma_crypt_data_pre_write_hook:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, %esi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xfc090
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa0acf
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa0c55
movq -0x18(%rbp), %rax
cmpb $0x0, 0x44c(%rax)
jne 0xa0ae8
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xa12e0
movq -0x10(%rbp), %rdi
callq 0x9f360
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x30(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x30(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x7(%rax), %eax
andl $0x7, %eax
movb %al, -0x49(%rbp)
movzbl -0x49(%rbp), %eax
cmpl $0x2, %eax
jg 0xa0b6d
movq -0x18(%rbp), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, -0x64(%rbp)
jmp 0xa0b7d
movq -0x18(%rbp), %rax
movl 0xc18(%rax), %eax
addl $0x8, %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x50(%rbp)
movl $0x4, -0x54(%rbp)
movzbl -0x49(%rbp), %edx
movl $0x8, %eax
movl $0xc, %ecx
cmpl $0x2, %edx
cmovlel %ecx, %eax
movl %eax, -0x58(%rbp)
jmp 0xa0ba3
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x50(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xc20(%rax), %rsi
movq -0x30(%rbp), %rdx
movl -0x50(%rbp), %eax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movl -0x50(%rbp), %eax
addq %rax, %rcx
movl -0x1c(%rbp), %r8d
movl -0x50(%rbp), %eax
addl $0x4, %eax
subl %eax, %r8d
movl -0x3c(%rbp), %r9d
movq -0x48(%rbp), %r10
leaq -0x20(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xa1390
cmpl $0x0, %eax
je 0xa0c0a
movb $0x1, -0x1(%rbp)
jmp 0xa0c55
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
movl %edx, -0x4(%rax,%rcx)
movq -0x38(%rbp), %rax
movl -0x58(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x20(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_crypt_data_pre_write_hook:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
mov esi, eax
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_A0ACF
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov [rbp+var_1], 1
jmp loc_A0C55
loc_A0ACF:
mov rax, [rbp+var_18]
cmp byte ptr [rax+44Ch], 0
jnz short loc_A0AE8
mov rax, [rbp+var_10]
mov rdi, [rax]
call store_rand_lsn
loc_A0AE8:
mov rdi, [rbp+var_10]
call maria_page_crc_set_normal
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_3C], eax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_30]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+7]
and eax, 7
mov [rbp+var_49], al
movzx eax, [rbp+var_49]
cmp eax, 2
jg short loc_A0B6D
mov rax, [rbp+var_18]
mov eax, [rax+0C18h]
add eax, 0Ch
mov [rbp+var_64], eax
jmp short loc_A0B7D
loc_A0B6D:
mov rax, [rbp+var_18]
mov eax, [rax+0C18h]
add eax, 8
mov [rbp+var_64], eax
loc_A0B7D:
mov eax, [rbp+var_64]
mov [rbp+var_50], eax
mov [rbp+var_54], 4
movzx edx, [rbp+var_49]
mov eax, 8
mov ecx, 0Ch
cmp edx, 2
cmovle eax, ecx
mov [rbp+var_58], eax
jmp short $+2
loc_A0BA3:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_50]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_18]
mov rax, [rbp+var_18]
mov rsi, [rax+0C20h]
mov rdx, [rbp+var_30]
mov eax, [rbp+var_50]
add rdx, rax
mov rcx, [rbp+var_38]
mov eax, [rbp+var_50]
add rcx, rax
mov r8d, [rbp+var_1C]
mov eax, [rbp+var_50]
add eax, 4
sub r8d, eax
mov r9d, [rbp+var_3C]
mov r10, [rbp+var_48]
lea rax, [rbp+var_20]
mov [rsp+80h+var_80], r10
mov [rsp+80h+var_78], rax
call ma_encrypt
cmp eax, 0
jz short loc_A0C0A
mov [rbp+var_1], 1
jmp short loc_A0C55
loc_A0C0A:
mov rax, [rbp+var_38]
mov ecx, [rbp+var_1C]
mov rdx, [rbp+var_30]
mov esi, [rbp+var_1C]
mov edx, [rdx+rsi-4]
mov [rax+rcx-4], edx
mov rax, [rbp+var_38]
mov ecx, [rbp+var_58]
add rax, rcx
mov [rbp+var_60], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_60]
mov [rax], ecx
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_1], 0
loc_A0C55:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
| char ma_crypt_data_pre_write_hook(long long *a1)
{
int v1; // eax
int v2; // eax
unsigned int v4; // [rsp+28h] [rbp-58h]
unsigned int v5; // [rsp+30h] [rbp-50h]
unsigned __int8 v6; // [rsp+37h] [rbp-49h]
unsigned long long v7; // [rsp+38h] [rbp-48h]
int v8; // [rsp+44h] [rbp-3Ch]
unsigned __int16 *v9; // [rsp+50h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-28h]
int v11; // [rsp+60h] [rbp-20h] BYREF
unsigned int v12; // [rsp+64h] [rbp-1Ch]
long long v13; // [rsp+68h] [rbp-18h]
long long *v14; // [rsp+70h] [rbp-10h]
v14 = a1;
v13 = a1[2];
v12 = *(_DWORD *)(v13 + 1980);
v10 = my_malloc(0LL, *(unsigned int *)(v13 + 1980), 0LL);
if ( v10 )
{
if ( !*(_BYTE *)(v13 + 1100) )
store_rand_lsn(*v14);
maria_page_crc_set_normal(v14);
v9 = (unsigned __int16 *)*v14;
v8 = v14[1];
v7 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32);
v6 = *(_BYTE *)(*v14 + 7) & 7;
if ( v6 > 2u )
v1 = *(_DWORD *)(v13 + 3096) + 8;
else
v1 = *(_DWORD *)(v13 + 3096) + 12;
v5 = v1;
v2 = 8;
if ( v6 <= 2u )
v2 = 12;
v4 = v2;
memcpy(v10, v9, v5);
if ( (unsigned int)ma_encrypt(
v13,
*(_QWORD *)(v13 + 3104),
v5 + (unsigned int)v9,
v5 + (unsigned int)v10,
v12 - (v5 + 4),
v8,
v7,
(long long)&v11) )
{
return 1;
}
else
{
*(_DWORD *)(v10 + v12 - 4) = *(_DWORD *)((char *)v9 + v12 - 4);
*(_DWORD *)(v4 + v10) = v11;
v14[3] = *v14;
*v14 = v10;
return 0;
}
}
else
{
v14[3] = 0LL;
return 1;
}
}
| ma_crypt_data_pre_write_hook:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV ESI,EAX
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001fc090
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001a0acf
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a0c55
LAB_001a0acf:
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x44c],0x0
JNZ 0x001a0ae8
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001a12e0
LAB_001a0ae8:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019f360
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x7]
AND EAX,0x7
MOV byte ptr [RBP + -0x49],AL
MOVZX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x2
JG 0x001a0b6d
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001a0b7d
LAB_001a0b6d:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0x8
MOV dword ptr [RBP + -0x64],EAX
LAB_001a0b7d:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x50],EAX
MOV dword ptr [RBP + -0x54],0x4
MOVZX EDX,byte ptr [RBP + -0x49]
MOV EAX,0x8
MOV ECX,0xc
CMP EDX,0x2
CMOVLE EAX,ECX
MOV dword ptr [RBP + -0x58],EAX
JMP 0x001a0ba3
LAB_001a0ba3:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x50]
MOV EDX,EAX
CALL 0x0012a0b0
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0xc20]
MOV RDX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x50]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x50]
ADD RCX,RAX
MOV R8D,dword ptr [RBP + -0x1c]
MOV EAX,dword ptr [RBP + -0x50]
ADD EAX,0x4
SUB R8D,EAX
MOV R9D,dword ptr [RBP + -0x3c]
MOV R10,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0x20]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001a1390
CMP EAX,0x0
JZ 0x001a0c0a
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a0c55
LAB_001a0c0a:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4]
MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x58]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_001a0c55:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1 ma_crypt_data_pre_write_hook(int8 *param_1)
{
int4 uVar1;
int3 *__src;
ulong uVar2;
int3 uVar3;
byte bVar4;
uint uVar5;
int iVar6;
void *__dest;
uint local_6c;
int4 local_28;
uint local_24;
long local_20;
int8 *local_18;
int1 local_9;
local_20 = param_1[2];
local_24 = *(uint *)(local_20 + 0x7bc);
local_18 = param_1;
__dest = (void *)my_malloc(0,*(int4 *)(local_20 + 0x7bc),0);
if (__dest == (void *)0x0) {
local_18[3] = 0;
local_9 = 1;
}
else {
if (*(char *)(local_20 + 0x44c) == '\0') {
store_rand_lsn(*local_18);
}
maria_page_crc_set_normal(local_18);
__src = (int3 *)*local_18;
uVar2 = local_18[1];
uVar3 = *__src;
uVar1 = *(int4 *)((long)__src + 3);
bVar4 = *(byte *)((long)__src + 7) & 7;
if (bVar4 < 3) {
local_6c = *(int *)(local_20 + 0xc18) + 0xc;
}
else {
local_6c = *(int *)(local_20 + 0xc18) + 8;
}
uVar5 = 8;
if (bVar4 < 3) {
uVar5 = 0xc;
}
memcpy(__dest,__src,(ulong)local_6c);
iVar6 = ma_encrypt(local_20,*(int8 *)(local_20 + 0xc20),(long)__src + (ulong)local_6c,
(long)__dest + (ulong)local_6c,local_24 - (local_6c + 4),uVar2 & 0xffffffff,
(ulong)CONCAT34(uVar3,uVar1),&local_28);
if (iVar6 == 0) {
*(int4 *)((long)__dest + ((ulong)local_24 - 4)) =
*(int4 *)((long)__src + ((ulong)local_24 - 4));
*(int4 *)((long)__dest + (ulong)uVar5) = local_28;
local_18[3] = *local_18;
*local_18 = __dest;
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
|
|
1,130 | 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 0x7a6c8
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 0x7a6d1
jmp 0x7a6e1
jmp 0x7a6d3
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x7a699
movq -0x50(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x7a6f0
jmp 0x7a8e5
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7a711
movl $0x1, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x7a73b
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x7a732
movl $0x0, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x7a739
movl $0x0, -0x3c(%rbp)
jmp 0x7a73b
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 0x7a845
movzbl -0x51(%rbp), %eax
cmpl $0x30, %eax
jl 0x7a7a0
movzbl -0x51(%rbp), %eax
cmpl $0x39, %eax
jg 0x7a7a0
movzbl -0x51(%rbp), %eax
subl $0x30, %eax
movb %al, -0x51(%rbp)
jmp 0x7a7e8
movzbl -0x51(%rbp), %eax
cmpl $0x41, %eax
jl 0x7a7c1
movzbl -0x51(%rbp), %eax
cmpl $0x5a, %eax
jg 0x7a7c1
movzbl -0x51(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x51(%rbp)
jmp 0x7a7e6
movzbl -0x51(%rbp), %eax
cmpl $0x61, %eax
jl 0x7a7e2
movzbl -0x51(%rbp), %eax
cmpl $0x7a, %eax
jg 0x7a7e2
movzbl -0x51(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x51(%rbp)
jmp 0x7a7e4
jmp 0x7a845
jmp 0x7a7e6
jmp 0x7a7e8
movzbl -0x51(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x7a7f3
jmp 0x7a845
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
ja 0x7a80c
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x7a815
movzbl -0x51(%rbp), %eax
cmpl -0x44(%rbp), %eax
jbe 0x7a815
movl $0x1, -0x6c(%rbp)
jmp 0x7a829
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 0x7a82b
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb 0x1(%rax), %al
movb %al, -0x51(%rbp)
jmp 0x7a774
movq -0x50(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x7a854
jmp 0x7a8e5
cmpq $0x0, -0x30(%rbp)
je 0x7a866
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x7a87e
cmpl $0x80000000, -0x48(%rbp) # imm = 0x80000000
jbe 0x7a87c
movl $0x1, -0x6c(%rbp)
jmp 0x7a892
movl -0x48(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0x7a890
movl $0x1, -0x6c(%rbp)
jmp 0x7a892
cmpl $0x0, -0x6c(%rbp)
je 0x7a8be
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 0x7a909
cmpl $0x0, -0x3c(%rbp)
je 0x7a8d4
movl -0x48(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x7a8db
movl -0x48(%rbp), %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7a909
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x7a901
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_7A699:
mov rcx, [rbp+var_50]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_6D], al
jnb short loc_7A6C8
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_7A6C8:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_7A6D1
jmp short loc_7A6E1
loc_7A6D1:
jmp short $+2
loc_7A6D3:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_7A699
loc_7A6E1:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_68]
jnz short loc_7A6F0
jmp loc_7A8E5
loc_7A6F0:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_7A711
mov [rbp+var_3C], 1
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_7A73B
loc_7A711:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_7A732
mov [rbp+var_3C], 0
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_7A739
loc_7A732:
mov [rbp+var_3C], 0
loc_7A739:
jmp short $+2
loc_7A73B:
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_7A774:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_68]
jz loc_7A845
movzx eax, [rbp+var_51]
cmp eax, 30h ; '0'
jl short loc_7A7A0
movzx eax, [rbp+var_51]
cmp eax, 39h ; '9'
jg short loc_7A7A0
movzx eax, [rbp+var_51]
sub eax, 30h ; '0'
mov [rbp+var_51], al
jmp short loc_7A7E8
loc_7A7A0:
movzx eax, [rbp+var_51]
cmp eax, 41h ; 'A'
jl short loc_7A7C1
movzx eax, [rbp+var_51]
cmp eax, 5Ah ; 'Z'
jg short loc_7A7C1
movzx eax, [rbp+var_51]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_51], al
jmp short loc_7A7E6
loc_7A7C1:
movzx eax, [rbp+var_51]
cmp eax, 61h ; 'a'
jl short loc_7A7E2
movzx eax, [rbp+var_51]
cmp eax, 7Ah ; 'z'
jg short loc_7A7E2
movzx eax, [rbp+var_51]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_51], al
jmp short loc_7A7E4
loc_7A7E2:
jmp short loc_7A845
loc_7A7E4:
jmp short $+2
loc_7A7E6:
jmp short $+2
loc_7A7E8:
movzx eax, [rbp+var_51]
cmp eax, [rbp+var_24]
jl short loc_7A7F3
jmp short loc_7A845
loc_7A7F3:
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
ja short loc_7A80C
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
jnz short loc_7A815
movzx eax, [rbp+var_51]
cmp eax, [rbp+var_44]
jbe short loc_7A815
loc_7A80C:
mov [rbp+var_6C], 1
jmp short loc_7A829
loc_7A815:
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_7A829:
jmp short $+2
loc_7A82B:
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_7A774
loc_7A845:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_60]
jnz short loc_7A854
jmp loc_7A8E5
loc_7A854:
cmp [rbp+var_30], 0
jz short loc_7A866
mov rcx, [rbp+var_50]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_7A866:
cmp [rbp+var_3C], 0
jz short loc_7A87E
cmp [rbp+var_48], 80000000h
jbe short loc_7A87C
mov [rbp+var_6C], 1
loc_7A87C:
jmp short loc_7A892
loc_7A87E:
mov eax, [rbp+var_48]
cmp rax, 7FFFFFFFh
jle short loc_7A890
mov [rbp+var_6C], 1
loc_7A890:
jmp short $+2
loc_7A892:
cmp [rbp+var_6C], 0
jz short loc_7A8BE
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_7A909
loc_7A8BE:
cmp [rbp+var_3C], 0
jz short loc_7A8D4
mov eax, [rbp+var_48]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_78], rax
jmp short loc_7A8DB
loc_7A8D4:
mov eax, [rbp+var_48]
mov [rbp+var_78], rax
loc_7A8DB:
mov rax, [rbp+var_78]
mov [rbp+var_8], rax
jmp short loc_7A909
loc_7A8E5:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_7A901
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_7A901:
mov [rbp+var_8], 0
loc_7A909:
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_0017a699:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x6d],AL
JNC 0x0017a6c8
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_0017a6c8:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x0017a6d1
JMP 0x0017a6e1
LAB_0017a6d1:
JMP 0x0017a6d3
LAB_0017a6d3:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017a699
LAB_0017a6e1:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x0017a6f0
JMP 0x0017a8e5
LAB_0017a6f0:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0017a711
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017a73b
LAB_0017a711:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0017a732
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017a739
LAB_0017a732:
MOV dword ptr [RBP + -0x3c],0x0
LAB_0017a739:
JMP 0x0017a73b
LAB_0017a73b:
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_0017a774:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x0017a845
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x30
JL 0x0017a7a0
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x39
JG 0x0017a7a0
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x30
MOV byte ptr [RBP + -0x51],AL
JMP 0x0017a7e8
LAB_0017a7a0:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x41
JL 0x0017a7c1
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x5a
JG 0x0017a7c1
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x51],AL
JMP 0x0017a7e6
LAB_0017a7c1:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x61
JL 0x0017a7e2
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x7a
JG 0x0017a7e2
MOVZX EAX,byte ptr [RBP + -0x51]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x51],AL
JMP 0x0017a7e4
LAB_0017a7e2:
JMP 0x0017a845
LAB_0017a7e4:
JMP 0x0017a7e6
LAB_0017a7e6:
JMP 0x0017a7e8
LAB_0017a7e8:
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x0017a7f3
JMP 0x0017a845
LAB_0017a7f3:
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JA 0x0017a80c
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x0017a815
MOVZX EAX,byte ptr [RBP + -0x51]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x0017a815
LAB_0017a80c:
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x0017a829
LAB_0017a815:
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_0017a829:
JMP 0x0017a82b
LAB_0017a82b:
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 0x0017a774
LAB_0017a845:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x60]
JNZ 0x0017a854
JMP 0x0017a8e5
LAB_0017a854:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0017a866
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0017a866:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0017a87e
CMP dword ptr [RBP + -0x48],0x80000000
JBE 0x0017a87c
MOV dword ptr [RBP + -0x6c],0x1
LAB_0017a87c:
JMP 0x0017a892
LAB_0017a87e:
MOV EAX,dword ptr [RBP + -0x48]
CMP RAX,0x7fffffff
JLE 0x0017a890
MOV dword ptr [RBP + -0x6c],0x1
LAB_0017a890:
JMP 0x0017a892
LAB_0017a892:
CMP dword ptr [RBP + -0x6c],0x0
JZ 0x0017a8be
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 0x0017a909
LAB_0017a8be:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0017a8d4
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0017a8db
LAB_0017a8d4:
MOV EAX,dword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x78],RAX
LAB_0017a8db:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017a909
LAB_0017a8e5:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0017a901
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0017a901:
MOV qword ptr [RBP + -0x8],0x0
LAB_0017a909:
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;
}
|
|
1,131 | 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;
} | O3 | c | my_strntol_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0x59eaf
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0x59eaf
incq %r10
cmpq %r11, %r10
jb 0x59e9c
cmpq %r11, %r10
je 0x59fb4
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl %ecx
xorl %ebx, %ebx
cmpq %r11, %r10
je 0x59f60
movq %rdi, -0x30(%rbp)
xorl %r12d, %r12d
movq %r10, %r14
xorl %r13d, %r13d
movl %r13d, %ebx
movl %r12d, %r15d
movb (%r14), %r12b
leal -0x30(%r12), %edi
cmpb $0xa, %dil
jb 0x59f1e
leal -0x41(%r12), %edi
cmpb $0x19, %dil
ja 0x59f0c
addb $-0x37, %r12b
jmp 0x59f1b
leal -0x61(%r12), %edi
cmpb $0x19, %dil
ja 0x59f5a
addb $-0x57, %r12b
movl %r12d, %edi
movzbl %dil, %edi
cmpl %ecx, %edi
jge 0x59f5a
movl $0x1, %r12d
cmpl %eax, %ebx
jbe 0x59f35
movl %ebx, %r13d
jmp 0x59f49
jne 0x59f3e
movl %eax, %r13d
cmpl %edi, %edx
jb 0x59f49
imull %ecx, %ebx
addl %edi, %ebx
movl %ebx, %r13d
movl %r15d, %r12d
incq %r14
cmpq %r11, %r14
jne 0x59ee7
movl %r13d, %ebx
movq %r11, %r14
movl %r12d, %r15d
movq -0x30(%rbp), %rdi
jmp 0x59f66
movq %r11, %r14
xorl %r15d, %r15d
cmpq %r10, %r14
je 0x59fb4
testq %r8, %r8
je 0x59f73
movq %r14, (%r8)
cmpl $0x80000001, %ebx # imm = 0x80000001
movl $0x1, %eax
movl %r15d, %ecx
cmovael %eax, %ecx
testl %ebx, %ebx
cmovsl %eax, %r15d
cmpb $0x2d, %dil
cmovel %ecx, %r15d
testl %r15d, %r15d
je 0x59fd0
cmpb $0x2d, %dil
movl $0x22, (%r9)
movq $-0x80000000, %rcx # imm = 0x80000000
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmoveq %rcx, %rax
jmp 0x59fc5
movl $0x21, (%r9)
testq %r8, %r8
je 0x59fc3
movq %rsi, (%r8)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %ecx
movq %rcx, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %rcx, %rax
jmp 0x59fc5
| my_strntol_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_59EAF
mov rax, [rdi+40h]
mov r10, rsi
loc_59E9C:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_59EAF
inc r10
cmp r10, r11
jb short loc_59E9C
loc_59EAF:
cmp r10, r11
jz loc_59FB4
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
mov eax, 0FFFFFFFFh
xor edx, edx
div ecx
xor ebx, ebx
cmp r10, r11
jz loc_59F60
mov [rbp+var_30], rdi
xor r12d, r12d
mov r14, r10
xor r13d, r13d
loc_59EE7:
mov ebx, r13d
mov r15d, r12d
mov r12b, [r14]
lea edi, [r12-30h]
cmp dil, 0Ah
jb short loc_59F1E
lea edi, [r12-41h]
cmp dil, 19h
ja short loc_59F0C
add r12b, 0C9h
jmp short loc_59F1B
loc_59F0C:
lea edi, [r12-61h]
cmp dil, 19h
ja short loc_59F5A
add r12b, 0A9h
loc_59F1B:
mov edi, r12d
loc_59F1E:
movzx edi, dil
cmp edi, ecx
jge short loc_59F5A
mov r12d, 1
cmp ebx, eax
jbe short loc_59F35
mov r13d, ebx
jmp short loc_59F49
loc_59F35:
jnz short loc_59F3E
mov r13d, eax
cmp edx, edi
jb short loc_59F49
loc_59F3E:
imul ebx, ecx
add ebx, edi
mov r13d, ebx
mov r12d, r15d
loc_59F49:
inc r14
cmp r14, r11
jnz short loc_59EE7
mov ebx, r13d
mov r14, r11
mov r15d, r12d
loc_59F5A:
mov rdi, [rbp+var_30]
jmp short loc_59F66
loc_59F60:
mov r14, r11
xor r15d, r15d
loc_59F66:
cmp r14, r10
jz short loc_59FB4
test r8, r8
jz short loc_59F73
mov [r8], r14
loc_59F73:
cmp ebx, 80000001h
mov eax, 1
mov ecx, r15d
cmovnb ecx, eax
test ebx, ebx
cmovs r15d, eax
cmp dil, 2Dh ; '-'
cmovz r15d, ecx
test r15d, r15d
jz short loc_59FD0
cmp dil, 2Dh ; '-'
mov dword ptr [r9], 22h ; '"'
mov rcx, 0FFFFFFFF80000000h
mov eax, 7FFFFFFFh
cmovz rax, rcx
jmp short loc_59FC5
loc_59FB4:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_59FC3
mov [r8], rsi
loc_59FC3:
xor eax, eax
loc_59FC5:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_59FD0:
mov ecx, ebx
mov rax, rcx
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, rcx
jmp short loc_59FC5
| long long my_strntol_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned int v10; // eax
unsigned int v11; // ebx
int v12; // r12d
unsigned __int8 *v13; // r14
unsigned int v14; // r13d
int v15; // r15d
unsigned __int8 v16; // r12
unsigned __int8 v17; // di
unsigned __int8 v18; // r12
int v19; // ecx
long long result; // rax
unsigned __int8 v21; // [rsp+0h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_36;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFF / a4;
v11 = 0;
if ( v9 == v6 )
{
v13 = &a2[a3];
v15 = 0;
}
else
{
v21 = v8;
v12 = 0;
v13 = v9;
v14 = 0;
while ( 1 )
{
v11 = v14;
v15 = v12;
v16 = *v13;
v17 = *v13 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= (int)a4 )
break;
v12 = 1;
if ( v14 <= v10 )
{
if ( v14 != v10 || (v14 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) )
{
v14 = v17 + a4 * v11;
v12 = v15;
}
}
if ( ++v13 == v6 )
{
v11 = v14;
v13 = &a2[a3];
v15 = v12;
break;
}
}
v8 = v21;
}
if ( v13 == v9 )
{
LABEL_36:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v13;
v19 = v15;
if ( v11 >= 0x80000001 )
v19 = 1;
if ( (v11 & 0x80000000) != 0 )
v15 = 1;
if ( v8 == 45 )
v15 = v19;
if ( v15 )
{
*a6 = 34;
result = 0x7FFFFFFFLL;
if ( v8 == 45 )
return 0xFFFFFFFF80000000LL;
}
else
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
}
return result;
}
| my_strntol_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x00159eaf
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_00159e9c:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x00159eaf
INC R10
CMP R10,R11
JC 0x00159e9c
LAB_00159eaf:
CMP R10,R11
JZ 0x00159fb4
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOV EAX,0xffffffff
XOR EDX,EDX
DIV ECX
XOR EBX,EBX
CMP R10,R11
JZ 0x00159f60
MOV qword ptr [RBP + -0x30],RDI
XOR R12D,R12D
MOV R14,R10
XOR R13D,R13D
LAB_00159ee7:
MOV EBX,R13D
MOV R15D,R12D
MOV R12B,byte ptr [R14]
LEA EDI,[R12 + -0x30]
CMP DIL,0xa
JC 0x00159f1e
LEA EDI,[R12 + -0x41]
CMP DIL,0x19
JA 0x00159f0c
ADD R12B,0xc9
JMP 0x00159f1b
LAB_00159f0c:
LEA EDI,[R12 + -0x61]
CMP DIL,0x19
JA 0x00159f5a
ADD R12B,0xa9
LAB_00159f1b:
MOV EDI,R12D
LAB_00159f1e:
MOVZX EDI,DIL
CMP EDI,ECX
JGE 0x00159f5a
MOV R12D,0x1
CMP EBX,EAX
JBE 0x00159f35
MOV R13D,EBX
JMP 0x00159f49
LAB_00159f35:
JNZ 0x00159f3e
MOV R13D,EAX
CMP EDX,EDI
JC 0x00159f49
LAB_00159f3e:
IMUL EBX,ECX
ADD EBX,EDI
MOV R13D,EBX
MOV R12D,R15D
LAB_00159f49:
INC R14
CMP R14,R11
JNZ 0x00159ee7
MOV EBX,R13D
MOV R14,R11
MOV R15D,R12D
LAB_00159f5a:
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x00159f66
LAB_00159f60:
MOV R14,R11
XOR R15D,R15D
LAB_00159f66:
CMP R14,R10
JZ 0x00159fb4
TEST R8,R8
JZ 0x00159f73
MOV qword ptr [R8],R14
LAB_00159f73:
CMP EBX,0x80000001
MOV EAX,0x1
MOV ECX,R15D
CMOVNC ECX,EAX
TEST EBX,EBX
CMOVS R15D,EAX
CMP DIL,0x2d
CMOVZ R15D,ECX
TEST R15D,R15D
JZ 0x00159fd0
CMP DIL,0x2d
MOV dword ptr [R9],0x22
MOV RCX,-0x80000000
MOV EAX,0x7fffffff
CMOVZ RAX,RCX
JMP 0x00159fc5
LAB_00159fb4:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x00159fc3
MOV qword ptr [R8],RSI
LAB_00159fc3:
XOR EAX,EAX
LAB_00159fc5:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00159fd0:
MOV ECX,EBX
MOV RAX,RCX
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,RCX
JMP 0x00159fc5
|
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5,
int4 *param_6)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
bool bVar4;
bool bVar5;
uint uVar6;
uint uVar7;
byte *pbVar8;
byte bVar9;
uint uVar10;
byte *pbVar11;
byte *pbVar12;
*param_6 = 0;
pbVar1 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar1);
}
if (pbVar8 != pbVar1) {
bVar2 = *pbVar8;
pbVar8 = pbVar8 + ((bVar2 - 0x2b & 0xfd) == 0);
uVar10 = 0;
if (pbVar8 == pbVar1) {
bVar4 = false;
pbVar12 = pbVar1;
}
else {
bVar4 = false;
uVar10 = 0;
pbVar11 = pbVar8;
do {
bVar3 = *pbVar11;
bVar9 = bVar3 - 0x30;
pbVar12 = pbVar11;
if (9 < bVar9) {
if ((byte)(bVar3 + 0xbf) < 0x1a) {
bVar9 = bVar3 - 0x37;
}
else {
if (0x19 < (byte)(bVar3 + 0x9f)) break;
bVar9 = bVar3 + 0xa9;
}
}
if ((int)param_4 <= (int)(uint)bVar9) break;
uVar7 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = uVar10;
bVar5 = true;
if ((uVar10 <= uVar7) &&
((uVar10 != uVar7 || (uVar6 = uVar7, (uint)bVar9 <= (uint)(0xffffffff % (ulong)param_4)))
)) {
uVar6 = uVar10 * param_4 + (uint)bVar9;
bVar5 = bVar4;
}
bVar4 = bVar5;
uVar10 = uVar6;
pbVar11 = pbVar11 + 1;
pbVar12 = pbVar1;
} while (pbVar11 != pbVar1);
}
if (pbVar12 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar12;
}
bVar5 = bVar4;
if (0x80000000 < uVar10) {
bVar5 = true;
}
if ((int)uVar10 < 0) {
bVar4 = true;
}
if (bVar2 == 0x2d) {
bVar4 = bVar5;
}
if (bVar4) {
*param_6 = 0x22;
if (bVar2 != 0x2d) {
return 0x7fffffff;
}
return 0xffffffff80000000;
}
if (bVar2 == 0x2d) {
return -(ulong)uVar10;
}
return (ulong)uVar10;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
|
|
1,132 | my_uca_generate_pages | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_generate_pages(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst,
const MY_UCA_WEIGHT_LEVEL *src,
uint npages)
{
uint page;
for (page= 0; page < npages; page++)
{
if (dst->weights[page])
{
/* A page with explicit weights with no special rules */
continue;
}
if (!dst->lengths[page])
{
/*
A page with implicit weights with no special rules.
Keep dst->weights[page]==NULL and dst->lengths[page]==0.
Weights for this page will be generated at run time algorithmically,
using my_uca_scanner_next_implicit().
*/
continue;
}
/* Found a page with some special rules. */
if (my_uca_generate_page(loader, dst, src, page))
return TRUE;
}
return FALSE;
} | O0 | c | my_uca_generate_pages:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x4fda8
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x4fd6a
jmp 0x4fd9d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x28(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x4fd7d
jmp 0x4fd9d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
callq 0x50110
cmpb $0x0, %al
je 0x4fd9b
movb $0x1, -0x1(%rbp)
jmp 0x4fdac
jmp 0x4fd9d
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4fd4e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_generate_pages:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], 0
loc_4FD4E:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_4FDA8
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_28]
cmp qword ptr [rax+rcx*8], 0
jz short loc_4FD6A
jmp short loc_4FD9D
loc_4FD6A:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_28]
cmp byte ptr [rax+rcx], 0
jnz short loc_4FD7D
jmp short loc_4FD9D
loc_4FD7D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_28]
call my_uca_generate_page
cmp al, 0
jz short loc_4FD9B
mov [rbp+var_1], 1
jmp short loc_4FDAC
loc_4FD9B:
jmp short $+2
loc_4FD9D:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_4FD4E
loc_4FDA8:
mov [rbp+var_1], 0
loc_4FDAC:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_generate_pages(long long a1, long long a2, long long a3, unsigned int a4)
{
unsigned int i; // [rsp+8h] [rbp-28h]
for ( i = 0; i < a4; ++i )
{
if ( !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i)
&& *(_BYTE *)(*(_QWORD *)(a2 + 8) + i)
&& (unsigned __int8)my_uca_generate_page(a1, a2, a3, i) )
{
return 1;
}
}
return 0;
}
| my_uca_generate_pages:
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 dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],0x0
LAB_0014fd4e:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0014fda8
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x28]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0014fd6a
JMP 0x0014fd9d
LAB_0014fd6a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x28]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x0014fd7d
JMP 0x0014fd9d
LAB_0014fd7d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x28]
CALL 0x00150110
CMP AL,0x0
JZ 0x0014fd9b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014fdac
LAB_0014fd9b:
JMP 0x0014fd9d
LAB_0014fd9d:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0014fd4e
LAB_0014fda8:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014fdac:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_generate_pages(int8 param_1,long param_2,int8 param_3,uint param_4)
{
char cVar1;
uint local_30;
local_30 = 0;
while( true ) {
if (param_4 <= local_30) {
return 0;
}
if (((*(long *)(*(long *)(param_2 + 0x10) + (ulong)local_30 * 8) == 0) &&
(*(char *)(*(long *)(param_2 + 8) + (ulong)local_30) != '\0')) &&
(cVar1 = my_uca_generate_page(param_1,param_2,param_3,local_30), cVar1 != '\0')) break;
local_30 = local_30 + 1;
}
return 1;
}
|
|
1,133 | my_coll_rule_shift_at_level | eloqsql/strings/ctype-uca.c | static void
my_coll_rule_shift_at_level(MY_COLL_RULE *r, int level)
{
switch (level)
{
case 4: /* Quaternary difference */
r->diff[3]++;
break;
case 3: /* Tertiary difference */
r->diff[2]++;
r->diff[3]= 0;
break;
case 2: /* Secondary difference */
r->diff[1]++;
r->diff[2]= r->diff[3]= 0;
break;
case 1: /* Primary difference */
r->diff[0]++;
r->diff[1]= r->diff[2]= r->diff[3]= 0;
break;
case 0:
/* Do nothing for '=': use the previous offsets for all levels */
break;
default:
DBUG_ASSERT(0);
}
} | O0 | c | my_coll_rule_shift_at_level:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x5658d
movq -0x18(%rbp), %rax
leaq 0xf39a9(%rip), %rcx # 0x149e80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8c(%rax)
jmp 0x56593
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
jmp 0x56593
movq -0x8(%rbp), %rax
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
jmp 0x56593
movq -0x8(%rbp), %rax
movl 0x80(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x80(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x84(%rax)
jmp 0x56593
jmp 0x56593
jmp 0x5658f
jmp 0x56591
jmp 0x56593
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_rule_shift_at_level:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
mov [rbp+var_18], rax
sub rax, 4; switch 5 cases
ja def_564DE; jumptable 00000000000564DE default case
mov rax, [rbp+var_18]
lea rcx, jpt_564DE
movsxd rax, ds:(jpt_564DE - 149E80h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_564E0:
mov rax, [rbp+var_8]; jumptable 00000000000564DE case 4
mov ecx, [rax+8Ch]
add ecx, 1
mov [rax+8Ch], ecx
jmp loc_56593
loc_564F8:
mov rax, [rbp+var_8]; jumptable 00000000000564DE case 3
mov ecx, [rax+88h]
add ecx, 1
mov [rax+88h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
jmp short loc_56593
loc_5651B:
mov rax, [rbp+var_8]; jumptable 00000000000564DE case 2
mov ecx, [rax+84h]
add ecx, 1
mov [rax+84h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
jmp short loc_56593
loc_5654C:
mov rax, [rbp+var_8]; jumptable 00000000000564DE case 1
mov ecx, [rax+80h]
add ecx, 1
mov [rax+80h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+84h], 0
jmp short loc_56593
loc_5658B:
jmp short loc_56593; jumptable 00000000000564DE case 0
def_564DE:
jmp short $+2; jumptable 00000000000564DE default case
loc_5658F:
jmp short $+2
loc_56591:
jmp short $+2
loc_56593:
pop rbp
retn
| unsigned long long my_coll_rule_shift_at_level(_DWORD *a1, unsigned int a2)
{
unsigned long long result; // rax
result = a2;
switch ( a2 )
{
case 1u:
++a1[32];
a1[35] = 0;
a1[34] = 0;
result = (unsigned long long)a1;
a1[33] = 0;
break;
case 2u:
++a1[33];
a1[35] = 0;
result = (unsigned long long)a1;
a1[34] = 0;
break;
case 3u:
++a1[34];
result = (unsigned long long)a1;
a1[35] = 0;
break;
case 4u:
result = (unsigned long long)a1;
++a1[35];
break;
default:
return result;
}
return result;
}
| my_coll_rule_shift_at_level:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x18],RAX
SUB RAX,0x4
JA 0x0015658d
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x249e80]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8c],ECX
JMP 0x00156593
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x88]
ADD ECX,0x1
MOV dword ptr [RAX + 0x88],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
JMP 0x00156593
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x84]
ADD ECX,0x1
MOV dword ptr [RAX + 0x84],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
JMP 0x00156593
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x80]
ADD ECX,0x1
MOV dword ptr [RAX + 0x80],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x84],0x0
JMP 0x00156593
caseD_0:
JMP 0x00156593
LAB_0015658d:
JMP 0x0015658f
LAB_0015658f:
JMP 0x00156591
LAB_00156591:
JMP 0x00156593
default:
POP RBP
RET
|
void my_coll_rule_shift_at_level(long param_1,int4 param_2)
{
switch(param_2) {
case 0:
break;
case 1:
*(int *)(param_1 + 0x80) = *(int *)(param_1 + 0x80) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
*(int4 *)(param_1 + 0x88) = 0;
*(int4 *)(param_1 + 0x84) = 0;
break;
case 2:
*(int *)(param_1 + 0x84) = *(int *)(param_1 + 0x84) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
*(int4 *)(param_1 + 0x88) = 0;
break;
case 3:
*(int *)(param_1 + 0x88) = *(int *)(param_1 + 0x88) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
break;
case 4:
*(int *)(param_1 + 0x8c) = *(int *)(param_1 + 0x8c) + 1;
}
return;
}
|
|
1,134 | ggml_compute_forward_sum_rows | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_sum_rows(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_sum_rows_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | cpp | ggml_compute_forward_sum_rows:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x8b7eb
jmp 0x8b7da
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8b810
jmp 0x8b805
leaq 0x29ea6(%rip), %rdi # 0xb5698
movl $0x7df, %esi # imm = 0x7DF
leaq 0x20296(%rip), %rdx # 0xaba94
movb $0x0, %al
callq 0x10660
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| ggml_compute_forward_sum_rows:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov rax, [rax+98h]
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_8B7EB
jmp short $+2
loc_8B7DA:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZL33ggml_compute_forward_sum_rows_f32PK19ggml_compute_paramsP11ggml_tensor; ggml_compute_forward_sum_rows_f32(ggml_compute_params const*,ggml_tensor *)
jmp short loc_8B805
loc_8B7EB:
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov esi, 7DFh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_8B805:
add rsp, 18h
retn
| double ggml_compute_forward_sum_rows(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2015LL,
"fatal error");
ggml_compute_forward_sum_rows_f32(a1, a2);
return result;
}
| ggml_compute_forward_sum_rows:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x0018b7eb
JMP 0x0018b7da
LAB_0018b7da:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0018b810
JMP 0x0018b805
LAB_0018b7eb:
LEA RDI,[0x1b5698]
MOV ESI,0x7df
LEA RDX,[0x1aba94]
MOV AL,0x0
CALL 0x00110660
LAB_0018b805:
ADD RSP,0x18
RET
|
void ggml_compute_forward_sum_rows(ggml_compute_params *param_1,ggml_tensor *param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_sum_rows_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x7df,"fatal error");
}
return;
}
|
|
1,135 | ggml_compute_forward_sum_rows | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_sum_rows(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_sum_rows_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O1 | cpp | ggml_compute_forward_sum_rows:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x18(%rsp)
movq 0x98(%rsi), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, (%rax)
jne 0x35bbb
cmpl $0x0, (%rdi)
jne 0x35bac
movq 0x10(%rsp), %rsi
cmpq $0x4, 0x30(%rsi)
jne 0x35bd5
movq 0x18(%rsp), %rax
cmpq $0x4, 0x30(%rax)
jne 0x35bf4
cmpq $0x1, 0x10(%rax)
jne 0x35c10
movq 0x18(%rsi), %rcx
cmpq %rcx, 0x18(%rax)
jne 0x35c2c
movq 0x20(%rsi), %rdx
cmpq %rdx, 0x20(%rax)
jne 0x35c48
movq 0x28(%rsi), %rdi
cmpq %rdi, 0x28(%rax)
jne 0x35c64
testq %rdi, %rdi
jle 0x35bac
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r8
movq 0x38(%rax), %r9
movq 0x40(%rax), %r10
movq 0x48(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rbx
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rax
movq %rax, 0x20(%rsp)
movl %r8d, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %rdi, 0x30(%rsp)
testq %rdx, %rdx
jle 0x35b84
movq (%rsp), %rbp
imulq 0x20(%rsp), %rbp
movq 0x8(%rsp), %r13
xorl %r11d, %r11d
testq %rcx, %rcx
jle 0x35b79
movq %r11, %rdi
imulq %rsi, %rdi
movq 0x18(%rsp), %rax
addq 0xf8(%rax), %rdi
addq %rbp, %rdi
movq 0x10(%rsp), %rax
movq 0xf8(%rax), %r15
addq %r13, %r15
xorl %eax, %eax
testl %r8d, %r8d
jle 0x35b5d
vxorps %xmm0, %xmm0, %xmm0
xorl %r14d, %r14d
vcvtss2sd (%r15,%r14,4), %xmm2, %xmm1
vaddsd %xmm1, %xmm0, %xmm0
incq %r14
cmpq %r14, %r12
jne 0x35b45
vcvtsd2ss %xmm0, %xmm0, %xmm0
jmp 0x35b61
vxorps %xmm0, %xmm0, %xmm0
movq %rax, %r14
imulq %rbx, %r14
vmovss %xmm0, (%rdi,%r14)
incq %rax
addq %r9, %r15
cmpq %rcx, %rax
jne 0x35b39
incq %r11
addq %r10, %r13
cmpq %rdx, %r11
jne 0x35b0d
movq (%rsp), %r11
incq %r11
movq 0x8(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq %r11, (%rsp)
cmpq %rdi, %r11
jne 0x35af2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1dede(%rip), %rdi # 0x53aa0
leaq 0x13ab7(%rip), %rdx # 0x49680
movl $0x7df, %esi # imm = 0x7DF
xorl %eax, %eax
callq 0xaf40
leaq 0x1dec4(%rip), %rdi # 0x53aa0
leaq 0x13987(%rip), %rdx # 0x4956a
leaq 0x1e3c9(%rip), %rcx # 0x53fb3
movl $0x7bb, %esi # imm = 0x7BB
jmp 0x35c7e
leaq 0x1dea5(%rip), %rdi # 0x53aa0
leaq 0x13968(%rip), %rdx # 0x4956a
leaq 0x1e3c7(%rip), %rcx # 0x53fd0
movl $0x7bc, %esi # imm = 0x7BC
jmp 0x35c7e
leaq 0x1de89(%rip), %rdi # 0x53aa0
leaq 0x1394c(%rip), %rdx # 0x4956a
leaq 0x1e3c7(%rip), %rcx # 0x53fec
movl $0x7c0, %esi # imm = 0x7C0
jmp 0x35c7e
leaq 0x1de6d(%rip), %rdi # 0x53aa0
leaq 0x13930(%rip), %rdx # 0x4956a
leaq 0x1e3b4(%rip), %rcx # 0x53ff5
movl $0x7c1, %esi # imm = 0x7C1
jmp 0x35c7e
leaq 0x1de51(%rip), %rdi # 0x53aa0
leaq 0x13914(%rip), %rdx # 0x4956a
leaq 0x1e3a4(%rip), %rcx # 0x54001
movl $0x7c2, %esi # imm = 0x7C2
jmp 0x35c7e
leaq 0x1de35(%rip), %rdi # 0x53aa0
leaq 0x138f8(%rip), %rdx # 0x4956a
leaq 0x1e394(%rip), %rcx # 0x5400d
movl $0x7c3, %esi # imm = 0x7C3
xorl %eax, %eax
callq 0xaf40
| ggml_compute_forward_sum_rows:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_50], rsi
mov rax, [rsi+98h]
mov [rsp+68h+var_58], rax
cmp dword ptr [rax], 0
jnz loc_35BBB
cmp dword ptr [rdi], 0
jnz loc_35BAC
mov rsi, [rsp+68h+var_58]
cmp qword ptr [rsi+30h], 4
jnz loc_35BD5
mov rax, [rsp+68h+var_50]
cmp qword ptr [rax+30h], 4
jnz loc_35BF4
cmp qword ptr [rax+10h], 1
jnz loc_35C10
mov rcx, [rsi+18h]
cmp [rax+18h], rcx
jnz loc_35C2C
mov rdx, [rsi+20h]
cmp [rax+20h], rdx
jnz loc_35C48
mov rdi, [rsi+28h]
cmp [rax+28h], rdi
jnz loc_35C64
test rdi, rdi
jle loc_35BAC
mov rax, [rsp+68h+var_58]
mov r8, [rax+10h]
mov r9, [rax+38h]
mov r10, [rax+40h]
mov rax, [rax+48h]
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_50]
mov rbx, [rax+38h]
mov rsi, [rax+40h]
mov rax, [rax+48h]
mov [rsp+68h+var_48], rax
mov r12d, r8d
and r12d, 7FFFFFFFh
mov [rsp+68h+var_60], 0
mov [rsp+68h+var_68], 0
mov [rsp+68h+var_38], rdi
loc_35AF2:
test rdx, rdx
jle loc_35B84
mov rbp, [rsp+68h+var_68]
imul rbp, [rsp+68h+var_48]
mov r13, [rsp+68h+var_60]
xor r11d, r11d
loc_35B0D:
test rcx, rcx
jle short loc_35B79
mov rdi, r11
imul rdi, rsi
mov rax, [rsp+68h+var_50]
add rdi, [rax+0F8h]
add rdi, rbp
mov rax, [rsp+68h+var_58]
mov r15, [rax+0F8h]
add r15, r13
xor eax, eax
loc_35B39:
test r8d, r8d
jle short loc_35B5D
vxorps xmm0, xmm0, xmm0
xor r14d, r14d
loc_35B45:
vcvtss2sd xmm1, xmm2, dword ptr [r15+r14*4]
vaddsd xmm0, xmm0, xmm1
inc r14
cmp r12, r14
jnz short loc_35B45
vcvtsd2ss xmm0, xmm0, xmm0
jmp short loc_35B61
loc_35B5D:
vxorps xmm0, xmm0, xmm0
loc_35B61:
mov r14, rax
imul r14, rbx
vmovss dword ptr [rdi+r14], xmm0
inc rax
add r15, r9
cmp rax, rcx
jnz short loc_35B39
loc_35B79:
inc r11
add r13, r10
cmp r11, rdx
jnz short loc_35B0D
loc_35B84:
mov r11, [rsp+68h+var_68]
inc r11
mov rax, [rsp+68h+var_60]
add rax, [rsp+68h+var_40]
mov [rsp+68h+var_60], rax
mov rdi, [rsp+68h+var_38]
mov [rsp+68h+var_68], r11
cmp r11, rdi
jnz loc_35AF2
loc_35BAC:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35BBB:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 7DFh
xor eax, eax
call _ggml_abort
loc_35BD5:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)"
mov esi, 7BBh
jmp loc_35C7E
loc_35BF4:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)"
mov esi, 7BCh
jmp short loc_35C7E
loc_35C10:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe01; "ne0 == 1"
mov esi, 7C0h
jmp short loc_35C7E
loc_35C2C:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe1Ne01; "ne1 == ne01"
mov esi, 7C1h
jmp short loc_35C7E
loc_35C48:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe2Ne02; "ne2 == ne02"
mov esi, 7C2h
jmp short loc_35C7E
loc_35C64:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNe3Ne03; "ne3 == ne03"
mov esi, 7C3h
loc_35C7E:
xor eax, eax
call _ggml_abort
| long long ggml_compute_forward_sum_rows(_DWORD *a1, _QWORD *a2, __m128 _XMM0, double a4, __m128 _XMM2)
{
long long result; // rax
long long v6; // rcx
long long v7; // rdx
long long v8; // rdi
long long v9; // r8
long long v10; // r9
long long v11; // r10
long long v12; // rbx
long long v13; // rsi
long long v14; // r13
long long i; // r11
long long v17; // r15
long long j; // rax
long long v20; // r14
long long v23; // [rsp+0h] [rbp-68h]
long long v24; // [rsp+8h] [rbp-60h]
_QWORD *v25; // [rsp+10h] [rbp-58h]
long long v27; // [rsp+20h] [rbp-48h]
long long v28; // [rsp+28h] [rbp-40h]
long long v29; // [rsp+30h] [rbp-38h]
result = a2[19];
v25 = (_QWORD *)result;
if ( *(_DWORD *)result )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2015LL,
"fatal error");
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1979LL,
"GGML_ASSERT(%s) failed",
"src0->nb[0] == sizeof(float)");
return ggml_compute_forward_mean();
}
if ( *a1 )
return result;
if ( *(_QWORD *)(result + 48) != 4LL )
goto LABEL_25;
result = (long long)a2;
if ( a2[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1980LL,
"GGML_ASSERT(%s) failed",
"dst->nb[0] == sizeof(float)");
return ggml_compute_forward_mean();
}
if ( a2[2] != 1LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1984LL,
"GGML_ASSERT(%s) failed",
"ne0 == 1");
return ggml_compute_forward_mean();
}
v6 = v25[3];
if ( a2[3] != v6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1985LL,
"GGML_ASSERT(%s) failed",
"ne1 == ne01");
return ggml_compute_forward_mean();
}
v7 = v25[4];
if ( a2[4] != v7 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1986LL,
"GGML_ASSERT(%s) failed",
"ne2 == ne02");
return ggml_compute_forward_mean();
}
v8 = v25[5];
if ( a2[5] != v8 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
1987LL,
"GGML_ASSERT(%s) failed",
"ne3 == ne03");
return ggml_compute_forward_mean();
}
if ( v8 > 0 )
{
v9 = v25[2];
v10 = v25[7];
v11 = v25[8];
v28 = v25[9];
v12 = a2[7];
v13 = a2[8];
v27 = a2[9];
v24 = 0LL;
v23 = 0LL;
v29 = v25[5];
do
{
if ( v7 > 0 )
{
v14 = v24;
for ( i = 0LL; i != v7; ++i )
{
if ( v6 > 0 )
{
_RDI = v27 * v23 + a2[31] + v13 * i;
v17 = v14 + v25[31];
for ( j = 0LL; j != v6; ++j )
{
if ( (int)v9 <= 0 )
{
__asm { vxorps xmm0, xmm0, xmm0 }
}
else
{
__asm { vxorps xmm0, xmm0, xmm0 }
v20 = 0LL;
do
{
__asm
{
vcvtss2sd xmm1, xmm2, dword ptr [r15+r14*4]
vaddsd xmm0, xmm0, xmm1
}
++v20;
}
while ( (v9 & 0x7FFFFFFF) != v20 );
__asm { vcvtsd2ss xmm0, xmm0, xmm0 }
}
_R14 = v12 * j;
__asm { vmovss dword ptr [rdi+r14], xmm0 }
v17 += v10;
}
}
v14 += v11;
}
}
result = v28 + v24;
v24 += v28;
++v23;
}
while ( v23 != v29 );
}
return result;
}
| ggml_compute_forward_sum_rows:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSI + 0x98]
MOV qword ptr [RSP + 0x10],RAX
CMP dword ptr [RAX],0x0
JNZ 0x00135bbb
CMP dword ptr [RDI],0x0
JNZ 0x00135bac
MOV RSI,qword ptr [RSP + 0x10]
CMP qword ptr [RSI + 0x30],0x4
JNZ 0x00135bd5
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX + 0x30],0x4
JNZ 0x00135bf4
CMP qword ptr [RAX + 0x10],0x1
JNZ 0x00135c10
MOV RCX,qword ptr [RSI + 0x18]
CMP qword ptr [RAX + 0x18],RCX
JNZ 0x00135c2c
MOV RDX,qword ptr [RSI + 0x20]
CMP qword ptr [RAX + 0x20],RDX
JNZ 0x00135c48
MOV RDI,qword ptr [RSI + 0x28]
CMP qword ptr [RAX + 0x28],RDI
JNZ 0x00135c64
TEST RDI,RDI
JLE 0x00135bac
MOV RAX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RAX + 0x10]
MOV R9,qword ptr [RAX + 0x38]
MOV R10,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RBX,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x20],RAX
MOV R12D,R8D
AND R12D,0x7fffffff
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x30],RDI
LAB_00135af2:
TEST RDX,RDX
JLE 0x00135b84
MOV RBP,qword ptr [RSP]
IMUL RBP,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x8]
XOR R11D,R11D
LAB_00135b0d:
TEST RCX,RCX
JLE 0x00135b79
MOV RDI,R11
IMUL RDI,RSI
MOV RAX,qword ptr [RSP + 0x18]
ADD RDI,qword ptr [RAX + 0xf8]
ADD RDI,RBP
MOV RAX,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RAX + 0xf8]
ADD R15,R13
XOR EAX,EAX
LAB_00135b39:
TEST R8D,R8D
JLE 0x00135b5d
VXORPS XMM0,XMM0,XMM0
XOR R14D,R14D
LAB_00135b45:
VCVTSS2SD XMM1,XMM2,dword ptr [R15 + R14*0x4]
VADDSD XMM0,XMM0,XMM1
INC R14
CMP R12,R14
JNZ 0x00135b45
VCVTSD2SS XMM0,XMM0,XMM0
JMP 0x00135b61
LAB_00135b5d:
VXORPS XMM0,XMM0,XMM0
LAB_00135b61:
MOV R14,RAX
IMUL R14,RBX
VMOVSS dword ptr [RDI + R14*0x1],XMM0
INC RAX
ADD R15,R9
CMP RAX,RCX
JNZ 0x00135b39
LAB_00135b79:
INC R11
ADD R13,R10
CMP R11,RDX
JNZ 0x00135b0d
LAB_00135b84:
MOV R11,qword ptr [RSP]
INC R11
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],R11
CMP R11,RDI
JNZ 0x00135af2
LAB_00135bac:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135bbb:
LEA RDI,[0x153aa0]
LEA RDX,[0x149680]
MOV ESI,0x7df
XOR EAX,EAX
CALL 0x0010af40
LAB_00135bd5:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153fb3]
MOV ESI,0x7bb
JMP 0x00135c7e
LAB_00135bf4:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153fd0]
MOV ESI,0x7bc
JMP 0x00135c7e
LAB_00135c10:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153fec]
MOV ESI,0x7c0
JMP 0x00135c7e
LAB_00135c2c:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153ff5]
MOV ESI,0x7c1
JMP 0x00135c7e
LAB_00135c48:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x154001]
MOV ESI,0x7c2
JMP 0x00135c7e
LAB_00135c64:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x15400d]
MOV ESI,0x7c3
LAB_00135c7e:
XOR EAX,EAX
CALL 0x0010af40
|
void ggml_compute_forward_sum_rows(int *param_1,long param_2)
{
int *piVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
char *pcVar13;
int8 uVar14;
long lVar15;
long lVar16;
ulong uVar17;
long lVar18;
float fVar19;
long local_68;
long local_60;
piVar1 = *(int **)(param_2 + 0x98);
if (*piVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x7df,"fatal error");
}
if (*param_1 == 0) {
if (*(long *)(piVar1 + 0xc) == 4) {
if (*(long *)(param_2 + 0x30) == 4) {
if (*(long *)(param_2 + 0x10) == 1) {
lVar2 = *(long *)(piVar1 + 6);
if (*(long *)(param_2 + 0x18) == lVar2) {
lVar3 = *(long *)(piVar1 + 8);
if (*(long *)(param_2 + 0x20) == lVar3) {
lVar4 = *(long *)(piVar1 + 10);
if (*(long *)(param_2 + 0x28) == lVar4) {
if (lVar4 < 1) {
return;
}
uVar14 = *(int8 *)(piVar1 + 4);
lVar5 = *(long *)(piVar1 + 0xe);
lVar6 = *(long *)(piVar1 + 0x10);
lVar7 = *(long *)(piVar1 + 0x12);
lVar8 = *(long *)(param_2 + 0x38);
lVar9 = *(long *)(param_2 + 0x40);
lVar10 = *(long *)(param_2 + 0x48);
local_60 = 0;
local_68 = 0;
do {
if (0 < lVar3) {
lVar15 = 0;
lVar16 = local_60;
do {
if (0 < lVar2) {
lVar11 = *(long *)(param_2 + 0xf8);
lVar18 = *(long *)(piVar1 + 0x3e) + lVar16;
lVar12 = 0;
do {
if ((int)(uint)uVar14 < 1) {
fVar19 = 0.0;
}
else {
fVar19 = 0.0;
uVar17 = 0;
do {
fVar19 = fVar19 + *(float *)(lVar18 + uVar17 * 4);
uVar17 = uVar17 + 1;
} while (((uint)uVar14 & 0x7fffffff) != uVar17);
}
*(float *)(lVar15 * lVar9 + lVar11 + local_68 * lVar10 + lVar12 * lVar8) =
fVar19;
lVar12 = lVar12 + 1;
lVar18 = lVar18 + lVar5;
} while (lVar12 != lVar2);
}
lVar15 = lVar15 + 1;
lVar16 = lVar16 + lVar6;
} while (lVar15 != lVar3);
}
local_68 = local_68 + 1;
local_60 = local_60 + lVar7;
} while (local_68 != lVar4);
return;
}
pcVar13 = "ne3 == ne03";
uVar14 = 0x7c3;
}
else {
pcVar13 = "ne2 == ne02";
uVar14 = 0x7c2;
}
}
else {
pcVar13 = "ne1 == ne01";
uVar14 = 0x7c1;
}
}
else {
pcVar13 = "ne0 == 1";
uVar14 = 0x7c0;
}
}
else {
pcVar13 = "dst->nb[0] == sizeof(float)";
uVar14 = 0x7bc;
}
}
else {
pcVar13 = "src0->nb[0] == sizeof(float)";
uVar14 = 0x7bb;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,uVar14,"GGML_ASSERT(%s) failed",pcVar13);
}
return;
}
|
|
1,136 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O0 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2d0(%rbp)
movl %esi, -0x2d4(%rbp)
movq %rdx, -0x2e0(%rbp)
jmp 0x3576e
movl -0x2d4(%rbp), %eax
movl %eax, %ecx
leaq 0x35b7e3(%rip), %rax # 0x390f60
movq (%rax,%rcx,8), %rax
movq %rax, -0x2e8(%rbp)
cmpq $0x0, %rax
je 0x35977
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0x357c4
movl -0x2d4(%rbp), %edi
callq 0x370d0
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0x35985
leaq 0x35b655(%rip), %rdi # 0x390e20
leaq 0x4e0b4(%rip), %rsi # 0x83886
movl $0x36b, %edx # imm = 0x36B
callq 0x37100
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x9, %eax
cmpl $0x0, %eax
jne 0x35840
leaq -0x210(%rbp), %rdi
callq 0x34db0
movq %rax, %rdi
movq -0x2e8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x4e05a(%rip), %rdx # 0x83869
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x7f0a0
leaq -0x2c0(%rbp), %rdi
callq 0x34710
leaq -0x210(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x2c0(%rbp), %rdi
callq 0x36c50
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x35960
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x35953
movq -0x2e8(%rbp), %rdi
callq 0x36b70
cmpb $0x0, %al
jne 0x358b2
movq -0x2e8(%rbp), %rdi
callq 0x37170
movq %rax, -0x2f0(%rbp)
cmpq $0x0, -0x2f0(%rbp)
je 0x358b0
movq -0x2e8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
callq 0x371b0
jmp 0x358b2
movq -0x2e8(%rbp), %rdi
callq 0x36bd0
cmpb $0x0, %al
jne 0x358fb
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
callq 0x37230
movq %rax, -0x2f8(%rbp)
cmpq $0x0, -0x2f8(%rbp)
je 0x358f9
movq -0x2e8(%rbp), %rdi
movq -0x2f8(%rbp), %rsi
callq 0x37340
jmp 0x358fb
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0x37380
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x35931
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0x373d0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x3593e
movq $0x0, -0x2e8(%rbp)
jmp 0x35951
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0xc(%rax)
jmp 0x35953
movl -0x2d4(%rbp), %edi
callq 0x370d0
jmp 0x3596b
movq $0x0, -0x2e8(%rbp)
leaq 0x35b4ae(%rip), %rdi # 0x390e20
callq 0x37420
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x359b5
movq -0x300(%rbp), %rax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x24300
nopw (%rax,%rax)
| get_internal_charset:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2D0], rdi
mov [rbp+var_2D4], esi
mov [rbp+var_2E0], rdx
jmp short $+2
loc_3576E:
mov eax, [rbp+var_2D4]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_2E8], rax
cmp rax, 0
jz loc_35977
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jz short loc_357C4
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
jmp loc_35985
loc_357C4:
lea rdi, THR_LOCK_charset
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 36Bh
call inline_mysql_mutex_lock_0
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 9
cmp eax, 0
jnz short loc_35840
lea rdi, [rbp+var_210]
call get_charsets_dir
mov rdi, rax
mov rax, [rbp+var_2E8]
mov rsi, [rax+10h]
lea rdx, aIndexXml+5; ".xml"
xor eax, eax
mov ecx, eax
mov al, 0
call strxmov
lea rdi, [rbp+var_2C0]
call my_charset_loader_init_mysys
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_2E0]
lea rdi, [rbp+var_2C0]
call my_read_charset_file
loc_35840:
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz loc_35960
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jnz loc_35953
mov rdi, [rbp+var_2E8]
call simple_8bit_charset_data_is_full
cmp al, 0
jnz short loc_358B2
mov rdi, [rbp+var_2E8]
call find_charset_data_inheritance_source
mov [rbp+var_2F0], rax
cmp [rbp+var_2F0], 0
jz short loc_358B0
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F0]
call inherit_charset_data
loc_358B0:
jmp short $+2
loc_358B2:
mov rdi, [rbp+var_2E8]
call simple_8bit_collation_data_is_full
cmp al, 0
jnz short loc_358FB
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2E0]
call find_collation_data_inheritance_source
mov [rbp+var_2F8], rax
cmp [rbp+var_2F8], 0
jz short loc_358F9
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F8]
call inherit_collation_data
loc_358F9:
jmp short $+2
loc_358FB:
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_charset
movsx eax, al
cmp eax, 0
jnz short loc_35931
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_collation
movsx eax, al
cmp eax, 0
jz short loc_3593E
loc_35931:
mov [rbp+var_2E8], 0
jmp short loc_35951
loc_3593E:
mov rax, [rbp+var_2E8]
mov ecx, [rax+0Ch]
or ecx, 100h
mov [rax+0Ch], ecx
loc_35951:
jmp short $+2
loc_35953:
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
jmp short loc_3596B
loc_35960:
mov [rbp+var_2E8], 0
loc_3596B:
lea rdi, THR_LOCK_charset
call inline_mysql_mutex_unlock_0
loc_35977:
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
loc_35985:
mov rax, [rbp+var_2C8]
mov [rbp+var_300], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_359B5
mov rax, [rbp+var_300]
add rsp, 300h
pop rbp
retn
loc_359B5:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
unsigned int charsets_dir; // eax
int v4; // r8d
int v5; // r9d
long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h]
long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h]
long long v9; // [rsp+18h] [rbp-2E8h]
_BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF
_BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF
unsigned long long v14; // [rsp+2F8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v9 = all_charsets[a2];
if ( !v9 )
return v9;
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
inline_mysql_mutex_lock_0(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL);
if ( (*(_DWORD *)(v9 + 12) & 9) == 0 )
{
charsets_dir = (unsigned int)get_charsets_dir(v13);
strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5);
my_charset_loader_init_mysys((long long)v12);
my_read_charset_file(v12, v13, a3);
}
if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 )
{
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) )
{
charset_data_inheritance_source = find_charset_data_inheritance_source(v9);
if ( charset_data_inheritance_source )
inherit_charset_data(v9, charset_data_inheritance_source);
}
if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) )
{
collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3);
if ( collation_data_inheritance_source )
inherit_collation_data(v9, collation_data_inheritance_source);
}
if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) )
v9 = 0LL;
else
*(_DWORD *)(v9 + 12) |= 0x100u;
}
my_collation_statistics_inc_use_count(a2);
}
else
{
v9 = 0LL;
}
inline_mysql_mutex_unlock_0(&THR_LOCK_charset);
return v9;
}
my_collation_statistics_inc_use_count(a2);
return v9;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2d0],RDI
MOV dword ptr [RBP + -0x2d4],ESI
MOV qword ptr [RBP + -0x2e0],RDX
JMP 0x0013576e
LAB_0013576e:
MOV EAX,dword ptr [RBP + -0x2d4]
MOV ECX,EAX
LEA RAX,[0x490f60]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x2e8],RAX
CMP RAX,0x0
JZ 0x00135977
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JZ 0x001357c4
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001370d0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
JMP 0x00135985
LAB_001357c4:
LEA RDI,[0x490e20]
LEA RSI,[0x183886]
MOV EDX,0x36b
CALL 0x00137100
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x9
CMP EAX,0x0
JNZ 0x00135840
LEA RDI,[RBP + -0x210]
CALL 0x00134db0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[0x183869]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0017f0a0
LEA RDI,[RBP + -0x2c0]
CALL 0x00134710
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x2e0]
LEA RDI,[RBP + -0x2c0]
CALL 0x00136c50
LAB_00135840:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x00135960
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x00135953
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00136b70
CMP AL,0x0
JNZ 0x001358b2
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00137170
MOV qword ptr [RBP + -0x2f0],RAX
CMP qword ptr [RBP + -0x2f0],0x0
JZ 0x001358b0
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f0]
CALL 0x001371b0
LAB_001358b0:
JMP 0x001358b2
LAB_001358b2:
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00136bd0
CMP AL,0x0
JNZ 0x001358fb
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2e0]
CALL 0x00137230
MOV qword ptr [RBP + -0x2f8],RAX
CMP qword ptr [RBP + -0x2f8],0x0
JZ 0x001358f9
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f8]
CALL 0x00137340
LAB_001358f9:
JMP 0x001358fb
LAB_001358fb:
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x00137380
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00135931
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x001373d0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0013593e
LAB_00135931:
MOV qword ptr [RBP + -0x2e8],0x0
JMP 0x00135951
LAB_0013593e:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x100
MOV dword ptr [RAX + 0xc],ECX
LAB_00135951:
JMP 0x00135953
LAB_00135953:
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001370d0
JMP 0x0013596b
LAB_00135960:
MOV qword ptr [RBP + -0x2e8],0x0
LAB_0013596b:
LEA RDI,[0x490e20]
CALL 0x00137420
LAB_00135977:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
LAB_00135985:
MOV RAX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x300],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001359b5
MOV RAX,qword ptr [RBP + -0x300]
ADD RSP,0x300
POP RBP
RET
LAB_001359b5:
CALL 0x00124300
|
long get_internal_charset(int8 param_1,uint param_2,int8 param_3)
{
char cVar1;
int8 uVar2;
long lVar3;
long in_FS_OFFSET;
long local_2f0;
int1 local_2c8 [176];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2f0 = (&all_charsets)[param_2];
if (local_2f0 != 0) {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
inline_mysql_mutex_lock
(THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b);
if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) {
uVar2 = get_charsets_dir(local_218);
strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0);
my_charset_loader_init_mysys(local_2c8);
my_read_charset_file(local_2c8,local_218,param_3);
}
if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) {
local_2f0 = 0;
}
else {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
cVar1 = simple_8bit_charset_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) {
inherit_charset_data(local_2f0,lVar3);
}
cVar1 = simple_8bit_collation_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) {
inherit_collation_data(local_2f0,lVar3);
}
cVar1 = my_ci_init_charset(local_2f0,param_1);
if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) {
*(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100;
}
else {
local_2f0 = 0;
}
}
my_collation_statistics_inc_use_count(param_2);
}
inline_mysql_mutex_unlock(THR_LOCK_charset);
}
else {
my_collation_statistics_inc_use_count(param_2);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2f0;
}
|
|
1,137 | ft_add_word | eloqsql/storage/myisam/ft_parser.c | static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | ft_add_word:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq 0x18(%rdi), %rax
movq (%rax), %rbx
testb $0x1, 0x34(%rdi)
jne 0x750dc
movslq %edx, %r15
jmp 0x750ff
movq 0x8(%rax), %rdi
movslq %edx, %r15
movq %r15, %rsi
callq 0x9df2b
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x29080
movq %r12, %r14
leaq -0x38(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x10(%rsi)
movq 0x230(%rbx), %rcx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa5c86
testq %rax, %rax
jne 0x75133
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa5b9e
movl $0x1, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ft_add_word:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rax, [rdi+18h]
mov rbx, [rax]
test byte ptr [rdi+34h], 1
jnz short loc_750DC
movsxd r15, edx
jmp short loc_750FF
loc_750DC:
mov rdi, [rax+8]
movsxd r15, edx
mov rsi, r15
call alloc_root
mov r12, rax
mov rdi, rax
mov rsi, r14
mov rdx, r15
call _memcpy
mov r14, r12
loc_750FF:
lea rsi, [rbp+var_38]
mov [rsi], r14
mov [rsi+10h], r15
mov rcx, [rbx+230h]
xor r14d, r14d
mov rdi, rbx
xor edx, edx
call tree_insert
test rax, rax
jnz short loc_75133
mov rdi, rbx
xor esi, esi
call delete_tree
mov r14d, 1
loc_75133:
mov eax, r14d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ft_add_word(long long a1, long long a2, int a3)
{
long long v3; // r14
long long *v4; // rax
long long v5; // rbx
long long v6; // r15
long long v7; // r12
unsigned int v8; // r14d
_QWORD v10[7]; // [rsp+8h] [rbp-38h] BYREF
v3 = a2;
v4 = *(long long **)(a1 + 24);
v5 = *v4;
v6 = a3;
if ( (*(_BYTE *)(a1 + 52) & 1) != 0 )
{
v7 = alloc_root(v4[1], a3);
memcpy(v7, a2, v6);
v3 = v7;
}
v10[0] = v3;
v10[2] = v6;
v8 = 0;
if ( !tree_insert(v5, v10, 0LL, *(_QWORD *)(v5 + 560)) )
{
delete_tree(v5, 0LL);
return 1;
}
return v8;
}
| ft_add_word:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RAX,qword ptr [RDI + 0x18]
MOV RBX,qword ptr [RAX]
TEST byte ptr [RDI + 0x34],0x1
JNZ 0x001750dc
MOVSXD R15,EDX
JMP 0x001750ff
LAB_001750dc:
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD R15,EDX
MOV RSI,R15
CALL 0x0019df2b
MOV R12,RAX
MOV RDI,RAX
MOV RSI,R14
MOV RDX,R15
CALL 0x00129080
MOV R14,R12
LAB_001750ff:
LEA RSI,[RBP + -0x38]
MOV qword ptr [RSI],R14
MOV qword ptr [RSI + 0x10],R15
MOV RCX,qword ptr [RBX + 0x230]
XOR R14D,R14D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001a5c86
TEST RAX,RAX
JNZ 0x00175133
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001a5b9e
MOV R14D,0x1
LAB_00175133:
MOV EAX,R14D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
bool ft_add_word(long param_1,void *param_2,int param_3)
{
long lVar1;
void *__dest;
long lVar2;
void *local_40 [2];
long local_30;
lVar1 = **(long **)(param_1 + 0x18);
if ((*(byte *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,param_2,(long)param_3);
param_2 = __dest;
}
local_30 = (long)param_3;
local_40[0] = param_2;
lVar2 = tree_insert(lVar1,local_40,0,*(int8 *)(lVar1 + 0x230));
if (lVar2 == 0) {
delete_tree(lVar1,0);
}
return lVar2 == 0;
}
|
|
1,138 | u7toa_shift | bluesky950520[P]quickjs/cutils.c | static size_t u7toa_shift(char dest[minimum_length(8)], uint32_t n)
{
size_t len = 1;
uint64_t buf = 0;
while (n >= 10) {
uint32_t quo = n % 10;
n /= 10;
gen_digit(buf, '0' + quo);
len++;
}
gen_digit(buf, '0' + n);
memcpy(dest, &buf, sizeof buf);
return len;
} | O2 | c | u7toa_shift:
movl %esi, %eax
pushq $0x1
popq %rcx
xorl %esi, %esi
pushq $0xa
popq %r8
cmpl $0xa, %eax
jb 0x16501
xorl %edx, %edx
divl %r8d
shlq $0x8, %rsi
addq %rdx, %rsi
addq $0x30, %rsi
incq %rcx
jmp 0x164e7
shlq $0x8, %rsi
movl %eax, %eax
addq %rsi, %rax
addq $0x30, %rax
movq %rax, (%rdi)
movq %rcx, %rax
retq
| u7toa_shift:
mov eax, esi
push 1
pop rcx
xor esi, esi
push 0Ah
pop r8
loc_164E7:
cmp eax, 0Ah
jb short loc_16501
xor edx, edx
div r8d
shl rsi, 8
add rsi, rdx
add rsi, 30h ; '0'
inc rcx
jmp short loc_164E7
loc_16501:
shl rsi, 8
mov eax, eax
add rax, rsi
add rax, 30h ; '0'
mov [rdi], rax
mov rax, rcx
retn
| long long u7toa_shift(_QWORD *a1, unsigned int a2)
{
long long v3; // rcx
long long v4; // rsi
long long v5; // rdx
v3 = 1LL;
v4 = 0LL;
while ( a2 >= 0xA )
{
v5 = a2 % 0xA;
a2 /= 0xAu;
v4 = v5 + (v4 << 8) + 48;
++v3;
}
*a1 = (v4 << 8) + a2 + 48;
return v3;
}
| u7toa_shift:
MOV EAX,ESI
PUSH 0x1
POP RCX
XOR ESI,ESI
PUSH 0xa
POP R8
LAB_001164e7:
CMP EAX,0xa
JC 0x00116501
XOR EDX,EDX
DIV R8D
SHL RSI,0x8
ADD RSI,RDX
ADD RSI,0x30
INC RCX
JMP 0x001164e7
LAB_00116501:
SHL RSI,0x8
MOV EAX,EAX
ADD RAX,RSI
ADD RAX,0x30
MOV qword ptr [RDI],RAX
MOV RAX,RCX
RET
|
long u7toa_shift(long *param_1,uint param_2)
{
long lVar1;
long lVar2;
lVar1 = 1;
lVar2 = 0;
for (; 9 < param_2; param_2 = param_2 / 10) {
lVar2 = lVar2 * 0x100 + (ulong)param_2 % 10 + 0x30;
lVar1 = lVar1 + 1;
}
*param_1 = (ulong)param_2 + lVar2 * 0x100 + 0x30;
return lVar1;
}
|
|
1,139 | my_casefold_ujis | eloqsql/strings/ctype-ujis.c | static size_t
my_casefold_ujis(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar * const map,
size_t is_upper)
{
const char *srcend= src + srclen, *dst0= dst;
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
ch= (mblen == 2) ?
get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) :
get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]);
if (ch)
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= mblen;
if (code > 0xFFFF)
*dst++= (char) (uchar) ((code >> 16) & 0xFF);
if (code > 0xFF)
*dst++= (char) (uchar) ((code >> 8) & 0xFF);
*dst++= (char) (uchar) (code & 0xFF);
}
else
{
if (mblen == 3)
*dst++= *src++;
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
} | O3 | c | my_casefold_ujis:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, %rbx
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x6fb37
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
addq %rsi, %r15
xorl %eax, %eax
testq %r9, %r9
sete %al
shll $0x2, %eax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rbx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r14d, %eax
testl %eax, %eax
je 0x6fa91
cmpl $0x2, %eax
jne 0x6faa7
movzbl (%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x6fb01
movzbl 0x1(%r12), %edx
jmp 0x6fac8
movzbl (%r12), %eax
incq %r12
movq -0x40(%rbp), %rcx
movb (%rcx,%rax), %al
movb %al, (%rbx)
jmp 0x6fb2b
movzbl 0x1(%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq 0x800(%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x6faf0
movzbl 0x2(%r12), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
testq %rcx, %rcx
je 0x6faf0
movq -0x38(%rbp), %rdx
movl (%rcx,%rdx), %ecx
cmpl $0x10000, %ecx # imm = 0x10000
jl 0x6fb19
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, (%rbx)
incq %rbx
jmp 0x6fb21
cmpl $0x3, %eax
jne 0x6fb01
movb (%r12), %al
incq %r12
movb %al, (%rbx)
incq %rbx
movb (%r12), %al
movb %al, (%rbx)
movb 0x1(%r12), %al
addq $0x2, %r12
movb %al, 0x1(%rbx)
addq $0x2, %rbx
jmp 0x6fb2e
cmpl $0x100, %ecx # imm = 0x100
jl 0x6fb26
movb %ch, (%rbx)
incq %rbx
addq %rax, %r12
movb %cl, (%rbx)
incq %rbx
cmpq %r15, %r12
jb 0x6fa4d
subq -0x30(%rbp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casefold_ujis:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r8
mov rbx, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle loc_6FB37
mov r15, rdx
mov r12, rsi
mov r13, rdi
add r15, rsi
xor eax, eax
test r9, r9
setz al
shl eax, 2
mov [rbp+var_38], rax
xor r14d, r14d
mov rbx, [rbp+var_30]
loc_6FA4D:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r14d
test eax, eax
jz short loc_6FA91
cmp eax, 2
jnz short loc_6FAA7
movzx ecx, byte ptr [r12]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8]
test rcx, rcx
jz short loc_6FB01
movzx edx, byte ptr [r12+1]
jmp short loc_6FAC8
loc_6FA91:
movzx eax, byte ptr [r12]
inc r12
mov rcx, [rbp+var_40]
mov al, [rcx+rax]
mov [rbx], al
jmp loc_6FB2B
loc_6FAA7:
movzx ecx, byte ptr [r12+1]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8+800h]
test rcx, rcx
jz short loc_6FAF0
movzx edx, byte ptr [r12+2]
loc_6FAC8:
lea rdx, [rdx+rdx*2]
lea rcx, [rcx+rdx*4]
test rcx, rcx
jz short loc_6FAF0
mov rdx, [rbp+var_38]
mov ecx, [rcx+rdx]
cmp ecx, offset stru_10000
jl short loc_6FB19
mov edx, ecx
shr edx, 10h
mov [rbx], dl
inc rbx
jmp short loc_6FB21
loc_6FAF0:
cmp eax, 3
jnz short loc_6FB01
mov al, [r12]
inc r12
mov [rbx], al
inc rbx
loc_6FB01:
mov al, [r12]
mov [rbx], al
mov al, [r12+1]
add r12, 2
mov [rbx+1], al
add rbx, 2
jmp short loc_6FB2E
loc_6FB19:
cmp ecx, 100h
jl short loc_6FB26
loc_6FB21:
mov [rbx], ch
inc rbx
loc_6FB26:
add r12, rax
mov [rbx], cl
loc_6FB2B:
inc rbx
loc_6FB2E:
cmp r12, r15
jb loc_6FA4D
loc_6FB37:
sub rbx, [rbp+var_30]
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_casefold_ujis(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6)
{
unsigned __int8 *v6; // rbx
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rax
long long v13; // rcx
int v14; // ecx
unsigned __int8 v15; // al
unsigned __int8 v16; // al
long long v19; // [rsp+8h] [rbp-38h]
v6 = a4;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v19 = 4 * (unsigned int)(a6 == 0);
v6 = a4;
while ( 1 )
{
v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v7,
v8);
if ( (int)v9 < 2 )
v9 = 0LL;
if ( !(_DWORD)v9 )
{
v12 = *v7++;
*v6 = *(_BYTE *)(a5 + v12);
goto LABEL_21;
}
if ( (_DWORD)v9 != 2 )
break;
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7);
if ( v10 )
{
v11 = v7[1];
LABEL_12:
v13 = v10 + 12 * v11;
if ( v13 )
{
v14 = *(_DWORD *)(v13 + v19);
if ( v14 >= (int)&stru_10000 )
{
*v6++ = BYTE2(v14);
goto LABEL_19;
}
if ( v14 >= 256 )
LABEL_19:
*v6++ = BYTE1(v14);
v7 += v9;
*v6 = v14;
LABEL_21:
++v6;
goto LABEL_22;
}
goto LABEL_15;
}
LABEL_17:
*v6 = *v7;
v16 = v7[1];
v7 += 2;
v6[1] = v16;
v6 += 2;
LABEL_22:
if ( (unsigned long long)v7 >= v8 )
return (_BYTE *)(v6 - a4);
}
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048);
if ( v10 )
{
v11 = v7[2];
goto LABEL_12;
}
LABEL_15:
if ( (_DWORD)v9 == 3 )
{
v15 = *v7++;
*v6++ = v15;
}
goto LABEL_17;
}
return (_BYTE *)(v6 - a4);
}
| my_casefold_ujis:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R8
MOV RBX,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x0016fb37
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
ADD R15,RSI
XOR EAX,EAX
TEST R9,R9
SETZ AL
SHL EAX,0x2
MOV qword ptr [RBP + -0x38],RAX
XOR R14D,R14D
MOV RBX,qword ptr [RBP + -0x30]
LAB_0016fa4d:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R14D
TEST EAX,EAX
JZ 0x0016fa91
CMP EAX,0x2
JNZ 0x0016faa7
MOVZX ECX,byte ptr [R12]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8]
TEST RCX,RCX
JZ 0x0016fb01
MOVZX EDX,byte ptr [R12 + 0x1]
JMP 0x0016fac8
LAB_0016fa91:
MOVZX EAX,byte ptr [R12]
INC R12
MOV RCX,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [RBX],AL
JMP 0x0016fb2b
LAB_0016faa7:
MOVZX ECX,byte ptr [R12 + 0x1]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800]
TEST RCX,RCX
JZ 0x0016faf0
MOVZX EDX,byte ptr [R12 + 0x2]
LAB_0016fac8:
LEA RDX,[RDX + RDX*0x2]
LEA RCX,[RCX + RDX*0x4]
TEST RCX,RCX
JZ 0x0016faf0
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + RDX*0x1]
CMP ECX,0x10000
JL 0x0016fb19
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBX],DL
INC RBX
JMP 0x0016fb21
LAB_0016faf0:
CMP EAX,0x3
JNZ 0x0016fb01
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX],AL
INC RBX
LAB_0016fb01:
MOV AL,byte ptr [R12]
MOV byte ptr [RBX],AL
MOV AL,byte ptr [R12 + 0x1]
ADD R12,0x2
MOV byte ptr [RBX + 0x1],AL
ADD RBX,0x2
JMP 0x0016fb2e
LAB_0016fb19:
CMP ECX,0x100
JL 0x0016fb26
LAB_0016fb21:
MOV byte ptr [RBX],CH
INC RBX
LAB_0016fb26:
ADD R12,RAX
MOV byte ptr [RBX],CL
LAB_0016fb2b:
INC RBX
LAB_0016fb2e:
CMP R12,R15
JC 0x0016fa4d
LAB_0016fb37:
SUB RBX,qword ptr [RBP + -0x30]
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
long param_6)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
int iVar4;
long lVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar5;
pbVar7 = param_4;
if (0 < param_3) {
pbVar8 = param_2 + param_3;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8);
uVar5 = (ulong)uVar3;
if ((int)uVar3 < 2) {
uVar5 = 0;
}
iVar4 = (int)uVar5;
if (iVar4 == 0) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = *(byte *)(param_5 + (ulong)bVar2);
LAB_0016fb2b:
pbVar7 = pbVar7 + 1;
}
else {
if (iVar4 == 2) {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8);
if (lVar6 != 0) {
bVar2 = param_2[1];
LAB_0016fac8:
lVar6 = lVar6 + (ulong)bVar2 * 0xc;
if (lVar6 == 0) goto LAB_0016faf0;
iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4);
if (iVar4 < 0x10000) {
if (0xff < iVar4) goto LAB_0016fb21;
}
else {
*pbVar7 = (byte)((uint)iVar4 >> 0x10);
pbVar7 = pbVar7 + 1;
LAB_0016fb21:
*pbVar7 = (byte)((uint)iVar4 >> 8);
pbVar7 = pbVar7 + 1;
}
param_2 = param_2 + uVar5;
*pbVar7 = (byte)iVar4;
goto LAB_0016fb2b;
}
}
else {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8
);
if (lVar6 != 0) {
bVar2 = param_2[2];
goto LAB_0016fac8;
}
LAB_0016faf0:
if (iVar4 == 3) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = bVar2;
pbVar7 = pbVar7 + 1;
}
}
*pbVar7 = *param_2;
pbVar1 = param_2 + 1;
param_2 = param_2 + 2;
pbVar7[1] = *pbVar1;
pbVar7 = pbVar7 + 2;
}
} while (param_2 < pbVar8);
}
return (long)pbVar7 - (long)param_4;
}
|
|
1,140 | resolve_charset | eloqsql/mysys/charset.c | my_bool resolve_charset(const char *cs_name,
CHARSET_INFO *default_cs,
CHARSET_INFO **cs,
myf flags)
{
*cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags);
if (*cs == NULL)
{
*cs= default_cs;
return TRUE;
}
return FALSE;
} | O3 | c | resolve_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0xc8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x12f0(%rip), %rax # 0x276ae
movq %rax, 0x80(%rdi)
leaq -0x12ef(%rip), %rax # 0x276bd
movq %rax, 0x88(%rdi)
leaq -0x12e2(%rip), %rax # 0x276d8
movq %rax, 0x90(%rdi)
leaq 0x2aae(%rip), %rax # 0x2b476
movq %rax, 0x98(%rdi)
leaq 0x2c6e6a(%rip), %rax # 0x2ef840
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x12f1(%rip), %rax # 0x276f6
movq %rax, 0xa8(%rdi)
movl $0x20, %edx
callq 0x287f0
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x28a23
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x24380
| resolve_charset:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, [rbp+var_C8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov edx, 20h ; ' '
call my_charset_get_by_name
mov rcx, rax
test rax, rax
setz al
cmovnz r14, rcx
mov [rbx], r14
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_28A23
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_28A23:
call ___stack_chk_fail
| bool resolve_charset(long long a1, long long a2, long long *a3, long long a4)
{
long long v6; // rcx
bool result; // al
char v8[128]; // [rsp+8h] [rbp-C8h] BYREF
long long ( *v9)(long long); // [rsp+88h] [rbp-48h]
long long ( *v10)(long long); // [rsp+90h] [rbp-40h]
long long ( *v11)(long long, long long); // [rsp+98h] [rbp-38h]
long long ( *v12)(); // [rsp+A0h] [rbp-30h]
long long ( *v13)(); // [rsp+A8h] [rbp-28h]
long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h]
unsigned long long v15; // [rsp+B8h] [rbp-18h]
v15 = __readfsqword(0x28u);
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4);
result = v6 == 0;
if ( v6 )
a2 = v6;
*a3 = a2;
return result;
}
| resolve_charset:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0xc8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x1276ae]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x1276bd]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x1276d8]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12b476]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3ef840]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x1276f6]
MOV qword ptr [RDI + 0xa8],RAX
MOV EDX,0x20
CALL 0x001287f0
MOV RCX,RAX
TEST RAX,RAX
SETZ AL
CMOVNZ R14,RCX
MOV qword ptr [RBX],R14
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00128a23
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_00128a23:
CALL 0x00124380
|
bool resolve_charset(int8 param_1,long param_2,long *param_3)
{
long lVar1;
long in_FS_OFFSET;
int1 local_d0 [128];
code *local_50;
code *local_48;
code *local_40;
code *local_38;
int *local_30;
code *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_d0[0] = 0;
local_50 = my_once_alloc_c;
local_48 = my_malloc_c;
local_40 = my_realloc_c;
local_38 = my_free;
local_30 = my_charset_error_reporter;
local_28 = add_collation;
lVar1 = my_charset_get_by_name(local_d0,param_1,0x20);
if (lVar1 != 0) {
param_2 = lVar1;
}
*param_3 = param_2;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar1 == 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,141 | my_message_stderr | eloqsql/mysys/my_mess.c | void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
} | O0 | c | my_message_stderr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xe16d5
movq 0x1cd8fc(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq -0x18(%rbp), %rax
andq $0x480, %rax # imm = 0x480
cmpq $0x0, %rax
je 0xe16fb
jmp 0xe16f6
jmp 0xe1791
movq -0x18(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0xe171d
movq 0x1cd8d0(%rip), %rax # 0x2aefe0
movq (%rax), %rsi
movl $0x7, %edi
callq 0x3a8b0
leaq 0x395fdc(%rip), %rax # 0x477700
cmpq $0x0, (%rax)
je 0xe1759
leaq 0x395fcf(%rip), %rax # 0x477700
movq (%rax), %rdi
movq 0x1cd8a5(%rip), %rax # 0x2aefe0
movq (%rax), %rsi
callq 0x3a320
movq 0x1cd896(%rip), %rax # 0x2aefe0
movq (%rax), %rsi
leaq 0x5344a(%rip), %rdi # 0x134b9e
callq 0x3a320
movq -0x10(%rbp), %rdi
movq 0x1cd87c(%rip), %rax # 0x2aefe0
movq (%rax), %rsi
callq 0x3a320
movq 0x1cd86d(%rip), %rax # 0x2aefe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x3a8b0
movq 0x1cd859(%rip), %rax # 0x2aefe0
movq (%rax), %rdi
callq 0x3a4a0
jmp 0xe1791
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_message_stderr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_E16D5:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, [rbp+var_18]
and rax, 480h
cmp rax, 0
jz short loc_E16FB
jmp short $+2
loc_E16F6:
jmp loc_E1791
loc_E16FB:
mov rax, [rbp+var_18]
and rax, 4
cmp rax, 0
jz short loc_E171D
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_E171D:
lea rax, my_progname
cmp qword ptr [rax], 0
jz short loc_E1759
lea rax, my_progname
mov rdi, [rax]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
lea rdi, aQueryD+0Ah; ": "
call _fputs
loc_E1759:
mov rdi, [rbp+var_10]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_E1791:
add rsp, 20h
pop rbp
retn
| long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
fflush(stdout);
result = a3 & 0x480;
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL, stderr);
if ( my_progname )
{
fputs(my_progname, stderr);
fputs(": ", stderr);
}
fputs(a2, stderr);
fputc(10LL, stderr);
return fflush(stderr);
}
return result;
}
| my_message_stderr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001e16d5
LAB_001e16d5:
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x480
CMP RAX,0x0
JZ 0x001e16fb
JMP 0x001e16f6
LAB_001e16f6:
JMP 0x001e1791
LAB_001e16fb:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x4
CMP RAX,0x0
JZ 0x001e171d
MOV RAX,qword ptr [0x003aefe0]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x0013a8b0
LAB_001e171d:
LEA RAX,[0x577700]
CMP qword ptr [RAX],0x0
JZ 0x001e1759
LEA RAX,[0x577700]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [0x003aefe0]
MOV RSI,qword ptr [RAX]
CALL 0x0013a320
MOV RAX,qword ptr [0x003aefe0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x234b9e]
CALL 0x0013a320
LAB_001e1759:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x003aefe0]
MOV RSI,qword ptr [RAX]
CALL 0x0013a320
MOV RAX,qword ptr [0x003aefe0]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x0013a8b0
MOV RAX,qword ptr [0x003aefe0]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
JMP 0x001e1791
LAB_001e1791:
ADD RSP,0x20
POP RBP
RET
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
fflush(*(FILE **)PTR_stdout_003aefd8);
if ((param_3 & 0x480) == 0) {
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_003aefe0);
}
if (my_progname != (char *)0x0) {
fputs(my_progname,*(FILE **)PTR_stderr_003aefe0);
fputs(": ",*(FILE **)PTR_stderr_003aefe0);
}
fputs(param_2,*(FILE **)PTR_stderr_003aefe0);
fputc(10,*(FILE **)PTR_stderr_003aefe0);
fflush(*(FILE **)PTR_stderr_003aefe0);
}
return;
}
|
|
1,142 | AST::ASTTree::insert(AST::Node*, AST::ASTTree::DSFIterator) | 11AgReS1SoR11[P]Graph/Common/AST/src/AST.cpp | ASTTree::DSFIterator ASTTree::insert(Node* newNode, DSFIterator it)
{
if (newNode == nullptr) { throw std::runtime_error("Insert nullptr, bug!?"); }
if (!root)
{
if (it != begin()) { throw std::runtime_error("Insert in empty tree, but not to begin, bug!?"); }
root = newNode;
return begin();
}
it->addChild(newNode);
return DSFIterator{newNode};
} | O0 | cpp | AST::ASTTree::insert(AST::Node*, AST::ASTTree::DSFIterator):
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rcx, -0xa0(%rbp)
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7021
movl $0x10, %edi
callq 0x6220
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
leaq 0x301d(%rip), %rsi # 0xa000
callq 0x61c0
jmp 0x6fea
movq -0xa8(%rbp), %rdi
movq 0x6000(%rip), %rsi # 0xcff8
movq 0x5fd9(%rip), %rdx # 0xcfd8
callq 0x69b0
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x63a0
jmp 0x711a
movq -0x88(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x70e2
movq -0x88(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x6a80
movq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x6630
movb %al, -0xa9(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x68d0
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x706d
jmp 0x70c6
movl $0x10, %edi
callq 0x6220
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x2f8b(%rip), %rsi # 0xa016
callq 0x61c0
jmp 0x7092
movq -0xb8(%rbp), %rdi
movq 0x5f58(%rip), %rsi # 0xcff8
movq 0x5f31(%rip), %rdx # 0xcfd8
callq 0x69b0
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x63a0
jmp 0x711a
movq -0x88(%rbp), %rsi
movq -0x98(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, (%rsi)
callq 0x6a80
jmp 0x710a
movq -0xa0(%rbp), %rdi
callq 0x66d0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x6060
movq -0x98(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x60d0
movq -0x90(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x6a10
nopw %cs:(%rax,%rax)
| _ZN3AST7ASTTree6insertEPNS_4NodeENS0_11DSFIteratorE:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_A0], rcx
mov [rbp+var_98], rdi
mov rax, rdi
mov [rbp+var_90], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov [rbp+var_88], rax
cmp [rbp+var_18], 0
jnz short loc_7021
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_A8], rax
lea rsi, aInsertNullptrB; "Insert nullptr, bug!?"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_6FEA:
mov rdi, [rbp+var_A8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_A8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
call ___cxa_free_exception
jmp loc_711A
loc_7021:
mov rax, [rbp+var_88]
cmp qword ptr [rax], 0
jnz loc_70E2
mov rsi, [rbp+var_88]
lea rdi, [rbp+var_80]; this
call __ZN3AST7ASTTree5beginEv; AST::ASTTree::begin(void)
mov rdi, [rbp+var_A0]
lea rsi, [rbp+var_80]
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov [rbp+var_A9], al
lea rdi, [rbp+var_80]; this
call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator()
mov al, [rbp+var_A9]
test al, 1
jnz short loc_706D
jmp short loc_70C6
loc_706D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_B8], rax
lea rsi, aInsertInEmptyT; "Insert in empty tree, but not to begin,"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_7092:
mov rdi, [rbp+var_B8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_B8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
call ___cxa_free_exception
jmp short loc_711A
loc_70C6:
mov rsi, [rbp+var_88]
mov rdi, [rbp+var_98]; this
mov rax, [rbp+var_18]
mov [rsi], rax
call __ZN3AST7ASTTree5beginEv; AST::ASTTree::begin(void)
jmp short loc_710A
loc_70E2:
mov rdi, [rbp+var_A0]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax; this
mov rsi, [rbp+var_18]; AST::Node *
call __ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rdi, [rbp+var_98]; this
mov rsi, [rbp+var_18]; AST::Node *
call __ZN3AST7ASTTree11DSFIteratorC2EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *)
loc_710A:
mov rax, [rbp+var_90]
add rsp, 0C0h
pop rbp
retn
loc_711A:
mov rdi, [rbp+var_28]
call __Unwind_Resume
| AST::ASTTree::DSFIterator * AST::ASTTree::insert(
AST::ASTTree::DSFIterator *a1,
AST::Node **a2,
AST::Node *a3,
long long a4)
{
AST::Node *v4; // rax
std::runtime_error *v6; // [rsp+8h] [rbp-B8h]
char v7; // [rsp+17h] [rbp-A9h]
std::runtime_error *exception; // [rsp+18h] [rbp-A8h]
_BYTE v10[84]; // [rsp+40h] [rbp-80h] BYREF
long long v11; // [rsp+A0h] [rbp-20h]
AST::Node *v12; // [rsp+A8h] [rbp-18h]
AST::Node **v13; // [rsp+B0h] [rbp-10h]
AST::ASTTree::DSFIterator *v14; // [rsp+B8h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
if ( !a3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Insert nullptr, bug!?");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *a2 )
{
v4 = (AST::Node *)AST::ASTTree::DSFIterator::operator->(a4);
AST::Node::addChild(v4, v12);
AST::ASTTree::DSFIterator::DSFIterator(a1, v12);
}
else
{
AST::ASTTree::begin((AST::ASTTree *)v10);
v7 = AST::ASTTree::DSFIterator::operator!=(a4, v10);
AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v10);
if ( (v7 & 1) != 0 )
{
v6 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v6, "Insert in empty tree, but not to begin, bug!?");
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*a2 = v12;
AST::ASTTree::begin(a1);
}
return a1;
}
| insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0xa0],RCX
MOV qword ptr [RBP + -0x98],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x88],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00107021
MOV EDI,0x10
CALL 0x00106220
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0xa8],RAX
LAB_00106fdc:
LEA RSI,[0x10a000]
CALL 0x001061c0
LAB_00106fe8:
JMP 0x00106fea
LAB_00106fea:
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [0x0010cff8]
MOV RDX,qword ptr [0x0010cfd8]
CALL 0x001069b0
LAB_00107021:
MOV RAX,qword ptr [RBP + -0x88]
CMP qword ptr [RAX],0x0
JNZ 0x001070e2
MOV RSI,qword ptr [RBP + -0x88]
LEA RDI,[RBP + -0x80]
CALL 0x00106a80
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[RBP + -0x80]
CALL 0x00106630
MOV byte ptr [RBP + -0xa9],AL
LEA RDI,[RBP + -0x80]
CALL 0x001068d0
MOV AL,byte ptr [RBP + -0xa9]
TEST AL,0x1
JNZ 0x0010706d
JMP 0x001070c6
LAB_0010706d:
MOV EDI,0x10
CALL 0x00106220
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0xb8],RAX
LAB_00107084:
LEA RSI,[0x10a016]
CALL 0x001061c0
LAB_00107090:
JMP 0x00107092
LAB_00107092:
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [0x0010cff8]
MOV RDX,qword ptr [0x0010cfd8]
CALL 0x001069b0
LAB_001070c6:
MOV RSI,qword ptr [RBP + -0x88]
MOV RDI,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RSI],RAX
CALL 0x00106a80
JMP 0x0010710a
LAB_001070e2:
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x001066d0
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00106060
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001060d0
LAB_0010710a:
MOV RAX,qword ptr [RBP + -0x90]
ADD RSP,0xc0
POP RBP
RET
|
/* AST::ASTTree::insert(AST::Node*, AST::ASTTree::DSFIterator) */
DSFIterator *
AST::ASTTree::insert(DSFIterator *param_1,long *param_2,Node *param_3,DSFIterator *param_4)
{
byte bVar1;
runtime_error *prVar2;
Node *this;
DSFIterator local_88 [96];
DSFIterator *local_28;
Node *local_20;
long *local_18;
DSFIterator *local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_3 == (Node *)0x0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00106fdc to 00106fe7 has its CatchHandler @ 00107004 */
std::runtime_error::runtime_error(prVar2,"Insert nullptr, bug!?");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_0010cff8,PTR__runtime_error_0010cfd8);
}
if (*param_2 == 0) {
begin();
bVar1 = DSFIterator::operator!=(param_4,local_88);
DSFIterator::~DSFIterator(local_88);
if ((bVar1 & 1) != 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00107084 to 0010708f has its CatchHandler @ 001070ac */
std::runtime_error::runtime_error(prVar2,"Insert in empty tree, but not to begin, bug!?");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_0010cff8,PTR__runtime_error_0010cfd8);
}
*param_2 = (long)local_20;
begin();
}
else {
this = (Node *)DSFIterator::operator->(param_4);
Node::addChild(this,local_20);
DSFIterator::DSFIterator(param_1,local_20);
}
return param_1;
}
|
|
1,143 | common_log::set_file(char const*) | llama.cpp/common/log.cpp | void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
} | O3 | cpp | common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2be24
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x2c235
callq 0x15400
testq %r14, %r14
je 0x2c24b
leaq 0x20c9(%rip), %rsi # 0x2e30a
movq %r14, %rdi
callq 0x15bb0
jmp 0x2c24d
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2beac
| _ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_2C235
call _fclose
loc_2C235:
test r14, r14
jz short loc_2C24B
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_2C24D
loc_2C24B:
xor eax, eax
loc_2C24D:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
| set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0012be24
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x0012c235
CALL 0x00115400
LAB_0012c235:
TEST R14,R14
JZ 0x0012c24b
LEA RSI,[0x12e30a]
MOV RDI,R14
CALL 0x00115bb0
JMP 0x0012c24d
LAB_0012c24b:
XOR EAX,EAX
LAB_0012c24d:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012beac
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
|
|
1,144 | ma_apply_undo_bulk_insert | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_apply_undo_bulk_insert(MARIA_HA *info, LSN undo_lsn)
{
my_bool error;
LSN lsn;
DBUG_ENTER("_ma_apply_undo_bulk_insert");
/*
We delete all rows, re-enable indices as bulk insert had disabled
non-unique ones.
*/
error= (maria_delete_all_rows(info) ||
maria_enable_indexes(info) ||
/* we enabled indices so need '2' below */
_ma_state_info_write(info->s,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_FULL_INFO |
MA_STATE_INFO_WRITE_LOCK) ||
_ma_write_clr(info, undo_lsn, LOGREC_UNDO_BULK_INSERT,
FALSE, 0, &lsn, NULL));
DBUG_RETURN(error);
} | O3 | c | ma_apply_undo_bulk_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x69fc8
movb $0x1, %r15b
testl %eax, %eax
jne 0x62e30
movq %r14, %rdi
callq 0x55d7f
testl %eax, %eax
jne 0x62e30
movq (%r14), %rdi
movl $0x7, %esi
callq 0x54f0e
testl %eax, %eax
jne 0x62e30
movq $0x0, (%rsp)
leaq -0x20(%rbp), %r9
movq %r14, %rdi
movq %rbx, %rsi
movl $0x27, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x59875
testb %al, %al
setne %r15b
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_undo_bulk_insert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
call maria_delete_all_rows
mov r15b, 1
test eax, eax
jnz short loc_62E30
mov rdi, r14
call maria_enable_indexes
test eax, eax
jnz short loc_62E30
mov rdi, [r14]
mov esi, 7
call _ma_state_info_write
test eax, eax
jnz short loc_62E30
mov [rsp+30h+var_30], 0
lea r9, [rbp+var_20]
mov rdi, r14
mov rsi, rbx
mov edx, 27h ; '''
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
test al, al
setnz r15b
loc_62E30:
mov eax, r15d
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_apply_undo_bulk_insert(long long *a1, long long a2)
{
unsigned int v2; // r15d
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
_BYTE v8[32]; // [rsp+10h] [rbp-20h] BYREF
LOBYTE(v2) = 1;
if ( !(unsigned int)maria_delete_all_rows()
&& !(unsigned int)maria_enable_indexes(a1, a2, v3, v4, v5, v6)
&& !(unsigned int)ma_state_info_write(*a1, 7u) )
{
LOBYTE(v2) = (unsigned __int8)ma_write_clr(a1, a2, 39, 0, 0, (unsigned long long)v8, 0LL) != 0;
}
return v2;
}
| _ma_apply_undo_bulk_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
CALL 0x00169fc8
MOV R15B,0x1
TEST EAX,EAX
JNZ 0x00162e30
MOV RDI,R14
CALL 0x00155d7f
TEST EAX,EAX
JNZ 0x00162e30
MOV RDI,qword ptr [R14]
MOV ESI,0x7
CALL 0x00154f0e
TEST EAX,EAX
JNZ 0x00162e30
MOV qword ptr [RSP],0x0
LEA R9,[RBP + -0x20]
MOV RDI,R14
MOV RSI,RBX
MOV EDX,0x27
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00159875
TEST AL,AL
SETNZ R15B
LAB_00162e30:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong _ma_apply_undo_bulk_insert(int8 *param_1,int8 param_2)
{
char cVar1;
int iVar2;
int8 unaff_R15;
ulong uVar3;
int1 local_28 [8];
int7 uVar4;
iVar2 = maria_delete_all_rows();
uVar4 = (int7)((ulong)unaff_R15 >> 8);
uVar3 = CONCAT71(uVar4,1);
if (iVar2 == 0) {
iVar2 = maria_enable_indexes(param_1);
if (iVar2 == 0) {
iVar2 = _ma_state_info_write(*param_1,7);
if (iVar2 == 0) {
cVar1 = _ma_write_clr(param_1,param_2,0x27,0,0,local_28,0);
uVar3 = CONCAT71(uVar4,cVar1 != '\0');
}
}
}
return uVar3 & 0xffffffff;
}
|
|
1,145 | gguf_set_val_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_str(struct gguf_context * ctx, const char * key, const char * val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, std::string(val));
} | O0 | cpp | gguf_set_val_str:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x49010
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x48c30
jmp 0x8d8a5
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x8d9b0
jmp 0x8d8b4
leaq -0x38(%rbp), %rdi
callq 0x464e0
leaq -0x39(%rbp), %rdi
callq 0x46360
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x473b0
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x49010
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x48c30
jmp 0x8d916
movq -0xa0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x48a40
jmp 0x8d92c
leaq -0x70(%rbp), %rdi
callq 0x464e0
leaq -0x71(%rbp), %rdi
callq 0x46360
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8d96a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x464e0
leaq -0x39(%rbp), %rdi
callq 0x46360
jmp 0x8d9a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8d998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x464e0
leaq -0x71(%rbp), %rdi
callq 0x46360
movq -0x48(%rbp), %rdi
callq 0x48fc0
nopw (%rax,%rax)
| gguf_set_val_str:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_88], rax
lea rdi, [rbp+var_39]
mov [rbp+var_80], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_88]
mov rdx, [rbp+var_80]
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8D8A5:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_38]
call _ZL24gguf_check_reserved_keysIPKcEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; gguf_check_reserved_keys<char const*>(std::string const&,char const*)
jmp short $+2
loc_8D8B4:
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _gguf_remove_key
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov [rbp+var_98], rax
lea rdi, [rbp+var_71]
mov [rbp+var_90], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_98]
mov rdx, [rbp+var_90]
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8D916:
mov rdi, [rbp+var_A0]
lea rsi, [rbp+var_10]
lea rdx, [rbp+var_70]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::string>(char const*&,std::string &&)
jmp short $+2
loc_8D92C:
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
add rsp, 0A0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8D96A
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8D96A:
lea rdi, [rbp+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_8D9A1
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8D998
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8D998:
lea rdi, [rbp+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_8D9A1:
mov rdi, [rbp+var_48]
call __Unwind_Resume
| long long gguf_set_val_str(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-A0h]
long long v5; // [rsp+8h] [rbp-98h]
char v6; // [rsp+2Fh] [rbp-71h] BYREF
_BYTE v7[36]; // [rsp+30h] [rbp-70h] BYREF
char v8; // [rsp+67h] [rbp-39h] BYREF
_BYTE v9[32]; // [rsp+68h] [rbp-38h] BYREF
long long v10; // [rsp+88h] [rbp-18h]
long long v11; // [rsp+90h] [rbp-10h] BYREF
long long v12; // [rsp+98h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v9, a2, &v8);
gguf_check_reserved_keys<char const*>(v9, v10);
std::string::~string(v9);
std::allocator<char>::~allocator(&v8);
gguf_remove_key(v12, v11);
v4 = v12 + 8;
v5 = v10;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v7, v5, &v6);
std::vector<gguf_kv>::emplace_back<char const*&,std::string>(v4, &v11, v7);
std::string::~string(v7);
return std::allocator<char>::~allocator(&v6);
}
| gguf_set_val_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x88],RAX
LEA RDI,[RBP + -0x39]
MOV qword ptr [RBP + -0x80],RDI
CALL 0x00149010
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RBP + -0x80]
LAB_0018d89a:
LEA RDI,[RBP + -0x38]
CALL 0x00148c30
JMP 0x0018d8a5
LAB_0018d8a5:
MOV RSI,qword ptr [RBP + -0x18]
LAB_0018d8a9:
LEA RDI,[RBP + -0x38]
CALL 0x0018d9b0
LAB_0018d8b2:
JMP 0x0018d8b4
LAB_0018d8b4:
LEA RDI,[RBP + -0x38]
CALL 0x001464e0
LEA RDI,[RBP + -0x39]
CALL 0x00146360
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001473b0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x98],RAX
LEA RDI,[RBP + -0x71]
MOV qword ptr [RBP + -0x90],RDI
CALL 0x00149010
MOV RSI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0x90]
LAB_0018d90b:
LEA RDI,[RBP + -0x70]
CALL 0x00148c30
JMP 0x0018d916
LAB_0018d916:
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[RBP + -0x10]
LEA RDX,[RBP + -0x70]
CALL 0x00148a40
LAB_0018d92a:
JMP 0x0018d92c
LAB_0018d92c:
LEA RDI,[RBP + -0x70]
CALL 0x001464e0
LEA RDI,[RBP + -0x71]
CALL 0x00146360
ADD RSP,0xa0
POP RBP
RET
|
void gguf_set_val_str(long param_1,char *param_2,char *param_3)
{
char *pcVar1;
vector<gguf_kv,std::allocator<gguf_kv>> *this;
allocator local_79;
string local_78 [55];
allocator local_41;
string local_40 [32];
char *local_20;
char *local_18;
long local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0018d89a to 0018d8a2 has its CatchHandler @ 0018d947 */
std::__cxx11::string::string<std::allocator<char>>(local_40,param_2,&local_41);
/* try { // try from 0018d8a9 to 0018d8b1 has its CatchHandler @ 0018d955 */
gguf_check_reserved_keys<char_const*>(local_40,local_20);
std::__cxx11::string::~string(local_40);
std::allocator<char>::~allocator((allocator<char> *)&local_41);
gguf_remove_key(local_10,local_18);
pcVar1 = local_20;
this = (vector<gguf_kv,std::allocator<gguf_kv>> *)(local_10 + 8);
std::allocator<char>::allocator();
/* try { // try from 0018d90b to 0018d913 has its CatchHandler @ 0018d975 */
std::__cxx11::string::string<std::allocator<char>>(local_78,pcVar1,&local_79);
/* try { // try from 0018d916 to 0018d929 has its CatchHandler @ 0018d983 */
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,std::__cxx11::string>
(this,&local_18,local_78);
std::__cxx11::string::~string(local_78);
std::allocator<char>::~allocator((allocator<char> *)&local_79);
return;
}
|
|
1,146 | gguf_set_val_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_str(struct gguf_context * ctx, const char * key, const char * val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, std::string(val));
} | O1 | cpp | gguf_set_val_str:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x18d70
leaq 0x1cf8f(%rip), %rsi # 0x5d061
leaq 0x8(%rsp), %rdi
callq 0x18220
testl %eax, %eax
je 0x40151
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x400fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x180e0
movq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x186c0
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x18d70
addq $0x8, %rbx
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x18cf0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x40147
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x180e0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1ce95(%rip), %rdi # 0x5cfed
leaq 0x1d997(%rip), %rdx # 0x5daf6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x18ce0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x4018d
jmp 0x4019f
jmp 0x4019c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4019f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x180e0
jmp 0x4019f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x18ea0
| gguf_set_val_str:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rdx
mov rbx, rdi
mov [rsp+48h+var_20], rsi
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+48h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_40151
lea r15, [rsp+48h+var_30]
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_400FB
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_400FB:
mov rsi, [rsp+48h+var_20]
mov rdi, rbx
call _gguf_remove_key
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add rbx, 8
lea rsi, [rsp+48h+var_20]
lea rdx, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::string>(char const*&,std::string &&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_40147
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_40147:
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_40151:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
mov rbx, rax
mov rdi, [rsp+48h+var_40]
cmp rdi, r15
jnz short loc_4018D
jmp short loc_4019F
jmp short loc_4019C
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4019F
loc_4018D:
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4019F
loc_4019C:
mov rbx, rax
loc_4019F:
mov rdi, rbx
call __Unwind_Resume
| void gguf_set_val_str(long long a1, long long a2, long long a3)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v7; // [rsp+7h] [rbp-41h] BYREF
void *v8[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v9[2]; // [rsp+18h] [rbp-30h] BYREF
long long v10[4]; // [rsp+28h] [rbp-20h] BYREF
v10[0] = a2;
std::string::basic_string<std::allocator<char>>(v8, a2, &v7);
if ( !(unsigned int)std::string::compare(v8, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v4,
v5,
v6);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
gguf_remove_key(a1, v10[0]);
std::string::basic_string<std::allocator<char>>(v8, a3, &v7);
std::vector<gguf_kv>::emplace_back<char const*&,std::string>(a1 + 8, v10, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
| gguf_set_val_str:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDX
MOV RBX,RDI
MOV qword ptr [RSP + 0x28],RSI
LAB_001400bc:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00118d70
LAB_001400cb:
LEA RSI,[0x15d061]
LEA RDI,[RSP + 0x8]
CALL 0x00118220
TEST EAX,EAX
JZ 0x00140151
LEA R15,[RSP + 0x18]
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x001400fb
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001180e0
LAB_001400fb:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x001186c0
LAB_00140108:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R14
CALL 0x00118d70
ADD RBX,0x8
LAB_0014011e:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00118cf0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00140147
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001180e0
LAB_00140147:
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_00140151:
LEA RDI,[0x15cfed]
LEA RDX,[0x15daf6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00118ce0
|
void gguf_set_val_str(long param_1,char *param_2,char *param_3)
{
int iVar1;
allocator local_41;
long *local_40 [2];
long local_30 [2];
char *local_20;
/* try { // try from 001400bc to 001400ca has its CatchHandler @ 0014019c */
local_20 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_41);
iVar1 = std::__cxx11::string::compare((string *)local_40,"general.alignment");
if (iVar1 != 0) {
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
gguf_remove_key(param_1,local_20);
/* try { // try from 00140108 to 00140119 has its CatchHandler @ 0014017a */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_3,&local_41);
/* try { // try from 0014011e to 0014012f has its CatchHandler @ 0014016b */
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,std::__cxx11::string>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_20,(string *)local_40
);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
/* try { // try from 00140151 to 0014016a has its CatchHandler @ 0014017c */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
|
|
1,147 | gguf_set_val_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_val_str(struct gguf_context * ctx, const char * key, const char * val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, std::string(val));
} | O3 | cpp | gguf_set_val_str:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x17d60
leaq 0x1ddc7(%rip), %rsi # 0x5d551
leaq 0x10(%rsp), %rdi
callq 0x17210
testl %eax, %eax
je 0x3f80a
leaq 0x20(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3f7b4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x176b0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x17d60
addq $0x8, %rbx
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x17ce0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f7fe
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x170d0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1dccc(%rip), %rdi # 0x5d4dd
leaq 0x1e7ce(%rip), %rdx # 0x5dfe6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x17cd0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3f846
jmp 0x3f858
jmp 0x3f855
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f858
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x170d0
jmp 0x3f858
movq %rax, %rbx
movq %rbx, %rdi
callq 0x17e90
| gguf_set_val_str:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+58h+var_28], rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+58h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_3F80A
lea r12, [rsp+58h+var_38]
mov rdi, [r12-10h]; void *
cmp rdi, r12
jz short loc_3F7B4
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F7B4:
mov rdi, rbx
mov rsi, r15
call _gguf_remove_key
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add rbx, 8
lea rsi, [rsp+58h+var_28]
lea rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::string>(char const*&,std::string &&)
mov rdi, [rsp+58h+var_48]; void *
cmp rdi, r12
jz short loc_3F7FE
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F7FE:
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_3F80A:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
mov rbx, rax
mov rdi, [rsp+58h+var_48]
cmp rdi, r12
jnz short loc_3F846
jmp short loc_3F858
jmp short loc_3F855
mov rbx, rax
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F858
loc_3F846:
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3F858
loc_3F855:
mov rbx, rax
loc_3F858:
mov rdi, rbx
call __Unwind_Resume
| void gguf_set_val_str(long long a1, long long a2, long long a3)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v7; // [rsp+Fh] [rbp-49h] BYREF
void *v8[2]; // [rsp+10h] [rbp-48h] BYREF
_QWORD v9[2]; // [rsp+20h] [rbp-38h] BYREF
long long v10[5]; // [rsp+30h] [rbp-28h] BYREF
v10[0] = a2;
std::string::basic_string<std::allocator<char>>(v8, a2, &v7);
if ( !(unsigned int)std::string::compare(v8, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v4,
v5,
v6);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
gguf_remove_key(a1, a2);
std::string::basic_string<std::allocator<char>>(v8, a3, &v7);
std::vector<gguf_kv>::emplace_back<char const*&,std::string>(a1 + 8, v10, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
| gguf_set_val_str:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x30],RSI
LAB_0013f774:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00117d60
LAB_0013f783:
LEA RSI,[0x15d551]
LEA RDI,[RSP + 0x10]
CALL 0x00117210
TEST EAX,EAX
JZ 0x0013f80a
LEA R12,[RSP + 0x20]
MOV RDI,qword ptr [R12 + -0x10]
CMP RDI,R12
JZ 0x0013f7b4
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001170d0
LAB_0013f7b4:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001176b0
LAB_0013f7bf:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RSI,R14
CALL 0x00117d60
ADD RBX,0x8
LAB_0013f7d5:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00117ce0
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x0013f7fe
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001170d0
LAB_0013f7fe:
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013f80a:
LEA RDI,[0x15d4dd]
LEA RDX,[0x15dfe6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00117cd0
|
void gguf_set_val_str(long param_1,char *param_2,char *param_3)
{
int iVar1;
allocator local_49;
long *local_48 [2];
long local_38 [2];
char *local_28;
/* try { // try from 0013f774 to 0013f782 has its CatchHandler @ 0013f855 */
local_28 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_48,param_2,&local_49);
iVar1 = std::__cxx11::string::compare((string *)local_48,"general.alignment");
if (iVar1 != 0) {
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
gguf_remove_key(param_1,param_2);
/* try { // try from 0013f7bf to 0013f7d0 has its CatchHandler @ 0013f833 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_48,param_3,&local_49);
/* try { // try from 0013f7d5 to 0013f7e6 has its CatchHandler @ 0013f824 */
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,std::__cxx11::string>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_28,(string *)local_48
);
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
return;
}
/* try { // try from 0013f80a to 0013f823 has its CatchHandler @ 0013f835 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
|
|
1,148 | ma_bitmap_delete_all | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_delete_all(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_delete_all");
if (bitmap->map) /* Not in create */
{
bzero(bitmap->map, bitmap->block_size);
bitmap->changed= 1;
bitmap->page= 0;
bitmap->used_size= bitmap->full_tail_size= bitmap->full_head_size= 0;
bitmap->total_size= bitmap->max_total_size;
}
DBUG_VOID_RETURN;
} | O3 | c | ma_bitmap_delete_all:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa18(%rdi), %rdi
testq %rdi, %rdi
je 0x3fdcd
movl 0xb44(%rbx), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x292c0
movb $0x1, 0xa30(%rbx)
movq %r14, 0xa20(%rbx)
movl $0x0, 0xa3c(%rbx)
movq %r14, 0xa34(%rbx)
movl 0xb3c(%rbx), %eax
movl %eax, 0xb38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| _ma_bitmap_delete_all:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+0A18h]
test rdi, rdi
jz short loc_3FDCD
mov edx, [rbx+0B44h]
xor r14d, r14d
xor esi, esi
call _memset
mov byte ptr [rbx+0A30h], 1
mov [rbx+0A20h], r14
mov dword ptr [rbx+0A3Ch], 0
mov [rbx+0A34h], r14
mov eax, [rbx+0B3Ch]
mov [rbx+0B38h], eax
loc_3FDCD:
pop rbx
pop r14
pop rbp
retn
| long long ma_bitmap_delete_all(long long a1)
{
long long v2; // rdi
long long result; // rax
v2 = *(_QWORD *)(a1 + 2584);
if ( v2 )
{
memset(v2, 0LL, *(unsigned int *)(a1 + 2884));
*(_BYTE *)(a1 + 2608) = 1;
*(_QWORD *)(a1 + 2592) = 0LL;
*(_DWORD *)(a1 + 2620) = 0;
*(_QWORD *)(a1 + 2612) = 0LL;
result = *(unsigned int *)(a1 + 2876);
*(_DWORD *)(a1 + 2872) = result;
}
return result;
}
| _ma_bitmap_delete_all:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xa18]
TEST RDI,RDI
JZ 0x0013fdcd
MOV EDX,dword ptr [RBX + 0xb44]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x001292c0
MOV byte ptr [RBX + 0xa30],0x1
MOV qword ptr [RBX + 0xa20],R14
MOV dword ptr [RBX + 0xa3c],0x0
MOV qword ptr [RBX + 0xa34],R14
MOV EAX,dword ptr [RBX + 0xb3c]
MOV dword ptr [RBX + 0xb38],EAX
LAB_0013fdcd:
POP RBX
POP R14
POP RBP
RET
|
void _ma_bitmap_delete_all(long param_1)
{
if (*(void **)(param_1 + 0xa18) != (void *)0x0) {
memset(*(void **)(param_1 + 0xa18),0,(ulong)*(uint *)(param_1 + 0xb44));
*(int1 *)(param_1 + 0xa30) = 1;
*(int8 *)(param_1 + 0xa20) = 0;
*(int4 *)(param_1 + 0xa3c) = 0;
*(int8 *)(param_1 + 0xa34) = 0;
*(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c);
}
return;
}
|
|
1,149 | void Acore::Assert<unsigned long&, unsigned long&, unsigned long>(std::basic_string_view<char, std::char_traits<char>>, unsigned int, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, unsigned long&, unsigned long&, unsigned long&&) | SylCore-WoTLK/src/common/Debugging/Errors.h | AC_COMMON_API inline void Assert(std::string_view file, uint32 line, std::string_view function, std::string_view debugInfo, std::string_view message, std::string_view fmt, Args&&... args)
{
Assert(file, line, function, debugInfo, message, StringFormat(fmt, std::forward<Args>(args)...));
} | O3 | c | void Acore::Assert<unsigned long&, unsigned long&, unsigned long>(std::basic_string_view<char, std::char_traits<char>>, unsigned int, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, unsigned long&, unsigned long&, unsigned long&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq 0x158(%rsp), %rax
movq 0x150(%rsp), %rcx
movaps 0x120(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
movaps 0x130(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x140(%rsp), %r13
movq 0x148(%rsp), %rbx
movq (%r9), %rdx
movq (%rcx), %rcx
movq (%rax), %rax
leaq 0xb0(%rsp), %r8
movq %rdx, (%r8)
movq %rcx, 0x10(%r8)
movq %rax, 0x20(%r8)
leaq 0x40(%rsp), %rdi
movl $0x444, %ecx # imm = 0x444
movq %rbx, %rsi
movq %r13, %rdx
callq 0xea7c3
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movaps 0x80(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
callq 0xc7130
movq %rax, %r14
cmpl $0x1, %edx
jne 0x4c932
movq %r14, %rdi
callq 0x1b0d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x90(%rsp), %r8
movq %rax, (%r8)
movq %rbx, 0x10(%r8)
movq %r13, 0x18(%r8)
leaq 0xad365(%rip), %rsi # 0xf9c49
leaq 0x40(%rsp), %rdi
movl $0x2c, %edx
movl $0xdc, %ecx
callq 0xea7c3
callq 0x1be70
jmp 0x4c866
movq %rax, %r14
callq 0x1be70
jmp 0x4c932
movq %rax, %rdi
callq 0x2841d
movq %rax, %r14
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c932
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd32e8
movq %r14, %rdi
callq 0x1bba0
| _ZN5Acore6AssertIJRmS1_mEEEvSt17basic_string_viewIcSt11char_traitsIcEEjS5_S5_S5_S5_DpOT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_E0], r8
mov [rsp+118h+var_E8], rcx
mov ebp, edx
mov r15, rsi
mov r12, rdi
mov rax, [rsp+118h+arg_38]
mov rcx, [rsp+118h+arg_30]
movaps xmm0, [rsp+118h+arg_0]
movaps [rsp+118h+var_98], xmm0
movaps xmm0, [rsp+118h+arg_10]
movaps [rsp+118h+var_A8], xmm0
mov r13, qword ptr [rsp+118h+arg_20]
mov rbx, qword ptr [rsp+118h+arg_28]
mov rdx, [r9]
mov rcx, [rcx]
mov rax, [rax]
lea r8, [rsp+118h+var_68]; int
mov [r8], rdx
mov [r8+10h], rcx
mov [r8+20h], rax
lea rdi, [rsp+118h+var_D8]; int
mov ecx, 444h; int
mov rsi, rbx; int
mov rdx, r13; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
loc_4C866:
mov rax, qword ptr [rsp+118h+var_D8]
mov rcx, [rsp+118h+var_D0]
mov qword ptr [rsp+118h+var_B8], rcx
mov qword ptr [rsp+118h+var_B8+8], rax
movups xmm0, [rsp+118h+var_B8]
movups [rsp+118h+var_F8], xmm0
movaps xmm0, [rsp+118h+var_A8]
movups [rsp+118h+var_108], xmm0
movaps xmm0, [rsp+118h+var_98]
movups [rsp+118h+var_118], xmm0
mov rdi, r12
mov rsi, r15
mov edx, ebp
mov rcx, [rsp+118h+var_E8]
mov r8, [rsp+118h+var_E0]
call _ZN5Acore6AssertESt17basic_string_viewIcSt11char_traitsIcEEjS3_S3_S3_S3_; Acore::Assert(std::string_view,uint,std::string_view,std::string_view,std::string_view,std::string_view)
mov r14, rax
cmp edx, 1
jnz short loc_4C932
mov rdi, r14; void *
call ___cxa_begin_catch
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea r8, [rsp+118h+var_88]; int
mov [r8], rax
mov [r8+10h], rbx
mov [r8+18h], r13
lea rsi, aWrongFormatOcc_0; "Wrong format occurred ({}). Fmt string:"...
lea rdi, [rsp+118h+var_D8]; int
mov edx, 2Ch ; ','; int
mov ecx, 0DCh; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
call ___cxa_end_catch
jmp loc_4C866
mov r14, rax
call ___cxa_end_catch
jmp short loc_4C932
mov rdi, rax
call __clang_call_terminate
mov r14, rax
lea rax, [rsp+118h+var_C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4C932
mov rsi, [rsp+118h+var_C8]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_4C932:
mov rdi, r14
call __Unwind_Resume
| void __noreturn Acore::Assert<unsigned long &,unsigned long &,unsigned long>(
long long a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
_QWORD *a6,
__int128 a7,
__int128 a8,
int a9,
int a10,
long long *a11,
long long *a12)
{
long long v13; // rcx
long long v14; // rax
long long v15; // r9
int v16; // [rsp+0h] [rbp-118h]
int v17; // [rsp+8h] [rbp-110h]
void *v18; // [rsp+10h] [rbp-108h]
int v19; // [rsp+18h] [rbp-100h]
unsigned long long v20; // [rsp+20h] [rbp-F8h]
int v23[2]; // [rsp+40h] [rbp-D8h] BYREF
long long v24; // [rsp+48h] [rbp-D0h]
long long v25; // [rsp+60h] [rbp-B8h]
long long v26; // [rsp+68h] [rbp-B0h]
__int128 v27; // [rsp+70h] [rbp-A8h]
__int128 v28; // [rsp+80h] [rbp-98h]
_QWORD v29[13]; // [rsp+B0h] [rbp-68h] BYREF
v28 = a7;
v27 = a8;
v13 = *a11;
v14 = *a12;
v29[0] = *a6;
v29[2] = v13;
v29[4] = v14;
fmt::v10::vformat[abi:cxx11]((int)v23, a10, a9, 1092, (int)v29, (int)a6, v16, v17, v18, v19, v20);
v25 = v24;
v26 = *(_QWORD *)v23;
Acore::Assert(a1, a2, a3, a4, a5, v15, v28, *((_QWORD *)&v28 + 1), v27, *((_QWORD *)&v27 + 1), v24, *(_QWORD *)v23);
}
| Assert<unsigned_long&,unsigned_long&,unsigned_long>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x38],R8
MOV qword ptr [RSP + 0x30],RCX
MOV EBP,EDX
MOV R15,RSI
MOV R12,RDI
MOV RAX,qword ptr [RSP + 0x158]
MOV RCX,qword ptr [RSP + 0x150]
MOVAPS XMM0,xmmword ptr [RSP + 0x120]
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x130]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOV R13,qword ptr [RSP + 0x140]
MOV RBX,qword ptr [RSP + 0x148]
MOV RDX,qword ptr [R9]
MOV RCX,qword ptr [RCX]
MOV RAX,qword ptr [RAX]
LEA R8,[RSP + 0xb0]
MOV qword ptr [R8],RDX
MOV qword ptr [R8 + 0x10],RCX
MOV qword ptr [R8 + 0x20],RAX
LAB_0014c851:
LEA RDI,[RSP + 0x40]
MOV ECX,0x444
MOV RSI,RBX
MOV RDX,R13
CALL 0x001ea7c3
LAB_0014c866:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x68],RAX
LAB_0014c87a:
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x70]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x80]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV RSI,R15
MOV EDX,EBP
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
CALL 0x001c7130
LAB_0014c8b1:
MOV R14,RAX
CMP EDX,0x1
JNZ 0x0014c932
MOV RDI,R14
CALL 0x0011b0d0
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
CALL qword ptr [RCX + 0x10]
LEA R8,[RSP + 0x90]
MOV qword ptr [R8],RAX
MOV qword ptr [R8 + 0x10],RBX
MOV qword ptr [R8 + 0x18],R13
LAB_0014c8dd:
LEA RSI,[0x1f9c49]
LEA RDI,[RSP + 0x40]
MOV EDX,0x2c
MOV ECX,0xdc
CALL 0x001ea7c3
LAB_0014c8f8:
CALL 0x0011be70
JMP 0x0014c866
LAB_0014c932:
MOV RDI,R14
CALL 0x0011bba0
|
/* void Acore::Assert<unsigned long&, unsigned long&, unsigned long>(std::basic_string_view<char,
std::char_traits<char> >, unsigned int, std::basic_string_view<char, std::char_traits<char> >,
std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char,
std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, unsigned long&,
unsigned long&, unsigned long&&) */
void Acore::Assert<unsigned_long&,unsigned_long&,unsigned_long>
(int8 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5,int8 *param_6,int8 param_7,int8 param_8,
int4 param_9,int4 param_10,int8 param_11,int8 param_12,
int8 *param_13,int8 *param_14)
{
long *plVar1;
int1 auVar2 [12];
int8 local_d8;
int8 local_d0;
int8 local_b8;
int8 uStack_b0;
int4 local_a8;
int4 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_58;
int8 local_48;
local_98 = param_7;
uStack_90 = param_8;
local_a8 = param_9;
uStack_a0 = param_10;
local_68 = *param_6;
local_58 = *param_13;
local_48 = *param_14;
/* try { // try from 0014c851 to 0014c865 has its CatchHandler @ 0014c8b1 */
fmt::v10::vformat_abi_cxx11_(&local_d8,param_12,param_11,0x444);
while( true ) {
local_b8 = local_d0;
uStack_b0 = local_d8;
/* try { // try from 0014c87a to 0014c8b0 has its CatchHandler @ 0014c914 */
auVar2 = Assert(param_1,param_2,param_3,param_4,param_5);
/* catch(type#1 @ 004812a0) { ... } // from try @ 0014c851 with catch @ 0014c8b1
*/
if (auVar2._8_4_ != 1) break;
plVar1 = (long *)__cxa_begin_catch(auVar2._0_8_);
local_88 = (**(code **)(*plVar1 + 0x10))(plVar1);
local_78 = param_12;
local_70 = param_11;
/* try { // try from 0014c8dd to 0014c8f7 has its CatchHandler @ 0014c902 */
fmt::v10::vformat_abi_cxx11_
(&local_d8,"Wrong format occurred ({}). Fmt string: \'{}\'",0x2c,0xdc);
__cxa_end_catch();
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar2._0_8_);
}
|
|
1,150 | ftxui::border(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp | Element border(Element child) {
return std::make_shared<Border>(unpack(std::move(child)), ROUNDED);
} | O2 | cpp | ftxui::border(std::shared_ptr<ftxui::Node>):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movups (%rsi), %xmm0
andq $0x0, 0x8(%rsi)
movaps %xmm0, -0x8(%rbx)
andq $0x0, (%rsi)
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1d99c
leaq 0x4(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1c48a
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r14)
andq $0x0, -0x8(%rdi)
callq 0x13452
leaq 0x8(%rsp), %rdi
callq 0x13b2c
movq %rbx, %rdi
callq 0x13452
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x13b2c
jmp 0x1c47a
movq %rax, %r14
movq %rbx, %rdi
callq 0x13452
movq %r14, %rdi
callq 0xc7f0
| _ZN5ftxui6borderESt10shared_ptrINS_4NodeEE:
push r14
push rbx
sub rsp, 48h
mov r14, rdi
lea rbx, [rsp+58h+var_30]
movups xmm0, xmmword ptr [rsi]
and qword ptr [rsi+8], 0
movaps xmmword ptr [rbx-8], xmm0
and qword ptr [rsi], 0
lea rdi, [rsp+58h+var_50]
lea rsi, [rsp+58h+var_38]
call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
lea rdx, [rsp+58h+var_54]
mov dword ptr [rdx], 4
lea rdi, [rsp+58h+var_28]
lea rsi, [rsp+58h+var_50]
call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_16BorderEJSt6vectorISt10shared_ptrINS0_4NodeEESaIS6_EENS0_11BorderStyleEEES4_IT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle &&)
lea rdi, [rsp+58h+var_20]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [r14], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+58h+var_50]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, r14
add rsp, 48h
pop rbx
pop r14
retn
mov r14, rax
lea rdi, [rsp+arg_0]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
jmp short loc_1C47A
mov r14, rax
loc_1C47A:
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| _OWORD * ftxui::border(_OWORD *a1, __int128 *a2)
{
__int128 v2; // xmm0
int v3; // ecx
int v4; // r8d
int v5; // r9d
__int128 v6; // xmm0
int v8; // [rsp+4h] [rbp-54h] BYREF
_QWORD v9[3]; // [rsp+8h] [rbp-50h] BYREF
__int128 v10; // [rsp+20h] [rbp-38h] BYREF
_OWORD v11[2]; // [rsp+30h] [rbp-28h] BYREF
v2 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v10 = v2;
*(_QWORD *)a2 = 0LL;
ftxui::unpack<std::shared_ptr<ftxui::Node>>(v9, &v10);
v8 = 4;
std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>(
(unsigned int)v11,
(unsigned int)v9,
(unsigned int)&v8,
v3,
v4,
v5);
v6 = v11[0];
*((_QWORD *)&v11[0] + 1) = 0LL;
*a1 = v6;
*(_QWORD *)&v11[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v11 + 1);
std::vector<std::shared_ptr<ftxui::Node>>::~vector(v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return a1;
}
| border:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
LEA RBX,[RSP + 0x28]
MOVUPS XMM0,xmmword ptr [RSI]
AND qword ptr [RSI + 0x8],0x0
MOVAPS xmmword ptr [RBX + -0x8],XMM0
AND qword ptr [RSI],0x0
LAB_0011c407:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x0011d99c
LEA RDX,[RSP + 0x4]
MOV dword ptr [RDX],0x4
LAB_0011c421:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x8]
CALL 0x0011c48a
LAB_0011c430:
LEA RDI,[RSP + 0x38]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [R14],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00113452
LEA RDI,[RSP + 0x8]
CALL 0x00113b2c
MOV RDI,RBX
CALL 0x00113452
MOV RAX,R14
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* ftxui::border(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::border(ftxui *this,int8 *param_2)
{
int8 uVar1;
ftxui local_50 [24];
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int8 local_28;
int8 auStack_20 [2];
local_38 = *(int4 *)param_2;
uStack_34 = *(int4 *)((long)param_2 + 4);
uStack_30 = *(int4 *)(param_2 + 1);
uStack_2c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 0011c407 to 0011c415 has its CatchHandler @ 0011c477 */
unpack<std::shared_ptr<ftxui::Node>>(local_50,&local_38);
/* try { // try from 0011c421 to 0011c42f has its CatchHandler @ 0011c468 */
std::
make_shared<ftxui::(anonymous_namespace)::Border,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>,ftxui::BorderStyle>
((vector *)&local_28,(BorderStyle *)local_50);
uVar1 = auStack_20[0];
auStack_20[0] = 0;
*(int8 *)this = local_28;
*(int8 *)(this + 8) = uVar1;
local_28 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_20);
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30);
return this;
}
|
|
1,151 | Vector4Max | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector4 Vector4Max(Vector4 v1, Vector4 v2)
{
Vector4 result = { 0 };
result.x = fmaxf(v1.x, v2.x);
result.y = fmaxf(v1.y, v2.y);
result.z = fmaxf(v1.z, v2.z);
result.w = fmaxf(v1.w, v2.w);
return result;
} | O1 | c | Vector4Max:
movaps %xmm0, %xmm4
cmpunordss %xmm0, %xmm0
movaps %xmm0, %xmm5
andps %xmm2, %xmm5
movaps %xmm2, %xmm6
maxss %xmm4, %xmm6
andnps %xmm6, %xmm0
orps %xmm5, %xmm0
shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1]
shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1]
movaps %xmm4, %xmm5
cmpunordss %xmm4, %xmm5
movaps %xmm5, %xmm6
andps %xmm2, %xmm6
maxss %xmm4, %xmm2
andnps %xmm2, %xmm5
orps %xmm6, %xmm5
movaps %xmm1, %xmm2
cmpunordss %xmm1, %xmm2
movaps %xmm2, %xmm4
andps %xmm3, %xmm4
movaps %xmm3, %xmm6
maxss %xmm1, %xmm6
andnps %xmm6, %xmm2
orps %xmm4, %xmm2
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1]
movaps %xmm1, %xmm4
cmpunordss %xmm1, %xmm4
movaps %xmm4, %xmm6
andps %xmm3, %xmm6
maxss %xmm1, %xmm3
andnps %xmm3, %xmm4
orps %xmm6, %xmm4
unpcklps %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
unpcklps %xmm4, %xmm2 # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
movaps %xmm2, %xmm1
retq
| Vector4Max:
movaps xmm4, xmm0
cmpunordss xmm0, xmm0
movaps xmm5, xmm0
andps xmm5, xmm2
movaps xmm6, xmm2
maxss xmm6, xmm4
andnps xmm0, xmm6
orps xmm0, xmm5
shufps xmm4, xmm4, 55h ; 'U'
shufps xmm2, xmm2, 55h ; 'U'
movaps xmm5, xmm4
cmpunordss xmm5, xmm4
movaps xmm6, xmm5
andps xmm6, xmm2
maxss xmm2, xmm4
andnps xmm5, xmm2
orps xmm5, xmm6
movaps xmm2, xmm1
cmpunordss xmm2, xmm1
movaps xmm4, xmm2
andps xmm4, xmm3
movaps xmm6, xmm3
maxss xmm6, xmm1
andnps xmm2, xmm6
orps xmm2, xmm4
shufps xmm1, xmm1, 55h ; 'U'
shufps xmm3, xmm3, 55h ; 'U'
movaps xmm4, xmm1
cmpunordss xmm4, xmm1
movaps xmm6, xmm4
andps xmm6, xmm3
maxss xmm3, xmm1
andnps xmm4, xmm3
orps xmm4, xmm6
unpcklps xmm0, xmm5
unpcklps xmm2, xmm4
movaps xmm1, xmm2
retn
| __m128 Vector4Max(__m128 a1, double a2, __m128 a3)
{
__m128 v4; // xmm0
__m128 v5; // xmm6
__m128 v6; // xmm0
__m128 v7; // xmm4
__m128 v8; // xmm2
__m128 v9; // xmm5
__m128 v10; // xmm6
v4 = _mm_cmpunord_ss(a1, a1);
v5 = a3;
v5.m128_f32[0] = fmaxf(a3.m128_f32[0], a1.m128_f32[0]);
v6 = _mm_or_ps(_mm_andnot_ps(v4, v5), _mm_and_ps(v4, a3));
v7 = _mm_shuffle_ps(a1, a1, 85);
v8 = _mm_shuffle_ps(a3, a3, 85);
v9 = _mm_cmpunord_ss(v7, v7);
v10 = _mm_and_ps(v9, v8);
v8.m128_f32[0] = fmaxf(v8.m128_f32[0], v7.m128_f32[0]);
return _mm_unpacklo_ps(v6, _mm_or_ps(_mm_andnot_ps(v9, v8), v10));
}
| Vector4Max:
MOVAPS XMM4,XMM0
CMPUNORDSS XMM0,XMM0
MOVAPS XMM5,XMM0
ANDPS XMM5,XMM2
MOVAPS XMM6,XMM2
MAXSS XMM6,XMM4
ANDNPS XMM0,XMM6
ORPS XMM0,XMM5
SHUFPS XMM4,XMM4,0x55
SHUFPS XMM2,XMM2,0x55
MOVAPS XMM5,XMM4
CMPUNORDSS XMM5,XMM4
MOVAPS XMM6,XMM5
ANDPS XMM6,XMM2
MAXSS XMM2,XMM4
ANDNPS XMM5,XMM2
ORPS XMM5,XMM6
MOVAPS XMM2,XMM1
CMPUNORDSS XMM2,XMM1
MOVAPS XMM4,XMM2
ANDPS XMM4,XMM3
MOVAPS XMM6,XMM3
MAXSS XMM6,XMM1
ANDNPS XMM2,XMM6
ORPS XMM2,XMM4
SHUFPS XMM1,XMM1,0x55
SHUFPS XMM3,XMM3,0x55
MOVAPS XMM4,XMM1
CMPUNORDSS XMM4,XMM1
MOVAPS XMM6,XMM4
ANDPS XMM6,XMM3
MAXSS XMM3,XMM1
ANDNPS XMM4,XMM3
ORPS XMM4,XMM6
UNPCKLPS XMM0,XMM5
UNPCKLPS XMM2,XMM4
MOVAPS XMM1,XMM2
RET
|
void Vector4Max(void)
{
return;
}
|
|
1,152 | find_private_class_field_all | bluesky950520[P]quickjs/quickjs.c | static int find_private_class_field_all(JSContext *ctx, JSFunctionDef *fd,
JSAtom name, int scope_level)
{
int idx;
idx = fd->scopes[scope_level].first;
while (idx >= 0) {
if (fd->vars[idx].var_name == name)
return idx;
idx = fd->vars[idx].scope_next;
}
return -1;
} | O0 | c | find_private_class_field_all:
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 $0x0, -0x24(%rsp)
jl 0xbc78d
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 0xbc76c
movl -0x24(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0xbc795
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 0xbc73b
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
movl -0x4(%rsp), %eax
retq
nopw (%rax,%rax)
| find_private_class_field_all:
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_BC73B:
cmp [rsp+var_24], 0
jl short loc_BC78D
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_BC76C
mov eax, [rsp+var_24]
mov [rsp+var_4], eax
jmp short loc_BC795
loc_BC76C:
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_BC73B
loc_BC78D:
mov [rsp+var_4], 0FFFFFFFFh
loc_BC795:
mov eax, [rsp+var_4]
retn
| long long find_private_class_field_all(long long a1, long long a2, int a3, int a4)
{
int i; // [rsp+0h] [rbp-24h]
for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 248) + 8LL * a4 + 4); i >= 0; i = *(_DWORD *)(16LL * i
+ *(_QWORD *)(a2 + 144)
+ 8) )
{
if ( *(_DWORD *)(16LL * i + *(_QWORD *)(a2 + 144)) == a3 )
return (unsigned int)i;
}
return (unsigned int)-1;
}
| find_private_class_field_all:
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_001bc73b:
CMP dword ptr [RSP + -0x24],0x0
JL 0x001bc78d
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 0x001bc76c
MOV EAX,dword ptr [RSP + -0x24]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x001bc795
LAB_001bc76c:
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 0x001bc73b
LAB_001bc78d:
MOV dword ptr [RSP + -0x4],0xffffffff
LAB_001bc795:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int find_private_class_field_all(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( true ) {
if (local_24 < 0) {
return -1;
}
if (*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10) == param_3) break;
local_24 = *(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10 + 8);
}
return local_24;
}
|
|
1,153 | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>&, 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>::array_t&&) | monkey531[P]llama/common/json.hpp | static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::array;
j.m_data.m_value = std::move(arr);
j.set_parents();
j.assert_invariant();
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>&, 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>::array_t&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movzbl (%r14), %esi
callq 0x4402c
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x196d0
movups (%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42e48
nop
| _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add rdi, 8
movzx esi, byte ptr [r14]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; 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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
mov rcx, [rbx+10h]
mov [rax+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
| long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>>(
unsigned __int8 *a1,
long long a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
(void **)a1 + 1,
*a1);
*a1 = 2;
result = operator new(0x18uLL);
*(_OWORD *)result = *(_OWORD *)a2;
*(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16);
*(_OWORD *)a2 = 0LL;
*(_QWORD *)(a2 + 16) = 0LL;
*((_QWORD *)a1 + 1) = result;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [R14]
CALL 0x0014402c
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x001196d0
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00142e48
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, nlohmann::json_abi_v3_11_3::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>::array_t&&) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::
construct<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 *param_1,array_t *param_2)
{
int8 uVar1;
int8 *puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::json_value::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = (basic_json)0x2;
puVar2 = (int8 *)operator_new(0x18);
uVar1 = *(int8 *)(param_2 + 8);
*puVar2 = *(int8 *)param_2;
puVar2[1] = uVar1;
puVar2[2] = *(int8 *)(param_2 + 0x10);
*(int8 *)param_2 = 0;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
*(int8 **)(param_1 + 8) = puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
|
|
1,154 | LefDefParser::defiPinPort::addPolygon(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPinPort::addPolygon(const char* layerName) {
int *pms, *pdw, *pm;
int i;
if (numPolys_ == polysAllocated_) {
char** newn;
struct defiPoints** poly;
polysAllocated_ = (polysAllocated_ == 0) ?
2 : polysAllocated_ * 2;
newn = (char**)malloc(sizeof(char*) * polysAllocated_);
poly = (struct defiPoints**)malloc(sizeof(struct defiPoints*) *
polysAllocated_);
pms = (int*)malloc(polysAllocated_ * sizeof(int));
pdw = (int*)malloc(polysAllocated_ * sizeof(int));
pm = (int*)malloc(polysAllocated_ * sizeof(int));
for (i = 0; i < numPolys_; i++) {
newn[i] = polygonNames_[i];
poly[i] = polygons_[i];
pms[i] = polyMinSpacing_[i];
pdw[i] = polyEffectiveWidth_[i];
pm[i] = polyMask_[i];
}
if (numPolys_ > 0) {
free((char*)(polygons_));
free((char*)(polygonNames_));
free((char*)(polyMinSpacing_));
free((char*)(polyEffectiveWidth_));
free((char*)(polyMask_));
}
polygonNames_ = newn;
polygons_ = poly;
polyMinSpacing_ = pms;
polyEffectiveWidth_ = pdw;
polyMask_ = pm;
}
polygonNames_[numPolys_] = strdup(layerName);
polygons_[numPolys_] = 0;
polyMinSpacing_[numPolys_] = -1;
polyEffectiveWidth_[numPolys_] = -1;
polyMask_[numPolys_] = 0;
numPolys_ += 1;
} | O0 | cpp | LefDefParser::defiPinPort::addPolygon(char const*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x4c(%rcx), %eax
cmpl 0x48(%rcx), %eax
jne 0x298f1
movq 0x10(%rsp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x2972a
movl $0x2, %eax
movl %eax, 0xc(%rsp)
jmp 0x29738
movq 0x10(%rsp), %rax
movl 0x48(%rax), %eax
shll %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, 0x48(%rax)
movslq 0x48(%rax), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movslq 0x48(%rax), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
movslq 0x48(%rax), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x40(%rsp)
movslq 0x48(%rax), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rsp)
movslq 0x48(%rax), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0x4c(%rcx), %eax
jge 0x2986e
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x20(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x70(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movq (%rcx,%rdx,8), %rsi
movq 0x18(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x58(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x40(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x68(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x38(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x60(%rax), %rax
movslq 0x2c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x297c6
movq 0x10(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
jle 0x298bf
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x72a0
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x72a0
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x72a0
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x72a0
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0x72a0
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x50(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x70(%rax)
movq 0x40(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x68(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x60(%rax)
movq 0x48(%rsp), %rdi
callq 0x73d0
movq %rax, %rsi
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rcx
movslq 0x4c(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x70(%rax), %rcx
movslq 0x4c(%rax), %rdx
movq $0x0, (%rcx,%rdx,8)
movq 0x58(%rax), %rcx
movslq 0x4c(%rax), %rdx
movl $0xffffffff, (%rcx,%rdx,4) # imm = 0xFFFFFFFF
movq 0x68(%rax), %rcx
movslq 0x4c(%rax), %rdx
movl $0xffffffff, (%rcx,%rdx,4) # imm = 0xFFFFFFFF
movq 0x60(%rax), %rcx
movslq 0x4c(%rax), %rdx
movl $0x0, (%rcx,%rdx,4)
movl 0x4c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rax)
addq $0x58, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser11defiPinPort10addPolygonEPKc:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rcx, [rsp+58h+var_8]
mov [rsp+58h+var_48], rcx
mov eax, [rcx+4Ch]
cmp eax, [rcx+48h]
jnz loc_298F1
mov rax, [rsp+58h+var_48]
cmp dword ptr [rax+48h], 0
jnz short loc_2972A
mov eax, 2
mov [rsp+58h+var_4C], eax
jmp short loc_29738
loc_2972A:
mov rax, [rsp+58h+var_48]
mov eax, [rax+48h]
shl eax, 1
mov [rsp+58h+var_4C], eax
loc_29738:
mov rax, [rsp+58h+var_48]
mov ecx, [rsp+58h+var_4C]
mov [rax+48h], ecx
movsxd rdi, dword ptr [rax+48h]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_38], rcx
movsxd rdi, dword ptr [rax+48h]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_40], rcx
movsxd rdi, dword ptr [rax+48h]
shl rdi, 2
call _malloc
mov rcx, rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_18], rcx
movsxd rdi, dword ptr [rax+48h]
shl rdi, 2
call _malloc
mov rcx, rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_20], rcx
movsxd rdi, dword ptr [rax+48h]
shl rdi, 2
call _malloc
mov [rsp+58h+var_28], rax
mov [rsp+58h+var_2C], 0
loc_297C6:
mov rcx, [rsp+58h+var_48]
mov eax, [rsp+58h+var_2C]
cmp eax, [rcx+4Ch]
jge loc_2986E
mov rax, [rsp+58h+var_48]
mov rcx, [rax+50h]
movsxd rdx, [rsp+58h+var_2C]
mov rsi, [rcx+rdx*8]
mov rcx, [rsp+58h+var_38]
movsxd rdx, [rsp+58h+var_2C]
mov [rcx+rdx*8], rsi
mov rcx, [rax+70h]
movsxd rdx, [rsp+58h+var_2C]
mov rsi, [rcx+rdx*8]
mov rcx, [rsp+58h+var_40]
movsxd rdx, [rsp+58h+var_2C]
mov [rcx+rdx*8], rsi
mov rcx, [rax+58h]
movsxd rdx, [rsp+58h+var_2C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+58h+var_18]
movsxd rdx, [rsp+58h+var_2C]
mov [rcx+rdx*4], esi
mov rcx, [rax+68h]
movsxd rdx, [rsp+58h+var_2C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+58h+var_20]
movsxd rdx, [rsp+58h+var_2C]
mov [rcx+rdx*4], esi
mov rax, [rax+60h]
movsxd rcx, [rsp+58h+var_2C]
mov edx, [rax+rcx*4]
mov rax, [rsp+58h+var_28]
movsxd rcx, [rsp+58h+var_2C]
mov [rax+rcx*4], edx
mov eax, [rsp+58h+var_2C]
add eax, 1
mov [rsp+58h+var_2C], eax
jmp loc_297C6
loc_2986E:
mov rax, [rsp+58h+var_48]
cmp dword ptr [rax+4Ch], 0
jle short loc_298BF
mov rax, [rsp+58h+var_48]
mov rdi, [rax+70h]
call _free
mov rax, [rsp+58h+var_48]
mov rdi, [rax+50h]
call _free
mov rax, [rsp+58h+var_48]
mov rdi, [rax+58h]
call _free
mov rax, [rsp+58h+var_48]
mov rdi, [rax+68h]
call _free
mov rax, [rsp+58h+var_48]
mov rdi, [rax+60h]
call _free
loc_298BF:
mov rax, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_38]
mov [rax+50h], rcx
mov rcx, [rsp+58h+var_40]
mov [rax+70h], rcx
mov rcx, [rsp+58h+var_18]
mov [rax+58h], rcx
mov rcx, [rsp+58h+var_20]
mov [rax+68h], rcx
mov rcx, [rsp+58h+var_28]
mov [rax+60h], rcx
loc_298F1:
mov rdi, [rsp+58h+var_10]
call _strdup
mov rsi, rax
mov rax, [rsp+58h+var_48]
mov rcx, [rax+50h]
movsxd rdx, dword ptr [rax+4Ch]
mov [rcx+rdx*8], rsi
mov rcx, [rax+70h]
movsxd rdx, dword ptr [rax+4Ch]
mov qword ptr [rcx+rdx*8], 0
mov rcx, [rax+58h]
movsxd rdx, dword ptr [rax+4Ch]
mov dword ptr [rcx+rdx*4], 0FFFFFFFFh
mov rcx, [rax+68h]
movsxd rdx, dword ptr [rax+4Ch]
mov dword ptr [rcx+rdx*4], 0FFFFFFFFh
mov rcx, [rax+60h]
movsxd rdx, dword ptr [rax+4Ch]
mov dword ptr [rcx+rdx*4], 0
mov ecx, [rax+4Ch]
add ecx, 1
mov [rax+4Ch], ecx
add rsp, 58h
retn
| LefDefParser::defiPinPort * LefDefParser::defiPinPort::addPolygon(
LefDefParser::defiPinPort *this,
const char *a2)
{
long long v2; // rsi
LefDefParser::defiPinPort *result; // rax
int v4; // [rsp+Ch] [rbp-4Ch]
long long v5; // [rsp+18h] [rbp-40h]
long long v6; // [rsp+20h] [rbp-38h]
int i; // [rsp+2Ch] [rbp-2Ch]
long long v8; // [rsp+30h] [rbp-28h]
long long v9; // [rsp+38h] [rbp-20h]
long long v10; // [rsp+40h] [rbp-18h]
if ( *((_DWORD *)this + 19) == *((_DWORD *)this + 18) )
{
if ( *((_DWORD *)this + 18) )
v4 = 2 * *((_DWORD *)this + 18);
else
v4 = 2;
*((_DWORD *)this + 18) = v4;
v6 = malloc(8LL * *((int *)this + 18));
v5 = malloc(8LL * *((int *)this + 18));
v10 = malloc(4LL * *((int *)this + 18));
v9 = malloc(4LL * *((int *)this + 18));
v8 = malloc(4LL * *((int *)this + 18));
for ( i = 0; i < *((_DWORD *)this + 19); ++i )
{
*(_QWORD *)(v6 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 10) + 8LL * i);
*(_QWORD *)(v5 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 14) + 8LL * i);
*(_DWORD *)(v10 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 11) + 4LL * i);
*(_DWORD *)(v9 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 13) + 4LL * i);
*(_DWORD *)(v8 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 12) + 4LL * i);
}
if ( *((int *)this + 19) > 0 )
{
free(*((_QWORD *)this + 14));
free(*((_QWORD *)this + 10));
free(*((_QWORD *)this + 11));
free(*((_QWORD *)this + 13));
free(*((_QWORD *)this + 12));
}
*((_QWORD *)this + 10) = v6;
*((_QWORD *)this + 14) = v5;
*((_QWORD *)this + 11) = v10;
*((_QWORD *)this + 13) = v9;
*((_QWORD *)this + 12) = v8;
}
v2 = strdup(a2);
result = this;
*(_QWORD *)(*((_QWORD *)this + 10) + 8LL * *((int *)this + 19)) = v2;
*(_QWORD *)(*((_QWORD *)this + 14) + 8LL * *((int *)this + 19)) = 0LL;
*(_DWORD *)(*((_QWORD *)this + 11) + 4LL * *((int *)this + 19)) = -1;
*(_DWORD *)(*((_QWORD *)this + 13) + 4LL * *((int *)this + 19)) = -1;
*(_DWORD *)(*((_QWORD *)this + 12) + 4LL * (int)(*((_DWORD *)this + 19))++) = 0;
return result;
}
| addPolygon:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RCX
MOV EAX,dword ptr [RCX + 0x4c]
CMP EAX,dword ptr [RCX + 0x48]
JNZ 0x001298f1
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x48],0x0
JNZ 0x0012972a
MOV EAX,0x2
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00129738
LAB_0012972a:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x48]
SHL EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
LAB_00129738:
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
MOV dword ptr [RAX + 0x48],ECX
MOVSXD RDI,dword ptr [RAX + 0x48]
SHL RDI,0x3
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RCX
MOVSXD RDI,dword ptr [RAX + 0x48]
SHL RDI,0x3
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RCX
MOVSXD RDI,dword ptr [RAX + 0x48]
SHL RDI,0x2
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RCX
MOVSXD RDI,dword ptr [RAX + 0x48]
SHL RDI,0x2
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RCX
MOVSXD RDI,dword ptr [RAX + 0x48]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
LAB_001297c6:
MOV RCX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,dword ptr [RCX + 0x4c]
JGE 0x0012986e
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x50]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x70]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x58]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x40]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x68]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x38]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RAX,qword ptr [RAX + 0x60]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001297c6
LAB_0012986e:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x4c],0x0
JLE 0x001298bf
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x58]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x001072a0
LAB_001298bf:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x70],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x68],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x60],RCX
LAB_001298f1:
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001073d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x50]
MOVSXD RDX,dword ptr [RAX + 0x4c]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x70]
MOVSXD RDX,dword ptr [RAX + 0x4c]
MOV qword ptr [RCX + RDX*0x8],0x0
MOV RCX,qword ptr [RAX + 0x58]
MOVSXD RDX,dword ptr [RAX + 0x4c]
MOV dword ptr [RCX + RDX*0x4],0xffffffff
MOV RCX,qword ptr [RAX + 0x68]
MOVSXD RDX,dword ptr [RAX + 0x4c]
MOV dword ptr [RCX + RDX*0x4],0xffffffff
MOV RCX,qword ptr [RAX + 0x60]
MOVSXD RDX,dword ptr [RAX + 0x4c]
MOV dword ptr [RCX + RDX*0x4],0x0
MOV ECX,dword ptr [RAX + 0x4c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4c],ECX
ADD RSP,0x58
RET
|
/* LefDefParser::defiPinPort::addPolygon(char const*) */
void __thiscall LefDefParser::defiPinPort::addPolygon(defiPinPort *this,char *param_1)
{
void *pvVar1;
void *pvVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
char *pcVar6;
int local_4c;
int local_2c;
if (*(int *)(this + 0x4c) == *(int *)(this + 0x48)) {
if (*(int *)(this + 0x48) == 0) {
local_4c = 2;
}
else {
local_4c = *(int *)(this + 0x48) << 1;
}
*(int *)(this + 0x48) = local_4c;
pvVar1 = malloc((long)*(int *)(this + 0x48) << 3);
pvVar2 = malloc((long)*(int *)(this + 0x48) << 3);
pvVar3 = malloc((long)*(int *)(this + 0x48) << 2);
pvVar4 = malloc((long)*(int *)(this + 0x48) << 2);
pvVar5 = malloc((long)*(int *)(this + 0x48) << 2);
for (local_2c = 0; local_2c < *(int *)(this + 0x4c); local_2c = local_2c + 1) {
*(int8 *)((long)pvVar1 + (long)local_2c * 8) =
*(int8 *)(*(long *)(this + 0x50) + (long)local_2c * 8);
*(int8 *)((long)pvVar2 + (long)local_2c * 8) =
*(int8 *)(*(long *)(this + 0x70) + (long)local_2c * 8);
*(int4 *)((long)pvVar3 + (long)local_2c * 4) =
*(int4 *)(*(long *)(this + 0x58) + (long)local_2c * 4);
*(int4 *)((long)pvVar4 + (long)local_2c * 4) =
*(int4 *)(*(long *)(this + 0x68) + (long)local_2c * 4);
*(int4 *)((long)pvVar5 + (long)local_2c * 4) =
*(int4 *)(*(long *)(this + 0x60) + (long)local_2c * 4);
}
if (0 < *(int *)(this + 0x4c)) {
free(*(void **)(this + 0x70));
free(*(void **)(this + 0x50));
free(*(void **)(this + 0x58));
free(*(void **)(this + 0x68));
free(*(void **)(this + 0x60));
}
*(void **)(this + 0x50) = pvVar1;
*(void **)(this + 0x70) = pvVar2;
*(void **)(this + 0x58) = pvVar3;
*(void **)(this + 0x68) = pvVar4;
*(void **)(this + 0x60) = pvVar5;
}
pcVar6 = strdup(param_1);
*(char **)(*(long *)(this + 0x50) + (long)*(int *)(this + 0x4c) * 8) = pcVar6;
*(int8 *)(*(long *)(this + 0x70) + (long)*(int *)(this + 0x4c) * 8) = 0;
*(int4 *)(*(long *)(this + 0x58) + (long)*(int *)(this + 0x4c) * 4) = 0xffffffff;
*(int4 *)(*(long *)(this + 0x68) + (long)*(int *)(this + 0x4c) * 4) = 0xffffffff;
*(int4 *)(*(long *)(this + 0x60) + (long)*(int *)(this + 0x4c) * 4) = 0;
*(int *)(this + 0x4c) = *(int *)(this + 0x4c) + 1;
return;
}
|
|
1,155 | pvio_socket_async_read | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
#ifndef _WIN32
int read_flags= MSG_DONTWAIT;
#endif
struct st_pvio_socket *csock= NULL;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef _WIN32
r= recv(csock->socket,(void *)buffer, length, read_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= recv(csock->socket, (char *)buffer, (int)length, 0);
#endif
return r;
} | O0 | c | pvio_socket_async_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movl $0x40, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9bdbc
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9bdc6
movq $-0x1, -0x8(%rbp)
jmp 0x9bdf3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x3baf0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| pvio_socket_async_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_28], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_2C], 40h ; '@'
mov [rbp+var_38], 0
cmp [rbp+var_10], 0
jz short loc_9BDBC
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_9BDC6
loc_9BDBC:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_9BDF3
loc_9BDC6:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call _recv
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_9BDF3:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_async_read(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return recv(*(unsigned int *)*a1, a2, a3, 64LL);
else
return -1LL;
}
| pvio_socket_async_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 qword ptr [RBP + -0x28],-0x1
MOV dword ptr [RBP + -0x2c],0x40
MOV qword ptr [RBP + -0x38],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0019bdbc
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0019bdc6
LAB_0019bdbc:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0019bdf3
LAB_0019bdc6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
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 0x0013baf0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0019bdf3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
ssize_t pvio_socket_async_read(long *param_1,void *param_2,size_t param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = -1;
}
else {
local_10 = recv(*(int *)*param_1,param_2,param_3,0x40);
}
return local_10;
}
|
|
1,156 | pagecache_delete_pages | eloqsql/storage/maria/ma_pagecache.c | my_bool pagecache_delete_pages(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
uint page_count,
enum pagecache_page_lock lock,
my_bool flush)
{
pgcache_page_no_t page_end;
DBUG_ENTER("pagecache_delete_pages");
DBUG_ASSERT(page_count > 0);
page_end= pageno + page_count;
do
{
if (pagecache_delete(pagecache, file, pageno,
lock, flush))
DBUG_RETURN(1);
} while (++pageno != page_end);
DBUG_RETURN(0);
} | O0 | c | pagecache_delete_pages:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movb %al, -0x29(%rbp)
jmp 0x5bd43
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movsbl -0x29(%rbp), %r8d
callq 0x5ba30
cmpb $0x0, %al
je 0x5bd76
jmp 0x5bd70
movb $0x1, -0x1(%rbp)
jmp 0x5bd90
jmp 0x5bd78
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x5bd51
jmp 0x5bd8c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| pagecache_delete_pages:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, r9b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_29], al
jmp short $+2
loc_5BD43:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_24]
add rax, rcx
mov [rbp+var_38], rax
loc_5BD51:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_28]
movsx r8d, [rbp+var_29]
call pagecache_delete
cmp al, 0
jz short loc_5BD76
jmp short $+2
loc_5BD70:
mov [rbp+var_1], 1
jmp short loc_5BD90
loc_5BD76:
jmp short $+2
loc_5BD78:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
cmp rax, [rbp+var_38]
jnz short loc_5BD51
jmp short $+2
loc_5BD8C:
mov [rbp+var_1], 0
loc_5BD90:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char pagecache_delete_pages(_QWORD *a1, long long a2, long long a3, unsigned int a4, unsigned int a5, bool a6)
{
long long v7; // [rsp+8h] [rbp-38h]
long long v10; // [rsp+20h] [rbp-20h]
v10 = a3;
v7 = a4 + a3;
do
{
if ( pagecache_delete(a1, a2, v10, a5, a6) )
return 1;
++v10;
}
while ( v10 != v7 );
return 0;
}
| pagecache_delete_pages:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,R9B
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 dword ptr [RBP + -0x28],R8D
MOV byte ptr [RBP + -0x29],AL
JMP 0x0015bd43
LAB_0015bd43:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0015bd51:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x28]
MOVSX R8D,byte ptr [RBP + -0x29]
CALL 0x0015ba30
CMP AL,0x0
JZ 0x0015bd76
JMP 0x0015bd70
LAB_0015bd70:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015bd90
LAB_0015bd76:
JMP 0x0015bd78
LAB_0015bd78:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,qword ptr [RBP + -0x38]
JNZ 0x0015bd51
JMP 0x0015bd8c
LAB_0015bd8c:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015bd90:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
pagecache_delete_pages
(int8 param_1,int8 param_2,long param_3,uint param_4,int4 param_5,
char param_6)
{
char cVar1;
long local_28;
local_28 = param_3;
do {
cVar1 = pagecache_delete(param_1,param_2,local_28,param_5,(int)param_6);
if (cVar1 != '\0') {
return 1;
}
local_28 = local_28 + 1;
} while (local_28 != param_3 + (ulong)param_4);
return 0;
}
|
|
1,157 | js_reflect_deleteProperty | bluesky950520[P]quickjs/quickjs.c | static JSValue js_reflect_deleteProperty(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj;
JSAtom atom;
int ret;
obj = argv[0];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, argv[1]);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_DeleteProperty(ctx, obj, atom, 0);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O2 | c | js_reflect_deleteProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%r8), %r12
cmpl $-0x1, %r12d
jne 0x6dd0a
movq (%r8), %r13
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq %r15, %rdi
callq 0x21c6c
pushq $0x6
popq %rbx
testl %eax, %eax
je 0x6dd15
movl %eax, %ebp
xorl %r14d, %r14d
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x246a7
movl %eax, %r12d
movq %r15, %rdi
movl %ebp, %esi
callq 0x1e545
testl %r12d, %r12d
js 0x6dd18
setne %al
movzbl %al, %r14d
pushq $0x1
popq %rbx
jmp 0x6dd18
movq %r15, %rdi
callq 0x21191
pushq $0x6
popq %rbx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_reflect_deleteProperty:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r12, [r8+8]
cmp r12d, 0FFFFFFFFh
jnz short loc_6DD0A
mov r13, [r8]
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov rdi, r15
call JS_ValueToAtom
push 6
pop rbx
test eax, eax
jz short loc_6DD15
mov ebp, eax
xor r14d, r14d
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov ecx, eax
xor r8d, r8d
call JS_DeleteProperty
mov r12d, eax
mov rdi, r15
mov esi, ebp
call JS_FreeAtom
test r12d, r12d
js short loc_6DD18
setnz al
movzx r14d, al
push 1
pop rbx
jmp short loc_6DD18
loc_6DD0A:
mov rdi, r15
call JS_ThrowTypeErrorNotAnObject
push 6
pop rbx
loc_6DD15:
xor r14d, r14d
loc_6DD18:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 js_reflect_deleteProperty(
long long a1,
long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // r12
long long v16; // r13
unsigned int v17; // eax
double v18; // xmm4_8
double v19; // xmm5_8
int v20; // ebp
long long v21; // r14
int v22; // r12d
v15 = a5[1];
if ( (_DWORD)v15 != -1 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v14);
return 0LL;
}
v16 = *a5;
v17 = JS_ValueToAtom(a1, a5[2], a5[3]);
if ( !v17 )
return 0LL;
v20 = v17;
v21 = 0LL;
v22 = JS_DeleteProperty(a1, a7, a8, a9, a10, v18, v19, a13, a14, v16, v15, v17, 0);
JS_FreeAtom(a1, v20);
if ( v22 >= 0 )
return v22 != 0;
return v21;
}
| js_reflect_deleteProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R12,qword ptr [R8 + 0x8]
CMP R12D,-0x1
JNZ 0x0016dd0a
MOV R13,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x10]
MOV RDX,qword ptr [R8 + 0x18]
MOV RDI,R15
CALL 0x00121c6c
PUSH 0x6
POP RBX
TEST EAX,EAX
JZ 0x0016dd15
MOV EBP,EAX
XOR R14D,R14D
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV ECX,EAX
XOR R8D,R8D
CALL 0x001246a7
MOV R12D,EAX
MOV RDI,R15
MOV ESI,EBP
CALL 0x0011e545
TEST R12D,R12D
JS 0x0016dd18
SETNZ AL
MOVZX R14D,AL
PUSH 0x1
POP RBX
JMP 0x0016dd18
LAB_0016dd0a:
MOV RDI,R15
CALL 0x00121191
PUSH 0x6
POP RBX
LAB_0016dd15:
XOR R14D,R14D
LAB_0016dd18:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool js_reflect_deleteProperty(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int iVar4;
int8 *in_R8;
uVar1 = in_R8[1];
if ((int)uVar1 == -1) {
uVar2 = *in_R8;
iVar3 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]);
if (iVar3 != 0) {
iVar4 = JS_DeleteProperty(param_1,uVar2,uVar1,iVar3,0);
JS_FreeAtom(param_1,iVar3);
if (iVar4 < 0) {
return false;
}
return iVar4 != 0;
}
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
}
return false;
}
|
|
1,158 | JS_ToInt32SatFree | bluesky950520[P]quickjs/quickjs.c | static int JS_ToInt32SatFree(JSContext *ctx, int *pres, JSValue val)
{
uint32_t tag;
int ret;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
ret = JS_VALUE_GET_INT(val);
break;
case JS_TAG_EXCEPTION:
*pres = 0;
return -1;
case JS_TAG_FLOAT64:
{
double d = JS_VALUE_GET_FLOAT64(val);
if (isnan(d)) {
ret = 0;
} else {
if (d < INT32_MIN)
ret = INT32_MIN;
else if (d > INT32_MAX)
ret = INT32_MAX;
else
ret = (int)d;
}
}
break;
default:
val = JS_ToNumberFree(ctx, val);
if (JS_IsException(val)) {
*pres = 0;
return -1;
}
goto redo;
}
*pres = ret;
return 0;
} | O2 | c | JS_ToInt32SatFree:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $-0x1
popq %rbp
xorl %r15d, %r15d
cmpl $0x4, %ecx
jb 0x20807
cmpl $0x6, %ecx
je 0x2080c
cmpl $0x7, %ecx
je 0x2081c
movq %r14, %rdi
movq %rax, %rsi
movq %rcx, %rdx
callq 0x2d69a
movq %rdx, %rcx
cmpl $0x6, %ecx
jne 0x207e0
jmp 0x2080c
xorl %ebp, %ebp
movl %eax, %r15d
movl %r15d, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %xmm0
xorl %ebp, %ebp
ucomisd %xmm0, %xmm0
jp 0x20854
movl $0x80000000, %r15d # imm = 0x80000000
movsd 0x638a1(%rip), %xmm1 # 0x840d8
ucomisd %xmm0, %xmm1
ja 0x2080c
movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
ucomisd 0x63895(%rip), %xmm0 # 0x840e0
ja 0x2080c
cvttsd2si %xmm0, %r15d
jmp 0x2080c
xorl %r15d, %r15d
jmp 0x2080c
| JS_ToInt32SatFree:
push rbp
push r15
push r14
push rbx
push rax
mov rax, rdx
mov rbx, rsi
mov r14, rdi
push 0FFFFFFFFFFFFFFFFh
pop rbp
xor r15d, r15d
loc_207E0:
cmp ecx, 4
jb short loc_20807
cmp ecx, 6
jz short loc_2080C
cmp ecx, 7
jz short loc_2081C
mov rdi, r14
mov rsi, rax
mov rdx, rcx
call JS_ToNumberFree
mov rcx, rdx
cmp ecx, 6
jnz short loc_207E0
jmp short loc_2080C
loc_20807:
xor ebp, ebp
mov r15d, eax
loc_2080C:
mov [rbx], r15d
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2081C:
movq xmm0, rax
xor ebp, ebp
ucomisd xmm0, xmm0
jp short loc_20854
mov r15d, 80000000h
movsd xmm1, cs:qword_840D8
ucomisd xmm1, xmm0
ja short loc_2080C
mov r15d, 7FFFFFFFh
ucomisd xmm0, cs:qword_840E0
ja short loc_2080C
cvttsd2si r15d, xmm0
jmp short loc_2080C
loc_20854:
xor r15d, r15d
jmp short loc_2080C
| long long JS_ToInt32SatFree(long long a1, int *a2, long long a3, long long a4)
{
unsigned int v5; // ebp
int v6; // r15d
long long v7; // rdx
v5 = -1;
v6 = 0;
while ( 1 )
{
if ( (unsigned int)a4 < 4 )
{
v5 = 0;
v6 = a3;
goto LABEL_8;
}
if ( (_DWORD)a4 == 6 )
goto LABEL_8;
if ( (_DWORD)a4 == 7 )
break;
*(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4));
a4 = v7;
if ( (_DWORD)v7 == 6 )
goto LABEL_8;
}
v5 = 0;
v6 = 0x80000000;
if ( *(double *)&a3 >= -2147483648.0 )
{
v6 = 0x7FFFFFFF;
if ( *(double *)&a3 <= 2147483647.0 )
v6 = (int)*(double *)&a3;
}
LABEL_8:
*a2 = v6;
return v5;
}
| JS_ToInt32SatFree:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,RDX
MOV RBX,RSI
MOV R14,RDI
PUSH -0x1
POP RBP
XOR R15D,R15D
LAB_001207e0:
CMP ECX,0x4
JC 0x00120807
CMP ECX,0x6
JZ 0x0012080c
CMP ECX,0x7
JZ 0x0012081c
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0012d69a
MOV RCX,RDX
CMP ECX,0x6
JNZ 0x001207e0
JMP 0x0012080c
LAB_00120807:
XOR EBP,EBP
MOV R15D,EAX
LAB_0012080c:
MOV dword ptr [RBX],R15D
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012081c:
MOVQ XMM0,RAX
XOR EBP,EBP
UCOMISD XMM0,XMM0
JP 0x00120854
MOV R15D,0x80000000
MOVSD XMM1,qword ptr [0x001840d8]
UCOMISD XMM1,XMM0
JA 0x0012080c
MOV R15D,0x7fffffff
UCOMISD XMM0,qword ptr [0x001840e0]
JA 0x0012080c
CVTTSD2SI R15D,XMM0
JMP 0x0012080c
LAB_00120854:
XOR R15D,R15D
JMP 0x0012080c
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 JS_ToInt32SatFree(int8 param_1,int *param_2,int8 param_3,int8 param_4)
{
double dVar1;
uint uVar2;
int4 uVar3;
int iVar4;
int1 auVar5 [16];
auVar5._8_8_ = param_4;
auVar5._0_8_ = param_3;
uVar3 = 0xffffffff;
iVar4 = 0;
while( true ) {
dVar1 = auVar5._0_8_;
uVar2 = auVar5._8_4_;
if (uVar2 < 4) {
uVar3 = 0;
iVar4 = auVar5._0_4_;
goto LAB_0012080c;
}
if (uVar2 == 6) goto LAB_0012080c;
if (uVar2 == 7) break;
auVar5 = JS_ToNumberFree(param_1,dVar1,auVar5._8_8_);
if (auVar5._8_4_ == 6) {
LAB_0012080c:
*param_2 = iVar4;
return uVar3;
}
}
if (NAN(dVar1)) {
iVar4 = 0;
uVar3 = 0;
}
else {
iVar4 = -0x80000000;
uVar3 = 0;
if ((DAT_001840d8 <= dVar1) && (iVar4 = 0x7fffffff, dVar1 <= _DAT_001840e0)) {
iVar4 = (int)dVar1;
uVar3 = 0;
}
}
goto LAB_0012080c;
}
|
|
1,159 | void testing::internal::InitGoogleTestImpl<char>(int*, char**) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void InitGoogleTestImpl(int* argc, CharType** argv) {
// We don't want to run the initialization code twice.
if (GTestIsInitialized()) return;
if (*argc <= 0) return;
g_argvs.clear();
for (int i = 0; i != *argc; i++) {
g_argvs.push_back(StreamableToString(argv[i]));
}
#if GTEST_HAS_ABSL
absl::InitializeSymbolizer(g_argvs[0].c_str());
// When using the Abseil Flags library, set the program usage message to the
// help message, but remove the color-encoding from the message first.
absl::SetProgramUsageMessage(absl::StrReplaceAll(
kColorEncodedHelpMessage,
{{"@D", ""}, {"@R", ""}, {"@G", ""}, {"@Y", ""}, {"@@", "@"}}));
#endif // GTEST_HAS_ABSL
ParseGoogleTestFlagsOnly(argc, argv);
GetUnitTestImpl()->PostFlagParsingInit();
} | O1 | cpp | void testing::internal::InitGoogleTestImpl<char>(int*, char**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x412549f(%rip), %rsi # 0x415df00
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x35632
movq 0x8(%r15), %rbx
movq (%r15), %r12
movq %r15, %rdi
callq 0x3538e
cmpq %r12, %rbx
jne 0x38b1d
cmpl $0x0, (%r14)
jle 0x38b1d
movq %r13, (%rsp)
movq 0x4125465(%rip), %rsi # 0x415df00
leaq 0x412545e(%rip), %rdi # 0x415df00
callq 0x3f826
cmpl $0x0, (%r14)
je 0x38b00
leaq 0x18(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
leaq 0x4125440(%rip), %r12 # 0x415df00
movq (%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x3f727
movq %r12, %rdi
movq %r15, %rsi
callq 0x3d3ae
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x38af1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
incq %rbx
movl (%r14), %eax
addq $0x8, %r13
cmpq %rax, %rbx
jne 0x38ac4
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x38722
callq 0x1d29e
movq 0x4125448(%rip), %rdi # 0x415df60
callq 0x321a6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x38b46
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
| _ZN7testing8internal18InitGoogleTestImplIcEEvPiPPT_:
push rbp
push r15
push r14
push r13
push r12; __int64
push rbx; int
sub rsp, 28h
mov r13, rsi
mov r14, rdi
lea rsi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs
lea r15, [rsp+58h+var_50]
mov rdi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov rbx, [r15+8]
mov r12, [r15]
mov rdi, r15; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
cmp rbx, r12
jnz loc_38B1D
cmp dword ptr [r14], 0
jle loc_38B1D
mov qword ptr [rsp+58h+var_58], r13; int
mov rsi, qword ptr cs:_ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs
lea rdi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE15_M_erase_at_endEPS5_; std::vector<std::string>::_M_erase_at_end(std::string*)
cmp dword ptr [r14], 0
jz short loc_38B00
lea rbp, [rsp+58h+var_40]
xor ebx, ebx
lea r15, [rsp+58h+var_50]
lea r12, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs
mov r13, qword ptr [rsp+58h+var_58]
loc_38AC4:
mov rdi, r15
mov rsi, r13
call _ZN7testing8internal18StreamableToStringIPcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<char *>(char * const&)
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_38AF1
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_38AF1:
inc rbx
mov eax, [r14]
add r13, 8
cmp rbx, rax
jnz short loc_38AC4
loc_38B00:
mov rdi, r14; this
mov rsi, qword ptr [rsp+58h+var_58]; int
call _ZN7testing8internal28ParseGoogleTestFlagsOnlyImplIcEEvPiPPT_; testing::internal::ParseGoogleTestFlagsOnlyImpl<char>(int *,char **)
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rdi, cs:qword_415DF60; this
call _ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv; testing::internal::UnitTestImpl::PostFlagParsingInit(void)
loc_38B1D:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_38B46
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_38B46:
mov rdi, rbx
call __Unwind_Resume
| void testing::internal::InitGoogleTestImpl<char>(
testing::UnitTest *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
const char *v10; // r13
void *v11; // rbx
void *v12; // r12
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rbx
void *v16[2]; // [rsp+8h] [rbp-50h] BYREF
long long v17; // [rsp+18h] [rbp-40h] BYREF
v10 = a2;
std::vector<std::string>::vector((long long)v16, &testing::internal::g_argvs[abi:cxx11]);
v11 = v16[1];
v12 = v16[0];
std::vector<std::string>::~vector(v16);
if ( v11 == v12 && *(int *)this > 0 )
{
std::vector<std::string>::_M_erase_at_end(
&testing::internal::g_argvs[abi:cxx11],
testing::internal::g_argvs[abi:cxx11]);
if ( *(_DWORD *)this )
{
v15 = 0LL;
do
{
testing::internal::StreamableToString<char *>(v16, v10);
std::vector<std::string>::emplace_back<std::string>(&testing::internal::g_argvs[abi:cxx11], v16);
if ( v16[0] != &v17 )
operator delete(v16[0], v17 + 1);
++v15;
v10 += 8;
}
while ( v15 != *(_DWORD *)this );
}
testing::internal::ParseGoogleTestFlagsOnlyImpl<char>(this, a2, a3, a4, a5, a6, v13, v14, a9, a10);
testing::UnitTest::GetInstance(this);
testing::internal::UnitTestImpl::PostFlagParsingInit(qword_415DF60);
}
}
| InitGoogleTestImpl<char>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R13,RSI
MOV R14,RDI
LEA RSI,[0x425df00]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00135632
MOV RBX,qword ptr [R15 + 0x8]
MOV R12,qword ptr [R15]
MOV RDI,R15
CALL 0x0013538e
CMP RBX,R12
JNZ 0x00138b1d
CMP dword ptr [R14],0x0
JLE 0x00138b1d
MOV qword ptr [RSP],R13
MOV RSI,qword ptr [0x0425df00]
LEA RDI,[0x425df00]
CALL 0x0013f826
CMP dword ptr [R14],0x0
JZ 0x00138b00
LEA RBP,[RSP + 0x18]
XOR EBX,EBX
LEA R15,[RSP + 0x8]
LEA R12,[0x425df00]
MOV R13,qword ptr [RSP]
LAB_00138ac4:
MOV RDI,R15
MOV RSI,R13
CALL 0x0013f727
LAB_00138acf:
MOV RDI,R12
MOV RSI,R15
CALL 0x0013d3ae
LAB_00138ada:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00138af1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_00138af1:
INC RBX
MOV EAX,dword ptr [R14]
ADD R13,0x8
CMP RBX,RAX
JNZ 0x00138ac4
LAB_00138b00:
MOV RDI,R14
MOV RSI,qword ptr [RSP]
CALL 0x00138722
CALL 0x0011d29e
MOV RDI,qword ptr [0x0425df60]
CALL 0x001321a6
LAB_00138b1d:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void testing::internal::InitGoogleTestImpl<char>(int*, char**) */
void testing::internal::InitGoogleTestImpl<char>(int *param_1,char **param_2)
{
long *plVar1;
ulong uVar2;
char **ppcVar3;
long *local_50;
long *local_48;
long local_40 [2];
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_50,
(vector *)&g_argvs_abi_cxx11_);
plVar1 = local_50;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_50);
if ((local_48 == plVar1) && (0 < *param_1)) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_erase_at_end
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
&g_argvs_abi_cxx11_,g_argvs_abi_cxx11_);
if (*param_1 != 0) {
uVar2 = 0;
ppcVar3 = param_2;
do {
StreamableToString<char*>((internal *)&local_50,ppcVar3);
/* try { // try from 00138acf to 00138ad9 has its CatchHandler @ 00138b2c */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
&g_argvs_abi_cxx11_,(string *)&local_50);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
uVar2 = uVar2 + 1;
ppcVar3 = ppcVar3 + 1;
} while (uVar2 != (uint)*param_1);
}
ParseGoogleTestFlagsOnlyImpl<char>(param_1,param_2);
UnitTest::GetInstance();
UnitTestImpl::PostFlagParsingInit((UnitTestImpl *)UnitTest::GetInstance()::instance._64_8_);
}
return;
}
|
|
1,160 | exchange_int128s | bluesky950520[P]quickjs/cutils.c | static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
} | O0 | c | exchange_int128s:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
shrq $0x4, %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x21261
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rsp)
movq -0x28(%rsp), %rax
movq (%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movq -0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, (%rax)
movq -0x38(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rsp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rsp)
movq -0x28(%rsp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rsp)
jmp 0x211d1
retq
nopw %cs:(%rax,%rax)
| exchange_int128s:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_8]
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov rax, [rsp+var_18]
shr rax, 4
mov [rsp+var_18], rax
loc_211D1:
mov rax, [rsp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_18], rcx
cmp rax, 0
jz short locret_21261
mov rax, [rsp+var_20]
mov rax, [rax]
mov [rsp+var_30], rax
mov rax, [rsp+var_20]
mov rax, [rax+8]
mov [rsp+var_38], rax
mov rax, [rsp+var_28]
mov rcx, [rax]
mov rax, [rsp+var_20]
mov [rax], rcx
mov rax, [rsp+var_28]
mov rcx, [rax+8]
mov rax, [rsp+var_20]
mov [rax+8], rcx
mov rcx, [rsp+var_30]
mov rax, [rsp+var_28]
mov [rax], rcx
mov rcx, [rsp+var_38]
mov rax, [rsp+var_28]
mov [rax+8], rcx
mov rax, [rsp+var_20]
add rax, 10h
mov [rsp+var_20], rax
mov rax, [rsp+var_28]
add rax, 10h
mov [rsp+var_28], rax
jmp loc_211D1
locret_21261:
retn
| long long exchange_int128s(long long *a1, long long *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // [rsp+0h] [rbp-38h]
long long v5; // [rsp+8h] [rbp-30h]
unsigned long long v8; // [rsp+20h] [rbp-18h]
v8 = a3 >> 4;
while ( 1 )
{
result = v8--;
if ( !result )
break;
v5 = *a1;
v4 = a1[1];
*a1 = *a2;
a1[1] = a2[1];
*a2 = v5;
a2[1] = v4;
a1 += 2;
a2 += 2;
}
return result;
}
| exchange_int128s:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x18]
SHR RAX,0x4
MOV qword ptr [RSP + -0x18],RAX
LAB_001211d1:
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x18],RCX
CMP RAX,0x0
JZ 0x00121261
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x38],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + -0x30]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x10
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x28]
ADD RAX,0x10
MOV qword ptr [RSP + -0x28],RAX
JMP 0x001211d1
LAB_00121261:
RET
|
void exchange_int128s(int8 *param_1,int8 *param_2,ulong param_3)
{
int8 uVar1;
int8 uVar2;
int8 *local_28;
int8 *local_20;
ulong local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3 >> 4;
while (local_18 != 0) {
uVar1 = *local_20;
uVar2 = local_20[1];
*local_20 = *local_28;
local_20[1] = local_28[1];
*local_28 = uVar1;
local_28[1] = uVar2;
local_20 = local_20 + 2;
local_28 = local_28 + 2;
local_18 = local_18 - 1;
}
return;
}
|
|
1,161 | exchange_int128s | bluesky950520[P]quickjs/cutils.c | static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
} | O1 | c | exchange_int128s:
cmpq $0x10, %rdx
jb 0x1c8d8
shrq $0x4, %rdx
xorl %eax, %eax
movq (%rsi,%rax), %rcx
movups (%rdi,%rax), %xmm0
movq %rcx, (%rdi,%rax)
movq 0x8(%rsi,%rax), %rcx
movq %rcx, 0x8(%rdi,%rax)
movups %xmm0, (%rsi,%rax)
addq $0x10, %rax
decq %rdx
jne 0x1c8b5
retq
| exchange_int128s:
cmp rdx, 10h
jb short locret_1C8D8
shr rdx, 4
xor eax, eax
loc_1C8B5:
mov rcx, [rsi+rax]
movups xmm0, xmmword ptr [rdi+rax]
mov [rdi+rax], rcx
mov rcx, [rsi+rax+8]
mov [rdi+rax+8], rcx
movups xmmword ptr [rsi+rax], xmm0
add rax, 10h
dec rdx
jnz short loc_1C8B5
locret_1C8D8:
retn
| void exchange_int128s(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long v4; // rax
__int128 v5; // xmm0
if ( a3 >= 0x10 )
{
v3 = a3 >> 4;
v4 = 0LL;
do
{
v5 = *(_OWORD *)(a1 + v4);
*(_QWORD *)(a1 + v4) = *(_QWORD *)(a2 + v4);
*(_QWORD *)(a1 + v4 + 8) = *(_QWORD *)(a2 + v4 + 8);
*(_OWORD *)(a2 + v4) = v5;
v4 += 16LL;
--v3;
}
while ( v3 );
}
}
| |||
1,162 | exchange_int128s | bluesky950520[P]quickjs/cutils.c | static void exchange_int128s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t) * 2; size-- != 0; ap += 2, bp += 2) {
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
} | O2 | c | exchange_int128s:
shrq $0x4, %rdx
xorl %eax, %eax
subq $0x1, %rdx
jb 0x16ee8
movq (%rsi,%rax), %rcx
movups (%rdi,%rax), %xmm0
movq %rcx, (%rdi,%rax)
movq 0x8(%rsi,%rax), %rcx
movq %rcx, 0x8(%rdi,%rax)
movups %xmm0, (%rsi,%rax)
addq $0x10, %rax
jmp 0x16ec2
retq
| exchange_int128s:
shr rdx, 4
xor eax, eax
loc_16EC2:
sub rdx, 1
jb short locret_16EE8
mov rcx, [rsi+rax]
movups xmm0, xmmword ptr [rdi+rax]
mov [rdi+rax], rcx
mov rcx, [rsi+rax+8]
mov [rdi+rax+8], rcx
movups xmmword ptr [rsi+rax], xmm0
add rax, 10h
jmp short loc_16EC2
locret_16EE8:
retn
| long long exchange_int128s(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long result; // rax
__int128 v6; // xmm0
v3 = a3 >> 4;
for ( result = 0LL; v3-- != 0; result += 16LL )
{
v6 = *(_OWORD *)(a1 + result);
*(_QWORD *)(a1 + result) = *(_QWORD *)(a2 + result);
*(_QWORD *)(a1 + result + 8) = *(_QWORD *)(a2 + result + 8);
*(_OWORD *)(a2 + result) = v6;
}
return result;
}
| exchange_int128s:
SHR RDX,0x4
XOR EAX,EAX
LAB_00116ec2:
SUB RDX,0x1
JC 0x00116ee8
MOV RCX,qword ptr [RSI + RAX*0x1]
MOVUPS XMM0,xmmword ptr [RDI + RAX*0x1]
MOV qword ptr [RDI + RAX*0x1],RCX
MOV RCX,qword ptr [RSI + RAX*0x1 + 0x8]
MOV qword ptr [RDI + RAX*0x1 + 0x8],RCX
MOVUPS xmmword ptr [RSI + RAX*0x1],XMM0
ADD RAX,0x10
JMP 0x00116ec2
LAB_00116ee8:
RET
|
void exchange_int128s(long param_1,long param_2,ulong param_3)
{
int8 uVar1;
int8 uVar2;
long lVar3;
bool bVar4;
param_3 = param_3 >> 4;
lVar3 = 0;
while (bVar4 = param_3 != 0, param_3 = param_3 - 1, bVar4) {
uVar1 = *(int8 *)(param_1 + lVar3);
uVar2 = ((int8 *)(param_1 + lVar3))[1];
*(int8 *)(param_1 + lVar3) = *(int8 *)(param_2 + lVar3);
*(int8 *)(param_1 + 8 + lVar3) = *(int8 *)(param_2 + 8 + lVar3);
*(int8 *)(param_2 + lVar3) = uVar1;
((int8 *)(param_2 + lVar3))[1] = uVar2;
lVar3 = lVar3 + 0x10;
}
return;
}
|
|
1,163 | mysql_reset_connection | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int STDCALL mysql_reset_connection(MYSQL *mysql)
{
int rc;
/* check if connection handler is active */
if (IS_CONNHDLR_ACTIVE(mysql))
{
if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reset)
return(mysql->extension->conn_hdlr->plugin->reset(mysql));
}
/* skip result sets */
if (mysql->status == MYSQL_STATUS_USE_RESULT ||
mysql->status == MYSQL_STATUS_GET_RESULT ||
mysql->status & SERVER_MORE_RESULTS_EXIST)
{
mthd_my_skip_result(mysql);
mysql->status= MYSQL_STATUS_READY;
}
rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0);
if (rc && mysql->options.reconnect)
{
/* There is no big sense in resetting but we need reconnect */
rc= ma_simple_command(mysql, COM_RESET_CONNECTION,0,0,0,0);
}
if (rc)
return 1;
/* reset the connection in all active statements */
ma_invalidate_stmts(mysql, "mysql_reset_connection()");
free_old_query(mysql);
mysql->status= MYSQL_STATUS_READY;
mysql->affected_rows= ~(my_ulonglong)0;
mysql->insert_id= 0;
return 0;
} | O0 | c | mysql_reset_connection:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x4f0(%rax)
je 0x27782
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
cmpq $0x0, (%rax)
je 0x27782
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x27780
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, 0x80(%rax)
je 0x27780
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x80(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x27874
jmp 0x27782
movq -0x10(%rbp), %rax
cmpl $0x2, 0x488(%rax)
je 0x277ae
movq -0x10(%rbp), %rax
cmpl $0x1, 0x488(%rax)
je 0x277ae
movq -0x10(%rbp), %rax
movl 0x488(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x277c5
movq -0x10(%rbp), %rdi
callq 0x1bd50
movq -0x10(%rbp), %rax
movl $0x0, 0x488(%rax)
movq -0x10(%rbp), %rdi
movl $0x1f, %esi
xorl %eax, %eax
movl %eax, %r9d
xorl %r8d, %r8d
movq %r9, %rdx
movq %r9, %rcx
callq 0x1bad0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x27819
movq -0x10(%rbp), %rax
movsbl 0x43b(%rax), %eax
cmpl $0x0, %eax
je 0x27819
movq -0x10(%rbp), %rdi
movl $0x1f, %esi
xorl %eax, %eax
movl %eax, %r9d
xorl %r8d, %r8d
movq %r9, %rdx
movq %r9, %rcx
callq 0x1bad0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x27828
movl $0x1, -0x4(%rbp)
jmp 0x27874
movq -0x10(%rbp), %rdi
leaq 0x29f25(%rip), %rsi # 0x51758
callq 0x22880
movq -0x10(%rbp), %rdi
callq 0x22e20
movq -0x10(%rbp), %rax
movl $0x0, 0x488(%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0x338(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x340(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_reset_connection:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+4F0h], 0
jz short loc_27782
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
cmp qword ptr [rax], 0
jz short loc_27782
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
mov rax, [rax]
cmp qword ptr [rax], 0
jz short loc_27780
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
cmp qword ptr [rax+80h], 0
jz short loc_27780
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+80h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp loc_27874
loc_27780:
jmp short $+2
loc_27782:
mov rax, [rbp+var_10]
cmp dword ptr [rax+488h], 2
jz short loc_277AE
mov rax, [rbp+var_10]
cmp dword ptr [rax+488h], 1
jz short loc_277AE
mov rax, [rbp+var_10]
mov eax, [rax+488h]
and eax, 8
cmp eax, 0
jz short loc_277C5
loc_277AE:
mov rdi, [rbp+var_10]
call mthd_my_skip_result
mov rax, [rbp+var_10]
mov dword ptr [rax+488h], 0
loc_277C5:
mov rdi, [rbp+var_10]
mov esi, 1Fh
xor eax, eax
mov r9d, eax
xor r8d, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_27819
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+43Bh]
cmp eax, 0
jz short loc_27819
mov rdi, [rbp+var_10]
mov esi, 1Fh
xor eax, eax
mov r9d, eax
xor r8d, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
mov [rbp+var_14], eax
loc_27819:
cmp [rbp+var_14], 0
jz short loc_27828
mov [rbp+var_4], 1
jmp short loc_27874
loc_27828:
mov rdi, [rbp+var_10]
lea rsi, aMysqlResetConn; "mysql_reset_connection()"
call ma_invalidate_stmts
mov rdi, [rbp+var_10]
call free_old_query
mov rax, [rbp+var_10]
mov dword ptr [rax+488h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov qword ptr [rax+340h], 0
mov [rbp+var_4], 0
loc_27874:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mysql_reset_connection(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
int v7; // [rsp+Ch] [rbp-14h]
if ( *(_QWORD *)(a1 + 1264)
&& **(_QWORD **)(a1 + 1264)
&& ***(_QWORD ***)(a1 + 1264)
&& *(_QWORD *)(***(_QWORD ***)(a1 + 1264) + 128LL) )
{
return (unsigned int)(*(long long ( **)(long long))(***(_QWORD ***)(a1 + 1264) + 128LL))(a1);
}
else
{
if ( *(_DWORD *)(a1 + 1160) == 2 || *(_DWORD *)(a1 + 1160) == 1 || (*(_DWORD *)(a1 + 1160) & 8) != 0 )
{
mthd_my_skip_result(a1, a2, a3, a4, a5, a6);
*(_DWORD *)(a1 + 1160) = 0;
}
v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL);
if ( v7 && *(_BYTE *)(a1 + 1083) )
v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL);
if ( v7 )
{
return 1;
}
else
{
ma_invalidate_stmts(a1, (long long)"mysql_reset_connection()");
free_old_query(a1);
*(_DWORD *)(a1 + 1160) = 0;
*(_QWORD *)(a1 + 824) = -1LL;
*(_QWORD *)(a1 + 832) = 0LL;
return 0;
}
}
}
| mysql_reset_connection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x4f0],0x0
JZ 0x00127782
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
CMP qword ptr [RAX],0x0
JZ 0x00127782
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX],0x0
JZ 0x00127780
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x00127780
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00127874
LAB_00127780:
JMP 0x00127782
LAB_00127782:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x488],0x2
JZ 0x001277ae
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x488],0x1
JZ 0x001277ae
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x488]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001277c5
LAB_001277ae:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011bd50
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x488],0x0
LAB_001277c5:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1f
XOR EAX,EAX
MOV R9D,EAX
XOR R8D,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x0011bad0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00127819
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x43b]
CMP EAX,0x0
JZ 0x00127819
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1f
XOR EAX,EAX
MOV R9D,EAX
XOR R8D,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x0011bad0
MOV dword ptr [RBP + -0x14],EAX
LAB_00127819:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00127828
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00127874
LAB_00127828:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x151758]
CALL 0x00122880
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122e20
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x488],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x338],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x340],0x0
MOV dword ptr [RBP + -0x4],0x0
LAB_00127874:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 mysql_reset_connection(long param_1)
{
int local_1c;
int4 local_c;
if ((((*(long *)(param_1 + 0x4f0) == 0) || (**(long **)(param_1 + 0x4f0) == 0)) ||
(*(long *)**(int8 **)(param_1 + 0x4f0) == 0)) ||
(*(long *)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80) == 0)) {
if (((*(int *)(param_1 + 0x488) == 2) || (*(int *)(param_1 + 0x488) == 1)) ||
((*(uint *)(param_1 + 0x488) & 8) != 0)) {
mthd_my_skip_result(param_1);
*(int4 *)(param_1 + 0x488) = 0;
}
local_1c = ma_simple_command(param_1,0x1f,0,0,0);
if ((local_1c != 0) && (*(char *)(param_1 + 0x43b) != '\0')) {
local_1c = ma_simple_command(param_1,0x1f,0,0,0);
}
if (local_1c == 0) {
ma_invalidate_stmts(param_1,"mysql_reset_connection()");
free_old_query(param_1);
*(int4 *)(param_1 + 0x488) = 0;
*(int8 *)(param_1 + 0x338) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0x340) = 0;
local_c = 0;
}
else {
local_c = 1;
}
}
else {
local_c = (**(code **)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80))(param_1);
}
return local_c;
}
|
|
1,164 | ma_pvio_tls_check_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | my_bool ma_pvio_tls_check_fp(MARIADB_TLS *ctls, const char *fp, const char *fp_list)
{
unsigned int cert_fp_len= 64;
char *cert_fp= NULL;
my_bool rc=1;
MYSQL *mysql= ctls->pvio->mysql;
cert_fp= (char *)malloc(cert_fp_len);
if ((cert_fp_len= ma_tls_get_finger_print(ctls, cert_fp, cert_fp_len)) < 1)
goto end;
if (fp)
rc= ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, fp, (unsigned int)strlen(fp));
else if (fp_list)
{
MA_FILE *fp;
char buff[255];
if (!(fp = ma_open(fp_list, "r", mysql)))
goto end;
while (ma_gets(buff, sizeof(buff)-1, fp))
{
/* remove trailing new line character */
char *pos= strchr(buff, '\r');
if (!pos)
pos= strchr(buff, '\n');
if (pos)
*pos= '\0';
if (!ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, buff, (unsigned int)strlen(buff)))
{
/* finger print is valid: close file and exit */
ma_close(fp);
rc= 0;
goto end;
}
}
/* No finger print matched - close file and return error */
ma_close(fp);
}
end:
if (cert_fp)
free(cert_fp);
if (rc)
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR),
"Fingerprint verification of server certificate failed");
}
return rc;
} | O3 | c | ma_pvio_tls_check_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rdi), %rax
movq 0x40(%rax), %rax
movq %rax, -0x138(%rbp)
movl $0x40, %edi
callq 0x5faf0
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
movl $0x40, %edx
callq 0x85edb
movb $0x1, %r13b
testl %eax, %eax
je 0x7b104
movl %eax, %r15d
testq %r12, %r12
je 0x7b170
movq %r12, %rdi
callq 0x5f480
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
callq 0x7b214
movl %eax, %r13d
testq %r14, %r14
je 0x7b111
movq %r14, %rdi
callq 0x5f1d0
testb %r13b, %r13b
je 0x7b148
leaq 0x369e03(%rip), %rax # 0x3e4f20
movq (%rax), %rdx
leaq 0x369e09(%rip), %rax # 0x3e4f30
movq 0xd0(%rax), %rcx
leaq 0x9447d(%rip), %r8 # 0x10f5b2
movq -0x138(%rbp), %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
callq 0x72dd1
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x7b20f
movl %r13d, %eax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
je 0x7b104
leaq 0x94907(%rip), %rsi # 0x10fa83
movq %rbx, %rdi
movq -0x138(%rbp), %rdx
callq 0x85180
testq %rax, %rax
je 0x7b1f7
movq %rax, %r12
leaq -0x130(%rbp), %r13
movl $0xfe, %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0x85357
testq %rax, %rax
je 0x7b1ff
movq %r13, %rdi
movl $0xd, %esi
callq 0x5f5b0
testq %rax, %rax
jne 0x7b1d3
movq %r13, %rdi
movl $0xa, %esi
callq 0x5f5b0
testq %rax, %rax
je 0x7b1d6
movb $0x0, (%rax)
movq %r13, %rdi
callq 0x5f480
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
movl %eax, %ecx
callq 0x7b214
testb %al, %al
jne 0x7b19a
xorl %r13d, %r13d
jmp 0x7b202
movb $0x1, %r13b
jmp 0x7b104
movb $0x1, %r13b
movq %r12, %rdi
callq 0x8528c
jmp 0x7b104
callq 0x5f320
| ma_pvio_tls_check_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov rbx, rdx
mov r12, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+8]
mov rax, [rax+40h]
mov [rbp+var_138], rax
mov edi, 40h ; '@'
call _malloc
mov r14, rax
mov rdi, r15
mov rsi, rax
mov edx, 40h ; '@'
call ma_tls_get_finger_print
mov r13b, 1
test eax, eax
jz short loc_7B104
mov r15d, eax
test r12, r12
jz loc_7B170
mov rdi, r12
call _strlen
mov rdi, r14
mov esi, r15d
mov rdx, r12
mov ecx, eax
call ma_pvio_tls_compare_fp
mov r13d, eax
loc_7B104:
test r14, r14
jz short loc_7B111
mov rdi, r14
call _free
loc_7B111:
test r13b, r13b
jz short loc_7B148
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aFingerprintVer; "Fingerprint verification of server cert"...
mov rdi, [rbp+var_138]
mov esi, 7EAh
xor eax, eax
call my_set_error
loc_7B148:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_7B20F
mov eax, r13d
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7B170:
test rbx, rbx
jz short loc_7B104
lea rsi, aKoi8r+4; "r"
mov rdi, rbx
mov rdx, [rbp+var_138]
call ma_open
test rax, rax
jz short loc_7B1F7
mov r12, rax
lea r13, [rbp+var_130]
loc_7B19A:
mov esi, 0FEh
mov rdi, r13
mov rdx, r12
call ma_gets
test rax, rax
jz short loc_7B1FF
mov rdi, r13
mov esi, 0Dh
call _strchr
test rax, rax
jnz short loc_7B1D3
mov rdi, r13
mov esi, 0Ah
call _strchr
test rax, rax
jz short loc_7B1D6
loc_7B1D3:
mov byte ptr [rax], 0
loc_7B1D6:
mov rdi, r13
call _strlen
mov rdi, r14
mov esi, r15d
mov rdx, r13
mov ecx, eax
call ma_pvio_tls_compare_fp
test al, al
jnz short loc_7B19A
xor r13d, r13d
jmp short loc_7B202
loc_7B1F7:
mov r13b, 1
jmp loc_7B104
loc_7B1FF:
mov r13b, 1
loc_7B202:
mov rdi, r12
call ma_close
jmp loc_7B104
loc_7B20F:
call ___stack_chk_fail
| long long ma_pvio_tls_check_fp(long long a1, long long a2, long long a3)
{
_BYTE *v3; // r13
long long v5; // r14
unsigned int finger_print; // eax
unsigned int v7; // r15d
unsigned int v8; // eax
long long v10; // rax
long long v11; // r12
long long v12; // rdx
long long v13; // rcx
_BYTE *v14; // rax
long long v15; // rdx
long long v16; // rcx
unsigned int v17; // eax
long long v18; // [rsp+8h] [rbp-138h]
_BYTE v19[256]; // [rsp+10h] [rbp-130h] BYREF
unsigned long long v20; // [rsp+110h] [rbp-30h]
v20 = __readfsqword(0x28u);
v18 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 64LL);
v5 = malloc(64LL);
finger_print = ma_tls_get_finger_print(a1, v5, 64LL);
LOBYTE(v3) = 1;
if ( finger_print )
{
v7 = finger_print;
if ( a2 )
{
v8 = strlen(a2);
LODWORD(v3) = ma_pvio_tls_compare_fp(v5, v7, a2, v8);
}
else if ( a3 )
{
v10 = ma_open(a3, "r", v18);
if ( v10 )
{
v11 = v10;
v3 = v19;
while ( ma_gets(v19, 254LL, v11) )
{
v14 = (_BYTE *)strchr(v19, 13LL, v12, v13);
if ( v14 || (v14 = (_BYTE *)strchr(v19, 10LL, v15, v16)) != 0LL )
*v14 = 0;
v17 = strlen(v19);
if ( !(unsigned __int8)ma_pvio_tls_compare_fp(v5, v7, v19, v17) )
{
LODWORD(v3) = 0;
goto LABEL_20;
}
}
LOBYTE(v3) = 1;
LABEL_20:
ma_close(v11);
}
else
{
LOBYTE(v3) = 1;
}
}
}
if ( v5 )
free(v5);
if ( (_BYTE)v3 )
my_set_error(
v18,
2026,
(long long)SQLSTATE_UNKNOWN,
client_errors[26],
"Fingerprint verification of server certificate failed");
return (unsigned int)v3;
}
| ma_pvio_tls_check_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV RBX,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x138],RAX
MOV EDI,0x40
CALL 0x0015faf0
MOV R14,RAX
MOV RDI,R15
MOV RSI,RAX
MOV EDX,0x40
CALL 0x00185edb
MOV R13B,0x1
TEST EAX,EAX
JZ 0x0017b104
MOV R15D,EAX
TEST R12,R12
JZ 0x0017b170
MOV RDI,R12
CALL 0x0015f480
MOV RDI,R14
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
CALL 0x0017b214
MOV R13D,EAX
LAB_0017b104:
TEST R14,R14
JZ 0x0017b111
MOV RDI,R14
CALL 0x0015f1d0
LAB_0017b111:
TEST R13B,R13B
JZ 0x0017b148
LEA RAX,[0x4e4f20]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x4e4f30]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x20f5b2]
MOV RDI,qword ptr [RBP + -0x138]
MOV ESI,0x7ea
XOR EAX,EAX
CALL 0x00172dd1
LAB_0017b148:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017b20f
MOV EAX,R13D
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017b170:
TEST RBX,RBX
JZ 0x0017b104
LEA RSI,[0x20fa83]
MOV RDI,RBX
MOV RDX,qword ptr [RBP + -0x138]
CALL 0x00185180
TEST RAX,RAX
JZ 0x0017b1f7
MOV R12,RAX
LEA R13,[RBP + -0x130]
LAB_0017b19a:
MOV ESI,0xfe
MOV RDI,R13
MOV RDX,R12
CALL 0x00185357
TEST RAX,RAX
JZ 0x0017b1ff
MOV RDI,R13
MOV ESI,0xd
CALL 0x0015f5b0
TEST RAX,RAX
JNZ 0x0017b1d3
MOV RDI,R13
MOV ESI,0xa
CALL 0x0015f5b0
TEST RAX,RAX
JZ 0x0017b1d6
LAB_0017b1d3:
MOV byte ptr [RAX],0x0
LAB_0017b1d6:
MOV RDI,R13
CALL 0x0015f480
MOV RDI,R14
MOV ESI,R15D
MOV RDX,R13
MOV ECX,EAX
CALL 0x0017b214
TEST AL,AL
JNZ 0x0017b19a
XOR R13D,R13D
JMP 0x0017b202
LAB_0017b1f7:
MOV R13B,0x1
JMP 0x0017b104
LAB_0017b1ff:
MOV R13B,0x1
LAB_0017b202:
MOV RDI,R12
CALL 0x0018528c
JMP 0x0017b104
LAB_0017b20f:
CALL 0x0015f320
|
int4 ma_pvio_tls_check_fp(long param_1,char *param_2,long param_3)
{
int8 uVar1;
char cVar2;
int iVar3;
int4 uVar4;
void *__ptr;
size_t sVar5;
long lVar6;
long lVar7;
char *pcVar8;
int8 unaff_R13;
int7 uVar9;
long in_FS_OFFSET;
char local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = *(int8 *)(*(long *)(param_1 + 8) + 0x40);
__ptr = malloc(0x40);
iVar3 = ma_tls_get_finger_print(param_1,__ptr,0x40);
uVar9 = (int7)((ulong)unaff_R13 >> 8);
uVar4 = (int4)CONCAT71(uVar9,1);
if (iVar3 != 0) {
if (param_2 == (char *)0x0) {
if (param_3 != 0) {
lVar6 = ma_open(param_3,&DAT_0020fa83,uVar1);
if (lVar6 == 0) {
uVar4 = (int4)CONCAT71(uVar9,1);
}
else {
do {
lVar7 = ma_gets(local_138,0xfe,lVar6);
if (lVar7 == 0) {
uVar4 = (int4)CONCAT71((int7)((ulong)local_138 >> 8),1);
goto LAB_0017b202;
}
pcVar8 = strchr(local_138,0xd);
if (pcVar8 == (char *)0x0) {
pcVar8 = strchr(local_138,10);
if (pcVar8 != (char *)0x0) goto LAB_0017b1d3;
}
else {
LAB_0017b1d3:
*pcVar8 = '\0';
}
sVar5 = strlen(local_138);
cVar2 = ma_pvio_tls_compare_fp(__ptr,iVar3,local_138,sVar5 & 0xffffffff);
} while (cVar2 != '\0');
uVar4 = 0;
LAB_0017b202:
ma_close(lVar6);
}
}
}
else {
sVar5 = strlen(param_2);
uVar4 = ma_pvio_tls_compare_fp(__ptr,iVar3,param_2,sVar5 & 0xffffffff);
}
}
if (__ptr != (void *)0x0) {
free(__ptr);
}
if ((char)uVar4 != '\0') {
my_set_error(uVar1,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_004e5000,
"Fingerprint verification of server certificate failed");
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,165 | my_casedn_ucs2 | eloqsql/strings/ctype-ucs2.c | static size_t my_casedn_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_ucs2_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_ucs2(uni_plane, &wc);
if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_ucs2:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0x498de
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x2, %rcx
movzbl (%rsi), %r9d
movzbl 0x1(%rsi), %r10d
movq 0x8(%rdi), %r11
movq (%r11,%r9,8), %r11
testq %r11, %r11
je 0x498a5
leaq (%r10,%r10,2), %r9
movl 0x4(%r11,%r9,4), %r9d
jmp 0x498ac
shll $0x8, %r9d
orq %r10, %r9
cmpq %r8, %rcx
ja 0x498dd
cmpl $0xffff, %r9d # imm = 0xFFFF
ja 0x498dd
rolw $0x8, %r9w
movw %r9w, -0x2(%rcx)
leaq 0x2(%rsi), %r9
cmpq %rdx, %r9
jae 0x498dd
addq $0x4, %rsi
addq $0x2, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0x49884
popq %rbp
retq
| my_casedn_ucs2:
mov rax, rdx
cmp rdx, 2
jl short locret_498DE
push rbp
mov rbp, rsp
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 2
loc_49884:
movzx r9d, byte ptr [rsi]
movzx r10d, byte ptr [rsi+1]
mov r11, [rdi+8]
mov r11, [r11+r9*8]
test r11, r11
jz short loc_498A5
lea r9, [r10+r10*2]
mov r9d, [r11+r9*4+4]
jmp short loc_498AC
loc_498A5:
shl r9d, 8
or r9, r10
loc_498AC:
cmp rcx, r8
ja short loc_498DD
cmp r9d, 0FFFFh
ja short loc_498DD
rol r9w, 8
mov [rcx-2], r9w
lea r9, [rsi+2]
cmp r9, rdx
jnb short loc_498DD
add rsi, 4
add rcx, 2
cmp rsi, rdx
mov rsi, r9
jbe short loc_49884
loc_498DD:
pop rbp
locret_498DE:
retn
| long long my_casedn_ucs2(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
long long v8; // rdi
unsigned long long v9; // rcx
long long v10; // r9
long long v11; // r10
long long v12; // r11
unsigned int v13; // r9d
bool v14; // cc
result = a3;
if ( a3 >= 2 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(_QWORD *)(a1 + 120);
v9 = a4 + 2;
do
{
v10 = *a2;
v11 = a2[1];
v12 = *(_QWORD *)(*(_QWORD *)(v8 + 8) + 8 * v10);
if ( v12 )
v13 = *(_DWORD *)(v12 + 12 * v11 + 4);
else
v13 = v11 | ((_DWORD)v10 << 8);
if ( v9 > v7 )
break;
if ( v13 > 0xFFFF )
break;
*(_WORD *)(v9 - 2) = __ROL2__(v13, 8);
if ( (unsigned long long)(a2 + 2) >= v6 )
break;
v9 += 2LL;
v14 = (unsigned long long)(a2 + 4) <= v6;
a2 += 2;
}
while ( v14 );
}
return result;
}
| my_casedn_ucs2:
MOV RAX,RDX
CMP RDX,0x2
JL 0x001498de
PUSH RBP
MOV RBP,RSP
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x2
LAB_00149884:
MOVZX R9D,byte ptr [RSI]
MOVZX R10D,byte ptr [RSI + 0x1]
MOV R11,qword ptr [RDI + 0x8]
MOV R11,qword ptr [R11 + R9*0x8]
TEST R11,R11
JZ 0x001498a5
LEA R9,[R10 + R10*0x2]
MOV R9D,dword ptr [R11 + R9*0x4 + 0x4]
JMP 0x001498ac
LAB_001498a5:
SHL R9D,0x8
OR R9,R10
LAB_001498ac:
CMP RCX,R8
JA 0x001498dd
CMP R9D,0xffff
JA 0x001498dd
ROL R9W,0x8
MOV word ptr [RCX + -0x2],R9W
LEA R9,[RSI + 0x2]
CMP R9,RDX
JNC 0x001498dd
ADD RSI,0x4
ADD RCX,0x2
CMP RSI,RDX
MOV RSI,R9
JBE 0x00149884
LAB_001498dd:
POP RBP
LAB_001498de:
RET
|
void my_casedn_ucs2(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
byte *pbVar4;
byte *pbVar5;
uint uVar6;
if (1 < param_3) {
lVar1 = *(long *)(param_1 + 0x78);
uVar3 = param_4 + 2;
pbVar4 = param_2;
while( true ) {
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (ulong)*pbVar4 * 8);
if (lVar2 == 0) {
uVar6 = (uint)CONCAT11(*pbVar4,pbVar4[1]);
}
else {
uVar6 = *(uint *)(lVar2 + 4 + (ulong)pbVar4[1] * 0xc);
}
if (((ulong)(param_5 + param_4) < uVar3) || (0xffff < uVar6)) break;
*(ushort *)(uVar3 - 2) = (ushort)uVar6 << 8 | (ushort)uVar6 >> 8;
if (param_2 + param_3 <= pbVar4 + 2) {
return;
}
pbVar5 = pbVar4 + 4;
uVar3 = uVar3 + 2;
pbVar4 = pbVar4 + 2;
if (param_2 + param_3 < pbVar5) {
return;
}
}
}
return;
}
|
|
1,166 | ma_field_extension_init_type_info | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot,
MA_FIELD_EXTENSION *ext,
const char *ptr, size_t length)
{
const char *end= ptr + length;
for ( ; ptr < end; )
{
uint itype= (uchar) *ptr++;
uint len= (uchar) *ptr++;
if (ptr + len > end || len > 127)
break; /*Badly encoded data*/
if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST)
ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len);
ptr+= len;
}
} | O0 | c | ma_field_extension_init_type_info:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x22157
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
ja 0x220f2
cmpl $0x7f, -0x30(%rbp)
jbe 0x220f4
jmp 0x22157
cmpl $0x7f, -0x2c(%rbp)
ja 0x22142
cmpl $0x1, -0x2c(%rbp)
ja 0x22142
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x21b80
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x220a4
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| ma_field_extension_init_type_info:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_220A4:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb loc_22157
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_30]
add rax, rcx
cmp rax, [rbp+var_28]
ja short loc_220F2
cmp [rbp+var_30], 7Fh
jbe short loc_220F4
loc_220F2:
jmp short loc_22157
loc_220F4:
cmp [rbp+var_2C], 7Fh
ja short loc_22142
cmp [rbp+var_2C], 1
ja short loc_22142
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_30]
mov edx, eax
call ma_const_string_copy_root
mov rcx, rax
mov rax, [rbp+var_48]
mov [rbp+var_40], rcx
mov [rbp+var_38], rdx
mov rcx, [rbp+var_40]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov [rax+8], rcx
loc_22142:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_220A4
loc_22157:
add rsp, 50h
pop rbp
retn
| unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4)
{
unsigned __int8 *result; // rax
unsigned __int8 *v5; // rax
long long v6; // rdx
long long *v7; // [rsp+8h] [rbp-48h]
unsigned int v8; // [rsp+20h] [rbp-30h]
unsigned int v9; // [rsp+24h] [rbp-2Ch]
unsigned long long v10; // [rsp+28h] [rbp-28h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+38h] [rbp-18h]
v11 = a3;
v10 = (unsigned long long)&a3[a4];
while ( 1 )
{
result = v11;
if ( (unsigned long long)v11 >= v10 )
break;
v9 = *v11;
v5 = v11 + 1;
v12 = (long long)(v11 + 2);
v8 = *v5;
result = (unsigned __int8 *)(*v5 + v12);
if ( (unsigned long long)result > v10 || v8 > 0x7F )
break;
if ( v9 <= 1 )
{
v7 = (long long *)(16LL * v9 + a2);
*v7 = ma_const_string_copy_root(a1, v12, v8);
v7[1] = v6;
}
v11 = (unsigned __int8 *)(v8 + v12);
}
return result;
}
| ma_field_extension_init_type_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_001220a4:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00122157
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x30]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001220f2
CMP dword ptr [RBP + -0x30],0x7f
JBE 0x001220f4
LAB_001220f2:
JMP 0x00122157
LAB_001220f4:
CMP dword ptr [RBP + -0x2c],0x7f
JA 0x00122142
CMP dword ptr [RBP + -0x2c],0x1
JA 0x00122142
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
CALL 0x00121b80
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LAB_00122142:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001220a4
LAB_00122157:
ADD RSP,0x50
POP RBP
RET
|
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4)
{
uint uVar1;
uint uVar2;
byte *pbVar3;
int1 auVar4 [16];
byte *local_20;
local_20 = param_3;
while( true ) {
if (param_3 + param_4 <= local_20) {
return;
}
uVar1 = (uint)*local_20;
pbVar3 = local_20 + 2;
uVar2 = (uint)local_20[1];
if (param_3 + param_4 < pbVar3 + uVar2) break;
if (0x7f < uVar2) {
return;
}
if ((uVar1 < 0x80) && (uVar1 < 2)) {
auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2);
*(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4;
}
local_20 = pbVar3 + uVar2;
}
return;
}
|
|
1,167 | LEX::stmt_grant_proxy(THD*, LEX_USER*, privilege_t) | eloqsql/sql/sql_lex.cc | bool LEX::stmt_grant_proxy(THD *thd, LEX_USER *user, privilege_t grant_option)
{
users_list.push_front(user);
sql_command= SQLCOM_GRANT;
return !(m_sql_cmd= new (thd->mem_root) Sql_cmd_grant_proxy(sql_command,
grant_option));
} | O0 | cpp | LEX::stmt_grant_proxy(THD*, LEX_USER*, privilege_t):
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 -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0xf50, %rdi # imm = 0xF50
movq -0x18(%rbp), %rsi
callq 0x8e3c80
movq -0x58(%rbp), %rax
movl $0x22, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x50(%rbp)
movl $0x18, %edi
callq 0x7dbfd0
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
movb $0x0, -0x21(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x40(%rbp)
je 0x8dde4c
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rax
movb $0x1, -0x21(%rbp)
movl 0x8(%rax), %esi
movq -0x20(%rbp), %rdx
callq 0x8e3cb0
jmp 0x8dde42
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x8dde4c
movq -0x58(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rax, 0x17d8(%rcx)
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x8dde80
jmp 0x8dde8d
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x7dc010
jmp 0x8dde8f
movq -0x30(%rbp), %rdi
callq 0x7589b0
nopl (%rax,%rax)
| _ZN3LEX16stmt_grant_proxyEP3THDP8LEX_USER11privilege_t:
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 rdi, [rbp+var_8]
mov [rbp+var_58], rdi
add rdi, 0F50h
mov rsi, [rbp+var_18]
call _ZN4ListI8LEX_USERE10push_frontEPS0_; List<LEX_USER>::push_front(LEX_USER*)
mov rax, [rbp+var_58]
mov dword ptr [rax+8], 22h ; '"'
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
mov [rbp+var_50], rsi
mov edi, 18h
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_48], rcx
mov [rbp+var_21], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_40], rax
jz short loc_8DDE4C
mov rdi, [rbp+var_48]
mov rax, [rbp+var_58]
mov [rbp+var_21], 1
mov esi, [rax+8]
mov rdx, [rbp+var_20]
call _ZN19Sql_cmd_grant_proxyC2E16enum_sql_command11privilege_t; Sql_cmd_grant_proxy::Sql_cmd_grant_proxy(enum_sql_command,privilege_t)
jmp short $+2
loc_8DDE42:
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
jmp short $+2
loc_8DDE4C:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_40]
mov [rcx+17D8h], rax
cmp rax, 0
setnz al
xor al, 0FFh
and al, 1
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
test [rbp+var_21], 1
jnz short loc_8DDE80
jmp short loc_8DDE8D
loc_8DDE80:
mov rsi, [rbp+var_50]
mov rdi, [rbp+var_48]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_8DDE8D:
jmp short $+2
loc_8DDE8F:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| bool LEX::stmt_grant_proxy(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // [rsp+18h] [rbp-48h]
long long v6; // [rsp+20h] [rbp-40h]
List<LEX_USER>::push_front(a1 + 3920, a3);
*(_DWORD *)(a1 + 8) = 34;
v5 = Sql_alloc::operator new(24LL, *(_QWORD *)(a2 + 40));
v6 = 0LL;
if ( v5 )
{
Sql_cmd_grant_proxy::Sql_cmd_grant_proxy(v5, *(unsigned int *)(a1 + 8), a4);
v6 = v5;
}
*(_QWORD *)(a1 + 6104) = v6;
return v6 == 0;
}
| front:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
POP RBP
RET
|
/* I_P_List<Warning_info, I_P_List_adapter<Warning_info, &Warning_info::m_next_in_da,
&Warning_info::m_prev_in_da>, I_P_List_counter, I_P_List_fast_push_back<Warning_info> >::front()
const */
int8 __thiscall
I_P_List<Warning_info,I_P_List_adapter<Warning_info,&Warning_info::m_next_in_da,&Warning_info::m_prev_in_da>,I_P_List_counter,I_P_List_fast_push_back<Warning_info>>
::front(I_P_List<Warning_info,I_P_List_adapter<Warning_info,&Warning_info::m_next_in_da,&Warning_info::m_prev_in_da>,I_P_List_counter,I_P_List_fast_push_back<Warning_info>>
*this)
{
return *(int8 *)(this + 0x10);
}
|
|
1,168 | httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&, httplib::ContentReader, std::vector<std::pair<std::unique_ptr<httplib::detail::MatcherBase, std::default_delete<httplib::detail::MatcherBase>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>, std::allocator<std::pair<std::unique_ptr<httplib::detail::MatcherBase, std::default_delete<httplib::detail::MatcherBase>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>>> const&) const | monkey531[P]llama/examples/server/httplib.h | inline bool Server::dispatch_request_for_content_reader(
Request &req, Response &res, ContentReader content_reader,
const HandlersForContentReader &handlers) const {
for (const auto &x : handlers) {
const auto &matcher = x.first;
const auto &handler = x.second;
if (matcher->match(req)) {
handler(req, res, content_reader);
return true;
}
}
return false;
} | O2 | c | httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&, httplib::ContentReader, std::vector<std::pair<std::unique_ptr<httplib::detail::MatcherBase, std::default_delete<httplib::detail::MatcherBase>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>, std::allocator<std::pair<std::unique_ptr<httplib::detail::MatcherBase, std::default_delete<httplib::detail::MatcherBase>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>>> const&) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%r8), %r12
movq 0x8(%r8), %r13
cmpq %r13, %r12
je 0x5fe9c
movq (%r12), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x10(%rax)
testb %al, %al
jne 0x5fe89
addq $0x28, %r12
jmp 0x5fe6d
leaq 0x8(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x632a6
cmpq %r13, %r12
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZNK7httplib6Server35dispatch_request_for_content_readerERNS_7RequestERNS_8ResponseENS_13ContentReaderERKSt6vectorISt4pairISt10unique_ptrINS_6detail11MatcherBaseESt14default_deleteISA_EESt8functionIFvRKS1_S4_RKS5_EEESaISL_EE:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, [r8]
mov r13, [r8+8]
loc_5FE6D:
cmp r12, r13
jz short loc_5FE9C
mov rdi, [r12]
mov rax, [rdi]
mov rsi, r15
call qword ptr [rax+10h]
test al, al
jnz short loc_5FE89
add r12, 28h ; '('
jmp short loc_5FE6D
loc_5FE89:
lea rdi, [r12+8]
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call _ZNKSt8functionIFvRKN7httplib7RequestERNS0_8ResponseERKNS0_13ContentReaderEEEclES3_S5_S8_; std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>::operator()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)
loc_5FE9C:
cmp r12, r13
setnz al
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| bool httplib::Server::dispatch_request_for_content_reader(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
_QWORD *v7; // r12
_QWORD *v8; // r13
v7 = *(_QWORD **)a5;
v8 = *(_QWORD **)(a5 + 8);
while ( v7 != v8 )
{
if ( (*(unsigned __int8 ( **)(_QWORD, long long))(*(_QWORD *)*v7 + 16LL))(*v7, a2) )
{
std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>::operator()(
v7 + 1,
a2,
a3,
a4);
return v7 != v8;
}
v7 += 5;
}
return v7 != v8;
}
| dispatch_request_for_content_reader:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,qword ptr [R8]
MOV R13,qword ptr [R8 + 0x8]
LAB_0015fe6d:
CMP R12,R13
JZ 0x0015fe9c
MOV RDI,qword ptr [R12]
MOV RAX,qword ptr [RDI]
MOV RSI,R15
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JNZ 0x0015fe89
ADD R12,0x28
JMP 0x0015fe6d
LAB_0015fe89:
LEA RDI,[R12 + 0x8]
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x001632a6
LAB_0015fe9c:
CMP R12,R13
SETNZ AL
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&,
httplib::ContentReader, std::vector<std::pair<std::unique_ptr<httplib::detail::MatcherBase,
std::default_delete<httplib::detail::MatcherBase> >, std::function<void (httplib::Request const&,
httplib::Response&, httplib::ContentReader const&)> >,
std::allocator<std::pair<std::unique_ptr<httplib::detail::MatcherBase,
std::default_delete<httplib::detail::MatcherBase> >, std::function<void (httplib::Request const&,
httplib::Response&, httplib::ContentReader const&)> > > > const&) const */
bool __thiscall
httplib::Server::dispatch_request_for_content_reader
(int8 param_1_00,Response *param_1,ContentReader *param_2,int8 param_4,
int8 *param_5)
{
int8 *puVar1;
char cVar2;
int8 *puVar3;
puVar3 = (int8 *)*param_5;
puVar1 = (int8 *)param_5[1];
do {
if (puVar3 == puVar1) {
LAB_0015fe9c:
return puVar3 != puVar1;
}
cVar2 = (**(code **)(*(long *)*puVar3 + 0x10))((long *)*puVar3,param_1);
if (cVar2 != '\0') {
std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>
::operator()((Request *)(puVar3 + 1),param_1,param_2);
goto LAB_0015fe9c;
}
puVar3 = puVar3 + 5;
} while( true );
}
|
|
1,169 | my_strntod_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O0 | c | my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movq %rcx, -0x130(%rbp)
movq %r8, -0x138(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x138(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x5bdb5
movq $0xff, -0x128(%rbp)
movq -0x150(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x168(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x150(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x160(%rbp), %rsi
callq *%rax
movl %eax, -0x16c(%rbp)
cmpl $0x0, %eax
jle 0x5be4f
movl -0x16c(%rbp), %ecx
movq -0x150(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
cmpq $0x65, -0x160(%rbp)
ja 0x5be28
cmpq $0x0, -0x160(%rbp)
jne 0x5be2a
jmp 0x5be4f
movq -0x160(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x5bdca
movq -0x148(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, (%rax)
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x72310
movq -0x180(%rbp), %rdi
movsd %xmm0, -0x140(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x130(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5bef0
movsd -0x178(%rbp), %xmm0
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
callq 0x242b0
nopw %cs:(%rax,%rax)
| my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 180h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_130], rcx
mov [rbp+var_138], r8
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_150], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_168], rax
mov rax, [rbp+var_138]
mov dword ptr [rax], 0
cmp [rbp+var_128], 100h
jb short loc_5BDB5
mov [rbp+var_128], 0FFh
loc_5BDB5:
mov rax, [rbp+var_150]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_5BDCA:
mov rax, [rbp+var_168]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_150]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_160]
call rax
mov [rbp+var_16C], eax
cmp eax, 0
jle short loc_5BE4F
mov ecx, [rbp+var_16C]
mov rax, [rbp+var_150]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_150], rax
cmp [rbp+var_160], 65h ; 'e'
ja short loc_5BE28
cmp [rbp+var_160], 0
jnz short loc_5BE2A
loc_5BE28:
jmp short loc_5BE4F
loc_5BE2A:
mov rax, [rbp+var_160]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_5BDCA
loc_5BE4F:
mov rcx, [rbp+var_148]
mov rax, [rbp+var_130]
mov [rax], rcx
mov rsi, [rbp+var_130]
mov rdx, [rbp+var_138]
lea rdi, [rbp+var_110]
mov [rbp+var_180], rdi
call my_strtod
mov rdi, [rbp+var_180]
movsd [rbp+var_140], xmm0
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_130]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
movsd xmm0, [rbp+var_140]
movsd [rbp+var_178], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5BEF0
movsd xmm0, [rbp+var_178]
add rsp, 180h
pop rbp
retn
loc_5BEF0:
call ___stack_chk_fail
| double my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
_BYTE *v5; // rax
int v7; // [rsp+14h] [rbp-16Ch]
long long ( *v8)(long long, unsigned long long *, long long, long long); // [rsp+18h] [rbp-168h]
unsigned long long v9; // [rsp+20h] [rbp-160h] BYREF
long long v10; // [rsp+28h] [rbp-158h]
long long v11; // [rsp+30h] [rbp-150h]
_BYTE *v12; // [rsp+38h] [rbp-148h]
double v13; // [rsp+40h] [rbp-140h]
_DWORD *v14; // [rsp+48h] [rbp-138h]
_QWORD *v15; // [rsp+50h] [rbp-130h]
unsigned long long v16; // [rsp+58h] [rbp-128h]
long long v17; // [rsp+60h] [rbp-120h]
long long v18; // [rsp+68h] [rbp-118h]
_BYTE v19[264]; // [rsp+70h] [rbp-110h] BYREF
unsigned long long v20; // [rsp+178h] [rbp-8h]
v20 = __readfsqword(0x28u);
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v12 = v19;
v11 = a2;
v8 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
if ( v16 >= 0x100 )
v16 = 255LL;
v10 = v16 + v11;
while ( 1 )
{
v7 = v8(v18, &v9, v11, v10);
if ( v7 <= 0 )
break;
v11 += v7;
if ( v9 > 0x65 || !v9 )
break;
v5 = v12++;
*v5 = v9;
}
*v15 = v12;
v13 = my_strtod(v19, v15, v14);
*v15 = (*v15 - (_QWORD)v19) * *(unsigned int *)(v18 + 152) + v17;
return v13;
}
| my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV qword ptr [RBP + -0x130],RCX
MOV qword ptr [RBP + -0x138],R8
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x150],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x168],RAX
MOV RAX,qword ptr [RBP + -0x138]
MOV dword ptr [RAX],0x0
CMP qword ptr [RBP + -0x128],0x100
JC 0x0015bdb5
MOV qword ptr [RBP + -0x128],0xff
LAB_0015bdb5:
MOV RAX,qword ptr [RBP + -0x150]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_0015bdca:
MOV RAX,qword ptr [RBP + -0x168]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x150]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x160]
CALL RAX
MOV dword ptr [RBP + -0x16c],EAX
CMP EAX,0x0
JLE 0x0015be4f
MOV ECX,dword ptr [RBP + -0x16c]
MOV RAX,qword ptr [RBP + -0x150]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x150],RAX
CMP qword ptr [RBP + -0x160],0x65
JA 0x0015be28
CMP qword ptr [RBP + -0x160],0x0
JNZ 0x0015be2a
LAB_0015be28:
JMP 0x0015be4f
LAB_0015be2a:
MOV RAX,qword ptr [RBP + -0x160]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x0015bdca
LAB_0015be4f:
MOV RCX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x138]
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x180],RDI
CALL 0x00172310
MOV RDI,qword ptr [RBP + -0x180]
MOVSD qword ptr [RBP + -0x140],XMM0
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x130]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOVSD XMM0,qword ptr [RBP + -0x140]
MOVSD qword ptr [RBP + -0x178],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015bef0
MOVSD XMM0,qword ptr [RBP + -0x178]
ADD RSP,0x180
POP RBP
RET
LAB_0015bef0:
CALL 0x001242b0
|
int8
my_strntod_mb2_or_mb4(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_168;
long local_160;
long local_158;
int1 *local_150;
int8 local_148;
int4 *local_140;
long *local_138;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_158 = param_2;
local_150 = local_118;
local_140 = param_5;
local_138 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_168,local_158,local_160), 0 < iVar2 &&
(local_158 = local_158 + iVar2, local_168 < 0x66)) && (local_168 != 0))) {
*local_150 = (char)local_168;
local_150 = local_150 + 1;
}
*local_138 = (long)local_150;
local_148 = my_strtod(local_118,local_138,local_140);
*local_138 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_138 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_148;
}
|
|
1,170 | mi_keylength | eloqsql/storage/myisam/mi_search.c | uint _mi_keylength(MI_KEYDEF *keyinfo, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
uchar *start;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
return (keyinfo->keylength);
start=key;
for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return((uint) (key-start)+keyseg->length);
} | O0 | c | mi_keylength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0x47ffc
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x480fe
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0x480e6
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x48049
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpb $0x0, (%rax)
jne 0x48047
jmp 0x480d5
jmp 0x48049
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0x480bd
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x4807e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x480ab
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x480d3
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x480d5
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0x48010
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x20(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_keylength:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Ah]
and eax, 28h
cmp eax, 0
jnz short loc_47FFC
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+12h]
mov [rbp+var_4], eax
jmp loc_480FE
loc_47FFC:
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_20], rax
loc_48010:
mov rax, [rbp+var_20]
cmp byte ptr [rax+18h], 0
jz loc_480E6
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_48049
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp byte ptr [rax], 0
jnz short loc_48047
jmp loc_480D5
loc_48047:
jmp short $+2
loc_48049:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_480BD
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_4807E
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
jmp short loc_480AB
loc_4807E:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
add rax, 3
mov [rbp+var_18], rax
loc_480AB:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_480D3
loc_480BD:
mov rax, [rbp+var_20]
movzx ecx, word ptr [rax+14h]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_480D3:
jmp short $+2
loc_480D5:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_48010
loc_480E6:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+14h]
add eax, ecx
mov [rbp+var_4], eax
loc_480FE:
mov eax, [rbp+var_4]
pop rbp
retn
| long long mi_keylength(long long a1, unsigned __int8 *a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rax
int v5; // [rsp+0h] [rbp-2Ch]
long long i; // [rsp+Ch] [rbp-20h]
unsigned __int8 *v7; // [rsp+14h] [rbp-18h]
unsigned __int8 *v8; // [rsp+14h] [rbp-18h]
v7 = a2;
if ( (*(_WORD *)(a1 + 10) & 0x28) != 0 )
{
for ( i = *(_QWORD *)(a1 + 40); *(_BYTE *)(i + 24); i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) != 0 )
{
v2 = v7++;
if ( !*v2 )
continue;
}
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( *v7 == 255 )
{
v5 = _byteswap_ushort(*(_WORD *)(v7 + 1));
v8 = v7 + 3;
}
else
{
v3 = v7;
v8 = v7 + 1;
v5 = *v3;
}
v7 = &v8[v5];
}
else
{
v7 += *(unsigned __int16 *)(i + 20);
}
}
return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v7 - (_DWORD)a2);
}
else
{
return *(unsigned __int16 *)(a1 + 18);
}
}
| _mi_keylength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x00147ffc
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001480fe
LAB_00147ffc:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_00148010:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x001480e6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00148049
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP byte ptr [RAX],0x0
JNZ 0x00148047
JMP 0x001480d5
LAB_00148047:
JMP 0x00148049
LAB_00148049:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001480bd
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x0014807e
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001480ab
LAB_0014807e:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
MOV qword ptr [RBP + -0x18],RAX
LAB_001480ab:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001480d3
LAB_001480bd:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001480d3:
JMP 0x001480d5
LAB_001480d5:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00148010
LAB_001480e6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0x14]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001480fe:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint _mi_keylength(long param_1,byte *param_2)
{
byte bVar1;
byte *pbVar2;
uint local_34;
long local_28;
byte *local_20;
uint local_c;
if ((*(ushort *)(param_1 + 10) & 0x28) == 0) {
local_c = (uint)*(ushort *)(param_1 + 0x12);
}
else {
local_20 = param_2;
for (local_28 = *(long *)(param_1 + 0x28); *(char *)(local_28 + 0x18) != '\0';
local_28 = local_28 + 0x20) {
if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) ||
(pbVar2 = local_20 + 1, bVar1 = *local_20, local_20 = pbVar2, bVar1 != 0)) {
if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) {
local_20 = local_20 + (int)(uint)*(ushort *)(local_28 + 0x14);
}
else {
if (*local_20 == 0xff) {
local_34 = (uint)CONCAT11(local_20[1],local_20[2]);
local_20 = local_20 + 3;
}
else {
local_34 = (uint)*local_20;
local_20 = local_20 + 1;
}
local_20 = local_20 + local_34;
}
}
}
local_c = ((int)local_20 - (int)param_2) + (uint)*(ushort *)(local_28 + 0x14);
}
return local_c;
}
|
|
1,171 | httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&) | monkey531[P]llama/examples/server/httplib.h | inline EncodingType encoding_type(const Request &req, const Response &res) {
auto ret =
detail::can_compress_content_type(res.get_header_value("Content-Type"));
if (!ret) { return EncodingType::None; }
const auto &s = req.get_header_value("Accept-Encoding");
(void)(s);
#ifdef CPPHTTPLIB_BROTLI_SUPPORT
// TODO: 'Accept-Encoding' has br, not br;q=0
ret = s.find("br") != std::string::npos;
if (ret) { return EncodingType::Brotli; }
#endif
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
// TODO: 'Accept-Encoding' has gzip, not gzip;q=0
ret = s.find("gzip") != std::string::npos;
if (ret) { return EncodingType::Gzip; }
#endif
return EncodingType::None;
} | O1 | c | httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe5f76(%rip), %rsi # 0x14d08a
leaq 0xe5f7b(%rip), %rdx # 0x14d096
leaq 0x8(%rsp), %rdi
callq 0x4c588
addq $0x48, %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x68028
cmpq %rdx, %rax
je 0x67141
movq 0x28(%rax), %rsi
jmp 0x67148
leaq 0xe8c28(%rip), %rsi # 0x14fd70
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x402a8
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x68005
movb $0x1, %bpl
cmpl $0xb66a0e, %eax # imm = 0xB66A0E
jle 0x67189
cmpl $0x2bb6a6b, %eax # imm = 0x2BB6A6B
jg 0x671a0
cmpl $0xb66a0f, %eax # imm = 0xB66A0F
je 0x671cf
cmpl $0x2348aed, %eax # imm = 0x2348AED
je 0x671d1
jmp 0x671ae
cmpl $0xcb462, %eax # imm = 0xCB462
je 0x671d1
cmpl $0x1accd8, %eax # imm = 0x1ACCD8
je 0x671d1
cmpl $0xa74526, %eax # imm = 0xA74526
je 0x671d1
jmp 0x671ae
cmpl $0x2bb6a6c, %eax # imm = 0x2BB6A6C
je 0x671d1
cmpl $0x2c726b2, %eax # imm = 0x2C726B2
je 0x671d1
leaq 0xe5f99(%rip), %rsi # 0x14d14e
leaq 0x28(%rsp), %rdi
movl $0x5, %ecx
xorl %edx, %edx
callq 0x1ff00
testq %rax, %rax
sete %bpl
jmp 0x671d1
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x671ec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x67203
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
testb %bpl, %bpl
je 0x67283
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xe5f27(%rip), %rsi # 0x14d13e
leaq 0xe5f2f(%rip), %rdx # 0x14d14d
callq 0x4c588
addq $0x70, %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x68028
cmpq %rdx, %rax
je 0x6723f
movq 0x28(%rax), %rsi
jmp 0x67246
leaq 0xe8b2a(%rip), %rsi # 0x14fd70
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x402a8
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6726c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x67283
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x672b4
jmp 0x672b9
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x672bc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x672bc
movq %rax, %rbx
jmp 0x672d3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x672d3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rdi
callq 0x20380
| _ZN7httplib6detail13encoding_typeERKNS_7RequestERKNS_8ResponseE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+68h+var_50]
mov [r15-10h], r15
lea rsi, aContentType; "Content-Type"
lea rdx, aContentType+0Ch; ""
lea rdi, [rsp+68h+var_60]
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)
add r14, 48h ; 'H'
lea rsi, [rsp+68h+var_60]
mov rdi, r14
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
cmp rax, rdx
jz short loc_67141
mov rsi, [rax+28h]
jmp short loc_67148
loc_67141:
lea rsi, aDataDone+0Eh; ""
loc_67148:
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [rsp+68h+var_40]; this
mov rsi, [rsp+68h+var_38]; char *
xor edx, edx; unsigned __int64
call _ZN7httplib6detail12str2tag_coreEPKcmj; httplib::detail::str2tag_core(char const*,ulong,uint)
mov bpl, 1
cmp eax, 0B66A0Eh
jle short loc_67189
cmp eax, 2BB6A6Bh
jg short loc_671A0
cmp eax, 0B66A0Fh
jz short loc_671CF
cmp eax, 2348AEDh
jz short loc_671D1
jmp short loc_671AE
loc_67189:
cmp eax, 0CB462h
jz short loc_671D1
cmp eax, offset unk_1ACCD8
jz short loc_671D1
cmp eax, 0A74526h
jz short loc_671D1
jmp short loc_671AE
loc_671A0:
cmp eax, 2BB6A6Ch
jz short loc_671D1
cmp eax, 2C726B2h
jz short loc_671D1
loc_671AE:
lea rsi, aText_0; "text/"
lea rdi, [rsp+68h+var_40]
mov ecx, 5
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm; std::string::rfind(char const*,ulong,ulong)
test rax, rax
setz bpl
jmp short loc_671D1
loc_671CF:
xor ebp, ebp
loc_671D1:
lea r14, [rsp+68h+var_30]
mov rdi, [r14-10h]; void *
cmp rdi, r14
jz short loc_671EC
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_671EC:
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_67203
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67203:
test bpl, bpl
jz short loc_67283
lea rdi, [rsp+68h+var_60]
mov [rdi], r15
lea rsi, aAcceptEncoding; "Accept-Encoding"
lea rdx, aAcceptEncoding+0Fh; ""
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)
add rbx, 70h ; 'p'
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
cmp rax, rdx
jz short loc_6723F
mov rsi, [rax+28h]
jmp short loc_67246
loc_6723F:
lea rsi, aDataDone+0Eh; ""
loc_67246:
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_6726C
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6726C:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r14
jz short loc_67283
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67283:
xor eax, eax
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short loc_672B4
jmp short loc_672B9
mov rbx, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_672BC
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_672BC
loc_672B4:
mov rbx, rax
jmp short loc_672D3
loc_672B9:
mov rbx, rax
loc_672BC:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_672D3
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_672D3:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::encoding_type(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rdx
char *v4; // rsi
unsigned int v5; // ecx
int v6; // eax
bool v7; // bp
long long v8; // rax
long long v9; // rdx
char *v10; // rsi
void *v12[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v13[2]; // [rsp+18h] [rbp-50h] BYREF
httplib::detail *v14[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v15[6]; // [rsp+38h] [rbp-30h] BYREF
v12[0] = v13;
std::string::_M_construct<char const*>(v12, "Content-Type", (long long)"");
v2 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(
a2 + 72,
v12);
if ( v2 == v3 )
v4 = "";
else
v4 = *(char **)(v2 + 40);
std::string::basic_string<std::allocator<char>>(v14, (long long)v4);
v6 = httplib::detail::str2tag_core(v14[0], (const char *)v14[1], 0LL, v5);
v7 = 1;
if ( v6 <= 11954702 )
{
if ( v6 == 832610 || v6 == (_DWORD)&unk_1ACCD8 || v6 == 10962214 )
goto LABEL_17;
LABEL_15:
v7 = std::string::rfind(v14, "text/", 0LL, 5LL) == 0;
goto LABEL_17;
}
if ( v6 > 45836907 )
{
if ( v6 == 45836908 || v6 == 46606002 )
goto LABEL_17;
goto LABEL_15;
}
if ( v6 != 11954703 )
{
if ( v6 == 36997869 )
goto LABEL_17;
goto LABEL_15;
}
v7 = 0;
LABEL_17:
if ( (_QWORD *)v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( v7 )
{
v12[0] = v13;
std::string::_M_construct<char const*>(v12, "Accept-Encoding", (long long)"");
v8 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(
a1 + 112,
v12);
if ( v8 == v9 )
v10 = "";
else
v10 = *(char **)(v8 + 40);
std::string::basic_string<std::allocator<char>>(v14, (long long)v10);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( (_QWORD *)v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
}
return 0LL;
}
| encoding_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0016710d:
LEA RSI,[0x24d08a]
LEA RDX,[0x24d096]
LEA RDI,[RSP + 0x8]
CALL 0x0014c588
ADD R14,0x48
LAB_00167129:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00168028
CMP RAX,RDX
JZ 0x00167141
MOV RSI,qword ptr [RAX + 0x28]
JMP 0x00167148
LAB_00167141:
LEA RSI,[0x24fd70]
LAB_00167148:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x001402a8
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
LAB_00167161:
XOR EDX,EDX
CALL 0x00168005
MOV BPL,0x1
CMP EAX,0xb66a0e
JLE 0x00167189
CMP EAX,0x2bb6a6b
JG 0x001671a0
CMP EAX,0xb66a0f
JZ 0x001671cf
CMP EAX,0x2348aed
JZ 0x001671d1
JMP 0x001671ae
LAB_00167189:
CMP EAX,0xcb462
JZ 0x001671d1
CMP EAX,0x1accd8
JZ 0x001671d1
CMP EAX,0xa74526
JZ 0x001671d1
JMP 0x001671ae
LAB_001671a0:
CMP EAX,0x2bb6a6c
JZ 0x001671d1
CMP EAX,0x2c726b2
JZ 0x001671d1
LAB_001671ae:
LEA RSI,[0x24d14e]
LEA RDI,[RSP + 0x28]
MOV ECX,0x5
XOR EDX,EDX
CALL 0x0011ff00
TEST RAX,RAX
SETZ BPL
JMP 0x001671d1
LAB_001671cf:
XOR EBP,EBP
LAB_001671d1:
LEA R14,[RSP + 0x38]
MOV RDI,qword ptr [R14 + -0x10]
CMP RDI,R14
JZ 0x001671ec
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_001671ec:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00167203
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_00167203:
TEST BPL,BPL
JZ 0x00167283
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R15
LAB_00167210:
LEA RSI,[0x24d13e]
LEA RDX,[0x24d14d]
CALL 0x0014c588
ADD RBX,0x70
LAB_00167227:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00168028
CMP RAX,RDX
JZ 0x0016723f
MOV RSI,qword ptr [RAX + 0x28]
JMP 0x00167246
LAB_0016723f:
LEA RSI,[0x24fd70]
LAB_00167246:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x001402a8
LAB_00167255:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0016726c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_0016726c:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R14
JZ 0x00167283
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_00167283:
XOR EAX,EAX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&) */
int8 httplib::detail::encoding_type(Request *param_1,Response *param_2)
{
int iVar1;
long lVar2;
char *pcVar3;
bool bVar4;
int1 auVar5 [16];
allocator local_61;
long *local_60 [2];
long local_50 [2];
long *local_40;
ulong local_38;
long local_30 [2];
/* try { // try from 0016710d to 00167124 has its CatchHandler @ 001672b4 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char_const*>(local_60,"Content-Type","");
/* try { // try from 00167129 to 00167156 has its CatchHandler @ 001672b9 */
auVar5 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)(param_2 + 0x48),(string *)local_60);
if (auVar5._0_8_ == auVar5._8_8_) {
pcVar3 = "";
}
else {
pcVar3 = *(char **)(auVar5._0_8_ + 0x28);
}
std::__cxx11::string::string<std::allocator<char>>((string *)&local_40,pcVar3,&local_61);
/* try { // try from 00167161 to 00167167 has its CatchHandler @ 00167294 */
iVar1 = str2tag_core((char *)local_40,local_38,0);
bVar4 = true;
if (iVar1 < 0xb66a0f) {
if (((iVar1 == 0xcb462) || (iVar1 == 0x1accd8)) || (iVar1 == 0xa74526)) goto LAB_001671d1;
}
else if (iVar1 < 0x2bb6a6c) {
if (iVar1 == 0xb66a0f) {
bVar4 = false;
goto LAB_001671d1;
}
if (iVar1 == 0x2348aed) goto LAB_001671d1;
}
else if ((iVar1 == 0x2bb6a6c) || (iVar1 == 0x2c726b2)) goto LAB_001671d1;
lVar2 = std::__cxx11::string::rfind((char *)&local_40,0x24d14e,0);
bVar4 = lVar2 == 0;
LAB_001671d1:
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (bVar4) {
local_60[0] = local_50;
/* try { // try from 00167210 to 00167222 has its CatchHandler @ 00167290 */
std::__cxx11::string::_M_construct<char_const*>(local_60,"Accept-Encoding","");
/* try { // try from 00167227 to 00167254 has its CatchHandler @ 00167292 */
auVar5 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)(param_1 + 0x70),(string *)local_60);
if (auVar5._0_8_ == auVar5._8_8_) {
pcVar3 = "";
}
else {
pcVar3 = *(char **)(auVar5._0_8_ + 0x28);
}
std::__cxx11::string::string<std::allocator<char>>((string *)&local_40,pcVar3,&local_61);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
}
return 0;
}
|
|
1,172 | httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&) | monkey531[P]llama/examples/server/httplib.h | inline EncodingType encoding_type(const Request &req, const Response &res) {
auto ret =
detail::can_compress_content_type(res.get_header_value("Content-Type"));
if (!ret) { return EncodingType::None; }
const auto &s = req.get_header_value("Accept-Encoding");
(void)(s);
#ifdef CPPHTTPLIB_BROTLI_SUPPORT
// TODO: 'Accept-Encoding' has br, not br;q=0
ret = s.find("br") != std::string::npos;
if (ret) { return EncodingType::Brotli; }
#endif
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
// TODO: 'Accept-Encoding' has gzip, not gzip;q=0
ret = s.find("gzip") != std::string::npos;
if (ret) { return EncodingType::Gzip; }
#endif
return EncodingType::None;
} | O3 | c | httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe1761(%rip), %rsi # 0x146fdf
leaq 0xe1766(%rip), %rdx # 0x146feb
leaq 0x8(%rsp), %rdi
callq 0x4b514
addq $0x48, %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6679c
cmpq %rdx, %rax
je 0x658ab
movq 0x28(%rax), %rsi
jmp 0x658b2
leaq 0xe4413(%rip), %rsi # 0x149cc5
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3f256
movq 0x30(%rsp), %rcx
testq %rcx, %rcx
je 0x65939
xorl %edx, %edx
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
shll $0x5, %esi
addl %eax, %esi
andl $0x3ffffff, %esi # imm = 0x3FFFFFF
movzbl (%rdi,%rdx), %eax
xorl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x658d4
movb $0x1, %bpl
cmpl $0xb66a0e, %eax # imm = 0xB66A0E
jle 0x65914
cmpl $0x2bb6a6b, %eax # imm = 0x2BB6A6B
jg 0x6592b
cmpl $0xb66a0f, %eax # imm = 0xB66A0F
je 0x65a19
cmpl $0x2348aed, %eax # imm = 0x2348AED
je 0x6595e
jmp 0x65939
cmpl $0xcb462, %eax # imm = 0xCB462
je 0x6595e
cmpl $0x1accd8, %eax # imm = 0x1ACCD8
je 0x6595e
cmpl $0xa74526, %eax # imm = 0xA74526
je 0x6595e
jmp 0x65939
cmpl $0x2bb6a6c, %eax # imm = 0x2BB6A6C
je 0x6595e
cmpl $0x2c726b2, %eax # imm = 0x2C726B2
je 0x6595e
leaq 0xe1763(%rip), %rsi # 0x1470a3
leaq 0x28(%rsp), %r14
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x1ff00
testq %rax, %rax
sete %bpl
movq (%r14), %rdi
leaq 0x38(%rsp), %r14
cmpq %r14, %rdi
je 0x65975
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6598c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
testb %bpl, %bpl
je 0x65a0c
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xe16f3(%rip), %rsi # 0x147093
leaq 0xe16fb(%rip), %rdx # 0x1470a2
callq 0x4b514
addq $0x70, %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6679c
cmpq %rdx, %rax
je 0x659c8
movq 0x28(%rax), %rsi
jmp 0x659cf
leaq 0xe42f6(%rip), %rsi # 0x149cc5
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3f256
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x659f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x65a0c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x6595e
jmp 0x65a24
jmp 0x65a29
movq %rax, %rbx
jmp 0x65a43
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x65a43
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rdi
callq 0x20380
| _ZN7httplib6detail13encoding_typeERKNS_7RequestERKNS_8ResponseE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+68h+var_50]
mov [r15-10h], r15
lea rsi, aContentType; "Content-Type"
lea rdx, aContentType+0Ch; ""
lea rdi, [rsp+68h+var_60]
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)
add r14, 48h ; 'H'
lea rsi, [rsp+68h+var_60]
mov rdi, r14
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
cmp rax, rdx
jz short loc_658AB
mov rsi, [rax+28h]
jmp short loc_658B2
loc_658AB:
lea rsi, aDataDone+0Eh; ""
loc_658B2:
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rcx, [rsp+68h+var_38]
test rcx, rcx
jz short loc_65939
xor edx, edx
mov rdi, [rsp+68h+var_40]
xor eax, eax
loc_658D4:
mov esi, eax
shl esi, 5
add esi, eax
and esi, 3FFFFFFh
movzx eax, byte ptr [rdi+rdx]
xor eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_658D4
mov bpl, 1
cmp eax, 0B66A0Eh
jle short loc_65914
cmp eax, 2BB6A6Bh
jg short loc_6592B
cmp eax, 0B66A0Fh
jz loc_65A19
cmp eax, 2348AEDh
jz short loc_6595E
jmp short loc_65939
loc_65914:
cmp eax, 0CB462h
jz short loc_6595E
cmp eax, offset unk_1ACCD8
jz short loc_6595E
cmp eax, 0A74526h
jz short loc_6595E
jmp short loc_65939
loc_6592B:
cmp eax, 2BB6A6Ch
jz short loc_6595E
cmp eax, 2C726B2h
jz short loc_6595E
loc_65939:
lea rsi, aText_0; "text/"
lea r14, [rsp+68h+var_40]
mov ecx, 5
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm; std::string::rfind(char const*,ulong,ulong)
test rax, rax
setz bpl
mov rdi, [r14]; void *
loc_6595E:
lea r14, [rsp+68h+var_30]
cmp rdi, r14
jz short loc_65975
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65975:
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_6598C
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6598C:
test bpl, bpl
jz short loc_65A0C
lea rdi, [rsp+68h+var_60]
mov [rdi], r15
lea rsi, aAcceptEncoding; "Accept-Encoding"
lea rdx, aAcceptEncoding+0Fh; ""
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)
add rbx, 70h ; 'p'
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
cmp rax, rdx
jz short loc_659C8
mov rsi, [rax+28h]
jmp short loc_659CF
loc_659C8:
lea rsi, aDataDone+0Eh; ""
loc_659CF:
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_659F5
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_659F5:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r14
jz short loc_65A0C
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65A0C:
xor eax, eax
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_65A19:
xor ebp, ebp
jmp loc_6595E
jmp short loc_65A24
jmp short loc_65A29
loc_65A24:
mov rbx, rax
jmp short loc_65A43
loc_65A29:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_65A43
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65A43:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::encoding_type(long long a1, long long a2)
{
long long v3; // rax
long long v4; // rdx
char *v5; // rsi
long long v6; // rdx
_QWORD *v7; // rdi
int v8; // eax
bool v9; // bp
long long v10; // rax
long long v11; // rdx
char *v12; // rsi
void *v14[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v15[2]; // [rsp+18h] [rbp-50h] BYREF
void *v16; // [rsp+28h] [rbp-40h] BYREF
long long v17; // [rsp+30h] [rbp-38h]
_QWORD v18[6]; // [rsp+38h] [rbp-30h] BYREF
v14[0] = v15;
std::string::_M_construct<char const*>((long long)v14, "Content-Type", (long long)"");
v3 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(
a2 + 72,
v14);
if ( v3 == v4 )
v5 = "";
else
v5 = *(char **)(v3 + 40);
std::string::basic_string<std::allocator<char>>(&v16, (long long)v5);
if ( !v17 )
goto LABEL_18;
v6 = 0LL;
v7 = v16;
v8 = 0;
do
v8 = (33 * v8) & 0x3FFFFFF ^ *((unsigned __int8 *)v16 + v6++);
while ( v17 != v6 );
v9 = 1;
if ( v8 <= 11954702 )
{
if ( v8 == 832610 || v8 == (_DWORD)&unk_1ACCD8 || v8 == 10962214 )
goto LABEL_19;
LABEL_18:
v9 = std::string::rfind(&v16, "text/", 0LL, 5LL) == 0;
v7 = v16;
goto LABEL_19;
}
if ( v8 > 45836907 )
{
if ( v8 == 45836908 || v8 == 46606002 )
goto LABEL_19;
goto LABEL_18;
}
if ( v8 != 11954703 )
{
if ( v8 == 36997869 )
goto LABEL_19;
goto LABEL_18;
}
v9 = 0;
LABEL_19:
if ( v7 != v18 )
operator delete(v7, v18[0] + 1LL);
if ( v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
if ( v9 )
{
v14[0] = v15;
std::string::_M_construct<char const*>((long long)v14, "Accept-Encoding", (long long)"");
v10 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(
a1 + 112,
v14);
if ( v10 == v11 )
v12 = "";
else
v12 = *(char **)(v10 + 40);
std::string::basic_string<std::allocator<char>>(&v16, (long long)v12);
if ( v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
return 0LL;
}
| encoding_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00165877:
LEA RSI,[0x246fdf]
LEA RDX,[0x246feb]
LEA RDI,[RSP + 0x8]
CALL 0x0014b514
ADD R14,0x48
LAB_00165893:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0016679c
CMP RAX,RDX
JZ 0x001658ab
MOV RSI,qword ptr [RAX + 0x28]
JMP 0x001658b2
LAB_001658ab:
LEA RSI,[0x249cc5]
LAB_001658b2:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0013f256
MOV RCX,qword ptr [RSP + 0x30]
TEST RCX,RCX
JZ 0x00165939
XOR EDX,EDX
MOV RDI,qword ptr [RSP + 0x28]
XOR EAX,EAX
LAB_001658d4:
MOV ESI,EAX
SHL ESI,0x5
ADD ESI,EAX
AND ESI,0x3ffffff
MOVZX EAX,byte ptr [RDI + RDX*0x1]
XOR EAX,ESI
INC RDX
CMP RCX,RDX
JNZ 0x001658d4
MOV BPL,0x1
CMP EAX,0xb66a0e
JLE 0x00165914
CMP EAX,0x2bb6a6b
JG 0x0016592b
CMP EAX,0xb66a0f
JZ 0x00165a19
CMP EAX,0x2348aed
JZ 0x0016595e
JMP 0x00165939
LAB_00165914:
CMP EAX,0xcb462
JZ 0x0016595e
CMP EAX,0x1accd8
JZ 0x0016595e
CMP EAX,0xa74526
JZ 0x0016595e
JMP 0x00165939
LAB_0016592b:
CMP EAX,0x2bb6a6c
JZ 0x0016595e
CMP EAX,0x2c726b2
JZ 0x0016595e
LAB_00165939:
LEA RSI,[0x2470a3]
LEA R14,[RSP + 0x28]
MOV ECX,0x5
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011ff00
TEST RAX,RAX
SETZ BPL
MOV RDI,qword ptr [R14]
LAB_0016595e:
LEA R14,[RSP + 0x38]
CMP RDI,R14
JZ 0x00165975
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_00165975:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0016598c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_0016598c:
TEST BPL,BPL
JZ 0x00165a0c
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R15
LAB_00165999:
LEA RSI,[0x247093]
LEA RDX,[0x2470a2]
CALL 0x0014b514
ADD RBX,0x70
LAB_001659b0:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0016679c
CMP RAX,RDX
JZ 0x001659c8
MOV RSI,qword ptr [RAX + 0x28]
JMP 0x001659cf
LAB_001659c8:
LEA RSI,[0x249cc5]
LAB_001659cf:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0013f256
LAB_001659de:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x001659f5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_001659f5:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R14
JZ 0x00165a0c
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_00165a0c:
XOR EAX,EAX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00165a19:
XOR EBP,EBP
JMP 0x0016595e
|
/* httplib::detail::encoding_type(httplib::Request const&, httplib::Response const&) */
int8 httplib::detail::encoding_type(Request *param_1,Response *param_2)
{
uint uVar1;
long lVar2;
char *pcVar3;
bool bVar4;
int1 auVar5 [16];
allocator local_61;
long *local_60 [2];
long local_50 [2];
long *local_40;
long local_38;
long local_30 [2];
/* try { // try from 00165877 to 0016588e has its CatchHandler @ 00165a24 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char_const*>(local_60,"Content-Type","");
/* try { // try from 00165893 to 001658c0 has its CatchHandler @ 00165a29 */
auVar5 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)(param_2 + 0x48),(string *)local_60);
if (auVar5._0_8_ == auVar5._8_8_) {
pcVar3 = "";
}
else {
pcVar3 = *(char **)(auVar5._0_8_ + 0x28);
}
std::__cxx11::string::string<std::allocator<char>>((string *)&local_40,pcVar3,&local_61);
if (local_38 != 0) {
lVar2 = 0;
uVar1 = 0;
do {
uVar1 = (uint)*(byte *)((long)local_40 + lVar2) ^ uVar1 * 0x21 & 0x3ffffff;
lVar2 = lVar2 + 1;
} while (local_38 != lVar2);
bVar4 = true;
if (uVar1 < 0xb66a0f) {
if (((uVar1 == 0xcb462) || (uVar1 == 0x1accd8)) || (uVar1 == 0xa74526)) goto LAB_0016595e;
}
else if (uVar1 < 0x2bb6a6c) {
if (uVar1 == 0xb66a0f) {
bVar4 = false;
goto LAB_0016595e;
}
if (uVar1 == 0x2348aed) goto LAB_0016595e;
}
else if ((uVar1 == 0x2bb6a6c) || (uVar1 == 0x2c726b2)) goto LAB_0016595e;
}
lVar2 = std::__cxx11::string::rfind((char *)&local_40,0x2470a3,0);
bVar4 = lVar2 == 0;
LAB_0016595e:
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (bVar4) {
local_60[0] = local_50;
/* try { // try from 00165999 to 001659ab has its CatchHandler @ 00165a20 */
std::__cxx11::string::_M_construct<char_const*>(local_60,"Accept-Encoding","");
/* try { // try from 001659b0 to 001659dd has its CatchHandler @ 00165a22 */
auVar5 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)(param_1 + 0x70),(string *)local_60);
if (auVar5._0_8_ == auVar5._8_8_) {
pcVar3 = "";
}
else {
pcVar3 = *(char **)(auVar5._0_8_ + 0x28);
}
std::__cxx11::string::string<std::allocator<char>>((string *)&local_40,pcVar3,&local_61);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
}
return 0;
}
|
|
1,173 | calc_hashnr_caseup | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | static uint calc_hashnr_caseup(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) toupper(*key++)))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
} | O0 | c | calc_hashnr_caseup:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x5f184
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %edi
callq 0x147d0
movl %eax, %ecx
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x5f12d
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| calc_hashnr_caseup:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_5F12D:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_5F184
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx edi, byte ptr [rax]
call _toupper
mov ecx, eax
mov eax, [rbp+var_18]
movzx ecx, cl
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_5F12D
loc_5F184:
mov eax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long calc_hashnr_caseup(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rax
int i; // [rsp+Ch] [rbp-14h]
unsigned int v6; // [rsp+10h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + (unsigned __int8)toupper(*v3) * (i + (v6 & 0x3F));
}
return v6;
}
| calc_hashnr_caseup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_0015f12d:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x0015f184
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x001147d0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,CL
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0015f12d
LAB_0015f184:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
uint calc_hashnr_caseup(byte *param_1,int param_2)
{
uint uVar1;
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
uVar1 = toupper((uint)*local_10);
local_18 = ((local_18 & 0x3f) + local_1c) * (uVar1 & 0xff) + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
|
|
1,174 | cs_enter | eloqsql/strings/ctype.c | static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
switch (state) {
case 0:
i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr);
break;
case _CS_CHARSET:
my_charset_file_reset_charset(i);
break;
case _CS_COLLATION:
my_charset_file_reset_collation(i);
break;
case _CS_RESET:
return tailoring_append(st, " &", 0, NULL);
default:
break;
}
return MY_XML_OK;
} | O0 | c | cs_enter:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x76600
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x74b96
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0x74b9d
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x74b9d
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x74bcf
jmp 0x74baf
movl -0x3c(%rbp), %eax
subl $0x8, %eax
je 0x74bfc
jmp 0x74bb9
movl -0x3c(%rbp), %eax
subl $0x9, %eax
je 0x74c07
jmp 0x74bc3
movl -0x3c(%rbp), %eax
subl $0x12d, %eax # imm = 0x12D
je 0x74c12
jmp 0x74c2e
movq -0x28(%rbp), %rax
movq 0x7a8(%rax), %rax
movq 0xa0(%rax), %r8
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x1149b(%rip), %rsi # 0x86090
movb $0x0, %al
callq *%r8
jmp 0x74c30
movq -0x28(%rbp), %rdi
callq 0x765a0
jmp 0x74c30
movq -0x28(%rbp), %rdi
callq 0x765d0
jmp 0x74c30
movq -0x10(%rbp), %rdi
leaq 0x1148c(%rip), %rsi # 0x860a9
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x76690
movl %eax, -0x4(%rbp)
jmp 0x74c37
jmp 0x74c30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
| cs_enter:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+140h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call cs_file_sec
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_74B96
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_38], eax
jmp short loc_74B9D
loc_74B96:
xor eax, eax
mov [rbp+var_38], eax
jmp short $+2
loc_74B9D:
mov eax, [rbp+var_38]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_3C], eax
test eax, eax
jz short loc_74BCF
jmp short $+2
loc_74BAF:
mov eax, [rbp+var_3C]
sub eax, 8
jz short loc_74BFC
jmp short $+2
loc_74BB9:
mov eax, [rbp+var_3C]
sub eax, 9
jz short loc_74C07
jmp short $+2
loc_74BC3:
mov eax, [rbp+var_3C]
sub eax, 12Dh
jz short loc_74C12
jmp short loc_74C2E
loc_74BCF:
mov rax, [rbp+var_28]
mov rax, [rax+7A8h]
mov r8, [rax+0A0h]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_18]
mov edi, 1
lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'"
mov al, 0
call r8
jmp short loc_74C30
loc_74BFC:
mov rdi, [rbp+var_28]
call my_charset_file_reset_charset
jmp short loc_74C30
loc_74C07:
mov rdi, [rbp+var_28]
call my_charset_file_reset_collation
jmp short loc_74C30
loc_74C12:
mov rdi, [rbp+var_10]
lea rsi, asc_860A9; " &"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_4], eax
jmp short loc_74C37
loc_74C2E:
jmp short $+2
loc_74C30:
mov [rbp+var_4], 0
loc_74C37:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long cs_enter(long long a1, const char *a2, long long a3)
{
int v4; // [rsp+8h] [rbp-38h]
int *v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
int v7; // [rsp+20h] [rbp-20h]
v7 = a3;
v6 = *(_QWORD *)(a1 + 320);
v5 = (int *)cs_file_sec(a2, a3);
if ( v5 )
v4 = *v5;
else
v4 = 0;
switch ( v4 )
{
case 0:
(*(void (**)(long long, const char *, ...))(*(_QWORD *)(v6 + 1960) + 160LL))(
1LL,
"Unknown LDML tag: '%.*s'",
v7,
a2);
return 0;
case 8:
my_charset_file_reset_charset(v6);
return 0;
case 9:
my_charset_file_reset_collation(v6);
return 0;
}
if ( v4 != 301 )
return 0;
return (unsigned int)tailoring_append(a1, " &", 0LL);
}
| cs_enter:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x140]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00176600
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00174b96
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00174b9d
LAB_00174b96:
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00174b9d
LAB_00174b9d:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x3c],EAX
TEST EAX,EAX
JZ 0x00174bcf
JMP 0x00174baf
LAB_00174baf:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x8
JZ 0x00174bfc
JMP 0x00174bb9
LAB_00174bb9:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x9
JZ 0x00174c07
JMP 0x00174bc3
LAB_00174bc3:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x12d
JZ 0x00174c12
JMP 0x00174c2e
LAB_00174bcf:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x7a8]
MOV R8,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDI,0x1
LEA RSI,[0x186090]
MOV AL,0x0
CALL R8
JMP 0x00174c30
LAB_00174bfc:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001765a0
JMP 0x00174c30
LAB_00174c07:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001765d0
JMP 0x00174c30
LAB_00174c12:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1860a9]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x00176690
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00174c37
LAB_00174c2e:
JMP 0x00174c30
LAB_00174c30:
MOV dword ptr [RBP + -0x4],0x0
LAB_00174c37:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 cs_enter(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int4 uVar2;
int *piVar3;
int local_40;
lVar1 = *(long *)(param_1 + 0x140);
piVar3 = (int *)cs_file_sec(param_2,param_3);
if (piVar3 == (int *)0x0) {
local_40 = 0;
}
else {
local_40 = *piVar3;
}
if (local_40 == 0) {
(**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2);
}
else if (local_40 == 8) {
my_charset_file_reset_charset(lVar1);
}
else if (local_40 == 9) {
my_charset_file_reset_collation(lVar1);
}
else if (local_40 == 0x12d) {
uVar2 = tailoring_append(param_1,&DAT_001860a9,0);
return uVar2;
}
return 0;
}
|
|
1,175 | bytes_read | corpus-core[P]colibri-stateless/src/util/bytes.c | bytes_t bytes_read(char* filename) {
unsigned char buffer[1024];
size_t bytesRead;
buffer_t data = {0};
FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin;
if (file == NULL) return NULL_BYTES;
while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer))
buffer_append(&data, bytes(buffer, bytesRead));
if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead));
buffer_append(&data, bytes(NULL, 1));
data.data.len--;
if (ferror(file)) {
fprintf(stderr, "Error reading file: %s\n", filename);
buffer_free(&data);
data.data = NULL_BYTES;
}
#ifndef __clang_analyzer__
if (file != stdin)
#endif
fclose(file);
return data.data;
} | O0 | c | bytes_read:
pushq %rbp
movq %rsp, %rbp
subq $0x490, %rsp # imm = 0x490
movq %rdi, -0x18(%rbp)
leaq -0x440(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x231c0
movq -0x18(%rbp), %rdi
leaq 0x49f63(%rip), %rsi # 0xe8780
callq 0x233f0
cmpl $0x0, %eax
je 0x9e840
movq -0x18(%rbp), %rdi
leaq 0x48f78(%rip), %rsi # 0xe77aa
callq 0x23560
movq %rax, -0x490(%rbp)
jmp 0x9e851
movq 0x9a7a1(%rip), %rax # 0x138fe8
movq (%rax), %rax
movq %rax, -0x490(%rbp)
movq -0x490(%rbp), %rax
movq %rax, -0x448(%rbp)
cmpq $0x0, -0x448(%rbp)
jne 0x9e87d
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x9e9fb
jmp 0x9e87f
leaq -0x420(%rbp), %rdi
movq -0x448(%rbp), %rcx
movl $0x1, %esi
movl $0x400, %edx # imm = 0x400
callq 0x232d0
movq %rax, -0x428(%rbp)
cmpq $0x400, %rax # imm = 0x400
jne 0x9e8e1
movq -0x428(%rbp), %rax
movl %eax, -0x458(%rbp)
leaq -0x420(%rbp), %rax
movq %rax, -0x450(%rbp)
movl -0x458(%rbp), %esi
movq -0x450(%rbp), %rdx
leaq -0x440(%rbp), %rdi
callq 0x9e080
jmp 0x9e87f
cmpq $0x0, -0x428(%rbp)
jbe 0x9e91f
movq -0x428(%rbp), %rax
movl %eax, -0x468(%rbp)
leaq -0x420(%rbp), %rax
movq %rax, -0x460(%rbp)
movl -0x468(%rbp), %esi
movq -0x460(%rbp), %rdx
leaq -0x440(%rbp), %rdi
callq 0x9e080
movl $0x1, -0x478(%rbp)
movq $0x0, -0x470(%rbp)
movl -0x478(%rbp), %esi
movq -0x470(%rbp), %rdx
leaq -0x440(%rbp), %rdi
callq 0x9e080
movl -0x440(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x440(%rbp)
movq -0x448(%rbp), %rdi
callq 0x23390
cmpl $0x0, %eax
je 0x9e9c6
movq 0x9a654(%rip), %rax # 0x138fc8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x48e2b(%rip), %rsi # 0xe77ad
movb $0x0, %al
callq 0x23160
leaq -0x440(%rbp), %rdi
callq 0x9e240
movl $0x0, -0x488(%rbp)
movq $0x0, -0x480(%rbp)
movq -0x488(%rbp), %rax
movq %rax, -0x440(%rbp)
movq -0x480(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x448(%rbp), %rax
movq 0x9a614(%rip), %rcx # 0x138fe8
cmpq (%rcx), %rax
je 0x9e9e5
movq -0x448(%rbp), %rdi
callq 0x23230
movq -0x440(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x490, %rsp # imm = 0x490
popq %rbp
retq
nopl (%rax,%rax)
| bytes_read:
push rbp
mov rbp, rsp
sub rsp, 490h
mov [rbp+var_18], rdi
lea rdi, [rbp+var_440]
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rbp+var_18]
lea rsi, aH2cOversizeDst+10h; "-"
call _strcmp
cmp eax, 0
jz short loc_9E840
mov rdi, [rbp+var_18]
lea rsi, aRb; "rb"
call _fopen
mov [rbp+var_490], rax
jmp short loc_9E851
loc_9E840:
mov rax, cs:stdin_ptr
mov rax, [rax]
mov [rbp+var_490], rax
loc_9E851:
mov rax, [rbp+var_490]
mov [rbp+var_448], rax
cmp [rbp+var_448], 0
jnz short loc_9E87D
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_9E9FB
loc_9E87D:
jmp short $+2
loc_9E87F:
lea rdi, [rbp+var_420]
mov rcx, [rbp+var_448]
mov esi, 1
mov edx, 400h
call _fread
mov [rbp+var_428], rax
cmp rax, 400h
jnz short loc_9E8E1
mov rax, [rbp+var_428]
mov [rbp+var_458], eax
lea rax, [rbp+var_420]
mov [rbp+var_450], rax
mov esi, [rbp+var_458]
mov rdx, [rbp+var_450]
lea rdi, [rbp+var_440]
call buffer_append
jmp short loc_9E87F
loc_9E8E1:
cmp [rbp+var_428], 0
jbe short loc_9E91F
mov rax, [rbp+var_428]
mov [rbp+var_468], eax
lea rax, [rbp+var_420]
mov [rbp+var_460], rax
mov esi, [rbp+var_468]
mov rdx, [rbp+var_460]
lea rdi, [rbp+var_440]
call buffer_append
loc_9E91F:
mov [rbp+var_478], 1
mov [rbp+var_470], 0
mov esi, [rbp+var_478]
mov rdx, [rbp+var_470]
lea rdi, [rbp+var_440]
call buffer_append
mov eax, dword ptr [rbp+var_440]
add eax, 0FFFFFFFFh
mov dword ptr [rbp+var_440], eax
mov rdi, [rbp+var_448]
call _ferror
cmp eax, 0
jz short loc_9E9C6
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_18]
lea rsi, aErrorReadingFi; "Error reading file: %s\n"
mov al, 0
call _fprintf
lea rdi, [rbp+var_440]
call buffer_free
mov dword ptr [rbp+var_488], 0
mov [rbp+var_480], 0
mov rax, [rbp+var_488]
mov [rbp+var_440], rax
mov rax, [rbp+var_480]
mov [rbp+var_438], rax
loc_9E9C6:
mov rax, [rbp+var_448]
mov rcx, cs:stdin_ptr
cmp rax, [rcx]
jz short loc_9E9E5
mov rdi, [rbp+var_448]
call _fclose
loc_9E9E5:
mov rax, [rbp+var_440]
mov [rbp+var_10], rax
mov rax, [rbp+var_438]
mov [rbp+var_8], rax
loc_9E9FB:
mov eax, dword ptr [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 490h
pop rbp
retn
| long long bytes_read(const char *a1)
{
long long v1; // rdx
long long v3; // [rsp+0h] [rbp-490h]
long long v4; // [rsp+8h] [rbp-488h]
long long v5; // [rsp+50h] [rbp-440h] BYREF
long long v6; // [rsp+58h] [rbp-438h]
long long v7; // [rsp+68h] [rbp-428h]
_BYTE v8[1032]; // [rsp+70h] [rbp-420h] BYREF
const char *v9; // [rsp+478h] [rbp-18h]
long long v10; // [rsp+480h] [rbp-10h]
long long v11; // [rsp+488h] [rbp-8h]
v9 = a1;
memset(&v5, 0LL, 24LL);
if ( !(unsigned int)strcmp(v9, "-", v1) )
v3 = stdin;
else
v3 = fopen(v9, "rb");
if ( v3 )
{
while ( 1 )
{
v7 = fread(v8, 1LL, 1024LL, v3);
if ( v7 != 1024 )
break;
buffer_append((unsigned int *)&v5, 0x400u, (long long)v8);
}
if ( v7 )
buffer_append((unsigned int *)&v5, v7, (long long)v8);
buffer_append((unsigned int *)&v5, 1u, 0LL);
LODWORD(v5) = v5 - 1;
if ( (unsigned int)ferror(v3) )
{
fprintf(stderr, "Error reading file: %s\n", v9);
buffer_free((long long)&v5);
LODWORD(v4) = 0;
v5 = v4;
v6 = 0LL;
}
if ( v3 != stdin )
fclose(v3);
v10 = v5;
v11 = v6;
}
else
{
LODWORD(v10) = 0;
v11 = 0LL;
}
return (unsigned int)v10;
}
| bytes_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x490
MOV qword ptr [RBP + -0x18],RDI
LEA RDI,[RBP + -0x440]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x001231c0
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e8780]
CALL 0x001233f0
CMP EAX,0x0
JZ 0x0019e840
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e77aa]
CALL 0x00123560
MOV qword ptr [RBP + -0x490],RAX
JMP 0x0019e851
LAB_0019e840:
MOV RAX,qword ptr [0x00238fe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x490],RAX
LAB_0019e851:
MOV RAX,qword ptr [RBP + -0x490]
MOV qword ptr [RBP + -0x448],RAX
CMP qword ptr [RBP + -0x448],0x0
JNZ 0x0019e87d
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0019e9fb
LAB_0019e87d:
JMP 0x0019e87f
LAB_0019e87f:
LEA RDI,[RBP + -0x420]
MOV RCX,qword ptr [RBP + -0x448]
MOV ESI,0x1
MOV EDX,0x400
CALL 0x001232d0
MOV qword ptr [RBP + -0x428],RAX
CMP RAX,0x400
JNZ 0x0019e8e1
MOV RAX,qword ptr [RBP + -0x428]
MOV dword ptr [RBP + -0x458],EAX
LEA RAX,[RBP + -0x420]
MOV qword ptr [RBP + -0x450],RAX
MOV ESI,dword ptr [RBP + -0x458]
MOV RDX,qword ptr [RBP + -0x450]
LEA RDI,[RBP + -0x440]
CALL 0x0019e080
JMP 0x0019e87f
LAB_0019e8e1:
CMP qword ptr [RBP + -0x428],0x0
JBE 0x0019e91f
MOV RAX,qword ptr [RBP + -0x428]
MOV dword ptr [RBP + -0x468],EAX
LEA RAX,[RBP + -0x420]
MOV qword ptr [RBP + -0x460],RAX
MOV ESI,dword ptr [RBP + -0x468]
MOV RDX,qword ptr [RBP + -0x460]
LEA RDI,[RBP + -0x440]
CALL 0x0019e080
LAB_0019e91f:
MOV dword ptr [RBP + -0x478],0x1
MOV qword ptr [RBP + -0x470],0x0
MOV ESI,dword ptr [RBP + -0x478]
MOV RDX,qword ptr [RBP + -0x470]
LEA RDI,[RBP + -0x440]
CALL 0x0019e080
MOV EAX,dword ptr [RBP + -0x440]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x440],EAX
MOV RDI,qword ptr [RBP + -0x448]
CALL 0x00123390
CMP EAX,0x0
JZ 0x0019e9c6
MOV RAX,qword ptr [0x00238fc8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e77ad]
MOV AL,0x0
CALL 0x00123160
LEA RDI,[RBP + -0x440]
CALL 0x0019e240
MOV dword ptr [RBP + -0x488],0x0
MOV qword ptr [RBP + -0x480],0x0
MOV RAX,qword ptr [RBP + -0x488]
MOV qword ptr [RBP + -0x440],RAX
MOV RAX,qword ptr [RBP + -0x480]
MOV qword ptr [RBP + -0x438],RAX
LAB_0019e9c6:
MOV RAX,qword ptr [RBP + -0x448]
MOV RCX,qword ptr [0x00238fe8]
CMP RAX,qword ptr [RCX]
JZ 0x0019e9e5
MOV RDI,qword ptr [RBP + -0x448]
CALL 0x00123230
LAB_0019e9e5:
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x8],RAX
LAB_0019e9fb:
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x490
POP RBP
RET
|
int1 [16] bytes_read(char *param_1)
{
int iVar1;
int1 auVar2 [16];
FILE *local_498;
uint uStack_48c;
ulong local_448;
int8 local_440;
size_t local_430;
int1 local_428 [1032];
char *local_20;
ulong local_18;
int8 local_10;
local_20 = param_1;
memset(&local_448,0,0x18);
iVar1 = strcmp(local_20,"-");
if (iVar1 == 0) {
local_498 = *(FILE **)PTR_stdin_00238fe8;
}
else {
local_498 = fopen(local_20,"rb");
}
if (local_498 == (FILE *)0x0) {
local_18 = 0;
local_10 = 0;
}
else {
while (local_430 = fread(local_428,1,0x400,local_498), local_430 == 0x400) {
buffer_append(&local_448,0x400,local_428);
}
if (local_430 != 0) {
buffer_append(&local_448,local_430 & 0xffffffff,local_428);
}
buffer_append(&local_448,1,0);
local_448 = CONCAT44(local_448._4_4_,(int)local_448 + -1);
iVar1 = ferror(local_498);
if (iVar1 != 0) {
fprintf(*(FILE **)PTR_stderr_00238fc8,"Error reading file: %s\n",local_20);
buffer_free(&local_448);
local_448 = (ulong)uStack_48c << 0x20;
local_440 = 0;
}
if (local_498 != *(FILE **)PTR_stdin_00238fe8) {
fclose(local_498);
}
local_18 = local_448;
local_10 = local_440;
}
auVar2._0_8_ = local_18 & 0xffffffff;
auVar2._8_8_ = local_10;
return auVar2;
}
|
|
1,176 | bytes_read | corpus-core[P]colibri-stateless/src/util/bytes.c | bytes_t bytes_read(char* filename) {
unsigned char buffer[1024];
size_t bytesRead;
buffer_t data = {0};
FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin;
if (file == NULL) return NULL_BYTES;
while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer))
buffer_append(&data, bytes(buffer, bytesRead));
if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead));
buffer_append(&data, bytes(NULL, 1));
data.data.len--;
if (ferror(file)) {
fprintf(stderr, "Error reading file: %s\n", filename);
buffer_free(&data);
data.data = NULL_BYTES;
}
#ifndef __clang_analyzer__
if (file != stdin)
#endif
fclose(file);
return data.data;
} | O2 | c | bytes_read:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x420, %rsp # imm = 0x420
movq %rdi, %rbx
andq $0x0, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpb $0x2d, (%rdi)
jne 0x4b50f
cmpb $0x0, 0x1(%rbx)
je 0x4b5d2
leaq 0x33c51(%rip), %rsi # 0x7f167
movq %rbx, %rdi
callq 0x22530
movq %rax, %r14
testq %r14, %r14
je 0x4b5b9
leaq 0x20(%rsp), %r15
pushq $0x1
popq %r12
movq %rsp, %r13
movl $0x400, %edx # imm = 0x400
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x222e0
cmpq $0x400, %rax # imm = 0x400
jne 0x4b563
movq %r13, %rdi
movl $0x400, %esi # imm = 0x400
movq %r15, %rdx
callq 0x4b08b
jmp 0x4b536
testq %rax, %rax
je 0x4b577
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movl %eax, %esi
callq 0x4b08b
movq %rsp, %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x4b08b
movl (%r12), %r15d
decl %r15d
movl %r15d, (%r12)
movq %r14, %rdi
callq 0x223b0
testl %eax, %eax
jne 0x4b5e1
movq 0x70a43(%rip), %rax # 0xbbfe8
cmpq (%rax), %r14
je 0x4b5b2
movq %r14, %rdi
callq 0x22230
movq 0x8(%rsp), %rdx
jmp 0x4b5be
xorl %r15d, %r15d
xorl %edx, %edx
movl %r15d, %eax
addq $0x420, %rsp # imm = 0x420
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x70a0f(%rip), %rax # 0xbbfe8
movq (%rax), %r14
jmp 0x4b521
movq 0x709e0(%rip), %rax # 0xbbfc8
movq (%rax), %rdi
leaq 0x33b78(%rip), %rsi # 0x7f16a
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22140
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x4b16d
andq $0x0, 0x8(%rbx)
xorl %r15d, %r15d
jmp 0x4b59e
| bytes_read:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 420h
mov rbx, rdi
and [rsp+448h+var_438], 0
xorps xmm0, xmm0
movaps [rsp+448h+var_448], xmm0
cmp byte ptr [rdi], 2Dh ; '-'
jnz short loc_4B50F
cmp byte ptr [rbx+1], 0
jz loc_4B5D2
loc_4B50F:
lea rsi, aRb; "rb"
mov rdi, rbx
call _fopen
mov r14, rax
loc_4B521:
test r14, r14
jz loc_4B5B9
lea r15, [rsp+448h+var_428]
push 1
pop r12
mov r13, rsp
loc_4B536:
mov edx, 400h
mov rdi, r15
mov rsi, r12
mov rcx, r14
call _fread
cmp rax, 400h
jnz short loc_4B563
mov rdi, r13
mov esi, 400h
mov rdx, r15
call buffer_append
jmp short loc_4B536
loc_4B563:
test rax, rax
jz short loc_4B577
mov rdi, rsp
lea rdx, [rsp+448h+var_428]
mov esi, eax
call buffer_append
loc_4B577:
mov r12, rsp
push 1
pop rsi
mov rdi, r12
xor edx, edx
call buffer_append
mov r15d, [r12]
dec r15d
mov [r12], r15d
mov rdi, r14
call _ferror
test eax, eax
jnz short loc_4B5E1
loc_4B59E:
mov rax, cs:stdin_ptr
cmp r14, [rax]
jz short loc_4B5B2
mov rdi, r14
call _fclose
loc_4B5B2:
mov rdx, qword ptr [rsp+448h+var_448+8]
jmp short loc_4B5BE
loc_4B5B9:
xor r15d, r15d
xor edx, edx
loc_4B5BE:
mov eax, r15d
add rsp, 420h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4B5D2:
mov rax, cs:stdin_ptr
mov r14, [rax]
jmp loc_4B521
loc_4B5E1:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorReadingFi; "Error reading file: %s\n"
mov rdx, rbx
xor eax, eax
call _fprintf
mov rbx, rsp
mov rdi, rbx
call buffer_free
and qword ptr [rbx+8], 0
xor r15d, r15d
jmp short loc_4B59E
| long long bytes_read(long long a1)
{
long long v1; // r14
long long v2; // rax
unsigned int v3; // r15d
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
__int128 v9; // [rsp+0h] [rbp-448h] BYREF
long long v10; // [rsp+10h] [rbp-438h]
_BYTE v11[1064]; // [rsp+20h] [rbp-428h] BYREF
v10 = 0LL;
v9 = 0LL;
if ( *(_BYTE *)a1 == 45 && !*(_BYTE *)(a1 + 1) )
v1 = stdin;
else
v1 = fopen(a1, "rb");
if ( v1 )
{
while ( 1 )
{
v2 = fread(v11, 1LL, 1024LL, v1);
if ( v2 != 1024 )
break;
buffer_append((unsigned int *)&v9, 0x400u, (long long)v11);
}
if ( v2 )
buffer_append((unsigned int *)&v9, v2, (long long)v11);
buffer_append((unsigned int *)&v9, 1u, 0LL);
v3 = v9 - 1;
LODWORD(v9) = v9 - 1;
if ( (unsigned int)ferror(v1, 1LL, v4, v5, v6, v7, v9, *((_QWORD *)&v9 + 1), v10) )
{
fprintf(stderr, "Error reading file: %s\n", (const char *)a1);
buffer_free((long long)&v9);
*((_QWORD *)&v9 + 1) = 0LL;
v3 = 0;
}
if ( v1 != stdin )
fclose(v1);
}
else
{
return 0;
}
return v3;
}
| bytes_read:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x420
MOV RBX,RDI
AND qword ptr [RSP + 0x10],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP byte ptr [RDI],0x2d
JNZ 0x0014b50f
CMP byte ptr [RBX + 0x1],0x0
JZ 0x0014b5d2
LAB_0014b50f:
LEA RSI,[0x17f167]
MOV RDI,RBX
CALL 0x00122530
MOV R14,RAX
LAB_0014b521:
TEST R14,R14
JZ 0x0014b5b9
LEA R15,[RSP + 0x20]
PUSH 0x1
POP R12
MOV R13,RSP
LAB_0014b536:
MOV EDX,0x400
MOV RDI,R15
MOV RSI,R12
MOV RCX,R14
CALL 0x001222e0
CMP RAX,0x400
JNZ 0x0014b563
MOV RDI,R13
MOV ESI,0x400
MOV RDX,R15
CALL 0x0014b08b
JMP 0x0014b536
LAB_0014b563:
TEST RAX,RAX
JZ 0x0014b577
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
MOV ESI,EAX
CALL 0x0014b08b
LAB_0014b577:
MOV R12,RSP
PUSH 0x1
POP RSI
MOV RDI,R12
XOR EDX,EDX
CALL 0x0014b08b
MOV R15D,dword ptr [R12]
DEC R15D
MOV dword ptr [R12],R15D
MOV RDI,R14
CALL 0x001223b0
TEST EAX,EAX
JNZ 0x0014b5e1
LAB_0014b59e:
MOV RAX,qword ptr [0x001bbfe8]
CMP R14,qword ptr [RAX]
JZ 0x0014b5b2
MOV RDI,R14
CALL 0x00122230
LAB_0014b5b2:
MOV RDX,qword ptr [RSP + 0x8]
JMP 0x0014b5be
LAB_0014b5b9:
XOR R15D,R15D
XOR EDX,EDX
LAB_0014b5be:
MOV EAX,R15D
ADD RSP,0x420
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014b5d2:
MOV RAX,qword ptr [0x001bbfe8]
MOV R14,qword ptr [RAX]
JMP 0x0014b521
LAB_0014b5e1:
MOV RAX,qword ptr [0x001bbfc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x17f16a]
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00122140
MOV RBX,RSP
MOV RDI,RBX
CALL 0x0014b16d
AND qword ptr [RBX + 0x8],0x0
XOR R15D,R15D
JMP 0x0014b59e
|
int1 [16] bytes_read(char *param_1)
{
int iVar1;
FILE *__stream;
size_t sVar2;
uint uVar3;
int1 auVar4 [16];
int8 local_448;
int8 uStack_440;
int8 local_438;
int1 local_428 [1024];
local_438 = 0;
local_448 = 0;
uStack_440 = 0;
if ((*param_1 == '-') && (param_1[1] == '\0')) {
__stream = *(FILE **)PTR_stdin_001bbfe8;
}
else {
__stream = fopen(param_1,"rb");
}
if (__stream == (FILE *)0x0) {
uVar3 = 0;
uStack_440 = 0;
}
else {
while (sVar2 = fread(local_428,1,0x400,__stream), sVar2 == 0x400) {
buffer_append(&local_448,0x400,local_428);
}
if (sVar2 != 0) {
buffer_append(&local_448,sVar2 & 0xffffffff,local_428);
}
buffer_append(&local_448,1,0);
uVar3 = (int)local_448 - 1;
local_448 = CONCAT44(local_448._4_4_,uVar3);
iVar1 = ferror(__stream);
if (iVar1 != 0) {
fprintf(*(FILE **)PTR_stderr_001bbfc8,"Error reading file: %s\n",param_1);
buffer_free(&local_448);
uStack_440 = 0;
uVar3 = 0;
}
if (__stream != *(FILE **)PTR_stdin_001bbfe8) {
fclose(__stream);
}
}
auVar4._4_4_ = 0;
auVar4._0_4_ = uVar3;
auVar4._8_8_ = uStack_440;
return auVar4;
}
|
|
1,177 | bytes_read | corpus-core[P]colibri-stateless/src/util/bytes.c | bytes_t bytes_read(char* filename) {
unsigned char buffer[1024];
size_t bytesRead;
buffer_t data = {0};
FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin;
if (file == NULL) return NULL_BYTES;
while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer))
buffer_append(&data, bytes(buffer, bytesRead));
if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead));
buffer_append(&data, bytes(NULL, 1));
data.data.len--;
if (ferror(file)) {
fprintf(stderr, "Error reading file: %s\n", filename);
buffer_free(&data);
data.data = NULL_BYTES;
}
#ifndef __clang_analyzer__
if (file != stdin)
#endif
fclose(file);
return data.data;
} | O3 | c | bytes_read:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp # imm = 0x420
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpb $0x2d, (%rdi)
jne 0x53578
cmpb $0x0, 0x1(%rbx)
je 0x5363b
leaq 0x38bd8(%rip), %rsi # 0x8c157
movq %rbx, %rdi
callq 0x22500
movq %rax, %r14
testq %r14, %r14
je 0x53623
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movl $0x1, %esi
movl $0x400, %edx # imm = 0x400
movq %r15, %rdi
movq %r14, %rcx
callq 0x222d0
cmpq $0x400, %rax # imm = 0x400
jne 0x535ca
movq %r12, %rdi
movl $0x400, %esi # imm = 0x400
movq %r15, %rdx
callq 0x53029
jmp 0x5359b
testq %rax, %rax
je 0x535de
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movl %eax, %esi
callq 0x53029
xorl %r15d, %r15d
movq %rsp, %r12
movq %r12, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x53029
movl (%r12), %ebp
movq %r14, %rdi
callq 0x22380
testl %eax, %eax
jne 0x5364a
decl %ebp
movl %ebp, %r15d
movq 0x6d9d9(%rip), %rax # 0xc0fe8
cmpq (%rax), %r14
je 0x5361c
movq %r14, %rdi
callq 0x22220
movq 0x8(%rsp), %rdx
jmp 0x53628
xorl %r15d, %r15d
xorl %edx, %edx
movl %r15d, %eax
addq $0x420, %rsp # imm = 0x420
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6d9a6(%rip), %rax # 0xc0fe8
movq (%rax), %r14
jmp 0x5358a
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x230ba
jmp 0x53608
| bytes_read:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 420h
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+448h+var_448], xmm0
mov [rsp+448h+var_438], 0
cmp byte ptr [rdi], 2Dh ; '-'
jnz short loc_53578
cmp byte ptr [rbx+1], 0
jz loc_5363B
loc_53578:
lea rsi, aRb; "rb"
mov rdi, rbx
call _fopen
mov r14, rax
loc_5358A:
test r14, r14
jz loc_53623
lea r15, [rsp+448h+var_428]
mov r12, rsp
loc_5359B:
mov esi, 1
mov edx, 400h
mov rdi, r15
mov rcx, r14
call _fread
cmp rax, 400h
jnz short loc_535CA
mov rdi, r12
mov esi, 400h
mov rdx, r15
call buffer_append
jmp short loc_5359B
loc_535CA:
test rax, rax
jz short loc_535DE
mov rdi, rsp
lea rdx, [rsp+448h+var_428]
mov esi, eax
call buffer_append
loc_535DE:
xor r15d, r15d
mov r12, rsp
mov rdi, r12
mov esi, 1
xor edx, edx
call buffer_append
mov ebp, [r12]
mov rdi, r14
call _ferror
test eax, eax
jnz short loc_5364A
dec ebp
mov r15d, ebp
loc_53608:
mov rax, cs:stdin_ptr
cmp r14, [rax]
jz short loc_5361C
mov rdi, r14
call _fclose
loc_5361C:
mov rdx, qword ptr [rsp+448h+var_448+8]
jmp short loc_53628
loc_53623:
xor r15d, r15d
xor edx, edx
loc_53628:
mov eax, r15d
add rsp, 420h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5363B:
mov rax, cs:stdin_ptr
mov r14, [rax]
jmp loc_5358A
loc_5364A:
mov rsi, rsp
mov rdi, rbx
call bytes_read_cold_1
jmp short loc_53608
| long long bytes_read(long long a1)
{
long long v1; // r14
long long v2; // rax
unsigned int v3; // r15d
int v4; // ebp
__int128 v6; // [rsp+0h] [rbp-448h] BYREF
long long v7; // [rsp+10h] [rbp-438h]
_BYTE v8[1064]; // [rsp+20h] [rbp-428h] BYREF
v6 = 0LL;
v7 = 0LL;
if ( *(_BYTE *)a1 == 45 && !*(_BYTE *)(a1 + 1) )
v1 = stdin;
else
v1 = fopen(a1, "rb");
if ( v1 )
{
while ( 1 )
{
v2 = fread(v8, 1LL, 1024LL, v1);
if ( v2 != 1024 )
break;
buffer_append((unsigned int *)&v6, 0x400u, (long long)v8);
}
if ( v2 )
buffer_append((unsigned int *)&v6, v2, (long long)v8);
v3 = 0;
buffer_append((unsigned int *)&v6, 1u, 0LL);
v4 = v6;
if ( (unsigned int)ferror(v1) )
bytes_read_cold_1((const char *)a1, (long long)&v6);
else
v3 = v4 - 1;
if ( v1 != stdin )
fclose(v1);
}
else
{
return 0;
}
return v3;
}
| bytes_read:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x420
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
CMP byte ptr [RDI],0x2d
JNZ 0x00153578
CMP byte ptr [RBX + 0x1],0x0
JZ 0x0015363b
LAB_00153578:
LEA RSI,[0x18c157]
MOV RDI,RBX
CALL 0x00122500
MOV R14,RAX
LAB_0015358a:
TEST R14,R14
JZ 0x00153623
LEA R15,[RSP + 0x20]
MOV R12,RSP
LAB_0015359b:
MOV ESI,0x1
MOV EDX,0x400
MOV RDI,R15
MOV RCX,R14
CALL 0x001222d0
CMP RAX,0x400
JNZ 0x001535ca
MOV RDI,R12
MOV ESI,0x400
MOV RDX,R15
CALL 0x00153029
JMP 0x0015359b
LAB_001535ca:
TEST RAX,RAX
JZ 0x001535de
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
MOV ESI,EAX
CALL 0x00153029
LAB_001535de:
XOR R15D,R15D
MOV R12,RSP
MOV RDI,R12
MOV ESI,0x1
XOR EDX,EDX
CALL 0x00153029
MOV EBP,dword ptr [R12]
MOV RDI,R14
CALL 0x00122380
TEST EAX,EAX
JNZ 0x0015364a
DEC EBP
MOV R15D,EBP
LAB_00153608:
MOV RAX,qword ptr [0x001c0fe8]
CMP R14,qword ptr [RAX]
JZ 0x0015361c
MOV RDI,R14
CALL 0x00122220
LAB_0015361c:
MOV RDX,qword ptr [RSP + 0x8]
JMP 0x00153628
LAB_00153623:
XOR R15D,R15D
XOR EDX,EDX
LAB_00153628:
MOV EAX,R15D
ADD RSP,0x420
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015363b:
MOV RAX,qword ptr [0x001c0fe8]
MOV R14,qword ptr [RAX]
JMP 0x0015358a
LAB_0015364a:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001230ba
JMP 0x00153608
|
int1 [16] bytes_read(char *param_1)
{
int iVar1;
int iVar2;
FILE *__stream;
size_t sVar3;
uint uVar4;
int1 auVar5 [16];
int8 local_448;
int8 uStack_440;
int8 local_438;
int1 local_428 [1024];
local_448 = 0;
uStack_440 = 0;
local_438 = 0;
if ((*param_1 == '-') && (param_1[1] == '\0')) {
__stream = *(FILE **)PTR_stdin_001c0fe8;
}
else {
__stream = fopen(param_1,"rb");
}
if (__stream == (FILE *)0x0) {
uVar4 = 0;
uStack_440 = 0;
}
else {
while (sVar3 = fread(local_428,1,0x400,__stream), sVar3 == 0x400) {
buffer_append(&local_448,0x400,local_428);
}
if (sVar3 != 0) {
buffer_append(&local_448,sVar3 & 0xffffffff,local_428);
}
uVar4 = 0;
buffer_append(&local_448,1,0);
iVar1 = (int)local_448;
iVar2 = ferror(__stream);
if (iVar2 == 0) {
uVar4 = iVar1 - 1;
}
else {
bytes_read_cold_1(param_1,&local_448);
}
if (__stream != *(FILE **)PTR_stdin_001c0fe8) {
fclose(__stream);
}
}
auVar5._4_4_ = 0;
auVar5._0_4_ = uVar4;
auVar5._8_8_ = uStack_440;
return auVar5;
}
|
|
1,178 | minja::Parser::parseCallArgs() | monkey531[P]llama/common/minja.hpp | ArgumentsExpression parseCallArgs() {
consumeSpaces();
if (consumeToken("(").empty()) throw std::runtime_error("Expected opening parenthesis in call args");
ArgumentsExpression result;
while (it != end) {
if (!consumeToken(")").empty()) {
return result;
}
auto expr = parseExpression();
if (!expr) throw std::runtime_error("Expected expression in call args");
if (auto ident = dynamic_cast<VariableExpr*>(expr.get())) {
if (!consumeToken("=").empty()) {
auto value = parseExpression();
if (!value) throw std::runtime_error("Expected expression in for named arg");
result.kwargs.emplace_back(ident->get_name(), std::move(value));
} else {
result.args.emplace_back(std::move(expr));
}
} else {
result.args.emplace_back(std::move(expr));
}
if (consumeToken(",").empty()) {
if (consumeToken(")").empty()) {
throw std::runtime_error("Expected closing parenthesis in call args");
}
return result;
}
}
throw std::runtime_error("Expected closing parenthesis in call args");
} | O2 | cpp | minja::Parser::parseCallArgs():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x4c1b0
leaq 0x54a8f(%rip), %rsi # 0xa5bb1
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x29014
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r12, %rsi
callq 0x4b8b2
leaq 0x58(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x22f98
leaq 0x30(%rsp), %rdi
callq 0x22f98
testq %rbx, %rbx
je 0x5143f
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x18, %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x30(%rsp), %r15
leaq 0x18(%rsp), %r14
leaq 0x58(%rsp), %rbx
pushq $0x1
popq %r13
movq 0x20(%r12), %rax
cmpq 0x18(%r12), %rax
je 0x51391
movq %r15, %rdi
leaq 0x546da(%rip), %rsi # 0xa5893
movq %r14, %rdx
callq 0x29014
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x4b8b2
movq 0x60(%rsp), %rbp
movq %rbx, %rdi
callq 0x22f98
movq %r15, %rdi
callq 0x22f98
testq %rbp, %rbp
jne 0x5137d
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x4b0c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x513c3
leaq 0x9004d(%rip), %rsi # 0xe1260
leaq 0x905ae(%rip), %rdx # 0xe17c8
xorl %ecx, %ecx
callq 0x228d0
testq %rax, %rax
je 0x512be
movq %rax, %rbp
movq %r15, %rdi
leaq 0x4cdd0(%rip), %rsi # 0x9e007
leaq 0xf(%rsp), %rdx
callq 0x29014
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x4b8b2
movq 0x60(%rsp), %r14
movq %rbx, %rdi
callq 0x22f98
movq %r15, %rdi
callq 0x22f98
testq %r14, %r14
leaq 0x18(%rsp), %r14
je 0x512be
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x4b0c0
cmpq $0x0, 0x30(%rsp)
je 0x513df
addq $0x20, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x22ac0
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5e078
movq %rbx, %rdi
callq 0x22f98
leaq 0x38(%rsp), %rdi
callq 0x3542e
jmp 0x512cb
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x5028c
movq %r15, %rdi
leaq 0x4a513(%rip), %rsi # 0x9b7e8
leaq 0xf(%rsp), %rdx
callq 0x29014
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x4b8b2
movq 0x60(%rsp), %rbp
movq %rbx, %rdi
callq 0x22f98
movq %r15, %rdi
callq 0x22f98
testq %rbp, %rbp
jne 0x51359
movq %r15, %rdi
leaq 0x5457f(%rip), %rsi # 0xa5893
leaq 0xf(%rsp), %rdx
callq 0x29014
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x4b8b2
movq 0x60(%rsp), %r14
movq %rbx, %rdi
callq 0x22f98
movq %r15, %rdi
callq 0x22f98
movb $0x1, %al
movq %rax, 0x28(%rsp)
testq %r14, %r14
leaq 0x18(%rsp), %r14
je 0x5140f
leaq 0x20(%rsp), %rdi
callq 0x3542e
testq %rbp, %rbp
jne 0x5119f
testb $0x1, 0x28(%rsp)
jne 0x5137d
movq 0x10(%rsp), %rdi
callq 0x5155e
movq 0x10(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %r14
leaq 0x4e498(%rip), %rsi # 0x9f83b
movq %rax, %rdi
callq 0x222b0
movq 0x91c3e(%rip), %rsi # 0xe2ff0
movq 0x91baf(%rip), %rdx # 0xe2f68
movq %r14, %rdi
callq 0x22d40
jmp 0x5140f
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %r14
leaq 0x4e420(%rip), %rsi # 0x9f7f5
movq %rax, %rdi
callq 0x222b0
jmp 0x51429
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %r14
leaq 0x4e425(%rip), %rsi # 0x9f816
movq %rax, %rdi
callq 0x222b0
movq 0x91bf0(%rip), %rsi # 0xe2ff0
movq 0x91b61(%rip), %rdx # 0xe2f68
movq %r14, %rdi
callq 0x22d40
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %r14
leaq 0x4e41a(%rip), %rsi # 0x9f83b
movq %rax, %rdi
callq 0x222b0
movq 0x91bc0(%rip), %rsi # 0xe2ff0
movq 0x91b31(%rip), %rdx # 0xe2f68
movq %r14, %rdi
callq 0x22d40
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %r14
leaq 0x4e37a(%rip), %rsi # 0x9f7cb
movq %rax, %rdi
callq 0x222b0
movq 0x91b90(%rip), %rsi # 0xe2ff0
movq 0x91b01(%rip), %rdx # 0xe2f68
movq %r14, %rdi
callq 0x22d40
movq %rax, %rbx
movq %r14, %rdi
callq 0x225c0
jmp 0x5152e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22f98
jmp 0x5152e
movq %rax, %rbx
jmp 0x5152e
jmp 0x514ce
jmp 0x514bd
movq %rax, %rbx
movq %r14, %rdi
callq 0x225c0
jmp 0x514c0
jmp 0x51503
jmp 0x514f4
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x22f98
jmp 0x514c0
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3542e
jmp 0x51506
jmp 0x51503
movq %rax, %rbx
movq %r14, %rdi
callq 0x225c0
jmp 0x51506
jmp 0x51521
movq %rax, %rbx
movq %r14, %rdi
callq 0x225c0
jmp 0x51524
jmp 0x51503
jmp 0x51503
jmp 0x514f4
jmp 0x51503
jmp 0x51521
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22f98
jmp 0x51506
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3542e
jmp 0x51524
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22f98
jmp 0x51524
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x5155e
movq %rbx, %rdi
callq 0x22da0
| _ZN5minja6Parser13parseCallArgsEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r12, rsi
mov [rsp+0A8h+var_98], rdi
push 1
pop rsi
mov rdi, r12
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
lea rsi, asc_A5BAC+5; "("
lea rdi, [rsp+0A8h+var_78]
lea rdx, [rsp+0A8h+lpsrc]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_50]
lea rdx, [rsp+0A8h+var_78]
push 1
pop rcx
mov rsi, r12
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0A8h+var_50]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbx, rbx
jz loc_5143F
xorps xmm0, xmm0
mov rax, [rsp+0A8h+var_98]
movups xmmword ptr [rax+20h], xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
add rax, 18h
mov [rsp+0A8h+var_58], rax
mov [rsp+0A8h+var_80], 0
lea r15, [rsp+0A8h+var_78]
lea r14, [rsp+0A8h+lpsrc]
lea rbx, [rsp+0A8h+var_50]
push 1
pop r13
loc_5119F:
mov rax, [r12+20h]
cmp rax, [r12+18h]
jz loc_51391
mov rdi, r15
lea rsi, a09401910201912+51h; ")"
mov rdx, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, r13d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+0A8h+var_48]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jnz loc_5137D
mov rdi, r14; this
mov rsi, r12; bool
mov edx, r13d
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
mov rdi, [rsp+0A8h+lpsrc]; lpsrc
test rdi, rdi
jz loc_513C3
lea rsi, _ZTIN5minja10ExpressionE; lpstype
lea rdx, _ZTIN5minja12VariableExprE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz loc_512BE
mov rbp, rax
mov rdi, r15
lea rsi, asc_9E006+1; "="
lea rdx, [rsp+0A8h+var_99]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, r13d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov r14, [rsp+0A8h+var_48]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r14, r14
lea r14, [rsp+0A8h+lpsrc]
jz short loc_512BE
mov rdi, r15; this
mov rsi, r12; bool
mov edx, r13d
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
cmp [rsp+0A8h+var_78], 0
jz loc_513DF
add rbp, 20h ; ' '
mov rdi, rbx
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, [rsp+0A8h+var_58]
mov rsi, rbx
mov rdx, r15
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE12emplace_backIJS6_SA_EEERSB_DpOT_; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::emplace_back<std::string,std::shared_ptr<minja::Expression>>(std::string,std::shared_ptr<minja::Expression> &&)
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_512CB
loc_512BE:
mov rdi, [rsp+0A8h+var_98]
mov rsi, r14
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&)
loc_512CB:
mov rdi, r15
lea rsi, aSamplesNsS_0+14h; ","
lea rdx, [rsp+0A8h+var_99]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, r13d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+0A8h+var_48]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jnz short loc_51359
mov rdi, r15
lea rsi, a09401910201912+51h; ")"
lea rdx, [rsp+0A8h+var_99]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, r13d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov r14, [rsp+0A8h+var_48]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov al, 1
mov [rsp+0A8h+var_80], rax
test r14, r14
lea r14, [rsp+0A8h+lpsrc]
jz loc_5140F
loc_51359:
lea rdi, [rsp+0A8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
test rbp, rbp
jnz loc_5119F
test byte ptr [rsp+0A8h+var_80], 1
jnz short loc_5137D
mov rdi, [rsp+0A8h+var_98]; this
call _ZN5minja19ArgumentsExpressionD2Ev; minja::ArgumentsExpression::~ArgumentsExpression()
loc_5137D:
mov rax, [rsp+0A8h+var_98]
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_51391:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_1; "Expected closing parenthesis in call ar"...
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, r14; void *
call ___cxa_throw
jmp short loc_5140F
loc_513C3:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_0; "Expected expression in call args"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_51429
loc_513DF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_1; "Expected expression in for named arg"
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, r14; void *
call ___cxa_throw
loc_5140F:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_1; "Expected closing parenthesis in call ar"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_51429:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_5143F:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedOpenin_0; "Expected opening parenthesis in call ar"...
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, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_5152E
mov rbx, rax
lea rdi, [rsp+0A8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_5152E
mov rbx, rax
jmp loc_5152E
jmp short loc_514CE
jmp short loc_514BD
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_514C0
jmp short loc_51503
jmp short loc_514F4
mov rbx, rax
lea rdi, [rsp+0A8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_514C0
loc_514BD:
mov rbx, rax
loc_514C0:
lea rdi, [rsp+0A8h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_51506
jmp short loc_51503
loc_514CE:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_51506
jmp short loc_51521
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_51524
jmp short loc_51503
jmp short loc_51503
jmp short loc_514F4
jmp short loc_51503
jmp short loc_51521
loc_514F4:
mov rbx, rax
lea rdi, [rsp+0A8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_51506
loc_51503:
mov rbx, rax
loc_51506:
lea rdi, [rsp+0A8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_51524
mov rbx, rax
lea rdi, [rsp+0A8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_51524
loc_51521:
mov rbx, rax
loc_51524:
mov rdi, [rsp+0A8h+var_98]; this
call _ZN5minja19ArgumentsExpressionD2Ev; minja::ArgumentsExpression::~ArgumentsExpression()
loc_5152E:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseCallArgs(minja::Parser *this, _QWORD *a2)
{
long long v2; // rbx
long long v3; // rbp
char *v4; // rax
char *v5; // rbp
long long v6; // r14
long long v7; // rbp
long long v8; // r14
long long v9; // rax
std::runtime_error *v11; // r14
std::runtime_error *v12; // r14
std::runtime_error *v13; // r14
std::runtime_error *exception; // r14
__int128 lpsrc; // [rsp+18h] [rbp-90h] BYREF
long long v16; // [rsp+28h] [rbp-80h]
long long v17; // [rsp+30h] [rbp-78h] BYREF
long long v18[3]; // [rsp+38h] [rbp-70h] BYREF
char *v19; // [rsp+50h] [rbp-58h]
long long v20; // [rsp+58h] [rbp-50h] BYREF
long long v21; // [rsp+60h] [rbp-48h]
minja::Parser::consumeSpaces((long long)a2, 1);
std::string::basic_string<std::allocator<char>>(&v17, (long long)"(");
minja::Parser::consumeToken(&v20, (long long)a2, &v17, 1u);
v2 = v21;
std::string::~string(&v20);
std::string::~string(&v17);
if ( !v2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected opening parenthesis in call args");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
v19 = (char *)this + 24;
v16 = 0LL;
do
{
if ( a2[4] == a2[3] )
{
v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v11, "Expected closing parenthesis in call args");
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::basic_string<std::allocator<char>>(&v17, (long long)")");
minja::Parser::consumeToken(&v20, (long long)a2, &v17, 1u);
v3 = v21;
std::string::~string(&v20);
std::string::~string(&v17);
if ( v3 )
return this;
minja::Parser::parseExpression((minja::Parser *)&lpsrc, a2, 1);
if ( !(_QWORD)lpsrc )
{
v12 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v12, "Expected expression in call args");
goto LABEL_21;
}
v4 = (char *)__dynamic_cast(
(const void *)lpsrc,
(const struct __class_type_info *)&`typeinfo for'minja::Expression,
(const struct __class_type_info *)&`typeinfo for'minja::VariableExpr,
0LL);
if ( v4
&& (v5 = v4,
std::string::basic_string<std::allocator<char>>(&v17, (long long)"="),
minja::Parser::consumeToken(&v20, (long long)a2, &v17, 1u),
v6 = v21,
std::string::~string(&v20),
std::string::~string(&v17),
v6) )
{
minja::Parser::parseExpression((minja::Parser *)&v17, a2, 1);
if ( !v17 )
{
v13 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v13, "Expected expression in for named arg");
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::basic_string(&v20, v5 + 32);
std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::emplace_back<std::string,std::shared_ptr<minja::Expression>>(
v19,
&v20,
&v17);
std::string::~string(&v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v18);
}
else
{
std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(
(long long)this,
&lpsrc);
}
std::string::basic_string<std::allocator<char>>(&v17, (long long)",");
minja::Parser::consumeToken(&v20, (long long)a2, &v17, 1u);
v7 = v21;
std::string::~string(&v20);
std::string::~string(&v17);
if ( !v7 )
{
std::string::basic_string<std::allocator<char>>(&v17, (long long)")");
minja::Parser::consumeToken(&v20, (long long)a2, &v17, 1u);
v8 = v21;
std::string::~string(&v20);
std::string::~string(&v17);
LOBYTE(v9) = 1;
v16 = v9;
if ( !v8 )
{
v12 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v12, "Expected closing parenthesis in call args");
LABEL_21:
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&lpsrc + 1);
}
while ( v7 );
if ( (v16 & 1) == 0 )
minja::ArgumentsExpression::~ArgumentsExpression(this);
return this;
}
| parseCallArgs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R12,RSI
MOV qword ptr [RSP + 0x10],RDI
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x0014c1b0
LAB_0015111b:
LEA RSI,[0x1a5bb1]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x18]
CALL 0x00129014
LAB_00151131:
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R12
CALL 0x0014b8b2
LEA RDI,[RSP + 0x58]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x00122f98
LEA RDI,[RSP + 0x30]
CALL 0x00122f98
TEST RBX,RBX
JZ 0x0015143f
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP + 0x10]
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
ADD RAX,0x18
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x28],0x0
LEA R15,[RSP + 0x30]
LEA R14,[RSP + 0x18]
LEA RBX,[RSP + 0x58]
PUSH 0x1
POP R13
LAB_0015119f:
MOV RAX,qword ptr [R12 + 0x20]
CMP RAX,qword ptr [R12 + 0x18]
JZ 0x00151391
LAB_001511af:
MOV RDI,R15
LEA RSI,[0x1a5893]
MOV RDX,R14
CALL 0x00129014
LAB_001511c1:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,R13D
CALL 0x0014b8b2
MOV RBP,qword ptr [RSP + 0x60]
MOV RDI,RBX
CALL 0x00122f98
MOV RDI,R15
CALL 0x00122f98
TEST RBP,RBP
JNZ 0x0015137d
LAB_001511f0:
MOV RDI,R14
MOV RSI,R12
MOV EDX,R13D
CALL 0x0014b0c0
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001513c3
LEA RSI,[0x1e1260]
LEA RDX,[0x1e17c8]
XOR ECX,ECX
CALL 0x001228d0
TEST RAX,RAX
JZ 0x001512be
LAB_0015122a:
MOV RBP,RAX
MOV RDI,R15
LEA RSI,[0x19e007]
LEA RDX,[RSP + 0xf]
CALL 0x00129014
LAB_00151241:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,R13D
CALL 0x0014b8b2
MOV R14,qword ptr [RSP + 0x60]
MOV RDI,RBX
CALL 0x00122f98
MOV RDI,R15
CALL 0x00122f98
TEST R14,R14
LEA R14,[RSP + 0x18]
JZ 0x001512be
LAB_00151271:
MOV RDI,R15
MOV RSI,R12
MOV EDX,R13D
CALL 0x0014b0c0
CMP qword ptr [RSP + 0x30],0x0
JZ 0x001513df
ADD RBP,0x20
LAB_0015128f:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00122ac0
LAB_0015129a:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,RBX
MOV RDX,R15
CALL 0x0015e078
MOV RDI,RBX
CALL 0x00122f98
LEA RDI,[RSP + 0x38]
CALL 0x0013542e
JMP 0x001512cb
LAB_001512be:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R14
CALL 0x0015028c
LAB_001512cb:
MOV RDI,R15
LEA RSI,[0x19b7e8]
LEA RDX,[RSP + 0xf]
CALL 0x00129014
LAB_001512df:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,R13D
CALL 0x0014b8b2
MOV RBP,qword ptr [RSP + 0x60]
MOV RDI,RBX
CALL 0x00122f98
MOV RDI,R15
CALL 0x00122f98
TEST RBP,RBP
JNZ 0x00151359
LAB_0015130a:
MOV RDI,R15
LEA RSI,[0x1a5893]
LEA RDX,[RSP + 0xf]
CALL 0x00129014
LAB_0015131e:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,R13D
CALL 0x0014b8b2
LAB_0015132f:
MOV R14,qword ptr [RSP + 0x60]
MOV RDI,RBX
CALL 0x00122f98
MOV RDI,R15
CALL 0x00122f98
MOV AL,0x1
MOV qword ptr [RSP + 0x28],RAX
TEST R14,R14
LEA R14,[RSP + 0x18]
JZ 0x0015140f
LAB_00151359:
LEA RDI,[RSP + 0x20]
CALL 0x0013542e
TEST RBP,RBP
JNZ 0x0015119f
TEST byte ptr [RSP + 0x28],0x1
JNZ 0x0015137d
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015155e
LAB_0015137d:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00151391:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV R14,RAX
LAB_0015139c:
LEA RSI,[0x19f83b]
MOV RDI,RAX
CALL 0x001222b0
LAB_001513ab:
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,R14
CALL 0x00122d40
LAB_001513c3:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV R14,RAX
LAB_001513ce:
LEA RSI,[0x19f7f5]
MOV RDI,RAX
CALL 0x001222b0
LAB_001513dd:
JMP 0x00151429
LAB_001513df:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV R14,RAX
LAB_001513ea:
LEA RSI,[0x19f816]
MOV RDI,RAX
CALL 0x001222b0
LAB_001513f9:
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,R14
CALL 0x00122d40
LAB_0015140f:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV R14,RAX
LAB_0015141a:
LEA RSI,[0x19f83b]
MOV RDI,RAX
CALL 0x001222b0
LAB_00151429:
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,R14
CALL 0x00122d40
LAB_0015143f:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV R14,RAX
LAB_0015144a:
LEA RSI,[0x19f7cb]
MOV RDI,RAX
CALL 0x001222b0
LAB_00151459:
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,R14
CALL 0x00122d40
|
/* minja::Parser::parseCallArgs() */
ArgumentsExpression * minja::Parser::parseCallArgs(void)
{
long lVar1;
long lVar2;
int8 uVar3;
runtime_error *prVar4;
long in_RSI;
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*in_RDI;
allocator local_99;
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*local_98;
long local_90;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_88 [8];
ulong local_80;
long local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [24];
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*local_58;
string local_50 [8];
long local_48;
local_98 = in_RDI;
consumeSpaces();
/* try { // try from 0015111b to 00151130 has its CatchHandler @ 00151491 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_78,"(",(allocator *)&local_90)
;
/* try { // try from 00151131 to 00151145 has its CatchHandler @ 0015147f */
consumeToken(local_50);
lVar2 = local_48;
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_78);
if (lVar2 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015144a to 00151458 has its CatchHandler @ 0015146f */
std::runtime_error::runtime_error(prVar4,"Expected opening parenthesis in call args");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
*(int8 *)(local_98 + 0x20) = 0;
*(int8 *)(local_98 + 0x28) = 0;
*(int8 *)(local_98 + 0x10) = 0;
*(int8 *)(local_98 + 0x18) = 0;
*(int8 *)local_98 = 0;
*(int8 *)(local_98 + 8) = 0;
local_58 = local_98 + 0x18;
local_80 = 0;
do {
if (*(long *)(in_RSI + 0x20) == *(long *)(in_RSI + 0x18)) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015139c to 001513aa has its CatchHandler @ 001514dd */
std::runtime_error::runtime_error(prVar4,"Expected closing parenthesis in call args");
/* try { // try from 001513ab to 001513c0 has its CatchHandler @ 001514db */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
/* try { // try from 001511af to 001511c0 has its CatchHandler @ 00151521 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_78,")",(allocator *)&local_90);
/* try { // try from 001511c1 to 001511d1 has its CatchHandler @ 00151512 */
consumeToken(local_50);
lVar2 = local_48;
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_78);
if (lVar2 != 0) {
return (ArgumentsExpression *)local_98;
}
/* try { // try from 001511f0 to 001511fd has its CatchHandler @ 001514f2 */
parseExpression(SUB81((allocator *)&local_90,0));
if (local_90 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001513ce to 001513dc has its CatchHandler @ 001514ce */
std::runtime_error::runtime_error(prVar4,"Expected expression in call args");
goto LAB_00151429;
}
lVar2 = __dynamic_cast(local_90,&Expression::typeinfo,&VariableExpr::typeinfo,0);
if (lVar2 == 0) {
LAB_001512be:
/* try { // try from 001512be to 001512ca has its CatchHandler @ 001514ea */
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::emplace_back<std::shared_ptr<minja::Expression>>(local_98,(shared_ptr *)&local_90);
}
else {
/* try { // try from 0015122a to 00151240 has its CatchHandler @ 001514ec */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_78,"=",&local_99);
/* try { // try from 00151241 to 00151251 has its CatchHandler @ 001514ee */
consumeToken(local_50);
lVar1 = local_48;
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_78);
if (lVar1 == 0) goto LAB_001512be;
/* try { // try from 00151271 to 0015127e has its CatchHandler @ 001514cc */
parseExpression(SUB81((string *)&local_78,0));
if (local_78 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001513ea to 001513f8 has its CatchHandler @ 0015149d */
std::runtime_error::runtime_error(prVar4,"Expected expression in for named arg");
/* try { // try from 001513f9 to 0015140e has its CatchHandler @ 0015149b */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
/* try { // try from 0015128f to 00151299 has its CatchHandler @ 001514bd */
std::__cxx11::string::string(local_50,(string *)(lVar2 + 0x20));
/* try { // try from 0015129a to 001512a9 has its CatchHandler @ 001514ae */
std::
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
::emplace_back<std::__cxx11::string,std::shared_ptr<minja::Expression>>
((vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
*)local_58,local_50,(string *)&local_78);
std::__cxx11::string::~string(local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70);
}
/* try { // try from 001512cb to 001512de has its CatchHandler @ 00151503 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_78,",",&local_99);
/* try { // try from 001512df to 001512ef has its CatchHandler @ 001514f4 */
consumeToken(local_50);
lVar2 = local_48;
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_78);
if (lVar2 == 0) {
/* try { // try from 0015130a to 0015131d has its CatchHandler @ 001514aa */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_78,")",&local_99);
/* try { // try from 0015131e to 0015132e has its CatchHandler @ 001514ac */
consumeToken(local_50);
lVar1 = local_48;
std::__cxx11::string::~string(local_50);
uVar3 = std::__cxx11::string::~string((string *)&local_78);
local_80 = CONCAT71((int7)((ulong)uVar3 >> 8),1);
if (lVar1 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015141a to 00151428 has its CatchHandler @ 00151499 */
std::runtime_error::runtime_error(prVar4,"Expected closing parenthesis in call args");
LAB_00151429:
/* try { // try from 00151429 to 0015143e has its CatchHandler @ 001514f0 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_88);
if (lVar2 == 0) {
if ((local_80 & 1) == 0) {
ArgumentsExpression::~ArgumentsExpression((ArgumentsExpression *)local_98);
}
return (ArgumentsExpression *)local_98;
}
} while( true );
}
|
|
1,179 | OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | void
Level::orientIncidentComponents() {
int vCount = getNumVertices();
for (Index vIndex = 0; vIndex < vCount; ++vIndex) {
Level::VTag & vTag = _vertTags[vIndex];
if (!vTag._nonManifold) {
if (!orderVertexFacesAndEdges(vIndex)) {
vTag._nonManifold = true;
}
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xc8fe0
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xf1185
movq -0x20(%rbp), %rdi
addq $0x1b0, %rdi # imm = 0x1B0
movslq -0x10(%rbp), %rsi
callq 0xc4dc0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movw (%rax), %ax
andw $0x1, %ax
cmpw $0x0, %ax
jne 0xf1178
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0xd5130
testb $0x1, %al
jne 0xf1176
movq -0x18(%rbp), %rax
movw (%rax), %cx
andw $-0x2, %cx
orw $0x1, %cx
movw %cx, (%rax)
jmp 0xf1178
jmp 0xf117a
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf1123
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level24orientIncidentComponentsEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_20], rdi
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void)
mov [rbp+var_C], eax
mov [rbp+var_10], 0
loc_F1123:
mov eax, [rbp+var_10]
cmp eax, [rbp+var_C]
jge short loc_F1185
mov rdi, [rbp+var_20]
add rdi, 1B0h
movsxd rsi, [rbp+var_10]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::operator[](ulong)
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ax, [rax]
and ax, 1
cmp ax, 0
jnz short loc_F1178
mov rdi, [rbp+var_20]; this
mov esi, [rbp+var_10]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level24orderVertexFacesAndEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::orderVertexFacesAndEdges(int)
test al, 1
jnz short loc_F1176
mov rax, [rbp+var_18]
mov cx, [rax]
and cx, 0FFFEh
or cx, 1
mov [rax], cx
loc_F1176:
jmp short $+2
loc_F1178:
jmp short $+2
loc_F117A:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_F1123
loc_F1185:
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this)
{
long long result; // rax
_WORD *v2; // [rsp+8h] [rbp-18h]
int i; // [rsp+10h] [rbp-10h]
int NumVertices; // [rsp+14h] [rbp-Ch]
NumVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(this);
for ( i = 0; ; ++i )
{
result = (unsigned int)i;
if ( i >= NumVertices )
break;
v2 = (_WORD *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>::operator[]((char *)this + 432, i);
if ( (*v2 & 1) == 0 && (OpenSubdiv::v3_6_0::Vtr::internal::Level::orderVertexFacesAndEdges(this, i) & 1) == 0 )
*v2 = *v2 & 0xFFFE | 1;
}
return result;
}
| orientIncidentComponents:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
CALL 0x001c8fe0
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x10],0x0
LAB_001f1123:
MOV EAX,dword ptr [RBP + -0x10]
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x001f1185
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x1b0
MOVSXD RSI,dword ptr [RBP + -0x10]
CALL 0x001c4dc0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV AX,word ptr [RAX]
AND AX,0x1
CMP AX,0x0
JNZ 0x001f1178
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x10]
CALL 0x001d5130
TEST AL,0x1
JNZ 0x001f1176
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,word ptr [RAX]
AND CX,0xfffe
OR CX,0x1
MOV word ptr [RAX],CX
LAB_001f1176:
JMP 0x001f1178
LAB_001f1178:
JMP 0x001f117a
LAB_001f117a:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x001f1123
LAB_001f1185:
ADD RSP,0x20
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents() */
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents(Level *this)
{
int iVar1;
ushort *puVar2;
ulong uVar3;
int local_18;
iVar1 = getNumVertices(this);
for (local_18 = 0; local_18 < iVar1; local_18 = local_18 + 1) {
puVar2 = (ushort *)
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
::operator[]((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag>>
*)(this + 0x1b0),(long)local_18);
if (((*puVar2 & 1) == 0) && (uVar3 = orderVertexFacesAndEdges(this,local_18), (uVar3 & 1) == 0))
{
*puVar2 = *puVar2 & 0xfffe | 1;
}
}
return;
}
|
|
1,180 | OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | void
Level::orientIncidentComponents() {
int vCount = getNumVertices();
for (Index vIndex = 0; vIndex < vCount; ++vIndex) {
Level::VTag & vTag = _vertTags[vIndex];
if (!vTag._nonManifold) {
if (!orderVertexFacesAndEdges(vIndex)) {
vTag._nonManifold = true;
}
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %r15d
xorl %r14d, %r14d
testl %r15d, %r15d
cmovlel %r14d, %r15d
cmpq %r14, %r15
je 0x5d763
movq 0x1b0(%rbx), %r12
testb $0x1, (%r12,%r14,2)
jne 0x5d75e
movq %rbx, %rdi
movl %r14d, %esi
callq 0x55040
testb %al, %al
jne 0x5d75e
orb $0x1, (%r12,%r14,2)
incq %r14
jmp 0x5d737
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level24orientIncidentComponentsEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r15d, [rdi+8]
xor r14d, r14d
test r15d, r15d
cmovle r15d, r14d
loc_5D737:
cmp r15, r14
jz short loc_5D763
mov r12, [rbx+1B0h]
test byte ptr [r12+r14*2], 1
jnz short loc_5D75E
mov rdi, rbx; this
mov esi, r14d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level24orderVertexFacesAndEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::orderVertexFacesAndEdges(int)
test al, al
jnz short loc_5D75E
or byte ptr [r12+r14*2], 1
loc_5D75E:
inc r14
jmp short loc_5D737
loc_5D763:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this)
{
long long v1; // r15
long long v2; // r14
long long v3; // r12
long long result; // rax
v1 = *((unsigned int *)this + 2);
v2 = 0LL;
if ( (int)v1 <= 0 )
v1 = 0LL;
while ( v1 != v2 )
{
v3 = *((_QWORD *)this + 54);
if ( (*(_BYTE *)(v3 + 2 * v2) & 1) == 0 )
{
result = OpenSubdiv::v3_6_0::Vtr::internal::Level::orderVertexFacesAndEdges(this, v2);
if ( !(_BYTE)result )
*(_BYTE *)(v3 + 2 * v2) |= 1u;
}
++v2;
}
return result;
}
| orientIncidentComponents:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R15D,dword ptr [RDI + 0x8]
XOR R14D,R14D
TEST R15D,R15D
CMOVLE R15D,R14D
LAB_0015d737:
CMP R15,R14
JZ 0x0015d763
MOV R12,qword ptr [RBX + 0x1b0]
TEST byte ptr [R12 + R14*0x2],0x1
JNZ 0x0015d75e
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00155040
TEST AL,AL
JNZ 0x0015d75e
OR byte ptr [R12 + R14*0x2],0x1
LAB_0015d75e:
INC R14
JMP 0x0015d737
LAB_0015d763:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents() */
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::orientIncidentComponents(Level *this)
{
byte *pbVar1;
long lVar2;
char cVar3;
ulong uVar4;
ulong uVar5;
uVar4 = 0;
uVar5 = (ulong)*(uint *)(this + 8);
if ((int)*(uint *)(this + 8) < 1) {
uVar5 = uVar4;
}
for (; uVar5 != uVar4; uVar4 = uVar4 + 1) {
lVar2 = *(long *)(this + 0x1b0);
if ((*(byte *)(lVar2 + uVar4 * 2) & 1) == 0) {
cVar3 = orderVertexFacesAndEdges(this,(int)uVar4);
if (cVar3 == '\0') {
pbVar1 = (byte *)(lVar2 + uVar4 * 2);
*pbVar1 = *pbVar1 | 1;
}
}
}
return;
}
|
|
1,181 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char) | monkey531[P]llama/common/./json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x11813c
movq 0x10(%rsp), %rdi
callq 0x116c30
movq %rax, %rdi
movq (%rdi), %rax
movl $0x30, %esi
callq *(%rax)
jmp 0x118386
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x118bc0
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x38(%rsp), %rsi
callq 0x118e90
testb $0x1, %al
jne 0x11816c
jmp 0x1181a0
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movb $0x2d, (%rax)
movq 0x38(%rsp), %rsi
callq 0x118bf0
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1181bd
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movq %rax, 0x8(%rsp)
addq $0x10, %rdi
callq 0x118d00
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1181e7
jmp 0x118206
leaq 0xbc02b(%rip), %rdi # 0x1d4219
leaq 0xb4727(%rip), %rsi # 0x1cc91c
movl $0x4952, %edx # imm = 0x4952
leaq 0xbc2b6(%rip), %rcx # 0x1d44b7
callq 0x50230
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x64, 0x28(%rsp)
jb 0x1182bc
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x28(%rsp)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc05b9(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc0584(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118219
cmpq $0xa, 0x28(%rsp)
jb 0x118338
movq 0x28(%rsp), %rax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc053a(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc0505(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118357
movq 0x28(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movq 0x10(%rsp), %rdi
callq 0x116c30
movq 0x10(%rsp), %rdi
movq %rax, (%rsp)
addq $0x10, %rdi
callq 0x118d70
movq (%rsp), %rdi
movq %rax, %rsi
movl 0x24(%rsp), %eax
movl %eax, %edx
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_10], 0
jnz short loc_11813C
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
mov esi, 30h ; '0'
call qword ptr [rax]
jmp loc_118386
loc_11813C:
mov rdi, [rsp+48h+var_38]
add rdi, 10h
call _ZNSt5arrayIcLm64EE5beginEv; std::array<char,64ul>::begin(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_24], 0
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_
test al, 1
jnz short loc_11816C
jmp short loc_1181A0
loc_11816C:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_18]
mov byte ptr [rax], 2Dh ; '-'
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11remove_signEl; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(long)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
add eax, 1
mov [rsp+48h+var_24], eax
jmp short loc_1181BD
loc_1181A0:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
mov [rsp+48h+var_24], eax
loc_1181BD:
mov rdi, [rsp+48h+var_38]
mov eax, [rsp+48h+var_24]
mov [rsp+48h+var_40], rax
add rdi, 10h
call _ZNKSt5arrayIcLm64EE4sizeEv; std::array<char,64ul>::size(void)
mov rcx, rax
mov rax, [rsp+48h+var_40]
sub rcx, 1
cmp rax, rcx
jnb short loc_1181E7
jmp short loc_118206
loc_1181E7:
lea rdi, aNCharsNumberBu; "n_chars < number_buffer.size() - 1"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 4952h
lea rcx, aVoidNlohmannDe_8; "void nlohmann::detail::serializer<nlohm"...
call ___assert_fail
loc_118206:
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_18]
mov ecx, ecx
add rax, rcx
mov [rsp+48h+var_18], rax
loc_118219:
cmp [rsp+48h+var_20], 64h ; 'd'
jb loc_1182BC
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_28], eax
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov [rsp+48h+var_20], rax
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp loc_118219
loc_1182BC:
cmp [rsp+48h+var_20], 0Ah
jb short loc_118338
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_2C], eax
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp short loc_118357
loc_118338:
mov rax, [rsp+48h+var_20]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
loc_118357:
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_48], rax
add rdi, 10h
call _ZNSt5arrayIcLm64EE4dataEv; std::array<char,64ul>::data(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
mov eax, [rsp+48h+var_24]
mov edx, eax
mov rax, [rdi]
call qword ptr [rax+8]
loc_118386:
add rsp, 48h
retn
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
long long a1,
unsigned long long a2)
{
long long ( ***v2)(_QWORD, long long); // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // [rsp+0h] [rbp-48h]
unsigned int v10; // [rsp+20h] [rbp-28h]
unsigned int v11; // [rsp+24h] [rbp-24h]
unsigned long long v12; // [rsp+28h] [rbp-20h]
_BYTE *v13; // [rsp+30h] [rbp-18h]
_BYTE *v14; // [rsp+30h] [rbp-18h]
if ( a2 )
{
v13 = (_BYTE *)std::array<char,64ul>::begin(a1 + 16);
if ( (ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_(
a1,
a2) & 1) != 0 )
{
*v13 = 45;
v12 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(
a1,
a2);
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
v12)
+ 1;
}
else
{
v12 = a2;
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
a2);
}
if ( v11 >= (unsigned long long)(std::array<char,64ul>::size(a1 + 16) - 1) )
__assert_fail(
"n_chars < number_buffer.size() - 1",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
18770LL,
"void nlohmann::detail::serializer<nlohmann::basic_json<nlohmann::ordered_map>>::dump_integer(NumberType) [BasicJ"
"sonType = nlohmann::basic_json<nlohmann::ordered_map>, NumberType = long]");
v14 = &v13[v11];
while ( v12 >= 0x64 )
{
v10 = v12 % 0x64;
v12 /= 0x64uLL;
v4 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v4, 1LL);
v5 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
v14 -= 2;
*v14 = *(_BYTE *)std::array<char,2ul>::operator[](v5, 0LL);
}
if ( v12 < 0xA )
{
*(v14 - 1) = v12 + 48;
}
else
{
v6 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v6, 1LL);
v7 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 2) = *(_BYTE *)std::array<char,2ul>::operator[](v7, 0LL);
}
v9 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v8 = std::array<char,64ul>::data(a1 + 16);
return (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v8, v11);
}
else
{
v2 = (long long ( ***)(_QWORD, long long))std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (**v2)(v2, 48LL);
}
}
| |||
1,182 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char) | monkey531[P]llama/common/./json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
testl %esi, %esi
je 0x66c1c
movl %esi, %eax
leaq 0x10(%rdi), %rsi
movzbl %al, %ecx
movl $0x1, %edx
cmpb $0xa, %cl
jb 0x66c02
movl $0x2, %edx
cmpb $0x64, %al
jae 0x66c2c
leaq (%rsi,%rdx), %r8
cmpb $0xa, %al
jb 0x66c57
leaq 0x58711(%rip), %rax # 0xbf322
movzwl (%rax,%rcx,2), %eax
movw %ax, -0x2(%r8)
jmp 0x66c5d
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0x30, %esi
jmpq *%rax
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,8), %ecx
shrl $0xc, %ecx
imull $0x64, %ecx, %edx
subb %dl, %al
movzbl %al, %eax
leaq 0x586de(%rip), %rdx # 0xbf322
movzwl (%rdx,%rax,2), %eax
leaq 0x11(%rdi), %r8
movw %ax, 0x11(%rdi)
movl $0x3, %edx
movl %ecx, %eax
orb $0x30, %al
movb %al, -0x1(%r8)
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
jmpq *%rax
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
test esi, esi
jz short loc_66C1C
mov eax, esi
lea rsi, [rdi+10h]
movzx ecx, al
mov edx, 1
cmp cl, 0Ah
jb short loc_66C02
mov edx, 2
cmp al, 64h ; 'd'
jnb short loc_66C2C
loc_66C02:
lea r8, [rsi+rdx]
cmp al, 0Ah
jb short loc_66C57
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rax+rcx*2]
mov [r8-2], ax
jmp short loc_66C5D
loc_66C1C:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax]
mov esi, 30h ; '0'
jmp rax
loc_66C2C:
lea edx, [rcx+rcx*4]
lea ecx, [rcx+rdx*8]
shr ecx, 0Ch
imul edx, ecx, 64h ; 'd'
sub al, dl
movzx eax, al
lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rdx+rax*2]
lea r8, [rdi+11h]
mov [rdi+11h], ax
mov edx, 3
mov eax, ecx
loc_66C57:
or al, 30h
mov [r8-1], al
loc_66C5D:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
jmp rax
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
_QWORD *a1,
int a2)
{
char v2; // al
long long v3; // rdx
char *v4; // r8
if ( !a2 )
return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL);
v2 = a2;
v3 = 1LL;
if ( (unsigned __int8)a2 >= 0xAu )
{
v3 = 2LL;
if ( (unsigned __int8)a2 >= 0x64u )
{
v4 = (char *)a1 + 17;
*(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u];
v2 = (unsigned __int8)a2 / 0x64u;
goto LABEL_8;
}
}
v4 = (char *)a1 + v3 + 16;
if ( (unsigned __int8)a2 < 0xAu )
{
LABEL_8:
*(v4 - 1) = v2 | 0x30;
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2];
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
TEST ESI,ESI
JZ 0x00166c1c
MOV EAX,ESI
LEA RSI,[RDI + 0x10]
MOVZX ECX,AL
MOV EDX,0x1
CMP CL,0xa
JC 0x00166c02
MOV EDX,0x2
CMP AL,0x64
JNC 0x00166c2c
LAB_00166c02:
LEA R8,[RSI + RDX*0x1]
CMP AL,0xa
JC 0x00166c57
LEA RAX,[0x1bf322]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV word ptr [R8 + -0x2],AX
JMP 0x00166c5d
LAB_00166c1c:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV ESI,0x30
JMP RAX
LAB_00166c2c:
LEA EDX,[RCX + RCX*0x4]
LEA ECX,[RCX + RDX*0x8]
SHR ECX,0xc
IMUL EDX,ECX,0x64
SUB AL,DL
MOVZX EAX,AL
LEA RDX,[0x1bf322]
MOVZX EAX,word ptr [RDX + RAX*0x2]
LEA R8,[RDI + 0x11]
MOV word ptr [RDI + 0x11],AX
MOV EDX,0x3
MOV EAX,ECX
LAB_00166c57:
OR AL,0x30
MOV byte ptr [R8 + -0x1],AL
LAB_00166c5d:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
JMP RAX
|
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_
(int8 *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x00166c2a. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30);
return;
}
bVar1 = (byte)param_2;
lVar3 = 1;
if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) {
lVar4 = (long)(param_1 + 2) + lVar3;
bVar2 = bVar1;
if (9 < bVar1) {
*(int2 *)(lVar4 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)bVar1 * 2);
goto LAB_00166c5d;
}
}
else {
bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc);
lVar4 = (long)param_1 + 0x11;
*(int2 *)((long)param_1 + 0x11) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)(byte)(bVar1 + bVar2 * -100) * 2);
lVar3 = 3;
}
*(byte *)(lVar4 + -1) = bVar2 | 0x30;
LAB_00166c5d:
/* WARNING: Could not recover jumptable at 0x00166c67. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3);
return;
}
|
|
1,183 | mariadb_stmt_execute_direct | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt,
const char *stmt_str,
size_t length)
{
MYSQL *mysql;
my_bool emulate_cmd;
my_bool clear_result= 0;
if (!stmt)
return 1;
mysql= stmt->mysql;
if (!mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return 1;
}
emulate_cmd= !(!(stmt->mysql->server_capabilities & CLIENT_MYSQL) &&
(stmt->mysql->extension->mariadb_server_capabilities &
(MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))) || mysql->net.compress;
/* Server versions < 10.2 don't support execute_direct, so we need to
emulate it */
if (emulate_cmd)
{
int rc;
/* avoid sending close + prepare in 2 packets */
if ((rc= mysql_stmt_prepare(stmt, stmt_str, (unsigned long)length)))
return rc;
return mysql_stmt_execute(stmt);
}
if (ma_multi_command(mysql, COM_MULTI_ENABLED))
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return 1;
}
if (length == (size_t) -1)
length= strlen(stmt_str);
/* clear flags */
CLEAR_CLIENT_STMT_ERROR(stmt);
CLEAR_CLIENT_ERROR(stmt->mysql);
stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0;
/* check if we have to clear results */
if (stmt->state > MYSQL_STMT_INITTED)
{
/* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement
on server side. Statement handle will get a new stmt_id */
char stmt_id[STMT_ID_LENGTH];
if (mysql_stmt_internal_reset(stmt, 1))
goto fail;
ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0));
stmt->field_count= 0;
stmt->param_count= 0;
stmt->params= 0;
int4store(stmt_id, stmt->stmt_id);
if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
goto fail;
}
stmt->stmt_id= -1;
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, stmt_str, length, 1, stmt))
goto fail;
/* in case prepare fails, we need to clear the result package from execute, which
is always an error packet (invalid statement id) */
clear_result= 1;
stmt->state= MYSQL_STMT_PREPARED;
/* Since we can't determine stmt_id here, we need to set it to -1, so server will know that the
* execute command belongs to previous prepare */
stmt->stmt_id= -1;
if (mysql_stmt_execute(stmt))
goto fail;
/* flush multi buffer */
if (ma_multi_command(mysql, COM_MULTI_END))
goto fail;
if (!mysql->options.extension->skip_read_response)
{
/* read prepare response */
if (mysql->methods->db_read_prepare_response &&
mysql->methods->db_read_prepare_response(stmt))
goto fail;
clear_result= 0;
/* read execute response packet */
return mthd_stmt_read_execute_response(stmt);
}
fail:
/* check if we need to set error message */
if (!mysql_stmt_errno(stmt))
UPDATE_STMT_ERROR(stmt);
if (clear_result) {
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
}
stmt->state= MYSQL_STMT_INITTED;
return 1;
} | O3 | c | mariadb_stmt_execute_direct:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl $0x1, %ebx
testq %rdi, %rdi
je 0x33d29
movq %rdi, %r14
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x33cd6
movq %rdx, %r13
movq %rsi, %r12
testb $0x1, 0x370(%r15)
jne 0x33c9b
movq 0x4f0(%r15), %rax
testb $0x4, 0x70(%rax)
je 0x33c9b
cmpb $0x0, 0x84(%r15)
je 0x33d4d
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3267c
testl %eax, %eax
jne 0x33d29
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x33fdb
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3324d
movl $0x7dd, 0x108(%r14) # imm = 0x7DD
leaq 0x30d(%r14), %rdi
leaq 0x2ed01(%rip), %rax # 0x629f0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x14230
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x2ecec(%rip), %rax # 0x62a00
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x14230
movb %r15b, 0x30b(%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x33fdb
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl $0x2, %esi
callq 0x27729
testl %eax, %eax
je 0x33da5
movl $0x7de, 0x108(%r14) # imm = 0x7DE
leaq 0x30d(%r14), %rdi
leaq 0x2ec79(%rip), %rax # 0x629f0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x14230
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x2ec64(%rip), %rax # 0x62a00
movq 0x70(%rax), %rsi
jmp 0x33d18
cmpq $-0x1, %r13
jne 0x33db6
movq %r12, %rdi
callq 0x141c0
movq %rax, %r13
xorl %eax, %eax
movl %eax, 0x108(%r14)
movl $0x30303030, %ecx # imm = 0x30303030
movl %ecx, 0x30d(%r14)
movw $0x30, %dx
movw %dx, 0x311(%r14)
movb %al, 0x10c(%r14)
movq 0x38(%r14), %rsi
movl %eax, 0x90(%rsi)
movq 0x38(%r14), %rsi
movw %dx, 0x29b(%rsi)
movl %ecx, 0x297(%rsi)
movq 0x38(%r14), %rcx
movb %al, 0x97(%rcx)
movq 0x38(%r14), %rax
movq 0x2a0(%rax), %rax
testq %rax, %rax
je 0x33e1a
movl $0x0, 0x4(%rax)
movq $-0x1, %rax
movq %rax, 0x338(%r15)
movq %rax, 0xf8(%r14)
cmpl $0x0, 0x50(%r14)
je 0x33e9f
movq %r14, %rdi
movl $0x1, %esi
callq 0x313d0
testb %al, %al
jne 0x33e9a
movq %r14, %rdi
movl $0x1, %esi
callq 0x2f53b
movq 0x340(%r14), %rdi
xorl %esi, %esi
callq 0x2f53b
xorl %eax, %eax
movq %rax, 0x60(%r14)
movq %rax, 0x70(%r14)
movl 0x40(%r14), %eax
leaq -0x34(%rbp), %rdx
movl %eax, (%rdx)
movq 0x4d0(%r15), %rax
movl $0x4, %ecx
movq %r15, %rdi
movl $0x19, %esi
movl $0x1, %r8d
movq %r14, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x33e9f
movb $0x1, %r12b
jmp 0x33f13
movq $-0x1, 0x40(%r14)
movq 0x4d0(%r15), %rax
movq %r15, %rdi
movl $0x16, %esi
movq %r12, %rdx
movq %r13, %rcx
movl $0x1, %r8d
movq %r14, %r9
callq *0x10(%rax)
movb $0x1, %r12b
testl %eax, %eax
jne 0x33f13
movl $0x1, 0x50(%r14)
movq $-0x1, 0x40(%r14)
movq %r14, %rdi
callq 0x3324d
testl %eax, %eax
jne 0x33f10
movq %r15, %rdi
movl $0x4, %esi
callq 0x27729
testl %eax, %eax
jne 0x33f10
movq 0x480(%r15), %rax
cmpb $0x0, 0x148(%rax)
je 0x33faf
xorl %r12d, %r12d
cmpl $0x0, 0x108(%r14)
jne 0x33f74
leaq 0x30d(%r14), %rdi
leaq 0x10c(%r14), %r15
movq 0x38(%r14), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%r14)
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x14230
xorl %r13d, %r13d
movb %r13b, 0x312(%r14)
movl $0x97, %esi
addq 0x38(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %r15, %rdi
callq 0x14230
movb %r13b, 0x30b(%r14)
testb %r12b, %r12b
jne 0x33fa2
movq 0x38(%r14), %rax
movq 0x4d0(%rax), %rax
movq %r14, %rdi
callq *0x78(%rax)
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x33fa2
movzwl 0x380(%rax), %ecx
testl $0x1008, %ecx # imm = 0x1008
jne 0x33f7d
movl $0x0, 0x50(%r14)
jmp 0x33d29
movq 0x4d0(%r15), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x33fcc
movq %r14, %rdi
callq *%rax
testb %al, %al
jne 0x33f10
movq %r14, %rdi
callq 0x32c4f
movl %eax, %ebx
jmp 0x33d29
callq 0x14520
| mariadb_stmt_execute_direct:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_30], rax
mov ebx, 1
test rdi, rdi
jz loc_33D29
mov r14, rdi
mov r15, [rdi+38h]
test r15, r15
jz short loc_33CD6
mov r13, rdx
mov r12, rsi
test byte ptr [r15+370h], 1
jnz short loc_33C9B
mov rax, [r15+4F0h]
test byte ptr [rax+70h], 4
jz short loc_33C9B
cmp byte ptr [r15+84h], 0
jz loc_33D4D
loc_33C9B:
mov rdi, r14
mov rsi, r12
mov rdx, r13
call mysql_stmt_prepare
test eax, eax
jnz short loc_33D29
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_33FDB
mov rdi, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mysql_stmt_execute
loc_33CD6:
mov dword ptr [r14+108h], 7DDh
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_33D18:
mov edx, 200h
call _strncpy
mov [r14+30Bh], r15b
loc_33D29:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_33FDB
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_33D4D:
mov rdi, r15
mov esi, 2
call ma_multi_command
test eax, eax
jz short loc_33DA5
mov dword ptr [r14+108h], 7DEh
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+70h]
jmp loc_33D18
loc_33DA5:
cmp r13, 0FFFFFFFFFFFFFFFFh
jnz short loc_33DB6
mov rdi, r12
call _strlen
mov r13, rax
loc_33DB6:
xor eax, eax
mov [r14+108h], eax
mov ecx, 30303030h
mov [r14+30Dh], ecx
mov dx, 30h ; '0'
mov [r14+311h], dx
mov [r14+10Ch], al
mov rsi, [r14+38h]
mov [rsi+90h], eax
mov rsi, [r14+38h]
mov [rsi+29Bh], dx
mov [rsi+297h], ecx
mov rcx, [r14+38h]
mov [rcx+97h], al
mov rax, [r14+38h]
mov rax, [rax+2A0h]
test rax, rax
jz short loc_33E1A
mov dword ptr [rax+4], 0
loc_33E1A:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [r15+338h], rax
mov [r14+0F8h], rax
cmp dword ptr [r14+50h], 0
jz short loc_33E9F
mov rdi, r14
mov esi, 1
call mysql_stmt_internal_reset
test al, al
jnz short loc_33E9A
mov rdi, r14
mov esi, 1
call ma_free_root
mov rdi, [r14+340h]
xor esi, esi
call ma_free_root
xor eax, eax
mov [r14+60h], rax
mov [r14+70h], rax
mov eax, [r14+40h]
lea rdx, [rbp+var_34]
mov [rdx], eax
mov rax, [r15+4D0h]
mov ecx, 4
mov rdi, r15
mov esi, 19h
mov r8d, 1
mov r9, r14
call qword ptr [rax+10h]
test eax, eax
jz short loc_33E9F
loc_33E9A:
mov r12b, 1
jmp short loc_33F13
loc_33E9F:
mov qword ptr [r14+40h], 0FFFFFFFFFFFFFFFFh
mov rax, [r15+4D0h]
mov rdi, r15
mov esi, 16h
mov rdx, r12
mov rcx, r13
mov r8d, 1
mov r9, r14
call qword ptr [rax+10h]
mov r12b, 1
test eax, eax
jnz short loc_33F13
mov dword ptr [r14+50h], 1
mov qword ptr [r14+40h], 0FFFFFFFFFFFFFFFFh
mov rdi, r14
call mysql_stmt_execute
test eax, eax
jnz short loc_33F10
mov rdi, r15
mov esi, 4
call ma_multi_command
test eax, eax
jnz short loc_33F10
mov rax, [r15+480h]
cmp byte ptr [rax+148h], 0
jz loc_33FAF
loc_33F10:
xor r12d, r12d
loc_33F13:
cmp dword ptr [r14+108h], 0
jnz short loc_33F74
lea rdi, [r14+30Dh]
lea r15, [r14+10Ch]
mov rsi, [r14+38h]
mov eax, [rsi+90h]
mov [r14+108h], eax
add rsi, 297h
mov edx, 5
call _strncpy
xor r13d, r13d
mov [r14+312h], r13b
mov esi, 97h
add rsi, [r14+38h]
mov edx, 200h
mov rdi, r15
call _strncpy
mov [r14+30Bh], r13b
loc_33F74:
test r12b, r12b
jnz short loc_33FA2
mov rax, [r14+38h]
loc_33F7D:
mov rax, [rax+4D0h]
mov rdi, r14
call qword ptr [rax+78h]
mov rax, [r14+38h]
test rax, rax
jz short loc_33FA2
movzx ecx, word ptr [rax+380h]
test ecx, 1008h
jnz short loc_33F7D
loc_33FA2:
mov dword ptr [r14+50h], 0
jmp loc_33D29
loc_33FAF:
mov rax, [r15+4D0h]
mov rax, [rax+40h]
test rax, rax
jz short loc_33FCC
mov rdi, r14
call rax
test al, al
jnz loc_33F10
loc_33FCC:
mov rdi, r14
call mthd_stmt_read_execute_response
mov ebx, eax
jmp loc_33D29
loc_33FDB:
call ___stack_chk_fail
| long long mariadb_stmt_execute_direct(long long a1, long long a2, long long a3)
{
unsigned int v3; // ebx
long long v5; // r15
long long v6; // r13
long long v8; // rdi
char *v9; // rsi
long long v10; // rax
char v11; // r12
long long v12; // rsi
long long v13; // rax
unsigned __int8 ( *v14)(long long); // rax
int v15; // [rsp+Ch] [rbp-34h] BYREF
unsigned long long v16; // [rsp+10h] [rbp-30h]
v16 = __readfsqword(0x28u);
v3 = 1;
if ( !a1 )
return v3;
v5 = *(_QWORD *)(a1 + 56);
if ( !v5 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v8 = a1 + 268;
v9 = client_errors[13];
LABEL_9:
strncpy(v8, v9, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v3;
}
v6 = a3;
if ( (*(_BYTE *)(v5 + 880) & 1) == 0 && (*(_BYTE *)(*(_QWORD *)(v5 + 1264) + 112LL) & 4) != 0 && !*(_BYTE *)(v5 + 132) )
{
if ( !(unsigned int)ma_multi_command(*(_QWORD *)(a1 + 56), 2) )
{
if ( v6 == -1 )
v6 = strlen(a2);
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v10 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL);
if ( v10 )
*(_DWORD *)(v10 + 4) = 0;
*(_QWORD *)(v5 + 824) = -1LL;
*(_QWORD *)(a1 + 248) = -1LL;
if ( *(_DWORD *)(a1 + 80)
&& ((unsigned __int8)mysql_stmt_internal_reset(a1, 1)
|| (ma_free_root(a1, 1),
ma_free_root(*(_QWORD *)(a1 + 832), 0),
*(_QWORD *)(a1 + 96) = 0LL,
*(_QWORD *)(a1 + 112) = 0LL,
v15 = *(_DWORD *)(a1 + 64),
(*(unsigned int ( **)(long long, long long, int *, long long, long long, long long))(*(_QWORD *)(v5 + 1232)
+ 16LL))(
v5,
25LL,
&v15,
4LL,
1LL,
a1))) )
{
v11 = 1;
}
else
{
*(_QWORD *)(a1 + 64) = -1LL;
v11 = 1;
if ( !(*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v5 + 1232) + 16LL))(
v5,
22LL,
a2,
v6,
1LL,
a1) )
{
*(_DWORD *)(a1 + 80) = 1;
*(_QWORD *)(a1 + 64) = -1LL;
if ( !(unsigned int)mysql_stmt_execute(a1)
&& !(unsigned int)ma_multi_command(v5, 4)
&& !*(_BYTE *)(*(_QWORD *)(v5 + 1152) + 328LL) )
{
v14 = *(unsigned __int8 ( **)(long long))(*(_QWORD *)(v5 + 1232) + 64LL);
if ( !v14 || !v14(a1) )
return (unsigned int)mthd_stmt_read_execute_response(a1);
}
v11 = 0;
}
}
if ( !*(_DWORD *)(a1 + 264) )
{
v12 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v12 + 144);
strncpy(a1 + 781, v12 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
}
if ( !v11 )
{
v13 = *(_QWORD *)(a1 + 56);
do
{
(*(void ( **)(long long))(*(_QWORD *)(v13 + 1232) + 120LL))(a1);
v13 = *(_QWORD *)(a1 + 56);
}
while ( v13 && (*(_WORD *)(v13 + 896) & 0x1008) != 0 );
}
*(_DWORD *)(a1 + 80) = 0;
return v3;
}
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v8 = a1 + 268;
v9 = client_errors[14];
goto LABEL_9;
}
if ( !(unsigned int)mysql_stmt_prepare(a1, a2, a3) )
return mysql_stmt_execute(a1);
return v3;
}
| mariadb_stmt_execute_direct:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV EBX,0x1
TEST RDI,RDI
JZ 0x00133d29
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x38]
TEST R15,R15
JZ 0x00133cd6
MOV R13,RDX
MOV R12,RSI
TEST byte ptr [R15 + 0x370],0x1
JNZ 0x00133c9b
MOV RAX,qword ptr [R15 + 0x4f0]
TEST byte ptr [RAX + 0x70],0x4
JZ 0x00133c9b
CMP byte ptr [R15 + 0x84],0x0
JZ 0x00133d4d
LAB_00133c9b:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
CALL 0x0013267c
TEST EAX,EAX
JNZ 0x00133d29
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00133fdb
MOV RDI,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013324d
LAB_00133cd6:
MOV dword ptr [R14 + 0x108],0x7dd
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x1629f0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00114230
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x162a00]
MOV RSI,qword ptr [RAX + 0x68]
LAB_00133d18:
MOV EDX,0x200
CALL 0x00114230
MOV byte ptr [R14 + 0x30b],R15B
LAB_00133d29:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00133fdb
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00133d4d:
MOV RDI,R15
MOV ESI,0x2
CALL 0x00127729
TEST EAX,EAX
JZ 0x00133da5
MOV dword ptr [R14 + 0x108],0x7de
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x1629f0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00114230
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x162a00]
MOV RSI,qword ptr [RAX + 0x70]
JMP 0x00133d18
LAB_00133da5:
CMP R13,-0x1
JNZ 0x00133db6
MOV RDI,R12
CALL 0x001141c0
MOV R13,RAX
LAB_00133db6:
XOR EAX,EAX
MOV dword ptr [R14 + 0x108],EAX
MOV ECX,0x30303030
MOV dword ptr [R14 + 0x30d],ECX
MOV DX,0x30
MOV word ptr [R14 + 0x311],DX
MOV byte ptr [R14 + 0x10c],AL
MOV RSI,qword ptr [R14 + 0x38]
MOV dword ptr [RSI + 0x90],EAX
MOV RSI,qword ptr [R14 + 0x38]
MOV word ptr [RSI + 0x29b],DX
MOV dword ptr [RSI + 0x297],ECX
MOV RCX,qword ptr [R14 + 0x38]
MOV byte ptr [RCX + 0x97],AL
MOV RAX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
TEST RAX,RAX
JZ 0x00133e1a
MOV dword ptr [RAX + 0x4],0x0
LAB_00133e1a:
MOV RAX,-0x1
MOV qword ptr [R15 + 0x338],RAX
MOV qword ptr [R14 + 0xf8],RAX
CMP dword ptr [R14 + 0x50],0x0
JZ 0x00133e9f
MOV RDI,R14
MOV ESI,0x1
CALL 0x001313d0
TEST AL,AL
JNZ 0x00133e9a
MOV RDI,R14
MOV ESI,0x1
CALL 0x0012f53b
MOV RDI,qword ptr [R14 + 0x340]
XOR ESI,ESI
CALL 0x0012f53b
XOR EAX,EAX
MOV qword ptr [R14 + 0x60],RAX
MOV qword ptr [R14 + 0x70],RAX
MOV EAX,dword ptr [R14 + 0x40]
LEA RDX,[RBP + -0x34]
MOV dword ptr [RDX],EAX
MOV RAX,qword ptr [R15 + 0x4d0]
MOV ECX,0x4
MOV RDI,R15
MOV ESI,0x19
MOV R8D,0x1
MOV R9,R14
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x00133e9f
LAB_00133e9a:
MOV R12B,0x1
JMP 0x00133f13
LAB_00133e9f:
MOV qword ptr [R14 + 0x40],-0x1
MOV RAX,qword ptr [R15 + 0x4d0]
MOV RDI,R15
MOV ESI,0x16
MOV RDX,R12
MOV RCX,R13
MOV R8D,0x1
MOV R9,R14
CALL qword ptr [RAX + 0x10]
MOV R12B,0x1
TEST EAX,EAX
JNZ 0x00133f13
MOV dword ptr [R14 + 0x50],0x1
MOV qword ptr [R14 + 0x40],-0x1
MOV RDI,R14
CALL 0x0013324d
TEST EAX,EAX
JNZ 0x00133f10
MOV RDI,R15
MOV ESI,0x4
CALL 0x00127729
TEST EAX,EAX
JNZ 0x00133f10
MOV RAX,qword ptr [R15 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JZ 0x00133faf
LAB_00133f10:
XOR R12D,R12D
LAB_00133f13:
CMP dword ptr [R14 + 0x108],0x0
JNZ 0x00133f74
LEA RDI,[R14 + 0x30d]
LEA R15,[R14 + 0x10c]
MOV RSI,qword ptr [R14 + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [R14 + 0x108],EAX
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00114230
XOR R13D,R13D
MOV byte ptr [R14 + 0x312],R13B
MOV ESI,0x97
ADD RSI,qword ptr [R14 + 0x38]
MOV EDX,0x200
MOV RDI,R15
CALL 0x00114230
MOV byte ptr [R14 + 0x30b],R13B
LAB_00133f74:
TEST R12B,R12B
JNZ 0x00133fa2
MOV RAX,qword ptr [R14 + 0x38]
LAB_00133f7d:
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,R14
CALL qword ptr [RAX + 0x78]
MOV RAX,qword ptr [R14 + 0x38]
TEST RAX,RAX
JZ 0x00133fa2
MOVZX ECX,word ptr [RAX + 0x380]
TEST ECX,0x1008
JNZ 0x00133f7d
LAB_00133fa2:
MOV dword ptr [R14 + 0x50],0x0
JMP 0x00133d29
LAB_00133faf:
MOV RAX,qword ptr [R15 + 0x4d0]
MOV RAX,qword ptr [RAX + 0x40]
TEST RAX,RAX
JZ 0x00133fcc
MOV RDI,R14
CALL RAX
TEST AL,AL
JNZ 0x00133f10
LAB_00133fcc:
MOV RDI,R14
CALL 0x00132c4f
MOV EBX,EAX
JMP 0x00133d29
LAB_00133fdb:
CALL 0x00114520
|
ulong mariadb_stmt_execute_direct(long param_1,char *param_2,size_t param_3)
{
long lVar1;
code *pcVar2;
bool bVar3;
char cVar4;
int iVar5;
uint uVar6;
long lVar7;
ulong uVar8;
char *__src;
long in_FS_OFFSET;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar8 = 1;
if (param_1 != 0) {
lVar7 = *(long *)(param_1 + 0x38);
if (lVar7 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_00162a68;
LAB_00133d18:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
else if ((((*(byte *)(lVar7 + 0x370) & 1) == 0) &&
((*(byte *)(*(long *)(lVar7 + 0x4f0) + 0x70) & 4) != 0)) &&
(*(char *)(lVar7 + 0x84) == '\0')) {
iVar5 = ma_multi_command(lVar7,2);
if (iVar5 != 0) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_00162a70;
goto LAB_00133d18;
}
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0;
lVar1 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar1 + 0x29b) = 0x30;
*(int4 *)(lVar1 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar1 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0);
if (lVar1 != 0) {
*(int4 *)(lVar1 + 4) = 0;
}
*(int8 *)(lVar7 + 0x338) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff;
if (*(int *)(param_1 + 0x50) == 0) {
LAB_00133e9f:
*(int8 *)(param_1 + 0x40) = 0xffffffffffffffff;
iVar5 = (**(code **)(*(long *)(lVar7 + 0x4d0) + 0x10))(lVar7,0x16,param_2,param_3,1,param_1)
;
bVar3 = true;
if (iVar5 == 0) {
*(int4 *)(param_1 + 0x50) = 1;
*(int8 *)(param_1 + 0x40) = 0xffffffffffffffff;
iVar5 = mysql_stmt_execute(param_1);
if (iVar5 == 0) {
iVar5 = ma_multi_command(lVar7,4);
if ((iVar5 == 0) && (*(char *)(*(long *)(lVar7 + 0x480) + 0x148) == '\0')) {
pcVar2 = *(code **)(*(long *)(lVar7 + 0x4d0) + 0x40);
if (pcVar2 != (code *)0x0) {
cVar4 = (*pcVar2)(param_1);
if (cVar4 != '\0') goto LAB_00133f10;
}
uVar6 = mthd_stmt_read_execute_response(param_1);
uVar8 = (ulong)uVar6;
goto LAB_00133d29;
}
}
LAB_00133f10:
bVar3 = false;
}
}
else {
cVar4 = mysql_stmt_internal_reset(param_1,1);
if (cVar4 == '\0') {
ma_free_root(param_1,1);
ma_free_root(*(int8 *)(param_1 + 0x340),0);
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x70) = 0;
local_3c = *(int4 *)(param_1 + 0x40);
iVar5 = (**(code **)(*(long *)(lVar7 + 0x4d0) + 0x10))(lVar7,0x19,&local_3c,4,1,param_1);
if (iVar5 == 0) goto LAB_00133e9f;
}
bVar3 = true;
}
if (*(int *)(param_1 + 0x108) == 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
if (!bVar3) {
lVar7 = *(long *)(param_1 + 0x38);
do {
(**(code **)(*(long *)(lVar7 + 0x4d0) + 0x78))(param_1);
lVar7 = *(long *)(param_1 + 0x38);
if (lVar7 == 0) break;
} while ((*(ushort *)(lVar7 + 0x380) & 0x1008) != 0);
}
*(int4 *)(param_1 + 0x50) = 0;
}
else {
iVar5 = mysql_stmt_prepare(param_1,param_2,param_3);
if (iVar5 == 0) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar8 = mysql_stmt_execute(param_1);
return uVar8;
}
goto LAB_00133fdb;
}
}
}
LAB_00133d29:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar8;
}
LAB_00133fdb:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,184 | displayTime() | mihussein[P]Hlemon/src/clock.cpp | void displayTime() {
while(true) {
updateLemonbar(lemonOutput());
auto now = std::chrono::system_clock::now();
std::time_t now_c = std::chrono::system_clock::to_time_t(now);
std::tm *local_time = std::localtime(&now_c);
int current_second = local_time->tm_sec;
int time_until_update = 60 - current_second;
std::this_thread::sleep_for(std::chrono::seconds(time_until_update));
}
} | O0 | cpp | displayTime():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq -0x20(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xb230
movq -0x60(%rbp), %rdi
callq 0xb1d0
jmp 0xf420
leaq -0x20(%rbp), %rdi
callq 0x58a8
callq 0x5060
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xf630
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5390
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x3c, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9df0
leaq -0x58(%rbp), %rdi
callq 0x9d40
jmp 0xf408
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x58a8
movq -0x28(%rbp), %rdi
callq 0x57e0
nopw %cs:(%rax,%rax)
| _Z11displayTimev:
push rbp
mov rbp, rsp
sub rsp, 60h
loc_F408:
lea rdi, [rbp+var_20]
mov [rbp+var_60], rdi
call _Z11lemonOutputB5cxx11v; lemonOutput(void)
mov rdi, [rbp+var_60]
call _Z14updateLemonbarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; updateLemonbar(std::string const&)
jmp short $+2
loc_F420:
lea rdi, [rbp+var_20]; this
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rbp+var_38], rax
lea rdi, [rbp+var_38]
call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rbp+var_40], rax
lea rdi, [rbp+var_40]
call _localtime
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov eax, [rax]
mov [rbp+var_4C], eax
mov eax, 3Ch ; '<'
sub eax, [rbp+var_4C]
mov [rbp+var_50], eax
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_50]
call _ZNSt6chrono8durationIlSt5ratioILl1ELl1EEEC2IivEERKT_; std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(int const&)
lea rdi, [rbp+var_58]
call _ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1EEEEvRKNSt6chrono8durationIT_T0_EE; std::this_thread::sleep_for<long,std::ratio<1l,1l>>(std::chrono::duration<long,std::ratio<1l,1l>> const&)
jmp short loc_F408
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
lea rdi, [rbp+var_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_28]
call __Unwind_Resume
| void __noreturn displayTime(void)
{
long long v0; // [rsp+8h] [rbp-58h] BYREF
int v1; // [rsp+10h] [rbp-50h] BYREF
int v2; // [rsp+14h] [rbp-4Ch]
int *v3; // [rsp+18h] [rbp-48h]
long long v4; // [rsp+20h] [rbp-40h] BYREF
long long v5; // [rsp+28h] [rbp-38h] BYREF
_BYTE v6[32]; // [rsp+40h] [rbp-20h] BYREF
while ( 1 )
{
lemonOutput[abi:cxx11]((long long)v6);
updateLemonbar((long long)v6);
std::string::~string(v6);
v5 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v6);
v4 = std::chrono::_V2::system_clock::to_time_t(&v5);
v3 = (int *)localtime(&v4);
v2 = *v3;
v1 = 60 - v2;
std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(&v0, &v1);
std::this_thread::sleep_for<long,std::ratio<1l,1l>>((long long)&v0);
}
}
| displayTime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
LAB_0010f408:
LEA RDI,[RBP + -0x20]
MOV qword ptr [RBP + -0x60],RDI
CALL 0x0010b230
MOV RDI,qword ptr [RBP + -0x60]
LAB_0010f419:
CALL 0x0010b1d0
LAB_0010f41e:
JMP 0x0010f420
LAB_0010f420:
LEA RDI,[RBP + -0x20]
CALL 0x001058a8
CALL 0x00105060
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x38]
CALL 0x0010f630
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x40]
CALL 0x00105390
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,0x3c
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x50]
CALL 0x00109df0
LEA RDI,[RBP + -0x58]
CALL 0x00109d40
JMP 0x0010f408
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* displayTime() */
void displayTime(void)
{
duration<long,std::ratio<1l,1l>> local_60 [8];
int local_58;
int local_54;
tm *local_50;
time_t local_48;
int8 local_40 [3];
string local_28 [32];
do {
lemonOutput_abi_cxx11_();
/* try { // try from 0010f419 to 0010f41d has its CatchHandler @ 0010f478 */
updateLemonbar(local_28);
std::__cxx11::string::~string(local_28);
local_40[0] = std::chrono::_V2::system_clock::now();
local_48 = std::chrono::_V2::system_clock::to_time_t((time_point *)local_40);
local_50 = localtime(&local_48);
local_54 = local_50->tm_sec;
local_58 = 0x3c - local_54;
std::chrono::duration<long,std::ratio<1l,1l>>::duration<int,void>(local_60,&local_58);
std::this_thread::sleep_for<long,std::ratio<1l,1l>>((duration *)local_60);
} while( true );
}
|
|
1,185 | displayTime() | mihussein[P]Hlemon/src/clock.cpp | void displayTime() {
while(true) {
updateLemonbar(lemonOutput());
auto now = std::chrono::system_clock::now();
std::time_t now_c = std::chrono::system_clock::to_time_t(now);
std::tm *local_time = std::localtime(&now_c);
int current_second = local_time->tm_sec;
int time_until_update = 60 - current_second;
std::this_thread::sleep_for(std::chrono::seconds(time_until_update));
}
} | O2 | cpp | displayTime():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x8(%rsp), %rbx
movl $0x3b9aca00, %r15d # imm = 0x3B9ACA00
pushq $0x3c
popq %r12
movq %rsp, %r14
movq %rbx, %rdi
callq 0x60f8
movq %rbx, %rdi
callq 0x60c9
movq %rbx, %rdi
callq 0x46e8
callq 0x4040
cqto
idivq %r15
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x42f0
movslq (%rax), %rax
movq %r12, %rcx
subq %rax, %rcx
movq %rcx, (%rsp)
movq %r14, %rdi
callq 0x5981
jmp 0x7e69
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x46e8
movq %rbx, %rdi
callq 0x4630
| _Z11displayTimev:
push r15
push r14
push r12
push rbx
sub rsp, 28h
lea rbx, [rsp+48h+var_40]
mov r15d, 3B9ACA00h
push 3Ch ; '<'
pop r12
mov r14, rsp
loc_7E69:
mov rdi, rbx
call _Z11lemonOutputB5cxx11v; lemonOutput(void)
mov rdi, rbx
call _Z14updateLemonbarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; updateLemonbar(std::string const&)
mov rdi, rbx; this
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
cqo
idiv r15
mov [rsp+48h+var_40], rax
mov rdi, rbx
call _localtime
movsxd rax, dword ptr [rax]
mov rcx, r12
sub rcx, rax
mov [rsp+48h+var_48], rcx
mov rdi, r14
call _ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1EEEEvRKNSt6chrono8durationIT_T0_EE; std::this_thread::sleep_for<long,std::ratio<1l,1l>>(std::chrono::duration<long,std::ratio<1l,1l>> const&)
jmp short loc_7E69
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| void __noreturn displayTime(long long a1, long long a2)
{
long long v2; // rax
_DWORD *v3; // [rsp+0h] [rbp-48h] BYREF
const char *v4[8]; // [rsp+8h] [rbp-40h] BYREF
while ( 1 )
{
lemonOutput[abi:cxx11]((long long)v4);
updateLemonbar(v4);
std::string::~string(v4);
v2 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v4);
v4[0] = (const char *)(v2 / 1000000000);
v3 = (_DWORD *)(60LL - *(int *)localtime(v4, a2, v2 % 1000000000));
std::this_thread::sleep_for<long,std::ratio<1l,1l>>(&v3);
}
}
| displayTime:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
LEA RBX,[RSP + 0x8]
MOV R15D,0x3b9aca00
PUSH 0x3c
POP R12
MOV R14,RSP
LAB_00107e69:
MOV RDI,RBX
CALL 0x001060f8
LAB_00107e71:
MOV RDI,RBX
CALL 0x001060c9
LAB_00107e79:
MOV RDI,RBX
CALL 0x001046e8
CALL 0x00104040
CQO
IDIV R15
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RBX
CALL 0x001042f0
MOVSXD RAX,dword ptr [RAX]
MOV RCX,R12
SUB RCX,RAX
MOV qword ptr [RSP],RCX
MOV RDI,R14
CALL 0x00105981
JMP 0x00107e69
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* displayTime() */
void displayTime(void)
{
tm *ptVar1;
long local_48;
long local_40 [4];
do {
lemonOutput_abi_cxx11_();
/* try { // try from 00107e71 to 00107e78 has its CatchHandler @ 00107eaf */
updateLemonbar((string *)local_40);
std::__cxx11::string::~string((string *)local_40);
local_40[0] = std::chrono::_V2::system_clock::now();
local_40[0] = local_40[0] / 1000000000;
ptVar1 = localtime((time_t *)local_40);
local_48 = 0x3c - (long)ptVar1->tm_sec;
std::this_thread::sleep_for<long,std::ratio<1l,1l>>((duration *)&local_48);
} while( true );
}
|
|
1,186 | displayTime() | mihussein[P]Hlemon/src/clock.cpp | void displayTime() {
while(true) {
updateLemonbar(lemonOutput());
auto now = std::chrono::system_clock::now();
std::time_t now_c = std::chrono::system_clock::to_time_t(now);
std::tm *local_time = std::localtime(&now_c);
int current_second = local_time->tm_sec;
int time_until_update = 60 - current_second;
std::this_thread::sleep_for(std::chrono::seconds(time_until_update));
}
} | O3 | cpp | displayTime():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x18(%rsp), %r15
leaq 0x8(%rsp), %rbx
movabsq $0x112e0be826d694b3, %r12 # imm = 0x112E0BE826D694B3
movq %rsp, %r14
movq %rbx, %rdi
callq 0x6506
movq %rbx, %rdi
callq 0x64d7
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9b69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4380
callq 0x4050
imulq %r12
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
movq %rdx, (%rsp)
movq %r14, %rdi
callq 0x42c0
movl (%rax), %eax
cmpl $0x3b, %eax
jg 0x9b42
movl $0x3c, %ecx
subl %eax, %ecx
movq %rcx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x40d0
cmpl $-0x1, %eax
jne 0x9b42
callq 0x4040
cmpl $0x4, (%rax)
je 0x9ba7
jmp 0x9b42
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9be0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4380
movq %rbx, %rdi
callq 0x4660
| _Z11displayTimev:
push r15; void *
push r14; int
push r12; __int64
push rbx; int
sub rsp, 28h
lea r15, [rsp+48h+var_30]
lea rbx, [rsp+48h+var_40]
mov r12, 112E0BE826D694B3h
mov r14, rsp
loc_9B42:
mov rdi, rbx; int
call _Z11lemonOutputB5cxx11v; lemonOutput(void)
mov rdi, rbx
call _Z14updateLemonbarRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; updateLemonbar(std::string const&)
mov rdi, [rsp+48h+var_40]; this
cmp rdi, r15
jz short loc_9B69
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B69:
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
imul r12
mov rax, rdx
shr rax, 3Fh
sar rdx, 1Ah
add rdx, rax
mov [rsp+48h+var_48], rdx
mov rdi, r14
call _localtime
mov eax, [rax]
cmp eax, 3Bh ; ';'
jg short loc_9B42
mov ecx, 3Ch ; '<'
sub ecx, eax
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], 0
loc_9BA7:
mov rdi, rbx
mov rsi, rbx
call _nanosleep
cmp eax, 0FFFFFFFFh
jnz short loc_9B42
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_9BA7
jmp loc_9B42
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_9BE0
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9BE0:
mov rdi, rbx
call __Unwind_Resume
| void __noreturn displayTime(void)
{
std::chrono::_V2::system_clock *v0; // rdi
int v1; // eax
long long v2; // [rsp+0h] [rbp-48h] BYREF
std::chrono::_V2::system_clock *v3[2]; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+18h] [rbp-30h] BYREF
while ( 1 )
{
lemonOutput[abi:cxx11]((long long)v3);
updateLemonbar((const char **)v3);
v0 = v3[0];
if ( (long long *)v3[0] != &v4 )
operator delete(v3[0], v4 + 1);
v2 = std::chrono::_V2::system_clock::now(v0) / 1000000000LL;
v1 = *(_DWORD *)localtime(&v2);
if ( v1 <= 59 )
{
v3[0] = (std::chrono::_V2::system_clock *)(unsigned int)(60 - v1);
v3[1] = 0LL;
while ( (unsigned int)nanosleep(v3, v3) == -1 && *(_DWORD *)__errno_location() == 4 )
;
}
}
}
| displayTime:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
LEA R15,[RSP + 0x18]
LEA RBX,[RSP + 0x8]
MOV R12,0x112e0be826d694b3
MOV R14,RSP
LAB_00109b42:
MOV RDI,RBX
CALL 0x00106506
LAB_00109b4a:
MOV RDI,RBX
CALL 0x001064d7
LAB_00109b52:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00109b69
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00104380
LAB_00109b69:
CALL 0x00104050
IMUL R12
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x1a
ADD RDX,RAX
MOV qword ptr [RSP],RDX
MOV RDI,R14
CALL 0x001042c0
MOV EAX,dword ptr [RAX]
CMP EAX,0x3b
JG 0x00109b42
MOV ECX,0x3c
SUB ECX,EAX
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],0x0
LAB_00109ba7:
MOV RDI,RBX
MOV RSI,RBX
CALL 0x001040d0
CMP EAX,-0x1
JNZ 0x00109b42
CALL 0x00104040
CMP dword ptr [RAX],0x4
JZ 0x00109ba7
JMP 0x00109b42
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* displayTime() */
void displayTime(void)
{
int iVar1;
tm *ptVar2;
int *piVar3;
long local_48;
timespec local_40;
long local_30 [2];
do {
do {
lemonOutput_abi_cxx11_();
/* try { // try from 00109b4a to 00109b51 has its CatchHandler @ 00109bc6 */
updateLemonbar((string *)&local_40);
if ((long *)local_40.tv_sec != local_30) {
operator_delete((void *)local_40.tv_sec,local_30[0] + 1);
}
local_48 = std::chrono::_V2::system_clock::now();
local_48 = local_48 / 1000000000;
ptVar2 = localtime(&local_48);
} while (0x3b < ptVar2->tm_sec);
local_40.tv_sec = (__time_t)(0x3c - ptVar2->tm_sec);
local_40.tv_nsec = 0;
do {
iVar1 = nanosleep(&local_40,&local_40);
if (iVar1 != -1) break;
piVar3 = __errno_location();
} while (*piVar3 == 4);
} while( true );
}
|
|
1,187 | testing::internal::ParseFlag(char const*, char const*, int*) | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc | bool ParseFlag(const char* str, const char* flag_name, int32_t* value) {
// Gets the value of the flag as a string.
const char* const value_str = ParseFlagValue(str, flag_name, false);
// Aborts if the parsing failed.
if (value_str == nullptr) return false;
// Sets *value to the value of the flag.
return ParseInt32(Message() << "The value of flag --" << flag_name, value_str,
value);
} | O3 | cpp | testing::internal::ParseFlag(char const*, char const*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x2f06b
testq %rax, %rax
je 0x2f041
movq %rax, %r15
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1c968
movq (%rbx), %rbx
leaq 0x10(%rbx), %r13
leaq 0x14b3c(%rip), %rsi # 0x43b29
movl $0x14, %edx
movq %r13, %rdi
callq 0x85b0
testq %r12, %r12
je 0x2f00c
movq %r12, %rdi
callq 0x8200
movq %rax, %rdx
jmp 0x2f018
movl $0x6, %edx
leaq 0x11641(%rip), %r12 # 0x40659
movq %r13, %rdi
movq %r12, %rsi
callq 0x85b0
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16f9b
movl %eax, %ebp
testq %rbx, %rbx
je 0x2f041
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
testq %rbx, %rbx
je 0x2f063
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0x8990
| _ZN7testing8internal9ParseFlagEPKcS2_Pi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r12, rsi
xor ebp, ebp
xor edx, edx; char *
call _ZN7testing8internalL14ParseFlagValueEPKcS2_b; testing::internal::ParseFlagValue(char const*,char const*,bool)
test rax, rax
jz short loc_2F041
mov r15, rax
mov rbx, rsp
mov rdi, rbx; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rbx, [rbx]
lea r13, [rbx+10h]
lea rsi, aTheValueOfFlag; "The value of flag --"
mov edx, 14h
mov rdi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test r12, r12
jz short loc_2F00C
mov rdi, r12
call _strlen
mov rdx, rax
jmp short loc_2F018
loc_2F00C:
mov edx, 6
lea r12, aNull; "(null)"
loc_2F018:
mov rdi, r13
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rsp; this
mov rsi, r15; testing::Message *
mov rdx, r14; char *
call _ZN7testing8internal10ParseInt32ERKNS_7MessageEPKcPi; testing::internal::ParseInt32(testing::Message const&,char const*,int *)
mov ebp, eax
test rbx, rbx
jz short loc_2F041
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_2F041:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
test rbx, rbx
jz short loc_2F063
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_2F063:
mov rdi, r14
call __Unwind_Resume
| long long testing::internal::ParseFlag(testing::internal *this, const char *a2, char *a3, int *a4)
{
long long v4; // rax
const char *v6; // r12
unsigned int v7; // ebp
long long v8; // rax
const testing::Message *v9; // r15
long long v10; // rbx
long long v11; // rdx
int *v12; // rcx
unsigned int v13; // eax
_QWORD v15[7]; // [rsp-8h] [rbp-38h] BYREF
v15[0] = v4;
v6 = a2;
v7 = 0;
v8 = testing::internal::ParseFlagValue(this, a2, 0LL, (bool)a4);
if ( v8 )
{
v9 = (const testing::Message *)v8;
testing::Message::Message((testing::Message *)v15);
v10 = v15[0];
std::__ostream_insert<char,std::char_traits<char>>(v15[0] + 16LL, "The value of flag --", 20LL);
if ( a2 )
{
v11 = strlen(a2);
}
else
{
v11 = 6LL;
v6 = "(null)";
}
std::__ostream_insert<char,std::char_traits<char>>(v10 + 16, v6, v11);
LOBYTE(v13) = testing::internal::ParseInt32((testing::internal *)v15, v9, a3, v12);
v7 = v13;
if ( v10 )
(*(void ( **)(long long))(*(_QWORD *)v10 + 8LL))(v10);
}
return v7;
}
| ParseFlag:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R12,RSI
XOR EBP,EBP
XOR EDX,EDX
CALL 0x0012f06b
TEST RAX,RAX
JZ 0x0012f041
MOV R15,RAX
MOV RBX,RSP
MOV RDI,RBX
CALL 0x0011c968
MOV RBX,qword ptr [RBX]
LEA R13,[RBX + 0x10]
LAB_0012efe6:
LEA RSI,[0x143b29]
MOV EDX,0x14
MOV RDI,R13
CALL 0x001085b0
TEST R12,R12
JZ 0x0012f00c
MOV RDI,R12
CALL 0x00108200
MOV RDX,RAX
JMP 0x0012f018
LAB_0012f00c:
MOV EDX,0x6
LEA R12,[0x140659]
LAB_0012f018:
MOV RDI,R13
MOV RSI,R12
CALL 0x001085b0
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x00116f9b
LAB_0012f031:
MOV EBP,EAX
TEST RBX,RBX
JZ 0x0012f041
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x8]
LAB_0012f041:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::ParseFlag(char const*, char const*, int*) */
int4 testing::internal::ParseFlag(char *param_1,char *param_2,int *param_3)
{
int4 uVar1;
long *in_RAX;
char *pcVar2;
size_t sVar3;
long *local_38;
uVar1 = 0;
local_38 = in_RAX;
pcVar2 = (char *)ParseFlagValue(param_1,param_2,false);
if (pcVar2 != (char *)0x0) {
Message::Message((Message *)&local_38);
/* try { // try from 0012efe6 to 0012f030 has its CatchHandler @ 0012f052 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_38 + 2),"The value of flag --",0x14);
if (param_2 == (char *)0x0) {
sVar3 = 6;
param_2 = "(null)";
}
else {
sVar3 = strlen(param_2);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_38 + 2),param_2,sVar3);
uVar1 = ParseInt32((Message *)&local_38,pcVar2,param_3);
if (local_38 != (long *)0x0) {
(**(code **)(*local_38 + 8))(local_38);
}
}
return uVar1;
}
|
|
1,188 | inline_mysql_mutex_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_mutex_init(
#ifdef HAVE_PSI_MUTEX_INTERFACE
PSI_mutex_key key,
#endif
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
#else
that->m_psi= NULL;
#endif
#ifdef COROUTINE_ENABLED
that->l.data= that;
that->l.prev= that->l.next= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
} | O0 | c | inline_mysql_mutex_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1c880e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a340
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_mutex_init_11:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+40h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_mutex_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_mutex_init_11(unsigned int a1, _QWORD *a2, long long a3)
{
a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2);
a2[7] = a2;
a2[6] = 0LL;
a2[5] = 0LL;
return pthread_mutex_init(a2, a3);
}
| inline_mysql_mutex_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x40]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a340
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_mutex_init
(int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
*(int8 *)((long)param_2 + 0x30) = 0;
param_2[1].__align = 0;
pthread_mutex_init(param_2,param_3);
return;
}
|
|
1,189 | mz_inflateInit2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | int mz_inflateInit2(mz_streamp pStream, int window_bits) {
inflate_state *pDecomp;
if (!pStream)
return MZ_STREAM_ERROR;
if ((window_bits != MZ_DEFAULT_WINDOW_BITS) &&
(-window_bits != MZ_DEFAULT_WINDOW_BITS))
return MZ_PARAM_ERROR;
pStream->data_type = 0;
pStream->adler = 0;
pStream->msg = NULL;
pStream->total_in = 0;
pStream->total_out = 0;
pStream->reserved = 0;
if (!pStream->zalloc)
pStream->zalloc = miniz_def_alloc_func;
if (!pStream->zfree)
pStream->zfree = miniz_def_free_func;
pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1,
sizeof(inflate_state));
if (!pDecomp)
return MZ_MEM_ERROR;
pStream->state = (struct mz_internal_state *)pDecomp;
tinfl_init(&pDecomp->m_decomp);
pDecomp->m_dict_ofs = 0;
pDecomp->m_dict_avail = 0;
pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
pDecomp->m_first_call = 1;
pDecomp->m_has_flushed = 0;
pDecomp->m_window_bits = window_bits;
return MZ_OK;
} | O1 | c | mz_inflateInit2:
testq %rdi, %rdi
je 0x7f454
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xf, %esi
je 0x7f3d0
movl $0xffffd8f0, %eax # imm = 0xFFFFD8F0
cmpl $-0xf, %ebx
jne 0x7f45f
movl $0x0, 0x58(%r14)
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x60(%r14)
cmpq $0x0, 0x40(%r14)
jne 0x7f3ff
leaq -0x85e(%rip), %rax # 0x7eb9d
movq %rax, 0x40(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x7f411
leaq -0x864(%rip), %rax # 0x7eba9
movq %rax, 0x48(%r14)
movq 0x50(%r14), %rdi
movl $0x1, %esi
movl $0xab10, %edx # imm = 0xAB10
callq *0x40(%r14)
testq %rax, %rax
je 0x7f45a
movq %rax, 0x38(%r14)
movl $0x0, (%rax)
movl $0x1, 0xab0c(%rax)
movaps 0x3bc7d(%rip), %xmm0 # 0xbb0c0
movups %xmm0, 0x2af8(%rax)
movl %ebx, 0x2b08(%rax)
xorl %eax, %eax
jmp 0x7f45f
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
retq
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| mz_inflateInit2:
test rdi, rdi
jz loc_7F454
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 0Fh
jz short loc_7F3D0
mov eax, 0FFFFD8F0h
cmp ebx, 0FFFFFFF1h
jnz loc_7F45F
loc_7F3D0:
mov dword ptr [r14+58h], 0
mov qword ptr [r14+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
movups xmmword ptr [r14+60h], xmm0
cmp qword ptr [r14+40h], 0
jnz short loc_7F3FF
lea rax, miniz_def_alloc_func
mov [r14+40h], rax
loc_7F3FF:
cmp qword ptr [r14+48h], 0
jnz short loc_7F411
lea rax, miniz_def_free_func
mov [r14+48h], rax
loc_7F411:
mov rdi, [r14+50h]
mov esi, 1
mov edx, 0AB10h
call qword ptr [r14+40h]
test rax, rax
jz short loc_7F45A
mov [r14+38h], rax
mov dword ptr [rax], 0
mov dword ptr [rax+0AB0Ch], 1
movaps xmm0, cs:xmmword_BB0C0
movups xmmword ptr [rax+2AF8h], xmm0
mov [rax+2B08h], ebx
xor eax, eax
jmp short loc_7F45F
loc_7F454:
mov eax, 0FFFFFFFEh
retn
loc_7F45A:
mov eax, 0FFFFFFFCh
loc_7F45F:
add rsp, 8
pop rbx
pop r14
retn
| long long mz_inflateInit2(long long a1, int a2)
{
long long result; // rax
long long v3; // rax
if ( !a1 )
return 4294967294LL;
if ( a2 == 15 || (result = 4294957296LL, a2 == -15) )
{
*(_DWORD *)(a1 + 88) = 0;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
if ( !*(_QWORD *)(a1 + 64) )
*(_QWORD *)(a1 + 64) = miniz_def_alloc_func;
if ( !*(_QWORD *)(a1 + 72) )
*(_QWORD *)(a1 + 72) = miniz_def_free_func;
v3 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 64))(*(_QWORD *)(a1 + 80), 1LL, 43792LL);
if ( v3 )
{
*(_QWORD *)(a1 + 56) = v3;
*(_DWORD *)v3 = 0;
*(_DWORD *)(v3 + 43788) = 1;
*(_OWORD *)(v3 + 11000) = xmmword_BB0C0;
*(_DWORD *)(v3 + 11016) = a2;
return 0LL;
}
else
{
return 4294967292LL;
}
}
return result;
}
| |||
1,190 | mz_inflateInit2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | int mz_inflateInit2(mz_streamp pStream, int window_bits) {
inflate_state *pDecomp;
if (!pStream)
return MZ_STREAM_ERROR;
if ((window_bits != MZ_DEFAULT_WINDOW_BITS) &&
(-window_bits != MZ_DEFAULT_WINDOW_BITS))
return MZ_PARAM_ERROR;
pStream->data_type = 0;
pStream->adler = 0;
pStream->msg = NULL;
pStream->total_in = 0;
pStream->total_out = 0;
pStream->reserved = 0;
if (!pStream->zalloc)
pStream->zalloc = miniz_def_alloc_func;
if (!pStream->zfree)
pStream->zfree = miniz_def_free_func;
pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1,
sizeof(inflate_state));
if (!pDecomp)
return MZ_MEM_ERROR;
pStream->state = (struct mz_internal_state *)pDecomp;
tinfl_init(&pDecomp->m_decomp);
pDecomp->m_dict_ofs = 0;
pDecomp->m_dict_avail = 0;
pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
pDecomp->m_first_call = 1;
pDecomp->m_has_flushed = 0;
pDecomp->m_window_bits = window_bits;
return MZ_OK;
} | O2 | c | mz_inflateInit2:
testq %rdi, %rdi
je 0x5aefe
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xf, %esi
je 0x5ae85
movl $0xffffd8f0, %eax # imm = 0xFFFFD8F0
cmpl $-0xf, %ebx
jne 0x5af05
andl $0x0, 0x58(%r14)
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x60(%r14)
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x5aeb0
leaq -0x16f2(%rip), %rax # 0x597ba
movq %rax, 0x40(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x5aec2
leaq -0x16f8(%rip), %rcx # 0x597c6
movq %rcx, 0x48(%r14)
movq 0x50(%r14), %rdi
pushq $0x1
popq %rsi
movl $0xab10, %edx # imm = 0xAB10
callq *%rax
testq %rax, %rax
je 0x5af02
movq %rax, 0x38(%r14)
andl $0x0, (%rax)
movl $0x1, 0xab0c(%rax)
movaps 0x446e3(%rip), %xmm0 # 0x9f5d0
movups %xmm0, 0x2af8(%rax)
movl %ebx, 0x2b08(%rax)
xorl %eax, %eax
jmp 0x5af05
pushq $-0x2
popq %rax
retq
pushq $-0x4
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| mz_inflateInit2:
test rdi, rdi
jz loc_5AEFE
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 0Fh
jz short loc_5AE85
mov eax, 0FFFFD8F0h
cmp ebx, 0FFFFFFF1h
jnz loc_5AF05
loc_5AE85:
and dword ptr [r14+58h], 0
and qword ptr [r14+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
movups xmmword ptr [r14+60h], xmm0
mov rax, [r14+40h]
test rax, rax
jnz short loc_5AEB0
lea rax, miniz_def_alloc_func
mov [r14+40h], rax
loc_5AEB0:
cmp qword ptr [r14+48h], 0
jnz short loc_5AEC2
lea rcx, miniz_def_free_func
mov [r14+48h], rcx
loc_5AEC2:
mov rdi, [r14+50h]
push 1
pop rsi
mov edx, 0AB10h
call rax
test rax, rax
jz short loc_5AF02
mov [r14+38h], rax
and dword ptr [rax], 0
mov dword ptr [rax+0AB0Ch], 1
movaps xmm0, cs:xmmword_9F5D0
movups xmmword ptr [rax+2AF8h], xmm0
mov [rax+2B08h], ebx
xor eax, eax
jmp short loc_5AF05
loc_5AEFE:
push 0FFFFFFFFFFFFFFFEh
pop rax
retn
loc_5AF02:
push 0FFFFFFFFFFFFFFFCh
pop rax
loc_5AF05:
add rsp, 8
pop rbx
pop r14
retn
| long long mz_inflateInit2(long long a1, int a2)
{
long long result; // rax
long long ( *v3)(long long, long long, long long); // rax
long long v4; // rax
if ( !a1 )
return -2LL;
if ( a2 == 15 || (result = 4294957296LL, a2 == -15) )
{
*(_DWORD *)(a1 + 88) = 0;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
v3 = *(long long ( **)(long long, long long, long long))(a1 + 64);
if ( !v3 )
{
v3 = miniz_def_alloc_func;
*(_QWORD *)(a1 + 64) = miniz_def_alloc_func;
}
if ( !*(_QWORD *)(a1 + 72) )
*(_QWORD *)(a1 + 72) = miniz_def_free_func;
v4 = v3(*(_QWORD *)(a1 + 80), 1LL, 43792LL);
if ( v4 )
{
*(_QWORD *)(a1 + 56) = v4;
*(_DWORD *)v4 = 0;
*(_DWORD *)(v4 + 43788) = 1;
*(_OWORD *)(v4 + 11000) = xmmword_9F5D0;
*(_DWORD *)(v4 + 11016) = a2;
return 0LL;
}
else
{
return -4LL;
}
}
return result;
}
| mz_inflateInit2:
TEST RDI,RDI
JZ 0x0015aefe
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
CMP ESI,0xf
JZ 0x0015ae85
MOV EAX,0xffffd8f0
CMP EBX,-0xf
JNZ 0x0015af05
LAB_0015ae85:
AND dword ptr [R14 + 0x58],0x0
AND qword ptr [R14 + 0x10],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOVUPS xmmword ptr [R14 + 0x60],XMM0
MOV RAX,qword ptr [R14 + 0x40]
TEST RAX,RAX
JNZ 0x0015aeb0
LEA RAX,[0x1597ba]
MOV qword ptr [R14 + 0x40],RAX
LAB_0015aeb0:
CMP qword ptr [R14 + 0x48],0x0
JNZ 0x0015aec2
LEA RCX,[0x1597c6]
MOV qword ptr [R14 + 0x48],RCX
LAB_0015aec2:
MOV RDI,qword ptr [R14 + 0x50]
PUSH 0x1
POP RSI
MOV EDX,0xab10
CALL RAX
TEST RAX,RAX
JZ 0x0015af02
MOV qword ptr [R14 + 0x38],RAX
AND dword ptr [RAX],0x0
MOV dword ptr [RAX + 0xab0c],0x1
MOVAPS XMM0,xmmword ptr [0x0019f5d0]
MOVUPS xmmword ptr [RAX + 0x2af8],XMM0
MOV dword ptr [RAX + 0x2b08],EBX
XOR EAX,EAX
JMP 0x0015af05
LAB_0015aefe:
PUSH -0x2
POP RAX
RET
LAB_0015af02:
PUSH -0x4
POP RAX
LAB_0015af05:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 mz_inflateInit2(long param_1,int param_2)
{
int8 uVar1;
code *pcVar2;
int4 *puVar3;
if (param_1 != 0) {
if ((param_2 == 0xf) || (uVar1 = 0xffffd8f0, param_2 == -0xf)) {
*(int4 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
pcVar2 = *(code **)(param_1 + 0x40);
if (pcVar2 == (code *)0x0) {
pcVar2 = miniz_def_alloc_func;
*(code **)(param_1 + 0x40) = miniz_def_alloc_func;
}
if (*(long *)(param_1 + 0x48) == 0) {
*(code **)(param_1 + 0x48) = miniz_def_free_func;
}
puVar3 = (int4 *)(*pcVar2)(*(int8 *)(param_1 + 0x50),1,0xab10);
if (puVar3 == (int4 *)0x0) {
uVar1 = 0xfffffffffffffffc;
}
else {
*(int4 **)(param_1 + 0x38) = puVar3;
*puVar3 = 0;
puVar3[0x2ac3] = 1;
uVar1 = _UNK_0019f5d8;
*(int8 *)(puVar3 + 0xabe) = _DAT_0019f5d0;
*(int8 *)(puVar3 + 0xac0) = uVar1;
puVar3[0xac2] = param_2;
uVar1 = 0;
}
}
return uVar1;
}
return 0xfffffffffffffffe;
}
|
|
1,191 | mz_inflateInit2 | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | int mz_inflateInit2(mz_streamp pStream, int window_bits) {
inflate_state *pDecomp;
if (!pStream)
return MZ_STREAM_ERROR;
if ((window_bits != MZ_DEFAULT_WINDOW_BITS) &&
(-window_bits != MZ_DEFAULT_WINDOW_BITS))
return MZ_PARAM_ERROR;
pStream->data_type = 0;
pStream->adler = 0;
pStream->msg = NULL;
pStream->total_in = 0;
pStream->total_out = 0;
pStream->reserved = 0;
if (!pStream->zalloc)
pStream->zalloc = miniz_def_alloc_func;
if (!pStream->zfree)
pStream->zfree = miniz_def_free_func;
pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1,
sizeof(inflate_state));
if (!pDecomp)
return MZ_MEM_ERROR;
pStream->state = (struct mz_internal_state *)pDecomp;
tinfl_init(&pDecomp->m_decomp);
pDecomp->m_dict_ofs = 0;
pDecomp->m_dict_avail = 0;
pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
pDecomp->m_first_call = 1;
pDecomp->m_has_flushed = 0;
pDecomp->m_window_bits = window_bits;
return MZ_OK;
} | O3 | c | mz_inflateInit2:
testq %rdi, %rdi
je 0x7e3cd
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xf, %esi
je 0x7e349
movl $0xffffd8f0, %eax # imm = 0xFFFFD8F0
cmpl $-0xf, %ebx
jne 0x7e3d8
movl $0x0, 0x58(%r14)
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x60(%r14)
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x7e37a
leaq -0x851(%rip), %rax # 0x7db25
movq %rax, 0x40(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x7e38c
leaq -0x857(%rip), %rcx # 0x7db31
movq %rcx, 0x48(%r14)
movq 0x50(%r14), %rdi
movl $0x1, %esi
movl $0xab10, %edx # imm = 0xAB10
callq *%rax
testq %rax, %rax
je 0x7e3d3
movq %rax, 0x38(%r14)
movl $0x0, (%rax)
movl $0x1, 0xab0c(%rax)
movaps 0x3bd04(%rip), %xmm0 # 0xba0c0
movups %xmm0, 0x2af8(%rax)
movl %ebx, 0x2b08(%rax)
xorl %eax, %eax
jmp 0x7e3d8
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
retq
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| mz_inflateInit2:
test rdi, rdi
jz loc_7E3CD
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 0Fh
jz short loc_7E349
mov eax, 0FFFFD8F0h
cmp ebx, 0FFFFFFF1h
jnz loc_7E3D8
loc_7E349:
mov dword ptr [r14+58h], 0
mov qword ptr [r14+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
movups xmmword ptr [r14+60h], xmm0
mov rax, [r14+40h]
test rax, rax
jnz short loc_7E37A
lea rax, miniz_def_alloc_func
mov [r14+40h], rax
loc_7E37A:
cmp qword ptr [r14+48h], 0
jnz short loc_7E38C
lea rcx, miniz_def_free_func
mov [r14+48h], rcx
loc_7E38C:
mov rdi, [r14+50h]
mov esi, 1
mov edx, 0AB10h
call rax
test rax, rax
jz short loc_7E3D3
mov [r14+38h], rax
mov dword ptr [rax], 0
mov dword ptr [rax+0AB0Ch], 1
movaps xmm0, cs:xmmword_BA0C0
movups xmmword ptr [rax+2AF8h], xmm0
mov [rax+2B08h], ebx
xor eax, eax
jmp short loc_7E3D8
loc_7E3CD:
mov eax, 0FFFFFFFEh
retn
loc_7E3D3:
mov eax, 0FFFFFFFCh
loc_7E3D8:
add rsp, 8
pop rbx
pop r14
retn
| long long mz_inflateInit2(long long a1, int a2)
{
long long result; // rax
long long ( *v3)(long long, long long, long long); // rax
long long v4; // rax
if ( !a1 )
return 4294967294LL;
if ( a2 == 15 || (result = 4294957296LL, a2 == -15) )
{
*(_DWORD *)(a1 + 88) = 0;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
v3 = *(long long ( **)(long long, long long, long long))(a1 + 64);
if ( !v3 )
{
v3 = miniz_def_alloc_func;
*(_QWORD *)(a1 + 64) = miniz_def_alloc_func;
}
if ( !*(_QWORD *)(a1 + 72) )
*(_QWORD *)(a1 + 72) = miniz_def_free_func;
v4 = v3(*(_QWORD *)(a1 + 80), 1LL, 43792LL);
if ( v4 )
{
*(_QWORD *)(a1 + 56) = v4;
*(_DWORD *)v4 = 0;
*(_DWORD *)(v4 + 43788) = 1;
*(_OWORD *)(v4 + 11000) = xmmword_BA0C0;
*(_DWORD *)(v4 + 11016) = a2;
return 0LL;
}
else
{
return 4294967292LL;
}
}
return result;
}
| |||
1,192 | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void write_tensor_data(const struct gguf_tensor_info & info, const size_t offset_data, const size_t alignment) const {
GGML_ASSERT(buf.size() - offset_data == info.offset);
GGML_ASSERT(ggml_is_contiguous(&info.t));
const size_t offset = buf.size();
const size_t nbytes = ggml_nbytes(&info.t);
buf.resize(offset + nbytes);
if (info.t.buffer) {
ggml_backend_tensor_get(&info.t, buf.data() + offset, 0, nbytes);
} else {
GGML_ASSERT(info.t.data);
memcpy(buf.data() + offset, info.t.data, nbytes);
}
pad(alignment);
} | O0 | cpp | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq (%rax), %rdi
callq 0x49650
subq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x150(%rcx), %rax
je 0x92fca
leaq 0x2f619(%rip), %rdi # 0xc25c9
movl $0x4d9, %esi # imm = 0x4D9
leaq 0x1e64d(%rip), %rdx # 0xb1609
leaq 0x2fceb(%rip), %rcx # 0xc2cae
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x92ff8
leaq 0x2f5eb(%rip), %rdi # 0xc25c9
movl $0x4db, %esi # imm = 0x4DB
leaq 0x1e61f(%rip), %rdx # 0xb1609
leaq 0x2fce5(%rip), %rcx # 0xc2cd6
movb $0x0, %al
callq 0x48a00
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x49650
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42650
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
addq -0x30(%rbp), %rsi
callq 0x42480
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x93065
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq (%rax), %rdi
callq 0x461b0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
addq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x46620
jmp 0x930bb
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
jne 0x93094
leaq 0x2f54f(%rip), %rdi # 0xc25c9
movl $0x4e3, %esi # imm = 0x4E3
leaq 0x1e583(%rip), %rdx # 0xb1609
leaq 0x2fc65(%rip), %rcx # 0xc2cf2
movb $0x0, %al
callq 0x48a00
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x461b0
movq %rax, %rdi
addq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x453f0
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x46740
addq $0x40, %rsp
popq %rbp
retq
nop
| _ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rdi, [rax]
call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void)
sub rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+150h]
jz short loc_92FCA
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4D9h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufSizeOffsetD; "buf.size() - offset_data == info.offset"
mov al, 0
call _ggml_abort
loc_92FCA:
mov rdi, [rbp+var_10]
call _ggml_is_contiguous
test al, 1
jnz short loc_92FF8
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4DBh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_21; "ggml_is_contiguous(&info.t)"
mov al, 0
call _ggml_abort
loc_92FF8:
mov rax, [rbp+var_38]
mov rdi, [rax]
call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call _ggml_nbytes
mov rcx, rax
mov rax, [rbp+var_38]
mov [rbp+var_30], rcx
mov rdi, [rax]
mov rsi, [rbp+var_28]
add rsi, [rbp+var_30]
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_93065
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov [rbp+var_40], rcx
mov rdi, [rax]
call __ZNSt6vectorIaSaIaEE4dataEv; std::vector<signed char>::data(void)
mov rdi, [rbp+var_40]
mov rsi, rax
add rsi, [rbp+var_28]
mov rcx, [rbp+var_30]
xor eax, eax
mov edx, eax
call _ggml_backend_tensor_get
jmp short loc_930BB
loc_93065:
mov rax, [rbp+var_10]
cmp qword ptr [rax+0F8h], 0
jnz short loc_93094
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4E3h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aInfoTData; "info.t.data"
mov al, 0
call _ggml_abort
loc_93094:
mov rax, [rbp+var_38]
mov rdi, [rax]
call __ZNSt6vectorIaSaIaEE4dataEv; std::vector<signed char>::data(void)
mov rdi, rax
add rdi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rsi, [rax+0F8h]
mov rdx, [rbp+var_30]
call _memcpy
loc_930BB:
mov rdi, [rbp+var_38]; this
mov rsi, [rbp+var_20]; unsigned __int64
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
add rsp, 40h
pop rbp
retn
| long long gguf_writer::write_tensor_data(gguf_writer *a1, long long a2, long long a3, unsigned long long a4)
{
long long v4; // rax
long long v5; // rax
long long v7; // [rsp+10h] [rbp-30h]
long long v8; // [rsp+18h] [rbp-28h]
if ( std::vector<signed char>::size(*(_QWORD *)a1) - a3 != *(_QWORD *)(a2 + 336) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
1241,
(long long)"GGML_ASSERT(%s) failed",
"buf.size() - offset_data == info.offset");
if ( (ggml_is_contiguous(a2) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
1243,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(&info.t)");
v8 = std::vector<signed char>::size(*(_QWORD *)a1);
v7 = ggml_nbytes((unsigned int *)a2);
std::vector<signed char>::resize(*(_QWORD *)a1, v7 + v8);
if ( *(_QWORD *)(a2 + 8) )
{
v4 = std::vector<signed char>::data(*(_QWORD *)a1);
ggml_backend_tensor_get(a2, v8 + v4, 0LL, v7);
}
else
{
if ( !*(_QWORD *)(a2 + 248) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
1251,
(long long)"GGML_ASSERT(%s) failed",
"info.t.data");
v5 = std::vector<signed char>::data(*(_QWORD *)a1);
memcpy(v8 + v5, *(_QWORD *)(a2 + 248), v7);
}
return gguf_writer::pad(a1, a4);
}
| write_tensor_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RAX]
CALL 0x00149650
SUB RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x150]
JZ 0x00192fca
LEA RDI,[0x1c25c9]
MOV ESI,0x4d9
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2cae]
MOV AL,0x0
CALL 0x00148a00
LAB_00192fca:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00192ff8
LEA RDI,[0x1c25c9]
MOV ESI,0x4db
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2cd6]
MOV AL,0x0
CALL 0x00148a00
LAB_00192ff8:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX]
CALL 0x00149650
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00142650
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,qword ptr [RBP + -0x30]
CALL 0x00142480
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00193065
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RCX
MOV RDI,qword ptr [RAX]
CALL 0x001461b0
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,RAX
ADD RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00146620
JMP 0x001930bb
LAB_00193065:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xf8],0x0
JNZ 0x00193094
LEA RDI,[0x1c25c9]
MOV ESI,0x4e3
LEA RDX,[0x1b1609]
LEA RCX,[0x1c2cf2]
MOV AL,0x0
CALL 0x00148a00
LAB_00193094:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX]
CALL 0x001461b0
MOV RDI,RAX
ADD RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0xf8]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001453f0
LAB_001930bb:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00146740
ADD RSP,0x40
POP RBP
RET
|
/* gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const */
void __thiscall
gguf_writer::write_tensor_data
(gguf_writer *this,gguf_tensor_info *param_1,ulong param_2,ulong param_3)
{
long lVar1;
ulong uVar2;
size_t __n;
long lVar3;
lVar1 = std::vector<signed_char,std::allocator<signed_char>>::size
(*(vector<signed_char,std::allocator<signed_char>> **)this);
if (lVar1 - param_2 != *(long *)(param_1 + 0x150)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x4d9,"GGML_ASSERT(%s) failed","buf.size() - offset_data == info.offset");
}
uVar2 = ggml_is_contiguous(param_1);
if ((uVar2 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x4db,"GGML_ASSERT(%s) failed","ggml_is_contiguous(&info.t)");
}
lVar1 = std::vector<signed_char,std::allocator<signed_char>>::size
(*(vector<signed_char,std::allocator<signed_char>> **)this);
__n = ggml_nbytes(param_1);
std::vector<signed_char,std::allocator<signed_char>>::resize
(*(vector<signed_char,std::allocator<signed_char>> **)this,lVar1 + __n);
if (*(long *)(param_1 + 8) == 0) {
if (*(long *)(param_1 + 0xf8) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x4e3,"GGML_ASSERT(%s) failed","info.t.data");
}
lVar3 = std::vector<signed_char,std::allocator<signed_char>>::data
(*(vector<signed_char,std::allocator<signed_char>> **)this);
memcpy((void *)(lVar3 + lVar1),*(void **)(param_1 + 0xf8),__n);
}
else {
lVar3 = std::vector<signed_char,std::allocator<signed_char>>::data
(*(vector<signed_char,std::allocator<signed_char>> **)this);
ggml_backend_tensor_get(param_1,lVar3 + lVar1,0,__n);
}
pad(this,param_3);
return;
}
|
|
1,193 | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void write_tensor_data(const struct gguf_tensor_info & info, const size_t offset_data, const size_t alignment) const {
GGML_ASSERT(buf.size() - offset_data == info.offset);
GGML_ASSERT(ggml_is_contiguous(&info.t));
const size_t offset = buf.size();
const size_t nbytes = ggml_nbytes(&info.t);
buf.resize(offset + nbytes);
if (info.t.buffer) {
ggml_backend_tensor_get(&info.t, buf.data() + offset, 0, nbytes);
} else {
GGML_ASSERT(info.t.data);
memcpy(buf.data() + offset, info.t.data, nbytes);
}
pad(alignment);
} | O1 | cpp | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
addq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq 0x150(%rsi), %rax
jne 0x43163
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x17420
testb %al, %al
je 0x4317f
movq (%r14), %rax
movq 0x8(%rax), %r12
subq (%rax), %r12
movq %r15, %rdi
callq 0x171c0
movq %rax, %r13
movq (%r14), %rdi
leaq (%rax,%r12), %rsi
callq 0x17130
cmpq $0x0, 0x8(%r15)
je 0x43132
movq (%r14), %rax
addq (%rax), %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x18320
jmp 0x4314f
movq 0xf8(%r15), %rsi
testq %rsi, %rsi
je 0x4319b
movq (%r14), %rax
addq (%rax), %r12
movq %r12, %rdi
movq %r13, %rdx
callq 0x17e10
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x18360
leaq 0x19e83(%rip), %rdi # 0x5cfed
leaq 0x9450(%rip), %rdx # 0x4c5c1
leaq 0x1a55a(%rip), %rcx # 0x5d6d2
movl $0x4d9, %esi # imm = 0x4D9
jmp 0x431b5
leaq 0x19e67(%rip), %rdi # 0x5cfed
leaq 0x9434(%rip), %rdx # 0x4c5c1
leaq 0x1a566(%rip), %rcx # 0x5d6fa
movl $0x4db, %esi # imm = 0x4DB
jmp 0x431b5
leaq 0x19e4b(%rip), %rdi # 0x5cfed
leaq 0x9418(%rip), %rdx # 0x4c5c1
leaq 0x1a566(%rip), %rcx # 0x5d716
movl $0x4e3, %esi # imm = 0x4E3
xorl %eax, %eax
callq 0x18ce0
| _ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm:
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi]
add rdx, [rax]
mov rax, [rax+8]
sub rax, rdx
cmp rax, [rsi+150h]
jnz loc_43163
mov rbx, rcx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_4317F
mov rax, [r14]
mov r12, [rax+8]
sub r12, [rax]
mov rdi, r15
call _ggml_nbytes
mov r13, rax
mov rdi, [r14]
lea rsi, [rax+r12]
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
cmp qword ptr [r15+8], 0
jz short loc_43132
mov rax, [r14]
add r12, [rax]
mov rdi, r15
mov rsi, r12
xor edx, edx
mov rcx, r13
call _ggml_backend_tensor_get
jmp short loc_4314F
loc_43132:
mov rsi, [r15+0F8h]
test rsi, rsi
jz short loc_4319B
mov rax, [r14]
add r12, [rax]
mov rdi, r12
mov rdx, r13
call _memcpy
loc_4314F:
mov rdi, r14; this
mov rsi, rbx; unsigned __int64
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
loc_43163:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufSizeOffsetD; "buf.size() - offset_data == info.offset"
mov esi, 4D9h
jmp short loc_431B5
loc_4317F:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_21; "ggml_is_contiguous(&info.t)"
mov esi, 4DBh
jmp short loc_431B5
loc_4319B:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aInfoTData; "info.t.data"
mov esi, 4E3h
loc_431B5:
xor eax, eax
call _ggml_abort
| long long gguf_writer::write_tensor_data(
gguf_writer *this,
long long a2,
long long a3,
unsigned long long a4,
int a5,
int a6)
{
long long v7; // r12
unsigned long long v8; // r13
const char *v10; // rcx
int v11; // esi
if ( *(_QWORD *)(*(_QWORD *)this + 8LL) - (**(_QWORD **)this + a3) != *(_QWORD *)(a2 + 336) )
{
v10 = "buf.size() - offset_data == info.offset";
v11 = 1241;
goto LABEL_11;
}
if ( !(unsigned __int8)ggml_is_contiguous(a2) )
{
v10 = "ggml_is_contiguous(&info.t)";
v11 = 1243;
goto LABEL_11;
}
v7 = *(_QWORD *)(*(_QWORD *)this + 8LL) - **(_QWORD **)this;
v8 = ggml_nbytes((unsigned int *)a2);
std::vector<signed char>::resize(*(_QWORD *)this, v8 + v7);
if ( !*(_QWORD *)(a2 + 8) )
{
if ( *(_QWORD *)(a2 + 248) )
{
memcpy(**(_QWORD **)this + v7);
return gguf_writer::pad(this, a4);
}
v10 = "info.t.data";
v11 = 1251;
LABEL_11:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
ggml_backend_tensor_get(a2, **(_QWORD **)this + v7, 0LL, v8);
return gguf_writer::pad(this, a4);
}
| write_tensor_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI]
ADD RDX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RDX
CMP RAX,qword ptr [RSI + 0x150]
JNZ 0x00143163
MOV RBX,RCX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00117420
TEST AL,AL
JZ 0x0014317f
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + 0x8]
SUB R12,qword ptr [RAX]
MOV RDI,R15
CALL 0x001171c0
MOV R13,RAX
MOV RDI,qword ptr [R14]
LEA RSI,[RAX + R12*0x1]
CALL 0x00117130
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00143132
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R15
MOV RSI,R12
XOR EDX,EDX
MOV RCX,R13
CALL 0x00118320
JMP 0x0014314f
LAB_00143132:
MOV RSI,qword ptr [R15 + 0xf8]
TEST RSI,RSI
JZ 0x0014319b
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R12
MOV RDX,R13
CALL 0x00117e10
LAB_0014314f:
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00118360
LAB_00143163:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d6d2]
MOV ESI,0x4d9
JMP 0x001431b5
LAB_0014317f:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d6fa]
MOV ESI,0x4db
JMP 0x001431b5
LAB_0014319b:
LEA RDI,[0x15cfed]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15d716]
MOV ESI,0x4e3
LAB_001431b5:
XOR EAX,EAX
CALL 0x00118ce0
|
/* gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const */
void __thiscall
gguf_writer::write_tensor_data
(gguf_writer *this,gguf_tensor_info *param_1,ulong param_2,ulong param_3)
{
char cVar1;
size_t __n;
char *pcVar2;
int8 uVar3;
long lVar4;
if ((*(long **)this)[1] - (param_2 + **(long **)this) == *(long *)(param_1 + 0x150)) {
cVar1 = ggml_is_contiguous(param_1);
if (cVar1 != '\0') {
lVar4 = (*(long **)this)[1] - **(long **)this;
__n = ggml_nbytes(param_1);
std::vector<signed_char,std::allocator<signed_char>>::resize
(*(vector<signed_char,std::allocator<signed_char>> **)this,__n + lVar4);
if (*(long *)(param_1 + 8) == 0) {
if (*(void **)(param_1 + 0xf8) == (void *)0x0) {
pcVar2 = "info.t.data";
uVar3 = 0x4e3;
goto LAB_001431b5;
}
memcpy((void *)(lVar4 + **(long **)this),*(void **)(param_1 + 0xf8),__n);
}
else {
ggml_backend_tensor_get(param_1,lVar4 + **(long **)this,0,__n);
}
pad(this,param_3);
return;
}
pcVar2 = "ggml_is_contiguous(&info.t)";
uVar3 = 0x4db;
}
else {
pcVar2 = "buf.size() - offset_data == info.offset";
uVar3 = 0x4d9;
}
LAB_001431b5:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
1,194 | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void write_tensor_data(const struct gguf_tensor_info & info, const size_t offset_data, const size_t alignment) const {
GGML_ASSERT(buf.size() - offset_data == info.offset);
GGML_ASSERT(ggml_is_contiguous(&info.t));
const size_t offset = buf.size();
const size_t nbytes = ggml_nbytes(&info.t);
buf.resize(offset + nbytes);
if (info.t.buffer) {
ggml_backend_tensor_get(&info.t, buf.data() + offset, 0, nbytes);
} else {
GGML_ASSERT(info.t.data);
memcpy(buf.data() + offset, info.t.data, nbytes);
}
pad(alignment);
} | O3 | cpp | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
addq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq 0x150(%rsi), %rax
jne 0x42a8f
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x16420
testb %al, %al
je 0x42aab
movq (%r14), %rax
movq 0x8(%rax), %r12
subq (%rax), %r12
movq %r15, %rdi
callq 0x161c0
movq %rax, %r13
movq (%r14), %rdi
leaq (%rax,%r12), %rsi
callq 0x16130
cmpq $0x0, 0x8(%r15)
je 0x42a5e
movq (%r14), %rax
addq (%rax), %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x17310
jmp 0x42a7b
movq 0xf8(%r15), %rsi
testq %rsi, %rsi
je 0x42ac7
movq (%r14), %rax
addq (%rax), %r12
movq %r12, %rdi
movq %r13, %rdx
callq 0x16e10
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x17350
leaq 0x1aa47(%rip), %rdi # 0x5d4dd
leaq 0x9bc8(%rip), %rdx # 0x4c665
leaq 0x1b11e(%rip), %rcx # 0x5dbc2
movl $0x4d9, %esi # imm = 0x4D9
jmp 0x42ae1
leaq 0x1aa2b(%rip), %rdi # 0x5d4dd
leaq 0x9bac(%rip), %rdx # 0x4c665
leaq 0x1b12a(%rip), %rcx # 0x5dbea
movl $0x4db, %esi # imm = 0x4DB
jmp 0x42ae1
leaq 0x1aa0f(%rip), %rdi # 0x5d4dd
leaq 0x9b90(%rip), %rdx # 0x4c665
leaq 0x1b12a(%rip), %rcx # 0x5dc06
movl $0x4e3, %esi # imm = 0x4E3
xorl %eax, %eax
callq 0x17cd0
| _ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm:
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi]
add rdx, [rax]
mov rax, [rax+8]
sub rax, rdx
cmp rax, [rsi+150h]
jnz loc_42A8F
mov rbx, rcx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_42AAB
mov rax, [r14]
mov r12, [rax+8]
sub r12, [rax]
mov rdi, r15
call _ggml_nbytes
mov r13, rax
mov rdi, [r14]
lea rsi, [rax+r12]
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
cmp qword ptr [r15+8], 0
jz short loc_42A5E
mov rax, [r14]
add r12, [rax]
mov rdi, r15
mov rsi, r12
xor edx, edx
mov rcx, r13
call _ggml_backend_tensor_get
jmp short loc_42A7B
loc_42A5E:
mov rsi, [r15+0F8h]
test rsi, rsi
jz short loc_42AC7
mov rax, [r14]
add r12, [rax]
mov rdi, r12
mov rdx, r13
call _memcpy
loc_42A7B:
mov rdi, r14; this
mov rsi, rbx; unsigned __int64
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
loc_42A8F:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufSizeOffsetD; "buf.size() - offset_data == info.offset"
mov esi, 4D9h
jmp short loc_42AE1
loc_42AAB:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_21; "ggml_is_contiguous(&info.t)"
mov esi, 4DBh
jmp short loc_42AE1
loc_42AC7:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aInfoTData; "info.t.data"
mov esi, 4E3h
loc_42AE1:
xor eax, eax
call _ggml_abort
| long long gguf_writer::write_tensor_data(
gguf_writer *this,
long long a2,
long long a3,
unsigned long long a4,
int a5,
int a6)
{
long long v7; // r12
unsigned long long v8; // r13
const char *v10; // rcx
int v11; // esi
if ( *(_QWORD *)(*(_QWORD *)this + 8LL) - (**(_QWORD **)this + a3) != *(_QWORD *)(a2 + 336) )
{
v10 = "buf.size() - offset_data == info.offset";
v11 = 1241;
goto LABEL_11;
}
if ( !(unsigned __int8)ggml_is_contiguous(a2) )
{
v10 = "ggml_is_contiguous(&info.t)";
v11 = 1243;
goto LABEL_11;
}
v7 = *(_QWORD *)(*(_QWORD *)this + 8LL) - **(_QWORD **)this;
v8 = ggml_nbytes((unsigned int *)a2);
std::vector<signed char>::resize(*(_QWORD *)this, v8 + v7);
if ( !*(_QWORD *)(a2 + 8) )
{
if ( *(_QWORD *)(a2 + 248) )
{
memcpy(**(_QWORD **)this + v7);
return gguf_writer::pad(this, a4);
}
v10 = "info.t.data";
v11 = 1251;
LABEL_11:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
ggml_backend_tensor_get(a2, **(_QWORD **)this + v7, 0LL, v8);
return gguf_writer::pad(this, a4);
}
| write_tensor_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI]
ADD RDX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RDX
CMP RAX,qword ptr [RSI + 0x150]
JNZ 0x00142a8f
MOV RBX,RCX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00116420
TEST AL,AL
JZ 0x00142aab
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + 0x8]
SUB R12,qword ptr [RAX]
MOV RDI,R15
CALL 0x001161c0
MOV R13,RAX
MOV RDI,qword ptr [R14]
LEA RSI,[RAX + R12*0x1]
CALL 0x00116130
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00142a5e
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R15
MOV RSI,R12
XOR EDX,EDX
MOV RCX,R13
CALL 0x00117310
JMP 0x00142a7b
LAB_00142a5e:
MOV RSI,qword ptr [R15 + 0xf8]
TEST RSI,RSI
JZ 0x00142ac7
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R12
MOV RDX,R13
CALL 0x00116e10
LAB_00142a7b:
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00117350
LAB_00142a8f:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15dbc2]
MOV ESI,0x4d9
JMP 0x00142ae1
LAB_00142aab:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15dbea]
MOV ESI,0x4db
JMP 0x00142ae1
LAB_00142ac7:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15dc06]
MOV ESI,0x4e3
LAB_00142ae1:
XOR EAX,EAX
CALL 0x00117cd0
|
/* gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const */
void __thiscall
gguf_writer::write_tensor_data
(gguf_writer *this,gguf_tensor_info *param_1,ulong param_2,ulong param_3)
{
char cVar1;
size_t __n;
char *pcVar2;
int8 uVar3;
long lVar4;
if ((*(long **)this)[1] - (param_2 + **(long **)this) == *(long *)(param_1 + 0x150)) {
cVar1 = ggml_is_contiguous(param_1);
if (cVar1 != '\0') {
lVar4 = (*(long **)this)[1] - **(long **)this;
__n = ggml_nbytes(param_1);
std::vector<signed_char,std::allocator<signed_char>>::resize
(*(vector<signed_char,std::allocator<signed_char>> **)this,__n + lVar4);
if (*(long *)(param_1 + 8) == 0) {
if (*(void **)(param_1 + 0xf8) == (void *)0x0) {
pcVar2 = "info.t.data";
uVar3 = 0x4e3;
goto LAB_00142ae1;
}
memcpy((void *)(lVar4 + **(long **)this),*(void **)(param_1 + 0xf8),__n);
}
else {
ggml_backend_tensor_get(param_1,lVar4 + **(long **)this,0,__n);
}
pad(this,param_3);
return;
}
pcVar2 = "ggml_is_contiguous(&info.t)";
uVar3 = 0x4db;
}
else {
pcVar2 = "buf.size() - offset_data == info.offset";
uVar3 = 0x4d9;
}
LAB_00142ae1:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
1,195 | my_fclose | eloqsql/mysys/my_fopen.c | int my_fclose(FILE *fd, myf MyFlags)
{
int err,file;
char *name= NULL;
DBUG_ENTER("my_fclose");
DBUG_PRINT("my",("stream: %p MyFlags: %lu", fd, MyFlags));
file= my_fileno(fd);
if ((uint) file < my_file_limit && my_file_info[file].type != UNOPEN)
{
name= my_file_info[file].name;
my_file_info[file].name= NULL;
my_file_info[file].type= UNOPEN;
}
#ifndef _WIN32
err= fclose(fd);
#else
err= my_win_fclose(fd);
#endif
if(err < 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL), name, errno);
}
else
statistic_decrement(my_stream_opened, &THR_LOCK_open);
if (name)
{
my_free(name);
}
DBUG_RETURN(err);
} | O3 | c | my_fclose:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0xa092e
leaq 0x2eb827(%rip), %rcx # 0x38be80
cmpl (%rcx), %eax
jae 0xa068e
leaq 0x2eb824(%rip), %rcx # 0x38be88
movq (%rcx), %rdx
cltq
shlq $0x4, %rax
cmpl $0x0, 0x8(%rdx,%rax)
je 0xa068e
addq %rax, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rcx), %rcx
movl $0x0, 0x8(%rcx,%rax)
jmp 0xa0690
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x2a360
movl %eax, %r15d
testl %eax, %eax
js 0xa06ab
leaq 0xb6db8a(%rip), %rax # 0xc0e230
decq (%rax)
jmp 0xa06dc
callq 0x2a7a0
movq %rax, %r12
movl (%rax), %r13d
callq 0xa63fe
movl %r13d, (%rax)
testb $0x18, %r14b
je 0xa06dc
movl (%r12), %ecx
movl $0x4, %esi
movl $0x4, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa0153
testq %rbx, %rbx
je 0xa06e9
movq %rbx, %rdi
callq 0xa4926
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_fclose:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
call my_fileno
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_A068E
lea rcx, my_file_info
mov rdx, [rcx]
cdqe
shl rax, 4
cmp dword ptr [rdx+rax+8], 0
jz short loc_A068E
add rdx, rax
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rcx, [rcx]
mov dword ptr [rcx+rax+8], 0
jmp short loc_A0690
loc_A068E:
xor ebx, ebx
loc_A0690:
mov rdi, r15
call _fclose
mov r15d, eax
test eax, eax
js short loc_A06AB
lea rax, my_stream_opened
dec qword ptr [rax]
jmp short loc_A06DC
loc_A06AB:
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_A06DC
mov ecx, [r12]
mov esi, 4
mov edi, 4
mov rdx, rbx
xor eax, eax
call my_error
loc_A06DC:
test rbx, rbx
jz short loc_A06E9
mov rdi, rbx
call my_free
loc_A06E9:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_fclose(long long a1, const char *a2)
{
unsigned int v2; // eax
long long v3; // rax
long long v4; // rbx
int v5; // r15d
unsigned int *v6; // r12
unsigned int v7; // r13d
v2 = my_fileno(a1);
if ( v2 < my_file_limit && (v3 = 16LL * (int)v2, *(_DWORD *)((char *)my_file_info + v3 + 8)) )
{
v4 = *(_QWORD *)((char *)my_file_info + v3);
*(_QWORD *)((char *)my_file_info + v3) = 0LL;
*(_DWORD *)((char *)my_file_info + v3 + 8) = 0;
}
else
{
v4 = 0LL;
}
v5 = fclose(a1);
if ( v5 < 0 )
{
v6 = (unsigned int *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1, a2) = v7;
if ( ((unsigned __int8)a2 & 0x18) != 0 )
my_error(4u, 4LL, v4, *v6);
}
else
{
--my_stream_opened;
}
if ( v4 )
my_free(v4);
return (unsigned int)v5;
}
| my_fclose:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
CALL 0x001a092e
LEA RCX,[0x48be80]
CMP EAX,dword ptr [RCX]
JNC 0x001a068e
LEA RCX,[0x48be88]
MOV RDX,qword ptr [RCX]
CDQE
SHL RAX,0x4
CMP dword ptr [RDX + RAX*0x1 + 0x8],0x0
JZ 0x001a068e
ADD RDX,RAX
MOV RBX,qword ptr [RDX]
MOV qword ptr [RDX],0x0
MOV RCX,qword ptr [RCX]
MOV dword ptr [RCX + RAX*0x1 + 0x8],0x0
JMP 0x001a0690
LAB_001a068e:
XOR EBX,EBX
LAB_001a0690:
MOV RDI,R15
CALL 0x0012a360
MOV R15D,EAX
TEST EAX,EAX
JS 0x001a06ab
LEA RAX,[0xd0e230]
DEC qword ptr [RAX]
JMP 0x001a06dc
LAB_001a06ab:
CALL 0x0012a7a0
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001a63fe
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x001a06dc
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x4
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001a0153
LAB_001a06dc:
TEST RBX,RBX
JZ 0x001a06e9
MOV RDI,RBX
CALL 0x001a4926
LAB_001a06e9:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_fclose(FILE *param_1,ulong param_2)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
int *piVar5;
int *piVar6;
long lVar7;
uVar2 = my_fileno();
if (uVar2 < my_file_limit) {
lVar4 = (long)(int)uVar2 * 0x10;
if (*(int *)(my_file_info + lVar4 + 8) != 0) {
lVar7 = *(long *)(my_file_info + lVar4);
*(long *)(my_file_info + lVar4) = 0;
*(int4 *)(my_file_info + lVar4 + 8) = 0;
goto LAB_001a0690;
}
}
lVar7 = 0;
LAB_001a0690:
iVar3 = fclose(param_1);
if (iVar3 < 0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
if ((param_2 & 0x18) != 0) {
my_error(4,4,lVar7,*piVar5);
}
}
else {
my_stream_opened = my_stream_opened + -1;
}
if (lVar7 != 0) {
my_free(lVar7);
}
return iVar3;
}
|
|
1,196 | ma_ck_delete | eloqsql/storage/maria/ma_delete.c | my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
int res;
my_bool buff_alloced;
LSN lsn= LSN_IMPOSSIBLE;
my_off_t new_root= share->state.key_root[key->keyinfo->key_nr];
uchar *key_buff, *save_key_data;
MARIA_KEY org_key;
DBUG_ENTER("_ma_ck_delete");
LINT_INIT_STRUCT(org_key);
alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced,
key->keyinfo->max_store_length);
if (!key_buff)
DBUG_RETURN(1);
save_key_data= key->data;
if (share->now_transactional)
{
/* Save original value as the key may change */
memcpy(key_buff, key->data, key->data_length + key->ref_length);
org_key= *key;
key->data= key_buff;
}
if ((res= _ma_ck_real_delete(info, key, &new_root)))
{
/* We have to mark the table crashed before unpin_all_pages() */
maria_mark_crashed(info);
}
key->data= save_key_data;
if (!res && share->now_transactional)
res= _ma_write_undo_key_delete(info, &org_key, new_root, &lsn);
else
{
share->state.key_root[key->keyinfo->key_nr]= new_root;
_ma_fast_unlock_key_del(info);
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
stack_alloc_free(key_buff, buff_alloced);
DBUG_RETURN(res != 0);
} | O3 | c | ma_ck_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r13
movq $0x0, -0x48(%rbp)
movq 0x118(%r13), %rax
movq 0x8(%rsi), %rcx
movzbl 0xa5(%rcx), %edx
movq (%rax,%rdx,8), %rax
movq %rax, -0x40(%rbp)
movzwl 0xb0(%rcx), %esi
leaq -0x70(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rdi), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x59039
cmpq $0x10000, %rax # imm = 0x10000
ja 0x59023
cmpl $0x1000, %esi # imm = 0x1000
jb 0x59039
cmpq $0x8001, %rax # imm = 0x8001
jb 0x59039
movq %rsp, %r15
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %r15
movq %r15, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x59058
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9fec1
testq %rax, %rax
je 0x59137
movq %rax, %r15
movl $0x0, -0x34(%rbp)
movq (%r14), %r12
cmpb $0x0, 0x7e7(%r13)
je 0x5908c
movl 0x14(%r14), %edx
addl 0x10(%r14), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x29080
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm0, -0x70(%rbp)
movaps %xmm1, -0x60(%rbp)
movq %r15, (%r14)
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5915c
testb %al, %al
je 0x590df
movq (%rbx), %rcx
orl $0x2, 0x170(%rcx)
movq %r12, (%r14)
movzbl %al, %r12d
movq -0x40(%rbp), %rax
movq 0x118(%r13), %rcx
movq 0x8(%r14), %rdx
movzbl 0xa5(%rdx), %edx
movq %rax, (%rcx,%rdx,8)
cmpb $0x0, 0x67e(%rbx)
je 0x590db
movq %rbx, %rdi
callq 0x4150a
xorl %esi, %esi
jmp 0x5910a
movq %r12, (%r14)
cmpb $0x0, 0x7e7(%r13)
je 0x590ac
movq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rsi
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x5934b
movsbl %al, %r12d
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3fe50
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
cmpb $0x0, -0x34(%rbp)
jne 0x5912f
movq %r15, %rdi
callq 0xa00ee
testl %r12d, %r12d
setne %al
jmp 0x59139
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x59157
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| _ma_ck_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13, [rdi]
mov [rbp+var_48], 0
mov rax, [r13+118h]
mov rcx, [rsi+8]
movzx edx, byte ptr [rcx+0A5h]
mov rax, [rax+rdx*8]
mov [rbp+var_40], rax
movzx esi, word ptr [rcx+0B0h]
lea rcx, [rbp+var_70]
mov [rcx], rsi
mov rax, [rdi+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_59039
cmp rax, offset stru_10000
ja short loc_59023
cmp esi, 1000h
jb short loc_59039
cmp rax, 8001h
jb short loc_59039
loc_59023:
mov r15, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub r15, rsi
mov rsp, r15
mov al, 1
mov [rbp+var_34], eax
jmp short loc_59058
loc_59039:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_59137
mov r15, rax
mov [rbp+var_34], 0
loc_59058:
mov r12, [r14]
cmp byte ptr [r13+7E7h], 0
jz short loc_5908C
mov edx, [r14+14h]
add edx, [r14+10h]
mov rdi, r15
mov rsi, r12
call _memcpy
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
movaps [rbp+var_70], xmm0
movaps [rbp+var_60], xmm1
mov [r14], r15
loc_5908C:
lea rdx, [rbp+var_40]
mov rdi, rbx
mov rsi, r14
call _ma_ck_real_delete
test al, al
jz short loc_590DF
mov rcx, [rbx]
or dword ptr [rcx+170h], 2
mov [r14], r12
loc_590AC:
movzx r12d, al
mov rax, [rbp+var_40]
mov rcx, [r13+118h]
mov rdx, [r14+8]
movzx edx, byte ptr [rdx+0A5h]
mov [rcx+rdx*8], rax
cmp byte ptr [rbx+67Eh], 0
jz short loc_590DB
mov rdi, rbx
call _ma_unlock_key_del
loc_590DB:
xor esi, esi
jmp short loc_5910A
loc_590DF:
mov [r14], r12
cmp byte ptr [r13+7E7h], 0
jz short loc_590AC
mov rdx, [rbp+var_40]
lea rsi, [rbp+var_70]
lea r14, [rbp+var_48]
mov rdi, rbx
mov rcx, r14
call _ma_write_undo_key_delete
movsx r12d, al
mov rsi, [r14]
loc_5910A:
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
cmp byte ptr [rbp+var_34], 0
jnz short loc_5912F
mov rdi, r15
call my_free
loc_5912F:
test r12d, r12d
setnz al
jmp short loc_59139
loc_59137:
mov al, 1
loc_59139:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_59157
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_59157:
call ___stack_chk_fail
| bool ma_ck_delete(_QWORD **a1, long long *a2)
{
_DWORD *v3; // r13
long long v4; // rcx
unsigned long long v5; // rsi
unsigned long long v6; // rax
bool v7; // cc
unsigned long long v8; // rax
char *v9; // r15
long long v10; // rax
long long v11; // r12
__int128 v12; // xmm1
unsigned __int8 v13; // al
int v14; // r12d
signed long long v15; // rsi
_OWORD v17[2]; // [rsp+0h] [rbp-70h] BYREF
signed long long v18; // [rsp+28h] [rbp-48h] BYREF
long long v19; // [rsp+30h] [rbp-40h] BYREF
int v20; // [rsp+3Ch] [rbp-34h]
unsigned long long v21; // [rsp+40h] [rbp-30h]
v21 = __readfsqword(0x28u);
v3 = *a1;
v18 = 0LL;
v4 = a2[1];
v19 = *(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(v4 + 165));
v5 = *(unsigned __int16 *)(v4 + 176);
*(_QWORD *)&v17[0] = v5;
v6 = *a1[15] - (_QWORD)v17;
v7 = v6 <= v5;
v8 = v6 - v5;
if ( v7 || v8 <= (unsigned long long)&stru_10000 && ((unsigned int)v5 < 0x1000 || v8 < 0x8001) )
{
v10 = my_malloc(0LL, v5, 65552LL);
if ( !v10 )
return 1;
v9 = (char *)v10;
v20 = 0;
}
else
{
v9 = (char *)v17 - (((_DWORD)v5 + 15) & 0xFFFFFFF0);
LOBYTE(v8) = 1;
v20 = v8;
}
v11 = *a2;
if ( *((_BYTE *)v3 + 2023) )
{
memcpy(v9, *a2, (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5)));
v12 = *((_OWORD *)a2 + 1);
v17[0] = *(_OWORD *)a2;
v17[1] = v12;
*a2 = (long long)v9;
}
v13 = ma_ck_real_delete(a1, a2, &v19);
if ( v13 )
{
*((_DWORD *)*a1 + 92) |= 2u;
*a2 = v11;
LABEL_12:
v14 = v13;
*(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(a2[1] + 165)) = v19;
if ( *((_BYTE *)a1 + 1662) )
ma_unlock_key_del(a1);
v15 = 0LL;
goto LABEL_17;
}
*a2 = v11;
if ( !*((_BYTE *)v3 + 2023) )
goto LABEL_12;
v14 = (char)((long long ( *)(_QWORD **, _OWORD *, long long, signed long long *))ma_write_undo_key_delete)(
a1,
v17,
v19,
&v18);
v15 = v18;
LABEL_17:
ma_unpin_all_pages((long long)a1, v15);
a1[1][18] = 0LL;
if ( !(_BYTE)v20 )
my_free(v9);
return v14 != 0;
}
| _ma_ck_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13,qword ptr [RDI]
MOV qword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [R13 + 0x118]
MOV RCX,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RCX + 0xa5]
MOV RAX,qword ptr [RAX + RDX*0x8]
MOV qword ptr [RBP + -0x40],RAX
MOVZX ESI,word ptr [RCX + 0xb0]
LEA RCX,[RBP + -0x70]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00159039
CMP RAX,0x10000
JA 0x00159023
CMP ESI,0x1000
JC 0x00159039
CMP RAX,0x8001
JC 0x00159039
LAB_00159023:
MOV R15,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB R15,RSI
MOV RSP,R15
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00159058
LAB_00159039:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019fec1
TEST RAX,RAX
JZ 0x00159137
MOV R15,RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_00159058:
MOV R12,qword ptr [R14]
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x0015908c
MOV EDX,dword ptr [R14 + 0x14]
ADD EDX,dword ptr [R14 + 0x10]
MOV RDI,R15
MOV RSI,R12
CALL 0x00129080
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM1
MOV qword ptr [R14],R15
LAB_0015908c:
LEA RDX,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0015915c
TEST AL,AL
JZ 0x001590df
MOV RCX,qword ptr [RBX]
OR dword ptr [RCX + 0x170],0x2
MOV qword ptr [R14],R12
LAB_001590ac:
MOVZX R12D,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [R13 + 0x118]
MOV RDX,qword ptr [R14 + 0x8]
MOVZX EDX,byte ptr [RDX + 0xa5]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x001590db
MOV RDI,RBX
CALL 0x0014150a
LAB_001590db:
XOR ESI,ESI
JMP 0x0015910a
LAB_001590df:
MOV qword ptr [R14],R12
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x001590ac
MOV RDX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x70]
LEA R14,[RBP + -0x48]
MOV RDI,RBX
MOV RCX,R14
CALL 0x0015934b
MOVSX R12D,AL
MOV RSI,qword ptr [R14]
LAB_0015910a:
MOV RDI,RBX
CALL 0x0013fe50
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x0015912f
MOV RDI,R15
CALL 0x001a00ee
LAB_0015912f:
TEST R12D,R12D
SETNZ AL
JMP 0x00159139
LAB_00159137:
MOV AL,0x1
LAB_00159139:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00159157
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00159157:
CALL 0x00129250
|
bool _ma_ck_delete(long *param_1,ulong *param_2)
{
ushort uVar1;
int iVar2;
long lVar3;
void *__src;
byte bVar4;
char cVar5;
ulong uVar6;
int1 *__dest;
ulong *puVar7;
int8 uVar8;
uint uVar9;
long in_FS_OFFSET;
bool bVar10;
ulong local_78;
int4 uStack_70;
int4 uStack_6c;
ulong local_68;
ulong uStack_60;
int8 local_50;
int8 local_48;
int4 local_3c;
long local_38;
puVar7 = &local_78;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = *param_1;
local_50 = 0;
local_48 = *(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8);
uVar1 = *(ushort *)(param_2[1] + 0xb0);
local_78 = (ulong)uVar1;
uVar6 = (*(long *)param_1[0xf] - (long)&local_78) - local_78;
if (((ulong)(*(long *)param_1[0xf] - (long)&local_78) < local_78 || uVar6 == 0) ||
((uVar6 < 0x10001 && ((uVar1 < 0x1000 || (uVar6 < 0x8001)))))) {
__dest = (int1 *)my_malloc(0,local_78,0x10010);
if (__dest == (int1 *)0x0) {
bVar10 = true;
goto LAB_00159139;
}
local_3c = 0;
puVar7 = &local_78;
}
else {
__dest = (int1 *)((long)&local_78 - (ulong)(uVar1 + 0xf & 0xfffffff0));
local_3c = (int4)CONCAT71((int7)(uVar6 >> 8),1);
puVar7 = (ulong *)__dest;
}
__src = (void *)*param_2;
if (*(char *)(lVar3 + 0x7e7) != '\0') {
iVar2 = *(int *)((long)param_2 + 0x14);
uVar6 = param_2[2];
*(int8 *)((long)puVar7 + -8) = 0x159078;
memcpy(__dest,__src,(ulong)(uint)(iVar2 + (int)uVar6));
local_78 = *param_2;
uStack_70 = (int4)param_2[1];
uStack_6c = *(int4 *)((long)param_2 + 0xc);
local_68 = param_2[2];
uStack_60 = param_2[3];
*param_2 = (ulong)__dest;
}
*(int8 *)((long)puVar7 + -8) = 0x15909b;
bVar4 = _ma_ck_real_delete(param_1,param_2,&local_48);
uVar8 = local_48;
if (bVar4 == 0) {
*param_2 = (ulong)__src;
if (*(char *)(lVar3 + 0x7e7) == '\0') goto LAB_001590ac;
*(int8 *)((long)puVar7 + -8) = 0x159103;
cVar5 = _ma_write_undo_key_delete(param_1,&local_78,uVar8,&local_50);
uVar9 = (uint)cVar5;
uVar8 = local_50;
}
else {
*(uint *)(*param_1 + 0x170) = *(uint *)(*param_1 + 0x170) | 2;
*param_2 = (ulong)__src;
LAB_001590ac:
uVar9 = (uint)bVar4;
*(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8) = local_48;
if (*(char *)((long)param_1 + 0x67e) != '\0') {
*(int8 *)((long)puVar7 + -8) = 0x1590db;
_ma_unlock_key_del(param_1);
}
uVar8 = 0;
}
*(int8 *)((long)puVar7 + -8) = 0x159112;
_ma_unpin_all_pages(param_1,uVar8);
*(int8 *)(param_1[1] + 0x90) = 0;
if ((char)local_3c == '\0') {
*(int8 *)((long)puVar7 + -8) = 0x15912f;
my_free(__dest);
}
bVar10 = uVar9 != 0;
LAB_00159139:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return bVar10;
}
/* WARNING: Subroutine does not return */
*(code **)((long)puVar7 + -8) = _ma_ck_real_delete;
__stack_chk_fail();
}
|
|
1,197 | stbi__tga_get_comp | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
{
// only RGB or RGBA (incl. 16bit) or grey allowed
if (is_rgb16) *is_rgb16 = 0;
switch(bits_per_pixel) {
case 8: return STBI_grey;
case 16: if(is_grey) return STBI_grey_alpha;
// fallthrough
case 15: if(is_rgb16) *is_rgb16 = 1;
return STBI_rgb;
case 24: // fallthrough
case 32: return bits_per_pixel/8;
default: return 0;
}
} | O0 | c | stbi__tga_get_comp:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2b79f
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl -0x8(%rbp), %eax
addl $-0x8, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x18, %eax
ja 0x2b808
movq -0x20(%rbp), %rax
leaq 0x1091d(%rip), %rcx # 0x3c0d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x2b80f
cmpl $0x0, -0xc(%rbp)
je 0x2b7dc
movl $0x2, -0x4(%rbp)
jmp 0x2b80f
jmp 0x2b7de
cmpq $0x0, -0x18(%rbp)
je 0x2b7ef
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x2b80f
movl -0x8(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x2b80f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| stbi__tga_get_comp:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0
jz short loc_2B79F
mov rax, [rbp+var_18]
mov dword ptr [rax], 0
loc_2B79F:
mov eax, [rbp+var_8]
add eax, 0FFFFFFF8h; switch 25 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 18h
ja short def_2B7C2; jumptable 000000000002B7C2 default case, cases 9-14,17-23,25-31
mov rax, [rbp+var_20]
lea rcx, jpt_2B7C2
movsxd rax, ds:(jpt_2B7C2 - 3C0D8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2B7C4:
mov [rbp+var_4], 1; jumptable 000000000002B7C2 case 8
jmp short loc_2B80F
loc_2B7CD:
cmp [rbp+var_C], 0; jumptable 000000000002B7C2 case 16
jz short loc_2B7DC
mov [rbp+var_4], 2
jmp short loc_2B80F
loc_2B7DC:
jmp short $+2; jumptable 000000000002B7C2 case 15
loc_2B7DE:
cmp [rbp+var_18], 0; jumptable 000000000002B7C2 case 15
jz short loc_2B7EF
mov rax, [rbp+var_18]
mov dword ptr [rax], 1
loc_2B7EF:
mov [rbp+var_4], 3
jmp short loc_2B80F
loc_2B7F8:
mov eax, [rbp+var_8]; jumptable 000000000002B7C2 cases 24,32
mov ecx, 8
cdq
idiv ecx
mov [rbp+var_4], eax
jmp short loc_2B80F
def_2B7C2:
mov [rbp+var_4], 0; jumptable 000000000002B7C2 default case, cases 9-14,17-23,25-31
loc_2B80F:
mov eax, [rbp+var_4]
pop rbp
retn
| long long stbi__tga_get_comp(int a1, int a2, _DWORD *a3)
{
unsigned int v4; // [rsp+1Ch] [rbp-4h]
if ( a3 )
*a3 = 0;
switch ( a1 )
{
case 8:
v4 = 1;
break;
case 15:
goto LABEL_7;
case 16:
if ( a2 )
{
v4 = 2;
}
else
{
LABEL_7:
if ( a3 )
*a3 = 1;
v4 = 3;
}
break;
case 24:
case 32:
v4 = a1 / 8;
break;
default:
v4 = 0;
break;
}
return v4;
}
| stbi__tga_get_comp:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012b79f
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x0
LAB_0012b79f:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,-0x8
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x18
JA 0x0012b808
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x13c0d8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012b80f
caseD_10:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0012b7dc
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0012b80f
LAB_0012b7dc:
JMP 0x0012b7de
caseD_f:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012b7ef
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
LAB_0012b7ef:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0012b80f
caseD_18:
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,0x8
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012b80f
caseD_9:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012b80f:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int1 [16] stbi__tga_get_comp(int param_1,int param_2,int4 *param_3)
{
int1 auVar1 [16];
uint local_c;
if (param_3 != (int4 *)0x0) {
*param_3 = 0;
}
switch(param_1) {
case 8:
local_c = 1;
break;
default:
local_c = 0;
break;
case 0x10:
if (param_2 != 0) {
local_c = 2;
break;
}
case 0xf:
if (param_3 != (int4 *)0x0) {
*param_3 = 1;
}
local_c = 3;
break;
case 0x18:
case 0x20:
local_c = param_1 / 8;
param_3 = (int4 *)((long)param_1 % 8 & 0xffffffff);
}
auVar1._4_4_ = 0;
auVar1._0_4_ = local_c;
auVar1._8_8_ = param_3;
return auVar1;
}
|
|
1,198 | stbi__tga_get_comp | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
{
// only RGB or RGBA (incl. 16bit) or grey allowed
if (is_rgb16) *is_rgb16 = 0;
switch(bits_per_pixel) {
case 8: return STBI_grey;
case 16: if(is_grey) return STBI_grey_alpha;
// fallthrough
case 15: if(is_rgb16) *is_rgb16 = 1;
return STBI_rgb;
case 24: // fallthrough
case 32: return bits_per_pixel/8;
default: return 0;
}
} | O2 | c | stbi__tga_get_comp:
testq %rdx, %rdx
je 0x156be
andl $0x0, (%rdx)
cmpl $0x8, %edi
je 0x1570c
pushq $0x3
popq %rax
cmpl $0xf, %edi
je 0x156fd
cmpl $0x20, %edi
je 0x156f7
cmpl $0x18, %edi
je 0x156f7
cmpl $0x10, %edi
jne 0x15709
testq %rdx, %rdx
sete %dil
xorl %ecx, %ecx
testl %esi, %esi
setne %sil
orb %sil, %dil
je 0x15702
movb %sil, %cl
xorl $0x3, %ecx
movl %ecx, %eax
retq
shrl $0x3, %edi
movl %edi, %eax
retq
testq %rdx, %rdx
je 0x1570b
movl $0x1, (%rdx)
retq
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq
| stbi__tga_get_comp:
test rdx, rdx
jz short loc_156BE
and dword ptr [rdx], 0
loc_156BE:
cmp edi, 8
jz short loc_1570C
push 3
pop rax
cmp edi, 0Fh
jz short loc_156FD
cmp edi, 20h ; ' '
jz short loc_156F7
cmp edi, 18h
jz short loc_156F7
cmp edi, 10h
jnz short loc_15709
test rdx, rdx
setz dil
xor ecx, ecx
test esi, esi
setnz sil
or dil, sil
jz short loc_15702
mov cl, sil
xor ecx, 3
mov eax, ecx
retn
loc_156F7:
shr edi, 3
mov eax, edi
retn
loc_156FD:
test rdx, rdx
jz short locret_1570B
loc_15702:
mov dword ptr [rdx], 1
retn
loc_15709:
xor eax, eax
locret_1570B:
retn
loc_1570C:
push 1
pop rax
retn
| long long stbi__tga_get_comp(unsigned int a1, int a2, _DWORD *a3)
{
long long result; // rax
int v4; // ecx
bool v5; // si
if ( a3 )
*a3 = 0;
if ( a1 == 8 )
return 1LL;
result = 3LL;
switch ( a1 )
{
case 0xFu:
if ( a3 )
LABEL_12:
*a3 = 1;
break;
case 0x20u:
case 0x18u:
return a1 >> 3;
case 0x10u:
v4 = 0;
v5 = a2 != 0;
if ( v5 || a3 == 0LL )
{
LOBYTE(v4) = v5;
return v4 ^ 3u;
}
goto LABEL_12;
default:
return 0LL;
}
return result;
}
| stbi__tga_get_comp:
TEST RDX,RDX
JZ 0x001156be
AND dword ptr [RDX],0x0
LAB_001156be:
CMP EDI,0x8
JZ 0x0011570c
PUSH 0x3
POP RAX
CMP EDI,0xf
JZ 0x001156fd
CMP EDI,0x20
JZ 0x001156f7
CMP EDI,0x18
JZ 0x001156f7
CMP EDI,0x10
JNZ 0x00115709
TEST RDX,RDX
SETZ DIL
XOR ECX,ECX
TEST ESI,ESI
SETNZ SIL
OR DIL,SIL
JZ 0x00115702
MOV CL,SIL
XOR ECX,0x3
MOV EAX,ECX
RET
LAB_001156f7:
SHR EDI,0x3
MOV EAX,EDI
RET
LAB_001156fd:
TEST RDX,RDX
JZ 0x0011570b
LAB_00115702:
MOV dword ptr [RDX],0x1
RET
LAB_00115709:
XOR EAX,EAX
LAB_0011570b:
RET
LAB_0011570c:
PUSH 0x1
POP RAX
RET
|
uint stbi__tga_get_comp(uint param_1,int param_2,int4 *param_3)
{
if (param_3 != (int4 *)0x0) {
*param_3 = 0;
}
if (param_1 == 8) {
return 1;
}
if (param_1 == 0xf) {
if (param_3 == (int4 *)0x0) {
return 3;
}
}
else {
if ((param_1 == 0x20) || (param_1 == 0x18)) {
return param_1 >> 3;
}
if (param_1 != 0x10) {
return 0;
}
if (param_3 == (int4 *)0x0 || param_2 != 0) {
return param_2 != 0 ^ 3;
}
}
*param_3 = 1;
return 3;
}
|
|
1,199 | R3D_SetSkyboxRotation | r3d/src/r3d_environment.c | void R3D_SetSkyboxRotation(float pitch, float yaw, float roll)
{
R3D.env.quatSky = QuaternionFromEuler(pitch, yaw, roll);
} | O3 | c | R3D_SetSkyboxRotation:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movss %xmm2, -0xc(%rbp)
movss %xmm1, -0x4(%rbp)
mulss 0x23ac0(%rip), %xmm0 # 0xe1004
movss %xmm0, -0x8(%rbp)
callq 0x8270
movaps %xmm0, -0x30(%rbp)
movss -0x8(%rbp), %xmm0
callq 0x82e0
movss %xmm0, -0x8(%rbp)
movss -0x4(%rbp), %xmm0
mulss 0x23a96(%rip), %xmm0 # 0xe1004
movss %xmm0, -0x4(%rbp)
callq 0x8270
movss %xmm0, -0x14(%rbp)
movss -0x4(%rbp), %xmm0
callq 0x82e0
movss %xmm0, -0x10(%rbp)
movss -0xc(%rbp), %xmm0
mulss 0x23a6b(%rip), %xmm0 # 0xe1004
movss %xmm0, -0xc(%rbp)
callq 0x8270
movss %xmm0, -0x4(%rbp)
movss -0xc(%rbp), %xmm0
callq 0x82e0
movss -0x8(%rbp), %xmm7
movaps %xmm7, %xmm2
movss -0x14(%rbp), %xmm4
mulss %xmm4, %xmm2
movaps -0x30(%rbp), %xmm6
movaps %xmm6, %xmm3
movss -0x10(%rbp), %xmm5
mulss %xmm5, %xmm3
movaps %xmm2, %xmm1
mulss %xmm0, %xmm2
mulss %xmm4, %xmm6
mulss %xmm5, %xmm7
movss -0x4(%rbp), %xmm8
movaps %xmm8, %xmm4
mulss %xmm7, %xmm4
movaps %xmm6, %xmm5
mulss %xmm0, %xmm5
mulss %xmm0, %xmm7
mulss %xmm3, %xmm0
mulss %xmm8, %xmm1
subss %xmm0, %xmm1
mulss %xmm8, %xmm3
addss %xmm2, %xmm3
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subss %xmm4, %xmm5
movaps %xmm6, %xmm0
mulss %xmm8, %xmm0
addss %xmm7, %xmm0
unpcklps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1]
movlhps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0]
leaq 0xf297f(%rip), %rax # 0x1affb0
movups %xmm1, 0x148c(%rax)
addq $0x30, %rsp
popq %rbp
retq
| R3D_SetSkyboxRotation:
push rbp
mov rbp, rsp
sub rsp, 30h
movss [rbp+var_C], xmm2
movss [rbp+var_4], xmm1
mulss xmm0, cs:dword_E1004
movss [rbp+var_8], xmm0
call _cosf
movaps [rbp+var_30], xmm0
movss xmm0, [rbp+var_8]
call _sinf
movss [rbp+var_8], xmm0
movss xmm0, [rbp+var_4]
mulss xmm0, cs:dword_E1004
movss [rbp+var_4], xmm0
call _cosf
movss [rbp+var_14], xmm0
movss xmm0, [rbp+var_4]
call _sinf
movss [rbp+var_10], xmm0
movss xmm0, [rbp+var_C]
mulss xmm0, cs:dword_E1004
movss [rbp+var_C], xmm0
call _cosf
movss [rbp+var_4], xmm0
movss xmm0, [rbp+var_C]
call _sinf
movss xmm7, [rbp+var_8]
movaps xmm2, xmm7
movss xmm4, [rbp+var_14]
mulss xmm2, xmm4
movaps xmm6, [rbp+var_30]
movaps xmm3, xmm6
movss xmm5, [rbp+var_10]
mulss xmm3, xmm5
movaps xmm1, xmm2
mulss xmm2, xmm0
mulss xmm6, xmm4
mulss xmm7, xmm5
movss xmm8, [rbp+var_4]
movaps xmm4, xmm8
mulss xmm4, xmm7
movaps xmm5, xmm6
mulss xmm5, xmm0
mulss xmm7, xmm0
mulss xmm0, xmm3
mulss xmm1, xmm8
subss xmm1, xmm0
mulss xmm3, xmm8
addss xmm3, xmm2
unpcklps xmm1, xmm3
subss xmm5, xmm4
movaps xmm0, xmm6
mulss xmm0, xmm8
addss xmm0, xmm7
unpcklps xmm5, xmm0
movlhps xmm1, xmm5
lea rax, R3D
movups xmmword ptr [rax+148Ch], xmm1
add rsp, 30h
pop rbp
retn
| char * R3D_SetSkyboxRotation(__m128 a1, float a2, float a3)
{
float v3; // xmm0_4
__m128 v4; // xmm2
__m128 v5; // xmm6
__m128 v6; // xmm3
__m128 v7; // xmm1
__m128 v8; // xmm5
float v9; // xmm7_4
__m128 v10; // xmm0
char *result; // rax
__m128 v12; // [rsp+0h] [rbp-30h]
float v13; // [rsp+1Ch] [rbp-14h]
float v14; // [rsp+20h] [rbp-10h]
float v15; // [rsp+28h] [rbp-8h]
float v16; // [rsp+28h] [rbp-8h]
float v17; // [rsp+2Ch] [rbp-4h]
v15 = a1.m128_f32[0] * 0.5;
a1.m128_f32[0] = cosf(a1.m128_f32[0] * 0.5);
v12 = a1;
v16 = sinf(v15);
v13 = cosf(a2 * 0.5);
v14 = sinf(a2 * 0.5);
v17 = cosf(a3 * 0.5);
v3 = sinf(a3 * 0.5);
v4 = (__m128)LODWORD(v16);
v4.m128_f32[0] = v16 * v13;
v5 = v12;
v6 = v12;
v7 = v4;
v5.m128_f32[0] = v12.m128_f32[0] * v13;
v8 = v5;
v9 = (float)(v16 * v14) * v3;
v7.m128_f32[0] = (float)((float)(v16 * v13) * v17) - (float)(v3 * (float)(v12.m128_f32[0] * v14));
v6.m128_f32[0] = (float)((float)(v12.m128_f32[0] * v14) * v17) + (float)((float)(v16 * v13) * v3);
v8.m128_f32[0] = (float)((float)(v12.m128_f32[0] * v13) * v3) - (float)(v17 * (float)(v16 * v14));
v10 = v5;
v10.m128_f32[0] = (float)((float)(v12.m128_f32[0] * v13) * v17) + v9;
result = &R3D;
*(__m128 *)(&R3D + 5260) = _mm_movelh_ps(_mm_unpacklo_ps(v7, v6), _mm_unpacklo_ps(v8, v10));
return result;
}
| R3D_SetSkyboxRotation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOVSS dword ptr [RBP + -0xc],XMM2
MOVSS dword ptr [RBP + -0x4],XMM1
MULSS XMM0,dword ptr [0x001e1004]
MOVSS dword ptr [RBP + -0x8],XMM0
CALL 0x00108270
MOVAPS xmmword ptr [RBP + -0x30],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
CALL 0x001082e0
MOVSS dword ptr [RBP + -0x8],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4]
MULSS XMM0,dword ptr [0x001e1004]
MOVSS dword ptr [RBP + -0x4],XMM0
CALL 0x00108270
MOVSS dword ptr [RBP + -0x14],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4]
CALL 0x001082e0
MOVSS dword ptr [RBP + -0x10],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MULSS XMM0,dword ptr [0x001e1004]
MOVSS dword ptr [RBP + -0xc],XMM0
CALL 0x00108270
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
CALL 0x001082e0
MOVSS XMM7,dword ptr [RBP + -0x8]
MOVAPS XMM2,XMM7
MOVSS XMM4,dword ptr [RBP + -0x14]
MULSS XMM2,XMM4
MOVAPS XMM6,xmmword ptr [RBP + -0x30]
MOVAPS XMM3,XMM6
MOVSS XMM5,dword ptr [RBP + -0x10]
MULSS XMM3,XMM5
MOVAPS XMM1,XMM2
MULSS XMM2,XMM0
MULSS XMM6,XMM4
MULSS XMM7,XMM5
MOVSS XMM8,dword ptr [RBP + -0x4]
MOVAPS XMM4,XMM8
MULSS XMM4,XMM7
MOVAPS XMM5,XMM6
MULSS XMM5,XMM0
MULSS XMM7,XMM0
MULSS XMM0,XMM3
MULSS XMM1,XMM8
SUBSS XMM1,XMM0
MULSS XMM3,XMM8
ADDSS XMM3,XMM2
UNPCKLPS XMM1,XMM3
SUBSS XMM5,XMM4
MOVAPS XMM0,XMM6
MULSS XMM0,XMM8
ADDSS XMM0,XMM7
UNPCKLPS XMM5,XMM0
MOVLHPS XMM1,XMM5
LEA RAX,[0x2affb0]
MOVUPS xmmword ptr [RAX + 0x148c],XMM1
ADD RSP,0x30
POP RBP
RET
|
void R3D_SetSkyboxRotation(float param_1,float param_2,float param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
param_1 = param_1 * DAT_001e1004;
fVar1 = cosf(param_1);
fVar2 = sinf(param_1);
param_2 = param_2 * DAT_001e1004;
fVar3 = cosf(param_2);
fVar4 = sinf(param_2);
param_3 = param_3 * DAT_001e1004;
fVar5 = cosf(param_3);
fVar6 = sinf(param_3);
DAT_002b143c._0_4_ = fVar2 * fVar3 * fVar5 - fVar6 * fVar1 * fVar4;
DAT_002b143c._4_4_ = fVar1 * fVar4 * fVar5 + fVar2 * fVar3 * fVar6;
DAT_002b1444._0_4_ = fVar1 * fVar3 * fVar6 - fVar5 * fVar2 * fVar4;
DAT_002b1444._4_4_ = fVar1 * fVar3 * fVar5 + fVar2 * fVar4 * fVar6;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.