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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
12,600
|
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>::set_parents()
|
monkey531[P]llama/common/json.hpp
|
void set_parents()
{
#if JSON_DIAGNOSTICS
switch (m_data.m_type)
{
case value_t::array:
{
for (auto& element : *m_data.m_value.array)
{
element.m_parent = this;
}
break;
}
case value_t::object:
{
for (auto& element : *m_data.m_value.object)
{
element.second.m_parent = this;
}
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
break;
}
#endif
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents():
movq %rdi, -0x8(%rsp)
retq
nopw %cs:(%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv:
mov [rsp+var_8], rdi
retn
|
void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents()
{
;
}
|
set_parents:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::set_parents() */
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>
::set_parents(void)
{
return;
}
|
|
12,601
|
js_regexp_constructor_internal
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_regexp_constructor_internal(JSContext *ctx, JSValue ctor,
JSValue pattern, JSValue bc)
{
JSValue obj;
JSObject *p;
JSRegExp *re;
/* sanity check */
if (JS_VALUE_GET_TAG(bc) != JS_TAG_STRING ||
JS_VALUE_GET_TAG(pattern) != JS_TAG_STRING) {
JS_ThrowTypeError(ctx, "string expected");
fail:
JS_FreeValue(ctx, bc);
JS_FreeValue(ctx, pattern);
return JS_EXCEPTION;
}
obj = js_create_from_ctor(ctx, ctor, JS_CLASS_REGEXP);
if (JS_IsException(obj))
goto fail;
p = JS_VALUE_GET_OBJ(obj);
re = &p->u.regexp;
re->pattern = JS_VALUE_GET_STRING(pattern);
re->bytecode = JS_VALUE_GET_STRING(bc);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_lastIndex, js_int32(0),
JS_PROP_WRITABLE);
return obj;
}
|
O0
|
c
|
js_regexp_constructor_internal:
subq $0xa8, %rsp
leaq 0xb0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movq 0x8(%rax), %rax
cmpl $-0x7, %eax
jne 0x64c0c
movq 0x80(%rsp), %rax
cmpl $-0x7, %eax
je 0x64c72
movq 0x70(%rsp), %rdi
leaq 0xa8142(%rip), %rsi # 0x10cd5a
movb $0x0, %al
callq 0x2c040
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x18(%rsp), %rax
movq 0x70(%rsp), %rdi
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x229d0
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0x64d5d
movq 0x70(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x12, %ecx
callq 0x53b40
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x64cc8
jmp 0x64c29
movq 0x18(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq 0x58(%rsp), %rcx
addq $0x30, %rcx
movq %rcx, 0x50(%rsp)
movq 0x78(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq %rdx, (%rcx)
movq (%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
callq 0x32a00
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movl $0x56, %ecx
movl $0x2, (%rsp)
callq 0x35ef0
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_regexp_constructor_internal:
sub rsp, 0A8h
lea rax, [rsp+0A8h+arg_0]
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_30], rcx
mov [rsp+0A8h+var_28], r8
mov [rsp+0A8h+var_38], rdi
mov rax, [rax+8]
cmp eax, 0FFFFFFF9h
jnz short loc_64C0C
mov rax, [rsp+0A8h+var_28]
cmp eax, 0FFFFFFF9h
jz short loc_64C72
loc_64C0C:
mov rdi, [rsp+0A8h+var_38]
lea rsi, aStringExpected; "string expected"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0A8h+var_68], rax
mov [rsp+0A8h+var_60], rdx
loc_64C29:
mov rax, [rsp+0A8h+var_90]
mov rdi, [rsp+0A8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_38]
mov rsi, [rsp+0A8h+var_30]
mov rdx, [rsp+0A8h+var_28]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_64D5D
loc_64C72:
mov rdi, [rsp+0A8h+var_38]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov ecx, 12h
call js_create_from_ctor
mov [rsp+0A8h+var_78], rax
mov [rsp+0A8h+var_70], rdx
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_48], rax
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_40], rax
mov rdi, [rsp+0A8h+var_48]
mov rsi, [rsp+0A8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_64CC8
jmp loc_64C29
loc_64CC8:
mov rax, [rsp+0A8h+var_90]
mov rcx, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_50], rcx
mov rcx, [rsp+0A8h+var_50]
add rcx, 30h ; '0'
mov [rsp+0A8h+var_58], rcx
mov rdx, [rsp+0A8h+var_30]
mov rcx, [rsp+0A8h+var_58]
mov [rcx], rdx
mov rcx, [rax]
mov rax, [rsp+0A8h+var_58]
mov [rax+8], rcx
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_98], rax
xor edi, edi
call js_int32
mov rdi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_88], rax
mov [rsp+0A8h+var_80], rdx
mov rsi, [rsp+0A8h+var_48]
mov rdx, [rsp+0A8h+var_40]
mov r8, [rsp+0A8h+var_88]
mov r9, [rsp+0A8h+var_80]
mov ecx, 56h ; 'V'
mov [rsp+0A8h+var_A8], 2
call JS_DefinePropertyValue
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_8], rax
loc_64D5D:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long js_regexp_constructor_internal(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long a15,
long long a16)
{
long long v16; // rdx
long long v17; // rdx
__m128 v18; // xmm4
__m128 v19; // xmm5
char v21; // [rsp+0h] [rbp-A8h]
_DWORD *v22; // [rsp+20h] [rbp-88h]
long long v23; // [rsp+30h] [rbp-78h]
long long v24; // [rsp+68h] [rbp-40h]
long long v27; // [rsp+98h] [rbp-10h]
if ( (_DWORD)a16 == -7 && (_DWORD)a5 == -7 )
{
v23 = js_create_from_ctor(a1, a2, a3, 18);
v24 = v16;
if ( !JS_IsException_1(v23, v16) )
{
*(_QWORD *)(v23 + 48) = a4;
*(_QWORD *)(v23 + 56) = a15;
v22 = (_DWORD *)js_int32(0);
JS_DefinePropertyValue(a1, v23, v24, 0x56u, v22, v17, a7, a8, a9, a10, v18, v19, a13, a14, 2);
return v23;
}
}
else
{
JS_ThrowTypeError(a1, (long long)"string expected", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v21);
}
JS_FreeValue(a1, a15, a16);
JS_FreeValue(a1, a4, a5);
LODWORD(v27) = 0;
return v27;
}
|
js_regexp_constructor_internal:
SUB RSP,0xa8
LEA RAX,[RSP + 0xb0]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x80],R8
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,qword ptr [RAX + 0x8]
CMP EAX,-0x7
JNZ 0x00164c0c
MOV RAX,qword ptr [RSP + 0x80]
CMP EAX,-0x7
JZ 0x00164c72
LAB_00164c0c:
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[0x20cd5a]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
LAB_00164c29:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x001229d0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x00164d5d
LAB_00164c72:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x12
CALL 0x00153b40
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00164cc8
JMP 0x00164c29
LAB_00164cc8:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x58],RCX
MOV RCX,qword ptr [RSP + 0x58]
ADD RCX,0x30
MOV qword ptr [RSP + 0x50],RCX
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RCX],RDX
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
XOR EDI,EDI
CALL 0x00132a00
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
MOV ECX,0x56
MOV dword ptr [RSP],0x2
CALL 0x00135ef0
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xa0],RAX
LAB_00164d5d:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
int1 [16]
js_regexp_constructor_internal
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8)
{
int iVar1;
int1 auVar3 [16];
int1 auVar4 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
long lVar2;
if (((int)param_8 == -7) && ((int)param_5 == -7)) {
auVar3 = js_create_from_ctor(param_1,param_2,param_3,0x12);
local_8 = auVar3._8_8_;
lVar2 = auVar3._0_8_;
iVar1 = JS_IsException(lVar2,local_8);
if (iVar1 == 0) {
*(int8 *)(lVar2 + 0x30) = param_4;
*(int8 *)(lVar2 + 0x38) = param_7;
auVar4 = js_int32(0);
JS_DefinePropertyValue(param_1,lVar2,local_8,0x56,auVar4._0_8_,auVar4._8_8_,2);
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_00164d5d;
}
}
else {
JS_ThrowTypeError(param_1,"string expected");
}
JS_FreeValue(param_1,param_7,param_8);
JS_FreeValue(param_1,param_4,param_5);
local_10 = 0;
local_8 = 6;
LAB_00164d5d:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
12,602
|
js_regexp_constructor_internal
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_regexp_constructor_internal(JSContext *ctx, JSValue ctor,
JSValue pattern, JSValue bc)
{
JSValue obj;
JSObject *p;
JSRegExp *re;
/* sanity check */
if (JS_VALUE_GET_TAG(bc) != JS_TAG_STRING ||
JS_VALUE_GET_TAG(pattern) != JS_TAG_STRING) {
JS_ThrowTypeError(ctx, "string expected");
fail:
JS_FreeValue(ctx, bc);
JS_FreeValue(ctx, pattern);
return JS_EXCEPTION;
}
obj = js_create_from_ctor(ctx, ctor, JS_CLASS_REGEXP);
if (JS_IsException(obj))
goto fail;
p = JS_VALUE_GET_OBJ(obj);
re = &p->u.regexp;
re->pattern = JS_VALUE_GET_STRING(pattern);
re->bytecode = JS_VALUE_GET_STRING(bc);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_lastIndex, js_int32(0),
JS_PROP_WRITABLE);
return obj;
}
|
O1
|
c
|
js_regexp_constructor_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x50(%rsp), %rbp
movq %rcx, 0x10(%rsp)
movq 0x8(%rbp), %r12
movl %r12d, %eax
movl $0xfffffff9, %ecx # imm = 0xFFFFFFF9
xorq %rcx, %rax
movl %r14d, %edi
xorq %rcx, %rdi
orq %rax, %rdi
je 0x3eb54
leaq 0x5f216(%rip), %rsi # 0x9dd5e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x3eb6f
movq %rbx, %rdi
movl $0x12, %ecx
callq 0x36142
movq %rdx, %r13
movq %rax, 0x8(%rsp)
cmpl $0x6, %r13d
jne 0x3eb99
movq (%rbp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0x6, %r13d
xorl %r14d, %r14d
jmp 0x3ebd4
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq (%rbp), %rcx
movq %rcx, 0x38(%rax)
movq 0x8(%rsp), %r14
movl $0x2, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x56, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x25ea7
movq %r14, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_regexp_constructor_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r8
mov r15, rcx
mov rbx, rdi
lea rbp, [rsp+48h+arg_0]
mov [rsp+48h+var_38], rcx
mov r12, [rbp+8]
mov eax, r12d
mov ecx, 0FFFFFFF9h
xor rax, rcx
mov edi, r14d
xor rdi, rcx
or rdi, rax
jz short loc_3EB54
lea rsi, aStringExpected; "string expected"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_3EB6F
loc_3EB54:
mov rdi, rbx
mov ecx, 12h
call js_create_from_ctor
mov r13, rdx
mov [rsp+48h+var_40], rax
cmp r13d, 6
jnz short loc_3EB99
loc_3EB6F:
mov rsi, [rbp+0]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r13d, 6
xor r14d, r14d
jmp short loc_3EBD4
loc_3EB99:
mov rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_38]
mov [rax+30h], rcx
mov rcx, [rbp+0]
mov [rax+38h], rcx
mov r14, [rsp+48h+var_40]
mov [rsp+48h+var_48], 2
mov rdi, rbx
mov rsi, r14
mov rdx, r13
mov ecx, 56h ; 'V'
xor r8d, r8d
xor r9d, r9d
call JS_DefinePropertyValue
loc_3EBD4:
mov rax, r14
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_regexp_constructor_internal(
long long a1,
long long a2,
long long a3,
_DWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
_DWORD *a15,
long long a16)
{
unsigned long long v18; // rax
long long v19; // rdx
__m128 v20; // xmm4
__m128 v21; // xmm5
unsigned long long v22; // r14
char v24; // [rsp+0h] [rbp-48h]
if ( (unsigned int)a16 ^ 0xFFFFFFF9LL | (unsigned int)a5 ^ 0xFFFFFFF9LL )
{
JS_ThrowTypeError(
a1,
(long long)"string expected",
a3,
4294967289LL,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v24);
}
else
{
v18 = js_create_from_ctor(a1, a2, a3, 18);
if ( (_DWORD)v19 != 6 )
{
*(_QWORD *)(v18 + 48) = a4;
*(_QWORD *)(v18 + 56) = a15;
v22 = v18;
JS_DefinePropertyValue(a1, v18, v19, 86LL, 0LL, 0LL, *(double *)a7.m128_u64, a8, a9, a10, v20, v21, a13, a14, 2);
return v22;
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a15, a16);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a4, a5);
return 0LL;
}
|
js_regexp_constructor_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R8
MOV R15,RCX
MOV RBX,RDI
LEA RBP,[RSP + 0x50]
MOV qword ptr [RSP + 0x10],RCX
MOV R12,qword ptr [RBP + 0x8]
MOV EAX,R12D
MOV ECX,0xfffffff9
XOR RAX,RCX
MOV EDI,R14D
XOR RDI,RCX
OR RDI,RAX
JZ 0x0013eb54
LEA RSI,[0x19dd5e]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
JMP 0x0013eb6f
LAB_0013eb54:
MOV RDI,RBX
MOV ECX,0x12
CALL 0x00136142
MOV R13,RDX
MOV qword ptr [RSP + 0x8],RAX
CMP R13D,0x6
JNZ 0x0013eb99
LAB_0013eb6f:
MOV RSI,qword ptr [RBP]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
MOV R13D,0x6
XOR R14D,R14D
JMP 0x0013ebd4
LAB_0013eb99:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RBP]
MOV qword ptr [RAX + 0x38],RCX
MOV R14,qword ptr [RSP + 0x8]
MOV dword ptr [RSP],0x2
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x56
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00125ea7
LAB_0013ebd4:
MOV RAX,R14
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_regexp_constructor_internal
(long param_1,int8 param_2,int8 param_3,int8 param_4,ulong param_5,
int8 param_6,int8 param_7,ulong param_8)
{
long lVar1;
int1 auVar2 [16];
if ((param_5 & 0xffffffff) == 0xfffffff9 && (param_8 & 0xffffffff) == 0xfffffff9) {
auVar2 = js_create_from_ctor(param_1,param_2,param_3,0x12);
lVar1 = auVar2._0_8_;
if (auVar2._8_4_ != 6) {
*(int8 *)(lVar1 + 0x30) = param_4;
*(int8 *)(lVar1 + 0x38) = param_7;
JS_DefinePropertyValue(param_1,lVar1,auVar2._8_8_,0x56,0,0,2);
return auVar2;
}
}
else {
JS_ThrowTypeError(param_1,"string expected");
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_7,param_8);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_4,param_5);
return ZEXT816(6) << 0x40;
}
|
|
12,603
|
js_regexp_constructor_internal
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_regexp_constructor_internal(JSContext *ctx, JSValue ctor,
JSValue pattern, JSValue bc)
{
JSValue obj;
JSObject *p;
JSRegExp *re;
/* sanity check */
if (JS_VALUE_GET_TAG(bc) != JS_TAG_STRING ||
JS_VALUE_GET_TAG(pattern) != JS_TAG_STRING) {
JS_ThrowTypeError(ctx, "string expected");
fail:
JS_FreeValue(ctx, bc);
JS_FreeValue(ctx, pattern);
return JS_EXCEPTION;
}
obj = js_create_from_ctor(ctx, ctor, JS_CLASS_REGEXP);
if (JS_IsException(obj))
goto fail;
p = JS_VALUE_GET_OBJ(obj);
re = &p->u.regexp;
re->pattern = JS_VALUE_GET_STRING(pattern);
re->bytecode = JS_VALUE_GET_STRING(bc);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_lastIndex, js_int32(0),
JS_PROP_WRITABLE);
return obj;
}
|
O3
|
c
|
js_regexp_constructor_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdi, %r15
leaq 0x80(%rsp), %rax
movq 0x8(%rax), %r13
movl %r13d, %eax
movl $0xfffffff9, %ecx # imm = 0xFFFFFFF9
xorq %rcx, %rax
movl %r14d, %edi
xorq %rcx, %rdi
orq %rax, %rdi
je 0x4032c
leaq 0x60a0e(%rip), %rsi # 0xa0d2e
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x40342
movq %r15, %rdi
movl $0x12, %ecx
callq 0x373f3
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x40396
movq 0x18(%r15), %rdi
cmpl $-0x9, %r13d
jb 0x4036f
leaq 0x80(%rsp), %rax
movq (%rax), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x4036f
movq %r13, %rdx
callq 0x20d90
movq 0x18(%r15), %rdi
movl $0x6, %r12d
cmpl $-0x9, %r14d
jb 0x40392
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x40392
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20d90
xorl %ebp, %ebp
jmp 0x403f9
movq %rax, %rbp
movq %rbx, 0x30(%rax)
leaq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rbp)
xorl %eax, %eax
movl %eax, 0x38(%rsp)
movl $0x3, %ecx
movq %rcx, 0x40(%rsp)
movl %eax, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2702, 0x20(%rsp) # imm = 0x2702
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x56, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x24e8c
movq %rbp, %rax
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_regexp_constructor_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, r8
mov rbx, rcx
mov r15, rdi
lea rax, [rsp+78h+arg_0]
mov r13, [rax+8]
mov eax, r13d
mov ecx, 0FFFFFFF9h
xor rax, rcx
mov edi, r14d
xor rdi, rcx
or rdi, rax
jz short loc_4032C
lea rsi, aStringExpected; "string expected"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_40342
loc_4032C:
mov rdi, r15
mov ecx, 12h
call js_create_from_ctor
mov r12, rdx
cmp r12d, 6
jnz short loc_40396
loc_40342:
mov rdi, [r15+18h]
cmp r13d, 0FFFFFFF7h
jb short loc_4036F
lea rax, [rsp+78h+arg_0]
mov rsi, [rax]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_4036F
mov rdx, r13
call js_free_value_rt
mov rdi, [r15+18h]
loc_4036F:
mov r12d, 6
cmp r14d, 0FFFFFFF7h
jb short loc_40392
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_40392
mov rsi, rbx
mov rdx, r14
call js_free_value_rt
loc_40392:
xor ebp, ebp
jmp short loc_403F9
loc_40396:
mov rbp, rax
mov [rax+30h], rbx
lea rax, [rsp+78h+arg_0]
mov rax, [rax]
mov [rbp+38h], rax
xor eax, eax
mov dword ptr [rsp+78h+var_40], eax
mov ecx, 3
mov qword ptr [rsp+78h+var_40+8], rcx
mov dword ptr [rsp+78h+var_50], eax
mov qword ptr [rsp+78h+var_50+8], rcx
movups xmm0, [rsp+78h+var_50]
movups [rsp+78h+var_68], xmm0
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_58], 2702h
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov ecx, 56h ; 'V'
xor r8d, r8d
xor r9d, r9d
call JS_DefineProperty
loc_403F9:
mov rax, rbp
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_regexp_constructor_internal(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
_QWORD *a15,
long long a16)
{
long long v19; // r8
long long v20; // r9
unsigned long long v21; // rax
long long v22; // rdx
__m128 v23; // xmm4
__m128 v24; // xmm5
long long v25; // rdi
int v26; // eax
long long v27; // rcx
int v28; // eax
long long v29; // rcx
unsigned long long v30; // rbp
char v32; // [rsp+0h] [rbp-78h]
long long v33; // [rsp+28h] [rbp-50h]
__m128 v34; // [rsp+38h] [rbp-40h]
if ( (unsigned int)a16 ^ 0xFFFFFFF9LL | (unsigned int)a5 ^ 0xFFFFFFF9LL )
{
JS_ThrowTypeError(
a1,
(long long)"string expected",
a3,
4294967289LL,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v32);
}
else
{
v21 = js_create_from_ctor(a1, a2, a3, 18);
if ( (_DWORD)v22 != 6 )
{
v30 = v21;
*(_QWORD *)(v21 + 48) = a4;
*(_QWORD *)(v21 + 56) = a15;
v34.m128_i32[0] = 0;
v34.m128_u64[1] = 3LL;
LODWORD(v33) = 0;
JS_DefineProperty(
a1,
v21,
v22,
86LL,
0LL,
0LL,
v34,
a8,
a9,
a10,
v23,
v24,
a13,
a14,
*(double *)v34.m128_u64,
3LL,
v33,
3LL,
0x2702u);
return v30;
}
}
v25 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)a16 >= 0xFFFFFFF7 )
{
v26 = *(_DWORD *)a15;
v27 = (unsigned int)(*(_DWORD *)a15 - 1);
*(_DWORD *)a15 = v27;
if ( v26 <= 1 )
{
js_free_value_rt(v25, a15, a16, v27, v19, v20);
v25 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
{
v28 = *(_DWORD *)a4;
v29 = (unsigned int)(*(_DWORD *)a4 - 1);
*(_DWORD *)a4 = v29;
if ( v28 <= 1 )
js_free_value_rt(v25, a4, a5, v29, v19, v20);
}
return 0LL;
}
|
js_regexp_constructor_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,R8
MOV RBX,RCX
MOV R15,RDI
LEA RAX,[RSP + 0x80]
MOV R13,qword ptr [RAX + 0x8]
MOV EAX,R13D
MOV ECX,0xfffffff9
XOR RAX,RCX
MOV EDI,R14D
XOR RDI,RCX
OR RDI,RAX
JZ 0x0014032c
LEA RSI,[0x1a0d2e]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00140342
LAB_0014032c:
MOV RDI,R15
MOV ECX,0x12
CALL 0x001373f3
MOV R12,RDX
CMP R12D,0x6
JNZ 0x00140396
LAB_00140342:
MOV RDI,qword ptr [R15 + 0x18]
CMP R13D,-0x9
JC 0x0014036f
LEA RAX,[RSP + 0x80]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0014036f
MOV RDX,R13
CALL 0x00120d90
MOV RDI,qword ptr [R15 + 0x18]
LAB_0014036f:
MOV R12D,0x6
CMP R14D,-0x9
JC 0x00140392
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00140392
MOV RSI,RBX
MOV RDX,R14
CALL 0x00120d90
LAB_00140392:
XOR EBP,EBP
JMP 0x001403f9
LAB_00140396:
MOV RBP,RAX
MOV qword ptr [RAX + 0x30],RBX
LEA RAX,[RSP + 0x80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x38],EAX
MOV ECX,0x3
MOV qword ptr [RSP + 0x40],RCX
MOV dword ptr [RSP + 0x28],EAX
MOV qword ptr [RSP + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],0x2702
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
MOV ECX,0x56
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00124e8c
LAB_001403f9:
MOV RAX,RBP
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_regexp_constructor_internal
(long param_1,int8 param_2,int8 param_3,int *param_4,ulong param_5,
int8 param_6,int *param_7,ulong param_8)
{
int iVar1;
long lVar2;
int8 uVar3;
int1 auVar4 [16];
uint uStack_4c;
if ((param_5 & 0xffffffff) == 0xfffffff9 && (param_8 & 0xffffffff) == 0xfffffff9) {
auVar4 = js_create_from_ctor(param_1,param_2,param_3,0x12);
lVar2 = auVar4._0_8_;
if (auVar4._8_4_ != 6) {
*(int **)(lVar2 + 0x30) = param_4;
*(int **)(lVar2 + 0x38) = param_7;
JS_DefineProperty(param_1,lVar2,auVar4._8_8_,0x56,0,0,0,3,(ulong)uStack_4c << 0x20,3,0x2702);
return auVar4;
}
}
else {
JS_ThrowTypeError(param_1,"string expected");
}
uVar3 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < (uint)param_8) && (iVar1 = *param_7, *param_7 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar3,param_7,param_8);
uVar3 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < (uint)param_5) && (iVar1 = *param_4, *param_4 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar3,param_4,param_5);
}
return ZEXT816(6) << 0x40;
}
|
|
12,604
|
google::protobuf::FieldOptions::Clear()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
void FieldOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
::memset(&_impl_.ctype_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.weak_) -
reinterpret_cast<char*>(&_impl_.ctype_)) + sizeof(_impl_.weak_));
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
|
O0
|
cpp
|
google::protobuf::FieldOptions::Clear():
subq $0x58, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
addq $0x10, %rdi
callq 0x226b10
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0x2dfd30
movq 0x10(%rsp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
je 0x2bc0fe
movq 0x10(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x38, %rdi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x44, %rdx
addq $0x10, %rax
addq $0x38, %rax
subq %rax, %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x8db70
movq 0x10(%rsp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x8db70
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2bc164
movq 0x8(%rsp), %rdi
callq 0x155740
addq $0x58, %rsp
retq
nopl (%rax)
|
_ZN6google8protobuf12FieldOptions5ClearEv:
sub rsp, 58h
mov [rsp+58h+var_38], rdi
mov rdi, [rsp+58h+var_38]
mov [rsp+58h+var_48], rdi
mov [rsp+58h+var_3C], 0
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 20h ; ' '
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void)
mov rax, [rsp+58h+var_48]
add rax, 10h
add rax, 18h
mov [rsp+58h+var_18], rax
mov [rsp+58h+var_1C], 0
mov rax, [rsp+58h+var_18]
movsxd rcx, [rsp+58h+var_1C]
mov eax, [rax+rcx*4]
mov [rsp+58h+var_3C], eax
mov eax, [rsp+58h+var_3C]
and eax, 7Fh
cmp eax, 0
jz short loc_2BC0FE
mov rax, [rsp+58h+var_48]
mov rdi, rax
add rdi, 10h
add rdi, 38h ; '8'
mov rdx, rax
add rdx, 10h
add rdx, 44h ; 'D'
add rax, 10h
add rax, 38h ; '8'
sub rdx, rax
add rdx, 1
xor esi, esi
call _memset
loc_2BC0FE:
mov rax, [rsp+58h+var_48]
add rax, 10h
add rax, 18h
mov [rsp+58h+var_10], rax
mov rdi, [rsp+58h+var_10]
xor esi, esi
mov edx, 4
call _memset
mov rax, [rsp+58h+var_48]
add rax, 8
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_28], rax
mov rax, [rsp+58h+var_28]
mov [rsp+58h+var_8], rax
mov rax, [rsp+58h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_2BC164
mov rdi, [rsp+58h+var_50]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_2BC164:
add rsp, 58h
retn
|
long long google::protobuf::FieldOptions::Clear(google::protobuf::FieldOptions *this)
{
long long result; // rax
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::FieldOptions *)((char *)this + 16));
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 48);
if ( (*((_DWORD *)this + 10) & 0x7F) != 0 )
memset((char *)this + 72, 0LL, 13LL);
memset((char *)this + 40, 0LL, 4LL);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
|
MutableRaw<google::protobuf::Message*>:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x002c2d10
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x002c47e0
ADD RSP,0x28
RET
|
/* google::protobuf::Message**
google::protobuf::Reflection::MutableRaw<google::protobuf::Message*>(google::protobuf::Message*,
google::protobuf::FieldDescriptor const*) const */
Message ** __thiscall
google::protobuf::Reflection::MutableRaw<google::protobuf::Message*>
(Reflection *this,Message *param_1,FieldDescriptor *param_2)
{
uint uVar1;
Message **ppMVar2;
uVar1 = internal::ReflectionSchema::GetFieldOffset((ReflectionSchema *)(this + 8),param_2);
ppMVar2 = internal::GetPointerAtOffset<google::protobuf::Message*>(param_1,uVar1);
return ppMVar2;
}
|
|
12,605
|
mariadb_server_version_id
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static size_t mariadb_server_version_id(MYSQL *mysql)
{
size_t major, minor, patch;
char *p;
if (!(p = mysql->server_version)) {
return 0;
}
major = strtol(p, &p, 10);
p += 1; /* consume the dot */
minor = strtol(p, &p, 10);
p += 1; /* consume the dot */
patch = strtol(p, &p, 10);
return (major * 10000L + (unsigned long)(minor * 100L + patch));
}
|
O0
|
c
|
mariadb_server_version_id:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2d0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x476bb
movq $0x0, -0x8(%rbp)
jmp 0x4772d
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x378e0
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x378e0
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x378e0
movq %rax, -0x28(%rbp)
imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710
imulq $0x64, -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mariadb_server_version_id:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+2D0h]
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_476BB
mov [rbp+var_8], 0
jmp short loc_4772D
loc_476BB:
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_30]
mov edx, 0Ah
call _strtol
mov [rbp+var_28], rax
imul rax, [rbp+var_18], 2710h
imul rcx, [rbp+var_20], 64h ; 'd'
add rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
loc_4772D:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long mariadb_server_version_id(long long a1)
{
long long v2; // [rsp+0h] [rbp-30h] BYREF
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
long long v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v2 = *(_QWORD *)(a1 + 720);
if ( !v2 )
return 0LL;
v5 = strtol(v2, &v2, 10LL);
++v2;
v4 = strtol(v2, &v2, 10LL);
++v2;
v3 = strtol(v2, &v2, 10LL);
return v3 + 100 * v4 + 10000 * v5;
}
|
mariadb_server_version_id:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2d0]
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x001476bb
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014772d
LAB_001476bb:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001378e0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001378e0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x30]
MOV EDX,0xa
CALL 0x001378e0
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x18],0x2710
IMUL RCX,qword ptr [RBP + -0x20],0x64
ADD RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0014772d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long mariadb_server_version_id(long param_1)
{
long lVar1;
char *local_38 [2];
long local_28;
long local_20;
long local_18;
long local_10;
local_38[0] = *(char **)(param_1 + 0x2d0);
if (local_38[0] == (char *)0x0) {
local_10 = 0;
}
else {
local_18 = param_1;
local_20 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
local_28 = strtol(local_38[0],local_38,10);
local_38[0] = local_38[0] + 1;
lVar1 = strtol(local_38[0],local_38,10);
local_10 = local_20 * 10000 + local_28 * 100 + lVar1;
}
return local_10;
}
|
|
12,606
|
cpu_get_num_math()
|
monkey531[P]llama/common/common.cpp
|
int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
}
|
O1
|
cpp
|
cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x18450
movq %rax, %rbx
testl %ebx, %ebx
jle 0x1ec54
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0x1ec54
callq 0x185e0
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x18be0
testl %eax, %eax
je 0x1eb9c
movb $0x1, %al
jmp 0x1ec50
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0x1ebec
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x18ba0
testl %eax, %eax
jne 0x1ec31
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0x1eba4
jmp 0x1ec36
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x18ba0
testl %ebp, %ebp
setle %al
testb %al, %al
je 0x1ec5b
callq 0x1e7b8
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_1EC54
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_1EC54
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jz short loc_1EB9C
mov al, 1
jmp loc_1EC50
loc_1EB9C:
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_1EBA4:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_1EBEC
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_1EBEC:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_1EC31
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_1EBA4
jmp short loc_1EC36
loc_1EC31:
mov ebp, 0FFFFFFFFh
loc_1EC36:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
setle al
loc_1EC50:
test al, al
jz short loc_1EC5B
loc_1EC54:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_1EC5B:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long cpu_get_num_math()
{
int v0; // ebp
long long v1; // rbx
long long v3; // rsi
long long v8; // rbx
long long v9; // rsi
long long v10; // rt0
long long v11; // r14
bool v12; // al
unsigned int v13; // r15d
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v18; // rsi
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v1 = sysconf(84LL);
if ( (int)v1 <= 0 )
return (unsigned int)cpu_get_num_physical_cores();
_RAX = 7LL;
v3 = v1;
__asm { cpuid }
v10 = v3;
v9 = _RBX;
v8 = v10;
if ( (_RDX & 0x8000u) == 0LL )
return (unsigned int)cpu_get_num_physical_cores();
v11 = pthread_self(84LL, v9, _RDX, _RCX);
if ( (unsigned int)pthread_getaffinity_np(v11, 128LL, v32) )
{
v12 = 1;
}
else
{
v13 = 0;
v0 = 0;
while ( 1 )
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v13 <= 0x3FF )
*((_QWORD *)&v24 + (v13 >> 6)) |= 1LL << v13;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v11,
128LL,
&v24) )
break;
_RAX = 26LL;
v18 = v8;
__asm { cpuid }
v8 = v18;
v14 = (_RAX & 0xFF000000) != 0x20000000;
v0 += v14;
v13 += v14 + 1;
if ( (int)v13 >= (int)v18 )
goto LABEL_12;
}
v0 = -1;
LABEL_12:
pthread_setaffinity_np(
v11,
128LL,
v32,
v14,
v15,
v16,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
v12 = v0 <= 0;
}
if ( v12 )
return (unsigned int)cpu_get_num_physical_cores();
return (unsigned int)v0;
}
|
cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x00118450
MOV RBX,RAX
TEST EBX,EBX
JLE 0x0011ec54
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x0011ec54
CALL 0x001185e0
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x00118be0
TEST EAX,EAX
JZ 0x0011eb9c
MOV AL,0x1
JMP 0x0011ec50
LAB_0011eb9c:
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_0011eba4:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x0011ebec
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_0011ebec:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x00118ba0
TEST EAX,EAX
JNZ 0x0011ec31
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x0011eba4
JMP 0x0011ec36
LAB_0011ec31:
MOV EBP,0xffffffff
LAB_0011ec36:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x00118ba0
TEST EBP,EBP
SETLE AL
LAB_0011ec50:
TEST AL,AL
JZ 0x0011ec5b
LAB_0011ec54:
CALL 0x0011e7b8
MOV EBP,EAX
LAB_0011ec5b:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0011ec0a) */
/* WARNING: Removing unreachable block (ram,0x0011eb66) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
int cpu_get_num_math(void)
{
bool bVar1;
long lVar2;
uint *puVar3;
uint uVar4;
int iVar5;
long lVar6;
pthread_t __th;
int unaff_EBP;
uint uVar7;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar6 = sysconf(0x54);
if ((0 < (int)lVar6) &&
(lVar2 = cpuid_Extended_Feature_Enumeration_info(7), (short)*(int4 *)(lVar2 + 8) < 0)) {
__th = pthread_self();
iVar5 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar5 == 0) {
uVar7 = 0;
unaff_EBP = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar7 < 0x400) {
local_128.__bits[uVar7 >> 6] = local_128.__bits[uVar7 >> 6] | 1L << ((byte)uVar7 & 0x3f);
}
iVar5 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar5 != 0) {
unaff_EBP = -1;
break;
}
puVar3 = (uint *)cpuid(0x1a);
uVar4 = (uint)((*puVar3 & 0xff000000) != 0x20000000);
unaff_EBP = unaff_EBP + uVar4;
uVar7 = uVar7 + uVar4 + 1;
} while ((int)uVar7 < (int)lVar6);
pthread_setaffinity_np(__th,0x80,&local_a8);
bVar1 = unaff_EBP < 1;
}
else {
bVar1 = true;
}
if (!bVar1) {
return unaff_EBP;
}
}
iVar5 = cpu_get_num_physical_cores();
return iVar5;
}
|
|
12,607
|
ma_net_real_write
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
int ma_net_real_write(NET *net, const char *packet, size_t len)
{
ssize_t length;
char *pos,*end;
if (net->error == 2)
return(-1); /* socket can't be used */
net->reading_or_writing=2;
#ifdef HAVE_COMPRESS
if (net->compress)
{
size_t complen;
uchar *b;
uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE;
if (!(b=(uchar*) malloc(len + NET_HEADER_SIZE + COMP_HEADER_SIZE + 1)))
{
net->pvio->set_error(net->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
net->error=2;
net->reading_or_writing=0;
return(1);
}
memcpy(b+header_length,packet,len);
if (_mariadb_compress(net, (unsigned char*) b+header_length,&len,&complen))
{
complen=0;
}
int3store(&b[NET_HEADER_SIZE],complen);
int3store(b,len);
b[3]=(uchar) (net->compress_pkt_nr++);
len+= header_length;
packet= (char*) b;
}
#endif /* HAVE_COMPRESS */
pos=(char*) packet; end=pos+len;
while (pos != end)
{
if ((length=ma_pvio_write(net->pvio,(uchar *)pos,(size_t) (end-pos))) <= 0)
{
int save_errno= errno;
char errmsg[100];
net->error=2; /* Close socket */
strerror_r(save_errno, errmsg, 100);
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_WRITE, SQLSTATE_UNKNOWN, 0,
errmsg, save_errno);
net->reading_or_writing=0;
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
return(1);
}
pos+=length;
}
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
net->reading_or_writing=0;
return(((int) (pos != end)));
}
|
O3
|
c
|
ma_net_real_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdx, -0xa8(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x2, 0x94(%rdi)
je 0xa212d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0x2, 0x80(%rdi)
cmpb $0x0, 0x84(%rdi)
je 0xa1ffe
leaq 0x8(%rbx), %rdi
callq 0x39930
testq %rax, %rax
je 0xa2003
movq %rax, %r12
movq %rax, %r13
addq $0x7, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x390a0
leaq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
movq %r14, %rdi
movq %r13, %rsi
callq 0x8ee23
testb %al, %al
jne 0xa2036
movq -0xa0(%rbp), %rax
jmp 0xa2038
movq %r15, %r12
jmp 0xa207e
movq (%r14), %r8
movq 0x40(%r8), %rdi
leaq 0x3015af(%rip), %rax # 0x3a35c0
movq (%rax), %rdx
movl $0x7d8, %esi # imm = 0x7D8
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
movb $0x2, 0x94(%r14)
movb $0x0, 0x80(%r14)
jmp 0xa2128
xorl %eax, %eax
movq %r12, %rdx
movb %al, 0x4(%r12)
movb %ah, 0x5(%rdx)
shrl $0x10, %eax
movb %al, 0x6(%r12)
movq -0xa8(%rbp), %rbx
movb %bl, (%r12)
movb %bh, 0x1(%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x2(%r12)
movl 0x64(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x64(%r14)
movb %al, 0x3(%r12)
addq $0x7, %rbx
movq %rbx, -0xa8(%rbp)
testq %rbx, %rbx
je 0xa20a7
movq %r12, %r15
addq %r12, %rbx
movq (%r14), %rdi
movq %rbx, %rdx
subq %r15, %rdx
movq %r15, %rsi
callq 0x8e20a
testq %rax, %rax
jle 0xa20c5
addq %rax, %r15
cmpq %rbx, %r15
jne 0xa2089
cmpb $0x0, 0x84(%r14)
je 0xa20b9
movq %r12, %rdi
callq 0x39180
movb $0x0, 0x80(%r14)
xorl %eax, %eax
jmp 0xa212d
callq 0x39a20
movl (%rax), %ebx
movb $0x2, 0x94(%r14)
leaq -0xa0(%rbp), %r15
movl $0x64, %edx
movl %ebx, %edi
movq %r15, %rsi
callq 0x39160
movq (%r14), %r10
movq 0x40(%r10), %rdi
leaq 0x3014c8(%rip), %rax # 0x3a35c0
movq (%rax), %rdx
movl $0x1396, %esi # imm = 0x1396
xorl %ecx, %ecx
movq %r15, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq *0x50(%r10)
movb $0x0, 0x80(%r14)
cmpb $0x0, 0x84(%r14)
je 0xa2128
movq %r12, %rdi
callq 0x39180
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0xa214e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x39290
|
ma_net_real_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_A8], rdx
mov eax, 0FFFFFFFFh
cmp byte ptr [rdi+94h], 2
jz loc_A212D
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov byte ptr [rdi+80h], 2
cmp byte ptr [rdi+84h], 0
jz short loc_A1FFE
lea rdi, [rbx+8]
call _malloc
test rax, rax
jz short loc_A2003
mov r12, rax
mov r13, rax
add r13, 7
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memcpy
lea rdx, [rbp+var_A8]
lea rcx, [rbp+var_A0]
mov rdi, r14
mov rsi, r13
call _mariadb_compress
test al, al
jnz short loc_A2036
mov rax, [rbp+var_A0]
jmp short loc_A2038
loc_A1FFE:
mov r12, r15
jmp short loc_A207E
loc_A2003:
mov r8, [r14]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D8h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
mov byte ptr [r14+94h], 2
mov byte ptr [r14+80h], 0
jmp loc_A2128
loc_A2036:
xor eax, eax
loc_A2038:
mov rdx, r12
mov [r12+4], al
mov [rdx+5], ah
shr eax, 10h
mov [r12+6], al
mov rbx, [rbp+var_A8]
mov [r12], bl
mov [rdx+1], bh
mov eax, ebx
shr eax, 10h
mov [r12+2], al
mov eax, [r14+64h]
lea ecx, [rax+1]
mov [r14+64h], ecx
mov [r12+3], al
add rbx, 7
mov [rbp+var_A8], rbx
loc_A207E:
test rbx, rbx
jz short loc_A20A7
mov r15, r12
add rbx, r12
loc_A2089:
mov rdi, [r14]
mov rdx, rbx
sub rdx, r15
mov rsi, r15
call ma_pvio_write
test rax, rax
jle short loc_A20C5
add r15, rax
cmp r15, rbx
jnz short loc_A2089
loc_A20A7:
cmp byte ptr [r14+84h], 0
jz short loc_A20B9
mov rdi, r12
call _free
loc_A20B9:
mov byte ptr [r14+80h], 0
xor eax, eax
jmp short loc_A212D
loc_A20C5:
call ___errno_location
mov ebx, [rax]
mov byte ptr [r14+94h], 2
lea r15, [rbp+var_A0]
mov edx, 64h ; 'd'
mov edi, ebx
mov rsi, r15
call ___xpg_strerror_r
mov r10, [r14]
mov rdi, [r10+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 1396h
xor ecx, ecx
mov r8, r15
mov r9d, ebx
xor eax, eax
call qword ptr [r10+50h]
mov byte ptr [r14+80h], 0
cmp byte ptr [r14+84h], 0
jz short loc_A2128
mov rdi, r12
call _free
loc_A2128:
mov eax, 1
loc_A212D:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_A214E
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A214E:
call ___stack_chk_fail
|
long long ma_net_real_write(_BYTE *a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // r13
int v9; // eax
long long v10; // rbx
int v11; // eax
long long v12; // r15
long long v13; // rbx
long long v14; // rdi
long long v15; // rax
unsigned int v16; // ebx
long long v17; // [rsp+8h] [rbp-A8h] BYREF
_QWORD v18[20]; // [rsp+10h] [rbp-A0h] BYREF
v18[14] = __readfsqword(0x28u);
v17 = a3;
result = 0xFFFFFFFFLL;
if ( a1[148] != 2 )
{
v4 = a3;
a1[128] = 2;
if ( a1[132] )
{
v6 = malloc(a3 + 8);
if ( !v6 )
{
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
2008LL,
SQLSTATE_UNKNOWN,
0LL);
a1[148] = 2;
a1[128] = 0;
return 1LL;
}
v7 = v6;
v8 = v6 + 7;
memcpy(v6 + 7, a2, v4);
if ( mariadb_compress((long long)a1, v8, &v17, v18) )
v9 = 0;
else
v9 = v18[0];
*(_WORD *)(v7 + 4) = v9;
*(_BYTE *)(v7 + 6) = BYTE2(v9);
v10 = v17;
*(_WORD *)v7 = v17;
*(_BYTE *)(v7 + 2) = BYTE2(v10);
v11 = *((_DWORD *)a1 + 25);
*((_DWORD *)a1 + 25) = v11 + 1;
*(_BYTE *)(v7 + 3) = v11;
v4 = v10 + 7;
v17 = v4;
}
else
{
v7 = a2;
}
if ( v4 )
{
v12 = v7;
v13 = v7 + v4;
while ( 1 )
{
v14 = *(_QWORD *)a1;
v15 = ma_pvio_write(*(_QWORD *)a1, v12, v13 - v12);
if ( v15 <= 0 )
break;
v12 += v15;
if ( v12 == v13 )
goto LABEL_14;
}
v16 = *(_DWORD *)__errno_location(v14);
a1[148] = 2;
__xpg_strerror_r(v16, v18, 100LL);
(*(void ( **)(_QWORD, long long, char *, _QWORD, _QWORD *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
5014LL,
SQLSTATE_UNKNOWN,
0LL,
v18,
v16);
a1[128] = 0;
if ( a1[132] )
free(v7);
return 1LL;
}
LABEL_14:
if ( a1[132] )
free(v7);
a1[128] = 0;
return 0LL;
}
return result;
}
|
ma_net_real_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xa8],RDX
MOV EAX,0xffffffff
CMP byte ptr [RDI + 0x94],0x2
JZ 0x001a212d
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV byte ptr [RDI + 0x80],0x2
CMP byte ptr [RDI + 0x84],0x0
JZ 0x001a1ffe
LEA RDI,[RBX + 0x8]
CALL 0x00139930
TEST RAX,RAX
JZ 0x001a2003
MOV R12,RAX
MOV R13,RAX
ADD R13,0x7
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x001390a0
LEA RDX,[RBP + -0xa8]
LEA RCX,[RBP + -0xa0]
MOV RDI,R14
MOV RSI,R13
CALL 0x0018ee23
TEST AL,AL
JNZ 0x001a2036
MOV RAX,qword ptr [RBP + -0xa0]
JMP 0x001a2038
LAB_001a1ffe:
MOV R12,R15
JMP 0x001a207e
LAB_001a2003:
MOV R8,qword ptr [R14]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x4a35c0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d8
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
MOV byte ptr [R14 + 0x94],0x2
MOV byte ptr [R14 + 0x80],0x0
JMP 0x001a2128
LAB_001a2036:
XOR EAX,EAX
LAB_001a2038:
MOV RDX,R12
MOV byte ptr [R12 + 0x4],AL
MOV byte ptr [RDX + 0x5],AH
SHR EAX,0x10
MOV byte ptr [R12 + 0x6],AL
MOV RBX,qword ptr [RBP + -0xa8]
MOV byte ptr [R12],BL
MOV byte ptr [RDX + 0x1],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [R12 + 0x2],AL
MOV EAX,dword ptr [R14 + 0x64]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R14 + 0x64],ECX
MOV byte ptr [R12 + 0x3],AL
ADD RBX,0x7
MOV qword ptr [RBP + -0xa8],RBX
LAB_001a207e:
TEST RBX,RBX
JZ 0x001a20a7
MOV R15,R12
ADD RBX,R12
LAB_001a2089:
MOV RDI,qword ptr [R14]
MOV RDX,RBX
SUB RDX,R15
MOV RSI,R15
CALL 0x0018e20a
TEST RAX,RAX
JLE 0x001a20c5
ADD R15,RAX
CMP R15,RBX
JNZ 0x001a2089
LAB_001a20a7:
CMP byte ptr [R14 + 0x84],0x0
JZ 0x001a20b9
MOV RDI,R12
CALL 0x00139180
LAB_001a20b9:
MOV byte ptr [R14 + 0x80],0x0
XOR EAX,EAX
JMP 0x001a212d
LAB_001a20c5:
CALL 0x00139a20
MOV EBX,dword ptr [RAX]
MOV byte ptr [R14 + 0x94],0x2
LEA R15,[RBP + -0xa0]
MOV EDX,0x64
MOV EDI,EBX
MOV RSI,R15
CALL 0x00139160
MOV R10,qword ptr [R14]
MOV RDI,qword ptr [R10 + 0x40]
LEA RAX,[0x4a35c0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x1396
XOR ECX,ECX
MOV R8,R15
MOV R9D,EBX
XOR EAX,EAX
CALL qword ptr [R10 + 0x50]
MOV byte ptr [R14 + 0x80],0x0
CMP byte ptr [R14 + 0x84],0x0
JZ 0x001a2128
MOV RDI,R12
CALL 0x00139180
LAB_001a2128:
MOV EAX,0x1
LAB_001a212d:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001a214e
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a214e:
CALL 0x00139290
|
int8 ma_net_real_write(long *param_1,int1 *param_2,size_t param_3)
{
int iVar1;
char cVar2;
int8 uVar3;
int1 *puVar4;
long lVar5;
int *piVar6;
int1 *puVar7;
long in_FS_OFFSET;
size_t local_b0;
int4 local_a8 [28];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = 0xffffffff;
local_b0 = param_3;
if (*(char *)((long)param_1 + 0x94) != '\x02') {
*(int1 *)(param_1 + 0x10) = 2;
if (*(char *)((long)param_1 + 0x84) != '\0') {
puVar4 = (int1 *)malloc(param_3 + 8);
if (puVar4 == (int1 *)0x0) {
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7d8,SQLSTATE_UNKNOWN,0);
*(int1 *)((long)param_1 + 0x94) = 2;
*(int1 *)(param_1 + 0x10) = 0;
LAB_001a2128:
uVar3 = 1;
goto LAB_001a212d;
}
memcpy(puVar4 + 7,param_2,param_3);
cVar2 = _mariadb_compress(param_1,puVar4 + 7,&local_b0,local_a8);
if (cVar2 != '\0') {
local_a8[0] = 0;
}
puVar4[4] = (char)local_a8[0];
puVar4[5] = (char)((uint)local_a8[0] >> 8);
puVar4[6] = (char)((uint)local_a8[0] >> 0x10);
*puVar4 = (char)local_b0;
puVar4[1] = (char)(local_b0 >> 8);
puVar4[2] = (char)(local_b0 >> 0x10);
iVar1 = *(int *)((long)param_1 + 100);
*(int *)((long)param_1 + 100) = iVar1 + 1;
puVar4[3] = (char)iVar1;
local_b0 = local_b0 + 7;
param_2 = puVar4;
}
if (local_b0 != 0) {
puVar7 = param_2 + local_b0;
puVar4 = param_2;
do {
lVar5 = ma_pvio_write(*param_1,puVar4,(long)puVar7 - (long)puVar4);
if (lVar5 < 1) {
piVar6 = __errno_location();
iVar1 = *piVar6;
*(int1 *)((long)param_1 + 0x94) = 2;
__xpg_strerror_r(iVar1,local_a8,100);
(**(code **)(*param_1 + 0x50))
(*(int8 *)(*param_1 + 0x40),0x1396,SQLSTATE_UNKNOWN,0,local_a8,iVar1);
*(int1 *)(param_1 + 0x10) = 0;
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
goto LAB_001a2128;
}
puVar4 = puVar4 + lVar5;
} while (puVar4 != puVar7);
}
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
*(int1 *)(param_1 + 0x10) = 0;
uVar3 = 0;
}
LAB_001a212d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
|
|
12,608
|
js_object_preventExtensions
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_object_preventExtensions(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int reflect)
{
JSValue obj;
int ret;
obj = argv[0];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) {
if (reflect)
return JS_ThrowTypeErrorNotAnObject(ctx);
else
return js_dup(obj);
}
ret = JS_PreventExtensions(ctx, obj);
if (ret < 0)
return JS_EXCEPTION;
if (reflect) {
return js_bool(ret);
} else {
if (!ret)
return JS_ThrowTypeError(ctx, "proxy preventExtensions handler returned false");
return js_dup(obj);
}
}
|
O2
|
c
|
js_object_preventExtensions:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebp
movq %rdi, %r15
movq (%r8), %rbx
movq 0x8(%r8), %r14
cmpl $-0x1, %r14d
jne 0x5dc64
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1d35f
pushq $0x6
popq %r12
testl %eax, %eax
js 0x5dc7a
testl %ebp, %ebp
je 0x5dc8b
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
pushq $0x1
popq %r14
jmp 0x5dc76
testl %ebp, %ebp
je 0x5dc83
movq %r15, %rdi
callq 0x1ca65
pushq $0x6
popq %r14
xorl %ebx, %ebx
xorl %ecx, %ecx
jmp 0x5dc9e
xorl %ebx, %ebx
xorl %ecx, %ecx
movq %r12, %r14
jmp 0x5dc9e
cmpl $-0x9, %r14d
jae 0x5dc8f
jmp 0x5dc91
testl %eax, %eax
je 0x5dcaf
incl (%rbx)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29474(%rip), %rsi # 0x8712a
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1bad1
jmp 0x5dc7c
|
js_object_preventExtensions:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, r9d
mov r15, rdi
mov rbx, [r8]
mov r14, [r8+8]
cmp r14d, 0FFFFFFFFh
jnz short loc_5DC64
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_PreventExtensions
push 6
pop r12
test eax, eax
js short loc_5DC7A
test ebp, ebp
jz short loc_5DC8B
xor ebx, ebx
test eax, eax
setnz bl
push 1
pop r14
jmp short loc_5DC76
loc_5DC64:
test ebp, ebp
jz short loc_5DC83
mov rdi, r15
call JS_ThrowTypeErrorNotAnObject
push 6
pop r14
xor ebx, ebx
loc_5DC76:
xor ecx, ecx
jmp short loc_5DC9E
loc_5DC7A:
xor ebx, ebx
loc_5DC7C:
xor ecx, ecx
mov r14, r12
jmp short loc_5DC9E
loc_5DC83:
cmp r14d, 0FFFFFFF7h
jnb short loc_5DC8F
jmp short loc_5DC91
loc_5DC8B:
test eax, eax
jz short loc_5DCAF
loc_5DC8F:
inc dword ptr [rbx]
loc_5DC91:
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
loc_5DC9E:
mov eax, ebx
or rax, rcx
mov rdx, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5DCAF:
lea rsi, aProxyPreventex; "proxy preventExtensions handler returne"...
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_5DC7C
|
unsigned long long js_object_preventExtensions(
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)
{
int v14; // ebp
long long v15; // rbx
long long v16; // r14
int v17; // eax
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
unsigned long long v24; // rcx
char v26; // [rsp+0h] [rbp-28h]
v14 = a6;
v15 = *a5;
v16 = a5[1];
if ( (_DWORD)v16 != -1 )
{
if ( (_DWORD)a6 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v26);
LODWORD(v15) = 0;
goto LABEL_7;
}
if ( (unsigned int)v16 < 0xFFFFFFF7 )
{
LABEL_14:
v24 = v15 & 0xFFFFFFFF00000000LL;
return v24 | (unsigned int)v15;
}
LABEL_13:
++*(_DWORD *)v15;
goto LABEL_14;
}
v17 = JS_PreventExtensions(a1, *a5, v16, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14);
if ( v17 < 0 )
{
LODWORD(v15) = 0;
goto LABEL_9;
}
if ( !v14 )
{
if ( v17 )
goto LABEL_13;
LODWORD(v15) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy preventExtensions handler returned false",
v18,
v19,
v20,
v21,
a7,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
v26);
LABEL_9:
v24 = 0LL;
return v24 | (unsigned int)v15;
}
LODWORD(v15) = v17 != 0;
LABEL_7:
v24 = 0LL;
return v24 | (unsigned int)v15;
}
|
js_object_preventExtensions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,R9D
MOV R15,RDI
MOV RBX,qword ptr [R8]
MOV R14,qword ptr [R8 + 0x8]
CMP R14D,-0x1
JNZ 0x0015dc64
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011d35f
PUSH 0x6
POP R12
TEST EAX,EAX
JS 0x0015dc7a
TEST EBP,EBP
JZ 0x0015dc8b
XOR EBX,EBX
TEST EAX,EAX
SETNZ BL
PUSH 0x1
POP R14
JMP 0x0015dc76
LAB_0015dc64:
TEST EBP,EBP
JZ 0x0015dc83
MOV RDI,R15
CALL 0x0011ca65
PUSH 0x6
POP R14
XOR EBX,EBX
LAB_0015dc76:
XOR ECX,ECX
JMP 0x0015dc9e
LAB_0015dc7a:
XOR EBX,EBX
LAB_0015dc7c:
XOR ECX,ECX
MOV R14,R12
JMP 0x0015dc9e
LAB_0015dc83:
CMP R14D,-0x9
JNC 0x0015dc8f
JMP 0x0015dc91
LAB_0015dc8b:
TEST EAX,EAX
JZ 0x0015dcaf
LAB_0015dc8f:
INC dword ptr [RBX]
LAB_0015dc91:
MOV RCX,-0x100000000
AND RCX,RBX
LAB_0015dc9e:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015dcaf:
LEA RSI,[0x18712a]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011bad1
JMP 0x0015dc7c
|
int1 [16] js_object_preventExtensions(int8 param_1)
{
int8 uVar1;
int iVar2;
ulong uVar3;
int *piVar4;
int8 *in_R8;
int in_R9D;
int8 uVar5;
int1 auVar6 [16];
piVar4 = (int *)*in_R8;
uVar1 = in_R8[1];
if ((uint)uVar1 == 0xffffffff) {
iVar2 = JS_PreventExtensions(param_1,piVar4,uVar1);
uVar5 = 6;
if (-1 < iVar2) {
if (in_R9D != 0) {
piVar4 = (int *)(ulong)(iVar2 != 0);
uVar5 = 1;
goto LAB_0015dc76;
}
if (iVar2 != 0) goto LAB_0015dc8f;
JS_ThrowTypeError(param_1,"proxy preventExtensions handler returned false");
}
piVar4 = (int *)0x0;
uVar3 = 0;
}
else {
if (in_R9D == 0) {
if (0xfffffff6 < (uint)uVar1) {
LAB_0015dc8f:
*piVar4 = *piVar4 + 1;
}
uVar3 = (ulong)piVar4 & 0xffffffff00000000;
uVar5 = uVar1;
goto LAB_0015dc9e;
}
JS_ThrowTypeErrorNotAnObject(param_1);
uVar5 = 6;
piVar4 = (int *)0x0;
LAB_0015dc76:
uVar3 = 0;
}
LAB_0015dc9e:
auVar6._0_8_ = (ulong)piVar4 & 0xffffffff | uVar3;
auVar6._8_8_ = uVar5;
return auVar6;
}
|
|
12,609
|
js_object_preventExtensions
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_object_preventExtensions(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int reflect)
{
JSValue obj;
int ret;
obj = argv[0];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) {
if (reflect)
return JS_ThrowTypeErrorNotAnObject(ctx);
else
return js_dup(obj);
}
ret = JS_PreventExtensions(ctx, obj);
if (ret < 0)
return JS_EXCEPTION;
if (reflect) {
return js_bool(ret);
} else {
if (!ret)
return JS_ThrowTypeError(ctx, "proxy preventExtensions handler returned false");
return js_dup(obj);
}
}
|
O3
|
c
|
js_object_preventExtensions:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rdi, %r15
movq (%r8), %rbx
movq 0x8(%r8), %r14
cmpl $-0x1, %r14d
jne 0x71cf0
cmpw $0x30, 0x6(%rbx)
je 0x71d39
andb $-0x2, 0x5(%rbx)
movl $0x1, %eax
testl %ebp, %ebp
je 0x71d17
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl $0x1, %r14d
jmp 0x71d0d
testl %ebp, %ebp
je 0x71d11
leaq 0x2ebf2(%rip), %rsi # 0xa08ed
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r14d
xorl %ecx, %ecx
jmp 0x71d26
cmpl $-0x9, %r14d
jb 0x71d19
incl (%rbx)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xf7c9
testl %eax, %eax
js 0x71d68
testl %ebp, %ebp
jne 0x71ce1
testl %eax, %eax
jne 0x71d17
leaq 0x31440(%rip), %rsi # 0xa319a
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x71d6a
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x6, %r14d
jmp 0x71d26
|
js_object_preventExtensions:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, r9d
mov r15, rdi
mov rbx, [r8]
mov r14, [r8+8]
cmp r14d, 0FFFFFFFFh
jnz short loc_71CF0
cmp word ptr [rbx+6], 30h ; '0'
jz short loc_71D39
and byte ptr [rbx+5], 0FEh
mov eax, 1
test ebp, ebp
jz short loc_71D17
loc_71CE1:
xor ebx, ebx
test eax, eax
setnz bl
mov r14d, 1
jmp short loc_71D0D
loc_71CF0:
test ebp, ebp
jz short loc_71D11
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
loc_71D0D:
xor ecx, ecx
jmp short loc_71D26
loc_71D11:
cmp r14d, 0FFFFFFF7h
jb short loc_71D19
loc_71D17:
inc dword ptr [rbx]
loc_71D19:
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
loc_71D26:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_71D39:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call js_proxy_preventExtensions
test eax, eax
js short loc_71D68
test ebp, ebp
jnz short loc_71CE1
test eax, eax
jnz short loc_71D17
lea rsi, aProxyPreventex; "proxy preventExtensions handler returne"...
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_71D6A
loc_71D68:
xor ebx, ebx
loc_71D6A:
xor ecx, ecx
mov r14d, 6
jmp short loc_71D26
|
unsigned long long js_object_preventExtensions(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
int v15; // ebp
long long v16; // rbx
long long v17; // r14
int v18; // eax
unsigned long long v19; // rcx
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
char v27; // [rsp-8h] [rbp-28h]
v27 = v14;
v15 = a14;
v16 = *a13;
v17 = a13[1];
if ( (_DWORD)v17 != -1 )
{
if ( (_DWORD)a14 )
{
LODWORD(v16) = 0;
JS_ThrowTypeError(a1, (long long)"not an object", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v14);
goto LABEL_7;
}
if ( (unsigned int)v17 < 0xFFFFFFF7 )
{
LABEL_10:
v19 = v16 & 0xFFFFFFFF00000000LL;
return v19 | (unsigned int)v16;
}
goto LABEL_9;
}
if ( *(_WORD *)(v16 + 6) == 48 )
{
v18 = js_proxy_preventExtensions(a1, *a13, a13[1]);
if ( v18 < 0 )
{
LODWORD(v16) = 0;
}
else
{
if ( v15 )
goto LABEL_4;
if ( v18 )
goto LABEL_9;
LODWORD(v16) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy preventExtensions handler returned false",
v21,
v22,
v23,
v24,
a2,
a3,
a4,
a5,
v25,
v26,
a8,
a9,
v27);
}
v19 = 0LL;
return v19 | (unsigned int)v16;
}
*(_BYTE *)(v16 + 5) &= ~1u;
v18 = 1;
if ( !(_DWORD)a14 )
{
LABEL_9:
++*(_DWORD *)v16;
goto LABEL_10;
}
LABEL_4:
LODWORD(v16) = v18 != 0;
LABEL_7:
v19 = 0LL;
return v19 | (unsigned int)v16;
}
|
js_object_preventExtensions:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,R9D
MOV R15,RDI
MOV RBX,qword ptr [R8]
MOV R14,qword ptr [R8 + 0x8]
CMP R14D,-0x1
JNZ 0x00171cf0
CMP word ptr [RBX + 0x6],0x30
JZ 0x00171d39
AND byte ptr [RBX + 0x5],0xfe
MOV EAX,0x1
TEST EBP,EBP
JZ 0x00171d17
LAB_00171ce1:
XOR EBX,EBX
TEST EAX,EAX
SETNZ BL
MOV R14D,0x1
JMP 0x00171d0d
LAB_00171cf0:
TEST EBP,EBP
JZ 0x00171d11
LEA RSI,[0x1a08ed]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV R14D,0x6
LAB_00171d0d:
XOR ECX,ECX
JMP 0x00171d26
LAB_00171d11:
CMP R14D,-0x9
JC 0x00171d19
LAB_00171d17:
INC dword ptr [RBX]
LAB_00171d19:
MOV RCX,-0x100000000
AND RCX,RBX
LAB_00171d26:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00171d39:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0010f7c9
TEST EAX,EAX
JS 0x00171d68
TEST EBP,EBP
JNZ 0x00171ce1
TEST EAX,EAX
JNZ 0x00171d17
LEA RSI,[0x1a319a]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00171d6a
LAB_00171d68:
XOR EBX,EBX
LAB_00171d6a:
XOR ECX,ECX
MOV R14D,0x6
JMP 0x00171d26
|
int1 [16] js_object_preventExtensions(int8 param_1)
{
int iVar1;
ulong uVar2;
int *piVar3;
int8 *in_R8;
int in_R9D;
int8 uVar4;
int1 auVar5 [16];
piVar3 = (int *)*in_R8;
uVar4 = in_R8[1];
if ((uint)uVar4 == 0xffffffff) {
if (*(short *)((long)piVar3 + 6) == 0x30) {
iVar1 = js_proxy_preventExtensions(param_1,piVar3,uVar4);
if (-1 < iVar1) {
if (in_R9D != 0) goto LAB_00171ce1;
if (iVar1 != 0) goto LAB_00171d17;
JS_ThrowTypeError(param_1,"proxy preventExtensions handler returned false");
}
piVar3 = (int *)0x0;
uVar2 = 0;
uVar4 = 6;
goto LAB_00171d26;
}
*(byte *)((long)piVar3 + 5) = *(byte *)((long)piVar3 + 5) & 0xfe;
iVar1 = 1;
if (in_R9D == 0) {
LAB_00171d17:
*piVar3 = *piVar3 + 1;
goto LAB_00171d19;
}
LAB_00171ce1:
piVar3 = (int *)(ulong)(iVar1 != 0);
uVar4 = 1;
}
else {
if (in_R9D == 0) {
if (0xfffffff6 < (uint)uVar4) goto LAB_00171d17;
LAB_00171d19:
uVar2 = (ulong)piVar3 & 0xffffffff00000000;
goto LAB_00171d26;
}
piVar3 = (int *)0x0;
JS_ThrowTypeError(param_1,"not an object");
uVar4 = 6;
}
uVar2 = 0;
LAB_00171d26:
auVar5._0_8_ = (ulong)piVar3 & 0xffffffff | uVar2;
auVar5._8_8_ = uVar4;
return auVar5;
}
|
|
12,610
|
Catch::operator<<(std::ostream&, Catch::LazyExpression const&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
auto operator << (std::ostream& os, LazyExpression const& lazyExpr) -> std::ostream& {
if (lazyExpr.m_isNegated)
os << '!';
if (lazyExpr) {
if (lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression())
os << '(' << *lazyExpr.m_transientExpression << ')';
else
os << *lazyExpr.m_transientExpression;
} else {
os << "{** error - unchecked empty expression requested **}";
}
return os;
}
|
O3
|
cpp
|
Catch::operator<<(std::ostream&, Catch::LazyExpression const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x8(%rsi)
jne 0x5ca78
leaq 0xd(%rsp), %rsi
movb $0x21, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x17be0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5cacc
cmpb $0x1, 0x8(%r14)
jne 0x5cac2
cmpb $0x1, 0x8(%rdi)
jne 0x5cac2
leaq 0xe(%rsp), %rsi
movb $0x28, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x17be0
movq %rax, %r15
movq (%r14), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *(%rax)
leaq 0xf(%rsp), %rsi
movb $0x29, (%rsi)
movl $0x1, %edx
movq %r15, %rdi
jmp 0x5cadb
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
jmp 0x5cae0
leaq 0x81156(%rip), %rsi # 0xddc29
movl $0x34, %edx
movq %rbx, %rdi
callq 0x17be0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN5CatchlsERSoRKNS_14LazyExpressionE:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
cmp byte ptr [rsi+8], 1
jnz short loc_5CA78
lea rsi, [rsp+28h+var_1B]
mov byte ptr [rsi], 21h ; '!'
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_5CA78:
mov rdi, [r14]
test rdi, rdi
jz short loc_5CACC
cmp byte ptr [r14+8], 1
jnz short loc_5CAC2
cmp byte ptr [rdi+8], 1
jnz short loc_5CAC2
lea rsi, [rsp+28h+var_1A]
mov byte ptr [rsi], 28h ; '('
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
mov rdi, [r14]
mov rax, [rdi]
mov rsi, r15
call qword ptr [rax]
lea rsi, [rsp+28h+var_19]
mov byte ptr [rsi], 29h ; ')'
mov edx, 1
mov rdi, r15
jmp short loc_5CADB
loc_5CAC2:
mov rax, [rdi]
mov rsi, rbx
call qword ptr [rax]
jmp short loc_5CAE0
loc_5CACC:
lea rsi, aErrorUnchecked; "{** error - unchecked empty expression "...
mov edx, 34h ; '4'
mov rdi, rbx
loc_5CADB:
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_5CAE0:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long Catch::operator<<(long long a1, long long a2)
{
_BYTE *v3; // rdi
long long v4; // r15
char *v5; // rsi
long long v6; // rdx
long long v7; // rdi
char v9; // [rsp+Dh] [rbp-1Bh] BYREF
char v10; // [rsp+Eh] [rbp-1Ah] BYREF
char v11; // [rsp+Fh] [rbp-19h] BYREF
if ( *(_BYTE *)(a2 + 8) == 1 )
{
v9 = 33;
std::__ostream_insert<char,std::char_traits<char>>(a1, &v9, 1LL);
}
v3 = *(_BYTE **)a2;
if ( !*(_QWORD *)a2 )
{
v5 = "{** error - unchecked empty expression requested **}";
v6 = 52LL;
v7 = a1;
goto LABEL_9;
}
if ( *(_BYTE *)(a2 + 8) == 1 && v3[8] == 1 )
{
v10 = 40;
v4 = std::__ostream_insert<char,std::char_traits<char>>(a1, &v10, 1LL);
(***(void ( ****)(_QWORD, long long))a2)(*(_QWORD *)a2, v4);
v5 = &v11;
v11 = 41;
v6 = 1LL;
v7 = v4;
LABEL_9:
std::__ostream_insert<char,std::char_traits<char>>(v7, v5, v6);
return a1;
}
(**(void ( ***)(_BYTE *, long long))v3)(v3, a1);
return a1;
}
|
operator<<:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
CMP byte ptr [RSI + 0x8],0x1
JNZ 0x0015ca78
LEA RSI,[RSP + 0xd]
MOV byte ptr [RSI],0x21
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00117be0
LAB_0015ca78:
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x0015cacc
CMP byte ptr [R14 + 0x8],0x1
JNZ 0x0015cac2
CMP byte ptr [RDI + 0x8],0x1
JNZ 0x0015cac2
LEA RSI,[RSP + 0xe]
MOV byte ptr [RSI],0x28
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00117be0
MOV R15,RAX
MOV RDI,qword ptr [R14]
MOV RAX,qword ptr [RDI]
MOV RSI,R15
CALL qword ptr [RAX]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],0x29
MOV EDX,0x1
MOV RDI,R15
JMP 0x0015cadb
LAB_0015cac2:
MOV RAX,qword ptr [RDI]
MOV RSI,RBX
CALL qword ptr [RAX]
JMP 0x0015cae0
LAB_0015cacc:
LEA RSI,[0x1ddc29]
MOV EDX,0x34
MOV RDI,RBX
LAB_0015cadb:
CALL 0x00117be0
LAB_0015cae0:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* Catch::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, Catch::LazyExpression const&) */
ostream * Catch::operator<<(ostream *param_1,LazyExpression *param_2)
{
int8 *puVar1;
ostream *poVar2;
long lVar3;
char *pcVar4;
char local_1b [3];
if (param_2[8] == (LazyExpression)0x1) {
local_1b[0] = '!';
std::__ostream_insert<char,std::char_traits<char>>(param_1,local_1b,1);
}
puVar1 = *(int8 **)param_2;
if (puVar1 == (int8 *)0x0) {
pcVar4 = "{** error - unchecked empty expression requested **}";
lVar3 = 0x34;
poVar2 = param_1;
}
else {
if ((param_2[8] != (LazyExpression)0x1) || (*(char *)(puVar1 + 1) != '\x01')) {
(**(code **)*puVar1)(puVar1,param_1);
return param_1;
}
local_1b[1] = 0x28;
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(param_1,local_1b + 1,1);
(**(code **)**(int8 **)param_2)(*(int8 **)param_2,poVar2);
pcVar4 = local_1b + 2;
local_1b[2] = 0x29;
lVar3 = 1;
}
std::__ostream_insert<char,std::char_traits<char>>(poVar2,pcVar4,lVar3);
return param_1;
}
|
|
12,611
|
ma_tls_init
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
void *ma_tls_init(MYSQL *mysql)
{
SSL *ssl= NULL;
SSL_CTX *ctx= NULL;
long default_options= SSL_OP_ALL |
SSL_OP_NO_SSLv2 |
SSL_OP_NO_SSLv3;
long options= 0;
pthread_mutex_lock(&LOCK_openssl_config);
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
if (!(ctx= SSL_CTX_new(TLS_client_method())))
#else
if (!(ctx= SSL_CTX_new(SSLv23_client_method())))
#endif
goto error;
if (mysql->options.extension)
options= ma_tls_version_options(mysql->options.extension->tls_version);
SSL_CTX_set_options(ctx, options ? options : default_options);
if (ma_tls_set_certs(mysql, ctx))
{
goto error;
}
if (!(ssl= SSL_new(ctx)))
goto error;
if (!SSL_set_app_data(ssl, mysql))
goto error;
pthread_mutex_unlock(&LOCK_openssl_config);
return (void *)ssl;
error:
pthread_mutex_unlock(&LOCK_openssl_config);
if (ctx)
SSL_CTX_free(ctx);
if (ssl)
SSL_free(ssl);
return NULL;
}
|
O3
|
c
|
ma_tls_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x240ab(%rip), %rdi # 0x4c920
callq 0x136a0
callq 0x13200
movq %rax, %rdi
callq 0x13680
testq %rax, %rax
je 0x2896a
movq %rax, %rbx
movq 0x480(%r14), %rax
testq %rax, %rax
je 0x28944
movq 0xc0(%rax), %r15
testq %r15, %r15
je 0x28944
leaq 0xd5aa(%rip), %rsi # 0x35e64
movq %r15, %rdi
callq 0x13100
xorl %r12d, %r12d
testq %rax, %rax
sete %r12b
shll $0x1a, %r12d
orq $0x3a000000, %r12 # imm = 0x3A000000
leaq 0xd58e(%rip), %rsi # 0x35e6c
movq %r15, %rdi
callq 0x13100
movl %r12d, %r13d
andl $0x2e000000, %r13d # imm = 0x2E000000
testq %rax, %rax
cmoveq %r12, %r13
leaq 0xd576(%rip), %rsi # 0x35e74
movq %r15, %rdi
callq 0x13100
movl %r13d, %r12d
andl $0x36000000, %r12d # imm = 0x36000000
testq %rax, %rax
cmoveq %r13, %r12
leaq 0xd55e(%rip), %rsi # 0x35e7c
movq %r15, %rdi
callq 0x13100
movl %r12d, %esi
andl $0x1e000000, %esi # imm = 0x1E000000
testq %rax, %rax
cmoveq %r12, %rsi
cmpq $0x3e000000, %rsi # imm = 0x3E000000
je 0x28944
testq %rsi, %rsi
jne 0x28949
movl $0x82000850, %esi # imm = 0x82000850
movq %rbx, %rdi
callq 0x13810
movq 0x480(%r14), %rax
testq %rax, %rax
je 0x2897b
movq 0xa0(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x28983
leaq 0x23faf(%rip), %rdi # 0x4c920
callq 0x13330
jmp 0x28c24
movq $0x0, -0x30(%rbp)
movq 0x400(%r14), %r15
movq 0x408(%r14), %r12
movq 0x420(%r14), %rsi
testq %rsi, %rsi
je 0x289c5
cmpb $0x0, (%rsi)
je 0x289c5
movq %rbx, %rdi
callq 0x13550
testl %eax, %eax
jne 0x289c5
movq 0x420(%r14), %rsi
movq %rbx, %rdi
callq 0x13430
testl %eax, %eax
je 0x28bf8
movq 0x410(%r14), %rsi
movq 0x418(%r14), %rdx
movq %rbx, %rdi
callq 0x135a0
testl %eax, %eax
je 0x28b5b
movq 0x480(%r14), %rax
testq %rax, %rax
je 0x28a41
cmpq $0x0, 0x10(%rax)
jne 0x289fd
cmpq $0x0, 0x18(%rax)
je 0x28a41
movq %rbx, %rdi
callq 0x137f0
testq %rax, %rax
je 0x28a41
movq %rax, %r13
movq 0x480(%r14), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r13, %rdi
callq 0x13820
testl %eax, %eax
je 0x28bf8
movl $0xc, %esi
movq %r13, %rdi
callq 0x13310
testl %eax, %eax
je 0x28bf8
testq %r12, %r12
movq %r15, %r13
cmovneq %r12, %r13
testq %r15, %r15
cmoveq %r12, %r13
cmovneq %r15, %r12
testq %r13, %r13
cmoveq %r15, %r12
je 0x28a7a
cmpb $0x0, (%r13)
je 0x28a7a
movq %rbx, %rdi
movq %r13, %rsi
callq 0x13370
cmpl $0x1, %eax
jne 0x28bf8
testq %r12, %r12
je 0x28ae5
cmpb $0x0, (%r12)
je 0x28ae5
leaq 0xd482(%rip), %rsi # 0x35f0f
movq %r12, %rdi
callq 0x13520
testq %rax, %rax
je 0x28b89
movq %rax, %r15
callq 0x13790
leaq -0x38(%rbp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq -0x30(%rbp), %rcx
callq 0x13300
movq %r15, %rdi
callq 0x13460
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x133b0
cmpl $0x1, %eax
jne 0x28bba
movq -0x38(%rbp), %rdi
callq 0x132d0
testq %r13, %r13
je 0x28afb
movq %rbx, %rdi
callq 0x13750
cmpl $0x1, %eax
jne 0x28bf8
movl $0x1, %esi
cmpq $0x0, 0x410(%r14)
jne 0x28b18
xorl %esi, %esi
cmpq $0x0, 0x418(%r14)
setne %sil
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x13120
movq %rbx, %rdi
callq 0x13480
testq %rax, %rax
je 0x28c03
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x13140
testl %eax, %eax
je 0x28bb5
leaq 0x23dcf(%rip), %rdi # 0x4c920
callq 0x13330
jmp 0x28c27
cmpq $0x0, 0x410(%r14)
jne 0x28bf8
cmpq $0x0, 0x418(%r14)
jne 0x28bf8
movq %rbx, %rdi
callq 0x134f0
testl %eax, %eax
jne 0x289e3
jmp 0x28bf8
leaq 0x21f90(%rip), %rax # 0x4ab20
movq (%rax), %rdx
leaq 0x22196(%rip), %rax # 0x4ad30
movq 0x20(%rax), %rcx
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x7ea, %esi # imm = 0x7EA
movq %r12, %r8
xorl %eax, %eax
callq 0x16165
jmp 0x28c03
movq %r12, %r15
jmp 0x28c03
callq 0x130d0
movq %rax, %r15
movq -0x38(%rbp), %rdi
callq 0x132d0
testl %r15d, %r15d
setns %al
movl %r15d, %ecx
andl $0xff800000, %ecx # imm = 0xFF800000
cmpl $0x5800000, %ecx # imm = 0x5800000
sete %cl
testb %cl, %al
je 0x28bf8
andl $0x7fffff, %r15d # imm = 0x7FFFFF
cmpl $0x65, %r15d
je 0x28adc
movq %r14, %rdi
callq 0x28da0
xorl %r15d, %r15d
leaq 0x23d16(%rip), %rdi # 0x4c920
callq 0x13330
movq %rbx, %rdi
callq 0x13090
testq %r15, %r15
je 0x28c24
movq %r15, %rdi
callq 0x13280
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_tls_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdi
lea rdi, LOCK_openssl_config
call _pthread_mutex_lock
call _TLS_client_method
mov rdi, rax
call _SSL_CTX_new
test rax, rax
jz loc_2896A
mov rbx, rax
mov rax, [r14+480h]
test rax, rax
jz loc_28944
mov r15, [rax+0C0h]
test r15, r15
jz loc_28944
lea rsi, aTlsv10; "TLSv1.0"
mov rdi, r15
call _strstr
xor r12d, r12d
test rax, rax
setz r12b
shl r12d, 1Ah
or r12, 3A000000h
lea rsi, aTlsv11; "TLSv1.1"
mov rdi, r15
call _strstr
mov r13d, r12d
and r13d, 2E000000h
test rax, rax
cmovz r13, r12
lea rsi, aTlsv12; "TLSv1.2"
mov rdi, r15
call _strstr
mov r12d, r13d
and r12d, 36000000h
test rax, rax
cmovz r12, r13
lea rsi, aTlsv13; "TLSv1.3"
mov rdi, r15
call _strstr
mov esi, r12d
and esi, 1E000000h
test rax, rax
cmovz rsi, r12
cmp rsi, 3E000000h
jz short loc_28944
test rsi, rsi
jnz short loc_28949
loc_28944:
mov esi, 82000850h
loc_28949:
mov rdi, rbx
call _SSL_CTX_set_options
mov rax, [r14+480h]
test rax, rax
jz short loc_2897B
mov rax, [rax+0A0h]
mov [rbp+var_30], rax
jmp short loc_28983
loc_2896A:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
jmp loc_28C24
loc_2897B:
mov [rbp+var_30], 0
loc_28983:
mov r15, [r14+400h]
mov r12, [r14+408h]
mov rsi, [r14+420h]
test rsi, rsi
jz short loc_289C5
cmp byte ptr [rsi], 0
jz short loc_289C5
mov rdi, rbx
call _SSL_CTX_set_ciphersuites
test eax, eax
jnz short loc_289C5
mov rsi, [r14+420h]
mov rdi, rbx
call _SSL_CTX_set_cipher_list
test eax, eax
jz loc_28BF8
loc_289C5:
mov rsi, [r14+410h]
mov rdx, [r14+418h]
mov rdi, rbx
call _SSL_CTX_load_verify_locations
test eax, eax
jz loc_28B5B
loc_289E3:
mov rax, [r14+480h]
test rax, rax
jz short loc_28A41
cmp qword ptr [rax+10h], 0
jnz short loc_289FD
cmp qword ptr [rax+18h], 0
jz short loc_28A41
loc_289FD:
mov rdi, rbx
call _SSL_CTX_get_cert_store
test rax, rax
jz short loc_28A41
mov r13, rax
mov rax, [r14+480h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, r13
call _X509_STORE_load_locations
test eax, eax
jz loc_28BF8
mov esi, 0Ch
mov rdi, r13
call _X509_STORE_set_flags
test eax, eax
jz loc_28BF8
loc_28A41:
test r12, r12
mov r13, r15
cmovnz r13, r12
test r15, r15
cmovz r13, r12
cmovnz r12, r15
test r13, r13
cmovz r12, r15
jz short loc_28A7A
cmp byte ptr [r13+0], 0
jz short loc_28A7A
mov rdi, rbx
mov rsi, r13
call _SSL_CTX_use_certificate_chain_file
cmp eax, 1
jnz loc_28BF8
loc_28A7A:
test r12, r12
jz short loc_28AE5
cmp byte ptr [r12], 0
jz short loc_28AE5
lea rsi, aRb; "rb"
mov rdi, r12
call _fopen64
test rax, rax
jz loc_28B89
mov r15, rax
call _EVP_PKEY_new
lea r12, [rbp+var_38]
mov [r12], rax
mov rdi, r15
mov rsi, r12
xor edx, edx
mov rcx, [rbp+var_30]
call _PEM_read_PrivateKey
mov rdi, r15
call _fclose
mov rsi, [r12]
mov rdi, rbx
call _SSL_CTX_use_PrivateKey
cmp eax, 1
jnz loc_28BBA
loc_28ADC:
mov rdi, [rbp+var_38]
call _EVP_PKEY_free
loc_28AE5:
test r13, r13
jz short loc_28AFB
mov rdi, rbx
call _SSL_CTX_check_private_key
cmp eax, 1
jnz loc_28BF8
loc_28AFB:
mov esi, 1
cmp qword ptr [r14+410h], 0
jnz short loc_28B18
xor esi, esi
cmp qword ptr [r14+418h], 0
setnz sil
loc_28B18:
xor r15d, r15d
mov rdi, rbx
xor edx, edx
call _SSL_CTX_set_verify
mov rdi, rbx
call _SSL_new
test rax, rax
jz loc_28C03
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r14
call _SSL_set_ex_data
test eax, eax
jz short loc_28BB5
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
jmp loc_28C27
loc_28B5B:
cmp qword ptr [r14+410h], 0
jnz loc_28BF8
cmp qword ptr [r14+418h], 0
jnz loc_28BF8
mov rdi, rbx
call _SSL_CTX_set_default_verify_paths
test eax, eax
jnz loc_289E3
jmp short loc_28BF8
loc_28B89:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, mariadb_client_errors
mov rcx, [rax+20h]
xor r15d, r15d
mov rdi, r14
mov esi, 7EAh
mov r8, r12
xor eax, eax
call my_set_error
jmp short loc_28C03
loc_28BB5:
mov r15, r12
jmp short loc_28C03
loc_28BBA:
call _ERR_peek_error
mov r15, rax
mov rdi, [rbp+var_38]
call _EVP_PKEY_free
test r15d, r15d
setns al
mov ecx, r15d
and ecx, 0FF800000h
cmp ecx, 5800000h
setz cl
test al, cl
jz short loc_28BF8
and r15d, 7FFFFFh
cmp r15d, 65h ; 'e'
jz loc_28ADC
loc_28BF8:
mov rdi, r14
call ma_tls_set_error
xor r15d, r15d
loc_28C03:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
mov rdi, rbx
call _SSL_CTX_free
test r15, r15
jz short loc_28C24
mov rdi, r15
call _SSL_free
loc_28C24:
xor r12d, r12d
loc_28C27:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_tls_init(_QWORD *a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rbx
long long v4; // rax
long long v5; // r15
long long v6; // r12
long long v7; // r13
long long v8; // r12
long long v9; // rsi
long long v10; // rax
_BYTE *v11; // r15
_BYTE *v12; // r12
_BYTE *v13; // rsi
long long v14; // rax
long long cert_store; // rax
long long v16; // r13
_BYTE *v17; // r13
long long v18; // rax
long long v19; // r15
_BOOL8 v20; // rsi
long long v21; // r15
long long v22; // rax
long long v23; // r12
int v24; // r15d
long long v26; // [rsp+8h] [rbp-38h] BYREF
long long v27; // [rsp+10h] [rbp-30h]
pthread_mutex_lock(&LOCK_openssl_config);
v1 = TLS_client_method();
v2 = SSL_CTX_new(v1);
if ( !v2 )
{
pthread_mutex_unlock(&LOCK_openssl_config);
return 0LL;
}
v3 = v2;
v4 = a1[144];
if ( !v4 )
goto LABEL_12;
v5 = *(_QWORD *)(v4 + 192);
if ( !v5 )
goto LABEL_12;
v6 = ((unsigned __int8)(strstr(*(_QWORD *)(v4 + 192), "TLSv1.0") == 0) << 26) | 0x3A000000LL;
v7 = v6 & 0x2E000000;
if ( !strstr(v5, "TLSv1.1") )
v7 = v6;
v8 = v7 & 0x36000000;
if ( !strstr(v5, "TLSv1.2") )
v8 = v7;
v9 = v8 & 0x1E000000;
if ( !strstr(v5, "TLSv1.3") )
v9 = v8;
if ( v9 == 1040187392 || !v9 )
LABEL_12:
v9 = 2181040208LL;
SSL_CTX_set_options(v3, v9);
v10 = a1[144];
if ( v10 )
v27 = *(_QWORD *)(v10 + 160);
else
v27 = 0LL;
v11 = (_BYTE *)a1[128];
v12 = (_BYTE *)a1[129];
v13 = (_BYTE *)a1[132];
if ( v13 && *v13 && !(unsigned int)SSL_CTX_set_ciphersuites(v3) && !(unsigned int)SSL_CTX_set_cipher_list(v3, a1[132]) )
goto LABEL_57;
if ( !(unsigned int)SSL_CTX_load_verify_locations(v3, a1[130], a1[131])
&& (a1[130] || a1[131] || !(unsigned int)SSL_CTX_set_default_verify_paths(v3)) )
{
goto LABEL_57;
}
v14 = a1[144];
if ( v14 && (*(_QWORD *)(v14 + 16) || *(_QWORD *)(v14 + 24)) )
{
cert_store = SSL_CTX_get_cert_store(v3);
if ( cert_store )
{
v16 = cert_store;
if ( !(unsigned int)X509_STORE_load_locations(
cert_store,
*(_QWORD *)(a1[144] + 16LL),
*(_QWORD *)(a1[144] + 24LL))
|| !(unsigned int)X509_STORE_set_flags(v16, 12LL) )
{
goto LABEL_57;
}
}
}
v17 = v11;
if ( v12 )
v17 = v12;
if ( v11 )
v12 = v11;
else
v17 = v12;
if ( v17 )
{
if ( *v17 && (unsigned int)SSL_CTX_use_certificate_chain_file(v3, v17) != 1 )
goto LABEL_57;
}
else
{
v12 = v11;
}
if ( v12 && *v12 )
{
v18 = fopen64(v12, "rb");
if ( !v18 )
{
v21 = 0LL;
my_set_error((long long)a1, 2026, (long long)SQLSTATE_UNKNOWN, mariadb_client_errors[4], v12);
goto LABEL_58;
}
v19 = v18;
v26 = EVP_PKEY_new();
PEM_read_PrivateKey(v19, &v26, 0LL, v27);
fclose(v19);
if ( (unsigned int)SSL_CTX_use_PrivateKey(v3, v26) != 1 )
{
v24 = ERR_peek_error();
EVP_PKEY_free(v26);
if ( (v24 & 0xFF800000) != 92274688 || v24 < 0 || (v24 & 0x7FFFFF) != 0x65 )
goto LABEL_57;
}
EVP_PKEY_free(v26);
}
if ( v17 && (unsigned int)SSL_CTX_check_private_key(v3) != 1 )
{
LABEL_57:
ma_tls_set_error(a1);
v21 = 0LL;
LABEL_58:
pthread_mutex_unlock(&LOCK_openssl_config);
SSL_CTX_free(v3);
if ( v21 )
SSL_free(v21);
return 0LL;
}
v20 = 1LL;
if ( !a1[130] )
v20 = a1[131] != 0LL;
v21 = 0LL;
SSL_CTX_set_verify(v3, v20, 0LL);
v22 = SSL_new(v3);
if ( !v22 )
goto LABEL_58;
v23 = v22;
if ( !(unsigned int)SSL_set_ex_data(v22, 0LL, a1) )
{
v21 = v23;
goto LABEL_58;
}
pthread_mutex_unlock(&LOCK_openssl_config);
return v23;
}
|
ma_tls_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
LEA RDI,[0x14c920]
CALL 0x001136a0
CALL 0x00113200
MOV RDI,RAX
CALL 0x00113680
TEST RAX,RAX
JZ 0x0012896a
MOV RBX,RAX
MOV RAX,qword ptr [R14 + 0x480]
TEST RAX,RAX
JZ 0x00128944
MOV R15,qword ptr [RAX + 0xc0]
TEST R15,R15
JZ 0x00128944
LEA RSI,[0x135e64]
MOV RDI,R15
CALL 0x00113100
XOR R12D,R12D
TEST RAX,RAX
SETZ R12B
SHL R12D,0x1a
OR R12,0x3a000000
LEA RSI,[0x135e6c]
MOV RDI,R15
CALL 0x00113100
MOV R13D,R12D
AND R13D,0x2e000000
TEST RAX,RAX
CMOVZ R13,R12
LEA RSI,[0x135e74]
MOV RDI,R15
CALL 0x00113100
MOV R12D,R13D
AND R12D,0x36000000
TEST RAX,RAX
CMOVZ R12,R13
LEA RSI,[0x135e7c]
MOV RDI,R15
CALL 0x00113100
MOV ESI,R12D
AND ESI,0x1e000000
TEST RAX,RAX
CMOVZ RSI,R12
CMP RSI,0x3e000000
JZ 0x00128944
TEST RSI,RSI
JNZ 0x00128949
LAB_00128944:
MOV ESI,0x82000850
LAB_00128949:
MOV RDI,RBX
CALL 0x00113810
MOV RAX,qword ptr [R14 + 0x480]
TEST RAX,RAX
JZ 0x0012897b
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00128983
LAB_0012896a:
LEA RDI,[0x14c920]
CALL 0x00113330
JMP 0x00128c24
LAB_0012897b:
MOV qword ptr [RBP + -0x30],0x0
LAB_00128983:
MOV R15,qword ptr [R14 + 0x400]
MOV R12,qword ptr [R14 + 0x408]
MOV RSI,qword ptr [R14 + 0x420]
TEST RSI,RSI
JZ 0x001289c5
CMP byte ptr [RSI],0x0
JZ 0x001289c5
MOV RDI,RBX
CALL 0x00113550
TEST EAX,EAX
JNZ 0x001289c5
MOV RSI,qword ptr [R14 + 0x420]
MOV RDI,RBX
CALL 0x00113430
TEST EAX,EAX
JZ 0x00128bf8
LAB_001289c5:
MOV RSI,qword ptr [R14 + 0x410]
MOV RDX,qword ptr [R14 + 0x418]
MOV RDI,RBX
CALL 0x001135a0
TEST EAX,EAX
JZ 0x00128b5b
LAB_001289e3:
MOV RAX,qword ptr [R14 + 0x480]
TEST RAX,RAX
JZ 0x00128a41
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x001289fd
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00128a41
LAB_001289fd:
MOV RDI,RBX
CALL 0x001137f0
TEST RAX,RAX
JZ 0x00128a41
MOV R13,RAX
MOV RAX,qword ptr [R14 + 0x480]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,R13
CALL 0x00113820
TEST EAX,EAX
JZ 0x00128bf8
MOV ESI,0xc
MOV RDI,R13
CALL 0x00113310
TEST EAX,EAX
JZ 0x00128bf8
LAB_00128a41:
TEST R12,R12
MOV R13,R15
CMOVNZ R13,R12
TEST R15,R15
CMOVZ R13,R12
CMOVNZ R12,R15
TEST R13,R13
CMOVZ R12,R15
JZ 0x00128a7a
CMP byte ptr [R13],0x0
JZ 0x00128a7a
MOV RDI,RBX
MOV RSI,R13
CALL 0x00113370
CMP EAX,0x1
JNZ 0x00128bf8
LAB_00128a7a:
TEST R12,R12
JZ 0x00128ae5
CMP byte ptr [R12],0x0
JZ 0x00128ae5
LEA RSI,[0x135f0f]
MOV RDI,R12
CALL 0x00113520
TEST RAX,RAX
JZ 0x00128b89
MOV R15,RAX
CALL 0x00113790
LEA R12,[RBP + -0x38]
MOV qword ptr [R12],RAX
MOV RDI,R15
MOV RSI,R12
XOR EDX,EDX
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00113300
MOV RDI,R15
CALL 0x00113460
MOV RSI,qword ptr [R12]
MOV RDI,RBX
CALL 0x001133b0
CMP EAX,0x1
JNZ 0x00128bba
LAB_00128adc:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001132d0
LAB_00128ae5:
TEST R13,R13
JZ 0x00128afb
MOV RDI,RBX
CALL 0x00113750
CMP EAX,0x1
JNZ 0x00128bf8
LAB_00128afb:
MOV ESI,0x1
CMP qword ptr [R14 + 0x410],0x0
JNZ 0x00128b18
XOR ESI,ESI
CMP qword ptr [R14 + 0x418],0x0
SETNZ SIL
LAB_00128b18:
XOR R15D,R15D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00113120
MOV RDI,RBX
CALL 0x00113480
TEST RAX,RAX
JZ 0x00128c03
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R14
CALL 0x00113140
TEST EAX,EAX
JZ 0x00128bb5
LEA RDI,[0x14c920]
CALL 0x00113330
JMP 0x00128c27
LAB_00128b5b:
CMP qword ptr [R14 + 0x410],0x0
JNZ 0x00128bf8
CMP qword ptr [R14 + 0x418],0x0
JNZ 0x00128bf8
MOV RDI,RBX
CALL 0x001134f0
TEST EAX,EAX
JNZ 0x001289e3
JMP 0x00128bf8
LAB_00128b89:
LEA RAX,[0x14ab20]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14ad30]
MOV RCX,qword ptr [RAX + 0x20]
XOR R15D,R15D
MOV RDI,R14
MOV ESI,0x7ea
MOV R8,R12
XOR EAX,EAX
CALL 0x00116165
JMP 0x00128c03
LAB_00128bb5:
MOV R15,R12
JMP 0x00128c03
LAB_00128bba:
CALL 0x001130d0
MOV R15,RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001132d0
TEST R15D,R15D
SETNS AL
MOV ECX,R15D
AND ECX,0xff800000
CMP ECX,0x5800000
SETZ CL
TEST AL,CL
JZ 0x00128bf8
AND R15D,0x7fffff
CMP R15D,0x65
JZ 0x00128adc
LAB_00128bf8:
MOV RDI,R14
CALL 0x00128da0
XOR R15D,R15D
LAB_00128c03:
LEA RDI,[0x14c920]
CALL 0x00113330
MOV RDI,RBX
CALL 0x00113090
TEST R15,R15
JZ 0x00128c24
MOV RDI,R15
CALL 0x00113280
LAB_00128c24:
XOR R12D,R12D
LAB_00128c27:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
SSL * ma_tls_init(void *param_1)
{
long lVar1;
char *file;
int iVar2;
SSL_METHOD *meth;
SSL_CTX *ctx;
char *pcVar3;
char *pcVar4;
X509_STORE *ctx_00;
FILE *fp;
SSL *ssl;
ulong uVar5;
uint uVar6;
char *pcVar7;
uint uVar8;
SSL *ssl_00;
EVP_PKEY *local_40;
void *local_38;
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
meth = (SSL_METHOD *)TLS_client_method();
ctx = SSL_CTX_new(meth);
if (ctx == (SSL_CTX *)0x0) {
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
return (SSL *)0x0;
}
if ((*(long *)((long)param_1 + 0x480) == 0) ||
(pcVar4 = *(char **)(*(long *)((long)param_1 + 0x480) + 0xc0), pcVar4 == (char *)0x0)) {
LAB_00128944:
uVar8 = 0x82000850;
}
else {
pcVar3 = strstr(pcVar4,"TLSv1.0");
uVar6 = (uint)(pcVar3 == (char *)0x0) << 0x1a;
pcVar3 = strstr(pcVar4,"TLSv1.1");
uVar8 = uVar6 | 0x2a000000;
if (pcVar3 == (char *)0x0) {
uVar8 = uVar6 | 0x3a000000;
}
pcVar3 = strstr(pcVar4,"TLSv1.2");
uVar6 = uVar8 & 0x36000000;
if (pcVar3 == (char *)0x0) {
uVar6 = uVar8;
}
pcVar4 = strstr(pcVar4,"TLSv1.3");
uVar8 = uVar6 & 0x1e000000;
if (pcVar4 == (char *)0x0) {
uVar8 = uVar6;
}
if ((uVar8 == 0x3e000000) || (uVar8 == 0)) goto LAB_00128944;
}
SSL_CTX_set_options(ctx,uVar8);
if (*(long *)((long)param_1 + 0x480) == 0) {
local_38 = (void *)0x0;
}
else {
local_38 = *(void **)(*(long *)((long)param_1 + 0x480) + 0xa0);
}
pcVar4 = *(char **)((long)param_1 + 0x400);
pcVar3 = *(char **)((long)param_1 + 0x408);
if ((((((*(char **)((long)param_1 + 0x420) == (char *)0x0) ||
(**(char **)((long)param_1 + 0x420) == '\0')) ||
(iVar2 = SSL_CTX_set_ciphersuites(ctx), iVar2 != 0)) ||
(iVar2 = SSL_CTX_set_cipher_list(ctx,*(char **)((long)param_1 + 0x420)), iVar2 != 0)) &&
((iVar2 = SSL_CTX_load_verify_locations
(ctx,*(char **)((long)param_1 + 0x410),*(char **)((long)param_1 + 0x418)),
iVar2 != 0 ||
(((*(long *)((long)param_1 + 0x410) == 0 && (*(long *)((long)param_1 + 0x418) == 0)) &&
(iVar2 = SSL_CTX_set_default_verify_paths(ctx), iVar2 != 0)))))) &&
((((lVar1 = *(long *)((long)param_1 + 0x480), lVar1 == 0 ||
((*(long *)(lVar1 + 0x10) == 0 && (*(long *)(lVar1 + 0x18) == 0)))) ||
(ctx_00 = SSL_CTX_get_cert_store(ctx), ctx_00 == (X509_STORE *)0x0)) ||
((iVar2 = X509_STORE_load_locations
(ctx_00,*(char **)(*(long *)((long)param_1 + 0x480) + 0x10),
*(char **)(*(long *)((long)param_1 + 0x480) + 0x18)), iVar2 != 0 &&
(iVar2 = X509_STORE_set_flags(ctx_00,0xc), iVar2 != 0)))))) {
pcVar7 = pcVar4;
if (pcVar3 != (char *)0x0) {
pcVar7 = pcVar3;
}
file = pcVar3;
if (pcVar4 != (char *)0x0) {
pcVar3 = pcVar4;
file = pcVar7;
}
if (((file == (char *)0x0) || (pcVar4 = pcVar3, *file == '\0')) ||
(iVar2 = SSL_CTX_use_certificate_chain_file(ctx,file), iVar2 == 1)) {
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
fp = fopen64(pcVar4,"rb");
if (fp == (FILE *)0x0) {
my_set_error(param_1,0x7ea,SQLSTATE_UNKNOWN,mariadb_client_errors._32_8_,pcVar4);
ssl_00 = (SSL *)0x0;
goto LAB_00128c03;
}
local_40 = EVP_PKEY_new();
PEM_read_PrivateKey(fp,&local_40,(int1 *)0x0,local_38);
fclose(fp);
iVar2 = SSL_CTX_use_PrivateKey(ctx,local_40);
if (iVar2 != 1) {
uVar5 = ERR_peek_error();
EVP_PKEY_free(local_40);
uVar8 = (uint)uVar5;
if (((int)uVar8 < 0 || (uVar8 & 0xff800000) != 0x5800000) || ((uVar8 & 0x7fffff) != 0x65))
goto LAB_00128bf8;
}
EVP_PKEY_free(local_40);
}
if ((file == (char *)0x0) || (iVar2 = SSL_CTX_check_private_key(ctx), iVar2 == 1)) {
uVar8 = 1;
if (*(long *)((long)param_1 + 0x410) == 0) {
uVar8 = (uint)(*(long *)((long)param_1 + 0x418) != 0);
}
SSL_CTX_set_verify(ctx,uVar8,(callback *)0x0);
ssl = SSL_new(ctx);
ssl_00 = (SSL *)0x0;
if ((ssl != (SSL *)0x0) &&
(iVar2 = SSL_set_ex_data(ssl,0,param_1), ssl_00 = ssl, iVar2 != 0)) {
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
return ssl;
}
goto LAB_00128c03;
}
}
}
LAB_00128bf8:
ma_tls_set_error(param_1);
ssl_00 = (SSL *)0x0;
LAB_00128c03:
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
SSL_CTX_free(ctx);
if (ssl_00 != (SSL *)0x0) {
SSL_free(ssl_00);
}
return (SSL *)0x0;
}
|
|
12,612
|
translog_write_fixed_record
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_write_fixed_record(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
TRN *trn, void *hook_arg)
{
struct st_translog_buffer *buffer_to_flush= NULL;
uchar chunk1_header[1 + 2];
/* Max number of such LSNs per record is 2 */
uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE];
LEX_CUSTRING *part;
int rc= 1;
DBUG_ENTER("translog_write_fixed_record");
DBUG_ASSERT((log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH &&
parts->record_length ==
log_record_type_descriptor[type].fixed_length) ||
(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH &&
parts->record_length ==
log_record_type_descriptor[type].fixed_length));
translog_lock();
DBUG_PRINT("info", ("horizon: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon)));
DBUG_ASSERT(log_descriptor.bc.current_page_fill <= TRANSLOG_PAGE_SIZE);
DBUG_PRINT("info",
("Page size: %u record: %u next cond: %d",
log_descriptor.bc.current_page_fill,
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3),
((((uint) log_descriptor.bc.current_page_fill) +
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3)) >
TRANSLOG_PAGE_SIZE)));
/*
check that there is enough place on current page.
NOTE: compressing may increase page LSN size on two bytes for every LSN
*/
if ((((uint) log_descriptor.bc.current_page_fill) +
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3)) >
TRANSLOG_PAGE_SIZE)
{
DBUG_PRINT("info", ("Next page"));
if (translog_page_next(&log_descriptor.horizon, &log_descriptor.bc,
&buffer_to_flush))
goto err; /* rc == 1 */
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
}
set_lsn(lsn, log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
goto err;
/* compress LSNs */
if (log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH)
{
DBUG_ASSERT(log_record_type_descriptor[type].compressed_LSN > 0);
translog_relative_LSN_encode(parts, *lsn,
log_record_type_descriptor[type].
compressed_LSN, compressed_LSNs);
}
/*
Write the whole record at once (we know that there is enough place on
the destination page)
*/
DBUG_ASSERT(parts->current != 0); /* first part is left for header */
part= parts->parts + (--parts->current);
parts->total_record_length+= (translog_size_t) (part->length= 1 + 2);
part->str= chunk1_header;
*chunk1_header= (uchar) (type | TRANSLOG_CHUNK_FIXED);
int2store(chunk1_header + 1, short_trid);
rc= translog_write_parts_on_page(&log_descriptor.horizon,
&log_descriptor.bc,
parts->total_record_length, parts);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
err:
translog_unlock();
/*
check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(rc);
}
|
O0
|
c
|
translog_write_fixed_record:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movw %cx, %ax
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movw %ax, -0x3a(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x91577
callq 0x8cd10
jmp 0x9157e
jmp 0x91580
jmp 0x91582
jmp 0x91584
jmp 0x91586
movzwl 0xbf3c43(%rip), %eax # 0xc851d0
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
movl -0x2c(%rbp), %edx
movl %edx, %esi
leaq 0x3f1db1(%rip), %rdx # 0x483350
imulq $0x48, %rsi, %rsi
addq %rsi, %rdx
movswl 0x20(%rdx), %edx
shll %edx
addl %edx, %ecx
addl $0x3, %ecx
addl %ecx, %eax
cmpl $0x2000, %eax # imm = 0x2000
jbe 0x915f3
jmp 0x915bc
jmp 0x915be
leaq 0x3f2f8b(%rip), %rsi # 0x484550
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
leaq -0x58(%rbp), %rdx
callq 0x96680
cmpb $0x0, %al
je 0x915e8
jmp 0x91781
cmpq $0x0, -0x58(%rbp)
je 0x915f1
jmp 0x915f1
jmp 0x915f3
movq -0x28(%rbp), %rdi
movq 0xbf3b9a(%rip), %rsi # 0xc85198
callq 0x98010
movq -0x28(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x28(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x98040
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x91684
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f1d0e(%rip), %rax # 0x483350
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x91689
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f1cf4(%rip), %rax # 0x483350
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x91689
jmp 0x91781
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f1cbb(%rip), %rax # 0x483350
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x916d0
jmp 0x916a3
jmp 0x916a5
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f1c94(%rip), %rax # 0x483350
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movswl 0x20(%rax), %edx
leaq -0x20(%rbp), %rcx
callq 0x96780
jmp 0x916d2
jmp 0x916d4
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rdx
movl 0x8(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rdx)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq $0x3, 0x8(%rax)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x4(%rax)
leaq -0x5b(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
orl $0x40, %eax
movb %al, -0x5b(%rbp)
leaq -0x5b(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movw -0x3a(%rbp), %cx
movq -0x78(%rbp), %rax
movw %cx, (%rax)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x48(%rbp), %rcx
leaq 0x3f2e04(%rip), %rsi # 0x484550
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
callq 0x981e0
movsbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq 0xbf3a52(%rip), %rax # 0xc851c8
movq %rcx, 0x100000(%rax)
jmp 0x9177f
jmp 0x91781
callq 0x8ce00
cmpq $0x0, -0x58(%rbp)
je 0x917ab
cmpl $0x0, -0x6c(%rbp)
jne 0x917a2
movq -0x58(%rbp), %rdi
callq 0x92fc0
movsbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x58(%rbp), %rdi
callq 0x8cdd0
jmp 0x917ad
movl -0x6c(%rbp), %eax
movb %al, -0x79(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x917d1
movb -0x79(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
callq 0x29230
nopw %cs:(%rax,%rax)
|
translog_write_fixed_record:
push rbp
mov rbp, rsp
sub rsp, 80h
mov ax, cx
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
mov [rbp+var_3A], ax
mov [rbp+var_48], r8
mov [rbp+var_50], r9
mov [rbp+var_58], 0
mov [rbp+var_6C], 1
jmp short $+2
loc_91577:
call translog_lock
jmp short $+2
loc_9157E:
jmp short $+2
loc_91580:
jmp short $+2
loc_91582:
jmp short $+2
loc_91584:
jmp short $+2
loc_91586:
movzx eax, cs:word_C851D0
mov rcx, [rbp+var_48]
mov ecx, [rcx]
mov edx, [rbp+var_2C]
mov esi, edx
lea rdx, log_record_type_descriptor
imul rsi, 48h ; 'H'
add rdx, rsi
movsx edx, word ptr [rdx+20h]
shl edx, 1
add ecx, edx
add ecx, 3
add eax, ecx
cmp eax, 2000h
jbe short loc_915F3
jmp short $+2
loc_915BC:
jmp short $+2
loc_915BE:
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
lea rdx, [rbp+var_58]
call translog_page_next
cmp al, 0
jz short loc_915E8
jmp loc_91781
loc_915E8:
cmp [rbp+var_58], 0
jz short loc_915F1
jmp short $+2
loc_915F1:
jmp short $+2
loc_915F3:
mov rdi, [rbp+var_28]
mov rsi, cs:qword_C85198
call set_lsn
mov rax, [rbp+var_28]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_28]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_28]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_91684
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_91689
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_28]
mov r8, [rbp+arg_0]
call rax
movsx eax, al
cmp eax, 0
jz short loc_91689
loc_91684:
jmp loc_91781
loc_91689:
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp dword ptr [rax], 2
jnz short loc_916D0
jmp short $+2
loc_916A3:
jmp short $+2
loc_916A5:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rsi, [rax]
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movsx edx, word ptr [rax+20h]
lea rcx, [rbp+var_20]
call translog_relative_LSN_encode
loc_916D0:
jmp short $+2
loc_916D2:
jmp short $+2
loc_916D4:
mov rax, [rbp+var_48]
mov rax, [rax+10h]
mov rdx, [rbp+var_48]
mov ecx, [rdx+8]
add ecx, 0FFFFFFFFh
mov [rdx+8], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov qword ptr [rax+8], 3
mov rax, [rbp+var_48]
mov ecx, [rax+4]
add ecx, 3
mov [rax+4], ecx
lea rcx, [rbp+var_5B]
mov rax, [rbp+var_68]
mov [rax], rcx
mov eax, [rbp+var_2C]
or eax, 40h
mov [rbp+var_5B], al
lea rax, [rbp+var_5B]
add rax, 1
mov [rbp+var_78], rax
mov cx, [rbp+var_3A]
mov rax, [rbp+var_78]
mov [rax], cx
mov rax, [rbp+var_48]
mov edx, [rax+4]
mov rcx, [rbp+var_48]
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
call translog_write_parts_on_page
movsx eax, al
mov [rbp+var_6C], eax
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, cs:qword_C851C8
mov [rax+100000h], rcx
jmp short $+2
loc_9177F:
jmp short $+2
loc_91781:
call translog_unlock
cmp [rbp+var_58], 0
jz short loc_917AB
cmp [rbp+var_6C], 0
jnz short loc_917A2
mov rdi, [rbp+var_58]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_6C], eax
loc_917A2:
mov rdi, [rbp+var_58]
call translog_buffer_unlock
loc_917AB:
jmp short $+2
loc_917AD:
mov eax, [rbp+var_6C]
mov [rbp+var_79], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_917D1
mov al, [rbp+var_79]
add rsp, 80h
pop rbp
retn
loc_917D1:
call ___stack_chk_fail
|
char translog_write_fixed_record(
_QWORD *a1,
unsigned int a2,
long long a3,
__int16 a4,
long long a5,
long long a6,
long long a7)
{
long long v7; // rax
unsigned int v8; // ecx
int v10; // [rsp+14h] [rbp-6Ch]
char v11; // [rsp+25h] [rbp-5Bh] BYREF
__int16 v12; // [rsp+26h] [rbp-5Ah]
long long v13; // [rsp+28h] [rbp-58h] BYREF
long long v14; // [rsp+30h] [rbp-50h]
long long v15; // [rsp+38h] [rbp-48h]
__int16 v16; // [rsp+46h] [rbp-3Ah]
long long v17; // [rsp+48h] [rbp-38h]
unsigned int v18; // [rsp+54h] [rbp-2Ch]
_QWORD *v19; // [rsp+58h] [rbp-28h]
_BYTE v20[24]; // [rsp+60h] [rbp-20h] BYREF
unsigned long long v21; // [rsp+78h] [rbp-8h]
v21 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = a6;
v13 = 0LL;
v10 = 1;
translog_lock();
if ( 2 * SLOWORD(log_record_type_descriptor[18 * a2 + 8])
+ *(_DWORD *)v15
+ 3
+ (unsigned int)(unsigned __int16)word_C851D0 <= 0x2000
|| !(unsigned __int8)translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v13) )
{
set_lsn(v19, qword_C85198);
if ( !(unsigned __int8)translog_set_lsn_for_files(
(unsigned int)HIDWORD(*v19),
(unsigned int)HIDWORD(*v19),
*v19,
1LL)
&& (!*(_QWORD *)&log_record_type_descriptor[18 * v18 + 4]
|| !(*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v18 + 4])(
v18,
v14,
v17,
v19,
a7)) )
{
if ( log_record_type_descriptor[18 * v18] == 2 )
translog_relative_LSN_encode(v15, *v19, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v18 + 8]), v20);
v7 = *(_QWORD *)(v15 + 16);
v8 = *(_DWORD *)(v15 + 8) - 1;
*(_DWORD *)(v15 + 8) = v8;
*(_QWORD *)(16LL * v8 + v7 + 8) = 3LL;
*(_DWORD *)(v15 + 4) += 3;
*(_QWORD *)(16LL * v8 + v7) = &v11;
v11 = v18 | 0x40;
v12 = v16;
v10 = (char)translog_write_parts_on_page(
&log_descriptor[1048969],
&log_descriptor[1048970],
*(unsigned int *)(v15 + 4),
v15);
*(_QWORD *)(qword_C851C8 + 0x100000) = *v19;
}
}
translog_unlock();
if ( v13 )
{
if ( !v10 )
v10 = (unsigned __int8)translog_buffer_flush(v13);
translog_buffer_unlock(v13);
}
return v10;
}
|
translog_write_fixed_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV word ptr [RBP + -0x3a],AX
MOV qword ptr [RBP + -0x48],R8
MOV qword ptr [RBP + -0x50],R9
MOV qword ptr [RBP + -0x58],0x0
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x00191577
LAB_00191577:
CALL 0x0018cd10
JMP 0x0019157e
LAB_0019157e:
JMP 0x00191580
LAB_00191580:
JMP 0x00191582
LAB_00191582:
JMP 0x00191584
LAB_00191584:
JMP 0x00191586
LAB_00191586:
MOVZX EAX,word ptr [0x00d851d0]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ESI,EDX
LEA RDX,[0x583350]
IMUL RSI,RSI,0x48
ADD RDX,RSI
MOVSX EDX,word ptr [RDX + 0x20]
SHL EDX,0x1
ADD ECX,EDX
ADD ECX,0x3
ADD EAX,ECX
CMP EAX,0x2000
JBE 0x001915f3
JMP 0x001915bc
LAB_001915bc:
JMP 0x001915be
LAB_001915be:
LEA RSI,[0x584550]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
LEA RDX,[RBP + -0x58]
CALL 0x00196680
CMP AL,0x0
JZ 0x001915e8
JMP 0x00191781
LAB_001915e8:
CMP qword ptr [RBP + -0x58],0x0
JZ 0x001915f1
JMP 0x001915f1
LAB_001915f1:
JMP 0x001915f3
LAB_001915f3:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [0x00d85198]
CALL 0x00198010
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x00198040
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00191684
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x583350]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00191689
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x583350]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + 0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00191689
LAB_00191684:
JMP 0x00191781
LAB_00191689:
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x583350]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP dword ptr [RAX],0x2
JNZ 0x001916d0
JMP 0x001916a3
LAB_001916a3:
JMP 0x001916a5
LAB_001916a5:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x583350]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVSX EDX,word ptr [RAX + 0x20]
LEA RCX,[RBP + -0x20]
CALL 0x00196780
LAB_001916d0:
JMP 0x001916d2
LAB_001916d2:
JMP 0x001916d4
LAB_001916d4:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RDX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x8],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],0x3
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x3
MOV dword ptr [RAX + 0x4],ECX
LEA RCX,[RBP + -0x5b]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x40
MOV byte ptr [RBP + -0x5b],AL
LEA RAX,[RBP + -0x5b]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
MOV CX,word ptr [RBP + -0x3a]
MOV RAX,qword ptr [RBP + -0x78]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[0x584550]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
CALL 0x001981e0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x6c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d851c8]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x0019177f
LAB_0019177f:
JMP 0x00191781
LAB_00191781:
CALL 0x0018ce00
CMP qword ptr [RBP + -0x58],0x0
JZ 0x001917ab
CMP dword ptr [RBP + -0x6c],0x0
JNZ 0x001917a2
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00192fc0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x6c],EAX
LAB_001917a2:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0018cdd0
LAB_001917ab:
JMP 0x001917ad
LAB_001917ad:
MOV EAX,dword ptr [RBP + -0x6c]
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001917d1
MOV AL,byte ptr [RBP + -0x79]
ADD RSP,0x80
POP RBP
RET
LAB_001917d1:
CALL 0x00129230
|
int8
translog_write_fixed_record
(long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5,
int8 param_6,int8 param_7)
{
int iVar1;
char cVar2;
char cVar3;
long *plVar4;
long in_FS_OFFSET;
byte local_63;
int2 local_62;
long local_60;
int8 local_58;
int *local_50;
int2 local_42;
int8 local_40;
uint local_34;
long *local_30;
int1 local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = 0;
cVar3 = '\x01';
local_58 = param_6;
local_50 = param_5;
local_42 = param_4;
local_40 = param_3;
local_34 = param_2;
local_30 = param_1;
translog_lock();
if (((uint)DAT_00d851d0 +
*local_50 + *(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20) * 2 + 3 <
0x2001) || (cVar2 = translog_page_next(&DAT_00d85198,&DAT_00d851a0,&local_60), cVar2 == '\0')
) {
set_lsn(local_30,DAT_00d85198);
cVar2 = translog_set_lsn_for_files
(*local_30 >> 0x20 & 0xffffffff,*local_30 >> 0x20 & 0xffffffff,*local_30,1);
if ((cVar2 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10) == 0 ||
(cVar2 = (**(code **)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10))
(local_34,local_58,local_40,local_30,param_7), cVar2 == '\0')))) {
if (*(int *)(log_record_type_descriptor + (ulong)local_34 * 0x48) == 2) {
translog_relative_LSN_encode
(local_50,*local_30,
(int)*(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20),
local_28);
}
iVar1 = local_50[2];
local_50[2] = iVar1 - 1U;
plVar4 = (long *)(*(long *)(local_50 + 4) + (ulong)(iVar1 - 1U) * 0x10);
plVar4[1] = 3;
local_50[1] = local_50[1] + 3;
*plVar4 = (long)&local_63;
local_63 = (byte)local_34 | 0x40;
local_62 = local_42;
cVar3 = translog_write_parts_on_page(&DAT_00d85198,&DAT_00d851a0,local_50[1],local_50);
*(long *)(DAT_00d851c8 + 0x100000) = *local_30;
}
}
translog_unlock();
if (local_60 != 0) {
if (cVar3 == '\0') {
cVar3 = translog_buffer_flush(local_60);
}
translog_buffer_unlock(local_60);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar3);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,613
|
js_get_fast_array_element
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL js_get_fast_array_element(JSContext *ctx, JSObject *p,
uint32_t idx, JSValue *pval)
{
switch(p->class_id) {
case JS_CLASS_ARRAY:
case JS_CLASS_ARGUMENTS:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_dup(p->u.array.u.values[idx]);
return TRUE;
case JS_CLASS_INT8_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int8_ptr[idx]);
return TRUE;
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_UINT8_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.uint8_ptr[idx]);
return TRUE;
case JS_CLASS_INT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int16_ptr[idx]);
return TRUE;
case JS_CLASS_UINT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.uint16_ptr[idx]);
return TRUE;
case JS_CLASS_INT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_int32(p->u.array.u.int32_ptr[idx]);
return TRUE;
case JS_CLASS_UINT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_uint32(p->u.array.u.uint32_ptr[idx]);
return TRUE;
case JS_CLASS_BIG_INT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = JS_NewBigInt64(ctx, p->u.array.u.int64_ptr[idx]);
return TRUE;
case JS_CLASS_BIG_UINT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = JS_NewBigUint64(ctx, p->u.array.u.uint64_ptr[idx]);
return TRUE;
case JS_CLASS_FLOAT16_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(fromfp16(p->u.array.u.fp16_ptr[idx]));
return TRUE;
case JS_CLASS_FLOAT32_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(p->u.array.u.float_ptr[idx]);
return TRUE;
case JS_CLASS_FLOAT64_ARRAY:
if (unlikely(idx >= p->u.array.count)) return FALSE;
*pval = js_float64(p->u.array.u.double_ptr[idx]);
return TRUE;
default:
return FALSE;
}
}
|
O2
|
c
|
js_get_fast_array_element:
pushq %rbx
movq %rcx, %rbx
movzwl 0x6(%rsi), %ecx
xorl %eax, %eax
addl $-0x2, %ecx
cmpl $0x1e, %ecx
ja 0x1e3a4
leaq 0x65301(%rip), %r8 # 0x83544
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rcx
movl %edx, %edx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rax
movq 0x8(%rcx,%rdx), %rdx
cmpl $-0x9, %edx
jb 0x1e30a
incl (%rax)
jmp 0x1e30a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzbl (%rax,%rcx), %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movsbq (%rax,%rcx), %rax
jmp 0x1e356
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rsi
callq 0x21d56
jmp 0x1e30a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, (%rbx)
jmp 0x1e39a
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movl (%rax,%rcx,4), %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rsi
callq 0x21dfa
movq %rax, (%rbx)
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movslq (%rax,%rcx,4), %rax
xorl %ecx, %ecx
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
testq %rax, %rax
movq %xmm0, %rsi
cmovnsq %rax, %rsi
pushq $0x7
popq %rdx
cmovnsq %rcx, %rdx
movq %rsi, (%rbx)
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movswq (%rax,%rcx,2), %rax
movl %eax, %eax
jmp 0x1e369
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzwl (%rax,%rcx,2), %eax
movq %rax, (%rbx)
xorl %edx, %edx
jmp 0x1e39d
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
cvtss2sd (%rax,%rcx,4), %xmm0
jmp 0x1e396
cmpl %edx, 0x40(%rsi)
jbe 0x1e3a4
movq 0x38(%rsi), %rax
movl %edx, %ecx
movzwl (%rax,%rcx,2), %edi
callq 0x36177
movsd %xmm0, (%rbx)
pushq $0x7
popq %rdx
movq %rdx, 0x8(%rbx)
pushq $0x1
popq %rax
popq %rbx
retq
|
js_get_fast_array_element:
push rbx
mov rbx, rcx
movzx ecx, word ptr [rsi+6]
xor eax, eax
add ecx, 0FFFFFFFEh; switch 31 cases
cmp ecx, 1Eh
ja def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
lea r8, jpt_1E24A
movsxd rcx, ds:(jpt_1E24A - 83544h)[r8+rcx*4]
add rcx, r8
jmp rcx; switch jump
loc_1E24C:
cmp [rsi+40h], edx; jumptable 000000000001E24A cases 2,8
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rcx, [rsi+38h]
mov edx, edx
shl rdx, 4
mov rax, [rcx+rdx]
mov rdx, [rcx+rdx+8]
cmp edx, 0FFFFFFF7h
jb loc_1E30A
inc dword ptr [rax]
jmp loc_1E30A
loc_1E278:
cmp [rsi+40h], edx; jumptable 000000000001E24A cases 21,23
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx eax, byte ptr [rax+rcx]
jmp loc_1E369
loc_1E290:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 22
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsx rax, byte ptr [rax+rcx]
jmp loc_1E356
loc_1E2A9:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 28
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rsi, [rax+rcx*8]
call JS_NewBigInt64
jmp short loc_1E30A
loc_1E2C3:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 32
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rax, [rax+rcx*8]
mov [rbx], rax
jmp loc_1E39A
loc_1E2DE:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 26
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov eax, [rax+rcx*4]
jmp short loc_1E369
loc_1E2F2:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 29
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
mov rsi, [rax+rcx*8]
call JS_NewBigUint64
loc_1E30A:
mov [rbx], rax
jmp loc_1E39D
loc_1E312:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 27
jbe def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsxd rax, dword ptr [rax+rcx*4]
xor ecx, ecx
mov edx, eax
cvtsi2sd xmm0, rdx
test rax, rax
movq rsi, xmm0
cmovns rsi, rax
push 7
pop rdx
cmovns rdx, rcx
mov [rbx], rsi
jmp short loc_1E39D
loc_1E346:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 24
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movsx rax, word ptr [rax+rcx*2]
loc_1E356:
mov eax, eax
jmp short loc_1E369
loc_1E35A:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 25
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx eax, word ptr [rax+rcx*2]
loc_1E369:
mov [rbx], rax
xor edx, edx
jmp short loc_1E39D
loc_1E370:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 31
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
cvtss2sd xmm0, dword ptr [rax+rcx*4]
jmp short loc_1E396
loc_1E382:
cmp [rsi+40h], edx; jumptable 000000000001E24A case 30
jbe short def_1E24A; jumptable 000000000001E24A default case, cases 3-7,9-20
mov rax, [rsi+38h]
mov ecx, edx
movzx edi, word ptr [rax+rcx*2]
call fromfp16
loc_1E396:
movsd qword ptr [rbx], xmm0
loc_1E39A:
push 7
pop rdx
loc_1E39D:
mov [rbx+8], rdx
push 1
pop rax
def_1E24A:
pop rbx; jumptable 000000000001E24A default case, cases 3-7,9-20
retn
|
long long js_get_fast_array_element(long long a1, long long a2, unsigned int a3, double *a4)
{
long long result; // rax
long long v6; // rcx
long long v7; // rdx
_DWORD *v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rax
double v12; // rsi
double v13; // xmm0_8
result = 0LL;
switch ( *(_WORD *)(a2 + 6) )
{
case 2:
case 8:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v6 = *(_QWORD *)(a2 + 56);
v7 = 16LL * a3;
v8 = *(_DWORD **)(v6 + v7);
v9 = *(_QWORD *)(v6 + v7 + 8);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v8;
goto LABEL_17;
}
break;
case 0x15:
case 0x17:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 56) + a3);
goto LABEL_29;
}
break;
case 0x16:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
LODWORD(v10) = *(char *)(*(_QWORD *)(a2 + 56) + a3);
goto LABEL_26;
}
break;
case 0x18:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
LODWORD(v10) = *(__int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3);
LABEL_26:
v10 = (unsigned int)v10;
goto LABEL_29;
}
break;
case 0x19:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned __int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3);
goto LABEL_29;
}
break;
case 0x1A:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v10 = *(unsigned int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
LABEL_29:
*(_QWORD *)a4 = v10;
v9 = 0LL;
goto LABEL_36;
}
break;
case 0x1B:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v11 = *(int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
v12 = (double)*(int *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
if ( v11 >= 0 )
v12 = *(double *)&v11;
v9 = 7LL;
if ( v11 >= 0 )
v9 = 0LL;
*a4 = v12;
goto LABEL_36;
}
break;
case 0x1C:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v8 = (_DWORD *)JS_NewBigInt64(a1, *(_QWORD *)(*(_QWORD *)(a2 + 56) + 8LL * a3));
goto LABEL_17;
}
break;
case 0x1D:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v8 = (_DWORD *)JS_NewBigUint64(a1, *(_QWORD *)(*(_QWORD *)(a2 + 56) + 8LL * a3));
LABEL_17:
*(_QWORD *)a4 = v8;
goto LABEL_36;
}
break;
case 0x1E:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v13 = fromfp16(*(unsigned __int16 *)(*(_QWORD *)(a2 + 56) + 2LL * a3));
goto LABEL_34;
}
break;
case 0x1F:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
v13 = *(float *)(*(_QWORD *)(a2 + 56) + 4LL * a3);
LABEL_34:
*a4 = v13;
goto LABEL_35;
}
break;
case 0x20:
if ( *(_DWORD *)(a2 + 64) > a3 )
{
*a4 = *(double *)(*(_QWORD *)(a2 + 56) + 8LL * a3);
LABEL_35:
v9 = 7LL;
LABEL_36:
*((_QWORD *)a4 + 1) = v9;
result = 1LL;
}
break;
default:
return result;
}
return result;
}
|
js_get_fast_array_element:
PUSH RBX
MOV RBX,RCX
MOVZX ECX,word ptr [RSI + 0x6]
XOR EAX,EAX
ADD ECX,-0x2
CMP ECX,0x1e
JA 0x0011e3a4
LEA R8,[0x183544]
MOVSXD RCX,dword ptr [R8 + RCX*0x4]
ADD RCX,R8
switchD:
JMP RCX
caseD_2:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RCX,qword ptr [RSI + 0x38]
MOV EDX,EDX
SHL RDX,0x4
MOV RAX,qword ptr [RCX + RDX*0x1]
MOV RDX,qword ptr [RCX + RDX*0x1 + 0x8]
CMP EDX,-0x9
JC 0x0011e30a
INC dword ptr [RAX]
JMP 0x0011e30a
caseD_15:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x0011e369
caseD_16:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSX RAX,byte ptr [RAX + RCX*0x1]
JMP 0x0011e356
caseD_1c:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x00121d56
JMP 0x0011e30a
caseD_20:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBX],RAX
JMP 0x0011e39a
caseD_1a:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x0011e369
caseD_1d:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x00121dfa
LAB_0011e30a:
MOV qword ptr [RBX],RAX
JMP 0x0011e39d
caseD_1b:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSXD RAX,dword ptr [RAX + RCX*0x4]
XOR ECX,ECX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
TEST RAX,RAX
MOVQ RSI,XMM0
CMOVNS RSI,RAX
PUSH 0x7
POP RDX
CMOVNS RDX,RCX
MOV qword ptr [RBX],RSI
JMP 0x0011e39d
caseD_18:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVSX RAX,word ptr [RAX + RCX*0x2]
LAB_0011e356:
MOV EAX,EAX
JMP 0x0011e369
caseD_19:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EAX,word ptr [RAX + RCX*0x2]
LAB_0011e369:
MOV qword ptr [RBX],RAX
XOR EDX,EDX
JMP 0x0011e39d
caseD_1f:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
CVTSS2SD XMM0,dword ptr [RAX + RCX*0x4]
JMP 0x0011e396
caseD_1e:
CMP dword ptr [RSI + 0x40],EDX
JBE 0x0011e3a4
MOV RAX,qword ptr [RSI + 0x38]
MOV ECX,EDX
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x00136177
LAB_0011e396:
MOVSD qword ptr [RBX],XMM0
LAB_0011e39a:
PUSH 0x7
POP RDX
LAB_0011e39d:
MOV qword ptr [RBX + 0x8],RDX
PUSH 0x1
POP RAX
caseD_3:
POP RBX
RET
|
int8 js_get_fast_array_element(int8 param_1,long param_2,uint param_3,double *param_4)
{
int *piVar1;
int1 auVar2 [16];
uint uVar3;
int8 uVar4;
double dVar5;
double dVar6;
double dVar7;
int1 auVar8 [16];
uVar4 = 0;
switch(*(int2 *)(param_2 + 6)) {
case 2:
case 8:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
piVar1 = *(int **)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 0x10);
uVar4 = *(int8 *)(*(long *)(param_2 + 0x38) + 8 + (ulong)param_3 * 0x10);
auVar2._8_8_ = uVar4;
auVar2._0_8_ = piVar1;
auVar8._8_8_ = uVar4;
auVar8._0_8_ = piVar1;
if (0xfffffff6 < (uint)uVar4) {
*piVar1 = *piVar1 + 1;
auVar8 = auVar2;
}
goto LAB_0011e30a;
default:
goto switchD_0011e24a_caseD_3;
case 0x15:
case 0x17:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(byte *)(*(long *)(param_2 + 0x38) + (ulong)param_3);
break;
case 0x16:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = (uint)*(char *)(*(long *)(param_2 + 0x38) + (ulong)param_3);
goto LAB_0011e356;
case 0x18:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = (uint)*(short *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2);
LAB_0011e356:
dVar7 = (double)(ulong)uVar3;
break;
case 0x19:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(ushort *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2);
break;
case 0x1a:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)(ulong)*(uint *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
break;
case 0x1b:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
uVar3 = *(uint *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
dVar5 = (double)(long)(int)uVar3;
dVar6 = (double)uVar3;
if (-1 < (long)dVar5) {
dVar6 = dVar5;
}
dVar7 = 3.45845952088873e-323;
if (-1 < (long)dVar5) {
dVar7 = 0.0;
}
*param_4 = dVar6;
goto LAB_0011e39d;
case 0x1c:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
auVar8 = JS_NewBigInt64(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8))
;
goto LAB_0011e30a;
case 0x1d:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
auVar8 = JS_NewBigUint64(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8)
);
LAB_0011e30a:
dVar7 = auVar8._8_8_;
*param_4 = auVar8._0_8_;
goto LAB_0011e39d;
case 0x1e:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)fromfp16(*(int2 *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 2));
goto LAB_0011e396;
case 0x1f:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
dVar7 = (double)*(float *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 4);
LAB_0011e396:
*param_4 = dVar7;
LAB_0011e39a:
dVar7 = 3.45845952088873e-323;
goto LAB_0011e39d;
case 0x20:
if (*(uint *)(param_2 + 0x40) <= param_3) {
return 0;
}
*param_4 = *(double *)(*(long *)(param_2 + 0x38) + (ulong)param_3 * 8);
goto LAB_0011e39a;
}
*param_4 = dVar7;
dVar7 = 0.0;
LAB_0011e39d:
param_4[1] = dVar7;
uVar4 = 1;
switchD_0011e24a_caseD_3:
return uVar4;
}
|
|
12,614
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment()
|
monkey531[P]llama/common/json.hpp
|
bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x404b6
cmpl $0x2f, %eax
je 0x3fc7e
cmpl $0x2a, %eax
jne 0x3fc9b
movq %rbx, %rdi
callq 0x404b6
cmpl $0x2a, %eax
je 0x3fc67
incl %eax
cmpl $0x2, %eax
jae 0x3fc51
jmp 0x3fca4
movq %rbx, %rdi
callq 0x404b6
cmpl $0x2f, %eax
je 0x3fc97
movq %rbx, %rdi
callq 0x4052c
jmp 0x3fc51
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x404b6
incl %eax
cmpl $0xf, %eax
jae 0x3fc83
btl %eax, %ebp
jae 0x3fc83
movb $0x1, %al
jmp 0x3fcb1
leaq 0x7193e(%rip), %rax # 0xb15e0
jmp 0x3fcab
leaq 0x7190f(%rip), %rax # 0xb15ba
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_3FC7E
cmp eax, 2Ah ; '*'
jnz short loc_3FC9B
loc_3FC51:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Ah ; '*'
jz short loc_3FC67
inc eax
cmp eax, 2
jnb short loc_3FC51
jmp short loc_3FCA4
loc_3FC67:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_3FC97
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_3FC51
loc_3FC7E:
mov ebp, 4803h
loc_3FC83:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_3FC83
bt ebp, eax
jnb short loc_3FC83
loc_3FC97:
mov al, 1
jmp short loc_3FCB1
loc_3FC9B:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_3FCAB
loc_3FCA4:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_3FCAB:
mov [rbx+70h], rax
xor eax, eax
loc_3FCB1:
add rsp, 8
pop rbx
pop rbp
retn
|
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
long long a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
do
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v2 != 42 )
break;
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
while ( (unsigned int)(v2 + 1) >= 2 );
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
*(_QWORD *)(a1 + 112) = v6;
return 0;
}
}
|
scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001404b6
CMP EAX,0x2f
JZ 0x0013fc7e
CMP EAX,0x2a
JNZ 0x0013fc9b
LAB_0013fc51:
MOV RDI,RBX
CALL 0x001404b6
CMP EAX,0x2a
JZ 0x0013fc67
INC EAX
CMP EAX,0x2
JNC 0x0013fc51
JMP 0x0013fca4
LAB_0013fc67:
MOV RDI,RBX
CALL 0x001404b6
CMP EAX,0x2f
JZ 0x0013fc97
MOV RDI,RBX
CALL 0x0014052c
JMP 0x0013fc51
LAB_0013fc7e:
MOV EBP,0x4803
LAB_0013fc83:
MOV RDI,RBX
CALL 0x001404b6
INC EAX
CMP EAX,0xf
JNC 0x0013fc83
BT EBP,EAX
JNC 0x0013fc83
LAB_0013fc97:
MOV AL,0x1
JMP 0x0013fcb1
LAB_0013fc9b:
LEA RAX,[0x1b15e0]
JMP 0x0013fcab
LAB_0013fca4:
LEA RAX,[0x1b15ba]
LAB_0013fcab:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_0013fcb1:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_0013fc97:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
do {
while (iVar1 = get(this), iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_0013fc97;
unget(this);
}
} while (1 < iVar1 + 1U);
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
|
|
12,615
|
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<unsigned long>(char const*, int, google::protobuf::RepeatedField<unsigned long>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
|
const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size,
RepeatedField<T>* out) {
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
int nbytes = buffer_end_ + kSlopBytes - ptr;
while (size > nbytes) {
int num = nbytes / sizeof(T);
int old_entries = out->size();
out->Reserve(old_entries + num);
int block_size = num * sizeof(T);
auto dst = out->AddNAlreadyReserved(num);
#ifdef PROTOBUF_LITTLE_ENDIAN
std::memcpy(dst, ptr, block_size);
#else
for (int i = 0; i < num; i++)
dst[i] = UnalignedLoad<T>(ptr + i * sizeof(T));
#endif
size -= block_size;
if (limit_ <= kSlopBytes) return nullptr;
ptr = Next();
if (ptr == nullptr) return nullptr;
ptr += kSlopBytes - (nbytes - block_size);
nbytes = buffer_end_ + kSlopBytes - ptr;
}
int num = size / sizeof(T);
int old_entries = out->size();
out->Reserve(old_entries + num);
int block_size = num * sizeof(T);
auto dst = out->AddNAlreadyReserved(num);
#ifdef PROTOBUF_LITTLE_ENDIAN
std::memcpy(dst, ptr, block_size);
#else
for (int i = 0; i < num; i++) dst[i] = UnalignedLoad<T>(ptr + i * sizeof(T));
#endif
ptr += block_size;
if (size != block_size) return nullptr;
return ptr;
}
|
O0
|
c
|
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<unsigned long>(char const*, int, google::protobuf::RepeatedField<unsigned long>*):
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movl %edx, 0x4c(%rsp)
movq %rcx, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x1b91e7
movq $0x0, 0x60(%rsp)
jmp 0x1b938c
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x10, %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x3c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jle 0x1b92f8
movslq 0x3c(%rsp), %rax
shrq $0x3, %rax
movl %eax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x1c2390
movl %eax, 0x34(%rsp)
movq 0x40(%rsp), %rdi
movl 0x34(%rsp), %esi
addl 0x38(%rsp), %esi
callq 0x1c1de0
movslq 0x38(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movl 0x38(%rsp), %esi
callq 0x1c23a0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x50(%rsp), %rsi
movslq 0x30(%rsp), %rdx
callq 0x13390
movq 0x8(%rsp), %rax
movl 0x30(%rsp), %edx
movl 0x4c(%rsp), %ecx
subl %edx, %ecx
movl %ecx, 0x4c(%rsp)
cmpl $0x10, 0x1c(%rax)
jg 0x1b9296
movq $0x0, 0x60(%rsp)
jmp 0x1b938c
movq 0x8(%rsp), %rdi
callq 0x1b2f90
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x1b92bb
movq $0x0, 0x60(%rsp)
jmp 0x1b938c
movq 0x8(%rsp), %rax
movl 0x3c(%rsp), %ecx
subl 0x30(%rsp), %ecx
movl $0x10, %edx
subl %ecx, %edx
movq 0x50(%rsp), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x50(%rsp)
movq 0x8(%rax), %rax
addq $0x10, %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x3c(%rsp)
jmp 0x1b9200
movslq 0x4c(%rsp), %rax
shrq $0x3, %rax
movl %eax, 0x24(%rsp)
movq 0x40(%rsp), %rdi
callq 0x1c2390
movl %eax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movl 0x20(%rsp), %esi
addl 0x24(%rsp), %esi
callq 0x1c1de0
movslq 0x24(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1c23a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
movslq 0x1c(%rsp), %rdx
callq 0x13390
movl 0x1c(%rsp), %ecx
movq 0x50(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x1c(%rsp), %eax
je 0x1b9382
movq $0x0, 0x60(%rsp)
jmp 0x1b938c
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf8internal18EpsCopyInputStream15ReadPackedFixedIlEEPKcS5_iPNS0_13RepeatedFieldIT_EE:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_1C], edx
mov [rsp+68h+var_28], rcx
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_60], rax
cmp [rsp+68h+var_18], 0
jnz short loc_1B91E7
mov [rsp+68h+var_8], 0
jmp loc_1B938C
loc_1B91E7:
mov rax, [rsp+68h+var_60]
mov rax, [rax+8]
add rax, 10h
mov rcx, [rsp+68h+var_18]
sub rax, rcx
mov [rsp+68h+var_2C], eax
loc_1B9200:
mov eax, [rsp+68h+var_1C]
cmp eax, [rsp+68h+var_2C]
jle loc_1B92F8
movsxd rax, [rsp+68h+var_2C]
shr rax, 3
mov [rsp+68h+var_30], eax
mov rdi, [rsp+68h+var_28]
call _ZNK6google8protobuf13RepeatedFieldIlE4sizeEv; google::protobuf::RepeatedField<long>::size(void)
mov [rsp+68h+var_34], eax
mov rdi, [rsp+68h+var_28]
mov esi, [rsp+68h+var_34]
add esi, [rsp+68h+var_30]
call _ZN6google8protobuf13RepeatedFieldIlE7ReserveEi; google::protobuf::RepeatedField<long>::Reserve(int)
movsxd rax, [rsp+68h+var_30]
shl rax, 3
mov [rsp+68h+var_38], eax
mov rdi, [rsp+68h+var_28]
mov esi, [rsp+68h+var_30]
call _ZN6google8protobuf13RepeatedFieldIlE19AddNAlreadyReservedEi; google::protobuf::RepeatedField<long>::AddNAlreadyReserved(int)
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_40]
mov rsi, [rsp+68h+var_18]
movsxd rdx, [rsp+68h+var_38]
call _memcpy
mov rax, [rsp+68h+var_60]
mov edx, [rsp+68h+var_38]
mov ecx, [rsp+68h+var_1C]
sub ecx, edx
mov [rsp+68h+var_1C], ecx
cmp dword ptr [rax+1Ch], 10h
jg short loc_1B9296
mov [rsp+68h+var_8], 0
jmp loc_1B938C
loc_1B9296:
mov rdi, [rsp+68h+var_60]; this
call _ZN6google8protobuf8internal18EpsCopyInputStream4NextEv; google::protobuf::internal::EpsCopyInputStream::Next(void)
mov [rsp+68h+var_18], rax
cmp [rsp+68h+var_18], 0
jnz short loc_1B92BB
mov [rsp+68h+var_8], 0
jmp loc_1B938C
loc_1B92BB:
mov rax, [rsp+68h+var_60]
mov ecx, [rsp+68h+var_2C]
sub ecx, [rsp+68h+var_38]
mov edx, 10h
sub edx, ecx
mov rcx, [rsp+68h+var_18]
movsxd rdx, edx
add rcx, rdx
mov [rsp+68h+var_18], rcx
mov rax, [rax+8]
add rax, 10h
mov rcx, [rsp+68h+var_18]
sub rax, rcx
mov [rsp+68h+var_2C], eax
jmp loc_1B9200
loc_1B92F8:
movsxd rax, [rsp+68h+var_1C]
shr rax, 3
mov [rsp+68h+var_44], eax
mov rdi, [rsp+68h+var_28]
call _ZNK6google8protobuf13RepeatedFieldIlE4sizeEv; google::protobuf::RepeatedField<long>::size(void)
mov [rsp+68h+var_48], eax
mov rdi, [rsp+68h+var_28]
mov esi, [rsp+68h+var_48]
add esi, [rsp+68h+var_44]
call _ZN6google8protobuf13RepeatedFieldIlE7ReserveEi; google::protobuf::RepeatedField<long>::Reserve(int)
movsxd rax, [rsp+68h+var_44]
shl rax, 3
mov [rsp+68h+var_4C], eax
mov rdi, [rsp+68h+var_28]
mov esi, [rsp+68h+var_44]
call _ZN6google8protobuf13RepeatedFieldIlE19AddNAlreadyReservedEi; google::protobuf::RepeatedField<long>::AddNAlreadyReserved(int)
mov [rsp+68h+var_58], rax
mov rdi, [rsp+68h+var_58]
mov rsi, [rsp+68h+var_18]
movsxd rdx, [rsp+68h+var_4C]
call _memcpy
mov ecx, [rsp+68h+var_4C]
mov rax, [rsp+68h+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rsp+68h+var_18], rax
mov eax, [rsp+68h+var_1C]
cmp eax, [rsp+68h+var_4C]
jz short loc_1B9382
mov [rsp+68h+var_8], 0
jmp short loc_1B938C
loc_1B9382:
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_8], rax
loc_1B938C:
mov rax, [rsp+68h+var_8]
add rsp, 68h
retn
| ||||
12,616
|
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<unsigned long>(char const*, int, google::protobuf::RepeatedField<unsigned long>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
|
const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size,
RepeatedField<T>* out) {
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
int nbytes = buffer_end_ + kSlopBytes - ptr;
while (size > nbytes) {
int num = nbytes / sizeof(T);
int old_entries = out->size();
out->Reserve(old_entries + num);
int block_size = num * sizeof(T);
auto dst = out->AddNAlreadyReserved(num);
#ifdef PROTOBUF_LITTLE_ENDIAN
std::memcpy(dst, ptr, block_size);
#else
for (int i = 0; i < num; i++)
dst[i] = UnalignedLoad<T>(ptr + i * sizeof(T));
#endif
size -= block_size;
if (limit_ <= kSlopBytes) return nullptr;
ptr = Next();
if (ptr == nullptr) return nullptr;
ptr += kSlopBytes - (nbytes - block_size);
nbytes = buffer_end_ + kSlopBytes - ptr;
}
int num = size / sizeof(T);
int old_entries = out->size();
out->Reserve(old_entries + num);
int block_size = num * sizeof(T);
auto dst = out->AddNAlreadyReserved(num);
#ifdef PROTOBUF_LITTLE_ENDIAN
std::memcpy(dst, ptr, block_size);
#else
for (int i = 0; i < num; i++) dst[i] = UnalignedLoad<T>(ptr + i * sizeof(T));
#endif
ptr += block_size;
if (size != block_size) return nullptr;
return ptr;
}
|
O3
|
c
|
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<unsigned long>(char const*, int, google::protobuf::RepeatedField<unsigned long>*):
testq %rsi, %rsi
je 0xa0a62
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r13
movq 0x8(%rdi), %rbp
subq %rsi, %rbp
addq $0x10, %rbp
cmpl %edx, %ebp
jge 0xa0a1f
movq %rbp, %r12
movq %r13, (%rsp)
movl %ebp, %r13d
sarl $0x3, %r13d
movl (%r15), %esi
addl %r13d, %esi
movq %r15, %rdi
callq 0xa5098
andl $-0x8, %ebp
movslq (%r15), %rdi
addl %edi, %r13d
shlq $0x3, %rdi
addq 0x8(%r15), %rdi
movl %r13d, (%r15)
movq (%rsp), %r13
movslq %ebp, %rdx
movq %r14, %rsi
callq 0xf2f0
cmpl $0x11, 0x1c(%r13)
jl 0xa0a65
movq %r13, %rdi
callq 0x9ed98
testq %rax, %rax
je 0xa0a65
movq %rax, %r14
subl %ebp, %ebx
andl $0x7, %r12d
subq %r12, %r14
addq $0x10, %r14
movq 0x8(%r13), %rbp
subq %r14, %rbp
addq $0x10, %rbp
movq %rbp, %r12
cmpl %ebp, %ebx
jg 0xa09b1
movl %ebx, %ebp
sarl $0x3, %ebp
movl (%r15), %esi
addl %ebp, %esi
movq %r15, %rdi
callq 0xa5098
movl %ebx, %eax
andl $-0x8, %eax
movslq (%r15), %rdi
addl %edi, %ebp
shlq $0x3, %rdi
addq 0x8(%r15), %rdi
movl %ebp, (%r15)
movslq %eax, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0xf2f0
addq %r15, %r14
xorl %eax, %eax
cmpl %r15d, %ebx
cmoveq %r14, %rax
jmp 0xa0a67
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN6google8protobuf8internal18EpsCopyInputStream15ReadPackedFixedIdEEPKcS5_iPNS0_13RepeatedFieldIT_EE:
test rsi, rsi
jz loc_A0A62
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rcx
mov ebx, edx
mov r14, rsi
mov r13, rdi
mov rbp, [rdi+8]
sub rbp, rsi
add rbp, 10h
cmp ebp, edx
jge short loc_A0A1F
mov r12, rbp
mov [rsp+38h+var_38], r13
loc_A09B1:
mov r13d, ebp
sar r13d, 3
mov esi, [r15]
add esi, r13d
mov rdi, r15
call _ZN6google8protobuf13RepeatedFieldIdE7ReserveEi; google::protobuf::RepeatedField<double>::Reserve(int)
and ebp, 0FFFFFFF8h
movsxd rdi, dword ptr [r15]
add r13d, edi
shl rdi, 3
add rdi, [r15+8]
mov [r15], r13d
mov r13, [rsp+38h+var_38]
movsxd rdx, ebp
mov rsi, r14
call _memcpy
cmp dword ptr [r13+1Ch], 11h
jl short loc_A0A65
mov rdi, r13; this
call _ZN6google8protobuf8internal18EpsCopyInputStream4NextEv; google::protobuf::internal::EpsCopyInputStream::Next(void)
test rax, rax
jz short loc_A0A65
mov r14, rax
sub ebx, ebp
and r12d, 7
sub r14, r12
add r14, 10h
mov rbp, [r13+8]
sub rbp, r14
add rbp, 10h
mov r12, rbp
cmp ebx, ebp
jg short loc_A09B1
loc_A0A1F:
mov ebp, ebx
sar ebp, 3
mov esi, [r15]
add esi, ebp
mov rdi, r15
call _ZN6google8protobuf13RepeatedFieldIdE7ReserveEi; google::protobuf::RepeatedField<double>::Reserve(int)
mov eax, ebx
and eax, 0FFFFFFF8h
movsxd rdi, dword ptr [r15]
add ebp, edi
shl rdi, 3
add rdi, [r15+8]
mov [r15], ebp
movsxd r15, eax
mov rsi, r14
mov rdx, r15
call _memcpy
add r14, r15
xor eax, eax
cmp ebx, r15d
cmovz rax, r14
jmp short loc_A0A67
loc_A0A62:
xor eax, eax
retn
loc_A0A65:
xor eax, eax
loc_A0A67:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<double>(
long long a1,
long long a2,
int a3,
int *a4)
{
int v5; // ebx
long long v6; // r14
long long v7; // rbp
long long v8; // r12
int v9; // r13d
int v10; // ebp
long long v11; // rdi
int v12; // r13d
long long v13; // rdi
google::protobuf::internal::EpsCopyInputStream *v14; // rax
long long v15; // rdi
int v16; // ebp
long long v17; // rdi
long long v18; // r15
long long v19; // r14
long long result; // rax
if ( !a2 )
return 0LL;
v5 = a3;
v6 = a2;
v7 = *(_QWORD *)(a1 + 8) - a2 + 16;
if ( (int)v7 >= a3 )
{
LABEL_7:
google::protobuf::RepeatedField<double>::Reserve(a4, (unsigned int)((v5 >> 3) + *a4));
v15 = *a4;
v16 = v15 + (v5 >> 3);
v17 = *((_QWORD *)a4 + 1) + 8 * v15;
*a4 = v16;
v18 = (int)(v5 & 0xFFFFFFF8);
memcpy(v17);
v19 = v18 + v6;
result = 0LL;
if ( v5 == (_DWORD)v18 )
return v19;
}
else
{
v8 = *(_QWORD *)(a1 + 8) - a2 + 16;
while ( 1 )
{
v9 = (int)v7 >> 3;
google::protobuf::RepeatedField<double>::Reserve(a4, (unsigned int)(((int)v7 >> 3) + *a4));
v10 = v7 & 0xFFFFFFF8;
v11 = *a4;
v12 = v11 + v9;
v13 = *((_QWORD *)a4 + 1) + 8 * v11;
*a4 = v12;
memcpy(v13);
if ( *(int *)(a1 + 28) < 17 )
return 0LL;
v14 = google::protobuf::internal::EpsCopyInputStream::Next((google::protobuf::internal::EpsCopyInputStream *)a1);
if ( !v14 )
return 0LL;
v5 -= v10;
v6 = (long long)v14 - (v8 & 7) + 16;
v7 = *(_QWORD *)(a1 + 8) - ((_QWORD)v14 - (v8 & 7));
LOBYTE(v8) = *(_BYTE *)(a1 + 8) - ((_BYTE)v14 - (v8 & 7));
if ( v5 <= (int)v7 )
goto LABEL_7;
}
}
return result;
}
|
ReadPackedFixed<double>:
TEST RSI,RSI
JZ 0x001a0a62
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RCX
MOV EBX,EDX
MOV R14,RSI
MOV R13,RDI
MOV RBP,qword ptr [RDI + 0x8]
SUB RBP,RSI
ADD RBP,0x10
CMP EBP,EDX
JGE 0x001a0a1f
MOV R12,RBP
MOV qword ptr [RSP],R13
LAB_001a09b1:
MOV R13D,EBP
SAR R13D,0x3
MOV ESI,dword ptr [R15]
ADD ESI,R13D
MOV RDI,R15
CALL 0x001a5098
AND EBP,0xfffffff8
MOVSXD RDI,dword ptr [R15]
ADD R13D,EDI
SHL RDI,0x3
ADD RDI,qword ptr [R15 + 0x8]
MOV dword ptr [R15],R13D
MOV R13,qword ptr [RSP]
MOVSXD RDX,EBP
MOV RSI,R14
CALL 0x0010f2f0
CMP dword ptr [R13 + 0x1c],0x11
JL 0x001a0a65
MOV RDI,R13
CALL 0x0019ed98
TEST RAX,RAX
JZ 0x001a0a65
MOV R14,RAX
SUB EBX,EBP
AND R12D,0x7
SUB R14,R12
ADD R14,0x10
MOV RBP,qword ptr [R13 + 0x8]
SUB RBP,R14
ADD RBP,0x10
MOV R12,RBP
CMP EBX,EBP
JG 0x001a09b1
LAB_001a0a1f:
MOV EBP,EBX
SAR EBP,0x3
MOV ESI,dword ptr [R15]
ADD ESI,EBP
MOV RDI,R15
CALL 0x001a5098
MOV EAX,EBX
AND EAX,0xfffffff8
MOVSXD RDI,dword ptr [R15]
ADD EBP,EDI
SHL RDI,0x3
ADD RDI,qword ptr [R15 + 0x8]
MOV dword ptr [R15],EBP
MOVSXD R15,EAX
MOV RSI,R14
MOV RDX,R15
CALL 0x0010f2f0
ADD R14,R15
XOR EAX,EAX
CMP EBX,R15D
CMOVZ RAX,R14
JMP 0x001a0a67
LAB_001a0a62:
XOR EAX,EAX
RET
LAB_001a0a65:
XOR EAX,EAX
LAB_001a0a67:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<double>(char const*,
int, google::protobuf::RepeatedField<double>*) */
char * __thiscall
google::protobuf::internal::EpsCopyInputStream::ReadPackedFixed<double>
(EpsCopyInputStream *this,char *param_1,int param_2,RepeatedField *param_3)
{
int iVar1;
uint uVar2;
char *pcVar3;
long lVar4;
if (param_1 == (char *)0x0) {
return (char *)0x0;
}
lVar4 = (*(long *)(this + 8) - (long)param_1) + 0x10;
if ((int)lVar4 < param_2) {
do {
uVar2 = (uint)lVar4;
RepeatedField<double>::Reserve
((RepeatedField<double> *)param_3,*(int *)param_3 + ((int)uVar2 >> 3));
iVar1 = *(int *)param_3;
*(int *)param_3 = ((int)uVar2 >> 3) + iVar1;
memcpy((void *)((long)iVar1 * 8 + *(long *)(param_3 + 8)),param_1,
(long)(int)(uVar2 & 0xfffffff8));
if ((*(int *)(this + 0x1c) < 0x11) || (lVar4 = Next(this), lVar4 == 0)) {
return (char *)0x0;
}
param_2 = param_2 - (uVar2 & 0xfffffff8);
param_1 = (char *)((lVar4 - (ulong)(uVar2 & 7)) + 0x10);
lVar4 = (*(long *)(this + 8) - (long)param_1) + 0x10;
} while ((int)lVar4 < param_2);
}
RepeatedField<double>::Reserve((RepeatedField<double> *)param_3,*(int *)param_3 + (param_2 >> 3));
uVar2 = param_2 & 0xfffffff8;
iVar1 = *(int *)param_3;
*(int *)param_3 = (param_2 >> 3) + iVar1;
memcpy((void *)((long)iVar1 * 8 + *(long *)(param_3 + 8)),param_1,(long)(int)uVar2);
pcVar3 = (char *)0x0;
if (param_2 == uVar2) {
pcVar3 = param_1 + (int)uVar2;
}
return pcVar3;
}
|
|
12,617
|
translog_write_variable_record_1chunk
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_write_variable_record_1chunk(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
struct st_translog_buffer
*buffer_to_flush, uint16 header_length,
TRN *trn, void *hook_arg)
{
int rc;
uchar chunk0_header[1 + 2 + 5 + 2];
DBUG_ENTER("translog_write_variable_record_1chunk");
translog_lock_assert_owner();
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
translog_write_variable_record_1group_header(parts, type, short_trid,
header_length, chunk0_header);
set_lsn(lsn, log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
{
translog_unlock();
rc= 1;
goto err;
}
rc= translog_write_parts_on_page(&log_descriptor.horizon,
&log_descriptor.bc,
parts->total_record_length, parts);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
translog_unlock();
/*
check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
err:
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(rc);
}
|
O0
|
c
|
translog_write_variable_record_1chunk:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %cx, %ax
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rcx
movw 0x10(%rbp), %cx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x94154
jmp 0x94154
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
movw -0x32(%rbp), %cx
movw 0x10(%rbp), %ax
leaq -0x12(%rbp), %r8
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0x955b0
movq -0x20(%rbp), %rdi
movq 0xbf4eeb(%rip), %rsi # 0xc89068
callq 0x95680
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x956b0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x94203
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x3f305f(%rip), %rax # 0x487220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x94211
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x3f3045(%rip), %rax # 0x487220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %edi
movq 0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x94211
callq 0x8a470
movl $0x1, -0x4c(%rbp)
jmp 0x9425b
movq -0x40(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x40(%rbp), %rcx
leaq 0x3f41fd(%rip), %rsi # 0x488420
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
callq 0x95850
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0xbf4e4b(%rip), %rax # 0xc89098
movq %rcx, 0x100000(%rax)
jmp 0x94256
callq 0x8a470
cmpq $0x0, -0x48(%rbp)
je 0x94280
cmpl $0x0, -0x4c(%rbp)
jne 0x94277
movq -0x48(%rbp), %rdi
callq 0x90630
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8a440
jmp 0x94282
movl -0x4c(%rbp), %eax
movb %al, -0x4d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x942a3
movb -0x4d(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
callq 0x2a250
nopl (%rax,%rax)
|
translog_write_variable_record_1chunk:
push rbp
mov rbp, rsp
sub rsp, 50h
mov ax, cx
mov rcx, [rbp+arg_10]
mov rcx, [rbp+arg_8]
mov cx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_32], ax
mov [rbp+var_40], r8
mov [rbp+var_48], r9
cmp [rbp+var_48], 0
jz short loc_94154
jmp short $+2
loc_94154:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_24]
mov cx, [rbp+var_32]
mov ax, [rbp+arg_0]
lea r8, [rbp+var_12]
movzx edx, cx
movzx ecx, ax
call translog_write_variable_record_1group_header
mov rdi, [rbp+var_20]
mov rsi, cs:qword_C89068
call set_lsn
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_20]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_94203
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_94211
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_24]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
mov r8, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_94211
loc_94203:
call translog_unlock
mov [rbp+var_4C], 1
jmp short loc_9425B
loc_94211:
mov rax, [rbp+var_40]
mov edx, [rax+4]
mov rcx, [rbp+var_40]
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
call translog_write_parts_on_page
movsx eax, al
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, cs:qword_C89098
mov [rax+100000h], rcx
jmp short $+2
loc_94256:
call translog_unlock
loc_9425B:
cmp [rbp+var_48], 0
jz short loc_94280
cmp [rbp+var_4C], 0
jnz short loc_94277
mov rdi, [rbp+var_48]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_4C], eax
loc_94277:
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_94280:
jmp short $+2
loc_94282:
mov eax, [rbp+var_4C]
mov [rbp+var_4D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_942A3
mov al, [rbp+var_4D]
add rsp, 50h
pop rbp
retn
loc_942A3:
call ___stack_chk_fail
|
char translog_write_variable_record_1chunk(
_QWORD *a1,
unsigned int a2,
long long a3,
unsigned __int16 a4,
long long a5,
long long a6,
unsigned __int16 a7,
long long a8,
long long a9)
{
int v10; // [rsp+4h] [rbp-4Ch]
_BYTE v14[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-8h]
v15 = __readfsqword(0x28u);
translog_write_variable_record_1group_header(a5, a2, a4, a7, v14);
set_lsn(a1, qword_C89068);
if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*a1), (unsigned int)HIDWORD(*a1), *a1, 1LL)
|| *(_QWORD *)&log_record_type_descriptor[18 * a2 + 4]
&& (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * a2 + 4])(
a2,
a8,
a3,
a1,
a9) )
{
translog_unlock();
v10 = 1;
}
else
{
v10 = (char)translog_write_parts_on_page(
&log_descriptor[1048969],
&log_descriptor[1048970],
*(unsigned int *)(a5 + 4),
a5);
*(_QWORD *)(qword_C89098 + 0x100000) = *a1;
translog_unlock();
}
if ( a6 )
{
if ( !v10 )
LOBYTE(v10) = translog_buffer_flush(a6);
translog_buffer_unlock(a6);
}
return v10;
}
|
translog_write_variable_record_1chunk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + 0x18]
MOV CX,word ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV word ptr [RBP + -0x32],AX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],R9
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00194154
JMP 0x00194154
LAB_00194154:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x24]
MOV CX,word ptr [RBP + -0x32]
MOV AX,word ptr [RBP + 0x10]
LEA R8,[RBP + -0x12]
MOVZX EDX,CX
MOVZX ECX,AX
CALL 0x001955b0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00d89068]
CALL 0x00195680
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x001956b0
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00194203
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x587220]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00194211
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x587220]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00194211
LAB_00194203:
CALL 0x0018a470
MOV dword ptr [RBP + -0x4c],0x1
JMP 0x0019425b
LAB_00194211:
MOV RAX,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[0x588420]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
CALL 0x00195850
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d89098]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x00194256
LAB_00194256:
CALL 0x0018a470
LAB_0019425b:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00194280
CMP dword ptr [RBP + -0x4c],0x0
JNZ 0x00194277
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00190630
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
LAB_00194277:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0018a440
LAB_00194280:
JMP 0x00194282
LAB_00194282:
MOV EAX,dword ptr [RBP + -0x4c]
MOV byte ptr [RBP + -0x4d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001942a3
MOV AL,byte ptr [RBP + -0x4d]
ADD RSP,0x50
POP RBP
RET
LAB_001942a3:
CALL 0x0012a250
|
int8
translog_write_variable_record_1chunk
(long *param_1,uint param_2,int8 param_3,int2 param_4,long param_5,
long param_6,int2 param_7,int8 param_8,int8 param_9)
{
char cVar1;
long in_FS_OFFSET;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
translog_write_variable_record_1group_header(param_5,param_2,param_4,param_7,local_1a);
set_lsn(param_1,DAT_00d89068);
cVar1 = translog_set_lsn_for_files
(*param_1 >> 0x20 & 0xffffffff,*param_1 >> 0x20 & 0xffffffff,*param_1,1);
if ((cVar1 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10) == 0 ||
(cVar1 = (**(code **)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10))
(param_2,param_8,param_3,param_1,param_9), cVar1 == '\0')))) {
cVar1 = translog_write_parts_on_page
(&DAT_00d89068,&DAT_00d89070,*(int4 *)(param_5 + 4),param_5);
*(long *)(DAT_00d89098 + 0x100000) = *param_1;
translog_unlock();
}
else {
translog_unlock();
cVar1 = '\x01';
}
if (param_6 != 0) {
if (cVar1 == '\0') {
cVar1 = translog_buffer_flush(param_6);
}
translog_buffer_unlock(param_6);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,618
|
translog_get_file_max_lsn_stored
|
eloqsql/storage/maria/ma_loghandler.c
|
LSN translog_get_file_max_lsn_stored(uint32 file)
{
uint32 limit= FILENO_IMPOSSIBLE;
DBUG_ENTER("translog_get_file_max_lsn_stored");
DBUG_PRINT("enter", ("file: %lu", (ulong)file));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
/* find file with minimum file number "in progress" */
if (log_descriptor.unfinished_files.elements > 0)
{
struct st_file_counter *fc_ptr;
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
0, struct st_file_counter *);
limit= fc_ptr->file; /* minimal file number "in progress" */
}
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
/*
if there is no "in progress file" then unfinished file is in progress
for sure
*/
if (limit == FILENO_IMPOSSIBLE)
{
TRANSLOG_ADDRESS horizon= translog_get_horizon();
limit= LSN_FILE_NO(horizon);
}
if (file >= limit)
{
DBUG_PRINT("info", ("The file in in progress"));
DBUG_RETURN(LSN_IMPOSSIBLE);
}
{
LOGHANDLER_FILE_INFO info;
File fd;
fd= open_logfile_by_number_no_cache(file);
if(fd < 0)
{
DBUG_PRINT("error", ("Can't open file"));
DBUG_RETURN(LSN_ERROR);
}
if (translog_read_file_header(&info, fd))
{
DBUG_PRINT("error", ("Can't read file header"));
info.max_lsn= LSN_ERROR;
}
if (mysql_file_close(fd, MYF(MY_WME)))
{
DBUG_PRINT("error", ("Can't close file"));
info.max_lsn= LSN_ERROR;
}
DBUG_PRINT("info", ("Max lsn: " LSN_FMT, LSN_IN_PARTS(info.max_lsn)));
DBUG_RETURN(info.max_lsn);
}
}
|
O0
|
c
|
translog_get_file_max_lsn_stored:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
jmp 0x4f5c4
jmp 0x4f5c6
jmp 0x4f5c8
leaq 0x428df1(%rip), %rdi # 0x4783c0
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0x10157b(%rip), %rsi # 0x150b58
movl $0x5b7, %edx # imm = 0x5B7
callq 0x4f6d0
cmpl $0x0, 0xc29c2a(%rip) # 0xc79218
jbe 0x4f604
movq 0xc29c19(%rip), %rax # 0xc79210
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
leaq 0x428db5(%rip), %rdi # 0x4783c0
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x4f740
cmpl $0x0, -0x10(%rbp)
jne 0x4f631
callq 0x54570
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
sarq $0x20, %rax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jb 0x4f649
jmp 0x4f63b
jmp 0x4f63d
jmp 0x4f63f
movq $0x0, -0x8(%rbp)
jmp 0x4f6be
movl -0xc(%rbp), %edi
callq 0x4f7a0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jge 0x4f66a
jmp 0x4f65c
jmp 0x4f65e
jmp 0x4f660
movq $0x1, -0x8(%rbp)
jmp 0x4f6be
movl -0x5c(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0x4f3a0
cmpb $0x0, %al
je 0x4f686
jmp 0x4f67c
jmp 0x4f67e
movq $0x1, -0x58(%rbp)
movl -0x5c(%rbp), %edx
leaq 0x1014c8(%rip), %rdi # 0x150b58
movl $0x5e4, %esi # imm = 0x5E4
movl $0x10, %ecx
callq 0x4f870
cmpl $0x0, %eax
je 0x4f6b0
jmp 0x4f6a6
jmp 0x4f6a8
movq $0x1, -0x58(%rbp)
jmp 0x4f6b2
jmp 0x4f6b4
jmp 0x4f6b6
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
translog_get_file_max_lsn_stored:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_C], edi
mov [rbp+var_10], 0
jmp short $+2
loc_4F5C4:
jmp short $+2
loc_4F5C6:
jmp short $+2
loc_4F5C8:
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5B7h
call inline_mysql_mutex_lock_8
cmp cs:dword_C79218, 0
jbe short loc_4F604
mov rax, cs:qword_C79210
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_10], eax
loc_4F604:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock_8
cmp [rbp+var_10], 0
jnz short loc_4F631
call translog_get_horizon
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
sar rax, 20h
mov [rbp+var_10], eax
loc_4F631:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jb short loc_4F649
jmp short $+2
loc_4F63B:
jmp short $+2
loc_4F63D:
jmp short $+2
loc_4F63F:
mov [rbp+var_8], 0
jmp short loc_4F6BE
loc_4F649:
mov edi, [rbp+var_C]
call open_logfile_by_number_no_cache
mov [rbp+var_5C], eax
cmp [rbp+var_5C], 0
jge short loc_4F66A
jmp short $+2
loc_4F65C:
jmp short $+2
loc_4F65E:
jmp short $+2
loc_4F660:
mov [rbp+var_8], 1
jmp short loc_4F6BE
loc_4F66A:
mov esi, [rbp+var_5C]
lea rdi, [rbp+var_58]
call translog_read_file_header
cmp al, 0
jz short loc_4F686
jmp short $+2
loc_4F67C:
jmp short $+2
loc_4F67E:
mov [rbp+var_58], 1
loc_4F686:
mov edx, [rbp+var_5C]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5E4h
mov ecx, 10h
call inline_mysql_file_close_2
cmp eax, 0
jz short loc_4F6B0
jmp short $+2
loc_4F6A6:
jmp short $+2
loc_4F6A8:
mov [rbp+var_58], 1
loc_4F6B0:
jmp short $+2
loc_4F6B2:
jmp short $+2
loc_4F6B4:
jmp short $+2
loc_4F6B6:
mov rax, [rbp+var_58]
mov [rbp+var_8], rax
loc_4F6BE:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
|
unsigned long long translog_get_file_max_lsn_stored(unsigned int a1)
{
int v2; // [rsp+4h] [rbp-5Ch]
unsigned long long v3[7]; // [rsp+8h] [rbp-58h] BYREF
long long horizon; // [rsp+40h] [rbp-20h]
long long v5; // [rsp+48h] [rbp-18h]
unsigned int v6; // [rsp+50h] [rbp-10h]
unsigned int v7; // [rsp+54h] [rbp-Ch]
v7 = a1;
v6 = 0;
inline_mysql_mutex_lock_8(
&log_descriptor + 1049025,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1463LL);
if ( dword_C79218 )
{
v5 = qword_C79210;
v6 = *(_DWORD *)qword_C79210;
}
inline_mysql_mutex_unlock_8(&log_descriptor + 1049025);
if ( !v6 )
{
horizon = translog_get_horizon();
v6 = HIDWORD(horizon);
}
if ( v7 >= v6 )
return 0LL;
v2 = open_logfile_by_number_no_cache(v7);
if ( v2 < 0 )
return 1LL;
if ( translog_read_file_header(v3, v2) )
v3[0] = 1LL;
if ( (unsigned int)inline_mysql_file_close_2(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1508LL,
(unsigned int)v2,
16LL) )
v3[0] = 1LL;
return v3[0];
}
|
translog_get_file_max_lsn_stored:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0xc],EDI
MOV dword ptr [RBP + -0x10],0x0
JMP 0x0014f5c4
LAB_0014f5c4:
JMP 0x0014f5c6
LAB_0014f5c6:
JMP 0x0014f5c8
LAB_0014f5c8:
LEA RDI,[0x5783c0]
ADD RDI,0x800e08
LEA RSI,[0x250b58]
MOV EDX,0x5b7
CALL 0x0014f6d0
CMP dword ptr [0x00d79218],0x0
JBE 0x0014f604
MOV RAX,qword ptr [0x00d79210]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
LAB_0014f604:
LEA RDI,[0x5783c0]
ADD RDI,0x800e08
CALL 0x0014f740
CMP dword ptr [RBP + -0x10],0x0
JNZ 0x0014f631
CALL 0x00154570
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
SAR RAX,0x20
MOV dword ptr [RBP + -0x10],EAX
LAB_0014f631:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JC 0x0014f649
JMP 0x0014f63b
LAB_0014f63b:
JMP 0x0014f63d
LAB_0014f63d:
JMP 0x0014f63f
LAB_0014f63f:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014f6be
LAB_0014f649:
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0014f7a0
MOV dword ptr [RBP + -0x5c],EAX
CMP dword ptr [RBP + -0x5c],0x0
JGE 0x0014f66a
JMP 0x0014f65c
LAB_0014f65c:
JMP 0x0014f65e
LAB_0014f65e:
JMP 0x0014f660
LAB_0014f660:
MOV qword ptr [RBP + -0x8],0x1
JMP 0x0014f6be
LAB_0014f66a:
MOV ESI,dword ptr [RBP + -0x5c]
LEA RDI,[RBP + -0x58]
CALL 0x0014f3a0
CMP AL,0x0
JZ 0x0014f686
JMP 0x0014f67c
LAB_0014f67c:
JMP 0x0014f67e
LAB_0014f67e:
MOV qword ptr [RBP + -0x58],0x1
LAB_0014f686:
MOV EDX,dword ptr [RBP + -0x5c]
LEA RDI,[0x250b58]
MOV ESI,0x5e4
MOV ECX,0x10
CALL 0x0014f870
CMP EAX,0x0
JZ 0x0014f6b0
JMP 0x0014f6a6
LAB_0014f6a6:
JMP 0x0014f6a8
LAB_0014f6a8:
MOV qword ptr [RBP + -0x58],0x1
LAB_0014f6b0:
JMP 0x0014f6b2
LAB_0014f6b2:
JMP 0x0014f6b4
LAB_0014f6b4:
JMP 0x0014f6b6
LAB_0014f6b6:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014f6be:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 translog_get_file_max_lsn_stored(uint param_1)
{
char cVar1;
int iVar2;
int8 local_60 [7];
int8 local_28;
uint *local_20;
uint local_18;
uint local_14;
int8 local_10;
local_18 = 0;
local_14 = param_1;
inline_mysql_mutex_lock
(&DAT_00d791c8,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x5b7);
if (_DAT_00d79218 != 0) {
local_20 = _DAT_00d79210;
local_18 = *_DAT_00d79210;
}
inline_mysql_mutex_unlock(&DAT_00d791c8);
if (local_18 == 0) {
local_28 = translog_get_horizon();
local_18 = (uint)((ulong)local_28 >> 0x20);
}
if (local_14 < local_18) {
iVar2 = open_logfile_by_number_no_cache(local_14);
if (iVar2 < 0) {
local_10 = 1;
}
else {
cVar1 = translog_read_file_header(local_60,iVar2);
if (cVar1 != '\0') {
local_60[0] = 1;
}
iVar2 = inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x5e4,iVar2,0x10);
if (iVar2 != 0) {
local_60[0] = 1;
}
local_10 = local_60[0];
}
}
else {
local_10 = 0;
}
return local_10;
}
|
|
12,619
|
translog_first_theoretical_lsn
|
eloqsql/storage/maria/ma_loghandler.c
|
LSN translog_first_theoretical_lsn()
{
TRANSLOG_ADDRESS addr= translog_get_horizon();
TRANSLOG_PAGE_SIZE_BUFF psize_buff;
uchar *page;
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_first_theoretical_lsn");
DBUG_PRINT("info", ("Horizon: " LSN_FMT, LSN_IN_PARTS(addr)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (!translog_is_file(1))
DBUG_RETURN(LSN_IMPOSSIBLE);
if (addr == MAKE_LSN(1, TRANSLOG_PAGE_SIZE))
{
/* log has no records yet */
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
log_descriptor.page_overhead));
}
addr= MAKE_LSN(1, TRANSLOG_PAGE_SIZE); /* the first page of the file */
data.addr= &addr;
if ((page= translog_get_page(&data, psize_buff.buffer, NULL)) == NULL)
DBUG_RETURN(LSN_ERROR);
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
page_overhead[page[TRANSLOG_PAGE_FLAGS]]));
}
|
O3
|
c
|
translog_first_theoretical_lsn:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2020, %rsp # imm = 0x2020
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
callq 0x465e4
movq %rax, %rbx
movl $0x1, %edi
callq 0x47e6b
testb %al, %al
je 0x481b1
movabsq $0x100002000, %r14 # imm = 0x100002000
cmpq %r14, %rbx
jne 0x481b5
movzwl 0x3dea28(%rip), %eax # 0x426bd4
addq %r14, %rax
jmp 0x48200
xorl %eax, %eax
jmp 0x48200
leaq -0x2020(%rbp), %rax
movq %r14, (%rax)
leaq -0x2030(%rbp), %rdi
movq %rax, (%rdi)
leaq -0x2018(%rbp), %rsi
xorl %edx, %edx
callq 0x44bdc
testq %rax, %rax
je 0x481fb
movzbl 0x6(%rax), %eax
leaq 0xbdf8b9(%rip), %rcx # 0xc27aa0
movl $0x2000, %edx # imm = 0x2000
addl (%rcx,%rax,4), %edx
leaq (%r14,%rdx), %rax
addq $-0x2000, %rax # imm = 0xE000
jmp 0x48200
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x4821b
addq $0x2020, %rsp # imm = 0x2020
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2a280
|
translog_first_theoretical_lsn:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 2020h
mov rax, fs:28h
mov [rbp+var_18], rax
call translog_get_horizon
mov rbx, rax
mov edi, 1
call translog_is_file
test al, al
jz short loc_481B1
mov r14, 100002000h
cmp rbx, r14
jnz short loc_481B5
movzx eax, cs:word_426BD4
add rax, r14
jmp short loc_48200
loc_481B1:
xor eax, eax
jmp short loc_48200
loc_481B5:
lea rax, [rbp+var_2020]
mov [rax], r14
lea rdi, [rbp+var_2030]
mov [rdi], rax
lea rsi, [rbp+var_2018]
xor edx, edx
call translog_get_page
test rax, rax
jz short loc_481FB
movzx eax, byte ptr [rax+6]
lea rcx, page_overhead
mov edx, 2000h
add edx, [rcx+rax*4]
lea rax, [r14+rdx]
add rax, 0FFFFFFFFFFFFE000h
jmp short loc_48200
loc_481FB:
mov eax, 1
loc_48200:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_4821B
add rsp, 2020h
pop rbx
pop r14
pop rbp
retn
loc_4821B:
call ___stack_chk_fail
|
long long translog_first_theoretical_lsn(long long a1, long long a2)
{
long long horizon; // rbx
long long v3; // rdx
long long v4; // rcx
int v5; // r8d
int v6; // r9d
long long page; // rax
long long *v9; // [rsp+0h] [rbp-2030h] BYREF
long long v10; // [rsp+10h] [rbp-2020h] BYREF
_BYTE v11[8192]; // [rsp+18h] [rbp-2018h] BYREF
unsigned long long v12; // [rsp+2018h] [rbp-18h]
v12 = __readfsqword(0x28u);
horizon = translog_get_horizon();
if ( !translog_is_file(1u, a2, v3, v4, v5, v6) )
return 0LL;
if ( horizon == 0x100002000LL )
return (unsigned __int16)word_426BD4 + 0x100002000LL;
v10 = 0x100002000LL;
v9 = &v10;
page = translog_get_page(&v9, (long long)v11, 0LL);
if ( page )
return (unsigned int)(*((_DWORD *)&page_overhead + *(unsigned __int8 *)(page + 6)) + 0x2000) + 0x100000000LL;
else
return 1LL;
}
|
translog_first_theoretical_lsn:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x2020
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
CALL 0x001465e4
MOV RBX,RAX
MOV EDI,0x1
CALL 0x00147e6b
TEST AL,AL
JZ 0x001481b1
MOV R14,0x100002000
CMP RBX,R14
JNZ 0x001481b5
MOVZX EAX,word ptr [0x00526bd4]
ADD RAX,R14
JMP 0x00148200
LAB_001481b1:
XOR EAX,EAX
JMP 0x00148200
LAB_001481b5:
LEA RAX,[RBP + -0x2020]
MOV qword ptr [RAX],R14
LEA RDI,[RBP + -0x2030]
MOV qword ptr [RDI],RAX
LEA RSI,[RBP + -0x2018]
XOR EDX,EDX
CALL 0x00144bdc
TEST RAX,RAX
JZ 0x001481fb
MOVZX EAX,byte ptr [RAX + 0x6]
LEA RCX,[0xd27aa0]
MOV EDX,0x2000
ADD EDX,dword ptr [RCX + RAX*0x4]
LEA RAX,[R14 + RDX*0x1]
ADD RAX,-0x2000
JMP 0x00148200
LAB_001481fb:
MOV EAX,0x1
LAB_00148200:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0014821b
ADD RSP,0x2020
POP RBX
POP R14
POP RBP
RET
LAB_0014821b:
CALL 0x0012a280
|
long translog_first_theoretical_lsn(void)
{
char cVar1;
long lVar2;
long in_FS_OFFSET;
int8 *local_2038 [2];
int8 local_2028;
int1 local_2020 [8192];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = translog_get_horizon();
cVar1 = translog_is_file(1);
if (cVar1 == '\0') {
lVar2 = 0;
}
else if (lVar2 == 0x100002000) {
lVar2 = (ulong)DAT_00526bd4 + 0x100002000;
}
else {
local_2038[0] = &local_2028;
local_2028 = 0x100002000;
lVar2 = translog_get_page(local_2038,local_2020,0);
if (lVar2 == 0) {
lVar2 = 1;
}
else {
lVar2 = (ulong)(*(int *)(page_overhead + (ulong)*(byte *)(lVar2 + 6) * 4) + 0x2000) +
0x100000000;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,620
|
common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool)
|
monkey531[P]llama/common/common.cpp
|
std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
}
|
O3
|
cpp
|
common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x181c0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x18600
movl %eax, %r12d
testl %eax, %eax
js 0x230ae
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x181c0
jmp 0x230d9
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x181c0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x18600
cmpl %r12d, %eax
jne 0x230eb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x85e33(%rip), %rdi # 0xa8f25
leaq 0x85e78(%rip), %rdx # 0xa8f71
leaq 0x864dd(%rip), %rcx # 0xa95dd
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x18af0
jmp 0x23110
jmp 0x23110
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x23127
movq (%r13), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18bc0
|
_Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_230AE
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_230D9
loc_230AE:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_230EB
loc_230D9:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_230EB:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_23110
jmp short $+2
loc_23110:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_23127
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23127:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
unsigned __int8 v5; // r15
_QWORD *v7; // r13
int v8; // eax
long long v9; // rcx
long long v10; // r12
long long v12; // r14
long long v13; // [rsp-8h] [rbp-38h]
long long v14; // [rsp-8h] [rbp-38h]
v13 = v4;
v5 = a4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL, a4);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v13);
if ( v8 < 0 )
{
v10 = (unsigned int)-v8;
std::string::resize(a1, v10, 0LL, v9);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v14) != (_DWORD)v10 )
{
v12 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v12);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL, v9);
}
return a1;
}
|
common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00123072:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x001181c0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00123084:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00118600
MOV R12D,EAX
TEST EAX,EAX
JS 0x001230ae
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001181c0
JMP 0x001230d9
LAB_001230ae:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x001181c0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_001230c4:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00118600
CMP EAX,R12D
JNZ 0x001230eb
LAB_001230d9:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001230eb:
LEA RDI,[0x1a8f25]
LEA RDX,[0x1a8f71]
LEA RCX,[0x1a95dd]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x00118af0
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00123072 to 0012307d has its CatchHandler @ 0012310e */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 00123084 to 001230bd has its CatchHandler @ 00123110 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 001230c4 to 0012310b has its CatchHandler @ 0012310c */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
|
|
12,621
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_global_decodeURI:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x1c(%rsp)
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x27add
movq %rax, 0x10(%rsp)
cmpl $0x6, %edx
je 0x79725
movq %rdx, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x79734
movq 0x10(%rsp), %r15
movq 0x4(%r15), %rax
testl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x796b7
xorl %ebp, %ebp
leaq 0x28(%rsp), %r14
movslq %ebp, %rcx
testl %eax, %eax
js 0x79541
movzbl 0x18(%r15,%rcx), %r12d
jmp 0x79547
movzwl 0x18(%r15,%rcx,2), %r12d
cmpl $0x25, %r12d
jne 0x795a3
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x79d0d
testl %eax, %eax
js 0x796ee
movl %eax, %r12d
leal 0x3(%rbp), %r13d
cmpl $0x7f, %eax
jg 0x795ad
cmpl $0x0, 0x1c(%rsp)
jne 0x7967e
movl $0xb, %edx
leaq 0x2890d(%rip), %rdi # 0xa1e94
movl %r12d, %esi
callq 0xe440
incl %ebp
testq %rax, %rax
movl $0x25, %eax
cmovnel %eax, %r12d
cmovel %r13d, %ebp
jmp 0x795a5
incl %ebp
movl %ebp, %r13d
jmp 0x7967e
movl %r12d, %eax
andl $0x7fffffe0, %eax # imm = 0x7FFFFFE0
cmpl $0xc0, %eax
jne 0x795c9
andl $0x1f, %r12d
movl $0x80, %ecx
xorl %ebx, %ebx
jmp 0x79609
movl %r12d, %eax
andl $0x7ffffff0, %eax # imm = 0x7FFFFFF0
cmpl $0xe0, %eax
jne 0x795e8
andl $0xf, %r12d
movl $0x800, %ecx # imm = 0x800
movl $0x1, %ebx
jmp 0x79609
movl %r12d, %eax
andl $0x7ffffff8, %eax # imm = 0x7FFFFFF8
cmpl $0xf0, %eax
jne 0x796a3
andl $0x7, %r12d
movl $0x10000, %ecx # imm = 0x10000
movl $0x2, %ebx
movb $0x1, %al
testb %al, %al
je 0x79661
movl %ecx, 0x18(%rsp)
incl %ebx
movl %r13d, %ebp
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x79d0d
testl %eax, %eax
js 0x796ee
movl %eax, %ecx
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x79654
shll $0x6, %r12d
andl $0x3f, %eax
orl %eax, %r12d
leal 0x3(%rbp), %r13d
decl %ebx
jg 0x79615
jmp 0x79657
xorl %r12d, %r12d
addl $0x3, %ebp
movl %ebp, %r13d
movl 0x18(%rsp), %ecx
cmpl %ecx, %r12d
jl 0x796db
cmpl $0x10ffff, %r12d # imm = 0x10FFFF
jg 0x796db
movl %r12d, %eax
andl $0xfffff800, %eax # imm = 0xFFFFF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x796db
movq %r14, %rdi
movl %r12d, %esi
callq 0x333f0
movq 0x4(%r15), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %r13d, %ebp
cmpl %ecx, %r13d
jl 0x79532
jmp 0x796b7
movl $0x1, %ecx
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
xorl %r12d, %r12d
xorl %eax, %eax
jmp 0x7960b
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rdx
callq 0x1d8c6
leaq 0x28(%rsp), %rdi
callq 0x33444
jmp 0x79725
leaq 0x28781(%rip), %rsi # 0xa1e63
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x79d7f
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rdx
callq 0x1d8c6
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1cb99
movq $0x0, 0x30(%rsp)
movl $0x6, %edx
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x3c(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x79517
|
js_global_decodeURI:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_5C], r9d
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+78h+var_68], rax
cmp edx, 6
jz loc_79725
mov [rsp+78h+var_58], rdx
mov [rsp+78h+var_50], rbx
xorps xmm0, xmm0
movups [rsp+78h+var_40], xmm0
mov [rsp+78h+var_70], rbx
mov rdi, rbx
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_48], rax
test rax, rax
jz loc_79734
loc_79517:
mov r15, [rsp+78h+var_68]
mov rax, [r15+4]
test eax, 7FFFFFFFh
jz loc_796B7
xor ebp, ebp
lea r14, [rsp+78h+var_50]
loc_79532:
movsxd rcx, ebp
test eax, eax
js short loc_79541
movzx r12d, byte ptr [r15+rcx+18h]
jmp short loc_79547
loc_79541:
movzx r12d, word ptr [r15+rcx*2+18h]
loc_79547:
cmp r12d, 25h ; '%'
jnz short loc_795A3
mov rdi, [rsp+78h+var_70]
mov rsi, r15
mov edx, ebp
call hex_decode
test eax, eax
js loc_796EE
mov r12d, eax
lea r13d, [rbp+3]
cmp eax, 7Fh
jg short loc_795AD
cmp [rsp+78h+var_5C], 0
jnz loc_7967E
mov edx, 0Bh
lea rdi, asc_A1E94; ";/?:@&=+$,#"
mov esi, r12d
call _memchr
inc ebp
test rax, rax
mov eax, 25h ; '%'
cmovnz r12d, eax
cmovz ebp, r13d
jmp short loc_795A5
loc_795A3:
inc ebp
loc_795A5:
mov r13d, ebp
jmp loc_7967E
loc_795AD:
mov eax, r12d
and eax, 7FFFFFE0h
cmp eax, 0C0h
jnz short loc_795C9
and r12d, 1Fh
mov ecx, 80h
xor ebx, ebx
jmp short loc_79609
loc_795C9:
mov eax, r12d
and eax, 7FFFFFF0h
cmp eax, 0E0h
jnz short loc_795E8
and r12d, 0Fh
mov ecx, 800h
mov ebx, 1
jmp short loc_79609
loc_795E8:
mov eax, r12d
and eax, 7FFFFFF8h
cmp eax, 0F0h
jnz loc_796A3
and r12d, 7
mov ecx, 10000h
mov ebx, 2
loc_79609:
mov al, 1
loc_7960B:
test al, al
jz short loc_79661
mov [rsp+78h+var_60], ecx
inc ebx
loc_79615:
mov ebp, r13d
mov rdi, [rsp+78h+var_70]
mov rsi, r15
mov edx, r13d
call hex_decode
test eax, eax
js loc_796EE
mov ecx, eax
and ecx, 0C0h
cmp ecx, 80h
jnz short loc_79654
shl r12d, 6
and eax, 3Fh
or r12d, eax
lea r13d, [rbp+3]
dec ebx
jg short loc_79615
jmp short loc_79657
loc_79654:
xor r12d, r12d
loc_79657:
add ebp, 3
mov r13d, ebp
mov ecx, [rsp+78h+var_60]
loc_79661:
cmp r12d, ecx
jl short loc_796DB
cmp r12d, 10FFFFh
jg short loc_796DB
mov eax, r12d
and eax, 0FFFFF800h
cmp eax, 0D800h
jz short loc_796DB
loc_7967E:
mov rdi, r14
mov esi, r12d
call string_buffer_putc
mov rax, [r15+4]
mov ecx, eax
and ecx, 7FFFFFFFh
mov ebp, r13d
cmp r13d, ecx
jl loc_79532
jmp short loc_796B7
loc_796A3:
mov ecx, 1
mov ebx, 0FFFFFFFFh
xor r12d, r12d
xor eax, eax
jmp loc_7960B
loc_796B7:
mov rsi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_70]
mov rdi, [rax+18h]
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
lea rdi, [rsp+78h+var_50]
call string_buffer_end
jmp short loc_79725
loc_796DB:
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov rdi, [rsp+78h+var_70]
xor eax, eax
call js_throw_URIError
loc_796EE:
mov rsi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_70]
mov rdi, [rax+18h]
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call js_free
mov [rsp+78h+var_48], 0
mov edx, 6
xor eax, eax
loc_79725:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79734:
mov dword ptr [rsp+78h+var_40+4], 0
mov dword ptr [rsp+78h+var_40+0Ch], 0FFFFFFFFh
jmp loc_79517
|
_DWORD * js_global_decodeURI(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
_DWORD *result; // rax
long long v15; // rdx
long long v16; // rax
int v17; // ebp
signed int v18; // r12d
int v19; // eax
int v20; // edx
int v21; // r8d
int v22; // r9d
int v23; // r13d
int v24; // ebp
long long v25; // rcx
int v26; // ebx
char v27; // al
int v28; // ebx
int v29; // ebp
int v30; // eax
_DWORD *v32; // [rsp+10h] [rbp-68h]
int v33; // [rsp+18h] [rbp-60h]
int v34; // [rsp+1Ch] [rbp-5Ch]
long long v35; // [rsp+20h] [rbp-58h]
long long v36; // [rsp+28h] [rbp-50h] BYREF
long long v37; // [rsp+30h] [rbp-48h]
__int128 v38; // [rsp+38h] [rbp-40h]
v34 = a14;
result = (_DWORD *)JS_ToStringInternal(a1, *a13, a13[1], 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v32 = result;
if ( (_DWORD)v15 == 6 )
return result;
v35 = v15;
v36 = a1;
v38 = 0LL;
v37 = js_alloc_string(a1, 0LL, 0);
if ( !v37 )
{
DWORD1(v38) = 0;
HIDWORD(v38) = -1;
}
v16 = *(_QWORD *)(v32 + 1);
if ( (v16 & 0x7FFFFFFF) == 0 )
{
LABEL_39:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v32, v35);
return string_buffer_end((long long)&v36);
}
v17 = 0;
while ( 1 )
{
if ( (int)v16 < 0 )
v18 = *((unsigned __int16 *)v32 + v17 + 12);
else
v18 = *((unsigned __int8 *)v32 + v17 + 24);
if ( v18 != 37 )
{
v24 = v17 + 1;
LABEL_17:
v23 = v24;
goto LABEL_36;
}
v19 = hex_decode(a1, v32, (unsigned int)v17, v17);
if ( v19 < 0 )
goto LABEL_41;
v18 = v19;
v23 = v17 + 3;
if ( v19 > 127 )
break;
if ( !v34 )
{
v24 = v17 + 1;
if ( memchr(";/?:@&=+$,#", (unsigned int)v19, 11LL) )
v18 = 37;
else
v24 = v23;
goto LABEL_17;
}
LABEL_36:
string_buffer_putc((long long)&v36, v18);
v16 = *(_QWORD *)(v32 + 1);
v17 = v23;
if ( v23 >= (v32[1] & 0x7FFFFFFF) )
goto LABEL_39;
}
if ( (v19 & 0x7FFFFFE0) == 0xC0 )
{
v18 = v19 & 0x1F;
v25 = 128LL;
v26 = 0;
LABEL_24:
v27 = 1;
goto LABEL_25;
}
if ( (v19 & 0x7FFFFFF0) == 0xE0 )
{
v18 = v19 & 0xF;
v25 = 2048LL;
v26 = 1;
goto LABEL_24;
}
if ( (v19 & 0x7FFFFFF8) == 0xF0 )
{
v18 = v19 & 7;
v25 = 0x10000LL;
v26 = 2;
goto LABEL_24;
}
v25 = 1LL;
v26 = -1;
v18 = 0;
v27 = 0;
LABEL_25:
if ( !v27 )
{
LABEL_33:
if ( v18 < (int)v25 || v18 > 1114111 || (v18 & 0xFFFFF800) == 0xD800 )
{
js_throw_URIError(a1, (unsigned int)"malformed UTF-8", v20, v25, v21, v22);
goto LABEL_41;
}
goto LABEL_36;
}
v33 = v25;
v28 = v26 + 1;
while ( 1 )
{
v29 = v23;
v30 = hex_decode(a1, v32, (unsigned int)v23, v25);
if ( v30 < 0 )
break;
v25 = (unsigned __int8)v30 & 0xC0;
if ( (_DWORD)v25 != 128 )
{
v18 = 0;
LABEL_32:
v23 = v29 + 3;
LODWORD(v25) = v33;
goto LABEL_33;
}
v18 = v30 & 0x3F | (v18 << 6);
v23 += 3;
if ( v28-- <= 1 )
goto LABEL_32;
}
LABEL_41:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v32, v35);
js_free(v36, v37);
return 0LL;
}
|
js_global_decodeURI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x1c],R9D
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x00127add
MOV qword ptr [RSP + 0x10],RAX
CMP EDX,0x6
JZ 0x00179725
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x28],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x38],XMM0
MOV qword ptr [RSP + 0x8],RBX
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00120b73
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x00179734
LAB_00179517:
MOV R15,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [R15 + 0x4]
TEST EAX,0x7fffffff
JZ 0x001796b7
XOR EBP,EBP
LEA R14,[RSP + 0x28]
LAB_00179532:
MOVSXD RCX,EBP
TEST EAX,EAX
JS 0x00179541
MOVZX R12D,byte ptr [R15 + RCX*0x1 + 0x18]
JMP 0x00179547
LAB_00179541:
MOVZX R12D,word ptr [R15 + RCX*0x2 + 0x18]
LAB_00179547:
CMP R12D,0x25
JNZ 0x001795a3
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
MOV EDX,EBP
CALL 0x00179d0d
TEST EAX,EAX
JS 0x001796ee
MOV R12D,EAX
LEA R13D,[RBP + 0x3]
CMP EAX,0x7f
JG 0x001795ad
CMP dword ptr [RSP + 0x1c],0x0
JNZ 0x0017967e
MOV EDX,0xb
LEA RDI,[0x1a1e94]
MOV ESI,R12D
CALL 0x0010e440
INC EBP
TEST RAX,RAX
MOV EAX,0x25
CMOVNZ R12D,EAX
CMOVZ EBP,R13D
JMP 0x001795a5
LAB_001795a3:
INC EBP
LAB_001795a5:
MOV R13D,EBP
JMP 0x0017967e
LAB_001795ad:
MOV EAX,R12D
AND EAX,0x7fffffe0
CMP EAX,0xc0
JNZ 0x001795c9
AND R12D,0x1f
MOV ECX,0x80
XOR EBX,EBX
JMP 0x00179609
LAB_001795c9:
MOV EAX,R12D
AND EAX,0x7ffffff0
CMP EAX,0xe0
JNZ 0x001795e8
AND R12D,0xf
MOV ECX,0x800
MOV EBX,0x1
JMP 0x00179609
LAB_001795e8:
MOV EAX,R12D
AND EAX,0x7ffffff8
CMP EAX,0xf0
JNZ 0x001796a3
AND R12D,0x7
MOV ECX,0x10000
MOV EBX,0x2
LAB_00179609:
MOV AL,0x1
LAB_0017960b:
TEST AL,AL
JZ 0x00179661
MOV dword ptr [RSP + 0x18],ECX
INC EBX
LAB_00179615:
MOV EBP,R13D
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
MOV EDX,R13D
CALL 0x00179d0d
TEST EAX,EAX
JS 0x001796ee
MOV ECX,EAX
AND ECX,0xc0
CMP ECX,0x80
JNZ 0x00179654
SHL R12D,0x6
AND EAX,0x3f
OR R12D,EAX
LEA R13D,[RBP + 0x3]
DEC EBX
JG 0x00179615
JMP 0x00179657
LAB_00179654:
XOR R12D,R12D
LAB_00179657:
ADD EBP,0x3
MOV R13D,EBP
MOV ECX,dword ptr [RSP + 0x18]
LAB_00179661:
CMP R12D,ECX
JL 0x001796db
CMP R12D,0x10ffff
JG 0x001796db
MOV EAX,R12D
AND EAX,0xfffff800
CMP EAX,0xd800
JZ 0x001796db
LAB_0017967e:
MOV RDI,R14
MOV ESI,R12D
CALL 0x001333f0
MOV RAX,qword ptr [R15 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
MOV EBP,R13D
CMP R13D,ECX
JL 0x00179532
JMP 0x001796b7
LAB_001796a3:
MOV ECX,0x1
MOV EBX,0xffffffff
XOR R12D,R12D
XOR EAX,EAX
JMP 0x0017960b
LAB_001796b7:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011d8c6
LEA RDI,[RSP + 0x28]
CALL 0x00133444
JMP 0x00179725
LAB_001796db:
LEA RSI,[0x1a1e63]
MOV RDI,qword ptr [RSP + 0x8]
XOR EAX,EAX
CALL 0x00179d7f
LAB_001796ee:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011d8c6
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0011cb99
MOV qword ptr [RSP + 0x30],0x0
MOV EDX,0x6
XOR EAX,EAX
LAB_00179725:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179734:
MOV dword ptr [RSP + 0x3c],0x0
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00179517
|
long js_global_decodeURI(long param_1)
{
bool bVar1;
int iVar2;
uint __c;
uint uVar3;
ulong uVar4;
void *pvVar5;
long lVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int8 *in_R8;
int in_R9D;
int1 auVar11 [16];
long local_50;
long local_48;
ulong local_40;
int8 uStack_38;
auVar11 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
lVar6 = auVar11._0_8_;
if (auVar11._8_4_ != 6) {
local_40 = 0;
uStack_38 = 0;
local_50 = param_1;
local_48 = js_alloc_string(param_1,0,0);
if (local_48 == 0) {
local_40 = local_40 & 0xffffffff;
uStack_38 = CONCAT44(0xffffffff,(int4)uStack_38);
}
uVar4 = *(ulong *)(lVar6 + 4);
if ((uVar4 & 0x7fffffff) != 0) {
iVar9 = 0;
do {
if ((int)uVar4 < 0) {
__c = (uint)*(ushort *)(lVar6 + 0x18 + (long)iVar9 * 2);
}
else {
__c = (uint)*(byte *)(lVar6 + 0x18 + (long)iVar9);
}
if (__c == 0x25) {
__c = hex_decode(param_1,lVar6,iVar9);
if ((int)__c < 0) goto LAB_001796ee;
iVar10 = iVar9 + 3;
if ((int)__c < 0x80) {
if (in_R9D == 0) {
pvVar5 = memchr(";/?:@&=+$,#",__c,0xb);
if (pvVar5 != (void *)0x0) {
__c = 0x25;
iVar10 = iVar9 + 1;
}
}
goto LAB_0017967e;
}
if ((__c & 0x7fffffe0) == 0xc0) {
__c = __c & 0x1f;
iVar9 = 0x80;
iVar8 = 0;
LAB_00179609:
bVar1 = true;
}
else {
if ((__c & 0x7ffffff0) == 0xe0) {
__c = __c & 0xf;
iVar9 = 0x800;
iVar8 = 1;
goto LAB_00179609;
}
if ((__c & 0x7ffffff8) == 0xf0) {
__c = __c & 7;
iVar9 = 0x10000;
iVar8 = 2;
goto LAB_00179609;
}
iVar9 = 1;
iVar8 = -1;
__c = 0;
bVar1 = false;
}
if (bVar1) {
iVar8 = iVar8 + 1;
do {
iVar2 = iVar10;
uVar3 = hex_decode(param_1,lVar6,iVar2);
if ((int)uVar3 < 0) goto LAB_001796ee;
if ((uVar3 & 0xc0) != 0x80) {
__c = 0;
break;
}
__c = __c << 6 | uVar3 & 0x3f;
iVar7 = iVar8 + -1;
bVar1 = 0 < iVar8;
iVar10 = iVar2 + 3;
iVar8 = iVar7;
} while (iVar7 != 0 && bVar1);
iVar10 = iVar2 + 3;
}
if ((((int)__c < iVar9) || (0x10ffff < (int)__c)) || ((__c & 0xfffff800) == 0xd800)) {
js_throw_URIError(param_1,"malformed UTF-8");
LAB_001796ee:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar6,auVar11._8_8_);
js_free(local_50,local_48);
return 0;
}
}
else {
iVar10 = iVar9 + 1;
}
LAB_0017967e:
iVar9 = iVar10;
string_buffer_putc(&local_50,__c);
uVar4 = *(ulong *)(lVar6 + 4);
} while (iVar9 < (int)((uint)uVar4 & 0x7fffffff));
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar6,auVar11._8_8_);
lVar6 = string_buffer_end(&local_50);
}
return lVar6;
}
|
|
12,622
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_global_decodeURI:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x4(%rsp)
movq %rdi, %r15
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x1b03c
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x660d9
leaq 0x8(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %edx, %edx
callq 0x2e042
movq 0x4(%r14), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpl %ecx, %r12d
jge 0x660ee
movslq %r12d, %rcx
testl %eax, %eax
js 0x65f6f
movzbl 0x18(%r14,%rcx), %r13d
jmp 0x65f75
movzwl 0x18(%r14,%rcx,2), %r13d
cmpl $0x25, %r13d
jne 0x65fbf
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x665a8
testl %eax, %eax
js 0x660bb
movl %eax, %r13d
leal 0x3(%r12), %ebp
cmpl $0x7f, %eax
ja 0x65fda
cmpl $0x0, 0x4(%rsp)
jne 0x65fc5
movl %r13d, %edi
callq 0x66618
incl %r12d
testl %eax, %eax
pushq $0x25
popq %rax
cmovnel %eax, %r13d
cmovel %ebp, %r12d
jmp 0x65fc2
incl %r12d
movl %r12d, %ebp
leaq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0x2ca82
movl %ebp, %r12d
jmp 0x65f4b
movl %r13d, %eax
andl $0x7fffffe0, %eax # imm = 0x7FFFFFE0
cmpl $0xc0, %eax
jne 0x65ffb
andl $0x1f, %r13d
movl $0x80, (%rsp)
movl %r13d, %eax
pushq $0x1
jmp 0x6604b
movl %r13d, %eax
andl $0x7ffffff0, %eax # imm = 0x7FFFFFF0
cmpl $0xe0, %eax
jne 0x6601c
andl $0xf, %r13d
movl $0x800, (%rsp) # imm = 0x800
movl %r13d, %eax
pushq $0x2
jmp 0x6604b
movl %r13d, %ecx
andl $0x7ffffff8, %ecx # imm = 0x7FFFFFF8
xorl %eax, %eax
movl $0x0, %r12d
pushq $0x1
popq %rdx
movl %edx, (%rsp)
cmpl $0xf0, %ecx
jne 0x6604d
andl $0x7, %r13d
movl $0x10000, (%rsp) # imm = 0x10000
movl %r13d, %eax
pushq $0x3
popq %r12
movl %eax, %r13d
testl %r12d, %r12d
jle 0x66088
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x665a8
testl %eax, %eax
js 0x660bb
movl %eax, %ecx
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x660aa
addl $0x3, %ebp
shll $0x6, %r13d
andl $0x3f, %eax
orl %eax, %r13d
decl %r12d
jmp 0x66050
cmpl (%rsp), %r13d
jl 0x660aa
cmpl $0x10ffff, %r13d # imm = 0x10FFFF
jg 0x660aa
movl %r13d, %eax
andl $0xfffff800, %eax # imm = 0xFFFFF800
cmpl $0xd800, %eax # imm = 0xD800
jne 0x65fc5
leaq 0x22cec(%rip), %rsi # 0x88d9d
movq %r15, %rdi
xorl %eax, %eax
callq 0x66636
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
leaq 0x8(%rsp), %rdi
callq 0x2ef01
pushq $0x6
popq %rbx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
leaq 0x8(%rsp), %rdi
callq 0x2cad4
movq %rax, %r14
movq %rdx, %rbx
jmp 0x660d9
|
js_global_decodeURI:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_54], r9d
mov r15, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToString
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz loc_660D9
lea rsi, [rsp+58h+var_50]
xor r12d, r12d
mov rdi, r15
xor edx, edx
call string_buffer_init
loc_65F4B:
mov rax, [r14+4]
mov ecx, eax
and ecx, 7FFFFFFFh
cmp r12d, ecx
jge loc_660EE
movsxd rcx, r12d
test eax, eax
js short loc_65F6F
movzx r13d, byte ptr [r14+rcx+18h]
jmp short loc_65F75
loc_65F6F:
movzx r13d, word ptr [r14+rcx*2+18h]
loc_65F75:
cmp r13d, 25h ; '%'
jnz short loc_65FBF
mov rdi, r15
mov rsi, r14
mov edx, r12d
call hex_decode
test eax, eax
js loc_660BB
mov r13d, eax
lea ebp, [r12+3]
cmp eax, 7Fh
ja short loc_65FDA
cmp [rsp+58h+var_54], 0
jnz short loc_65FC5
mov edi, r13d
call isURIReserved
inc r12d
test eax, eax
push 25h ; '%'
pop rax
cmovnz r13d, eax
cmovz r12d, ebp
jmp short loc_65FC2
loc_65FBF:
inc r12d
loc_65FC2:
mov ebp, r12d
loc_65FC5:
lea rdi, [rsp+58h+var_50]
mov esi, r13d
call string_buffer_putc
mov r12d, ebp
jmp loc_65F4B
loc_65FDA:
mov eax, r13d
and eax, 7FFFFFE0h
cmp eax, 0C0h
jnz short loc_65FFB
and r13d, 1Fh
mov [rsp+58h+var_58], 80h
mov eax, r13d
push 1
jmp short loc_6604B
loc_65FFB:
mov eax, r13d
and eax, 7FFFFFF0h
cmp eax, 0E0h
jnz short loc_6601C
and r13d, 0Fh
mov [rsp+58h+var_58], 800h
mov eax, r13d
push 2
jmp short loc_6604B
loc_6601C:
mov ecx, r13d
and ecx, 7FFFFFF8h
xor eax, eax
mov r12d, 0
push 1
pop rdx
mov [rsp+58h+var_58], edx
cmp ecx, 0F0h
jnz short loc_6604D
and r13d, 7
mov [rsp+58h+var_58], 10000h
mov eax, r13d
push 3
loc_6604B:
pop r12
loc_6604D:
mov r13d, eax
loc_66050:
test r12d, r12d
jle short loc_66088
mov rdi, r15
mov rsi, r14
mov edx, ebp
call hex_decode
test eax, eax
js short loc_660BB
mov ecx, eax
and ecx, 0C0h
cmp ecx, 80h
jnz short loc_660AA
add ebp, 3
shl r13d, 6
and eax, 3Fh
or r13d, eax
dec r12d
jmp short loc_66050
loc_66088:
cmp r13d, [rsp+58h+var_58]
jl short loc_660AA
cmp r13d, 10FFFFh
jg short loc_660AA
mov eax, r13d
and eax, 0FFFFF800h
cmp eax, 0D800h
jnz loc_65FC5
loc_660AA:
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov rdi, r15
xor eax, eax
call js_throw_URIError
loc_660BB:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
lea rdi, [rsp+58h+var_50]
call string_buffer_free
push 6
pop rbx
xor r14d, r14d
loc_660D9:
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_660EE:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
lea rdi, [rsp+58h+var_50]
call string_buffer_end
mov r14, rax
mov rbx, rdx
jmp short loc_660D9
|
long long js_global_decodeURI(long long a1, long long a2, long long a3, long long a4, long long *a5, int a6)
{
long long v6; // r14
long long v7; // rdx
long long v8; // rbx
int v9; // r12d
signed int v10; // r13d
int v11; // eax
int v12; // edx
long long v13; // rcx
int v14; // r8d
int v15; // r9d
unsigned int v16; // ebp
int v17; // r12d
int v18; // eax
int v19; // r12d
int v20; // eax
int v22; // [rsp-8h] [rbp-60h]
int v23; // [rsp+0h] [rbp-58h]
long long v25[10]; // [rsp+8h] [rbp-50h] BYREF
v6 = JS_ToString(a1, *a5, a5[1]);
v8 = v7;
if ( (_DWORD)v7 != 6 )
{
v9 = 0;
string_buffer_init(a1, (long long)v25, 0);
while ( 1 )
{
if ( v9 >= (*(_DWORD *)(v6 + 4) & 0x7FFFFFFF) )
{
JS_FreeValue(a1, v6, v8);
return string_buffer_end(v25);
}
if ( (int)*(_QWORD *)(v6 + 4) < 0 )
v10 = *(unsigned __int16 *)(v6 + 2LL * v9 + 24);
else
v10 = *(unsigned __int8 *)(v6 + v9 + 24);
if ( v10 != 37 )
{
v17 = v9 + 1;
LABEL_15:
v16 = v17;
goto LABEL_16;
}
v11 = hex_decode(a1, v6, (unsigned int)v9, v9);
if ( v11 < 0 )
{
LABEL_33:
JS_FreeValue(a1, v6, v8);
string_buffer_free(v25);
return 0LL;
}
v10 = v11;
v16 = v9 + 3;
if ( (unsigned int)v11 <= 0x7F )
{
if ( a6 )
goto LABEL_16;
v17 = v9 + 1;
if ( (unsigned int)isURIReserved((unsigned int)v11) )
v10 = 37;
else
v17 = v16;
goto LABEL_15;
}
if ( (v11 & 0x7FFFFFE0) == 0xC0 )
break;
if ( (v11 & 0x7FFFFFF0) == 0xE0 )
{
v23 = 2048;
v18 = v11 & 0xF;
v22 = 2;
goto LABEL_23;
}
v13 = v11 & 0x7FFFFFF8;
v18 = 0;
v19 = 0;
v12 = 1;
v23 = 1;
if ( (_DWORD)v13 == 240 )
{
v23 = 0x10000;
v18 = v10 & 7;
v22 = 3;
goto LABEL_23;
}
LABEL_24:
v10 = v18;
while ( v19 > 0 )
{
v20 = hex_decode(a1, v6, v16, v13);
if ( v20 < 0 )
goto LABEL_33;
v13 = (unsigned __int8)v20 & 0xC0;
if ( (_DWORD)v13 != 128 )
goto LABEL_32;
v16 += 3;
v10 = v20 & 0x3F | (v10 << 6);
--v19;
}
if ( v10 < v23 || v10 > 1114111 || (v10 & 0xFFFFF800) == 0xD800 )
{
LABEL_32:
js_throw_URIError(a1, (unsigned int)"malformed UTF-8", v12, v13, v14, v15, v23);
goto LABEL_33;
}
LABEL_16:
string_buffer_putc((long long)v25, v10);
v9 = v16;
}
v23 = 128;
v18 = v11 & 0x1F;
v22 = 1;
LABEL_23:
v19 = v22;
goto LABEL_24;
}
return v6;
}
|
js_global_decodeURI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RSP + 0x4],R9D
MOV R15,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x0011b03c
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x001660d9
LEA RSI,[RSP + 0x8]
XOR R12D,R12D
MOV RDI,R15
XOR EDX,EDX
CALL 0x0012e042
LAB_00165f4b:
MOV RAX,qword ptr [R14 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
CMP R12D,ECX
JGE 0x001660ee
MOVSXD RCX,R12D
TEST EAX,EAX
JS 0x00165f6f
MOVZX R13D,byte ptr [R14 + RCX*0x1 + 0x18]
JMP 0x00165f75
LAB_00165f6f:
MOVZX R13D,word ptr [R14 + RCX*0x2 + 0x18]
LAB_00165f75:
CMP R13D,0x25
JNZ 0x00165fbf
MOV RDI,R15
MOV RSI,R14
MOV EDX,R12D
CALL 0x001665a8
TEST EAX,EAX
JS 0x001660bb
MOV R13D,EAX
LEA EBP,[R12 + 0x3]
CMP EAX,0x7f
JA 0x00165fda
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00165fc5
MOV EDI,R13D
CALL 0x00166618
INC R12D
TEST EAX,EAX
PUSH 0x25
POP RAX
CMOVNZ R13D,EAX
CMOVZ R12D,EBP
JMP 0x00165fc2
LAB_00165fbf:
INC R12D
LAB_00165fc2:
MOV EBP,R12D
LAB_00165fc5:
LEA RDI,[RSP + 0x8]
MOV ESI,R13D
CALL 0x0012ca82
MOV R12D,EBP
JMP 0x00165f4b
LAB_00165fda:
MOV EAX,R13D
AND EAX,0x7fffffe0
CMP EAX,0xc0
JNZ 0x00165ffb
AND R13D,0x1f
MOV dword ptr [RSP],0x80
MOV EAX,R13D
PUSH 0x1
JMP 0x0016604b
LAB_00165ffb:
MOV EAX,R13D
AND EAX,0x7ffffff0
CMP EAX,0xe0
JNZ 0x0016601c
AND R13D,0xf
MOV dword ptr [RSP],0x800
MOV EAX,R13D
PUSH 0x2
JMP 0x0016604b
LAB_0016601c:
MOV ECX,R13D
AND ECX,0x7ffffff8
XOR EAX,EAX
MOV R12D,0x0
PUSH 0x1
POP RDX
MOV dword ptr [RSP],EDX
CMP ECX,0xf0
JNZ 0x0016604d
AND R13D,0x7
MOV dword ptr [RSP],0x10000
MOV EAX,R13D
PUSH 0x3
LAB_0016604b:
POP R12
LAB_0016604d:
MOV R13D,EAX
LAB_00166050:
TEST R12D,R12D
JLE 0x00166088
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x001665a8
TEST EAX,EAX
JS 0x001660bb
MOV ECX,EAX
AND ECX,0xc0
CMP ECX,0x80
JNZ 0x001660aa
ADD EBP,0x3
SHL R13D,0x6
AND EAX,0x3f
OR R13D,EAX
DEC R12D
JMP 0x00166050
LAB_00166088:
CMP R13D,dword ptr [RSP]
JL 0x001660aa
CMP R13D,0x10ffff
JG 0x001660aa
MOV EAX,R13D
AND EAX,0xfffff800
CMP EAX,0xd800
JNZ 0x00165fc5
LAB_001660aa:
LEA RSI,[0x188d9d]
MOV RDI,R15
XOR EAX,EAX
CALL 0x00166636
LAB_001660bb:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
LEA RDI,[RSP + 0x8]
CALL 0x0012ef01
PUSH 0x6
POP RBX
XOR R14D,R14D
LAB_001660d9:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001660ee:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
LEA RDI,[RSP + 0x8]
CALL 0x0012cad4
MOV R14,RAX
MOV RBX,RDX
JMP 0x001660d9
|
int1 [16] js_global_decodeURI(int8 param_1)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
int iVar5;
int8 *in_R8;
int in_R9D;
int iVar6;
uint uVar7;
int1 auVar8 [16];
int local_58;
int1 local_50 [32];
auVar8 = JS_ToString(param_1,*in_R8,in_R8[1]);
lVar4 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
iVar6 = 0;
string_buffer_init(param_1,local_50,0);
while (uVar7 = (uint)*(int8 *)(lVar4 + 4), iVar6 < (int)(uVar7 & 0x7fffffff)) {
if ((int)uVar7 < 0) {
uVar7 = (uint)*(ushort *)(lVar4 + 0x18 + (long)iVar6 * 2);
}
else {
uVar7 = (uint)*(byte *)(lVar4 + 0x18 + (long)iVar6);
}
if (uVar7 == 0x25) {
uVar2 = hex_decode(param_1,lVar4,iVar6);
if ((int)uVar2 < 0) {
LAB_001660bb:
JS_FreeValue(param_1,lVar4,auVar8._8_8_);
string_buffer_free(local_50);
return ZEXT816(6) << 0x40;
}
iVar5 = iVar6 + 3;
if (uVar2 < 0x80) {
uVar7 = uVar2;
iVar1 = iVar5;
if (in_R9D == 0) {
iVar3 = isURIReserved(uVar2);
uVar7 = 0x25;
iVar1 = iVar6 + 1;
if (iVar3 == 0) {
uVar7 = uVar2;
iVar1 = iVar5;
}
}
}
else {
if ((uVar2 & 0x7fffffe0) == 0xc0) {
uVar7 = uVar2 & 0x1f;
local_58 = 0x80;
iVar6 = 1;
}
else if ((uVar2 & 0x7ffffff0) == 0xe0) {
uVar7 = uVar2 & 0xf;
local_58 = 0x800;
iVar6 = 2;
}
else {
uVar7 = 0;
iVar6 = 0;
local_58 = 1;
if ((uVar2 & 0x7ffffff8) == 0xf0) {
uVar7 = uVar2 & 7;
local_58 = 0x10000;
iVar6 = 3;
}
}
for (; 0 < iVar6; iVar6 = iVar6 + -1) {
uVar2 = hex_decode(param_1,lVar4,iVar5);
if ((int)uVar2 < 0) goto LAB_001660bb;
if ((uVar2 & 0xc0) != 0x80) goto LAB_001660aa;
iVar5 = iVar5 + 3;
uVar7 = uVar7 << 6 | uVar2 & 0x3f;
}
if ((((int)uVar7 < local_58) || (0x10ffff < (int)uVar7)) ||
(iVar1 = iVar5, (uVar7 & 0xfffff800) == 0xd800)) {
LAB_001660aa:
js_throw_URIError(param_1,"malformed UTF-8");
goto LAB_001660bb;
}
}
}
else {
iVar1 = iVar6 + 1;
}
iVar6 = iVar1;
string_buffer_putc(local_50,uVar7);
}
JS_FreeValue(param_1,lVar4,auVar8._8_8_);
auVar8 = string_buffer_end(local_50);
}
return auVar8;
}
|
|
12,623
|
js_global_decodeURI
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_global_decodeURI(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int isComponent)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int k, c, c1, n, c_min;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
string_buffer_init(ctx, b, 0);
p = JS_VALUE_GET_STRING(str);
for (k = 0; k < p->len;) {
c = string_get(p, k);
if (c == '%') {
c = hex_decode(ctx, p, k);
if (c < 0)
goto fail;
k += 3;
if (c < 0x80) {
if (!isComponent && isURIReserved(c)) {
c = '%';
k -= 2;
}
} else {
/* Decode URI-encoded UTF-8 sequence */
if (c >= 0xc0 && c <= 0xdf) {
n = 1;
c_min = 0x80;
c &= 0x1f;
} else if (c >= 0xe0 && c <= 0xef) {
n = 2;
c_min = 0x800;
c &= 0xf;
} else if (c >= 0xf0 && c <= 0xf7) {
n = 3;
c_min = 0x10000;
c &= 0x7;
} else {
n = 0;
c_min = 1;
c = 0;
}
while (n-- > 0) {
c1 = hex_decode(ctx, p, k);
if (c1 < 0)
goto fail;
k += 3;
if ((c1 & 0xc0) != 0x80) {
c = 0;
break;
}
c = (c << 6) | (c1 & 0x3f);
}
if (c < c_min || c > 0x10FFFF || is_surrogate(c)) {
js_throw_URIError(ctx, "malformed UTF-8");
goto fail;
}
}
} else {
k++;
}
string_buffer_putc(b, c);
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, str);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O3
|
c
|
js_global_decodeURI:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movq %rdi, %r15
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x28154
movq %rax, %r14
cmpl $0x6, %edx
je 0x7c088
movl %ebx, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq %r15, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x212c2
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x7c09a
movq 0x4(%r14), %rax
testl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x7c057
xorl %ebp, %ebp
movslq %ebp, %rcx
testl %eax, %eax
js 0x7bebb
movzbl 0x18(%r14,%rcx), %r12d
jmp 0x7bec1
movzwl 0x18(%r14,%rcx,2), %r12d
cmpl $0x25, %r12d
jne 0x7bf17
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x7c6ad
testl %eax, %eax
js 0x7c01a
movl %eax, %r12d
leal 0x3(%rbp), %r13d
cmpl $0x7f, %eax
ja 0x7bf46
cmpl $0x0, 0xc(%rsp)
jne 0x7bf1c
movl $0xb, %edx
leaq 0x28f43(%rip), %rdi # 0xa4e3e
movl %r12d, %esi
callq 0xe440
incl %ebp
testq %rax, %rax
movl $0x25, %eax
cmovnel %eax, %r12d
cmovel %r13d, %ebp
jmp 0x7bf19
incl %ebp
movl %ebp, %r13d
leaq 0x18(%rsp), %rdi
movl %r12d, %esi
callq 0x3425d
movq 0x4(%r14), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %r13d, %ebp
cmpl %ecx, %r13d
jl 0x7beac
jmp 0x7c057
movl %r12d, %eax
andl $0x7fffffe0, %eax # imm = 0x7FFFFFE0
cmpl $0xc0, %eax
jne 0x7bf66
movl $0x80, 0x8(%rsp)
xorl %ebp, %ebp
movl $0x1f, %eax
jmp 0x7bfaa
movl %r12d, %eax
andl $0x7ffffff0, %eax # imm = 0x7FFFFFF0
cmpl $0xe0, %eax
jne 0x7bf89
movl $0x800, 0x8(%rsp) # imm = 0x800
movl $0x1, %ebp
movl $0xf, %eax
jmp 0x7bfaa
movl %r12d, %eax
andl $0x7ffffff8, %eax # imm = 0x7FFFFFF8
cmpl $0xf0, %eax
jne 0x7c009
movl $0x10000, 0x8(%rsp) # imm = 0x10000
movl $0x2, %ebp
movl $0x7, %eax
andl %eax, %r12d
incl %ebp
movl %r12d, %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x7c6ad
testl %eax, %eax
js 0x7c01a
movl %eax, %r12d
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x7c009
addl $0x3, %r13d
movl %ebx, %eax
shll $0x6, %eax
andl $0x3f, %r12d
orl %eax, %r12d
decl %ebp
jg 0x7bfaf
cmpl 0x8(%rsp), %r12d
jl 0x7c009
cmpl $0x10ffff, %r12d # imm = 0x10FFFF
jg 0x7c009
andl $0x3ffffe0, %ebx # imm = 0x3FFFFE0
cmpl $0x360, %ebx # imm = 0x360
jne 0x7bf1c
leaq 0x28dfd(%rip), %rsi # 0xa4e0d
movq %r15, %rdi
xorl %eax, %eax
callq 0x7c71f
movq 0x10(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x7c03e
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x7c03e
movq %r14, %rsi
callq 0x219cc
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x1d481
movl $0x6, %edx
xorl %r14d, %r14d
jmp 0x7c088
movq 0x10(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x7c07b
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x7c07b
movq %r14, %rsi
callq 0x219cc
leaq 0x18(%rsp), %rdi
callq 0x342b1
movq %rax, %r14
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x2c(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x7be9b
|
js_global_decodeURI:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebx, r9d
mov r15, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov r14, rax
cmp edx, 6
jz loc_7C088
mov [rsp+68h+var_5C], ebx
mov [rsp+68h+var_58], rdx
mov [rsp+68h+var_50], r15
xorps xmm0, xmm0
movups [rsp+68h+var_40], xmm0
mov rdi, r15
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_48], rax
test rax, rax
jz loc_7C09A
loc_7BE9B:
mov rax, [r14+4]
test eax, 7FFFFFFFh
jz loc_7C057
xor ebp, ebp
loc_7BEAC:
movsxd rcx, ebp
test eax, eax
js short loc_7BEBB
movzx r12d, byte ptr [r14+rcx+18h]
jmp short loc_7BEC1
loc_7BEBB:
movzx r12d, word ptr [r14+rcx*2+18h]
loc_7BEC1:
cmp r12d, 25h ; '%'
jnz short loc_7BF17
mov rdi, r15
mov rsi, r14
mov edx, ebp
call hex_decode
test eax, eax
js loc_7C01A
mov r12d, eax
lea r13d, [rbp+3]
cmp eax, 7Fh
ja short loc_7BF46
cmp [rsp+68h+var_5C], 0
jnz short loc_7BF1C
mov edx, 0Bh
lea rdi, asc_A4E3E; ";/?:@&=+$,#"
mov esi, r12d
call _memchr
inc ebp
test rax, rax
mov eax, 25h ; '%'
cmovnz r12d, eax
cmovz ebp, r13d
jmp short loc_7BF19
loc_7BF17:
inc ebp
loc_7BF19:
mov r13d, ebp
loc_7BF1C:
lea rdi, [rsp+68h+var_50]
mov esi, r12d
call string_buffer_putc
mov rax, [r14+4]
mov ecx, eax
and ecx, 7FFFFFFFh
mov ebp, r13d
cmp r13d, ecx
jl loc_7BEAC
jmp loc_7C057
loc_7BF46:
mov eax, r12d
and eax, 7FFFFFE0h
cmp eax, 0C0h
jnz short loc_7BF66
mov [rsp+68h+var_60], 80h
xor ebp, ebp
mov eax, 1Fh
jmp short loc_7BFAA
loc_7BF66:
mov eax, r12d
and eax, 7FFFFFF0h
cmp eax, 0E0h
jnz short loc_7BF89
mov [rsp+68h+var_60], 800h
mov ebp, 1
mov eax, 0Fh
jmp short loc_7BFAA
loc_7BF89:
mov eax, r12d
and eax, 7FFFFFF8h
cmp eax, 0F0h
jnz short loc_7C009
mov [rsp+68h+var_60], offset loc_10000
mov ebp, 2
mov eax, 7
loc_7BFAA:
and r12d, eax
inc ebp
loc_7BFAF:
mov ebx, r12d
mov rdi, r15
mov rsi, r14
mov edx, r13d
call hex_decode
test eax, eax
js short loc_7C01A
mov r12d, eax
and eax, 0C0h
cmp eax, 80h
jnz short loc_7C009
add r13d, 3
mov eax, ebx
shl eax, 6
and r12d, 3Fh
or r12d, eax
dec ebp
jg short loc_7BFAF
cmp r12d, [rsp+68h+var_60]
jl short loc_7C009
cmp r12d, 10FFFFh
jg short loc_7C009
and ebx, 3FFFFE0h
cmp ebx, 360h
jnz loc_7BF1C
loc_7C009:
lea rsi, aMalformedUtf8; "malformed UTF-8"
mov rdi, r15
xor eax, eax
call js_throw_URIError
loc_7C01A:
mov rdx, [rsp+68h+var_58]
cmp edx, 0FFFFFFF7h
jb short loc_7C03E
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_7C03E
mov rsi, r14
call js_free_value_rt
loc_7C03E:
mov rdi, [rsp+68h+var_50]
mov rsi, [rsp+68h+var_48]
call js_free
mov edx, 6
xor r14d, r14d
jmp short loc_7C088
loc_7C057:
mov rdx, [rsp+68h+var_58]
cmp edx, 0FFFFFFF7h
jb short loc_7C07B
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_7C07B
mov rsi, r14
call js_free_value_rt
loc_7C07B:
lea rdi, [rsp+68h+var_50]
call string_buffer_end
mov r14, rax
loc_7C088:
mov rax, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7C09A:
mov dword ptr [rsp+68h+var_40+4], 0
mov dword ptr [rsp+68h+var_40+0Ch], 0FFFFFFFFh
jmp loc_7BE9B
|
long long js_global_decodeURI(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
int v14; // ebx
unsigned int v15; // edx
_QWORD *v16; // r14
long long v17; // rax
int v18; // ebp
signed int v19; // r12d
int v20; // eax
int v21; // edx
long long v22; // rcx
int v23; // r8d
int v24; // r9d
int v25; // r13d
int v26; // ebp
int v27; // ebp
int v28; // eax
int v29; // ebp
signed int v30; // ebx
int v31; // eax
long long v33; // rdi
int v34; // eax
long long v35; // rdi
int v36; // eax
int v38; // [rsp+8h] [rbp-60h]
int v39; // [rsp+Ch] [rbp-5Ch]
unsigned int v40; // [rsp+10h] [rbp-58h]
long long v41; // [rsp+18h] [rbp-50h] BYREF
long long v42; // [rsp+20h] [rbp-48h]
__int128 v43; // [rsp+28h] [rbp-40h]
v14 = a14;
v16 = (_QWORD *)JS_ToStringInternal(
a1,
*(_DWORD **)a13,
*(_QWORD *)(a13 + 8),
0LL,
a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9);
if ( v15 == 6 )
return (long long)v16;
v39 = v14;
v40 = v15;
v41 = a1;
v43 = 0LL;
v42 = js_alloc_string(a1, 0LL, 0);
if ( !v42 )
{
DWORD1(v43) = 0;
HIDWORD(v43) = -1;
}
v17 = *(_QWORD *)((char *)v16 + 4);
if ( (v17 & 0x7FFFFFFF) == 0 )
{
LABEL_38:
if ( v40 >= 0xFFFFFFF7 )
{
v35 = *(_QWORD *)(a1 + 24);
v36 = (*(_DWORD *)v16)--;
if ( v36 <= 1 )
js_free_value_rt(v35, v16, v40);
}
return string_buffer_end(&v41);
}
v18 = 0;
while ( 1 )
{
if ( (int)v17 < 0 )
v19 = *((unsigned __int16 *)v16 + v18 + 12);
else
v19 = *((unsigned __int8 *)v16 + v18 + 24);
if ( v19 != 37 )
{
v26 = v18 + 1;
LABEL_17:
v25 = v26;
goto LABEL_18;
}
v20 = hex_decode(a1, v16, (unsigned int)v18, v18);
if ( v20 < 0 )
goto LABEL_34;
v19 = v20;
v25 = v18 + 3;
if ( (unsigned int)v20 > 0x7F )
break;
if ( !v39 )
{
v26 = v18 + 1;
if ( memchr(";/?:@&=+$,#", (unsigned int)v20, 11LL) )
v19 = 37;
else
v26 = v25;
goto LABEL_17;
}
LABEL_18:
string_buffer_putc((long long)&v41, v19);
v17 = *(_QWORD *)((char *)v16 + 4);
v18 = v25;
if ( v25 >= (*((_DWORD *)v16 + 1) & 0x7FFFFFFF) )
goto LABEL_38;
}
if ( (v20 & 0x7FFFFFE0) == 0xC0 )
{
v38 = 128;
v27 = 0;
v28 = 31;
LABEL_26:
v19 &= v28;
v29 = v27 + 1;
while ( 1 )
{
v30 = v19;
v31 = hex_decode(a1, v16, (unsigned int)v25, v22);
if ( v31 < 0 )
break;
if ( (v31 & 0xC0) != 0x80 )
goto LABEL_33;
v25 += 3;
v19 = (v19 << 6) | v31 & 0x3F;
if ( v29-- <= 1 )
{
if ( v19 >= v38 && v19 <= 1114111 && (v30 & 0x3FFFFE0) != 0x360 )
goto LABEL_18;
goto LABEL_33;
}
}
}
else
{
if ( (v20 & 0x7FFFFFF0) == 0xE0 )
{
v38 = 2048;
v27 = 1;
v28 = 15;
goto LABEL_26;
}
if ( (v20 & 0x7FFFFFF8) == 0xF0 )
{
v38 = (int)&loc_10000;
v27 = 2;
v28 = 7;
goto LABEL_26;
}
LABEL_33:
js_throw_URIError(a1, (unsigned int)"malformed UTF-8", v21, v22, v23, v24);
}
LABEL_34:
if ( v40 >= 0xFFFFFFF7 )
{
v33 = *(_QWORD *)(a1 + 24);
v34 = (*(_DWORD *)v16)--;
if ( v34 <= 1 )
js_free_value_rt(v33, v16, v40);
}
js_free(v41, v42);
return 0LL;
}
|
js_global_decodeURI:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBX,R9D
MOV R15,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x00128154
MOV R14,RAX
CMP EDX,0x6
JZ 0x0017c088
MOV dword ptr [RSP + 0xc],EBX
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x18],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x28],XMM0
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001212c2
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0017c09a
LAB_0017be9b:
MOV RAX,qword ptr [R14 + 0x4]
TEST EAX,0x7fffffff
JZ 0x0017c057
XOR EBP,EBP
LAB_0017beac:
MOVSXD RCX,EBP
TEST EAX,EAX
JS 0x0017bebb
MOVZX R12D,byte ptr [R14 + RCX*0x1 + 0x18]
JMP 0x0017bec1
LAB_0017bebb:
MOVZX R12D,word ptr [R14 + RCX*0x2 + 0x18]
LAB_0017bec1:
CMP R12D,0x25
JNZ 0x0017bf17
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x0017c6ad
TEST EAX,EAX
JS 0x0017c01a
MOV R12D,EAX
LEA R13D,[RBP + 0x3]
CMP EAX,0x7f
JA 0x0017bf46
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x0017bf1c
MOV EDX,0xb
LEA RDI,[0x1a4e3e]
MOV ESI,R12D
CALL 0x0010e440
INC EBP
TEST RAX,RAX
MOV EAX,0x25
CMOVNZ R12D,EAX
CMOVZ EBP,R13D
JMP 0x0017bf19
LAB_0017bf17:
INC EBP
LAB_0017bf19:
MOV R13D,EBP
LAB_0017bf1c:
LEA RDI,[RSP + 0x18]
MOV ESI,R12D
CALL 0x0013425d
MOV RAX,qword ptr [R14 + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
MOV EBP,R13D
CMP R13D,ECX
JL 0x0017beac
JMP 0x0017c057
LAB_0017bf46:
MOV EAX,R12D
AND EAX,0x7fffffe0
CMP EAX,0xc0
JNZ 0x0017bf66
MOV dword ptr [RSP + 0x8],0x80
XOR EBP,EBP
MOV EAX,0x1f
JMP 0x0017bfaa
LAB_0017bf66:
MOV EAX,R12D
AND EAX,0x7ffffff0
CMP EAX,0xe0
JNZ 0x0017bf89
MOV dword ptr [RSP + 0x8],0x800
MOV EBP,0x1
MOV EAX,0xf
JMP 0x0017bfaa
LAB_0017bf89:
MOV EAX,R12D
AND EAX,0x7ffffff8
CMP EAX,0xf0
JNZ 0x0017c009
MOV dword ptr [RSP + 0x8],0x10000
MOV EBP,0x2
MOV EAX,0x7
LAB_0017bfaa:
AND R12D,EAX
INC EBP
LAB_0017bfaf:
MOV EBX,R12D
MOV RDI,R15
MOV RSI,R14
MOV EDX,R13D
CALL 0x0017c6ad
TEST EAX,EAX
JS 0x0017c01a
MOV R12D,EAX
AND EAX,0xc0
CMP EAX,0x80
JNZ 0x0017c009
ADD R13D,0x3
MOV EAX,EBX
SHL EAX,0x6
AND R12D,0x3f
OR R12D,EAX
DEC EBP
JG 0x0017bfaf
CMP R12D,dword ptr [RSP + 0x8]
JL 0x0017c009
CMP R12D,0x10ffff
JG 0x0017c009
AND EBX,0x3ffffe0
CMP EBX,0x360
JNZ 0x0017bf1c
LAB_0017c009:
LEA RSI,[0x1a4e0d]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0017c71f
LAB_0017c01a:
MOV RDX,qword ptr [RSP + 0x10]
CMP EDX,-0x9
JC 0x0017c03e
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0017c03e
MOV RSI,R14
CALL 0x001219cc
LAB_0017c03e:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0011d481
MOV EDX,0x6
XOR R14D,R14D
JMP 0x0017c088
LAB_0017c057:
MOV RDX,qword ptr [RSP + 0x10]
CMP EDX,-0x9
JC 0x0017c07b
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0017c07b
MOV RSI,R14
CALL 0x001219cc
LAB_0017c07b:
LEA RDI,[RSP + 0x18]
CALL 0x001342b1
MOV R14,RAX
LAB_0017c088:
MOV RAX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017c09a:
MOV dword ptr [RSP + 0x2c],0x0
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x0017be9b
|
int * js_global_decodeURI(long param_1)
{
int8 uVar1;
bool bVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
void *pvVar6;
int *piVar7;
uint uVar8;
int iVar9;
int iVar10;
int8 *in_R8;
int in_R9D;
int iVar11;
int1 auVar12 [12];
int local_60;
long local_50;
long local_48;
ulong local_40;
int8 uStack_38;
auVar12 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
uVar8 = auVar12._8_4_;
piVar7 = auVar12._0_8_;
if (uVar8 != 6) {
local_40 = 0;
uStack_38 = 0;
local_50 = param_1;
local_48 = js_alloc_string(param_1,0,0);
if (local_48 == 0) {
local_40 = local_40 & 0xffffffff;
uStack_38 = CONCAT44(0xffffffff,(int4)uStack_38);
}
uVar5 = *(ulong *)(piVar7 + 1);
if ((uVar5 & 0x7fffffff) != 0) {
iVar9 = 0;
do {
if ((int)uVar5 < 0) {
uVar3 = (uint)*(ushort *)((long)piVar7 + (long)iVar9 * 2 + 0x18);
}
else {
uVar3 = (uint)*(byte *)((long)piVar7 + (long)iVar9 + 0x18);
}
if (uVar3 == 0x25) {
uVar3 = hex_decode(param_1,piVar7,iVar9);
if ((int)uVar3 < 0) goto LAB_0017c01a;
iVar11 = iVar9 + 3;
if (uVar3 < 0x80) {
if (in_R9D == 0) {
pvVar6 = memchr(";/?:@&=+$,#",uVar3,0xb);
if (pvVar6 != (void *)0x0) {
uVar3 = 0x25;
iVar11 = iVar9 + 1;
}
}
goto LAB_0017bf1c;
}
if ((uVar3 & 0x7fffffe0) == 0xc0) {
local_60 = 0x80;
iVar9 = 0;
uVar4 = 0x1f;
LAB_0017bfaa:
uVar3 = uVar3 & uVar4;
iVar9 = iVar9 + 1;
do {
uVar4 = uVar3;
uVar3 = hex_decode(param_1,piVar7,iVar11);
if ((int)uVar3 < 0) goto LAB_0017c01a;
if ((uVar3 & 0xc0) != 0x80) goto LAB_0017c009;
iVar11 = iVar11 + 3;
uVar3 = uVar3 & 0x3f | uVar4 << 6;
iVar10 = iVar9 + -1;
bVar2 = 0 < iVar9;
iVar9 = iVar10;
} while (iVar10 != 0 && bVar2);
if (((local_60 <= (int)uVar3) && ((int)uVar3 < 0x110000)) &&
((uVar4 & 0x3ffffe0) != 0x360)) goto LAB_0017bf1c;
}
else {
if ((uVar3 & 0x7ffffff0) == 0xe0) {
local_60 = 0x800;
iVar9 = 1;
uVar4 = 0xf;
goto LAB_0017bfaa;
}
if ((uVar3 & 0x7ffffff8) == 0xf0) {
local_60 = 0x10000;
iVar9 = 2;
uVar4 = 7;
goto LAB_0017bfaa;
}
}
LAB_0017c009:
js_throw_URIError(param_1,"malformed UTF-8");
LAB_0017c01a:
if (0xfffffff6 < uVar8) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar9 = *piVar7;
*piVar7 = iVar9 + -1;
if (iVar9 < 2) {
js_free_value_rt(uVar1,piVar7);
}
}
js_free(local_50,local_48);
return (int *)0x0;
}
iVar11 = iVar9 + 1;
LAB_0017bf1c:
iVar9 = iVar11;
string_buffer_putc(&local_50,uVar3);
uVar5 = *(ulong *)(piVar7 + 1);
} while (iVar9 < (int)((uint)uVar5 & 0x7fffffff));
}
if (0xfffffff6 < uVar8) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar9 = *piVar7;
*piVar7 = iVar9 + -1;
if (iVar9 < 2) {
js_free_value_rt(uVar1,piVar7);
}
}
piVar7 = (int *)string_buffer_end(&local_50);
}
return piVar7;
}
|
|
12,624
|
mbedtls_pk_encrypt
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pk.c
|
int mbedtls_pk_encrypt(mbedtls_pk_context *ctx,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen, size_t osize,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng)
{
PK_VALIDATE_RET(ctx != NULL);
PK_VALIDATE_RET(input != NULL || ilen == 0);
PK_VALIDATE_RET(output != NULL || osize == 0);
PK_VALIDATE_RET(olen != NULL);
if (ctx->pk_info == NULL) {
return MBEDTLS_ERR_PK_BAD_INPUT_DATA;
}
if (ctx->pk_info->encrypt_func == NULL) {
return MBEDTLS_ERR_PK_TYPE_MISMATCH;
}
return ctx->pk_info->encrypt_func(ctx->pk_ctx, input, ilen,
output, olen, osize, f_rng, p_rng);
}
|
O3
|
c
|
mbedtls_pk_encrypt:
movq (%rdi), %rax
testq %rax, %rax
je 0x8bb27
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x8bb2d
movq 0x8(%rdi), %rdi
jmpq *%rax
movl $0xffffc180, %eax # imm = 0xFFFFC180
retq
movl $0xffffc100, %eax # imm = 0xFFFFC100
retq
|
mbedtls_pk_encrypt:
mov rax, [rdi]
test rax, rax
jz short loc_8BB27
mov rax, [rax+38h]
test rax, rax
jz short loc_8BB2D
mov rdi, [rdi+8]
jmp rax
loc_8BB27:
mov eax, 0FFFFC180h
retn
loc_8BB2D:
mov eax, 0FFFFC100h
retn
|
long long mbedtls_pk_encrypt(_QWORD *a1)
{
long long ( *v1)(_QWORD); // rax
if ( !*a1 )
return 4294951296LL;
v1 = *(long long ( **)(_QWORD))(*a1 + 56LL);
if ( v1 )
return v1(a1[1]);
else
return 4294951168LL;
}
|
mbedtls_pk_encrypt:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0018bb27
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JZ 0x0018bb2d
MOV RDI,qword ptr [RDI + 0x8]
JMP RAX
LAB_0018bb27:
MOV EAX,0xffffc180
RET
LAB_0018bb2d:
MOV EAX,0xffffc100
RET
|
int8 mbedtls_pk_encrypt(long *param_1)
{
code *UNRECOVERED_JUMPTABLE;
int8 uVar1;
if (*param_1 == 0) {
return 0xffffc180;
}
UNRECOVERED_JUMPTABLE = *(code **)(*param_1 + 0x38);
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
/* WARNING: Could not recover jumptable at 0x0018bb25. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*UNRECOVERED_JUMPTABLE)(param_1[1]);
return uVar1;
}
return 0xffffc100;
}
|
|
12,625
|
ma_read_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
int _ma_read_static_record(register MARIA_HA *info, register uchar *record,
MARIA_RECORD_POS pos)
{
int error;
DBUG_ENTER("_ma_read_static_record");
if (pos != HA_OFFSET_ERROR)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <= pos &&
flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
info->rec_cache.seek_not_done=1; /* We have done a seek */
error= (int) info->s->file_read(info, record,info->s->base.reclength,
pos, MYF(MY_NABP));
if (! error)
{
fast_ma_writeinfo(info);
if (!*record)
{
/* Record is deleted */
DBUG_PRINT("warning", ("Record is deleted"));
DBUG_RETURN((my_errno=HA_ERR_RECORD_DELETED));
}
info->update|= HA_STATE_AKTIV; /* Record is read */
DBUG_RETURN(0);
}
}
fast_ma_writeinfo(info); /* No such record */
DBUG_RETURN(my_errno);
}
|
O3
|
c
|
ma_read_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $-0x1, %rdx
je 0x421db
movq %rdx, %r15
movq %rsi, %r14
testb $0x10, 0x61c(%rbx)
je 0x421ae
cmpq %r15, 0x4b8(%rbx)
ja 0x421ae
leaq 0x4b8(%rbx), %rdi
movl $0x1, %esi
callq 0x9b591
testl %eax, %eax
jne 0x421f1
movl $0x1, 0x598(%rbx)
movq (%rbx), %rax
movq 0x398(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x6e0(%rax)
testl %eax, %eax
je 0x42203
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x421f1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40bce
callq 0xa7c22
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x42219
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40bce
cmpb $0x0, (%r14)
je 0x4222a
orb $0x2, 0x624(%rbx)
xorl %eax, %eax
jmp 0x421f8
callq 0xa7c22
movl $0x86, (%rax)
movl $0x86, %eax
jmp 0x421f8
|
_ma_read_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_421DB
mov r15, rdx
mov r14, rsi
test byte ptr [rbx+61Ch], 10h
jz short loc_421AE
cmp [rbx+4B8h], r15
ja short loc_421AE
lea rdi, [rbx+4B8h]
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz short loc_421F1
loc_421AE:
mov dword ptr [rbx+598h], 1
mov rax, [rbx]
mov rdx, [rax+398h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+6E0h]
test eax, eax
jz short loc_42203
loc_421DB:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_421F1
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_421F1:
call _my_thread_var
mov eax, [rax]
loc_421F8:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_42203:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_42219
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_42219:
cmp byte ptr [r14], 0
jz short loc_4222A
or byte ptr [rbx+624h], 2
xor eax, eax
jmp short loc_421F8
loc_4222A:
call _my_thread_var
mov dword ptr [rax], 86h
mov eax, 86h
jmp short loc_421F8
|
long long ma_read_static_record(long long a1, const char *a2, unsigned long long a3)
{
long long v3; // rbx
char *v5; // r14
v3 = a1;
if ( a3 == -1LL )
goto LABEL_17;
v5 = (char *)a2;
if ( (*(_BYTE *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) <= a3 )
{
a1 += 1208LL;
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(a1, 1LL) )
return *(unsigned int *)my_thread_var(a1, a2);
}
*(_DWORD *)(v3 + 1432) = 1;
a1 = v3;
a2 = v5;
if ( (*(unsigned int ( **)(long long, char *, _QWORD, unsigned long long, long long))(*(_QWORD *)v3 + 1760LL))(
v3,
v5,
*(_QWORD *)(*(_QWORD *)v3 + 920LL),
a3,
4LL) )
{
LABEL_17:
if ( !*(_DWORD *)(*(_QWORD *)v3 + 1976LL) )
{
a1 = v3;
a2 = 0LL;
ma_writeinfo((long long *)v3, 0LL);
}
return *(unsigned int *)my_thread_var(a1, a2);
}
if ( !*(_DWORD *)(*(_QWORD *)v3 + 1976LL) )
{
a1 = v3;
a2 = 0LL;
ma_writeinfo((long long *)v3, 0LL);
}
if ( *v5 )
{
*(_BYTE *)(v3 + 1572) |= 2u;
return 0LL;
}
else
{
*(_DWORD *)my_thread_var(a1, a2) = 134;
return 134LL;
}
}
|
_ma_read_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP RDX,-0x1
JZ 0x001421db
MOV R15,RDX
MOV R14,RSI
TEST byte ptr [RBX + 0x61c],0x10
JZ 0x001421ae
CMP qword ptr [RBX + 0x4b8],R15
JA 0x001421ae
LEA RDI,[RBX + 0x4b8]
MOV ESI,0x1
CALL 0x0019b591
TEST EAX,EAX
JNZ 0x001421f1
LAB_001421ae:
MOV dword ptr [RBX + 0x598],0x1
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x398]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x6e0]
TEST EAX,EAX
JZ 0x00142203
LAB_001421db:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x001421f1
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00140bce
LAB_001421f1:
CALL 0x001a7c22
MOV EAX,dword ptr [RAX]
LAB_001421f8:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00142203:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00142219
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00140bce
LAB_00142219:
CMP byte ptr [R14],0x0
JZ 0x0014222a
OR byte ptr [RBX + 0x624],0x2
XOR EAX,EAX
JMP 0x001421f8
LAB_0014222a:
CALL 0x001a7c22
MOV dword ptr [RAX],0x86
MOV EAX,0x86
JMP 0x001421f8
|
int4 _ma_read_static_record(long *param_1,char *param_2,ulong param_3)
{
int iVar1;
int4 *puVar2;
if (param_3 != 0xffffffffffffffff) {
if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] <= param_3)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 != 0)) goto LAB_001421f1;
*(int4 *)(param_1 + 0xb3) = 1;
iVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),param_3,4);
if (iVar1 == 0) {
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
if (*param_2 != '\0') {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2;
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x86;
return 0x86;
}
}
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
LAB_001421f1:
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
|
|
12,626
|
ma_column_nr_write
|
eloqsql/storage/maria/ma_open.c
|
my_bool _ma_column_nr_write(File file, uint16 *offsets, uint columns)
{
uchar *buff, *ptr, *end;
size_t size= columns*2;
my_bool res;
if (!(buff= (uchar*) my_alloca(size)))
return 1;
for (ptr= buff, end= ptr + size; ptr < end ; ptr+= 2, offsets++)
int2store(ptr, *offsets);
res= mysql_file_write(file, buff, size, MYF(MY_NABP)) != 0;
my_afree(buff);
return res;
}
|
O3
|
c
|
ma_column_nr_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebx
movl %edi, %r14d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
addl %ebx, %ebx
movq %rsp, %r15
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
testl %ebx, %ebx
je 0x6bd39
leaq (%r15,%rbx), %rax
movq %r15, %rcx
orq $0x2, %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %r15, %rdx
notq %rdx
addq %rcx, %rdx
andq $-0x2, %rdx
addq $0x2, %rdx
movq %r15, %rdi
callq 0x29080
leaq 0x31a2d0(%rip), %r13 # 0x386010
movq (%r13), %rax
leaq -0x78(%rbp), %rdi
movl %r14d, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6bd95
movl $0x4, %ecx
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2efe4
movq %rax, %r14
testq %r14, %r14
setne %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x6bde2
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq (%r13), %rax
leaq 0x6ec2f(%rip), %rdx # 0xda9d2
movq %r12, %rdi
movq %rbx, %rsi
movl $0x79a, %ecx # imm = 0x79A
callq *0x210(%rax)
movl $0x4, %ecx
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2efe4
movq %rax, %r14
xorl %esi, %esi
testq %rax, %rax
cmoveq %rbx, %rsi
movq (%r13), %rax
movq %r12, %rdi
callq *0x218(%rax)
jmp 0x6bd71
callq 0x29250
|
_ma_column_nr_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov ebx, edx
mov r14d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
add ebx, ebx
mov r15, rsp
lea rax, [rbx+0Fh]
and rax, 0FFFFFFFFFFFFFFF0h
sub r15, rax
mov rsp, r15
test ebx, ebx
jz short loc_6BD39
lea rax, [r15+rbx]
mov rcx, r15
or rcx, 2
cmp rax, rcx
cmova rcx, rax
mov rdx, r15
not rdx
add rdx, rcx
and rdx, 0FFFFFFFFFFFFFFFEh
add rdx, 2
mov rdi, r15
call _memcpy
loc_6BD39:
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_78]
mov esi, r14d
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6BD95
mov ecx, 4
mov edi, r14d
mov rsi, r15
mov rdx, rbx
call my_write
mov r14, rax
loc_6BD71:
test r14, r14
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_6BDE2
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6BD95:
mov r12, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov rsi, rbx
mov ecx, 79Ah
call qword ptr [rax+210h]
mov ecx, 4
mov edi, r14d
mov rsi, r15
mov rdx, rbx
call my_write
mov r14, rax
xor esi, esi
test rax, rax
cmovz rsi, rbx
mov rax, [r13+0]
mov rdi, r12
call qword ptr [rax+218h]
jmp short loc_6BD71
loc_6BDE2:
call ___stack_chk_fail
|
// bad sp value at call has been detected, the output may be wrong!
bool ma_column_nr_write(unsigned int a1, long long a2, int a3)
{
long long v3; // rbx
unsigned long long v4; // r15
long long v5; // rcx
long long v6; // rax
long long v7; // r14
long long v9; // r12
long long v10; // rsi
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
unsigned long long v13; // [rsp+50h] [rbp-30h]
v13 = __readfsqword(0x28u);
v3 = (unsigned int)(2 * a3);
v4 = (unsigned long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8];
if ( (_DWORD)v3 )
{
v5 = v4 | 2;
if ( v4 + v3 > (v4 | 2) )
v5 = v4 + v3;
memcpy(&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], a2, ((v5 + ~v4) & 0xFFFFFFFFFFFFFFFELL) + 2);
}
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, a1, 7LL);
if ( v6 )
{
v9 = v6;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v6,
v3,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",
1946LL);
v7 = my_write(a1, (long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], v3, 4LL);
v10 = 0LL;
if ( !v7 )
v10 = v3;
((void ( *)(long long, long long))PSI_server[67])(v9, v10);
}
else
{
v7 = my_write(a1, (long long)&v12[-((v3 + 15) & 0xFFFFFFFFFFFFFFF0LL) - 8], v3, 4LL);
}
return v7 != 0;
}
|
_ma_column_nr_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV EBX,EDX
MOV R14D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
ADD EBX,EBX
MOV R15,RSP
LEA RAX,[RBX + 0xf]
AND RAX,-0x10
SUB R15,RAX
MOV RSP,R15
TEST EBX,EBX
JZ 0x0016bd39
LEA RAX,[R15 + RBX*0x1]
MOV RCX,R15
OR RCX,0x2
CMP RAX,RCX
CMOVA RCX,RAX
MOV RDX,R15
NOT RDX
ADD RDX,RCX
AND RDX,-0x2
ADD RDX,0x2
MOV RDI,R15
CALL 0x00129080
LAB_0016bd39:
LEA R13,[0x486010]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x78]
MOV ESI,R14D
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016bd95
MOV ECX,0x4
MOV EDI,R14D
MOV RSI,R15
MOV RDX,RBX
CALL 0x0012efe4
MOV R14,RAX
LAB_0016bd71:
TEST R14,R14
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0016bde2
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016bd95:
MOV R12,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1da9d2]
MOV RDI,R12
MOV RSI,RBX
MOV ECX,0x79a
CALL qword ptr [RAX + 0x210]
MOV ECX,0x4
MOV EDI,R14D
MOV RSI,R15
MOV RDX,RBX
CALL 0x0012efe4
MOV R14,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVZ RSI,RBX
MOV RAX,qword ptr [R13]
MOV RDI,R12
CALL qword ptr [RAX + 0x218]
JMP 0x0016bd71
LAB_0016bde2:
CALL 0x00129250
|
bool _ma_column_nr_write(int4 param_1,void *param_2,int param_3)
{
code *pcVar1;
long lVar2;
long lVar3;
long lVar4;
int1 *puVar5;
ulong uVar6;
ulong uVar7;
int1 *__dest;
long in_FS_OFFSET;
int8 uStack_90;
int1 auStack_88 [8];
int1 local_80 [72];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar6 = (ulong)(uint)(param_3 * 2);
lVar2 = -(uVar6 + 0xf & 0xfffffffffffffff0);
__dest = auStack_88 + lVar2;
if (param_3 * 2 != 0) {
puVar5 = (int1 *)((ulong)__dest | 2);
if ((int1 *)((ulong)__dest | 2) < __dest + uVar6) {
puVar5 = __dest + uVar6;
}
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bd39;
memcpy(__dest,param_2,((ulong)(puVar5 + ~(ulong)__dest) & 0xfffffffffffffffe) + 2);
}
pcVar1 = *(code **)(PSI_server + 0x158);
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bd56;
lVar3 = (*pcVar1)(local_80,param_1,7);
if (lVar3 == 0) {
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bd6e;
lVar4 = my_write(param_1,__dest,uVar6,4);
}
else {
pcVar1 = *(code **)(PSI_server + 0x210);
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bdb4;
(*pcVar1)(lVar3,uVar6,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x79a);
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bdc7;
lVar4 = my_write(param_1,__dest,uVar6,4);
uVar7 = 0;
if (lVar4 == 0) {
uVar7 = uVar6;
}
pcVar1 = *(code **)(PSI_server + 0x218);
*(int8 *)((long)&uStack_90 + lVar2) = 0x16bde0;
(*pcVar1)(lVar3,uVar7);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return lVar4 != 0;
}
/* WARNING: Subroutine does not return */
*(code **)((long)&uStack_90 + lVar2) = _ma_set_data_pagecache_callbacks;
__stack_chk_fail();
}
|
|
12,627
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O0
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
subq $0x3d8, %rsp # imm = 0x3D8
movq %rdi, 0x3d0(%rsp)
movq %rsi, 0x3c8(%rsp)
movq %rdx, 0x3c0(%rsp)
movq 0x3d0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x3c8(%rsp), %rsi
movq 0x3c0(%rsp), %rdx
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x148216
jmp 0x1485d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
movl 0x3b4(%rsp), %eax
movl %eax, 0x14(%rsp)
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x1482e5
movq 0x3b8(%rsp), %rdi
callq 0x590e0
movq %rax, 0x1e0(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5a050
jmp 0x148268
movq 0x1e0(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x599f0
jmp 0x148288
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x108fb0
testb $0x1, %al
jne 0x14829f
jmp 0x14851f
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x10c710
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x48(%rsp), %rdi
callq 0xf2a40
jmp 0x1482c5
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x59520
jmp 0x1482d6
leaq 0x48(%rsp), %rdi
callq 0x5a4d8
jmp 0x14851f
movl 0x14(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1485df
movq 0x3b8(%rsp), %rdi
callq 0x590e0
movq %rax, 0x3a8(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x5a050
jmp 0x14831a
movq 0x3a8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq 0x230(%rsp), %rdi
callq 0x599f0
jmp 0x14833d
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x108fb0
testb $0x1, %al
jne 0x148354
jmp 0x1483fb
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x10c710
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x210(%rsp), %rdi
callq 0xf2a40
jmp 0x14837d
leaq 0x230(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x59520
jmp 0x148394
leaq 0x210(%rsp), %rdi
callq 0x5a4d8
jmp 0x1483fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x1484be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x1484b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x5a4d8
jmp 0x1484b1
movb $0x1, 0x1ef(%rsp)
movl $0x10, %edi
callq 0x59660
movq %rax, 0x8(%rsp)
leaq 0x1f0(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x5a3c0
jmp 0x148429
movq 0x8(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x594a0
jmp 0x14843d
movq 0x8(%rsp), %rdi
movb $0x0, 0x1ef(%rsp)
movq 0x157b5f(%rip), %rsi # 0x29ffb0
movq 0x157b20(%rip), %rdx # 0x29ff78
callq 0x59ac0
jmp 0x1485f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x148499
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x5a4d8
testb $0x1, 0x1ef(%rsp)
jne 0x1484a5
jmp 0x1484af
movq 0x8(%rsp), %rdi
callq 0x59f20
jmp 0x1484b1
leaq 0x230(%rsp), %rdi
callq 0x59f70
callq 0x59d70
jmp 0x1484c5
jmp 0x1485df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x1485ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x1485c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5a4d8
jmp 0x1485c4
movb $0x1, 0x27(%rsp)
movl $0x18, %edi
callq 0x59660
movq %rax, (%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5a3c0
jmp 0x148543
movq (%rsp), %rdi
movq 0x1e0(%rsp), %rax
movl 0x10(%rax), %edx
leaq 0x28(%rsp), %rsi
callq 0x148650
jmp 0x14855e
movq (%rsp), %rdi
movb $0x0, 0x27(%rsp)
leaq 0x156912(%rip), %rsi # 0x29ee80
leaq 0x12b(%rip), %rdx # 0x1486a0
callq 0x59ac0
jmp 0x1485f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0x1485b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5a4d8
testb $0x1, 0x27(%rsp)
jne 0x1485b9
jmp 0x1485c2
movq (%rsp), %rdi
callq 0x59f20
jmp 0x1485c4
leaq 0x68(%rsp), %rdi
callq 0x59f70
callq 0x59d70
jmp 0x1485d5
jmp 0x1485df
addq $0x3d8, %rsp # imm = 0x3D8
retq
movq 0x3b8(%rsp), %rdi
callq 0x59b80
movq %rax, %rdi
callq 0x61980
nopw %cs:(%rax,%rax)
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
sub rsp, 3D8h
mov [rsp+3D8h+var_8], rdi
mov [rsp+3D8h+var_10], rsi
mov [rsp+3D8h+var_18], rdx
mov rdi, [rsp+3D8h+var_8]
mov [rsp+3D8h+var_3C0], rdi
mov rsi, [rsp+3D8h+var_10]
mov rdx, [rsp+3D8h+var_18]
mov rax, [rdi]
mov rax, [rax]
call rax
jmp short $+2
loc_148216:
jmp loc_1485D7
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
mov eax, [rsp+3D8h+var_24]
mov [rsp+3D8h+var_3C4], eax
mov ecx, 2
cmp eax, ecx
jnz loc_1482E5
mov rdi, [rsp+3D8h+var_20]; void *
call ___cxa_begin_catch
mov [rsp+3D8h+var_1F8], rax
lea rdi, [rsp+3D8h+var_370]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_148268:
mov rdi, [rsp+3D8h+var_1F8]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
lea rdi, [rsp+3D8h+var_370]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_148288:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_14829F
jmp loc_14851F
loc_14829F:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rsi, rax
mov rax, [rsp+3D8h+var_3C0]
mov rdx, [rax+18h]
lea rdi, [rsp+3D8h+var_390]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
jmp short $+2
loc_1482C5:
lea rdi, [rsp+3D8h+var_370]
lea rsi, [rsp+3D8h+var_390]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_1482D6:
lea rdi, [rsp+3D8h+var_390]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_14851F
loc_1482E5:
mov eax, [rsp+3D8h+var_3C4]
mov ecx, 1
cmp eax, ecx
jnz loc_1485DF
mov rdi, [rsp+3D8h+var_20]; void *
call ___cxa_begin_catch
mov [rsp+3D8h+var_30], rax
lea rdi, [rsp+3D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_14831A:
mov rdi, [rsp+3D8h+var_30]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
lea rdi, [rsp+3D8h+var_1A8]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_14833D:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_148354
jmp loc_1483FB
loc_148354:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rsi, rax
mov rax, [rsp+3D8h+var_3C0]
mov rdx, [rax+18h]
lea rdi, [rsp+3D8h+var_1C8]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
jmp short $+2
loc_14837D:
lea rdi, [rsp+3D8h+var_1A8]
lea rsi, [rsp+3D8h+var_1C8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_148394:
lea rdi, [rsp+3D8h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1483FB
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_1484BE
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_1484B1
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_1484B1
loc_1483FB:
mov [rsp+3D8h+var_1E9], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+3D8h+var_3D0], rax
lea rdi, [rsp+3D8h+var_1E8]
lea rsi, [rsp+3D8h+var_1A8]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_148429:
mov rdi, [rsp+3D8h+var_3D0]
lea rsi, [rsp+3D8h+var_1E8]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_14843D:
mov rdi, [rsp+3D8h+var_3D0]; void *
mov [rsp+3D8h+var_1E9], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_1485F4
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp short loc_148499
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_148499:
test [rsp+3D8h+var_1E9], 1
jnz short loc_1484A5
jmp short loc_1484AF
loc_1484A5:
mov rdi, [rsp+3D8h+var_3D0]; void *
call ___cxa_free_exception
loc_1484AF:
jmp short $+2
loc_1484B1:
lea rdi, [rsp+3D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_1484BE:
call ___cxa_end_catch
jmp short $+2
loc_1484C5:
jmp loc_1485DF
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_1485CE
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_1485C4
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_390]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_1485C4
loc_14851F:
mov [rsp+3D8h+var_3B1], 1
mov edi, 18h; thrown_size
call ___cxa_allocate_exception
mov [rsp+3D8h+var_3D8], rax
lea rdi, [rsp+3D8h+var_3B0]
lea rsi, [rsp+3D8h+var_370]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_148543:
mov rdi, [rsp+3D8h+var_3D8]
mov rax, [rsp+3D8h+var_1F8]
mov edx, [rax+10h]
lea rsi, [rsp+3D8h+var_3B0]
call _ZN5minja20LoopControlExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15LoopControlTypeE; minja::LoopControlException::LoopControlException(std::string const&,minja::LoopControlType)
jmp short $+2
loc_14855E:
mov rdi, [rsp+3D8h+var_3D8]; void *
mov [rsp+3D8h+var_3B1], 0
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
lea rdx, _ZN5minja20LoopControlExceptionD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_1485F4
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp short loc_1485B0
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_3B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1485B0:
test [rsp+3D8h+var_3B1], 1
jnz short loc_1485B9
jmp short loc_1485C2
loc_1485B9:
mov rdi, [rsp+3D8h+var_3D8]; void *
call ___cxa_free_exception
loc_1485C2:
jmp short $+2
loc_1485C4:
lea rdi, [rsp+3D8h+var_370]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_1485CE:
call ___cxa_end_catch
jmp short $+2
loc_1485D5:
jmp short loc_1485DF
loc_1485D7:
add rsp, 3D8h
retn
loc_1485DF:
mov rdi, [rsp+3D8h+var_20]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
loc_1485F4:
nop word ptr [rax+rax+00000000h]
xchg ax, ax
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
| |||
12,628
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O3
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x993cf
movq %rbx, %rdi
callq 0x1a370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab30
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a850
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x99454
movl $0x18, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad50
movl 0x10(%rbx), %ebx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1aa70
leaq 0x8fc61(%rip), %rax # 0x129008
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
xorl %ebp, %ebp
leaq 0x8fc35(%rip), %rsi # 0x128ff0
movq 0x90bb6(%rip), %rdx # 0x129f78
movq %r14, %rdi
callq 0x1aea0
jmp 0x99454
cmpl $0x1, %edx
jne 0x995f1
movq %rbx, %rdi
callq 0x1a370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab30
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a850
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x9949a
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad50
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0x90ba3(%rip), %rsi # 0x129fe8
movq 0x90b0c(%rip), %rdx # 0x129f58
movq %r14, %rdi
callq 0x1aea0
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x76c40
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1a9a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99371
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x99371
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x76c40
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1a9a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99410
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x99410
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9959c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x9959c
jmp 0x99599
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x995c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x995c9
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99551
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0x9955b
jmp 0x9959c
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a640
jmp 0x9959c
jmp 0x995c6
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99585
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0x9958f
jmp 0x995c9
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a640
jmp 0x995c9
movq %rax, %rbx
movq 0x909cd(%rip), %rsi # 0x129f70
leaq 0x28(%rsp), %rdi
callq 0x1a480
leaq 0x98(%rsp), %rdi
callq 0x1a2a0
jmp 0x995bf
movq %rax, %rbx
callq 0x1ade0
jmp 0x995f1
movq %rax, %rbx
movq 0x909a0(%rip), %rsi # 0x129f70
leaq 0x28(%rsp), %rdi
callq 0x1a480
leaq 0x98(%rsp), %rdi
callq 0x1a2a0
jmp 0x995ec
movq %rax, %rbx
callq 0x1ade0
movq %rbx, %rdi
callq 0x1af20
movq %rax, %rdi
callq 0x20769
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_993CF
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]; int
test rsi, rsi
jnz loc_99454
loc_99371:
mov edi, 18h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov ebx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_0019931f:
CALL qword ptr [RAX]
LAB_00199321:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 0019931f to 00199320 has its CatchHandler @ 0019932d */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
12,629
|
ggml_threadpool_params_from_cpu_params(cpu_params const&)
|
monkey531[P]llama/common/common.cpp
|
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) {
struct ggml_threadpool_params tpp;
ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults
if (params.mask_valid) {
std::memcpy(&tpp.cpumask, ¶ms.cpumask, GGML_MAX_N_THREADS);
}
tpp.prio = params.priority;
tpp.poll = params.poll;
tpp.strict_cpu = params.strict_cpu;
return tpp;
}
|
O3
|
cpp
|
ggml_threadpool_params_from_cpu_params(cpu_params const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x1daa0
cmpb $0x1, 0x204(%r14)
jne 0x98bf3
leaq 0x4(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
callq 0x1d9e0
movl 0x208(%r14), %eax
movl %eax, 0x204(%rbx)
movl 0x210(%r14), %eax
movl %eax, 0x208(%rbx)
movb 0x20c(%r14), %al
movb %al, 0x20c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov esi, [rsi]
call _ggml_threadpool_params_init
cmp byte ptr [r14+204h], 1
jnz short loc_98BF3
lea rsi, [r14+4]
mov edx, 200h
mov rdi, rbx
call _memcpy
loc_98BF3:
mov eax, [r14+208h]
mov [rbx+204h], eax
mov eax, [r14+210h]
mov [rbx+208h], eax
mov al, [r14+20Ch]
mov [rbx+20Ch], al
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2)
{
ggml_threadpool_params_init(a1, *a2);
if ( *((_BYTE *)a2 + 516) == 1 )
memcpy(a1, a2 + 1, 512LL);
*(_DWORD *)(a1 + 516) = a2[130];
*(_DWORD *)(a1 + 520) = a2[132];
*(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524);
return a1;
}
|
ggml_threadpool_params_from_cpu_params:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RSI]
CALL 0x0011daa0
CMP byte ptr [R14 + 0x204],0x1
JNZ 0x00198bf3
LEA RSI,[R14 + 0x4]
MOV EDX,0x200
MOV RDI,RBX
CALL 0x0011d9e0
LAB_00198bf3:
MOV EAX,dword ptr [R14 + 0x208]
MOV dword ptr [RBX + 0x204],EAX
MOV EAX,dword ptr [R14 + 0x210]
MOV dword ptr [RBX + 0x208],EAX
MOV AL,byte ptr [R14 + 0x20c]
MOV byte ptr [RBX + 0x20c],AL
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */
cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1)
{
int4 *in_RSI;
ggml_threadpool_params_init(param_1,*in_RSI);
if (*(char *)(in_RSI + 0x81) == '\x01') {
memcpy(param_1,in_RSI + 1,0x200);
}
*(int4 *)(param_1 + 0x204) = in_RSI[0x82];
*(int4 *)(param_1 + 0x208) = in_RSI[0x84];
param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83);
return param_1;
}
|
|
12,630
|
my_instr_mb
|
eloqsql/strings/ctype-mb.c
|
uint my_instr_mb(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const char *end, *b0;
int res= 0;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
b0= b;
end= b+b_length-s_length+1;
while (b < end)
{
int mb_len;
if (!my_ci_strnncoll(cs, (const uchar *) b, s_length,
(const uchar *) s, s_length, 0))
{
if (nmatch)
{
match[0].beg= 0;
match[0].end= (uint) (b-b0);
match[0].mb_len= res;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= 0; /* Not computed */
}
}
return 2;
}
mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1;
b+= mb_len;
b_length-= mb_len;
res++;
}
}
return 0;
}
|
O0
|
c
|
my_instr_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x4eebe
cmpq $0x0, -0x30(%rbp)
jne 0x4eda1
cmpl $0x0, 0x10(%rbp)
je 0x4ed95
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4eec5
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4eebc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x4eed0
cmpl $0x0, %eax
jne 0x4ee5d
cmpl $0x0, 0x10(%rbp)
je 0x4ee54
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x4ee52
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0x4ee54
movl $0x2, -0x4(%rbp)
jmp 0x4eec5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x4de60
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x4ee7e
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x4ee88
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x4ee88
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movslq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x4edc2
jmp 0x4eebe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
|
my_instr_mb:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_4C], 0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
ja loc_4EEBE
cmp [rbp+var_30], 0
jnz short loc_4EDA1
cmp [rbp+arg_0], 0
jz short loc_4ED95
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_4ED95:
mov [rbp+var_4], 1
jmp loc_4EEC5
loc_4EDA1:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_40], rax
loc_4EDC2:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb loc_4EEBC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
xor r9d, r9d
call my_ci_strnncoll_0
cmp eax, 0
jnz short loc_4EE5D
cmp [rbp+arg_0], 0
jz short loc_4EE54
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_4EE52
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov dword ptr [rax+14h], 0
loc_4EE52:
jmp short $+2
loc_4EE54:
mov [rbp+var_4], 2
jmp short loc_4EEC5
loc_4EE5D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_40]
call my_ismbchar_0
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_4EE7E
mov eax, [rbp+var_50]
mov [rbp+var_54], eax
jmp short loc_4EE88
loc_4EE7E:
mov eax, 1
mov [rbp+var_54], eax
jmp short $+2
loc_4EE88:
mov eax, [rbp+var_54]
mov [rbp+var_50], eax
mov ecx, [rbp+var_50]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
movsxd rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_4EDC2
loc_4EEBC:
jmp short $+2
loc_4EEBE:
mov [rbp+var_4], 0
loc_4EEC5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long my_instr_mb(
long long a1,
unsigned long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+10h] [rbp-50h]
int v10; // [rsp+14h] [rbp-4Ch]
unsigned long long v11; // [rsp+20h] [rbp-40h]
unsigned long long v15; // [rsp+40h] [rbp-20h]
unsigned long long v16; // [rsp+48h] [rbp-18h]
v16 = a2;
v15 = a3;
v10 = 0;
if ( a5 > a3 )
return 0;
if ( a5 )
{
v11 = a3 + a2 - a5 + 1;
while ( v16 < v11 )
{
if ( !(unsigned int)my_ci_strnncoll_0(a1, v16, a5, a4, a5, 0LL) )
{
if ( a7 )
{
*a6 = 0;
a6[1] = v16 - a2;
a6[2] = v10;
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = 0;
}
}
return 2;
}
v9 = my_ismbchar_0(a1, v16, v11);
if ( v9 )
v8 = v9;
else
v8 = 1;
v16 += v8;
v15 -= v8;
++v10;
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
|
my_instr_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x4c],0x0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0014eebe
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0014eda1
CMP dword ptr [RBP + 0x10],0x0
JZ 0x0014ed95
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x0
LAB_0014ed95:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014eec5
LAB_0014eda1:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0014edc2:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014eebc
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
XOR R9D,R9D
CALL 0x0014eed0
CMP EAX,0x0
JNZ 0x0014ee5d
CMP dword ptr [RBP + 0x10],0x0
JZ 0x0014ee54
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],ECX
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + 0x10],0x1
JBE 0x0014ee52
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x4]
ADD RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x14],0x0
LAB_0014ee52:
JMP 0x0014ee54
LAB_0014ee54:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0014eec5
LAB_0014ee5d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0014de60
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x0014ee7e
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0014ee88
LAB_0014ee7e:
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0014ee88
LAB_0014ee88:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x50],EAX
MOV ECX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSXD RCX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0014edc2
LAB_0014eebc:
JMP 0x0014eebe
LAB_0014eebe:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014eec5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
my_instr_mb(int8 param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5,
int4 *param_6,uint param_7)
{
int iVar1;
ulong uVar2;
int local_5c;
int local_54;
ulong local_20;
local_54 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = 0;
param_6[2] = 0;
}
return 1;
}
uVar2 = ((param_2 + param_3) - param_5) + 1;
for (local_20 = param_2; local_20 < uVar2; local_20 = local_20 + (long)local_5c) {
iVar1 = my_ci_strnncoll(param_1,local_20,param_5,param_4,param_5,0);
if (iVar1 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = (int)local_20 - (int)param_2;
param_6[2] = local_54;
if (1 < param_7) {
param_6[3] = param_6[1];
param_6[4] = param_6[1] + (int)param_5;
param_6[5] = 0;
}
}
return 2;
}
local_5c = my_ismbchar(param_1,local_20,uVar2);
if (local_5c == 0) {
local_5c = 1;
}
local_54 = local_54 + 1;
}
}
return 0;
}
|
|
12,631
|
ggml_vec_dot_q5_1_q8_1
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
const int qk = QK8_1;
const int nb = n / qk;
assert(n % qk == 0);
assert(qk == QK5_1);
const block_q5_1 * restrict x = vx;
const block_q8_1 * restrict y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
float summs0 = 0.0f;
float summs1 = 0.0f;
uint32_t qh0;
uint32_t qh1;
uint64_t tmp0[4];
uint64_t tmp1[4];
assert(nb % 2 == 0); // TODO: handle odd nb
for (int i = 0; i < nb; i += 2) {
const block_q5_1 * restrict x0 = &x[i];
const block_q5_1 * restrict x1 = &x[i + 1];
const block_q8_1 * restrict y0 = &y[i];
const block_q8_1 * restrict y1 = &y[i + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
summs0 += GGML_FP16_TO_FP32(x0->m) * y0->s;
summs1 += GGML_FP16_TO_FP32(x1->m) * y1->s;
// extract the 5th bit via lookup table ((b) << 4)
memcpy(&qh0, x0->qh, sizeof(qh0));
memcpy(&qh1, x1->qh, sizeof(qh1));
tmp0[0] = table_b2b_0[(qh0 >> 0) & 0xFF];
tmp0[1] = table_b2b_0[(qh0 >> 8) & 0xFF];
tmp0[2] = table_b2b_0[(qh0 >> 16) & 0xFF];
tmp0[3] = table_b2b_0[(qh0 >> 24) ];
tmp1[0] = table_b2b_0[(qh1 >> 0) & 0xFF];
tmp1[1] = table_b2b_0[(qh1 >> 8) & 0xFF];
tmp1[2] = table_b2b_0[(qh1 >> 16) & 0xFF];
tmp1[3] = table_b2b_0[(qh1 >> 24) ];
const int8x16_t qhl0 = vld1q_s8((const int8_t *)(tmp0 + 0));
const int8x16_t qhh0 = vld1q_s8((const int8_t *)(tmp0 + 2));
const int8x16_t qhl1 = vld1q_s8((const int8_t *)(tmp1 + 0));
const int8x16_t qhh1 = vld1q_s8((const int8_t *)(tmp1 + 2));
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// add high bit
const int8x16_t v0_0lf = vorrq_s8(v0_0l, qhl0);
const int8x16_t v0_0hf = vorrq_s8(v0_0h, qhh0);
const int8x16_t v0_1lf = vorrq_s8(v0_1l, qhl1);
const int8x16_t v0_1hf = vorrq_s8(v0_1h, qhh1);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_0lf, v1_0l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_0hf, v1_0h))), GGML_FP16_TO_FP32(x0->d)*y0->d);
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_1lf, v1_1l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_1hf, v1_1h))), GGML_FP16_TO_FP32(x1->d)*y1->d);
}
*s = vaddvq_f32(sumv0) + vaddvq_f32(sumv1) + summs0 + summs1;
#elif defined(__wasm_simd128__)
v128_t sumv = wasm_f32x4_splat(0.0f);
float summs = 0.0f;
uint32_t qh;
uint64_t tmp[4];
// TODO: check if unrolling this is better
for (int i = 0; i < nb; ++i) {
const block_q5_1 * restrict x0 = &x[i];
const block_q8_1 * restrict y0 = &y[i];
summs += GGML_FP16_TO_FP32(x0->m) * y0->s;
const v128_t m4b = wasm_i8x16_splat(0x0F);
// extract the 5th bit
memcpy(&qh, x0->qh, sizeof(qh));
tmp[0] = table_b2b_0[(qh >> 0) & 0xFF];
tmp[1] = table_b2b_0[(qh >> 8) & 0xFF];
tmp[2] = table_b2b_0[(qh >> 16) & 0xFF];
tmp[3] = table_b2b_0[(qh >> 24) ];
const v128_t qhl = wasm_v128_load(tmp + 0);
const v128_t qhh = wasm_v128_load(tmp + 2);
const v128_t v0 = wasm_v128_load(x0->qs);
// 4-bit -> 8-bit
const v128_t v0l = wasm_v128_and (v0, m4b);
const v128_t v0h = wasm_u8x16_shr(v0, 4);
// add high bit
const v128_t v0lf = wasm_v128_or(v0l, qhl);
const v128_t v0hf = wasm_v128_or(v0h, qhh);
// load y
const v128_t v1l = wasm_v128_load(y0->qs);
const v128_t v1h = wasm_v128_load(y0->qs + 16);
// int8x16 -> int16x8
const v128_t v0lfl = wasm_i16x8_extend_low_i8x16 (v0lf);
const v128_t v0lfh = wasm_i16x8_extend_high_i8x16(v0lf);
const v128_t v0hfl = wasm_i16x8_extend_low_i8x16 (v0hf);
const v128_t v0hfh = wasm_i16x8_extend_high_i8x16(v0hf);
const v128_t v1ll = wasm_i16x8_extend_low_i8x16 (v1l);
const v128_t v1lh = wasm_i16x8_extend_high_i8x16(v1l);
const v128_t v1hl = wasm_i16x8_extend_low_i8x16 (v1h);
const v128_t v1hh = wasm_i16x8_extend_high_i8x16(v1h);
// dot product
sumv = wasm_f32x4_add(sumv,
wasm_f32x4_mul(wasm_f32x4_convert_i32x4(wasm_i32x4_add(
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0lfl, v1ll),
wasm_i32x4_dot_i16x8(v0lfh, v1lh)),
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0hfl, v1hl),
wasm_i32x4_dot_i16x8(v0hfh, v1hh)))),
wasm_f32x4_splat(GGML_FP16_TO_FP32(x0->d) * y0->d)));
}
*s = wasm_f32x4_extract_lane(sumv, 0) + wasm_f32x4_extract_lane(sumv, 1) +
wasm_f32x4_extract_lane(sumv, 2) + wasm_f32x4_extract_lane(sumv, 3) + summs;
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
float summs = 0.0f;
// Main loop
for (int i = 0; i < nb; i++) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[i].d));
summs += GGML_FP16_TO_FP32(x[i].m) * y[i].s;
__m256i bx = bytes_from_nibbles_32(x[i].qs);
__m256i bxhi = bytes_from_bits_32(x[i].qh);
bxhi = _mm256_and_si256(bxhi, _mm256_set1_epi8(0x10));
bx = _mm256_or_si256(bx, bxhi);
const __m256 dy = _mm256_set1_ps(y[i].d);
const __m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_us8_pairs_float(bx, by);
acc = _mm256_fmadd_ps(q, _mm256_mul_ps(dx, dy), acc);
}
*s = hsum_float_8(acc) + summs;
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
__m128i mask = _mm_set1_epi8(0x10);
float summs = 0.0f;
// Main loop
for (int i = 0; i < nb; i++) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[i].d));
summs += GGML_FP16_TO_FP32(x[i].m) * y[i].s;
__m256i bx = bytes_from_nibbles_32(x[i].qs);
const __m256i bxhi = bytes_from_bits_32(x[i].qh);
__m128i bxhil = _mm256_castsi256_si128(bxhi);
__m128i bxhih = _mm256_extractf128_si256(bxhi, 1);
bxhil = _mm_and_si128(bxhil, mask);
bxhih = _mm_and_si128(bxhih, mask);
__m128i bxl = _mm256_castsi256_si128(bx);
__m128i bxh = _mm256_extractf128_si256(bx, 1);
bxl = _mm_or_si128(bxl, bxhil);
bxh = _mm_or_si128(bxh, bxhih);
bx = MM256_SET_M128I(bxh, bxl);
const __m256 dy = _mm256_set1_ps(y[i].d);
const __m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_us8_pairs_float(bx, by);
acc = _mm256_add_ps(_mm256_mul_ps(q, _mm256_mul_ps(dx, dy)), acc);
}
*s = hsum_float_8(acc) + summs;
#elif defined(__riscv_v_intrinsic)
float sumf = 0.0;
uint32_t qh;
size_t vl = __riscv_vsetvl_e8m1(qk/2);
// temporary registers for shift operations
vuint32m2_t vt_1 = __riscv_vid_v_u32m2(vl);
vuint32m2_t vt_2 = __riscv_vadd_vx_u32m2(vt_1, 12, vl);
for (int i = 0; i < nb; i++) {
memcpy(&qh, x[i].qh, sizeof(uint32_t));
// load qh
vuint32m2_t vqh = __riscv_vmv_v_x_u32m2(qh, vl);
// ((qh >> (j + 0)) << 4) & 0x10;
vuint32m2_t xhr_0 = __riscv_vsrl_vv_u32m2(vqh, vt_1, vl);
vuint32m2_t xhl_0 = __riscv_vsll_vx_u32m2(xhr_0, 4, vl);
vuint32m2_t xha_0 = __riscv_vand_vx_u32m2(xhl_0, 0x10, vl);
// ((qh >> (j + 12)) ) & 0x10;
vuint32m2_t xhr_1 = __riscv_vsrl_vv_u32m2(vqh, vt_2, vl);
vuint32m2_t xha_1 = __riscv_vand_vx_u32m2(xhr_1, 0x10, vl);
// narrowing
vuint16m1_t xhc_0 = __riscv_vncvt_x_x_w_u16m1(xha_0, vl);
vuint8mf2_t xh_0 = __riscv_vncvt_x_x_w_u8mf2(xhc_0, vl);
vuint16m1_t xhc_1 = __riscv_vncvt_x_x_w_u16m1(xha_1, vl);
vuint8mf2_t xh_1 = __riscv_vncvt_x_x_w_u8mf2(xhc_1, vl);
// load
vuint8mf2_t tx = __riscv_vle8_v_u8mf2(x[i].qs, vl);
vint8mf2_t y0 = __riscv_vle8_v_i8mf2(y[i].qs, vl);
vint8mf2_t y1 = __riscv_vle8_v_i8mf2(y[i].qs+16, vl);
vuint8mf2_t x_at = __riscv_vand_vx_u8mf2(tx, 0x0F, vl);
vuint8mf2_t x_lt = __riscv_vsrl_vx_u8mf2(tx, 0x04, vl);
vuint8mf2_t x_a = __riscv_vor_vv_u8mf2(x_at, xh_0, vl);
vuint8mf2_t x_l = __riscv_vor_vv_u8mf2(x_lt, xh_1, vl);
vint8mf2_t v0 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_a);
vint8mf2_t v1 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_l);
vint16m1_t vec_mul1 = __riscv_vwmul_vv_i16m1(v0, y0, vl);
vint16m1_t vec_mul2 = __riscv_vwmul_vv_i16m1(v1, y1, vl);
vint32m1_t vec_zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t vs1 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul1, vec_zero, vl);
vint32m1_t vs2 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul2, vs1, vl);
int sumi = __riscv_vmv_x_s_i32m1_i32(vs2);
sumf += (GGML_FP16_TO_FP32(x[i].d)*y[i].d)*sumi + GGML_FP16_TO_FP32(x[i].m)*y[i].s;
}
*s = sumf;
#else
// scalar
float sumf = 0.0;
for (int i = 0; i < nb; i++) {
uint32_t qh;
memcpy(&qh, x[i].qh, sizeof(qh));
int sumi = 0;
for (int j = 0; j < qk/2; ++j) {
const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10;
const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10;
const int32_t x0 = (x[i].qs[j] & 0xF) | xh_0;
const int32_t x1 = (x[i].qs[j] >> 4) | xh_1;
sumi += (x0 * y[i].qs[j]) + (x1 * y[i].qs[j + qk/2]);
}
sumf += (GGML_FP16_TO_FP32(x[i].d)*y[i].d)*sumi + GGML_FP16_TO_FP32(x[i].m)*y[i].s;
}
*s = sumf;
#endif
}
|
O2
|
c
|
ggml_vec_dot_q5_1_q8_1:
movq %rdx, %r8
movl %edi, %eax
pushq $0x20
popq %rdi
cltd
idivl %edi
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
imulq $0x18, %rax, %rax
addq $0x8, %rcx
vxorps %xmm1, %xmm1, %xmm1
vxorps %xmm0, %xmm0, %xmm0
vpbroadcastq 0xf8d5(%rip), %ymm2 # 0xa4ea8
leaq 0xc7cb6(%rip), %rdi # 0x15d290
vmovdqa 0xf7de(%rip), %ymm3 # 0xa4dc0
vpbroadcastq 0xf8cd(%rip), %ymm4 # 0xa4eb8
vpcmpeqd %ymm5, %ymm5, %ymm5
vpbroadcastq 0xf8c8(%rip), %ymm6 # 0xa4ec0
vpbroadcastw 0xf929(%rip), %ymm7 # 0xa4f2a
cmpq %rdx, %rax
je 0x9568b
movzwl (%r8,%rdx), %r9d
vmovss (%rdi,%r9,4), %xmm8
movzwl 0x2(%r8,%rdx), %r9d
vmovss (%rdi,%r9,4), %xmm9
vfmadd231ss -0x4(%rcx), %xmm9, %xmm0 # xmm0 = (xmm9 * mem) + xmm0
vmovdqu 0x8(%r8,%rdx), %xmm9
vpsrlw $0x4, %xmm9, %xmm10
vinserti128 $0x1, %xmm10, %ymm9, %ymm9
vpand %ymm2, %ymm9, %ymm9
vmovd 0x4(%r8,%rdx), %xmm10
vpermq $0x44, %ymm10, %ymm10 # ymm10 = ymm10[0,1,0,1]
vpshufb %ymm3, %ymm10, %ymm10
vpor %ymm4, %ymm10, %ymm10
vpcmpeqb %ymm5, %ymm10, %ymm10
vpand %ymm6, %ymm10, %ymm10
vpor %ymm9, %ymm10, %ymm9
vpmaddubsw (%rcx), %ymm9, %ymm9
vpmaddwd %ymm7, %ymm9, %ymm9
vcvtdq2ps %ymm9, %ymm9
vmulss -0x8(%rcx), %xmm8, %xmm8
vbroadcastss %xmm8, %ymm8
vfmadd231ps %ymm8, %ymm9, %ymm1 # ymm1 = (ymm9 * ymm8) + ymm1
addq $0x18, %rdx
addq $0x28, %rcx
jmp 0x95601
vextractf128 $0x1, %ymm1, %xmm2
vaddps %xmm1, %xmm2, %xmm1
vshufpd $0x1, %xmm1, %xmm1, %xmm2 # xmm2 = xmm1[1,0]
vaddps %xmm2, %xmm1, %xmm1
vhaddps %xmm1, %xmm1, %xmm1
vaddss %xmm1, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
|
ggml_vec_dot_q5_1_q8_1:
mov r8, rdx
mov eax, edi
push 20h ; ' '
pop rdi
cdq
idiv edi
xor edx, edx
test eax, eax
cmovle eax, edx
imul rax, 18h
add rcx, 8
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
vpbroadcastq ymm2, cs:qword_A4EA8
lea rdi, ggml_table_f32_f16
vmovdqa ymm3, cs:ymmword_A4DC0
vpbroadcastq ymm4, cs:qword_A4EB8
vpcmpeqd ymm5, ymm5, ymm5
vpbroadcastq ymm6, cs:qword_A4EC0
vpbroadcastw ymm7, cs:word_A4F2A
loc_95601:
cmp rax, rdx
jz loc_9568B
movzx r9d, word ptr [r8+rdx]
vmovss xmm8, dword ptr [rdi+r9*4]
movzx r9d, word ptr [r8+rdx+2]
vmovss xmm9, dword ptr [rdi+r9*4]
vfmadd231ss xmm0, xmm9, dword ptr [rcx-4]
vmovdqu xmm9, xmmword ptr [r8+rdx+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vpand ymm9, ymm9, ymm2
vmovd xmm10, dword ptr [r8+rdx+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm3
vpor ymm10, ymm10, ymm4
vpcmpeqb ymm10, ymm10, ymm5
vpand ymm10, ymm10, ymm6
vpor ymm9, ymm10, ymm9
vpmaddubsw ymm9, ymm9, ymmword ptr [rcx]
vpmaddwd ymm9, ymm9, ymm7
vcvtdq2ps ymm9, ymm9
vmulss xmm8, xmm8, dword ptr [rcx-8]
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
add rdx, 18h
add rcx, 28h ; '('
jmp loc_95601
loc_9568B:
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
|
long long ggml_vec_dot_q5_1_q8_1(int a1, long long _RSI, long long a3, long long a4, __m128 _XMM0, __m128 _XMM1)
{
long long v11; // rax
long long result; // rax
long long v14; // rcx
_R8 = a3;
v11 = (unsigned int)(a1 / 32);
_RDX = 0LL;
if ( (int)v11 <= 0 )
v11 = 0LL;
result = 24 * v11;
v14 = a4 + 8;
__asm
{
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
vpbroadcastq ymm2, cs:qword_A4EA8
}
_RDI = &ggml_table_f32_f16;
__asm
{
vmovdqa ymm3, cs:ymmword_A4DC0
vpbroadcastq ymm4, cs:qword_A4EB8
vpcmpeqd ymm5, ymm5, ymm5
vpbroadcastq ymm6, cs:qword_A4EC0
vpbroadcastw ymm7, cs:word_A4F2A
}
while ( result != _RDX )
{
_R9 = *(unsigned __int16 *)(_R8 + _RDX);
__asm { vmovss xmm8, dword ptr [rdi+r9*4] }
_R9 = *(unsigned __int16 *)(_R8 + _RDX + 2);
__asm
{
vmovss xmm9, dword ptr [rdi+r9*4]
vfmadd231ss xmm0, xmm9, dword ptr [rcx-4]
vmovdqu xmm9, xmmword ptr [r8+rdx+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vpand ymm9, ymm9, ymm2
vmovd xmm10, dword ptr [r8+rdx+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm3
vpor ymm10, ymm10, ymm4
vpcmpeqb ymm10, ymm10, ymm5
vpand ymm10, ymm10, ymm6
vpor ymm9, ymm10, ymm9
vpmaddubsw ymm9, ymm9, ymmword ptr [rcx]
vpmaddwd ymm9, ymm9, ymm7
vcvtdq2ps ymm9, ymm9
vmulss xmm8, xmm8, dword ptr [rcx-8]
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
}
_RDX += 24LL;
v14 += 40LL;
}
__asm
{
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
|
ggml_vec_dot_q5_1_q8_1:
MOV R8,RDX
MOV EAX,EDI
PUSH 0x20
POP RDI
CDQ
IDIV EDI
XOR EDX,EDX
TEST EAX,EAX
CMOVLE EAX,EDX
IMUL RAX,RAX,0x18
ADD RCX,0x8
VXORPS XMM1,XMM1,XMM1
VXORPS XMM0,XMM0,XMM0
VPBROADCASTQ YMM2,qword ptr [0x001a4ea8]
LEA RDI,[0x25d290]
VMOVDQA YMM3,ymmword ptr [0x001a4dc0]
VPBROADCASTQ YMM4,qword ptr [0x001a4eb8]
VPCMPEQD YMM5,YMM5,YMM5
VPBROADCASTQ YMM6,qword ptr [0x001a4ec0]
VPBROADCASTW YMM7,word ptr [0x001a4f2a]
LAB_00195601:
CMP RAX,RDX
JZ 0x0019568b
MOVZX R9D,word ptr [R8 + RDX*0x1]
VMOVSS XMM8,dword ptr [RDI + R9*0x4]
MOVZX R9D,word ptr [R8 + RDX*0x1 + 0x2]
VMOVSS XMM9,dword ptr [RDI + R9*0x4]
VFMADD231SS XMM0,XMM9,dword ptr [RCX + -0x4]
VMOVDQU XMM9,xmmword ptr [R8 + RDX*0x1 + 0x8]
VPSRLW XMM10,XMM9,0x4
VINSERTI128 YMM9,YMM9,XMM10,0x1
VPAND YMM9,YMM9,YMM2
VMOVD XMM10,dword ptr [R8 + RDX*0x1 + 0x4]
VPERMQ YMM10,YMM10,0x44
VPSHUFB YMM10,YMM10,YMM3
VPOR YMM10,YMM10,YMM4
VPCMPEQB YMM10,YMM10,YMM5
VPAND YMM10,YMM10,YMM6
VPOR YMM9,YMM10,YMM9
VPMADDUBSW YMM9,YMM9,ymmword ptr [RCX]
VPMADDWD YMM9,YMM9,YMM7
VCVTDQ2PS YMM9,YMM9
VMULSS XMM8,XMM8,dword ptr [RCX + -0x8]
VBROADCASTSS YMM8,XMM8
VFMADD231PS YMM1,YMM9,YMM8
ADD RDX,0x18
ADD RCX,0x28
JMP 0x00195601
LAB_0019568b:
VEXTRACTF128 XMM2,YMM1,0x1
VADDPS XMM1,XMM2,XMM1
VSHUFPD XMM2,XMM1,XMM1,0x1
VADDPS XMM1,XMM1,XMM2
VHADDPS XMM1,XMM1,XMM1
VADDSS XMM0,XMM0,XMM1
VMOVSS dword ptr [RSI],XMM0
VZEROUPPER
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_vec_dot_q5_1_q8_1(int param_1,float *param_2,long param_3,long param_4)
{
float fVar1;
int1 auVar2 [32];
ulong uVar3;
int1 (*pauVar4) [32];
ulong uVar5;
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [32];
int1 auVar10 [32];
int1 in_ZMM5 [64];
int1 auVar11 [32];
int1 auVar12 [32];
int1 auVar13 [32];
int1 auVar14 [32];
int1 auVar15 [16];
uVar5 = 0;
uVar3 = (long)param_1 / 0x20 & 0xffffffff;
if ((int)((long)param_1 / 0x20) < 1) {
uVar3 = uVar5;
}
pauVar4 = (int1 (*) [32])(param_4 + 8);
auVar7 = ZEXT816(0) << 0x40;
auVar6 = ZEXT816(0) << 0x40;
auVar9._8_8_ = DAT_001a4ea8;
auVar9._0_8_ = DAT_001a4ea8;
auVar9._16_8_ = DAT_001a4ea8;
auVar9._24_8_ = DAT_001a4ea8;
auVar10._8_8_ = DAT_001a4eb8;
auVar10._0_8_ = DAT_001a4eb8;
auVar10._16_8_ = DAT_001a4eb8;
auVar10._24_8_ = DAT_001a4eb8;
auVar2 = vpcmpeqd_avx2(in_ZMM5._0_32_,in_ZMM5._0_32_);
auVar11._8_8_ = DAT_001a4ec0;
auVar11._0_8_ = DAT_001a4ec0;
auVar11._16_8_ = DAT_001a4ec0;
auVar11._24_8_ = DAT_001a4ec0;
auVar12._2_2_ = DAT_001a4f2a;
auVar12._0_2_ = DAT_001a4f2a;
auVar12._4_2_ = DAT_001a4f2a;
auVar12._6_2_ = DAT_001a4f2a;
auVar12._8_2_ = DAT_001a4f2a;
auVar12._10_2_ = DAT_001a4f2a;
auVar12._12_2_ = DAT_001a4f2a;
auVar12._14_2_ = DAT_001a4f2a;
auVar12._16_2_ = DAT_001a4f2a;
auVar12._18_2_ = DAT_001a4f2a;
auVar12._20_2_ = DAT_001a4f2a;
auVar12._22_2_ = DAT_001a4f2a;
auVar12._24_2_ = DAT_001a4f2a;
auVar12._26_2_ = DAT_001a4f2a;
auVar12._28_2_ = DAT_001a4f2a;
auVar12._30_2_ = DAT_001a4f2a;
for (; uVar3 * 0x18 - uVar5 != 0; uVar5 = uVar5 + 0x18) {
auVar6 = vfmadd231ss_fma(auVar6,ZEXT416((uint)(&ggml_table_f32_f16)
[*(ushort *)(param_3 + 2 + uVar5)]),
ZEXT416(*(uint *)(pauVar4[-1] + 0x1c)));
auVar8 = *(int1 (*) [16])(param_3 + 8 + uVar5);
auVar15 = vpsrlw_avx(auVar8,4);
auVar14._0_16_ = ZEXT116(0) * auVar15 + ZEXT116(1) * auVar8;
auVar14._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar15;
auVar14 = vpand_avx2(auVar14,auVar9);
auVar13 = vpermq_avx2(ZEXT432(*(uint *)(param_3 + 4 + uVar5)),0x44);
auVar13 = vpshufb_avx2(auVar13,_DAT_001a4dc0);
auVar13 = vpor_avx2(auVar13,auVar10);
auVar13 = vpcmpeqb_avx2(auVar13,auVar2);
auVar13 = vpand_avx2(auVar13,auVar11);
auVar14 = vpor_avx2(auVar13,auVar14);
auVar14 = vpmaddubsw_avx2(auVar14,*pauVar4);
auVar14 = vpmaddwd_avx2(auVar14,auVar12);
auVar14 = vcvtdq2ps_avx(auVar14);
fVar1 = (float)(&ggml_table_f32_f16)[*(ushort *)(param_3 + uVar5)] *
*(float *)(pauVar4[-1] + 0x18);
auVar13._4_4_ = fVar1;
auVar13._0_4_ = fVar1;
auVar13._8_4_ = fVar1;
auVar13._12_4_ = fVar1;
auVar13._16_4_ = fVar1;
auVar13._20_4_ = fVar1;
auVar13._24_4_ = fVar1;
auVar13._28_4_ = fVar1;
auVar7 = vfmadd231ps_fma(ZEXT1632(auVar7),auVar14,auVar13);
pauVar4 = (int1 (*) [32])(pauVar4[1] + 8);
}
auVar8._0_4_ = auVar7._0_4_ + 0.0;
auVar8._4_4_ = auVar7._4_4_ + 0.0;
auVar8._8_4_ = auVar7._8_4_ + 0.0;
auVar8._12_4_ = auVar7._12_4_ + 0.0;
auVar7 = vshufpd_avx(auVar8,auVar8,1);
auVar15._0_4_ = auVar8._0_4_ + auVar7._0_4_;
auVar15._4_4_ = auVar8._4_4_ + auVar7._4_4_;
auVar15._8_4_ = auVar8._8_4_ + auVar7._8_4_;
auVar15._12_4_ = auVar8._12_4_ + auVar7._12_4_;
auVar7 = vhaddps_avx(auVar15,auVar15);
*param_2 = auVar6._0_4_ + auVar7._0_4_;
return;
}
|
|
12,632
|
ggml_vec_dot_q5_1_q8_1
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
const int qk = QK8_1;
const int nb = n / qk;
assert(n % qk == 0);
assert(qk == QK5_1);
const block_q5_1 * restrict x = vx;
const block_q8_1 * restrict y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
float summs0 = 0.0f;
float summs1 = 0.0f;
uint32_t qh0;
uint32_t qh1;
uint64_t tmp0[4];
uint64_t tmp1[4];
assert(nb % 2 == 0); // TODO: handle odd nb
for (int i = 0; i < nb; i += 2) {
const block_q5_1 * restrict x0 = &x[i];
const block_q5_1 * restrict x1 = &x[i + 1];
const block_q8_1 * restrict y0 = &y[i];
const block_q8_1 * restrict y1 = &y[i + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
summs0 += GGML_FP16_TO_FP32(x0->m) * y0->s;
summs1 += GGML_FP16_TO_FP32(x1->m) * y1->s;
// extract the 5th bit via lookup table ((b) << 4)
memcpy(&qh0, x0->qh, sizeof(qh0));
memcpy(&qh1, x1->qh, sizeof(qh1));
tmp0[0] = table_b2b_0[(qh0 >> 0) & 0xFF];
tmp0[1] = table_b2b_0[(qh0 >> 8) & 0xFF];
tmp0[2] = table_b2b_0[(qh0 >> 16) & 0xFF];
tmp0[3] = table_b2b_0[(qh0 >> 24) ];
tmp1[0] = table_b2b_0[(qh1 >> 0) & 0xFF];
tmp1[1] = table_b2b_0[(qh1 >> 8) & 0xFF];
tmp1[2] = table_b2b_0[(qh1 >> 16) & 0xFF];
tmp1[3] = table_b2b_0[(qh1 >> 24) ];
const int8x16_t qhl0 = vld1q_s8((const int8_t *)(tmp0 + 0));
const int8x16_t qhh0 = vld1q_s8((const int8_t *)(tmp0 + 2));
const int8x16_t qhl1 = vld1q_s8((const int8_t *)(tmp1 + 0));
const int8x16_t qhh1 = vld1q_s8((const int8_t *)(tmp1 + 2));
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// add high bit
const int8x16_t v0_0lf = vorrq_s8(v0_0l, qhl0);
const int8x16_t v0_0hf = vorrq_s8(v0_0h, qhh0);
const int8x16_t v0_1lf = vorrq_s8(v0_1l, qhl1);
const int8x16_t v0_1hf = vorrq_s8(v0_1h, qhh1);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_0lf, v1_0l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_0hf, v1_0h))), GGML_FP16_TO_FP32(x0->d)*y0->d);
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_1lf, v1_1l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_1hf, v1_1h))), GGML_FP16_TO_FP32(x1->d)*y1->d);
}
*s = vaddvq_f32(sumv0) + vaddvq_f32(sumv1) + summs0 + summs1;
#elif defined(__wasm_simd128__)
v128_t sumv = wasm_f32x4_splat(0.0f);
float summs = 0.0f;
uint32_t qh;
uint64_t tmp[4];
// TODO: check if unrolling this is better
for (int i = 0; i < nb; ++i) {
const block_q5_1 * restrict x0 = &x[i];
const block_q8_1 * restrict y0 = &y[i];
summs += GGML_FP16_TO_FP32(x0->m) * y0->s;
const v128_t m4b = wasm_i8x16_splat(0x0F);
// extract the 5th bit
memcpy(&qh, x0->qh, sizeof(qh));
tmp[0] = table_b2b_0[(qh >> 0) & 0xFF];
tmp[1] = table_b2b_0[(qh >> 8) & 0xFF];
tmp[2] = table_b2b_0[(qh >> 16) & 0xFF];
tmp[3] = table_b2b_0[(qh >> 24) ];
const v128_t qhl = wasm_v128_load(tmp + 0);
const v128_t qhh = wasm_v128_load(tmp + 2);
const v128_t v0 = wasm_v128_load(x0->qs);
// 4-bit -> 8-bit
const v128_t v0l = wasm_v128_and (v0, m4b);
const v128_t v0h = wasm_u8x16_shr(v0, 4);
// add high bit
const v128_t v0lf = wasm_v128_or(v0l, qhl);
const v128_t v0hf = wasm_v128_or(v0h, qhh);
// load y
const v128_t v1l = wasm_v128_load(y0->qs);
const v128_t v1h = wasm_v128_load(y0->qs + 16);
// int8x16 -> int16x8
const v128_t v0lfl = wasm_i16x8_extend_low_i8x16 (v0lf);
const v128_t v0lfh = wasm_i16x8_extend_high_i8x16(v0lf);
const v128_t v0hfl = wasm_i16x8_extend_low_i8x16 (v0hf);
const v128_t v0hfh = wasm_i16x8_extend_high_i8x16(v0hf);
const v128_t v1ll = wasm_i16x8_extend_low_i8x16 (v1l);
const v128_t v1lh = wasm_i16x8_extend_high_i8x16(v1l);
const v128_t v1hl = wasm_i16x8_extend_low_i8x16 (v1h);
const v128_t v1hh = wasm_i16x8_extend_high_i8x16(v1h);
// dot product
sumv = wasm_f32x4_add(sumv,
wasm_f32x4_mul(wasm_f32x4_convert_i32x4(wasm_i32x4_add(
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0lfl, v1ll),
wasm_i32x4_dot_i16x8(v0lfh, v1lh)),
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0hfl, v1hl),
wasm_i32x4_dot_i16x8(v0hfh, v1hh)))),
wasm_f32x4_splat(GGML_FP16_TO_FP32(x0->d) * y0->d)));
}
*s = wasm_f32x4_extract_lane(sumv, 0) + wasm_f32x4_extract_lane(sumv, 1) +
wasm_f32x4_extract_lane(sumv, 2) + wasm_f32x4_extract_lane(sumv, 3) + summs;
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
float summs = 0.0f;
// Main loop
for (int i = 0; i < nb; i++) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[i].d));
summs += GGML_FP16_TO_FP32(x[i].m) * y[i].s;
__m256i bx = bytes_from_nibbles_32(x[i].qs);
__m256i bxhi = bytes_from_bits_32(x[i].qh);
bxhi = _mm256_and_si256(bxhi, _mm256_set1_epi8(0x10));
bx = _mm256_or_si256(bx, bxhi);
const __m256 dy = _mm256_set1_ps(y[i].d);
const __m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_us8_pairs_float(bx, by);
acc = _mm256_fmadd_ps(q, _mm256_mul_ps(dx, dy), acc);
}
*s = hsum_float_8(acc) + summs;
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
__m128i mask = _mm_set1_epi8(0x10);
float summs = 0.0f;
// Main loop
for (int i = 0; i < nb; i++) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[i].d));
summs += GGML_FP16_TO_FP32(x[i].m) * y[i].s;
__m256i bx = bytes_from_nibbles_32(x[i].qs);
const __m256i bxhi = bytes_from_bits_32(x[i].qh);
__m128i bxhil = _mm256_castsi256_si128(bxhi);
__m128i bxhih = _mm256_extractf128_si256(bxhi, 1);
bxhil = _mm_and_si128(bxhil, mask);
bxhih = _mm_and_si128(bxhih, mask);
__m128i bxl = _mm256_castsi256_si128(bx);
__m128i bxh = _mm256_extractf128_si256(bx, 1);
bxl = _mm_or_si128(bxl, bxhil);
bxh = _mm_or_si128(bxh, bxhih);
bx = MM256_SET_M128I(bxh, bxl);
const __m256 dy = _mm256_set1_ps(y[i].d);
const __m256i by = _mm256_loadu_si256((const __m256i *)y[i].qs);
const __m256 q = mul_sum_us8_pairs_float(bx, by);
acc = _mm256_add_ps(_mm256_mul_ps(q, _mm256_mul_ps(dx, dy)), acc);
}
*s = hsum_float_8(acc) + summs;
#elif defined(__riscv_v_intrinsic)
float sumf = 0.0;
uint32_t qh;
size_t vl = __riscv_vsetvl_e8m1(qk/2);
// temporary registers for shift operations
vuint32m2_t vt_1 = __riscv_vid_v_u32m2(vl);
vuint32m2_t vt_2 = __riscv_vadd_vx_u32m2(vt_1, 12, vl);
for (int i = 0; i < nb; i++) {
memcpy(&qh, x[i].qh, sizeof(uint32_t));
// load qh
vuint32m2_t vqh = __riscv_vmv_v_x_u32m2(qh, vl);
// ((qh >> (j + 0)) << 4) & 0x10;
vuint32m2_t xhr_0 = __riscv_vsrl_vv_u32m2(vqh, vt_1, vl);
vuint32m2_t xhl_0 = __riscv_vsll_vx_u32m2(xhr_0, 4, vl);
vuint32m2_t xha_0 = __riscv_vand_vx_u32m2(xhl_0, 0x10, vl);
// ((qh >> (j + 12)) ) & 0x10;
vuint32m2_t xhr_1 = __riscv_vsrl_vv_u32m2(vqh, vt_2, vl);
vuint32m2_t xha_1 = __riscv_vand_vx_u32m2(xhr_1, 0x10, vl);
// narrowing
vuint16m1_t xhc_0 = __riscv_vncvt_x_x_w_u16m1(xha_0, vl);
vuint8mf2_t xh_0 = __riscv_vncvt_x_x_w_u8mf2(xhc_0, vl);
vuint16m1_t xhc_1 = __riscv_vncvt_x_x_w_u16m1(xha_1, vl);
vuint8mf2_t xh_1 = __riscv_vncvt_x_x_w_u8mf2(xhc_1, vl);
// load
vuint8mf2_t tx = __riscv_vle8_v_u8mf2(x[i].qs, vl);
vint8mf2_t y0 = __riscv_vle8_v_i8mf2(y[i].qs, vl);
vint8mf2_t y1 = __riscv_vle8_v_i8mf2(y[i].qs+16, vl);
vuint8mf2_t x_at = __riscv_vand_vx_u8mf2(tx, 0x0F, vl);
vuint8mf2_t x_lt = __riscv_vsrl_vx_u8mf2(tx, 0x04, vl);
vuint8mf2_t x_a = __riscv_vor_vv_u8mf2(x_at, xh_0, vl);
vuint8mf2_t x_l = __riscv_vor_vv_u8mf2(x_lt, xh_1, vl);
vint8mf2_t v0 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_a);
vint8mf2_t v1 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_l);
vint16m1_t vec_mul1 = __riscv_vwmul_vv_i16m1(v0, y0, vl);
vint16m1_t vec_mul2 = __riscv_vwmul_vv_i16m1(v1, y1, vl);
vint32m1_t vec_zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t vs1 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul1, vec_zero, vl);
vint32m1_t vs2 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul2, vs1, vl);
int sumi = __riscv_vmv_x_s_i32m1_i32(vs2);
sumf += (GGML_FP16_TO_FP32(x[i].d)*y[i].d)*sumi + GGML_FP16_TO_FP32(x[i].m)*y[i].s;
}
*s = sumf;
#else
// scalar
float sumf = 0.0;
for (int i = 0; i < nb; i++) {
uint32_t qh;
memcpy(&qh, x[i].qh, sizeof(qh));
int sumi = 0;
for (int j = 0; j < qk/2; ++j) {
const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10;
const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10;
const int32_t x0 = (x[i].qs[j] & 0xF) | xh_0;
const int32_t x1 = (x[i].qs[j] >> 4) | xh_1;
sumi += (x0 * y[i].qs[j]) + (x1 * y[i].qs[j + qk/2]);
}
sumf += (GGML_FP16_TO_FP32(x[i].d)*y[i].d)*sumi + GGML_FP16_TO_FP32(x[i].m)*y[i].s;
}
*s = sumf;
#endif
}
|
O3
|
c
|
ggml_vec_dot_q5_1_q8_1:
cmpl $0x20, %edi
jl 0xb84f3
addq $0x8, %rcx
shrl $0x2, %edi
andl $-0x8, %edi
leaq (%rdi,%rdi,2), %rax
vxorps %xmm0, %xmm0, %xmm0
vxorps %xmm1, %xmm1, %xmm1
xorl %edi, %edi
vpbroadcastq 0xfe84(%rip), %ymm2 # 0xc82c8
leaq 0xc3e35(%rip), %r8 # 0x17c280
vmovdqa 0xfd8d(%rip), %ymm3 # 0xc81e0
vpbroadcastq 0xfe7c(%rip), %ymm4 # 0xc82d8
vpcmpeqd %ymm5, %ymm5, %ymm5
vpbroadcastq 0xfe77(%rip), %ymm6 # 0xc82e0
vpbroadcastw 0xfba4(%rip), %ymm7 # 0xc8016
movzwl (%rdx,%rdi), %r9d
vmovss (%r8,%r9,4), %xmm8
movzwl 0x2(%rdx,%rdi), %r9d
vmovss (%r8,%r9,4), %xmm9
vfmadd231ss -0x4(%rcx), %xmm9, %xmm0 # xmm0 = (xmm9 * mem) + xmm0
vmovdqu 0x8(%rdx,%rdi), %xmm9
vpsrlw $0x4, %xmm9, %xmm10
vinserti128 $0x1, %xmm10, %ymm9, %ymm9
vpand %ymm2, %ymm9, %ymm9
vmovd 0x4(%rdx,%rdi), %xmm10
vpermq $0x44, %ymm10, %ymm10 # ymm10 = ymm10[0,1,0,1]
vpshufb %ymm3, %ymm10, %ymm10
vpor %ymm4, %ymm10, %ymm10
vpcmpeqb %ymm5, %ymm10, %ymm10
vpand %ymm6, %ymm10, %ymm10
vpor %ymm9, %ymm10, %ymm9
vpmaddubsw (%rcx), %ymm9, %ymm9
vpmaddwd %ymm7, %ymm9, %ymm9
vcvtdq2ps %ymm9, %ymm9
vmulss -0x8(%rcx), %xmm8, %xmm8
vbroadcastss %xmm8, %ymm8
vfmadd231ps %ymm8, %ymm9, %ymm1 # ymm1 = (ymm9 * ymm8) + ymm1
addq $0x28, %rcx
addq $0x18, %rdi
cmpq %rdi, %rax
jne 0xb8472
jmp 0xb84fb
vxorps %xmm1, %xmm1, %xmm1
vxorps %xmm0, %xmm0, %xmm0
vextractf128 $0x1, %ymm1, %xmm2
vaddps %xmm1, %xmm2, %xmm1
vshufpd $0x1, %xmm1, %xmm1, %xmm2 # xmm2 = xmm1[1,0]
vaddps %xmm2, %xmm1, %xmm1
vhaddps %xmm1, %xmm1, %xmm1
vaddss %xmm1, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
|
ggml_vec_dot_q5_1_q8_1:
cmp edi, 20h ; ' '
jl loc_B84F3
add rcx, 8
shr edi, 2
and edi, 0FFFFFFF8h
lea rax, [rdi+rdi*2]
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
xor edi, edi
vpbroadcastq ymm2, cs:qword_C82C8
lea r8, ggml_table_f32_f16
vmovdqa ymm3, cs:ymmword_C81E0
vpbroadcastq ymm4, cs:qword_C82D8
vpcmpeqd ymm5, ymm5, ymm5
vpbroadcastq ymm6, cs:qword_C82E0
vpbroadcastw ymm7, cs:word_C8016
loc_B8472:
movzx r9d, word ptr [rdx+rdi]
vmovss xmm8, dword ptr [r8+r9*4]
movzx r9d, word ptr [rdx+rdi+2]
vmovss xmm9, dword ptr [r8+r9*4]
vfmadd231ss xmm0, xmm9, dword ptr [rcx-4]
vmovdqu xmm9, xmmword ptr [rdx+rdi+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vpand ymm9, ymm9, ymm2
vmovd xmm10, dword ptr [rdx+rdi+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm3
vpor ymm10, ymm10, ymm4
vpcmpeqb ymm10, ymm10, ymm5
vpand ymm10, ymm10, ymm6
vpor ymm9, ymm10, ymm9
vpmaddubsw ymm9, ymm9, ymmword ptr [rcx]
vpmaddwd ymm9, ymm9, ymm7
vcvtdq2ps ymm9, ymm9
vmulss xmm8, xmm8, dword ptr [rcx-8]
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
add rcx, 28h ; '('
add rdi, 18h
cmp rax, rdi
jnz short loc_B8472
jmp short loc_B84FB
loc_B84F3:
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
loc_B84FB:
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
|
void ggml_vec_dot_q5_1_q8_1(int a1, long long _RSI, long long _RDX, long long a4, __m128 _XMM0, __m128 _XMM1)
{
long long v10; // rcx
long long v11; // rax
if ( a1 < 32 )
{
__asm
{
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
}
}
else
{
v10 = a4 + 8;
v11 = 3LL * (((unsigned int)a1 >> 2) & 0xFFFFFFF8);
__asm
{
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
}
_RDI = 0LL;
__asm { vpbroadcastq ymm2, cs:qword_C82C8 }
_R8 = &ggml_table_f32_f16;
__asm
{
vmovdqa ymm3, cs:ymmword_C81E0
vpbroadcastq ymm4, cs:qword_C82D8
vpcmpeqd ymm5, ymm5, ymm5
vpbroadcastq ymm6, cs:qword_C82E0
vpbroadcastw ymm7, cs:word_C8016
}
do
{
_R9 = *(unsigned __int16 *)(_RDX + _RDI);
__asm { vmovss xmm8, dword ptr [r8+r9*4] }
_R9 = *(unsigned __int16 *)(_RDX + _RDI + 2);
__asm
{
vmovss xmm9, dword ptr [r8+r9*4]
vfmadd231ss xmm0, xmm9, dword ptr [rcx-4]
vmovdqu xmm9, xmmword ptr [rdx+rdi+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vpand ymm9, ymm9, ymm2
vmovd xmm10, dword ptr [rdx+rdi+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm3
vpor ymm10, ymm10, ymm4
vpcmpeqb ymm10, ymm10, ymm5
vpand ymm10, ymm10, ymm6
vpor ymm9, ymm10, ymm9
vpmaddubsw ymm9, ymm9, ymmword ptr [rcx]
vpmaddwd ymm9, ymm9, ymm7
vcvtdq2ps ymm9, ymm9
vmulss xmm8, xmm8, dword ptr [rcx-8]
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
}
v10 += 40LL;
_RDI += 24LL;
}
while ( v11 != _RDI );
}
__asm
{
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
vmovss dword ptr [rsi], xmm0
vzeroupper
}
}
| |||
12,633
|
JS_ValueToAtom
|
bluesky950520[P]quickjs/quickjs.c
|
JSAtom JS_ValueToAtom(JSContext *ctx, JSValue val)
{
JSAtom atom;
uint32_t tag;
tag = JS_VALUE_GET_TAG(val);
if (tag == JS_TAG_INT &&
(uint32_t)JS_VALUE_GET_INT(val) <= JS_ATOM_MAX_INT) {
/* fast path for integer values */
atom = __JS_AtomFromUInt32(JS_VALUE_GET_INT(val));
} else if (tag == JS_TAG_SYMBOL) {
JSAtomStruct *p = JS_VALUE_GET_PTR(val);
atom = JS_DupAtom(ctx, js_get_atom_index(ctx->rt, p));
} else {
JSValue str;
str = JS_ToPropertyKey(ctx, val);
if (JS_IsException(str))
return JS_ATOM_NULL;
if (JS_VALUE_GET_TAG(str) == JS_TAG_SYMBOL) {
atom = js_symbol_to_atom(ctx, str);
} else {
atom = JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(str));
}
}
return atom;
}
|
O1
|
c
|
JS_ValueToAtom:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rsi, (%rsp)
testl %edx, %edx
sete %cl
testl %eax, %eax
setns %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x234aa
orl $0x80000000, %eax # imm = 0x80000000
addq $0x10, %rsp
popq %rbx
retq
movq %rdi, %rbx
cmpl $-0x8, %edx
jne 0x234cf
movq (%rsp), %rdx
movq 0x18(%rbx), %rcx
movq 0x4(%rdx), %rax
movq %rax, %rsi
shrq $0x3e, %rsi
cmpl $0x2, %esi
jbe 0x23507
movl 0xc(%rdx), %eax
jmp 0x2352c
movq (%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x26ec9
movq %rax, 0x8(%rsp)
cmpl $0x6, %edx
je 0x23548
cmpl $-0x8, %edx
jne 0x2354f
movq %rax, %rcx
movq 0x4(%rax), %rax
movq %rax, %rdx
shrq $0x3e, %rdx
cmpl $0x2, %edx
jbe 0x23561
movl 0xc(%rcx), %eax
jmp 0x234a4
shrq $0x20, %rax
movl 0x50(%rcx), %esi
decl %esi
andl %eax, %esi
shll $0x2, %esi
addq 0x60(%rcx), %rsi
movq 0x68(%rcx), %rdi
movl (%rsi), %eax
movq (%rdi,%rax,8), %r8
leaq 0xc(%r8), %rsi
cmpq %rdx, %r8
jne 0x2351d
cmpl $0xe0, %eax
jl 0x234a4
movq 0x68(%rcx), %rcx
movl %eax, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
jmp 0x234a4
xorl %eax, %eax
jmp 0x234a4
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1f424
jmp 0x234a4
movq 0x18(%rbx), %rsi
shrq $0x20, %rax
movl 0x50(%rsi), %edx
decl %edx
andl %eax, %edx
shll $0x2, %edx
addq 0x60(%rsi), %rdx
movq 0x68(%rsi), %rsi
movl (%rdx), %eax
movq (%rsi,%rax,8), %rdi
leaq 0xc(%rdi), %rdx
cmpq %rcx, %rdi
jne 0x2357b
jmp 0x234a4
|
JS_ValueToAtom:
push rbx
sub rsp, 10h
mov rax, rsi
mov [rsp+18h+var_18], rsi
test edx, edx
setz cl
test eax, eax
setns sil
and sil, cl
cmp sil, 1
jnz short loc_234AA
or eax, 80000000h
loc_234A4:
add rsp, 10h
pop rbx
retn
loc_234AA:
mov rbx, rdi
cmp edx, 0FFFFFFF8h
jnz short loc_234CF
mov rdx, [rsp+18h+var_18]
mov rcx, [rbx+18h]
mov rax, [rdx+4]
mov rsi, rax
shr rsi, 3Eh
cmp esi, 2
jbe short loc_23507
mov eax, [rdx+0Ch]
jmp short loc_2352C
loc_234CF:
mov rsi, [rsp+18h+var_18]
mov rdi, rbx
mov ecx, 1
call JS_ToStringInternal
mov [rsp+18h+var_10], rax
cmp edx, 6
jz short loc_23548
cmp edx, 0FFFFFFF8h
jnz short loc_2354F
mov rcx, rax
mov rax, [rax+4]
mov rdx, rax
shr rdx, 3Eh
cmp edx, 2
jbe short loc_23561
mov eax, [rcx+0Ch]
jmp short loc_234A4
loc_23507:
shr rax, 20h
mov esi, [rcx+50h]
dec esi
and esi, eax
shl esi, 2
add rsi, [rcx+60h]
mov rdi, [rcx+68h]
loc_2351D:
mov eax, [rsi]
mov r8, [rdi+rax*8]
lea rsi, [r8+0Ch]
cmp r8, rdx
jnz short loc_2351D
loc_2352C:
cmp eax, 0E0h
jl loc_234A4
mov rcx, [rcx+68h]
mov edx, eax
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
jmp loc_234A4
loc_23548:
xor eax, eax
jmp loc_234A4
loc_2354F:
mov rsi, [rsp+18h+var_10]
mov rdi, rbx
call JS_NewAtomStr
jmp loc_234A4
loc_23561:
mov rsi, [rbx+18h]
shr rax, 20h
mov edx, [rsi+50h]
dec edx
and edx, eax
shl edx, 2
add rdx, [rsi+60h]
mov rsi, [rsi+68h]
loc_2357B:
mov eax, [rdx]
mov rdi, [rsi+rax*8]
lea rdx, [rdi+0Ch]
cmp rdi, rcx
jnz short loc_2357B
jmp loc_234A4
|
long long JS_ValueToAtom(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rcx
unsigned long long v5; // rax
long long v6; // rax
int v7; // edx
long long v8; // rcx
unsigned long long v9; // rax
unsigned int *v10; // rsi
long long v11; // r8
_DWORD *v12; // rcx
long long v13; // rsi
unsigned int *v14; // rdx
long long v15; // rsi
long long v16; // rdi
if ( (_DWORD)a3 == 0 && (int)a2 >= 0 )
return (unsigned int)a2 | 0x80000000;
if ( (_DWORD)a3 == -8 )
{
v4 = *(_QWORD *)(a1 + 24);
v5 = *(_QWORD *)(a2 + 4);
if ( (unsigned int)(v5 >> 62) <= 2 )
{
v10 = (unsigned int *)(*(_QWORD *)(v4 + 96) + 4 * (HIDWORD(v5) & (unsigned int)(*(_DWORD *)(v4 + 80) - 1)));
do
{
result = *v10;
v11 = *(_QWORD *)(*(_QWORD *)(v4 + 104) + 8 * result);
v10 = (unsigned int *)(v11 + 12);
}
while ( v11 != a2 );
}
else
{
result = *(unsigned int *)(a2 + 12);
}
if ( (int)result >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(v4 + 104) + 8LL * (unsigned int)result);
++*v12;
}
}
else
{
v6 = JS_ToStringInternal(a1, a2, a3, 1LL);
if ( v7 == 6 )
{
return 0LL;
}
else if ( v7 == -8 )
{
v8 = v6;
v9 = *(_QWORD *)(v6 + 4);
if ( (unsigned int)(v9 >> 62) <= 2 )
{
v13 = *(_QWORD *)(a1 + 24);
v14 = (unsigned int *)(*(_QWORD *)(v13 + 96) + 4 * (HIDWORD(v9) & (unsigned int)(*(_DWORD *)(v13 + 80) - 1)));
v15 = *(_QWORD *)(v13 + 104);
do
{
result = *v14;
v16 = *(_QWORD *)(v15 + 8 * result);
v14 = (unsigned int *)(v16 + 12);
}
while ( v16 != v8 );
}
else
{
return *(unsigned int *)(v8 + 12);
}
}
else
{
return JS_NewAtomStr(a1, v6);
}
}
return result;
}
|
JS_ValueToAtom:
PUSH RBX
SUB RSP,0x10
MOV RAX,RSI
MOV qword ptr [RSP],RSI
TEST EDX,EDX
SETZ CL
TEST EAX,EAX
SETNS SIL
AND SIL,CL
CMP SIL,0x1
JNZ 0x001234aa
OR EAX,0x80000000
LAB_001234a4:
ADD RSP,0x10
POP RBX
RET
LAB_001234aa:
MOV RBX,RDI
CMP EDX,-0x8
JNZ 0x001234cf
MOV RDX,qword ptr [RSP]
MOV RCX,qword ptr [RBX + 0x18]
MOV RAX,qword ptr [RDX + 0x4]
MOV RSI,RAX
SHR RSI,0x3e
CMP ESI,0x2
JBE 0x00123507
MOV EAX,dword ptr [RDX + 0xc]
JMP 0x0012352c
LAB_001234cf:
MOV RSI,qword ptr [RSP]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00126ec9
MOV qword ptr [RSP + 0x8],RAX
CMP EDX,0x6
JZ 0x00123548
CMP EDX,-0x8
JNZ 0x0012354f
MOV RCX,RAX
MOV RAX,qword ptr [RAX + 0x4]
MOV RDX,RAX
SHR RDX,0x3e
CMP EDX,0x2
JBE 0x00123561
MOV EAX,dword ptr [RCX + 0xc]
JMP 0x001234a4
LAB_00123507:
SHR RAX,0x20
MOV ESI,dword ptr [RCX + 0x50]
DEC ESI
AND ESI,EAX
SHL ESI,0x2
ADD RSI,qword ptr [RCX + 0x60]
MOV RDI,qword ptr [RCX + 0x68]
LAB_0012351d:
MOV EAX,dword ptr [RSI]
MOV R8,qword ptr [RDI + RAX*0x8]
LEA RSI,[R8 + 0xc]
CMP R8,RDX
JNZ 0x0012351d
LAB_0012352c:
CMP EAX,0xe0
JL 0x001234a4
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EAX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
JMP 0x001234a4
LAB_00123548:
XOR EAX,EAX
JMP 0x001234a4
LAB_0012354f:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0011f424
JMP 0x001234a4
LAB_00123561:
MOV RSI,qword ptr [RBX + 0x18]
SHR RAX,0x20
MOV EDX,dword ptr [RSI + 0x50]
DEC EDX
AND EDX,EAX
SHL EDX,0x2
ADD RDX,qword ptr [RSI + 0x60]
MOV RSI,qword ptr [RSI + 0x68]
LAB_0012357b:
MOV EAX,dword ptr [RDX]
MOV RDI,qword ptr [RSI + RAX*0x8]
LEA RDX,[RDI + 0xc]
CMP RDI,RCX
JNZ 0x0012357b
JMP 0x001234a4
|
ulong JS_ValueToAtom(long param_1,long param_2,int8 param_3)
{
long lVar1;
int *piVar2;
long lVar3;
uint uVar4;
long lVar5;
ulong uVar6;
uint *puVar7;
int1 auVar8 [12];
if ((int)(uint)param_2 < 0 || (int)param_3 != 0) {
if ((int)param_3 == -8) {
lVar5 = *(long *)(param_1 + 0x18);
uVar4 = (uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20);
if (uVar4 >> 0x1e < 3) {
puVar7 = (uint *)((ulong)((*(int *)(lVar5 + 0x50) - 1U & uVar4) << 2) +
*(long *)(lVar5 + 0x60));
do {
uVar6 = (ulong)*puVar7;
lVar1 = *(long *)(*(long *)(lVar5 + 0x68) + uVar6 * 8);
puVar7 = (uint *)(lVar1 + 0xc);
} while (lVar1 != param_2);
}
else {
uVar6 = (ulong)*(uint *)(param_2 + 0xc);
}
if (0xdf < (int)uVar6) {
piVar2 = *(int **)(*(long *)(lVar5 + 0x68) + uVar6 * 8);
*piVar2 = *piVar2 + 1;
}
}
else {
auVar8 = JS_ToStringInternal(param_1,param_2,param_3,1);
lVar5 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
uVar6 = 0;
}
else if (auVar8._8_4_ == -8) {
uVar4 = (uint)((ulong)*(int8 *)(lVar5 + 4) >> 0x20);
if (uVar4 >> 0x1e < 3) {
lVar1 = *(long *)(param_1 + 0x18);
puVar7 = (uint *)((ulong)((*(int *)(lVar1 + 0x50) - 1U & uVar4) << 2) +
*(long *)(lVar1 + 0x60));
do {
uVar6 = (ulong)*puVar7;
lVar3 = *(long *)(*(long *)(lVar1 + 0x68) + uVar6 * 8);
puVar7 = (uint *)(lVar3 + 0xc);
} while (lVar3 != lVar5);
}
else {
uVar6 = (ulong)*(uint *)(lVar5 + 0xc);
}
}
else {
uVar6 = JS_NewAtomStr(param_1,lVar5);
}
}
}
else {
uVar6 = (ulong)((uint)param_2 | 0x80000000);
}
return uVar6;
}
|
|
12,634
|
JS_ValueToAtom
|
bluesky950520[P]quickjs/quickjs.c
|
JSAtom JS_ValueToAtom(JSContext *ctx, JSValue val)
{
JSAtom atom;
uint32_t tag;
tag = JS_VALUE_GET_TAG(val);
if (tag == JS_TAG_INT &&
(uint32_t)JS_VALUE_GET_INT(val) <= JS_ATOM_MAX_INT) {
/* fast path for integer values */
atom = __JS_AtomFromUInt32(JS_VALUE_GET_INT(val));
} else if (tag == JS_TAG_SYMBOL) {
JSAtomStruct *p = JS_VALUE_GET_PTR(val);
atom = JS_DupAtom(ctx, js_get_atom_index(ctx->rt, p));
} else {
JSValue str;
str = JS_ToPropertyKey(ctx, val);
if (JS_IsException(str))
return JS_ATOM_NULL;
if (JS_VALUE_GET_TAG(str) == JS_TAG_SYMBOL) {
atom = js_symbol_to_atom(ctx, str);
} else {
atom = JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(str));
}
}
return atom;
}
|
O3
|
c
|
JS_ValueToAtom:
pushq %rbx
testl %edx, %edx
sete %al
testl %esi, %esi
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x23aed
orl $0x80000000, %esi # imm = 0x80000000
movl %esi, %eax
popq %rbx
retq
movq %rdi, %rbx
cmpl $-0x8, %edx
jne 0x23b0e
movq 0x18(%rbx), %rax
movq 0x4(%rsi), %rdx
movq %rdx, %rcx
shrq $0x3e, %rcx
cmpl $0x2, %ecx
jbe 0x23b3a
movl 0xc(%rsi), %esi
jmp 0x23b61
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x27518
cmpl $0x6, %edx
je 0x23b7a
cmpl $-0x8, %edx
jne 0x23b81
movq 0x4(%rax), %rdx
movq %rdx, %rcx
shrq $0x3e, %rcx
cmpl $0x2, %ecx
jbe 0x23b8d
movl 0xc(%rax), %esi
jmp 0x23ae9
shrq $0x20, %rdx
movl 0x50(%rax), %ecx
decl %ecx
andl %edx, %ecx
shll $0x2, %ecx
addq 0x60(%rax), %rcx
movq 0x68(%rax), %rdx
movl (%rcx), %edi
movq (%rdx,%rdi,8), %r8
leaq 0xc(%r8), %rcx
cmpq %rsi, %r8
jne 0x23b50
movl %edi, %esi
cmpl $0xe0, %esi
jl 0x23ae9
movq 0x68(%rax), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
incl (%rax)
jmp 0x23ae9
xorl %esi, %esi
jmp 0x23ae9
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x1fb63
movq 0x18(%rbx), %rsi
shrq $0x20, %rdx
movl 0x50(%rsi), %ecx
decl %ecx
andl %edx, %ecx
shll $0x2, %ecx
addq 0x60(%rsi), %rcx
movq 0x68(%rsi), %rdx
movl (%rcx), %esi
movq (%rdx,%rsi,8), %rdi
leaq 0xc(%rdi), %rcx
cmpq %rax, %rdi
jne 0x23ba7
jmp 0x23ae9
|
JS_ValueToAtom:
push rbx
test edx, edx
setz al
test esi, esi
setns cl
and cl, al
cmp cl, 1
jnz short loc_23AED
or esi, 80000000h
loc_23AE9:
mov eax, esi
pop rbx
retn
loc_23AED:
mov rbx, rdi
cmp edx, 0FFFFFFF8h
jnz short loc_23B0E
mov rax, [rbx+18h]
mov rdx, [rsi+4]
mov rcx, rdx
shr rcx, 3Eh
cmp ecx, 2
jbe short loc_23B3A
mov esi, [rsi+0Ch]
jmp short loc_23B61
loc_23B0E:
mov rdi, rbx
mov ecx, 1
call JS_ToStringInternal
cmp edx, 6
jz short loc_23B7A
cmp edx, 0FFFFFFF8h
jnz short loc_23B81
mov rdx, [rax+4]
mov rcx, rdx
shr rcx, 3Eh
cmp ecx, 2
jbe short loc_23B8D
mov esi, [rax+0Ch]
jmp short loc_23AE9
loc_23B3A:
shr rdx, 20h
mov ecx, [rax+50h]
dec ecx
and ecx, edx
shl ecx, 2
add rcx, [rax+60h]
mov rdx, [rax+68h]
loc_23B50:
mov edi, [rcx]
mov r8, [rdx+rdi*8]
lea rcx, [r8+0Ch]
cmp r8, rsi
jnz short loc_23B50
mov esi, edi
loc_23B61:
cmp esi, 0E0h
jl short loc_23AE9
mov rax, [rax+68h]
mov ecx, esi
mov rax, [rax+rcx*8]
inc dword ptr [rax]
jmp loc_23AE9
loc_23B7A:
xor esi, esi
jmp loc_23AE9
loc_23B81:
mov rdi, rbx
mov rsi, rax
pop rbx
jmp JS_NewAtomStr
loc_23B8D:
mov rsi, [rbx+18h]
shr rdx, 20h
mov ecx, [rsi+50h]
dec ecx
and ecx, edx
shl ecx, 2
add rcx, [rsi+60h]
mov rdx, [rsi+68h]
loc_23BA7:
mov esi, [rcx]
mov rdi, [rdx+rsi*8]
lea rcx, [rdi+0Ch]
cmp rdi, rax
jnz short loc_23BA7
jmp loc_23AE9
|
long long JS_ValueToAtom(long long a1, long long a2, long long a3)
{
long long v4; // rax
unsigned long long v5; // rdx
long long v6; // rax
int v7; // edx
unsigned long long v8; // rdx
unsigned int *v9; // rcx
long long v10; // rdi
long long v11; // r8
_DWORD *v12; // rax
long long v13; // rsi
unsigned int *v14; // rcx
long long v15; // rdx
long long v16; // rdi
if ( (_DWORD)a3 == 0 && (int)a2 >= 0 )
{
LODWORD(a2) = a2 | 0x80000000;
return (unsigned int)a2;
}
if ( (_DWORD)a3 == -8 )
{
v4 = *(_QWORD *)(a1 + 24);
v5 = *(_QWORD *)(a2 + 4);
if ( (unsigned int)(v5 >> 62) <= 2 )
{
v9 = (unsigned int *)(*(_QWORD *)(v4 + 96) + 4 * (HIDWORD(v5) & (unsigned int)(*(_DWORD *)(v4 + 80) - 1)));
do
{
v10 = *v9;
v11 = *(_QWORD *)(*(_QWORD *)(v4 + 104) + 8 * v10);
v9 = (unsigned int *)(v11 + 12);
}
while ( v11 != a2 );
LODWORD(a2) = v10;
}
else
{
LODWORD(a2) = *(_DWORD *)(a2 + 12);
}
if ( (int)a2 >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(v4 + 104) + 8LL * (unsigned int)a2);
++*v12;
}
return (unsigned int)a2;
}
v6 = JS_ToStringInternal(a1, a2, a3, 1LL);
if ( v7 == 6 )
{
LODWORD(a2) = 0;
return (unsigned int)a2;
}
if ( v7 == -8 )
{
v8 = *(_QWORD *)(v6 + 4);
if ( (unsigned int)(v8 >> 62) <= 2 )
{
v13 = *(_QWORD *)(a1 + 24);
v14 = (unsigned int *)(*(_QWORD *)(v13 + 96) + 4 * (HIDWORD(v8) & (unsigned int)(*(_DWORD *)(v13 + 80) - 1)));
v15 = *(_QWORD *)(v13 + 104);
do
{
a2 = *v14;
v16 = *(_QWORD *)(v15 + 8 * a2);
v14 = (unsigned int *)(v16 + 12);
}
while ( v16 != v6 );
}
else
{
LODWORD(a2) = *(_DWORD *)(v6 + 12);
}
return (unsigned int)a2;
}
return JS_NewAtomStr(a1, v6);
}
|
JS_ValueToAtom:
PUSH RBX
TEST EDX,EDX
SETZ AL
TEST ESI,ESI
SETNS CL
AND CL,AL
CMP CL,0x1
JNZ 0x00123aed
OR ESI,0x80000000
LAB_00123ae9:
MOV EAX,ESI
POP RBX
RET
LAB_00123aed:
MOV RBX,RDI
CMP EDX,-0x8
JNZ 0x00123b0e
MOV RAX,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSI + 0x4]
MOV RCX,RDX
SHR RCX,0x3e
CMP ECX,0x2
JBE 0x00123b3a
MOV ESI,dword ptr [RSI + 0xc]
JMP 0x00123b61
LAB_00123b0e:
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00127518
CMP EDX,0x6
JZ 0x00123b7a
CMP EDX,-0x8
JNZ 0x00123b81
MOV RDX,qword ptr [RAX + 0x4]
MOV RCX,RDX
SHR RCX,0x3e
CMP ECX,0x2
JBE 0x00123b8d
MOV ESI,dword ptr [RAX + 0xc]
JMP 0x00123ae9
LAB_00123b3a:
SHR RDX,0x20
MOV ECX,dword ptr [RAX + 0x50]
DEC ECX
AND ECX,EDX
SHL ECX,0x2
ADD RCX,qword ptr [RAX + 0x60]
MOV RDX,qword ptr [RAX + 0x68]
LAB_00123b50:
MOV EDI,dword ptr [RCX]
MOV R8,qword ptr [RDX + RDI*0x8]
LEA RCX,[R8 + 0xc]
CMP R8,RSI
JNZ 0x00123b50
MOV ESI,EDI
LAB_00123b61:
CMP ESI,0xe0
JL 0x00123ae9
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8]
INC dword ptr [RAX]
JMP 0x00123ae9
LAB_00123b7a:
XOR ESI,ESI
JMP 0x00123ae9
LAB_00123b81:
MOV RDI,RBX
MOV RSI,RAX
POP RBX
JMP 0x0011fb63
LAB_00123b8d:
MOV RSI,qword ptr [RBX + 0x18]
SHR RDX,0x20
MOV ECX,dword ptr [RSI + 0x50]
DEC ECX
AND ECX,EDX
SHL ECX,0x2
ADD RCX,qword ptr [RSI + 0x60]
MOV RDX,qword ptr [RSI + 0x68]
LAB_00123ba7:
MOV ESI,dword ptr [RCX]
MOV RDI,qword ptr [RDX + RSI*0x8]
LEA RCX,[RDI + 0xc]
CMP RDI,RAX
JNZ 0x00123ba7
JMP 0x00123ae9
|
ulong JS_ValueToAtom(long param_1,long param_2,int8 param_3)
{
long lVar1;
int *piVar2;
long lVar3;
uint uVar4;
long lVar5;
ulong uVar6;
uint *puVar7;
int1 auVar8 [12];
if ((int)(uint)param_2 < 0 || (int)param_3 != 0) {
if ((int)param_3 == -8) {
lVar5 = *(long *)(param_1 + 0x18);
uVar4 = (uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20);
if (uVar4 >> 0x1e < 3) {
puVar7 = (uint *)((ulong)((*(int *)(lVar5 + 0x50) - 1U & uVar4) << 2) +
*(long *)(lVar5 + 0x60));
do {
uVar6 = (ulong)*puVar7;
lVar1 = *(long *)(*(long *)(lVar5 + 0x68) + uVar6 * 8);
puVar7 = (uint *)(lVar1 + 0xc);
} while (lVar1 != param_2);
}
else {
uVar6 = (ulong)*(uint *)(param_2 + 0xc);
}
if (0xdf < (int)uVar6) {
piVar2 = *(int **)(*(long *)(lVar5 + 0x68) + uVar6 * 8);
*piVar2 = *piVar2 + 1;
}
}
else {
auVar8 = JS_ToStringInternal(param_1,param_2,param_3,1);
lVar5 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
uVar6 = 0;
}
else {
if (auVar8._8_4_ != -8) {
uVar6 = JS_NewAtomStr(param_1,lVar5);
return uVar6;
}
uVar4 = (uint)((ulong)*(int8 *)(lVar5 + 4) >> 0x20);
if (uVar4 >> 0x1e < 3) {
lVar1 = *(long *)(param_1 + 0x18);
puVar7 = (uint *)((ulong)((*(int *)(lVar1 + 0x50) - 1U & uVar4) << 2) +
*(long *)(lVar1 + 0x60));
do {
uVar6 = (ulong)*puVar7;
lVar3 = *(long *)(*(long *)(lVar1 + 0x68) + uVar6 * 8);
puVar7 = (uint *)(lVar3 + 0xc);
} while (lVar3 != lVar5);
}
else {
uVar6 = (ulong)*(uint *)(lVar5 + 0xc);
}
}
}
}
else {
uVar6 = (ulong)((uint)param_2 | 0x80000000);
}
return uVar6;
}
|
|
12,635
|
YAML::detail::node_data::set_type(YAML::NodeType::value)
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/node_data.cpp
|
void node_data::set_type(NodeType::value type) {
if (type == NodeType::Undefined) {
m_type = type;
m_isDefined = false;
return;
}
m_isDefined = true;
if (type == m_type)
return;
m_type = type;
switch (m_type) {
case NodeType::Null:
break;
case NodeType::Scalar:
m_scalar.clear();
break;
case NodeType::Sequence:
reset_sequence();
break;
case NodeType::Map:
reset_map();
break;
case NodeType::Undefined:
assert(false);
break;
}
}
|
O3
|
cpp
|
YAML::detail::node_data::set_type(YAML::NodeType::value):
testl %esi, %esi
je 0x8116d
movb $0x1, (%rdi)
cmpl %esi, 0x10(%rdi)
jne 0x81178
retq
movl $0x0, 0x10(%rdi)
movb $0x0, (%rdi)
retq
movl %esi, 0x10(%rdi)
cmpl $0x4, %esi
je 0x811b1
cmpl $0x3, %esi
je 0x8119a
cmpl $0x2, %esi
jne 0x8116c
movq $0x0, 0x48(%rdi)
movq 0x40(%rdi), %rax
movb $0x0, (%rax)
retq
movq 0x60(%rdi), %rax
cmpq %rax, 0x68(%rdi)
je 0x811a8
movq %rax, 0x68(%rdi)
movq $0x0, 0x78(%rdi)
retq
movq 0x80(%rdi), %rax
cmpq %rax, 0x88(%rdi)
je 0x811c8
movq %rax, 0x88(%rdi)
addq $0x98, %rdi
jmp 0x81cec
|
_ZN4YAML6detail9node_data8set_typeENS_8NodeType5valueE:
test esi, esi
jz short loc_8116D
mov byte ptr [rdi], 1
cmp [rdi+10h], esi
jnz short loc_81178
locret_8116C:
retn
loc_8116D:
mov dword ptr [rdi+10h], 0
mov byte ptr [rdi], 0
retn
loc_81178:
mov [rdi+10h], esi
cmp esi, 4
jz short loc_811B1
cmp esi, 3
jz short loc_8119A
cmp esi, 2
jnz short locret_8116C
mov qword ptr [rdi+48h], 0
mov rax, [rdi+40h]
mov byte ptr [rax], 0
retn
loc_8119A:
mov rax, [rdi+60h]
cmp [rdi+68h], rax
jz short loc_811A8
mov [rdi+68h], rax
loc_811A8:
mov qword ptr [rdi+78h], 0
retn
loc_811B1:
mov rax, [rdi+80h]
cmp [rdi+88h], rax
jz short loc_811C8
mov [rdi+88h], rax
loc_811C8:
add rdi, 98h
jmp _ZNSt7__cxx114listISt4pairIPN4YAML6detail4nodeES5_ESaIS6_EE5clearEv; std::list<std::pair<YAML::detail::node *,YAML::detail::node *>>::clear(void)
|
void YAML::detail::node_data::set_type(long long a1, int a2)
{
long long v2; // rax
long long v3; // rax
if ( a2 )
{
*(_BYTE *)a1 = 1;
if ( *(_DWORD *)(a1 + 16) != a2 )
{
*(_DWORD *)(a1 + 16) = a2;
switch ( a2 )
{
case 4:
v3 = *(_QWORD *)(a1 + 128);
if ( *(_QWORD *)(a1 + 136) != v3 )
*(_QWORD *)(a1 + 136) = v3;
std::list<std::pair<YAML::detail::node *,YAML::detail::node *>>::clear(a1 + 152);
break;
case 3:
v2 = *(_QWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 104) != v2 )
*(_QWORD *)(a1 + 104) = v2;
*(_QWORD *)(a1 + 120) = 0LL;
break;
case 2:
*(_QWORD *)(a1 + 72) = 0LL;
**(_BYTE **)(a1 + 64) = 0;
break;
}
}
}
else
{
*(_DWORD *)(a1 + 16) = 0;
*(_BYTE *)a1 = 0;
}
}
|
set_type:
TEST ESI,ESI
JZ 0x0018116d
MOV byte ptr [RDI],0x1
CMP dword ptr [RDI + 0x10],ESI
JNZ 0x00181178
LAB_0018116c:
RET
LAB_0018116d:
MOV dword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI],0x0
RET
LAB_00181178:
MOV dword ptr [RDI + 0x10],ESI
CMP ESI,0x4
JZ 0x001811b1
CMP ESI,0x3
JZ 0x0018119a
CMP ESI,0x2
JNZ 0x0018116c
MOV qword ptr [RDI + 0x48],0x0
MOV RAX,qword ptr [RDI + 0x40]
MOV byte ptr [RAX],0x0
RET
LAB_0018119a:
MOV RAX,qword ptr [RDI + 0x60]
CMP qword ptr [RDI + 0x68],RAX
JZ 0x001811a8
MOV qword ptr [RDI + 0x68],RAX
LAB_001811a8:
MOV qword ptr [RDI + 0x78],0x0
RET
LAB_001811b1:
MOV RAX,qword ptr [RDI + 0x80]
CMP qword ptr [RDI + 0x88],RAX
JZ 0x001811c8
MOV qword ptr [RDI + 0x88],RAX
LAB_001811c8:
ADD RDI,0x98
JMP 0x00181cec
|
/* YAML::detail::node_data::set_type(YAML::NodeType::value) */
void __thiscall YAML::detail::node_data::set_type(node_data *this,int param_2)
{
if (param_2 == 0) {
*(int4 *)(this + 0x10) = 0;
*this = (node_data)0x0;
return;
}
*this = (node_data)0x1;
if (*(int *)(this + 0x10) != param_2) {
*(int *)(this + 0x10) = param_2;
if (param_2 == 4) {
if (*(long *)(this + 0x88) != *(long *)(this + 0x80)) {
*(long *)(this + 0x88) = *(long *)(this + 0x80);
}
std::__cxx11::
list<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>
::clear((list<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>
*)(this + 0x98));
return;
}
if (param_2 == 3) {
if (*(long *)(this + 0x68) != *(long *)(this + 0x60)) {
*(long *)(this + 0x68) = *(long *)(this + 0x60);
}
*(int8 *)(this + 0x78) = 0;
return;
}
if (param_2 == 2) {
*(int8 *)(this + 0x48) = 0;
**(int1 **)(this + 0x40) = 0;
return;
}
}
return;
}
|
|
12,636
|
insert_at
|
eloqsql/mysys/queues.c
|
static void insert_at(QUEUE *queue, uchar *element, uint idx)
{
uint next_index, offset_to_key= queue->offset_to_key;
uint offset_to_queue_pos= queue->offset_to_queue_pos;
/* max_at_top swaps the comparison if we want to order by desc */
while ((next_index= idx >> 1) > 0 &&
queue->compare(queue->first_cmp_arg,
element + offset_to_key,
queue->root[next_index] + offset_to_key) *
queue->max_at_top < 0)
{
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O0
|
c
|
insert_at:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
shrl %ecx
movl %ecx, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
jbe 0x8401a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %ecx
addq %rcx, %rsi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x18(%rbp), %edx
movq (%rcx,%rdx,8), %rdx
movl -0x1c(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
setl %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x84023
jmp 0x84068
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x20(%rbp)
je 0x8405d
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x83fc7
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x20(%rbp)
je 0x8408e
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
insert_at:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov eax, [rax+18h]
mov [rbp+var_1C], eax
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_20], eax
loc_83FC7:
mov ecx, [rbp+var_14]
shr ecx, 1
mov [rbp+var_18], ecx
xor eax, eax
cmp ecx, 0
mov [rbp+var_21], al
jbe short loc_8401A
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rsi, [rbp+var_10]
mov ecx, [rbp+var_1C]
add rsi, rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_18]
mov rdx, [rcx+rdx*8]
mov ecx, [rbp+var_1C]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
setl al
mov [rbp+var_21], al
loc_8401A:
mov al, [rbp+var_21]
test al, 1
jnz short loc_84023
jmp short loc_84068
loc_84023:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_18]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov [rax+rcx*8], rdx
cmp [rbp+var_20], 0
jz short loc_8405D
mov edx, [rbp+var_14]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_20]
mov [rax+rcx-1], edx
loc_8405D:
mov eax, [rbp+var_18]
mov [rbp+var_14], eax
jmp loc_83FC7
loc_84068:
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov [rax+rcx*8], rdx
cmp [rbp+var_20], 0
jz short loc_8408E
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov [rax+rcx-1], edx
loc_8408E:
add rsp, 30h
pop rbp
retn
|
long long insert_at(long long *a1, long long a2, unsigned int a3)
{
long long result; // rax
bool v4; // [rsp+Fh] [rbp-21h]
unsigned int v5; // [rsp+10h] [rbp-20h]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
unsigned int v7; // [rsp+18h] [rbp-18h]
v6 = *((_DWORD *)a1 + 6);
v5 = *((_DWORD *)a1 + 7);
while ( 1 )
{
v7 = a3 >> 1;
v4 = 0;
if ( a3 >> 1 )
v4 = (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, _QWORD))a1[5])(
a1[1],
v6 + a2,
v6 + *(_QWORD *)(*a1 + 8LL * v7))) < 0;
if ( !v4 )
break;
*(_QWORD *)(*a1 + 8LL * a3) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v5 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * a3) + v5 - 1LL) = a3;
a3 >>= 1;
}
result = *a1;
*(_QWORD *)(*a1 + 8LL * a3) = a2;
if ( v5 )
{
result = a2;
*(_DWORD *)(a2 + v5 - 1) = a3;
}
return result;
}
|
insert_at:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x20],EAX
LAB_00183fc7:
MOV ECX,dword ptr [RBP + -0x14]
SHR ECX,0x1
MOV dword ptr [RBP + -0x18],ECX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x21],AL
JBE 0x0018401a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
SETL AL
MOV byte ptr [RBP + -0x21],AL
LAB_0018401a:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x00184023
JMP 0x00184068
LAB_00184023:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x0018405d
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_0018405d:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00183fc7
LAB_00184068:
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x0018408e
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_0018408e:
ADD RSP,0x30
POP RBP
RET
|
void insert_at(long *param_1,long param_2,uint param_3)
{
uint uVar1;
uint uVar2;
int iVar3;
uint uVar4;
bool bVar5;
uint local_1c;
uVar1 = *(uint *)(param_1 + 3);
uVar2 = *(uint *)((long)param_1 + 0x1c);
uVar4 = param_3;
while( true ) {
local_1c = uVar4;
uVar4 = local_1c >> 1;
bVar5 = false;
if (uVar4 != 0) {
iVar3 = (*(code *)param_1[5])
(param_1[1],param_2 + (ulong)uVar1,
*(long *)(*param_1 + (ulong)uVar4 * 8) + (ulong)uVar1);
bVar5 = iVar3 * *(int *)((long)param_1 + 0x24) < 0;
}
if (!bVar5) break;
*(int8 *)(*param_1 + (ulong)local_1c * 8) = *(int8 *)(*param_1 + (ulong)uVar4 * 8);
if (uVar2 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)local_1c * 8) + -1 + (ulong)uVar2) = local_1c;
}
}
*(long *)(*param_1 + (ulong)local_1c * 8) = param_2;
if (uVar2 != 0) {
*(uint *)(param_2 + -1 + (ulong)uVar2) = local_1c;
}
return;
}
|
|
12,637
|
maria_rtree_delete
|
eloqsql/storage/maria/ma_rt_index.c
|
my_bool maria_rtree_delete(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
my_off_t new_root= share->state.key_root[key->keyinfo->key_nr];
int res;
LSN lsn= LSN_IMPOSSIBLE;
DBUG_ENTER("maria_rtree_delete");
if ((res= maria_rtree_real_delete(info, key, &new_root)))
goto err;
if (share->now_transactional)
res= _ma_write_undo_key_delete(info, key, new_root, &lsn);
else
share->state.key_root[key->keyinfo->key_nr]= new_root;
err:
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res != 0);
}
|
O0
|
c
|
maria_rtree_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0xa5(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x8ebc0
movsbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x8eb43
jmp 0x8eb91
movq -0x18(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x8eb6d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x87800
movsbl %al, %eax
movl %eax, -0x24(%rbp)
jmp 0x8eb8f
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0xa5(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x8eb91
movq -0x8(%rbp), %rdi
callq 0x8ea80
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x8eab0
cmpl $0x0, -0x24(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nop
|
maria_rtree_delete:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rax, [rax+118h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
movzx ecx, byte ptr [rcx+0A5h]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
mov [rbp+var_30], 0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_20]
call maria_rtree_real_delete
movsx eax, al
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_8EB43
jmp short loc_8EB91
loc_8EB43:
mov rax, [rbp+var_18]
cmp byte ptr [rax+7E7h], 0
jz short loc_8EB6D
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_30]
call _ma_write_undo_key_delete
movsx eax, al
mov [rbp+var_24], eax
jmp short loc_8EB8F
loc_8EB6D:
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
mov rax, [rax+118h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
movzx ecx, byte ptr [rcx+0A5h]
mov [rax+rcx*8], rdx
loc_8EB8F:
jmp short $+2
loc_8EB91:
mov rdi, [rbp+var_8]
call _ma_fast_unlock_key_del_2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
call _ma_unpin_all_pages_and_finalize_row_3
cmp [rbp+var_24], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_31], al
mov al, [rbp+var_31]
add rsp, 40h
pop rbp
retn
|
_BOOL8 maria_rtree_delete(long long *a1, long long a2)
{
char v2; // al
long long v4; // [rsp+10h] [rbp-30h] BYREF
int v5; // [rsp+1Ch] [rbp-24h]
unsigned long long v6; // [rsp+20h] [rbp-20h] BYREF
long long v7; // [rsp+28h] [rbp-18h]
long long v8; // [rsp+30h] [rbp-10h]
long long *v9; // [rsp+38h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = *a1;
v6 = *(_QWORD *)(*(_QWORD *)(v7 + 280) + 8LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL));
v4 = 0LL;
v2 = maria_rtree_real_delete(a1, a2, &v6);
v5 = v2;
if ( !v2 )
{
if ( *(_BYTE *)(v7 + 2023) )
v5 = ma_write_undo_key_delete(v9, v8, v6, (long long)&v4);
else
*(_QWORD *)(*(_QWORD *)(v7 + 280) + 8LL * *(unsigned __int8 *)(*(_QWORD *)(v8 + 8) + 165LL)) = v6;
}
ma_fast_unlock_key_del_2((long long)v9);
ma_unpin_all_pages_and_finalize_row_3((long long)v9, v4);
return v5 != 0;
}
|
maria_rtree_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x30],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x20]
CALL 0x0018ebc0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x0018eb43
JMP 0x0018eb91
LAB_0018eb43:
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x0018eb6d
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x30]
CALL 0x00187800
MOVSX EAX,AL
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0018eb8f
LAB_0018eb6d:
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_0018eb8f:
JMP 0x0018eb91
LAB_0018eb91:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0018ea80
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0018eab0
CMP dword ptr [RBP + -0x24],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
ADD RSP,0x40
POP RBP
RET
|
bool maria_rtree_delete(long *param_1,long param_2)
{
char cVar1;
int8 local_38;
int local_2c;
int8 local_28;
long local_20;
long local_18;
long *local_10;
local_20 = *param_1;
local_28 = *(int8 *)
(*(long *)(local_20 + 0x118) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8);
local_38 = 0;
local_18 = param_2;
local_10 = param_1;
cVar1 = maria_rtree_real_delete(param_1,param_2,&local_28);
local_2c = (int)cVar1;
if (local_2c == 0) {
if (*(char *)(local_20 + 0x7e7) == '\0') {
*(int8 *)
(*(long *)(local_20 + 0x118) + (ulong)*(byte *)(*(long *)(local_18 + 8) + 0xa5) * 8) =
local_28;
}
else {
cVar1 = _ma_write_undo_key_delete(local_10,local_18,local_28,&local_38);
local_2c = (int)cVar1;
}
}
_ma_fast_unlock_key_del(local_10);
_ma_unpin_all_pages_and_finalize_row(local_10,local_38);
return local_2c != 0;
}
|
|
12,638
|
my_strnncoll_simple
|
eloqsql/strings/ctype-simple.c
|
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
}
|
O0
|
c
|
my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x430d2
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x430da
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x0, %eax
je 0x43109
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x43109
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x4310b
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x40(%rbp)
cmpq $0x0, %rax
je 0x43181
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4317f
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl -0x1(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x431b3
jmp 0x4310b
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x43195
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x431ad
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_strnncoll_simple:
push rbp
mov rbp, rsp
mov al, r9b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_31], al
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_430D2
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
jmp short loc_430DA
loc_430D2:
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
loc_430DA:
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_48], rax
movsx eax, [rbp+var_31]
cmp eax, 0
jz short loc_43109
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_43109
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
loc_43109:
jmp short $+2
loc_4310B:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rcx
cmp rax, 0
jz short loc_43181
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_28]
mov rsi, rdx
add rsi, 1
mov [rbp+var_28], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_4317F
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_28]
movzx edx, byte ptr [rdx-1]
movzx ecx, byte ptr [rcx+rdx]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_431B3
loc_4317F:
jmp short loc_4310B
loc_43181:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_43195
mov eax, 1
mov [rbp+var_54], eax
jmp short loc_431AD
loc_43195:
mov rdx, [rbp+var_20]
mov rsi, [rbp+var_30]
xor eax, eax
mov ecx, 0FFFFFFFFh
cmp rdx, rsi
cmovb eax, ecx
mov [rbp+var_54], eax
loc_431AD:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_431B3:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_strnncoll_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
unsigned __int8 *v7; // rcx
unsigned __int8 *v8; // rdx
unsigned int v9; // eax
unsigned long long v12; // [rsp+4h] [rbp-50h]
long long v13; // [rsp+Ch] [rbp-48h]
unsigned long long v14; // [rsp+14h] [rbp-40h]
unsigned long long v16; // [rsp+34h] [rbp-20h]
v16 = a3;
if ( a3 <= a5 )
v12 = a3;
else
v12 = a5;
v14 = v12;
v13 = *(_QWORD *)(a1 + 88);
if ( a6 && a3 > a5 )
v16 = a5;
while ( v14-- )
{
v7 = a2++;
v8 = a4++;
if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) )
return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1)));
}
if ( v16 <= a5 )
{
v9 = 0;
if ( v16 < a5 )
v9 = -1;
return v9;
}
else
{
return 1;
}
}
|
my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
MOV AL,R9B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x001430d2
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001430da
LAB_001430d2:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
LAB_001430da:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x48],RAX
MOVSX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x0
JZ 0x00143109
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00143109
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
LAB_00143109:
JMP 0x0014310b
LAB_0014310b:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x40],RCX
CMP RAX,0x0
JZ 0x00143181
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x28]
MOV RSI,RDX
ADD RSI,0x1
MOV qword ptr [RBP + -0x28],RSI
MOVZX EDX,byte ptr [RDX]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x0014317f
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX EDX,byte ptr [RDX + -0x1]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001431b3
LAB_0014317f:
JMP 0x0014310b
LAB_00143181:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00143195
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001431ad
LAB_00143195:
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
XOR EAX,EAX
MOV ECX,0xffffffff
CMP RDX,RSI
CMOVC EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
LAB_001431ad:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x4],EAX
LAB_001431b3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
long lVar1;
byte *pbVar2;
byte *pbVar3;
int local_5c;
ulong local_58;
ulong local_48;
byte *local_30;
ulong local_28;
byte *local_20;
local_58 = param_3;
if (param_5 < param_3) {
local_58 = param_5;
}
local_48 = local_58;
lVar1 = *(long *)(param_1 + 0x58);
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_3;
if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) {
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_5;
}
do {
local_20 = pbVar3;
local_30 = pbVar2;
if (local_48 == 0) {
if (param_5 < local_28) {
local_5c = 1;
}
else {
local_5c = 0;
if (local_28 < param_5) {
local_5c = -1;
}
}
return local_5c;
}
local_48 = local_48 - 1;
pbVar2 = local_30 + 1;
pbVar3 = local_20 + 1;
} while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30));
return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30);
}
|
|
12,639
|
list_delete
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
LIST *list_delete(LIST *root, LIST *element)
{
if (element->prev)
element->prev->next=element->next;
else
root=element->next;
if (element->next)
element->next->prev=element->prev;
return root;
}
|
O0
|
c
|
list_delete:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3d5cb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x3d5d7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3d5f4
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
|
list_delete:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz short loc_3D5CB
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+8], rcx
jmp short loc_3D5D7
loc_3D5CB:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_8], rax
loc_3D5D7:
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_3D5F4
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax], rcx
loc_3D5F4:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long list_delete(long long a1, _QWORD *a2)
{
if ( *a2 )
*(_QWORD *)(*a2 + 8LL) = a2[1];
else
a1 = a2[1];
if ( a2[1] )
*(_QWORD *)a2[1] = *a2;
return a1;
}
|
list_delete:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x0013d5cb
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013d5d7
LAB_0013d5cb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_0013d5d7:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0013d5f4
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX],RCX
LAB_0013d5f4:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long list_delete(long param_1,long *param_2)
{
long local_10;
if (*param_2 == 0) {
local_10 = param_2[1];
}
else {
*(long *)(*param_2 + 8) = param_2[1];
local_10 = param_1;
}
if (param_2[1] != 0) {
*(long *)param_2[1] = *param_2;
}
return local_10;
}
|
|
12,640
|
my_wc_mb_latin1
|
eloqsql/strings/ctype-latin1.c
|
static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
|
O0
|
c
|
my_wc_mb_latin1:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x1161ea
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x116271
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x1161fd
movl $0x0, -0x4(%rbp)
jmp 0x116271
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
leaq 0x19fe94(%rip), %rax # 0x2b60a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x116233
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
andq $0xff, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
jmp 0x11623a
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x11623a
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x35(%rbp)
jne 0x11625e
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_wc_mb_latin1:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_1161EA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_116271
loc_1161EA:
cmp [rbp+var_18], 0FFFFh
jbe short loc_1161FD
mov [rbp+var_4], 0
jmp short loc_116271
loc_1161FD:
mov rcx, [rbp+var_18]
shr rcx, 8
lea rax, uni_to_cs
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_116233
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
and rcx, 0FFh
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
jmp short loc_11623A
loc_116233:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_11623A:
mov eax, [rbp+var_34]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_35], al
jnz short loc_11625E
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_35], al
loc_11625E:
mov dl, [rbp+var_35]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_116271:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-35h]
char v6; // [rsp+2h] [rbp-34h]
long long v7; // [rsp+6h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 0xFFFF )
{
v7 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v7 )
v6 = *(_BYTE *)(v7 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-101;
}
}
| |||
12,641
|
my_wc_mb_latin1
|
eloqsql/strings/ctype-latin1.c
|
static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
|
O3
|
c
|
my_wc_mb_latin1:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb2cf4
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0xb2cf4
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
shrq $0x8, %rax
leaq 0x2ca2f3(%rip), %rcx # 0x37cfc0
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xb2cdf
movzbl %sil, %ecx
movb (%rax,%rcx), %al
jmp 0xb2ce1
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbp
retq
|
my_wc_mb_latin1:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B2CF4
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_B2CF4
push rbp
mov rbp, rsp
mov rax, rsi
shr rax, 8
lea rcx, uni_to_cs
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_B2CDF
movzx ecx, sil
mov al, [rax+rcx]
jmp short loc_B2CE1
loc_B2CDF:
xor eax, eax
loc_B2CE1:
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
pop rbp
locret_B2CF4:
retn
|
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
|
my_wc_mb_latin1:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b2cf4
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001b2cf4
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
SHR RAX,0x8
LEA RCX,[0x47cfc0]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x001b2cdf
MOVZX ECX,SIL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x001b2ce1
LAB_001b2cdf:
XOR EAX,EAX
LAB_001b2ce1:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBP
LAB_001b2cf4:
RET
|
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
|
|
12,642
|
ma_copy_key
|
eloqsql/storage/maria/ma_key.c
|
void _ma_copy_key(MARIA_KEY *to, const MARIA_KEY *from)
{
memcpy(to->data, from->data, from->data_length + from->ref_length);
to->keyinfo= from->keyinfo;
to->data_length= from->data_length;
to->ref_length= from->ref_length;
to->flag= from->flag;
}
|
O3
|
c
|
ma_copy_key:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
movl 0x14(%rbx), %edx
addl 0x10(%rbx), %edx
callq 0x29080
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movl 0x14(%rbx), %eax
movl %eax, 0x14(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
|
_ma_copy_key:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]
mov rsi, [rsi]
mov edx, [rbx+14h]
add edx, [rbx+10h]
call _memcpy
mov rax, [rbx+8]
mov [r14+8], rax
mov eax, [rbx+10h]
mov [r14+10h], eax
mov eax, [rbx+14h]
mov [r14+14h], eax
mov eax, [rbx+18h]
mov [r14+18h], eax
pop rbx
pop r14
pop rbp
retn
|
long long ma_copy_key(long long a1, long long a2)
{
long long result; // rax
memcpy(*(_QWORD *)a1, *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20)));
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_DWORD *)(a1 + 16) = *(_DWORD *)(a2 + 16);
*(_DWORD *)(a1 + 20) = *(_DWORD *)(a2 + 20);
result = *(unsigned int *)(a2 + 24);
*(_DWORD *)(a1 + 24) = result;
return result;
}
|
_ma_copy_key:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [RBX + 0x14]
ADD EDX,dword ptr [RBX + 0x10]
CALL 0x00129080
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV EAX,dword ptr [RBX + 0x10]
MOV dword ptr [R14 + 0x10],EAX
MOV EAX,dword ptr [RBX + 0x14]
MOV dword ptr [R14 + 0x14],EAX
MOV EAX,dword ptr [RBX + 0x18]
MOV dword ptr [R14 + 0x18],EAX
POP RBX
POP R14
POP RBP
RET
|
void _ma_copy_key(int8 *param_1,int8 *param_2)
{
memcpy((void *)*param_1,(void *)*param_2,
(ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2)));
param_1[1] = param_2[1];
*(int4 *)(param_1 + 2) = *(int4 *)(param_2 + 2);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)((long)param_2 + 0x14);
*(int4 *)(param_1 + 3) = *(int4 *)(param_2 + 3);
return;
}
|
|
12,643
|
remove_reader
|
eloqsql/mysys/mf_keycache.c
|
static void remove_reader(BLOCK_LINK *block)
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
DBUG_ASSERT(block->hash_link->requests);
if (! --block->hash_link->requests && block->condvar)
keycache_pthread_cond_signal(block->condvar);
}
|
O3
|
c
|
remove_reader:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rax
decl 0x28(%rax)
je 0x533ee
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x68(%rdi), %rbx
testq %rbx, %rbx
je 0x533e7
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x5340e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x28040
leaq 0x2dcf3b(%rip), %rax # 0x330350
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x53400
|
remove_reader:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi+20h]
dec dword ptr [rax+28h]
jz short loc_533EE
loc_533E7:
add rsp, 8
pop rbx
pop rbp
retn
loc_533EE:
mov rbx, [rdi+68h]
test rbx, rbx
jz short loc_533E7
mov rdi, [rbx+30h]
test rdi, rdi
jnz short loc_5340E
loc_53400:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _pthread_cond_signal
loc_5340E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_53400
|
long long remove_reader(long long a1)
{
long long result; // rax
long long v3; // rbx
long long v4; // rdi
result = *(_QWORD *)(a1 + 32);
if ( (*(_DWORD *)(result + 40))-- == 1 )
{
v3 = *(_QWORD *)(a1 + 104);
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 48);
if ( v4 )
((void ( *)(long long))PSI_server[46])(v4);
return pthread_cond_signal(v3);
}
}
return result;
}
|
remove_reader:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x20]
DEC dword ptr [RAX + 0x28]
JZ 0x001533ee
LAB_001533e7:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_001533ee:
MOV RBX,qword ptr [RDI + 0x68]
TEST RBX,RBX
JZ 0x001533e7
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JNZ 0x0015340e
LAB_00153400:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00128040
LAB_0015340e:
LEA RAX,[0x430350]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x00153400
|
void remove_reader(long param_1)
{
int *piVar1;
pthread_cond_t *__cond;
piVar1 = (int *)(*(long *)(param_1 + 0x20) + 0x28);
*piVar1 = *piVar1 + -1;
if ((*piVar1 == 0) &&
(__cond = *(pthread_cond_t **)(param_1 + 0x68), __cond != (pthread_cond_t *)0x0)) {
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
return;
}
return;
}
|
|
12,644
|
js_array_of
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_of(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, args[1];
int i;
if (JS_IsConstructor(ctx, this_val)) {
args[0] = js_int32(argc);
obj = JS_CallConstructor(ctx, this_val, 1, args);
} else {
obj = JS_NewArray(ctx);
}
if (JS_IsException(obj))
return JS_EXCEPTION;
for(i = 0; i < argc; i++) {
if (JS_CreateDataPropertyUint32(ctx, obj, i, js_dup(argv[i]),
JS_PROP_THROW) < 0) {
goto fail;
}
}
if (JS_SetProperty(ctx, obj, JS_ATOM_length, js_uint32(argc)) < 0) {
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
}
|
O0
|
c
|
js_array_of:
subq $0xd8, %rsp
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movl %ecx, 0xac(%rsp)
movq %r8, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
callq 0x36e30
cmpl $0x0, %eax
je 0xceb74
movl 0xac(%rsp), %edi
callq 0x32a00
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0x80(%rsp), %r8
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movl $0x1, %ecx
callq 0x47290
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0xceba5
movq 0xb0(%rsp), %rdi
callq 0x29260
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xcebdb
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0xced27
movl $0x0, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
cmpl 0xac(%rsp), %eax
jge 0xcec7e
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%rsp)
movslq 0x7c(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movslq 0x7c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x20410
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rcx
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
movl $0x4000, (%rsp) # imm = 0x4000
callq 0x6f6e0
cmpl $0x0, %eax
jge 0xcec6c
jmp 0xcecd1
jmp 0xcec6e
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0xcebe3
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0xac(%rsp), %edi
callq 0x328a0
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r9
movl $0x32, %ecx
callq 0x30c40
cmpl $0x0, %eax
jge 0xced07
jmp 0xcecd1
movq 0xb0(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0xced27
movq 0x90(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nop
|
js_array_of:
sub rsp, 0D8h
mov [rsp+0D8h+var_20], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_28], rdi
mov [rsp+0D8h+var_2C], ecx
mov [rsp+0D8h+var_38], r8
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_20]
mov rdx, [rsp+0D8h+var_18]
call JS_IsConstructor
cmp eax, 0
jz loc_CEB74
mov edi, [rsp+0D8h+var_2C]
call js_int32
mov [rsp+0D8h+var_70], rax
mov [rsp+0D8h+var_68], rdx
mov rax, [rsp+0D8h+var_70]
mov [rsp+0D8h+var_58], rax
mov rax, [rsp+0D8h+var_68]
mov [rsp+0D8h+var_50], rax
mov rdi, [rsp+0D8h+var_28]
lea r8, [rsp+0D8h+var_58]
mov rsi, [rsp+0D8h+var_20]
mov rdx, [rsp+0D8h+var_18]
mov ecx, 1
call JS_CallConstructor
mov [rsp+0D8h+var_80], rax
mov [rsp+0D8h+var_78], rdx
mov rax, [rsp+0D8h+var_80]
mov [rsp+0D8h+var_48], rax
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_40], rax
jmp short loc_CEBA5
loc_CEB74:
mov rdi, [rsp+0D8h+var_28]
call JS_NewArray
mov [rsp+0D8h+var_90], rax
mov [rsp+0D8h+var_88], rdx
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_48], rax
mov rax, [rsp+0D8h+var_88]
mov [rsp+0D8h+var_40], rax
loc_CEBA5:
mov rdi, [rsp+0D8h+var_48]
mov rsi, [rsp+0D8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_CEBDB
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_CED27
loc_CEBDB:
mov [rsp+0D8h+var_5C], 0
loc_CEBE3:
mov eax, [rsp+0D8h+var_5C]
cmp eax, [rsp+0D8h+var_2C]
jge loc_CEC7E
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_C0], rax
movsxd rax, [rsp+0D8h+var_5C]
mov [rsp+0D8h+var_B8], rax
mov rax, [rsp+0D8h+var_38]
movsxd rcx, [rsp+0D8h+var_5C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rdi, [rsp+0D8h+var_C0]
mov rcx, [rsp+0D8h+var_B8]
mov [rsp+0D8h+var_A0], rax
mov [rsp+0D8h+var_98], rdx
mov rsi, [rsp+0D8h+var_48]
mov rdx, [rsp+0D8h+var_40]
mov r8, [rsp+0D8h+var_A0]
mov r9, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_D8], 4000h
call JS_CreateDataPropertyUint32
cmp eax, 0
jge short loc_CEC6C
jmp short loc_CECD1
loc_CEC6C:
jmp short $+2
loc_CEC6E:
mov eax, [rsp+0D8h+var_5C]
add eax, 1
mov [rsp+0D8h+var_5C], eax
jmp loc_CEBE3
loc_CEC7E:
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_C8], rax
mov edi, [rsp+0D8h+var_2C]
call js_uint32
mov rdi, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_B0], rax
mov [rsp+0D8h+var_A8], rdx
mov rsi, [rsp+0D8h+var_48]
mov rdx, [rsp+0D8h+var_40]
mov r8, [rsp+0D8h+var_B0]
mov r9, [rsp+0D8h+var_A8]
mov ecx, 32h ; '2'
call JS_SetProperty
cmp eax, 0
jge short loc_CED07
jmp short $+2
loc_CECD1:
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_48]
mov rdx, [rsp+0D8h+var_40]
call JS_FreeValue
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp short loc_CED27
loc_CED07:
mov rax, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_10], rax
mov rax, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_8], rax
loc_CED27:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
|
long long js_array_of(
long long a1,
long long a2,
unsigned long long a3,
int a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
double v14; // xmm4_8
double v15; // xmm5_8
long long v16; // rdx
long long v17; // rdx
double v18; // xmm4_8
double v19; // xmm5_8
int v20; // edx
int v22; // [rsp+10h] [rbp-C8h]
long long v23; // [rsp+18h] [rbp-C0h]
int v24; // [rsp+28h] [rbp-B0h]
_DWORD *v25; // [rsp+38h] [rbp-A0h]
int i; // [rsp+7Ch] [rbp-5Ch]
_QWORD v27[2]; // [rsp+80h] [rbp-58h] BYREF
long long v28; // [rsp+90h] [rbp-48h]
long long v29; // [rsp+98h] [rbp-40h]
long long v30; // [rsp+A0h] [rbp-38h]
int v31; // [rsp+ACh] [rbp-2Ch]
long long v32; // [rsp+B0h] [rbp-28h]
long long v33; // [rsp+B8h] [rbp-20h]
unsigned long long v34; // [rsp+C0h] [rbp-18h]
long long v35; // [rsp+C8h] [rbp-10h]
long long v36; // [rsp+D0h] [rbp-8h]
v33 = a2;
v34 = a3;
v32 = a1;
v31 = a4;
v30 = a5;
if ( JS_IsConstructor(a1, a2, a3) )
{
v27[0] = js_int32(v31);
v27[1] = v13;
v28 = JS_CallConstructor(v32, v33, v34, 1u, (long long)v27, a6, a7, a8, a9, v14, v15, a12, a13);
}
else
{
v28 = JS_NewArray(v32);
}
v29 = v16;
if ( JS_IsException_1(v28, v16) )
{
LODWORD(v35) = 0;
v36 = 6LL;
}
else
{
for ( i = 0; i < v31; ++i )
{
v23 = v32;
v25 = js_dup(*(_DWORD **)(16LL * i + v30), *(_QWORD *)(16LL * i + v30 + 8));
if ( (int)JS_CreateDataPropertyUint32(v23, v28, v29, i, v25, v17, a6, a7, a8, a9, v18, v19, a12, a13, 0x4000) < 0 )
goto LABEL_11;
}
v22 = v32;
v24 = js_uint32(v31);
if ( (int)JS_SetProperty(v22, v28, v29, 50, v24, v20) < 0 )
{
LABEL_11:
JS_FreeValue(v32, v28, v29);
LODWORD(v35) = 0;
v36 = 6LL;
return v35;
}
v35 = v28;
v36 = v29;
}
return v35;
}
|
js_array_of:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb0],RDI
MOV dword ptr [RSP + 0xac],ECX
MOV qword ptr [RSP + 0xa0],R8
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
CALL 0x00136e30
CMP EAX,0x0
JZ 0x001ceb74
MOV EDI,dword ptr [RSP + 0xac]
CALL 0x00132a00
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0xb0]
LEA R8,[RSP + 0x80]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
MOV ECX,0x1
CALL 0x00147290
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
JMP 0x001ceba5
LAB_001ceb74:
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x00129260
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x98],RAX
LAB_001ceba5:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001cebdb
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001ced27
LAB_001cebdb:
MOV dword ptr [RSP + 0x7c],0x0
LAB_001cebe3:
MOV EAX,dword ptr [RSP + 0x7c]
CMP EAX,dword ptr [RSP + 0xac]
JGE 0x001cec7e
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x18],RAX
MOVSXD RAX,dword ptr [RSP + 0x7c]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOVSXD RCX,dword ptr [RSP + 0x7c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00120410
MOV RDI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x40]
MOV dword ptr [RSP],0x4000
CALL 0x0016f6e0
CMP EAX,0x0
JGE 0x001cec6c
JMP 0x001cecd1
LAB_001cec6c:
JMP 0x001cec6e
LAB_001cec6e:
MOV EAX,dword ptr [RSP + 0x7c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x7c],EAX
JMP 0x001cebe3
LAB_001cec7e:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,dword ptr [RSP + 0xac]
CALL 0x001328a0
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV R8,qword ptr [RSP + 0x28]
MOV R9,qword ptr [RSP + 0x30]
MOV ECX,0x32
CALL 0x00130c40
CMP EAX,0x0
JGE 0x001ced07
JMP 0x001cecd1
LAB_001cecd1:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x001229d0
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001ced27
LAB_001ced07:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xd0],RAX
LAB_001ced27:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16]
js_array_of(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5)
{
int8 uVar1;
int iVar2;
int8 *puVar3;
int1 auVar4 [16];
int local_5c;
int1 local_58 [16];
int1 local_48 [16];
long local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar2 = JS_IsConstructor(param_1,param_2,param_3);
if (iVar2 == 0) {
local_48 = JS_NewArray(local_28);
}
else {
local_58 = js_int32(local_2c);
local_48 = JS_CallConstructor(local_28,local_20,local_18,1,local_58);
}
iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_);
if (iVar2 == 0) {
for (local_5c = 0; uVar1 = local_28, local_5c < local_2c; local_5c = local_5c + 1) {
puVar3 = (int8 *)(local_38 + (long)local_5c * 0x10);
auVar4 = js_dup(*puVar3,puVar3[1]);
iVar2 = JS_CreateDataPropertyUint32
(uVar1,local_48._0_8_,local_48._8_8_,(long)local_5c,auVar4._0_8_,
auVar4._8_8_,0x4000);
if (iVar2 < 0) goto LAB_001cecd1;
}
auVar4 = js_uint32(local_2c);
iVar2 = JS_SetProperty(uVar1,local_48._0_8_,local_48._8_8_,0x32,auVar4._0_8_,auVar4._8_8_);
if (iVar2 < 0) {
LAB_001cecd1:
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = 0;
local_8 = 6;
}
else {
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
}
}
else {
local_10 = 0;
local_8 = 6;
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
12,645
|
js_array_of
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_of(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, args[1];
int i;
if (JS_IsConstructor(ctx, this_val)) {
args[0] = js_int32(argc);
obj = JS_CallConstructor(ctx, this_val, 1, args);
} else {
obj = JS_NewArray(ctx);
}
if (JS_IsException(obj))
return JS_EXCEPTION;
for(i = 0; i < argc; i++) {
if (JS_CreateDataPropertyUint32(ctx, obj, i, js_dup(argv[i]),
JS_PROP_THROW) < 0) {
goto fail;
}
}
if (JS_SetProperty(ctx, obj, JS_ATOM_length, js_uint32(argc)) < 0) {
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
}
|
O3
|
c
|
js_array_of:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movl %ecx, %r14d
movq %rdi, %rbx
movl %ecx, %ebp
cmpl $-0x1, %edx
jne 0x7afbf
testb $0x10, 0x5(%rsi)
je 0x7afbf
leaq 0x40(%rsp), %rax
movq %rbp, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
movq %rbx, %rdi
movq %rsi, %rcx
movq %rdx, %r8
movl $0x1, %r9d
callq 0x2fc36
movq %rax, %r12
movq %rdx, %r15
movl $0x6, %edx
cmpl $0x6, %r15d
jne 0x7aea6
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x7afad
testl %r14d, %r14d
jle 0x7af0c
movl %r14d, 0x2c(%rsp)
addq $0x8, %r13
xorl %r14d, %r14d
movq -0x8(%r13), %rax
movq (%r13), %rcx
cmpl $-0x9, %ecx
jb 0x7aec6
incl (%rax)
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movl $0x4007, %r9d # imm = 0x4007
callq 0x265c6
testl %eax, %eax
js 0x7af7f
incq %r14
addq $0x10, %r13
cmpq %r14, %rbp
jne 0x7aeb7
movl 0x2c(%rsp), %r14d
xorl %eax, %eax
testl %r14d, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %rbp, %xmm0
movq %xmm0, %r8
cmovnsq %rbp, %r8
movl $0x7, %r9d
cmovnsq %rax, %r9
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x32, %ecx
callq 0x23d7f
testl %eax, %eax
js 0x7af7f
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
andq %rax, %rcx
movl %r12d, %eax
movq %r15, %rdx
jmp 0x7afad
cmpl $-0x9, %r15d
jb 0x7afa4
movq 0x18(%rbx), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x7afa4
movq %r12, %rsi
movq %r15, %rdx
callq 0x20d90
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %edx
orq %rcx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%rbx), %rsi
incl (%rsi)
movq %rbx, %rdi
movl $0x2, %edx
callq 0xf4c7
jmp 0x7ae8c
|
js_array_of:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r13, r8
mov r14d, ecx
mov rbx, rdi
mov ebp, ecx
cmp edx, 0FFFFFFFFh
jnz loc_7AFBF
test byte ptr [rsi+5], 10h
jz loc_7AFBF
lea rax, [rsp+88h+var_48]
mov [rax], rbp
mov qword ptr [rax+8], 0
mov qword ptr [rsp+88h+var_88], rax
mov dword ptr [rsp+88h+var_88+8], 2
mov rdi, rbx
mov rcx, rsi
mov r8, rdx
mov r9d, 1
call JS_CallConstructorInternal
loc_7AE8C:
mov r12, rax
mov r15, rdx
mov edx, 6
cmp r15d, 6
jnz short loc_7AEA6
xor eax, eax
xor ecx, ecx
jmp loc_7AFAD
loc_7AEA6:
test r14d, r14d
jle short loc_7AF0C
mov [rsp+88h+var_5C], r14d
add r13, 8
xor r14d, r14d
loc_7AEB7:
mov rax, [r13-8]
mov rcx, [r13+0]
cmp ecx, 0FFFFFFF7h
jb short loc_7AEC6
inc dword ptr [rax]
loc_7AEC6:
mov qword ptr [rsp+88h+var_58], rax
mov qword ptr [rsp+88h+var_58+8], rcx
movups xmm0, [rsp+88h+var_58]
movups [rsp+88h+var_88], xmm0
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r14
xor r8d, r8d
mov r9d, 4007h
call JS_DefinePropertyValueValue
test eax, eax
js loc_7AF7F
inc r14
add r13, 10h
cmp rbp, r14
jnz short loc_7AEB7
mov r14d, [rsp+88h+var_5C]
loc_7AF0C:
xor eax, eax
test r14d, r14d
xorps xmm0, xmm0
cvtsi2sd xmm0, rbp
movq r8, xmm0
cmovns r8, rbp
mov r9d, 7
cmovns r9, rax
mov qword ptr [rsp+88h+var_58], r12
mov qword ptr [rsp+88h+var_58+8], r15
movups xmm0, [rsp+88h+var_58]
movups [rsp+88h+var_88], xmm0
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_78], 4000h
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov ecx, 32h ; '2'
call JS_SetPropertyInternal2
test eax, eax
js short loc_7AF7F
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
and rcx, rax
mov eax, r12d
mov rdx, r15
jmp short loc_7AFAD
loc_7AF7F:
cmp r15d, 0FFFFFFF7h
jb short loc_7AFA4
mov rdi, [rbx+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_7AFA4
mov rsi, r12
mov rdx, r15
call js_free_value_rt
loc_7AFA4:
xor eax, eax
xor ecx, ecx
mov edx, 6
loc_7AFAD:
or rax, rcx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7AFBF:
mov rsi, [rbx+38h]
inc dword ptr [rsi]
mov rdi, rbx
mov edx, 2
call JS_NewObjectFromShape
jmp loc_7AE8C
|
unsigned long long js_array_of(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
int v14; // r14d
double v15; // rbp
unsigned long long v16; // rax
long long v17; // rdx
double v18; // xmm4_8
double v19; // xmm5_8
long long v20; // r12
long long v21; // r15
long long v22; // rax
unsigned long long v23; // rcx
long long *v24; // r13
_QWORD *v25; // r14
int *v26; // rax
long long v27; // rcx
long long v28; // r8
long long v29; // r9
double v30; // r8
long long v31; // r9
long long v32; // rdi
int v33; // eax
long long v34; // rcx
_DWORD *v36; // rsi
int v37; // [rsp+2Ch] [rbp-5Ch]
__m128 v38; // [rsp+30h] [rbp-58h]
_QWORD v39[9]; // [rsp+40h] [rbp-48h] BYREF
v14 = a4;
*(_QWORD *)&v15 = a4;
if ( (_DWORD)a3 == -1 && (*(_BYTE *)(a2 + 5) & 0x10) != 0 )
{
v39[0] = a4;
v39[1] = 0LL;
v16 = JS_CallConstructorInternal(a1, a2, a3, a2, a3, 1LL, a6, a7, a8, a9, a10, a11, a12, a13, (long long)v39, 2);
}
else
{
v36 = *(_DWORD **)(a1 + 56);
++*v36;
v16 = JS_NewObjectFromShape(a1, v36, 2u);
}
v20 = v16;
v21 = v17;
if ( (_DWORD)v17 == 6 )
{
v22 = 0LL;
v23 = 0LL;
}
else
{
if ( v14 <= 0 )
{
LABEL_13:
v30 = (double)SLODWORD(v15);
if ( v14 >= 0 )
v30 = v15;
v31 = 7LL;
if ( v14 >= 0 )
v31 = 0LL;
v38.m128_u64[0] = v20;
v38.m128_u64[1] = v21;
if ( (int)JS_SetPropertyInternal2(
a1,
v20,
v21,
0x32u,
*(long long *)&v30,
v31,
v38,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v20,
v21,
0x4000u,
0LL) >= 0 )
{
v23 = v20 & 0xFFFFFFFF00000000LL;
v22 = (unsigned int)v20;
return v23 | v22;
}
}
else
{
v37 = v14;
v24 = (long long *)(a5 + 8);
v25 = 0LL;
while ( 1 )
{
v26 = (int *)*(v24 - 1);
v27 = *v24;
if ( (unsigned int)*v24 >= 0xFFFFFFF7 )
++*v26;
if ( (int)JS_DefinePropertyValueValue(
a1,
v20,
v21,
v25,
0LL,
16391,
*(double *)&v26,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v26,
v27) < 0 )
break;
v25 = (_QWORD *)((char *)v25 + 1);
v24 += 2;
if ( *(_QWORD **)&v15 == v25 )
{
v14 = v37;
goto LABEL_13;
}
}
}
if ( (unsigned int)v21 >= 0xFFFFFFF7 )
{
v32 = *(_QWORD *)(a1 + 24);
v33 = *(_DWORD *)v20;
v34 = (unsigned int)(*(_DWORD *)v20 - 1);
*(_DWORD *)v20 = v34;
if ( v33 <= 1 )
js_free_value_rt(v32, (_QWORD *)v20, v21, v34, v28, v29);
}
v22 = 0LL;
v23 = 0LL;
}
return v23 | v22;
}
|
js_array_of:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R13,R8
MOV R14D,ECX
MOV RBX,RDI
MOV EBP,ECX
CMP EDX,-0x1
JNZ 0x0017afbf
TEST byte ptr [RSI + 0x5],0x10
JZ 0x0017afbf
LEA RAX,[RSP + 0x40]
MOV qword ptr [RAX],RBP
MOV qword ptr [RAX + 0x8],0x0
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x2
MOV RDI,RBX
MOV RCX,RSI
MOV R8,RDX
MOV R9D,0x1
CALL 0x0012fc36
LAB_0017ae8c:
MOV R12,RAX
MOV R15,RDX
MOV EDX,0x6
CMP R15D,0x6
JNZ 0x0017aea6
XOR EAX,EAX
XOR ECX,ECX
JMP 0x0017afad
LAB_0017aea6:
TEST R14D,R14D
JLE 0x0017af0c
MOV dword ptr [RSP + 0x2c],R14D
ADD R13,0x8
XOR R14D,R14D
LAB_0017aeb7:
MOV RAX,qword ptr [R13 + -0x8]
MOV RCX,qword ptr [R13]
CMP ECX,-0x9
JC 0x0017aec6
INC dword ptr [RAX]
LAB_0017aec6:
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RCX
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
XOR R8D,R8D
MOV R9D,0x4007
CALL 0x001265c6
TEST EAX,EAX
JS 0x0017af7f
INC R14
ADD R13,0x10
CMP RBP,R14
JNZ 0x0017aeb7
MOV R14D,dword ptr [RSP + 0x2c]
LAB_0017af0c:
XOR EAX,EAX
TEST R14D,R14D
XORPS XMM0,XMM0
CVTSI2SD XMM0,RBP
MOVQ R8,XMM0
CMOVNS R8,RBP
MOV R9D,0x7
CMOVNS R9,RAX
MOV qword ptr [RSP + 0x30],R12
MOV qword ptr [RSP + 0x38],R15
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x10],0x4000
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV ECX,0x32
CALL 0x00123d7f
TEST EAX,EAX
JS 0x0017af7f
MOV RAX,-0x100000000
MOV RCX,R12
AND RCX,RAX
MOV EAX,R12D
MOV RDX,R15
JMP 0x0017afad
LAB_0017af7f:
CMP R15D,-0x9
JC 0x0017afa4
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0017afa4
MOV RSI,R12
MOV RDX,R15
CALL 0x00120d90
LAB_0017afa4:
XOR EAX,EAX
XOR ECX,ECX
MOV EDX,0x6
LAB_0017afad:
OR RAX,RCX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017afbf:
MOV RSI,qword ptr [RBX + 0x38]
INC dword ptr [RSI]
MOV RDI,RBX
MOV EDX,0x2
CALL 0x0010f4c7
JMP 0x0017ae8c
|
int1 [16] js_array_of(long param_1,long param_2,int8 param_3,uint param_4,long param_5)
{
int *piVar1;
int iVar2;
int *piVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
double dVar7;
int8 uVar8;
int8 *puVar9;
double dVar10;
uint uVar11;
int1 auVar12 [16];
double local_48 [3];
dVar7 = (double)(ulong)param_4;
if (((int)param_3 == -1) && ((*(byte *)(param_2 + 5) & 0x10) != 0)) {
local_48[1] = 0.0;
local_48[0] = dVar7;
auVar12 = JS_CallConstructorInternal(param_1,param_2,param_3,param_2,param_3,1,local_48,2);
}
else {
piVar3 = *(int **)(param_1 + 0x38);
*piVar3 = *piVar3 + 1;
auVar12 = JS_NewObjectFromShape(param_1,piVar3,2);
}
uVar6 = auVar12._8_8_;
piVar3 = auVar12._0_8_;
uVar11 = auVar12._8_4_;
if (uVar11 == 6) {
uVar4 = 0;
uVar5 = 0;
uVar6 = 6;
}
else {
if (0 < (int)param_4) {
puVar9 = (int8 *)(param_5 + 8);
dVar10 = 0.0;
do {
piVar1 = (int *)puVar9[-1];
uVar8 = *puVar9;
if (0xfffffff6 < (uint)uVar8) {
*piVar1 = *piVar1 + 1;
}
iVar2 = JS_DefinePropertyValueValue(param_1,piVar3,uVar6,dVar10,0,0x4007,piVar1,(uint)uVar8)
;
if (iVar2 < 0) goto LAB_0017af7f;
dVar10 = (double)((long)dVar10 + 1);
puVar9 = puVar9 + 2;
} while (dVar7 != dVar10);
}
dVar10 = (double)(long)dVar7;
if (-1 < (int)param_4) {
dVar10 = dVar7;
}
uVar8 = 7;
if (-1 < (int)param_4) {
uVar8 = 0;
}
iVar2 = JS_SetPropertyInternal2(param_1,piVar3,uVar6,0x32,dVar10,uVar8,piVar3,uVar11,0x4000,0);
if (iVar2 < 0) {
LAB_0017af7f:
if (0xfffffff6 < uVar11) {
uVar8 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar8,piVar3,uVar6);
}
}
uVar4 = 0;
uVar5 = 0;
uVar6 = 6;
}
else {
uVar5 = (ulong)piVar3 & 0xffffffff00000000;
uVar4 = (ulong)piVar3 & 0xffffffff;
}
}
auVar12._0_8_ = uVar4 | uVar5;
auVar12._8_8_ = uVar6;
return auVar12;
}
|
|
12,646
|
my_test_connect
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
MYSQL *my_test_connect(MYSQL *mysql,
const char *host,
const char *user,
const char *passwd,
const char *db,
unsigned int port,
const char *unix_socket,
unsigned long clientflag)
{
if (force_tls)
mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls);
if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag))
{
diag("error: %s", mysql_error(mysql));
return NULL;
}
if (mysql && force_tls && !mysql_get_ssl_cipher(mysql))
{
diag("Error: TLS connection not established");
return NULL;
}
if (!this_host)
get_this_host(mysql);
return mysql;
}
|
O0
|
c
|
my_test_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
cmpl $0x0, 0x6bdc1(%rip) # 0x81330
je 0x15586
movq -0x10(%rbp), %rdi
movl $0x26, %esi
leaq 0x6bdaf(%rip), %rdx # 0x81330
callq 0x3c170
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movq 0x10(%rbp), %r10
movq 0x18(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x355f0
cmpq $0x0, %rax
jne 0x155de
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x50401(%rip), %rdi # 0x659ce
movb $0x0, %al
callq 0x2fc40
movq $0x0, -0x8(%rbp)
jmp 0x15630
cmpq $0x0, -0x10(%rbp)
je 0x15615
cmpl $0x0, 0x6bd44(%rip) # 0x81330
je 0x15615
movq -0x10(%rbp), %rdi
callq 0x35420
cmpq $0x0, %rax
jne 0x15615
leaq 0x503d4(%rip), %rdi # 0x659d8
movb $0x0, %al
callq 0x2fc40
movq $0x0, -0x8(%rbp)
jmp 0x15630
cmpq $0x0, 0x6bbab(%rip) # 0x811c8
jne 0x15628
movq -0x10(%rbp), %rdi
callq 0x14ba0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_test_connect:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
cmp cs:force_tls, 0
jz short loc_15586
mov rdi, [rbp+var_10]
mov esi, 26h ; '&'
lea rdx, force_tls
call mysql_options
loc_15586:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r10, [rbp+arg_0]
mov rax, [rbp+arg_8]
mov [rsp+50h+var_50], r10
mov [rsp+50h+var_48], rax
call mysql_real_connect
cmp rax, 0
jnz short loc_155DE
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorS; "error: %s"
mov al, 0
call diag
mov [rbp+var_8], 0
jmp short loc_15630
loc_155DE:
cmp [rbp+var_10], 0
jz short loc_15615
cmp cs:force_tls, 0
jz short loc_15615
mov rdi, [rbp+var_10]
call mysql_get_ssl_cipher
cmp rax, 0
jnz short loc_15615
lea rdi, aErrorTlsConnec; "Error: TLS connection not established"
mov al, 0
call diag
mov [rbp+var_8], 0
jmp short loc_15630
loc_15615:
cmp cs:this_host, 0
jnz short loc_15628
mov rdi, [rbp+var_10]
call get_this_host
loc_15628:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_15630:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8)
{
int v8; // eax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
if ( force_tls )
mysql_options(a1, 38LL, &force_tls);
if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, a7, a8) )
{
if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) )
{
diag((unsigned int)"Error: TLS connection not established", a2, v13, v14, v15, v16);
return 0LL;
}
else
{
if ( !this_host )
get_this_host(a1);
return a1;
}
}
else
{
v8 = mysql_error(a1);
diag((unsigned int)"error: %s", v8, v9, v10, v11, v12);
return 0LL;
}
}
|
my_test_connect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
CMP dword ptr [0x00181330],0x0
JZ 0x00115586
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x26
LEA RDX,[0x181330]
CALL 0x0013c170
LAB_00115586:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R10,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001355f0
CMP RAX,0x0
JNZ 0x001155de
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x1659ce]
MOV AL,0x0
CALL 0x0012fc40
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00115630
LAB_001155de:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00115615
CMP dword ptr [0x00181330],0x0
JZ 0x00115615
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00135420
CMP RAX,0x0
JNZ 0x00115615
LEA RDI,[0x1659d8]
MOV AL,0x0
CALL 0x0012fc40
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00115630
LAB_00115615:
CMP qword ptr [0x001811c8],0x0
JNZ 0x00115628
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00114ba0
LAB_00115628:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00115630:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6,int8 param_7,int8 param_8)
{
long lVar1;
int8 uVar2;
long local_10;
if (force_tls != 0) {
mysql_options(param_1,0x26,&force_tls);
}
lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8);
if (lVar1 == 0) {
uVar2 = mysql_error(param_1);
diag("error: %s",uVar2);
local_10 = 0;
}
else if (((param_1 == 0) || (force_tls == 0)) ||
(lVar1 = mysql_get_ssl_cipher(param_1), lVar1 != 0)) {
local_10 = param_1;
if (this_host == 0) {
get_this_host(param_1);
}
}
else {
diag("Error: TLS connection not established");
local_10 = 0;
}
return local_10;
}
|
|
12,647
|
my_test_connect
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
MYSQL *my_test_connect(MYSQL *mysql,
const char *host,
const char *user,
const char *passwd,
const char *db,
unsigned int port,
const char *unix_socket,
unsigned long clientflag)
{
if (force_tls)
mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls);
if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag))
{
diag("error: %s", mysql_error(mysql));
return NULL;
}
if (mysql && force_tls && !mysql_get_ssl_cipher(mysql))
{
diag("Error: TLS connection not established");
return NULL;
}
if (!this_host)
get_this_host(mysql);
return mysql;
}
|
O3
|
c
|
my_test_connect:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %rax
cmpl $0x0, 0x4dc20(%rip) # 0x62e50
je 0x15268
movq %rdx, -0x30(%rbp)
leaq 0x4dc13(%rip), %rdx # 0x62e50
movq %rbx, %rdi
movl $0x26, %esi
movl %r9d, %r15d
movq %r8, %r12
movq %rcx, %r13
callq 0x2db81
movq -0x30(%rbp), %rdx
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %rax
movq %r13, %rcx
movq %r12, %r8
movl %r15d, %r9d
movq %rbx, %rdi
movq %r14, %rsi
pushq %r10
pushq %rax
callq 0x29c4e
addq $0x10, %rsp
testq %rax, %rax
je 0x152ae
testq %rbx, %rbx
je 0x1529a
cmpl $0x0, 0x4dbc5(%rip) # 0x62e50
je 0x1529a
movq %rbx, %rdi
callq 0x29b40
testq %rax, %rax
je 0x152cb
cmpq $0x0, 0x4da46(%rip) # 0x62ce8
jne 0x152db
movq %rbx, %rdi
callq 0x14b0a
jmp 0x152db
movq %rbx, %rdi
callq 0x2dc72
leaq 0x31361(%rip), %rdi # 0x4661e
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x264ef
jmp 0x152db
leaq 0x31356(%rip), %rdi # 0x46628
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x264ef
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_test_connect:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_0]
cmp cs:force_tls, 0
jz short loc_15268
mov [rbp+var_30], rdx
lea rdx, force_tls
mov rdi, rbx
mov esi, 26h ; '&'
mov r15d, r9d
mov r12, r8
mov r13, rcx
call mysql_options
mov rdx, [rbp+var_30]
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov rcx, r13
mov r8, r12
mov r9d, r15d
loc_15268:
mov rdi, rbx
mov rsi, r14
push r10
push rax
call mysql_real_connect
add rsp, 10h
test rax, rax
jz short loc_152AE
test rbx, rbx
jz short loc_1529A
cmp cs:force_tls, 0
jz short loc_1529A
mov rdi, rbx
call mysql_get_ssl_cipher
test rax, rax
jz short loc_152CB
loc_1529A:
cmp cs:this_host, 0
jnz short loc_152DB
mov rdi, rbx
call get_this_host
jmp short loc_152DB
loc_152AE:
mov rdi, rbx
call mysql_error
lea rdi, aErrorS; "error: %s"
xor ebx, ebx
mov rsi, rax
xor eax, eax
call diag
jmp short loc_152DB
loc_152CB:
lea rdi, aErrorTlsConnec; "Error: TLS connection not established"
xor ebx, ebx
xor eax, eax
call diag
loc_152DB:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8)
{
long long v8; // rbx
long long v9; // r10
long long v10; // rax
int v11; // r15d
int v12; // r12d
int v13; // r13d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // eax
int v19; // edx
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v24; // [rsp+0h] [rbp-30h]
v8 = a1;
v9 = a8;
v10 = a7;
if ( force_tls )
{
v24 = a3;
v11 = a6;
v12 = a5;
v13 = a4;
mysql_options(a1, 38LL, &force_tls);
a3 = v24;
v9 = a8;
v10 = a7;
a4 = v13;
a5 = v12;
a6 = v11;
}
if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, v10, v9) )
{
if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) )
{
v8 = 0LL;
diag((unsigned int)"Error: TLS connection not established", a2, v14, v15, v16, v17);
}
else if ( !this_host )
{
get_this_host(a1);
}
}
else
{
v18 = mysql_error(a1);
v8 = 0LL;
diag((unsigned int)"error: %s", v18, v19, v20, v21, v22);
}
return v8;
}
|
my_test_connect:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
CMP dword ptr [0x00162e50],0x0
JZ 0x00115268
MOV qword ptr [RBP + -0x30],RDX
LEA RDX,[0x162e50]
MOV RDI,RBX
MOV ESI,0x26
MOV R15D,R9D
MOV R12,R8
MOV R13,RCX
CALL 0x0012db81
MOV RDX,qword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV RCX,R13
MOV R8,R12
MOV R9D,R15D
LAB_00115268:
MOV RDI,RBX
MOV RSI,R14
PUSH R10
PUSH RAX
CALL 0x00129c4e
ADD RSP,0x10
TEST RAX,RAX
JZ 0x001152ae
TEST RBX,RBX
JZ 0x0011529a
CMP dword ptr [0x00162e50],0x0
JZ 0x0011529a
MOV RDI,RBX
CALL 0x00129b40
TEST RAX,RAX
JZ 0x001152cb
LAB_0011529a:
CMP qword ptr [0x00162ce8],0x0
JNZ 0x001152db
MOV RDI,RBX
CALL 0x00114b0a
JMP 0x001152db
LAB_001152ae:
MOV RDI,RBX
CALL 0x0012dc72
LEA RDI,[0x14661e]
XOR EBX,EBX
MOV RSI,RAX
XOR EAX,EAX
CALL 0x001264ef
JMP 0x001152db
LAB_001152cb:
LEA RDI,[0x146628]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x001264ef
LAB_001152db:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,ulong param_6,int8 param_7,int8 param_8)
{
long lVar1;
int8 uVar2;
if (force_tls != 0) {
param_6 = param_6 & 0xffffffff;
mysql_options(param_1,0x26,&force_tls);
}
lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8);
if (lVar1 == 0) {
uVar2 = mysql_error(param_1);
param_1 = 0;
diag("error: %s",uVar2);
}
else {
if (((param_1 != 0) && (force_tls != 0)) && (lVar1 = mysql_get_ssl_cipher(param_1), lVar1 == 0))
{
diag("Error: TLS connection not established");
return 0;
}
if (this_host == 0) {
get_this_host(param_1);
}
}
return param_1;
}
|
|
12,648
|
cxxopts::ParseResult::count(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
zkingston[P]unknot/build_O0/_deps/cxxopts-src/include/cxxopts.hpp
|
std::size_t
count(const std::string& o) const
{
auto iter = m_keys.find(o);
if (iter == m_keys.end())
{
return 0;
}
auto viter = m_values.find(iter->second);
if (viter == m_values.end())
{
return 0;
}
return viter->second.count();
}
|
O0
|
cpp
|
cxxopts::ParseResult::count(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x30(%rsp), %rsi
callq 0x5e160
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x5e1b0
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5e190
testb $0x1, %al
jne 0x172eb
jmp 0x172f6
movq $0x0, 0x40(%rsp)
jmp 0x17370
movq 0x8(%rsp), %rax
addq $0x38, %rax
movq %rax, (%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5e210
movq (%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x5e1e0
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x38, %rdi
callq 0x5e250
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5e230
testb $0x1, %al
jne 0x1734a
jmp 0x17355
movq $0x0, 0x40(%rsp)
jmp 0x17370
leaq 0x18(%rsp), %rdi
callq 0x5e280
movq %rax, %rdi
addq $0x8, %rdi
callq 0x57730
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
|
_ZNK7cxxopts11ParseResult5countERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov rdi, [rsp+48h+var_10]
mov [rsp+48h+var_40], rdi
mov rsi, [rsp+48h+var_18]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE4findERSB_; std::unordered_map<std::string,ulong>::find(std::string const&)
mov rdi, [rsp+48h+var_40]
mov [rsp+48h+var_20], rax
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE3endEv; std::unordered_map<std::string,ulong>::end(void)
mov [rsp+48h+var_28], rax
lea rdi, [rsp+48h+var_20]
lea rsi, [rsp+48h+var_28]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmELb1EEESC_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,ulong>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,ulong>,true> const&)
test al, 1
jnz short loc_172EB
jmp short loc_172F6
loc_172EB:
mov [rsp+48h+var_8], 0
jmp short loc_17370
loc_172F6:
mov rax, [rsp+48h+var_40]
add rax, 38h ; '8'
mov [rsp+48h+var_48], rax
lea rdi, [rsp+48h+var_20]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmELb0ELb1EEptEv; std::__detail::_Node_const_iterator<std::pair<std::string const,ulong>,false,true>::operator->(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
add rsi, 20h ; ' '
call _ZNKSt13unordered_mapImN7cxxopts11OptionValueESt4hashImESt8equal_toImESaISt4pairIKmS1_EEE4findERS7_; std::unordered_map<ulong,cxxopts::OptionValue>::find(ulong const&)
mov rdi, [rsp+48h+var_40]
mov [rsp+48h+var_30], rax
add rdi, 38h ; '8'
call _ZNKSt13unordered_mapImN7cxxopts11OptionValueESt4hashImESt8equal_toImESaISt4pairIKmS1_EEE3endEv; std::unordered_map<ulong,cxxopts::OptionValue>::end(void)
mov [rsp+48h+var_38], rax
lea rdi, [rsp+48h+var_30]
lea rsi, [rsp+48h+var_38]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKmN7cxxopts11OptionValueEELb0EEES8_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<ulong const,cxxopts::OptionValue>,false> const&,std::__detail::_Node_iterator_base<std::pair<ulong const,cxxopts::OptionValue>,false> const&)
test al, 1
jnz short loc_1734A
jmp short loc_17355
loc_1734A:
mov [rsp+48h+var_8], 0
jmp short loc_17370
loc_17355:
lea rdi, [rsp+48h+var_30]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKmN7cxxopts11OptionValueEELb0ELb0EEptEv; std::__detail::_Node_const_iterator<std::pair<ulong const,cxxopts::OptionValue>,false,false>::operator->(void)
mov rdi, rax
add rdi, 8; this
call _ZNK7cxxopts11OptionValue5countEv; cxxopts::OptionValue::count(void)
mov [rsp+48h+var_8], rax
loc_17370:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long cxxopts::ParseResult::count(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+10h] [rbp-38h] BYREF
long long v6; // [rsp+18h] [rbp-30h] BYREF
long long v7; // [rsp+20h] [rbp-28h] BYREF
_QWORD v8[3]; // [rsp+28h] [rbp-20h] BYREF
v8[2] = a1;
v8[1] = a2;
v8[0] = std::unordered_map<std::string,unsigned long>::find(a1, a2);
v7 = std::unordered_map<std::string,unsigned long>::end(a1);
if ( (std::__detail::operator==(v8, &v7) & 1) != 0 )
return 0LL;
v2 = std::__detail::_Node_const_iterator<std::pair<std::string const,unsigned long>,false,true>::operator->(v8);
v6 = std::unordered_map<unsigned long,cxxopts::OptionValue>::find(a1 + 56, v2 + 32);
v5 = std::unordered_map<unsigned long,cxxopts::OptionValue>::end(a1 + 56);
if ( (std::__detail::operator==(&v6, &v5) & 1) != 0 )
return 0LL;
v3 = std::__detail::_Node_const_iterator<std::pair<unsigned long const,cxxopts::OptionValue>,false,false>::operator->(&v6);
return cxxopts::OptionValue::count((cxxopts::OptionValue *)(v3 + 8));
}
|
count:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0015e160
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x0015e1b0
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x0015e190
TEST AL,0x1
JNZ 0x001172eb
JMP 0x001172f6
LAB_001172eb:
MOV qword ptr [RSP + 0x40],0x0
JMP 0x00117370
LAB_001172f6:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x38
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x28]
CALL 0x0015e210
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
ADD RSI,0x20
CALL 0x0015e1e0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
ADD RDI,0x38
CALL 0x0015e250
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
CALL 0x0015e230
TEST AL,0x1
JNZ 0x0011734a
JMP 0x00117355
LAB_0011734a:
MOV qword ptr [RSP + 0x40],0x0
JMP 0x00117370
LAB_00117355:
LEA RDI,[RSP + 0x18]
CALL 0x0015e280
MOV RDI,RAX
ADD RDI,0x8
CALL 0x00157730
MOV qword ptr [RSP + 0x40],RAX
LAB_00117370:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
/* cxxopts::ParseResult::count(std::__cxx11::string const&) const */
int8 __thiscall cxxopts::ParseResult::count(ParseResult *this,string *param_1)
{
ulong uVar1;
long lVar2;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
string *local_18;
ParseResult *local_10;
int8 local_8;
local_18 = param_1;
local_10 = this;
local_20 = std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::find((unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)this,param_1);
local_28 = std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::end();
uVar1 = std::__detail::operator==
((_Node_iterator_base *)&local_20,(_Node_iterator_base *)&local_28);
if ((uVar1 & 1) == 0) {
lVar2 = std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,unsigned_long>,false,true>::
operator->((_Node_const_iterator<std::pair<std::__cxx11::string_const,unsigned_long>,false,true>
*)&local_20);
local_30 = std::
unordered_map<unsigned_long,cxxopts::OptionValue,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,cxxopts::OptionValue>>>
::find((unordered_map<unsigned_long,cxxopts::OptionValue,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,cxxopts::OptionValue>>>
*)(this + 0x38),(ulong *)(lVar2 + 0x20));
local_38 = std::
unordered_map<unsigned_long,cxxopts::OptionValue,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,cxxopts::OptionValue>>>
::end();
uVar1 = std::__detail::operator==
((_Node_iterator_base *)&local_30,(_Node_iterator_base *)&local_38);
if ((uVar1 & 1) == 0) {
lVar2 = std::__detail::
_Node_const_iterator<std::pair<unsigned_long_const,cxxopts::OptionValue>,false,false>
::operator->((_Node_const_iterator<std::pair<unsigned_long_const,cxxopts::OptionValue>,false,false>
*)&local_30);
local_8 = OptionValue::count((OptionValue *)(lVar2 + 8));
}
else {
local_8 = 0;
}
}
else {
local_8 = 0;
}
return local_8;
}
|
|
12,649
|
my_once_free
|
eloqsql/mysys/my_once.c
|
void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_once_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x3b4d51(%rip), %rax # 0x412b60
movq (%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5de3b
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x263d0
jmp 0x5de16
leaq 0x3b4d1e(%rip), %rax # 0x412b60
movq $0x0, (%rax)
jmp 0x5de4b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
my_once_free:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, my_once_root_block
mov rax, [rax]
mov [rbp+var_8], rax
loc_5DE16:
cmp [rbp+var_8], 0
jz short loc_5DE3B
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_8], rax
mov rdi, [rbp+var_10]
call _free
jmp short loc_5DE16
loc_5DE3B:
lea rax, my_once_root_block
mov qword ptr [rax], 0
jmp short $+2
loc_5DE4B:
add rsp, 10h
pop rbp
retn
|
_QWORD *my_once_free()
{
_QWORD *result; // rax
_QWORD *v1; // [rsp+0h] [rbp-10h]
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)my_once_root_block;
while ( v2 )
{
v1 = v2;
v2 = (_QWORD *)*v2;
free(v1);
}
result = &my_once_root_block;
my_once_root_block = 0LL;
return result;
}
|
my_once_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x512b60]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015de16:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0015de3b
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001263d0
JMP 0x0015de16
LAB_0015de3b:
LEA RAX,[0x512b60]
MOV qword ptr [RAX],0x0
JMP 0x0015de4b
LAB_0015de4b:
ADD RSP,0x10
POP RBP
RET
|
void my_once_free(void)
{
int8 *puVar1;
int8 local_10;
local_10 = my_once_root_block;
while (local_10 != (int8 *)0x0) {
puVar1 = (int8 *)*local_10;
free(local_10);
local_10 = puVar1;
}
my_once_root_block = (int8 *)0x0;
return;
}
|
|
12,650
|
my_xml_enter
|
eloqsql/strings/xml.c
|
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len)
{
if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */))
return MY_XML_ERROR;
if (st->attr.end > st->attr.start)
{
st->attr.end[0]= '/';
st->attr.end++;
}
memcpy(st->attr.end, str, len);
st->attr.end+= len;
st->attr.end[0]= '\0';
if (st->flags & MY_XML_FLAG_RELATIVE_NAMES)
return st->enter ? st->enter(st, str, len) : MY_XML_OK;
else
return st->enter ?
st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK;
}
|
O0
|
c
|
my_xml_enter:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x7b450
cmpl $0x0, %eax
je 0x7af86
movl $0x1, -0x4(%rbp)
jmp 0x7b09c
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x118(%rcx), %rax
jbe 0x7afc2
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movb $0x2f, (%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x24260
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x120(%rax), %rcx
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7b047
movq -0x10(%rbp), %rax
cmpq $0x0, 0x148(%rax)
je 0x7b038
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
jmp 0x7b03f
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x7b03f
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7b09c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x148(%rax)
je 0x7b08f
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x120(%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rdx
callq *%rax
movl %eax, -0x28(%rbp)
jmp 0x7b096
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x7b096
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_xml_enter:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
add rsi, 1
call my_xml_attr_ensure_space
cmp eax, 0
jz short loc_7AF86
mov [rbp+var_4], 1
jmp loc_7B09C
loc_7AF86:
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+118h]
jbe short loc_7AFC2
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov byte ptr [rax], 2Fh ; '/'
mov rax, [rbp+var_10]
mov rcx, [rax+120h]
add rcx, 1
mov [rax+120h], rcx
loc_7AFC2:
mov rax, [rbp+var_10]
mov rdi, [rax+120h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+120h]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_7B047
mov rax, [rbp+var_10]
cmp qword ptr [rax+148h], 0
jz short loc_7B038
mov rax, [rbp+var_10]
mov rax, [rax+148h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_24], eax
jmp short loc_7B03F
loc_7B038:
xor eax, eax
mov [rbp+var_24], eax
jmp short $+2
loc_7B03F:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_7B09C
loc_7B047:
mov rax, [rbp+var_10]
cmp qword ptr [rax+148h], 0
jz short loc_7B08F
mov rax, [rbp+var_10]
mov rax, [rax+148h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+118h]
mov rcx, [rbp+var_10]
mov rdx, [rcx+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rdx, rcx
call rax
mov [rbp+var_28], eax
jmp short loc_7B096
loc_7B08F:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_7B096:
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
loc_7B09C:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_xml_enter(long long a1, long long a2, long long a3)
{
if ( (unsigned int)my_xml_attr_ensure_space(a1, a3 + 1) )
{
return 1;
}
else
{
if ( *(_QWORD *)(a1 + 288) > *(_QWORD *)(a1 + 280) )
*(_BYTE *)(*(_QWORD *)(a1 + 288))++ = 47;
memcpy(*(_QWORD *)(a1 + 288), a2, a3);
*(_QWORD *)(a1 + 288) += a3;
**(_BYTE **)(a1 + 288) = 0;
if ( (*(_DWORD *)a1 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 328) )
return (unsigned int)(*(long long ( **)(long long, long long, long long))(a1 + 328))(a1, a2, a3);
else
return 0;
}
else if ( *(_QWORD *)(a1 + 328) )
{
return (unsigned int)(*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 328))(
a1,
*(_QWORD *)(a1 + 280),
*(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280));
}
else
{
return 0;
}
}
}
|
my_xml_enter:
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 RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x1
CALL 0x0017b450
CMP EAX,0x0
JZ 0x0017af86
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017b09c
LAB_0017af86:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x118]
JBE 0x0017afc2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV byte ptr [RAX],0x2f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x120]
ADD RCX,0x1
MOV qword ptr [RAX + 0x120],RCX
LAB_0017afc2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x120]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00124260
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x120]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0017b047
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x148],0x0
JZ 0x0017b038
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x148]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0017b03f
LAB_0017b038:
XOR EAX,EAX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0017b03f
LAB_0017b03f:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017b09c
LAB_0017b047:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x148],0x0
JZ 0x0017b08f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x148]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RDX,RCX
CALL RAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0017b096
LAB_0017b08f:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0017b096
LAB_0017b096:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
LAB_0017b09c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_xml_enter(uint *param_1,void *param_2,size_t param_3)
{
int iVar1;
int4 local_30;
int4 local_2c;
int4 local_c;
iVar1 = my_xml_attr_ensure_space(param_1,param_3 + 1);
if (iVar1 == 0) {
if (*(ulong *)(param_1 + 0x46) < *(ulong *)(param_1 + 0x48)) {
**(int1 **)(param_1 + 0x48) = 0x2f;
*(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1;
}
memcpy(*(void **)(param_1 + 0x48),param_2,param_3);
*(size_t *)(param_1 + 0x48) = param_3 + *(long *)(param_1 + 0x48);
**(int1 **)(param_1 + 0x48) = 0;
if ((*param_1 & 1) == 0) {
if (*(long *)(param_1 + 0x52) == 0) {
local_30 = 0;
}
else {
local_30 = (**(code **)(param_1 + 0x52))
(param_1,*(int8 *)(param_1 + 0x46),
*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46));
}
local_c = local_30;
}
else {
if (*(long *)(param_1 + 0x52) == 0) {
local_2c = 0;
}
else {
local_2c = (**(code **)(param_1 + 0x52))(param_1,param_2,param_3);
}
local_c = local_2c;
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
12,651
|
harvest_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
{
int i;
LF_PINS *el_end= el+MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH);
for (; el < el_end; el++)
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
void *p= el->pin[i];
if (p)
*hv->granary++= p;
}
}
/*
hv->npins may become negative below, but it means that
we're on the last dynarray page and harvest_pins() won't be
called again. We don't bother to make hv->npins() correct
(that is 0) in this case.
*/
hv->npins-= LF_DYNARRAY_LEVEL_LENGTH;
return 0;
}
|
O3
|
c
|
harvest_pins:
movl 0x8(%rsi), %eax
movl $0x100, %ecx # imm = 0x100
cmpl %ecx, %eax
cmovll %eax, %ecx
testl %eax, %eax
jle 0xad2d5
pushq %rbp
movq %rsp, %rbp
movslq %ecx, %rax
imulq $0x78, %rax, %rax
addq %rdi, %rax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
testq %rdx, %rdx
je 0xad2bf
movq (%rsi), %r8
leaq 0x8(%r8), %r9
movq %r9, (%rsi)
movq %rdx, (%r8)
incq %rcx
cmpq $0x4, %rcx
jne 0xad2a9
addq $0x78, %rdi
cmpq %rax, %rdi
jb 0xad2a7
movl 0x8(%rsi), %eax
popq %rbp
addl $0xffffff00, %eax # imm = 0xFFFFFF00
movl %eax, 0x8(%rsi)
xorl %eax, %eax
retq
|
harvest_pins:
mov eax, [rsi+8]
mov ecx, 100h
cmp eax, ecx
cmovl ecx, eax
test eax, eax
jle short loc_AD2D5
push rbp
mov rbp, rsp
movsxd rax, ecx
imul rax, 78h ; 'x'
add rax, rdi
loc_AD2A7:
xor ecx, ecx
loc_AD2A9:
mov rdx, [rdi+rcx*8]
test rdx, rdx
jz short loc_AD2BF
mov r8, [rsi]
lea r9, [r8+8]
mov [rsi], r9
mov [r8], rdx
loc_AD2BF:
inc rcx
cmp rcx, 4
jnz short loc_AD2A9
add rdi, 78h ; 'x'
cmp rdi, rax
jb short loc_AD2A7
mov eax, [rsi+8]
pop rbp
loc_AD2D5:
add eax, 0FFFFFF00h
mov [rsi+8], eax
xor eax, eax
retn
|
long long harvest_pins(unsigned long long a1, long long a2)
{
int v2; // eax
int v3; // ecx
unsigned long long v4; // rax
long long i; // rcx
long long v6; // rdx
_QWORD *v7; // r8
v2 = *(_DWORD *)(a2 + 8);
v3 = 256;
if ( v2 < 256 )
v3 = *(_DWORD *)(a2 + 8);
if ( v2 > 0 )
{
v4 = a1 + 120LL * v3;
do
{
for ( i = 0LL; i != 4; ++i )
{
v6 = *(_QWORD *)(a1 + 8 * i);
if ( v6 )
{
v7 = *(_QWORD **)a2;
*(_QWORD *)a2 += 8LL;
*v7 = v6;
}
}
a1 += 120LL;
}
while ( a1 < v4 );
v2 = *(_DWORD *)(a2 + 8);
}
*(_DWORD *)(a2 + 8) = v2 - 256;
return 0LL;
}
|
harvest_pins:
MOV EAX,dword ptr [RSI + 0x8]
MOV ECX,0x100
CMP EAX,ECX
CMOVL ECX,EAX
TEST EAX,EAX
JLE 0x001ad2d5
PUSH RBP
MOV RBP,RSP
MOVSXD RAX,ECX
IMUL RAX,RAX,0x78
ADD RAX,RDI
LAB_001ad2a7:
XOR ECX,ECX
LAB_001ad2a9:
MOV RDX,qword ptr [RDI + RCX*0x8]
TEST RDX,RDX
JZ 0x001ad2bf
MOV R8,qword ptr [RSI]
LEA R9,[R8 + 0x8]
MOV qword ptr [RSI],R9
MOV qword ptr [R8],RDX
LAB_001ad2bf:
INC RCX
CMP RCX,0x4
JNZ 0x001ad2a9
ADD RDI,0x78
CMP RDI,RAX
JC 0x001ad2a7
MOV EAX,dword ptr [RSI + 0x8]
POP RBP
LAB_001ad2d5:
ADD EAX,0xffffff00
MOV dword ptr [RSI + 0x8],EAX
XOR EAX,EAX
RET
|
int8 harvest_pins(ulong param_1,long *param_2)
{
long lVar1;
long *plVar2;
int iVar3;
ulong uVar4;
int iVar5;
long lVar6;
iVar3 = (int)param_2[1];
iVar5 = 0x100;
if (iVar3 < 0x100) {
iVar5 = iVar3;
}
if (0 < iVar3) {
uVar4 = (long)iVar5 * 0x78 + param_1;
do {
lVar6 = 0;
do {
lVar1 = *(long *)(param_1 + lVar6 * 8);
if (lVar1 != 0) {
plVar2 = (long *)*param_2;
*param_2 = (long)(plVar2 + 1);
*plVar2 = lVar1;
}
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
param_1 = param_1 + 0x78;
} while (param_1 < uVar4);
iVar3 = (int)param_2[1];
}
*(int *)(param_2 + 1) = iVar3 + -0x100;
return 0;
}
|
|
12,652
|
my_strcasecmp_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0xbb261
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xbb26d
jmp 0xbb396
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0xbb2a7
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30d375(%rip), %rax # 0x3c8600
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xbb2f4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0xba9a0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0xbb2d6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x36850
movl %eax, -0x4(%rbp)
jmp 0xbb3a9
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xbad90
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0xbb32e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30d2ee(%rip), %rax # 0x3c8600
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xbb378
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0xba9a0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0xbb35a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x36850
movl %eax, -0x4(%rbp)
jmp 0xbb3a9
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xbad90
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xbb391
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xbb3a9
jmp 0xbb240
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_BB240:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_BB261
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_BB261:
mov al, [rbp+var_41]
test al, 1
jnz short loc_BB26D
jmp loc_BB396
loc_BB26D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_BB2A7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_BB2F4
loc_BB2A7:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_BB2D6
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_BB3A9
loc_BB2D6:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
loc_BB2F4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_BB32E
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_BB378
loc_BB32E:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_38]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_BB35A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_BB3A9
loc_BB35A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb4
loc_BB378:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_BB391
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_BB3A9
loc_BB391:
jmp loc_BB240
loc_BB396:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_BB3A9:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v9; // [rsp+28h] [rbp-28h]
unsigned __int8 *v10; // [rsp+30h] [rbp-20h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v4 = 0;
if ( *v11 )
v4 = *v10 != 0;
if ( !v4 )
break;
if ( *v11 >= 0x80u )
{
v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11);
if ( v6 <= 0 )
return (unsigned int)strcmp(v11, v10);
v11 += v6;
my_tolower_utf8mb4(v9, &v8);
}
else
{
v8 = my_unicase_default_page00[3 * *v11++ + 1];
}
if ( *v10 >= 0x80u )
{
v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10);
if ( v5 <= 0 )
return (unsigned int)strcmp(v11, v10);
v10 += v5;
my_tolower_utf8mb4(v9, &v7);
}
else
{
v7 = my_unicase_default_page00[3 * *v10++ + 1];
}
if ( v8 != v7 )
return (unsigned int)(v8 - v7);
}
return (unsigned int)(*v11 - *v10);
}
|
my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_001bb240:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x001bb261
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001bb261:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001bb26d
JMP 0x001bb396
LAB_001bb26d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x001bb2a7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x4c8600]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001bb2f4
LAB_001bb2a7:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x001ba9a0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x001bb2d6
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00136850
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001bb3a9
LAB_001bb2d6:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x001bad90
LAB_001bb2f4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x001bb32e
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x4c8600]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bb378
LAB_001bb32e:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x001ba9a0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x001bb35a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00136850
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001bb3a9
LAB_001bb35a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x001bad90
LAB_001bb378:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001bb391
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001bb3a9
LAB_001bb391:
JMP 0x001bb240
LAB_001bb396:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001bb3a9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb4(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb4(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
12,653
|
r3d_texture_load_rand_noise
|
r3d/src/r3d_state.c
|
void r3d_texture_load_rand_noise(void)
{
# define R3D_RAND_NOISE_RESOLUTION 16
r3d_half_t noise[3 * R3D_RAND_NOISE_RESOLUTION * R3D_RAND_NOISE_RESOLUTION] = { 0 };
for (int i = 0; i < R3D_RAND_NOISE_RESOLUTION * R3D_RAND_NOISE_RESOLUTION; i++) {
noise[i * 3 + 0] = r3d_cvt_fh(((float)GetRandomValue(0, INT16_MAX) / INT16_MAX) * 2.0f - 1.0f);
noise[i * 3 + 1] = r3d_cvt_fh(((float)GetRandomValue(0, INT16_MAX) / INT16_MAX) * 2.0f - 1.0f);
noise[i * 3 + 2] = r3d_cvt_fh((float)GetRandomValue(0, INT16_MAX) / INT16_MAX);
}
R3D.texture.randNoise = rlLoadTexture(noise,
R3D_RAND_NOISE_RESOLUTION,
R3D_RAND_NOISE_RESOLUTION,
PIXELFORMAT_UNCOMPRESSED_R16G16B16,
1
);
}
|
O3
|
c
|
r3d_texture_load_rand_noise:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x608, %rsp # imm = 0x608
leaq -0x630(%rbp), %rdi
movl $0x600, %edx # imm = 0x600
xorl %esi, %esi
callq 0x81f0
movl $0x4, %ebx
movl $0x7f800001, %r13d # imm = 0x7F800001
xorl %edi, %edi
movl $0x7fff, %esi # imm = 0x7FFF
callq 0x309ec
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x21a35(%rip), %xmm0 # 0xe30c4
addss %xmm0, %xmm0
addss 0x219a1(%rip), %xmm0 # 0xe303c
movd %xmm0, %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andl %ecx, %eax
movl $0x38800000, %r15d # imm = 0x38800000
movl $0x38800000, %ecx # imm = 0x38800000
cmpl %r15d, %eax
jb 0xc16c0
movl $0xc8001000, %ecx # imm = 0xC8001000
addl %eax, %ecx
shrl $0xd, %ecx
movl $0x7c00, %r12d # imm = 0x7C00
movl $0x7c00, %edx # imm = 0x7C00
movl $0x47800000, %esi # imm = 0x47800000
cmpl %esi, %eax
jae 0xc16d6
movl %ecx, %edx
movl $0x7e00, %r14d # imm = 0x7E00
movl $0x7e00, %ecx # imm = 0x7E00
cmpl %r13d, %eax
jae 0xc16e8
movl %edx, %ecx
movmskps %xmm0, %eax
shll $0xf, %eax
orl %ecx, %eax
movw %ax, -0x634(%rbp,%rbx)
xorl %edi, %edi
movl $0x7fff, %esi # imm = 0x7FFF
callq 0x309ec
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x219b1(%rip), %xmm0 # 0xe30c4
addss %xmm0, %xmm0
addss 0x2191d(%rip), %xmm0 # 0xe303c
movd %xmm0, %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andl %ecx, %eax
movl $0x38800000, %ecx # imm = 0x38800000
cmpl %r15d, %eax
jb 0xc173e
movl $0xc8001000, %ecx # imm = 0xC8001000
addl %eax, %ecx
shrl $0xd, %ecx
movl $0x7c00, %edx # imm = 0x7C00
movl $0x47800000, %esi # imm = 0x47800000
cmpl %esi, %eax
jae 0xc174e
movl %ecx, %edx
movl $0x7e00, %ecx # imm = 0x7E00
cmpl %r13d, %eax
jae 0xc175a
movl %edx, %ecx
movmskps %xmm0, %eax
shll $0xf, %eax
orl %ecx, %eax
movw %ax, -0x632(%rbp,%rbx)
xorl %edi, %edi
movl $0x7fff, %esi # imm = 0x7FFF
callq 0x309ec
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2193f(%rip), %xmm0 # 0xe30c4
movd %xmm0, %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andl %ecx, %eax
cmpl %r15d, %eax
jb 0xc17a2
movl $0xc8001000, %ecx # imm = 0xC8001000
leal (%rax,%rcx), %r15d
shrl $0xd, %r15d
movl $0x47800000, %ecx # imm = 0x47800000
cmpl %ecx, %eax
jae 0xc17ae
movl %r15d, %r12d
cmpl %r13d, %eax
jae 0xc17b6
movl %r12d, %r14d
movmskps %xmm0, %eax
shll $0xf, %eax
orl %r14d, %eax
movw %ax, -0x630(%rbp,%rbx)
addq $0x6, %rbx
cmpq $0x604, %rbx # imm = 0x604
jne 0xc1674
leaq -0x630(%rbp), %rdi
movl $0x10, %esi
movl $0x10, %edx
movl $0xc, %ecx
movl $0x1, %r8d
callq 0x1cc6c
movl %eax, 0x10227d(%rip) # 0x1c3a7c
addq $0x608, %rsp # imm = 0x608
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
r3d_texture_load_rand_noise:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 608h
lea rdi, [rbp+var_630]
mov edx, 600h
xor esi, esi
call _memset
mov ebx, 4
mov r13d, 7F800001h
loc_C1674:
xor edi, edi
mov esi, 7FFFh
call GetRandomValue
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, cs:dword_E30C4
addss xmm0, xmm0
addss xmm0, cs:dword_E303C
movd eax, xmm0
mov ecx, 7FFFFFFFh
and eax, ecx
mov r15d, 38800000h
mov ecx, 38800000h
cmp eax, r15d
jb short loc_C16C0
mov ecx, 0C8001000h
add ecx, eax
shr ecx, 0Dh
loc_C16C0:
mov r12d, 7C00h
mov edx, 7C00h
mov esi, 47800000h
cmp eax, esi
jnb short loc_C16D6
mov edx, ecx
loc_C16D6:
mov r14d, 7E00h
mov ecx, 7E00h
cmp eax, r13d
jnb short loc_C16E8
mov ecx, edx
loc_C16E8:
movmskps eax, xmm0
shl eax, 0Fh
or eax, ecx
mov [rbp+rbx+var_634], ax
xor edi, edi
mov esi, 7FFFh
call GetRandomValue
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, cs:dword_E30C4
addss xmm0, xmm0
addss xmm0, cs:dword_E303C
movd eax, xmm0
mov ecx, 7FFFFFFFh
and eax, ecx
mov ecx, 38800000h
cmp eax, r15d
jb short loc_C173E
mov ecx, 0C8001000h
add ecx, eax
shr ecx, 0Dh
loc_C173E:
mov edx, 7C00h
mov esi, 47800000h
cmp eax, esi
jnb short loc_C174E
mov edx, ecx
loc_C174E:
mov ecx, 7E00h
cmp eax, r13d
jnb short loc_C175A
mov ecx, edx
loc_C175A:
movmskps eax, xmm0
shl eax, 0Fh
or eax, ecx
mov [rbp+rbx+var_632], ax
xor edi, edi
mov esi, 7FFFh
call GetRandomValue
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, cs:dword_E30C4
movd eax, xmm0
mov ecx, 7FFFFFFFh
and eax, ecx
cmp eax, r15d
jb short loc_C17A2
mov ecx, 0C8001000h
lea r15d, [rax+rcx]
shr r15d, 0Dh
loc_C17A2:
mov ecx, 47800000h
cmp eax, ecx
jnb short loc_C17AE
mov r12d, r15d
loc_C17AE:
cmp eax, r13d
jnb short loc_C17B6
mov r14d, r12d
loc_C17B6:
movmskps eax, xmm0
shl eax, 0Fh
or eax, r14d
mov [rbp+rbx+var_630], ax
add rbx, 6
cmp rbx, 604h
jnz loc_C1674
lea rdi, [rbp+var_630]
mov esi, 10h
mov edx, 10h
mov ecx, 0Ch
mov r8d, 1
call rlLoadTexture
mov cs:dword_1C3A7C, eax
add rsp, 608h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long r3d_texture_load_rand_noise()
{
long long i; // rbx
int RandomValue; // eax
__m128 v2; // xmm0
unsigned int v3; // eax
unsigned int v4; // r15d
unsigned int v5; // ecx
__int16 v6; // r12
__int16 v7; // dx
__int16 v8; // r14
__int16 v9; // cx
int v10; // eax
__m128 v11; // xmm0
unsigned int v12; // eax
unsigned int v13; // ecx
__int16 v14; // dx
__int16 v15; // cx
__m128 v16; // xmm0
unsigned int v17; // eax
long long result; // rax
_WORD v19[2]; // [rsp+0h] [rbp-634h]
_WORD v20[792]; // [rsp+4h] [rbp-630h] BYREF
memset(v20, 0LL, 1536LL);
for ( i = 2LL; i != 770; i += 3LL )
{
RandomValue = GetRandomValue(0, 0x7FFF);
v2 = 0LL;
v2.m128_f32[0] = (float)((float)((float)RandomValue / 32767.0) + (float)((float)RandomValue / 32767.0)) + -1.0;
v3 = _mm_cvtsi128_si32((__m128i)v2) & 0x7FFFFFFF;
LOWORD(v4) = 0;
LOWORD(v5) = 0;
if ( v3 >= 0x38800000 )
v5 = (v3 - 939520000) >> 13;
v6 = 31744;
v7 = 31744;
if ( v3 < 0x47800000 )
v7 = v5;
v8 = 32256;
v9 = 32256;
if ( v3 < 0x7F800001 )
v9 = v7;
v19[i] = v9 | ((unsigned __int16)_mm_movemask_ps(v2) << 15);
v10 = GetRandomValue(0, 0x7FFF);
v11 = 0LL;
v11.m128_f32[0] = (float)((float)((float)v10 / 32767.0) + (float)((float)v10 / 32767.0)) + -1.0;
v12 = _mm_cvtsi128_si32((__m128i)v11) & 0x7FFFFFFF;
LOWORD(v13) = 0;
if ( v12 >= 0x38800000 )
v13 = (v12 - 939520000) >> 13;
v14 = 31744;
if ( v12 < 0x47800000 )
v14 = v13;
v15 = 32256;
if ( v12 < 0x7F800001 )
v15 = v14;
v19[i + 1] = v15 | ((unsigned __int16)_mm_movemask_ps(v11) << 15);
v16 = 0LL;
v16.m128_f32[0] = (float)(int)GetRandomValue(0, 0x7FFF) / 32767.0;
v17 = _mm_cvtsi128_si32((__m128i)v16) & 0x7FFFFFFF;
if ( v17 >= 0x38800000 )
v4 = (v17 - 939520000) >> 13;
if ( v17 < 0x47800000 )
v6 = v4;
if ( v17 < 0x7F800001 )
v8 = v6;
v20[i] = v8 | ((unsigned __int16)_mm_movemask_ps(v16) << 15);
}
result = rlLoadTexture((long long)v20, 0x10u, 0x10u, 0xCu, 1u);
dword_1C3A7C = result;
return result;
}
|
r3d_texture_load_rand_noise:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x608
LEA RDI,[RBP + -0x630]
MOV EDX,0x600
XOR ESI,ESI
CALL 0x001081f0
MOV EBX,0x4
MOV R13D,0x7f800001
LAB_001c1674:
XOR EDI,EDI
MOV ESI,0x7fff
CALL 0x001309ec
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
DIVSS XMM0,dword ptr [0x001e30c4]
ADDSS XMM0,XMM0
ADDSS XMM0,dword ptr [0x001e303c]
MOVD EAX,XMM0
MOV ECX,0x7fffffff
AND EAX,ECX
MOV R15D,0x38800000
MOV ECX,0x38800000
CMP EAX,R15D
JC 0x001c16c0
MOV ECX,0xc8001000
ADD ECX,EAX
SHR ECX,0xd
LAB_001c16c0:
MOV R12D,0x7c00
MOV EDX,0x7c00
MOV ESI,0x47800000
CMP EAX,ESI
JNC 0x001c16d6
MOV EDX,ECX
LAB_001c16d6:
MOV R14D,0x7e00
MOV ECX,0x7e00
CMP EAX,R13D
JNC 0x001c16e8
MOV ECX,EDX
LAB_001c16e8:
MOVMSKPS EAX,XMM0
SHL EAX,0xf
OR EAX,ECX
MOV word ptr [RBP + RBX*0x1 + -0x634],AX
XOR EDI,EDI
MOV ESI,0x7fff
CALL 0x001309ec
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
DIVSS XMM0,dword ptr [0x001e30c4]
ADDSS XMM0,XMM0
ADDSS XMM0,dword ptr [0x001e303c]
MOVD EAX,XMM0
MOV ECX,0x7fffffff
AND EAX,ECX
MOV ECX,0x38800000
CMP EAX,R15D
JC 0x001c173e
MOV ECX,0xc8001000
ADD ECX,EAX
SHR ECX,0xd
LAB_001c173e:
MOV EDX,0x7c00
MOV ESI,0x47800000
CMP EAX,ESI
JNC 0x001c174e
MOV EDX,ECX
LAB_001c174e:
MOV ECX,0x7e00
CMP EAX,R13D
JNC 0x001c175a
MOV ECX,EDX
LAB_001c175a:
MOVMSKPS EAX,XMM0
SHL EAX,0xf
OR EAX,ECX
MOV word ptr [RBP + RBX*0x1 + -0x632],AX
XOR EDI,EDI
MOV ESI,0x7fff
CALL 0x001309ec
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
DIVSS XMM0,dword ptr [0x001e30c4]
MOVD EAX,XMM0
MOV ECX,0x7fffffff
AND EAX,ECX
CMP EAX,R15D
JC 0x001c17a2
MOV ECX,0xc8001000
LEA R15D,[RAX + RCX*0x1]
SHR R15D,0xd
LAB_001c17a2:
MOV ECX,0x47800000
CMP EAX,ECX
JNC 0x001c17ae
MOV R12D,R15D
LAB_001c17ae:
CMP EAX,R13D
JNC 0x001c17b6
MOV R14D,R12D
LAB_001c17b6:
MOVMSKPS EAX,XMM0
SHL EAX,0xf
OR EAX,R14D
MOV word ptr [RBP + RBX*0x1 + -0x630],AX
ADD RBX,0x6
CMP RBX,0x604
JNZ 0x001c1674
LEA RDI,[RBP + -0x630]
MOV ESI,0x10
MOV EDX,0x10
MOV ECX,0xc
MOV R8D,0x1
CALL 0x0011cc6c
MOV dword ptr [0x002c3a7c],EAX
ADD RSP,0x608
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void r3d_texture_load_rand_noise(void)
{
int iVar1;
float fVar2;
ushort uVar3;
long lVar4;
ushort uVar5;
ushort uVar6;
float fVar7;
int8 uStack_640;
ushort local_638 [772];
uStack_640 = 0x1c1669;
memset(local_638,0,0x600);
lVar4 = 4;
do {
uStack_640 = 0x1c1680;
iVar1 = GetRandomValue(0,0x7fff);
fVar7 = (float)iVar1 / DAT_001e30c4 + (float)iVar1 / DAT_001e30c4 + DAT_001e303c;
fVar2 = ABS(fVar7);
uVar6 = 0;
uVar5 = 0;
if (0x387fffff < (uint)fVar2) {
uVar5 = (ushort)((int)fVar2 + 0xc8001000U >> 0xd);
}
uVar3 = 0x7c00;
if ((uint)fVar2 < 0x47800000) {
uVar3 = uVar5;
}
uVar5 = 0x7e00;
if ((uint)fVar2 < 0x7f800001) {
uVar5 = uVar3;
}
iVar1 = movmskps(fVar2,ZEXT416((uint)fVar7));
*(ushort *)((long)local_638 + lVar4 + -4) = (ushort)(iVar1 << 0xf) | uVar5;
uStack_640 = 0x1c1704;
iVar1 = GetRandomValue(0,0x7fff);
fVar7 = (float)iVar1 / DAT_001e30c4 + (float)iVar1 / DAT_001e30c4 + DAT_001e303c;
fVar2 = ABS(fVar7);
uVar5 = 0;
if (0x387fffff < (uint)fVar2) {
uVar5 = (ushort)((int)fVar2 + 0xc8001000U >> 0xd);
}
uVar3 = 0x7c00;
if ((uint)fVar2 < 0x47800000) {
uVar3 = uVar5;
}
uVar5 = 0x7e00;
if ((uint)fVar2 < 0x7f800001) {
uVar5 = uVar3;
}
iVar1 = movmskps(fVar2,ZEXT416((uint)fVar7));
*(ushort *)((long)local_638 + lVar4 + -2) = (ushort)(iVar1 << 0xf) | uVar5;
uStack_640 = 0x1c1776;
iVar1 = GetRandomValue(0,0x7fff);
fVar2 = ABS((float)iVar1 / DAT_001e30c4);
if (0x387fffff < (uint)fVar2) {
uVar6 = (ushort)((int)fVar2 + 0xc8001000U >> 0xd);
}
uVar5 = 0x7c00;
if ((uint)fVar2 < 0x47800000) {
uVar5 = uVar6;
}
uVar6 = 0x7e00;
if ((uint)fVar2 < 0x7f800001) {
uVar6 = uVar5;
}
iVar1 = movmskps(fVar2,ZEXT416((uint)((float)iVar1 / DAT_001e30c4)));
*(ushort *)((long)local_638 + lVar4) = (ushort)(iVar1 << 0xf) | uVar6;
lVar4 = lVar4 + 6;
} while (lVar4 != 0x604);
uStack_640 = 0x1c17f9;
DAT_002c3a7c = rlLoadTexture(local_638,0x10,0x10,0xc,1);
return;
}
|
|
12,654
|
get_buffer_backend
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c
|
static ggml_backend_t get_buffer_backend(ggml_backend_sched_t sched, ggml_backend_buffer_t buffer) {
if (buffer == NULL) {
return NULL;
}
// find highest prio backend that supports the buffer type
for (int i = 0; i < sched->n_backends; i++) {
if (ggml_backend_buft_supports_backend(buffer->buft, sched->backends[i])) {
return sched->backends[i];
}
}
GGML_ASSERT(false && "tensor buffer type not supported by any backend");
}
|
O1
|
c
|
get_buffer_backend:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xb6001
movq %rdi, %rbx
cmpl $0x0, (%rdi)
setg %bpl
jle 0xb6034
movq %rsi, %r14
movq 0x40(%rsi), %rdi
movq 0x8(%rbx), %rsi
callq *0x18(%rdi)
testb %al, %al
je 0xb6005
xorl %r15d, %r15d
jmp 0xb602d
xorl %eax, %eax
jmp 0xb6039
movl $0x1, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
setl %bpl
jge 0xb6034
movq 0x40(%r14), %rdi
movq 0x8(%rbx,%r15,8), %rsi
callq *0x18(%rdi)
incq %r15
testb %al, %al
je 0xb600b
decq %r15
movq 0x8(%rbx,%r15,8), %rax
jmp 0xb6034
testb %bpl, %bpl
je 0xb6044
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x18abf
nopl (%rax)
|
get_buffer_backend:
push rbp
push r15
push r14
push rbx
push rax
test rsi, rsi
jz short loc_B6001
mov rbx, rdi
cmp dword ptr [rdi], 0
setnle bpl
jle short loc_B6034
mov r14, rsi
mov rdi, [rsi+40h]
mov rsi, [rbx+8]
call qword ptr [rdi+18h]
test al, al
jz short loc_B6005
xor r15d, r15d
jmp short loc_B602D
loc_B6001:
xor eax, eax
jmp short loc_B6039
loc_B6005:
mov r15d, 1
loc_B600B:
movsxd rax, dword ptr [rbx]
cmp r15, rax
setl bpl
jge short loc_B6034
mov rdi, [r14+40h]
mov rsi, [rbx+r15*8+8]
call qword ptr [rdi+18h]
inc r15
test al, al
jz short loc_B600B
dec r15
loc_B602D:
mov rax, [rbx+r15*8+8]
jmp short $+2
loc_B6034:
test bpl, bpl
jz short loc_B6044
loc_B6039:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_B6044:
call get_buffer_backend_cold_1
|
long long get_buffer_backend(int *a1, long long a2)
{
int *v2; // rbx
bool v3; // bp
long long v4; // r15
long long result; // rax
long long v6; // r15
if ( !a2 )
return 0LL;
v2 = a1;
v3 = *a1 > 0;
if ( *a1 > 0 )
{
a1 = *(int **)(a2 + 64);
if ( (*((unsigned __int8 ( **)(int *, _QWORD))a1 + 3))(a1, *((_QWORD *)v2 + 1)) )
{
v4 = 0LL;
LABEL_10:
result = *(_QWORD *)&v2[2 * v4 + 2];
}
else
{
v6 = 1LL;
while ( 1 )
{
result = *v2;
v3 = v6 < result;
if ( v6 >= result )
break;
a1 = *(int **)(a2 + 64);
if ( (*((unsigned __int8 ( **)(int *, _QWORD))a1 + 3))(a1, *(_QWORD *)&v2[2 * v6++ + 2]) )
{
v4 = v6 - 1;
goto LABEL_10;
}
}
}
}
if ( !v3 )
get_buffer_backend_cold_1(a1);
return result;
}
| |||
12,655
|
get_buffer_backend
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c
|
static ggml_backend_t get_buffer_backend(ggml_backend_sched_t sched, ggml_backend_buffer_t buffer) {
if (buffer == NULL) {
return NULL;
}
// find highest prio backend that supports the buffer type
for (int i = 0; i < sched->n_backends; i++) {
if (ggml_backend_buft_supports_backend(buffer->buft, sched->backends[i])) {
return sched->backends[i];
}
}
GGML_ASSERT(false && "tensor buffer type not supported by any backend");
}
|
O2
|
c
|
get_buffer_backend:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x921cb
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x921d3
movq 0x40(%r14), %rdi
movq 0x8(%rbx,%r15,8), %rsi
callq *0x18(%rdi)
incq %r15
testb %al, %al
je 0x921aa
movq (%rbx,%r15,8), %rax
jmp 0x921cd
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x43d6e(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x43dbf(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x802b(%rip), %rsi # 0x9a21e
leaq 0x12536(%rip), %rdx # 0xa4730
leaq 0x12a95(%rip), %r8 # 0xa4c96
movl $0x2fb, %ecx # imm = 0x2FB
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
|
get_buffer_backend:
push r15
push r14
push rbx
test rsi, rsi
jz short loc_921CB
mov r14, rsi
mov rbx, rdi
xor r15d, r15d
loc_921AA:
movsxd rax, dword ptr [rbx]
cmp r15, rax
jge short loc_921D3
mov rdi, [r14+40h]
mov rsi, [rbx+r15*8+8]
call qword ptr [rdi+18h]
inc r15
test al, al
jz short loc_921AA
mov rax, [rbx+r15*8]
jmp short loc_921CD
loc_921CB:
xor eax, eax
loc_921CD:
pop rbx
pop r14
pop r15
retn
loc_921D3:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"...
lea r8, aFalseTensorBuf; "false && \"tensor buffer type not suppo"...
mov ecx, 2FBh
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
|
long long get_buffer_backend(int *a1, long long a2)
{
long long v2; // r15
long long v5; // rdi
if ( !a2 )
return 0LL;
v2 = 0LL;
do
{
if ( v2 >= *a1 )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c",
763,
"false && \"tensor buffer type not supported by any backend\"");
ggml_print_backtrace();
abort(v5);
}
}
while ( !(*(unsigned __int8 ( **)(_QWORD, _QWORD))(*(_QWORD *)(a2 + 64) + 24LL))(
*(_QWORD *)(a2 + 64),
*(_QWORD *)&a1[2 * v2++ + 2]) );
return *(_QWORD *)&a1[2 * v2];
}
|
get_buffer_backend:
PUSH R15
PUSH R14
PUSH RBX
TEST RSI,RSI
JZ 0x001921cb
MOV R14,RSI
MOV RBX,RDI
XOR R15D,R15D
LAB_001921aa:
MOVSXD RAX,dword ptr [RBX]
CMP R15,RAX
JGE 0x001921d3
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,qword ptr [RBX + R15*0x8 + 0x8]
CALL qword ptr [RDI + 0x18]
INC R15
TEST AL,AL
JZ 0x001921aa
MOV RAX,qword ptr [RBX + R15*0x8]
JMP 0x001921cd
LAB_001921cb:
XOR EAX,EAX
LAB_001921cd:
POP RBX
POP R14
POP R15
RET
LAB_001921d3:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a4730]
LEA R8,[0x1a4c96]
MOV ECX,0x2fb
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
int8 get_buffer_backend(int *param_1,long param_2)
{
char cVar1;
int8 uVar2;
long lVar3;
if (param_2 == 0) {
uVar2 = 0;
}
else {
lVar3 = 0;
do {
if (*param_1 <= lVar3) {
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c"
,0x2fb,"false && \"tensor buffer type not supported by any backend\"");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
cVar1 = (**(code **)(*(long *)(param_2 + 0x40) + 0x18))
(*(long *)(param_2 + 0x40),*(int8 *)(param_1 + lVar3 * 2 + 2));
lVar3 = lVar3 + 1;
} while (cVar1 == '\0');
uVar2 = *(int8 *)(param_1 + lVar3 * 2);
}
return uVar2;
}
|
|
12,656
|
encode_length
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
|
static void encode_length(buffer_t* buf, uint32_t len, uint8_t offset) {
uint8_t val = offset;
if (len < 56)
buffer_add_bytes(buf, 1, offset + len);
else if (len < 0x100)
buffer_add_bytes(buf, 2, offset + 55 + 1, len);
else if (len < 0x10000) {
buffer_add_bytes(buf, 1, offset + 55 + 2);
buffer_add_be(buf, len, 2);
}
else if (len < 0x1000000) {
buffer_add_bytes(buf, 1, offset + 55 + 3);
buffer_add_be(buf, len, 3);
}
else {
buffer_add_bytes(buf, 1, offset + 55 + 4);
buffer_add_be(buf, len, 4);
}
}
|
O0
|
c
|
encode_length:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
movb %al, -0xe(%rbp)
cmpl $0x38, -0xc(%rbp)
jae 0x1640c
movq -0x8(%rbp), %rdi
movzbl -0xd(%rbp), %edx
addl -0xc(%rbp), %edx
movl $0x1, %esi
movb $0x0, %al
callq 0x19560
jmp 0x164da
cmpl $0x100, -0xc(%rbp) # imm = 0x100
jae 0x16437
movq -0x8(%rbp), %rdi
movzbl -0xd(%rbp), %edx
addl $0x37, %edx
addl $0x1, %edx
movl -0xc(%rbp), %ecx
movl $0x2, %esi
movb $0x0, %al
callq 0x19560
jmp 0x164d8
cmpl $0x10000, -0xc(%rbp) # imm = 0x10000
jae 0x1646f
movq -0x8(%rbp), %rdi
movzbl -0xd(%rbp), %edx
addl $0x37, %edx
addl $0x2, %edx
movl $0x1, %esi
movb $0x0, %al
callq 0x19560
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x196b0
jmp 0x164d6
cmpl $0x1000000, -0xc(%rbp) # imm = 0x1000000
jae 0x164a7
movq -0x8(%rbp), %rdi
movzbl -0xd(%rbp), %edx
addl $0x37, %edx
addl $0x3, %edx
movl $0x1, %esi
movb $0x0, %al
callq 0x19560
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
movl $0x3, %edx
callq 0x196b0
jmp 0x164d4
movq -0x8(%rbp), %rdi
movzbl -0xd(%rbp), %edx
addl $0x37, %edx
addl $0x4, %edx
movl $0x1, %esi
movb $0x0, %al
callq 0x19560
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
movl $0x4, %edx
callq 0x196b0
jmp 0x164d6
jmp 0x164d8
jmp 0x164da
addq $0x10, %rsp
popq %rbp
retq
|
encode_length:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_D], al
mov al, [rbp+var_D]
mov [rbp+var_E], al
cmp [rbp+var_C], 38h ; '8'
jnb short loc_1640C
mov rdi, [rbp+var_8]
movzx edx, [rbp+var_D]
add edx, [rbp+var_C]
mov esi, 1
mov al, 0
call buffer_add_bytes
jmp loc_164DA
loc_1640C:
cmp [rbp+var_C], 100h
jnb short loc_16437
mov rdi, [rbp+var_8]
movzx edx, [rbp+var_D]
add edx, 37h ; '7'
add edx, 1
mov ecx, [rbp+var_C]
mov esi, 2
mov al, 0
call buffer_add_bytes
jmp loc_164D8
loc_16437:
cmp [rbp+var_C], 10000h
jnb short loc_1646F
mov rdi, [rbp+var_8]
movzx edx, [rbp+var_D]
add edx, 37h ; '7'
add edx, 2
mov esi, 1
mov al, 0
call buffer_add_bytes
mov rdi, [rbp+var_8]
mov eax, [rbp+var_C]
mov esi, eax
mov edx, 2
call buffer_add_be
jmp short loc_164D6
loc_1646F:
cmp [rbp+var_C], 1000000h
jnb short loc_164A7
mov rdi, [rbp+var_8]
movzx edx, [rbp+var_D]
add edx, 37h ; '7'
add edx, 3
mov esi, 1
mov al, 0
call buffer_add_bytes
mov rdi, [rbp+var_8]
mov eax, [rbp+var_C]
mov esi, eax
mov edx, 3
call buffer_add_be
jmp short loc_164D4
loc_164A7:
mov rdi, [rbp+var_8]
movzx edx, [rbp+var_D]
add edx, 37h ; '7'
add edx, 4
mov esi, 1
mov al, 0
call buffer_add_bytes
mov rdi, [rbp+var_8]
mov eax, [rbp+var_C]
mov esi, eax
mov edx, 4
call buffer_add_be
loc_164D4:
jmp short $+2
loc_164D6:
jmp short $+2
loc_164D8:
jmp short $+2
loc_164DA:
add rsp, 10h
pop rbp
retn
|
long long encode_length(long long a1, unsigned int a2, unsigned __int8 a3, int a4, int a5, int a6)
{
if ( a2 < 0x38 )
return buffer_add_bytes(a1, 1, a2 + a3, a4, a5, a6);
if ( a2 < 0x100 )
return buffer_add_bytes(a1, 2, (unsigned int)a3 + 56, a2, a5, a6);
if ( a2 >= 0x10000 )
{
if ( a2 >= 0x1000000 )
{
buffer_add_bytes(a1, 1, a3 + 59, a4, a5, a6);
return buffer_add_be(a1, a2, 4LL);
}
else
{
buffer_add_bytes(a1, 1, a3 + 58, a4, a5, a6);
return buffer_add_be(a1, a2, 3LL);
}
}
else
{
buffer_add_bytes(a1, 1, a3 + 57, a4, a5, a6);
return buffer_add_be(a1, a2, 2LL);
}
}
|
encode_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV byte ptr [RBP + -0xd],AL
MOV AL,byte ptr [RBP + -0xd]
MOV byte ptr [RBP + -0xe],AL
CMP dword ptr [RBP + -0xc],0x38
JNC 0x0011640c
MOV RDI,qword ptr [RBP + -0x8]
MOVZX EDX,byte ptr [RBP + -0xd]
ADD EDX,dword ptr [RBP + -0xc]
MOV ESI,0x1
MOV AL,0x0
CALL 0x00119560
JMP 0x001164da
LAB_0011640c:
CMP dword ptr [RBP + -0xc],0x100
JNC 0x00116437
MOV RDI,qword ptr [RBP + -0x8]
MOVZX EDX,byte ptr [RBP + -0xd]
ADD EDX,0x37
ADD EDX,0x1
MOV ECX,dword ptr [RBP + -0xc]
MOV ESI,0x2
MOV AL,0x0
CALL 0x00119560
JMP 0x001164d8
LAB_00116437:
CMP dword ptr [RBP + -0xc],0x10000
JNC 0x0011646f
MOV RDI,qword ptr [RBP + -0x8]
MOVZX EDX,byte ptr [RBP + -0xd]
ADD EDX,0x37
ADD EDX,0x2
MOV ESI,0x1
MOV AL,0x0
CALL 0x00119560
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDX,0x2
CALL 0x001196b0
JMP 0x001164d6
LAB_0011646f:
CMP dword ptr [RBP + -0xc],0x1000000
JNC 0x001164a7
MOV RDI,qword ptr [RBP + -0x8]
MOVZX EDX,byte ptr [RBP + -0xd]
ADD EDX,0x37
ADD EDX,0x3
MOV ESI,0x1
MOV AL,0x0
CALL 0x00119560
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDX,0x3
CALL 0x001196b0
JMP 0x001164d4
LAB_001164a7:
MOV RDI,qword ptr [RBP + -0x8]
MOVZX EDX,byte ptr [RBP + -0xd]
ADD EDX,0x37
ADD EDX,0x4
MOV ESI,0x1
MOV AL,0x0
CALL 0x00119560
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDX,0x4
CALL 0x001196b0
LAB_001164d4:
JMP 0x001164d6
LAB_001164d6:
JMP 0x001164d8
LAB_001164d8:
JMP 0x001164da
LAB_001164da:
ADD RSP,0x10
POP RBP
RET
|
void encode_length(int8 param_1,uint param_2,byte param_3)
{
if (param_2 < 0x38) {
buffer_add_bytes(param_1,1,param_3 + param_2);
}
else if (param_2 < 0x100) {
buffer_add_bytes(param_1,2,param_3 + 0x38,param_2);
}
else if (param_2 < 0x10000) {
buffer_add_bytes(param_1,1,param_3 + 0x39);
buffer_add_be(param_1,param_2,2);
}
else if (param_2 < 0x1000000) {
buffer_add_bytes(param_1,1,param_3 + 0x3a);
buffer_add_be(param_1,param_2,3);
}
else {
buffer_add_bytes(param_1,1,param_3 + 0x3b);
buffer_add_be(param_1,param_2,4);
}
return;
}
|
|
12,657
|
encode_length
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
|
static void encode_length(buffer_t* buf, uint32_t len, uint8_t offset) {
uint8_t val = offset;
if (len < 56)
buffer_add_bytes(buf, 1, offset + len);
else if (len < 0x100)
buffer_add_bytes(buf, 2, offset + 55 + 1, len);
else if (len < 0x10000) {
buffer_add_bytes(buf, 1, offset + 55 + 2);
buffer_add_be(buf, len, 2);
}
else if (len < 0x1000000) {
buffer_add_bytes(buf, 1, offset + 55 + 3);
buffer_add_be(buf, len, 3);
}
else {
buffer_add_bytes(buf, 1, offset + 55 + 4);
buffer_add_be(buf, len, 4);
}
}
|
O1
|
c
|
encode_length:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movzbl %dl, %edx
cmpl $0x37, %esi
ja 0x11202
addl %ebp, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x12f6c
cmpl $0xff, %ebp
ja 0x11222
addl $0x38, %edx
movq %rbx, %rdi
movl $0x2, %esi
movl %ebp, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x12f6c
cmpl $0xffff, %ebp # imm = 0xFFFF
ja 0x11248
addl $0x39, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x12f6c
movl %ebp, %esi
movq %rbx, %rdi
movl $0x2, %edx
jmp 0x1128f
movl %ebp, %r14d
cmpl $0xffffff, %ebp # imm = 0xFFFFFF
ja 0x11272
addl $0x3a, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x12f6c
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3, %edx
jmp 0x1128f
addl $0x3b, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x12f6c
movq %rbx, %rdi
movq %r14, %rsi
movl $0x4, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x13041
|
encode_length:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
movzx edx, dl
cmp esi, 37h ; '7'
ja short loc_11202
add edx, ebp
mov rdi, rbx
mov esi, 1
xor eax, eax
pop rbx
pop r14
pop rbp
jmp buffer_add_bytes
loc_11202:
cmp ebp, 0FFh
ja short loc_11222
add edx, 38h ; '8'
mov rdi, rbx
mov esi, 2
mov ecx, ebp
xor eax, eax
pop rbx
pop r14
pop rbp
jmp buffer_add_bytes
loc_11222:
cmp ebp, 0FFFFh
ja short loc_11248
add edx, 39h ; '9'
mov rdi, rbx
mov esi, 1
xor eax, eax
call buffer_add_bytes
mov esi, ebp
mov rdi, rbx
mov edx, 2
jmp short loc_1128F
loc_11248:
mov r14d, ebp
cmp ebp, 0FFFFFFh
ja short loc_11272
add edx, 3Ah ; ':'
mov rdi, rbx
mov esi, 1
xor eax, eax
call buffer_add_bytes
mov rdi, rbx
mov rsi, r14
mov edx, 3
jmp short loc_1128F
loc_11272:
add edx, 3Bh ; ';'
mov rdi, rbx
mov esi, 1
xor eax, eax
call buffer_add_bytes
mov rdi, rbx
mov rsi, r14
mov edx, 4
loc_1128F:
pop rbx
pop r14
pop rbp
jmp buffer_add_be
|
long long encode_length(long long a1, unsigned int a2, unsigned __int8 a3, int a4, int a5, int a6)
{
if ( a2 <= 0x37 )
return buffer_add_bytes(a1, 1, a2 + a3, a4, a5, a6);
if ( a2 <= 0xFF )
return buffer_add_bytes(a1, 2, (unsigned int)a3 + 56, a2, a5, a6);
if ( a2 > 0xFFFF )
{
if ( a2 > 0xFFFFFF )
{
buffer_add_bytes(a1, 1, a3 + 59, a4, a5, a6);
return buffer_add_be(a1, a2, 4LL);
}
else
{
buffer_add_bytes(a1, 1, a3 + 58, a4, a5, a6);
return buffer_add_be(a1, a2, 3LL);
}
}
else
{
buffer_add_bytes(a1, 1, a3 + 57, a4, a5, a6);
return buffer_add_be(a1, a2, 2LL);
}
}
|
encode_length:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,ESI
MOV RBX,RDI
MOVZX EDX,DL
CMP ESI,0x37
JA 0x00111202
ADD EDX,EBP
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
POP RBX
POP R14
POP RBP
JMP 0x00112f6c
LAB_00111202:
CMP EBP,0xff
JA 0x00111222
ADD EDX,0x38
MOV RDI,RBX
MOV ESI,0x2
MOV ECX,EBP
XOR EAX,EAX
POP RBX
POP R14
POP RBP
JMP 0x00112f6c
LAB_00111222:
CMP EBP,0xffff
JA 0x00111248
ADD EDX,0x39
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00112f6c
MOV ESI,EBP
MOV RDI,RBX
MOV EDX,0x2
JMP 0x0011128f
LAB_00111248:
MOV R14D,EBP
CMP EBP,0xffffff
JA 0x00111272
ADD EDX,0x3a
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00112f6c
MOV RDI,RBX
MOV RSI,R14
MOV EDX,0x3
JMP 0x0011128f
LAB_00111272:
ADD EDX,0x3b
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00112f6c
MOV RDI,RBX
MOV RSI,R14
MOV EDX,0x4
LAB_0011128f:
POP RBX
POP R14
POP RBP
JMP 0x00113041
|
void encode_length(int8 param_1,uint param_2,byte param_3)
{
uint uVar1;
int8 uVar2;
if (param_2 < 0x38) {
buffer_add_bytes(param_1,1,param_3 + param_2);
return;
}
uVar1 = (uint)param_3;
if (param_2 < 0x100) {
buffer_add_bytes(param_1,2,uVar1 + 0x38,param_2);
return;
}
if (param_2 < 0x10000) {
buffer_add_bytes(param_1,1,uVar1 + 0x39);
uVar2 = 2;
}
else if (param_2 < 0x1000000) {
buffer_add_bytes(param_1,1,uVar1 + 0x3a);
uVar2 = 3;
}
else {
buffer_add_bytes(param_1,1,uVar1 + 0x3b);
uVar2 = 4;
}
buffer_add_be(param_1,param_2,uVar2);
return;
}
|
|
12,658
|
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)())
|
ng-log[P]ng-log/src/logging.cc
|
ErrnoLogMessage::ErrnoLogMessage(const char* file, int line,
LogSeverity severity, int64 ctr,
void (LogMessage::*send_method)())
: LogMessage(file, line, severity, ctr, send_method) {}
|
O1
|
cpp
|
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %rbx
movq $0x0, (%rdi)
addq $0x10, %rdi
callq 0xf184
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %r13, %r8
movq %rbx, %r9
callq 0xa8c2
movq 0x8(%r12), %rax
movq (%rsp), %rcx
movq %rcx, 0x7580(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r8
mov ebp, ecx
mov r14d, edx
mov r15, rsi
mov r12, rdi
mov r13, [rsp+38h+arg_0]
mov rbx, [rsp+38h+arg_8]
mov qword ptr [rdi], 0
add rdi, 10h; this
call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
mov rdi, r12
mov rsi, r15
mov edx, r14d
mov ecx, ebp
mov r8, r13
mov r9, rbx
call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov rax, [r12+8]
mov rcx, [rsp+38h+var_38]
mov [rax+7580h], rcx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nglog::ErrnoLogMessage::ErrnoLogMessage(
_QWORD *a1,
nglog::tools *a2,
int a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long result; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init((long long)a1, a2, a3, a4, a7, a8);
result = a1[1];
*(_QWORD *)(result + 30080) = a5;
return result;
}
|
ErrnoLogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],R8
MOV EBP,ECX
MOV R14D,EDX
MOV R15,RSI
MOV R12,RDI
MOV R13,qword ptr [RSP + 0x40]
MOV RBX,qword ptr [RSP + 0x48]
MOV qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x0010f184
MOV RDI,R12
MOV RSI,R15
MOV EDX,R14D
MOV ECX,EBP
MOV R8,R13
MOV R9,RBX
CALL 0x0010a8c2
MOV RAX,qword ptr [R12 + 0x8]
MOV RCX,qword ptr [RSP]
MOV qword ptr [RAX + 0x7580],RCX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void
(nglog::LogMessage::*)()) */
void __thiscall
nglog::ErrnoLogMessage::ErrnoLogMessage
(ErrnoLogMessage *this,int8 param_1,int4 param_2,int4 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8)
{
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
LogMessage::Init(this,param_1,param_2,param_4,param_7,param_8);
*(int8 *)(*(long *)(this + 8) + 0x7580) = param_5;
return;
}
|
|
12,659
|
testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) const
|
AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
|
Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
|
O3
|
c
|
testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) const:
movl (%rdi), %eax
movl %eax, %ecx
notl %ecx
testl $0x7f800000, %ecx # imm = 0x7F800000
sete %cl
testl $0x7fffff, %eax # imm = 0x7FFFFF
setne %dl
testb %dl, %cl
jne 0x7caa3
movl (%rsi), %ecx
movl %ecx, %edx
notl %edx
testl $0x7f800000, %edx # imm = 0x7F800000
sete %dl
testl $0x7fffff, %ecx # imm = 0x7FFFFF
setne %sil
testb %sil, %dl
je 0x7caa6
xorl %eax, %eax
retq
movl %eax, %edx
negl %edx
movl $0x80000000, %esi # imm = 0x80000000
movl %eax, %edi
orl %esi, %edi
testl %eax, %eax
cmovsl %edx, %edi
movl %ecx, %eax
negl %eax
orl %ecx, %esi
testl %ecx, %ecx
cmovsl %eax, %esi
movl %edi, %eax
subl %esi, %eax
negl %eax
subl %esi, %edi
cmovbl %eax, %edi
cmpl $0x5, %edi
setb %al
retq
nop
|
_ZNK7testing8internal13FloatingPointIfE12AlmostEqualsERKS2_:
mov eax, [rdi]
mov ecx, eax
not ecx
test ecx, 7F800000h
setz cl
test eax, 7FFFFFh
setnz dl
test cl, dl
jnz short loc_7CAA3
mov ecx, [rsi]
mov edx, ecx
not edx
test edx, 7F800000h
setz dl
test ecx, 7FFFFFh
setnz sil
test dl, sil
jz short loc_7CAA6
loc_7CAA3:
xor eax, eax
retn
loc_7CAA6:
mov edx, eax
neg edx
mov esi, 80000000h
mov edi, eax
or edi, esi
test eax, eax
cmovs edi, edx
mov eax, ecx
neg eax
or esi, ecx
test ecx, ecx
cmovs esi, eax
mov eax, edi
sub eax, esi
neg eax
sub edi, esi
cmovb edi, eax
cmp edi, 5
setb al
retn
|
bool testing::internal::FloatingPoint<float>::AlmostEquals(int *a1, int *a2)
{
int v2; // eax
int v3; // ecx
unsigned int v5; // edi
unsigned int v6; // esi
unsigned int v7; // eax
bool v8; // cf
unsigned int v9; // edi
v2 = *a1;
if ( (*a1 & 0x7FFFFF) != 0 && (~*a1 & 0x7F800000) == 0 )
return 0;
v3 = *a2;
if ( (*a2 & 0x7FFFFF) != 0 && (~*a2 & 0x7F800000) == 0 )
return 0;
v5 = v2 | 0x80000000;
if ( v2 < 0 )
v5 = -v2;
v6 = v3 | 0x80000000;
if ( v3 < 0 )
v6 = -v3;
v7 = v6 - v5;
v8 = v5 < v6;
v9 = v5 - v6;
if ( v8 )
v9 = v7;
return v9 < 5;
}
|
AlmostEquals:
MOV EAX,dword ptr [RDI]
MOV ECX,EAX
NOT ECX
TEST ECX,0x7f800000
SETZ CL
TEST EAX,0x7fffff
SETNZ DL
TEST CL,DL
JNZ 0x0017caa3
MOV ECX,dword ptr [RSI]
MOV EDX,ECX
NOT EDX
TEST EDX,0x7f800000
SETZ DL
TEST ECX,0x7fffff
SETNZ SIL
TEST DL,SIL
JZ 0x0017caa6
LAB_0017caa3:
XOR EAX,EAX
RET
LAB_0017caa6:
MOV EDX,EAX
NEG EDX
MOV ESI,0x80000000
MOV EDI,EAX
OR EDI,ESI
TEST EAX,EAX
CMOVS EDI,EDX
MOV EAX,ECX
NEG EAX
OR ESI,ECX
TEST ECX,ECX
CMOVS ESI,EAX
MOV EAX,EDI
SUB EAX,ESI
NEG EAX
SUB EDI,ESI
CMOVC EDI,EAX
CMP EDI,0x5
SETC AL
RET
|
/* testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float>
const&) const */
int4 __thiscall
testing::internal::FloatingPoint<float>::AlmostEquals
(FloatingPoint<float> *this,FloatingPoint *param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
uVar1 = *(uint *)this;
if (((~uVar1 & 0x7f800000) != 0 || (uVar1 & 0x7fffff) == 0) &&
(uVar3 = *(uint *)param_1, (~uVar3 & 0x7f800000) != 0 || (uVar3 & 0x7fffff) == 0)) {
uVar2 = uVar1 | 0x80000000;
if ((int)uVar1 < 0) {
uVar2 = -uVar1;
}
uVar1 = uVar3 | 0x80000000;
if ((int)uVar3 < 0) {
uVar1 = -uVar3;
}
uVar3 = uVar2 - uVar1;
if (uVar2 < uVar1) {
uVar3 = -(uVar2 - uVar1);
}
return CONCAT31((int3)(-(uVar2 - uVar1) >> 8),uVar3 < 5);
}
return 0;
}
|
|
12,660
|
LefDefParser::lefiPin::propIsNumber(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
|
int
lefiPin::propIsNumber(int index) const
{
char msg[160];
if (index < 0 || index >= numProperties_) {
sprintf(msg, "ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d", index, numProperties_);
lefiError(0, 1352, msg);
return 0;
}
return propNums_[index] ? 1 : 0;
}
|
O3
|
cpp
|
LefDefParser::lefiPin::propIsNumber(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x28c(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2ada3
movq 0x2a8(%rdi), %rax
movl %edx, %ecx
xorpd %xmm0, %xmm0
cmpneqsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
jmp 0x2adc8
leaq 0x27385(%rip), %rsi # 0x5212f
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x548, %esi # imm = 0x548
movq %r14, %rdx
callq 0x27ae8
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZNK12LefDefParser7lefiPin12propIsNumberEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+28Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2ADA3
mov rax, [rdi+2A8h]
mov ecx, edx
xorpd xmm0, xmm0
cmpneqsd xmm0, qword ptr [rax+rcx*8]
movq rbx, xmm0
and ebx, 1
jmp short loc_2ADC8
loc_2ADA3:
lea rsi, aErrorLefpars13_24; "ERROR (LEFPARS-1352): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 548h; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_2ADC8:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r14
retn
|
long long LefDefParser::lefiPin::propIsNumber(LefDefParser::lefiPin *this, signed int a2)
{
int v2; // ecx
__m128d v3; // rt1
unsigned int v4; // ebx
const char *v5; // rcx
_BYTE v7[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 163);
if ( v2 > a2 && a2 >= 0 )
{
v3.m128d_f64[0] = *(double *)(*((_QWORD *)this + 85) + 8LL * (unsigned int)a2);
return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v3) & 1;
}
else
{
v4 = 0;
sprintf(
v7,
"ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1352, (long long)v7, v5);
}
return v4;
}
|
propIsNumber:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x28c]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012ada3
MOV RAX,qword ptr [RDI + 0x2a8]
MOV ECX,EDX
XORPD XMM0,XMM0
CMPNEQSD XMM0,qword ptr [RAX + RCX*0x8]
MOVQ RBX,XMM0
AND EBX,0x1
JMP 0x0012adc8
LAB_0012ada3:
LEA RSI,[0x15212f]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x548
MOV RDX,R14
CALL 0x00127ae8
LAB_0012adc8:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiPin::propIsNumber(int) const */
byte __thiscall LefDefParser::lefiPin::propIsNumber(lefiPin *this,int param_1)
{
byte bVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x28c) <= param_1) {
bVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1352): The index number %d given for the macro property is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x548,acStack_b8);
}
else {
bVar1 = -(*(double *)(*(long *)(this + 0x2a8) + (ulong)(uint)param_1 * 8) != 0.0) & 1;
}
return bVar1;
}
|
|
12,661
|
ma_ck_write
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key)
{
DBUG_ENTER("_ma_ck_write");
if (info->bulk_insert &&
is_tree_inited(&info->bulk_insert[key->keyinfo->key_nr]))
{
DBUG_RETURN(_ma_ck_write_tree(info, key));
}
DBUG_RETURN(_ma_ck_write_btree(info, key));
}
|
O3
|
c
|
ma_ck_write:
movq %rdi, %rax
movq 0x310(%rdi), %rdi
testq %rdi, %rdi
je 0x55d09
movq 0x8(%rsi), %rcx
movzbl 0xa5(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
cmpq $0x0, (%rdi,%rcx)
je 0x55d09
pushq %rbp
movq %rsp, %rbp
addq %rcx, %rdi
movl 0x14(%rsi), %edx
movl %edx, 0x640(%rax)
movq (%rsi), %rax
addl 0x10(%rsi), %edx
movq 0x230(%rdi), %rcx
movq %rax, %rsi
callq 0xa47f2
testq %rax, %rax
sete %al
popq %rbp
retq
movq %rax, %rdi
jmp 0x55d0e
|
_ma_ck_write:
mov rax, rdi
mov rdi, [rdi+310h]
test rdi, rdi
jz short loc_55D09
mov rcx, [rsi+8]
movzx ecx, byte ptr [rcx+0A5h]
imul rcx, 298h
cmp qword ptr [rdi+rcx], 0
jz short loc_55D09
push rbp
mov rbp, rsp
add rdi, rcx
mov edx, [rsi+14h]
mov [rax+640h], edx
mov rax, [rsi]
add edx, [rsi+10h]
mov rcx, [rdi+230h]
mov rsi, rax
call tree_insert
test rax, rax
setz al
pop rbp
retn
loc_55D09:
mov rdi, rax
jmp short $+2
|
char ma_ck_write(long long a1, long long a2)
{
long long v3; // rdi
long long v4; // rcx
int v5; // edx
v3 = *(_QWORD *)(a1 + 784);
if ( !v3 )
return ma_ck_write_btree(a1);
v4 = 664LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL);
if ( !*(_QWORD *)(v3 + v4) )
return ma_ck_write_btree(a1);
v5 = *(_DWORD *)(a2 + 20);
*(_DWORD *)(a1 + 1600) = v5;
return tree_insert(v4 + v3, *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + v5), *(_QWORD *)(v4 + v3 + 560)) == 0;
}
|
_ma_ck_write:
MOV RAX,RDI
MOV RDI,qword ptr [RDI + 0x310]
TEST RDI,RDI
JZ 0x00155d09
MOV RCX,qword ptr [RSI + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
IMUL RCX,RCX,0x298
CMP qword ptr [RDI + RCX*0x1],0x0
JZ 0x00155d09
PUSH RBP
MOV RBP,RSP
ADD RDI,RCX
MOV EDX,dword ptr [RSI + 0x14]
MOV dword ptr [RAX + 0x640],EDX
MOV RAX,qword ptr [RSI]
ADD EDX,dword ptr [RSI + 0x10]
MOV RCX,qword ptr [RDI + 0x230]
MOV RSI,RAX
CALL 0x001a47f2
TEST RAX,RAX
SETZ AL
POP RBP
RET
LAB_00155d09:
MOV RDI,RAX
JMP 0x00155d0e
|
bool _ma_ck_write(long param_1,int8 *param_2)
{
int iVar1;
int1 uVar2;
long lVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x310);
if ((lVar4 != 0) &&
(lVar3 = (ulong)*(byte *)(param_2[1] + 0xa5) * 0x298, *(long *)(lVar4 + lVar3) != 0)) {
lVar4 = lVar4 + lVar3;
iVar1 = *(int *)((long)param_2 + 0x14);
*(int *)(param_1 + 0x640) = iVar1;
lVar4 = tree_insert(lVar4,*param_2,iVar1 + *(int *)(param_2 + 2),*(int8 *)(lVar4 + 0x230))
;
return lVar4 == 0;
}
uVar2 = _ma_ck_write_btree(param_1);
return (bool)uVar2;
}
|
|
12,662
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t)
|
llama.cpp/common/json.hpp
|
serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x20100
movq %rax, 0x50(%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x811f2
movb (%rcx), %r15b
movb %r15b, 0x58(%r14)
movq (%rax), %rax
testq %rax, %rax
je 0x81202
movb (%rax), %al
jmp 0x81204
xorl %eax, %eax
leaq 0x8(%r14), %r15
movb %al, 0x59(%r14)
leaq 0x5a(%r14), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x20530
movb %bpl, 0x25a(%r14)
leaq 0x260(%r14), %rdi
leaq 0x270(%r14), %rax
movq %rax, 0x260(%r14)
movsbl %bpl, %edx
movl $0x200, %esi # imm = 0x200
callq 0x20a30
movl %ebx, 0x280(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x7416e
movq %rbx, %rdi
callq 0x20b50
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, ecx
mov ebp, edx
mov r14, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [r14+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_811F2
mov r15b, [rcx]
loc_811F2:
mov [r14+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_81202
mov al, [rax]
jmp short loc_81204
loc_81202:
xor eax, eax
loc_81204:
lea r15, [r14+8]
mov [r14+59h], al
lea rdi, [r14+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [r14+25Ah], bpl
lea rdi, [r14+260h]
lea rax, [r14+270h]
mov [r14+260h], rax
movsx edx, bpl
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [r14+280h], ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
|
serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ECX
MOV EBP,EDX
MOV R14,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x00120100
MOV qword ptr [R14 + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001811f2
MOV R15B,byte ptr [RCX]
LAB_001811f2:
MOV byte ptr [R14 + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00181202
MOV AL,byte ptr [RAX]
JMP 0x00181204
LAB_00181202:
XOR EAX,EAX
LAB_00181204:
LEA R15,[R14 + 0x8]
MOV byte ptr [R14 + 0x59],AL
LEA RDI,[R14 + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x00120530
MOV byte ptr [R14 + 0x25a],BPL
LEA RDI,[R14 + 0x260]
LEA RAX,[R14 + 0x270]
MOV qword ptr [R14 + 0x260],RAX
LAB_00181238:
MOVSX EDX,BPL
MOV ESI,0x200
CALL 0x00120a30
LAB_00181246:
MOV dword ptr [R14 + 0x280],EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 *param_2,
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_3,int4 param_4)
{
int8 uVar1;
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
sVar2;
lconv *plVar3;
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep !=
(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) = this + 0x270;
/* try { // try from 00181238 to 00181245 has its CatchHandler @ 00181258 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
|
|
12,663
|
mysql_autocommit_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_autocommit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_autocommit,
(parms->mysql, parms->auto_mode),
parms->mysql,
my_bool,
r_my_bool)
}
|
O3
|
c
|
mysql_autocommit_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movsbl 0x8(%rdi), %esi
movq %rax, %rdi
callq 0x1c6f9
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_autocommit_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
movsx esi, byte ptr [rdi+8]
mov rdi, rax
call mysql_autocommit
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_autocommit_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8));
*(_BYTE *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
|
mysql_autocommit_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOVSX ESI,byte ptr [RDI + 0x8]
MOV RDI,RAX
CALL 0x0011c6f9
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_autocommit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
12,664
|
js_iterator_wrap_mark
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_iterator_wrap_mark(JSRuntime *rt, JSValue val,
JS_MarkFunc *mark_func)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSIteratorWrapData *it = p->u.iterator_wrap_data;
if (it) {
JS_MarkValue(rt, it->wrapped_iter, mark_func);
JS_MarkValue(rt, it->wrapped_next, mark_func);
}
}
|
O1
|
c
|
js_iterator_wrap_mark:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x3f1c3
movq %rcx, %rbx
movq %rdi, %r14
movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE
movsd (%r15), %xmm0
movl 0x8(%r15), %eax
movsd %xmm0, (%rsp)
andl $-0x2, %eax
cmpl %r12d, %eax
jne 0x3f1a3
movq (%rsp), %rsi
movq %r14, %rdi
callq *%rbx
movsd 0x10(%r15), %xmm0
movl 0x18(%r15), %eax
movsd %xmm0, (%rsp)
andl $-0x2, %eax
cmpl %r12d, %eax
jne 0x3f1c3
movq (%rsp), %rsi
movq %r14, %rdi
callq *%rbx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_iterator_wrap_mark:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rsi+30h]
test r15, r15
jz short loc_3F1C3
mov rbx, rcx
mov r14, rdi
mov r12d, 0FFFFFFFEh
movsd xmm0, qword ptr [r15]
mov eax, [r15+8]
movsd [rsp+28h+var_28], xmm0
and eax, 0FFFFFFFEh
cmp eax, r12d
jnz short loc_3F1A3
mov rsi, [rsp+28h+var_28]
mov rdi, r14
call rbx
loc_3F1A3:
movsd xmm0, qword ptr [r15+10h]
mov eax, [r15+18h]
movsd [rsp+28h+var_28], xmm0
and eax, 0FFFFFFFEh
cmp eax, r12d
jnz short loc_3F1C3
mov rsi, [rsp+28h+var_28]
mov rdi, r14
call rbx
loc_3F1C3:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long js_iterator_wrap_mark(long long a1, long long a2, long long a3, void ( *a4)(long long, _QWORD))
{
long long v4; // r15
long long result; // rax
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE )
a4(a1, *(_QWORD *)v4);
result = *(_DWORD *)(v4 + 24) & 0xFFFFFFFE;
if ( (_DWORD)result == -2 )
return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 16));
}
return result;
}
|
js_iterator_wrap_mark:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RSI + 0x30]
TEST R15,R15
JZ 0x0013f1c3
MOV RBX,RCX
MOV R14,RDI
MOV R12D,0xfffffffe
MOVSD XMM0,qword ptr [R15]
MOV EAX,dword ptr [R15 + 0x8]
MOVSD qword ptr [RSP],XMM0
AND EAX,0xfffffffe
CMP EAX,R12D
JNZ 0x0013f1a3
MOV RSI,qword ptr [RSP]
MOV RDI,R14
CALL RBX
LAB_0013f1a3:
MOVSD XMM0,qword ptr [R15 + 0x10]
MOV EAX,dword ptr [R15 + 0x18]
MOVSD qword ptr [RSP],XMM0
AND EAX,0xfffffffe
CMP EAX,R12D
JNZ 0x0013f1c3
MOV RSI,qword ptr [RSP]
MOV RDI,R14
CALL RBX
LAB_0013f1c3:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_iterator_wrap_mark(int8 param_1,long param_2,int8 param_3,code *param_4)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) {
(*param_4)(param_1,*puVar1);
}
if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) {
(*param_4)(param_1,puVar1[2]);
}
}
return;
}
|
|
12,665
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::~iteration_proxy_value()
|
monkey531[P]llama/common/json.hpp
|
~iteration_proxy_value() = default;
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::~iteration_proxy_value():
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0xac24e
movq (%rax), %rsi
incq %rsi
callq 0x1b8f0
movq 0x30(%rbx), %rdi
addq $0x40, %rbx
cmpq %rbx, %rdi
je 0xac267
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x1b8f0
popq %rbx
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+50h]; void *
lea rax, [rbx+60h]
cmp rdi, rax
jz short loc_AC24E
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC24E:
mov rdi, [rbx+30h]; void *
add rbx, 40h ; '@'
cmp rdi, rbx
jz short loc_AC267
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_AC267:
pop rbx
retn
|
void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(
_QWORD *a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // rdi
_QWORD *v4; // rbx
v2 = (_QWORD *)a1[10];
if ( v2 != a1 + 12 )
operator delete(v2, a1[12] + 1LL);
v3 = (_QWORD *)a1[6];
v4 = a1 + 8;
if ( v3 != v4 )
operator delete(v3, *v4 + 1LL);
}
|
~iteration_proxy_value:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x50]
LEA RAX,[RBX + 0x60]
CMP RDI,RAX
JZ 0x001ac24e
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b8f0
LAB_001ac24e:
MOV RDI,qword ptr [RBX + 0x30]
ADD RBX,0x40
CMP RDI,RBX
JZ 0x001ac267
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x0011b8f0
LAB_001ac267:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const> >::~iteration_proxy_value() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this)
{
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50) != this + 0x60) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50),*(long *)(this + 0x60) + 1);
}
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30) != this + 0x40) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30),*(long *)(this + 0x40) + 1);
return;
}
return;
}
|
|
12,666
|
js_string_codePointRange
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue js_string_codePointRange(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint32_t start, end, i, n;
StringBuffer b_s, *b = &b_s;
if (JS_ToUint32(ctx, &start, argv[0]) ||
JS_ToUint32(ctx, &end, argv[1]))
return JS_EXCEPTION;
end = min_uint32(end, 0x10ffff + 1);
if (start > end) {
start = end;
}
n = end - start;
if (end > 0x10000) {
n += end - max_uint32(start, 0x10000);
}
if (string_buffer_init2(ctx, b, n, end >= 0x100))
return JS_EXCEPTION;
for(i = start; i < end; i++) {
string_buffer_putc(b, i);
}
return string_buffer_end(b);
}
|
O2
|
c
|
js_string_codePointRange:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x4(%rsp), %rsi
callq 0x215d7
pushq $0x6
popq %rbx
testl %eax, %eax
jne 0x2c9fc
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
movq %rsp, %rsi
movq %r14, %rdi
callq 0x215d7
testl %eax, %eax
jne 0x2c9fc
movl (%rsp), %eax
movl $0x110000, %r15d # imm = 0x110000
cmpl %r15d, %eax
cmovbl %eax, %r15d
movl 0x4(%rsp), %ebp
cmpl %r15d, %ebp
cmovael %r15d, %ebp
movl %r15d, %edx
subl %ebp, %edx
cmpl $0x10001, %eax # imm = 0x10001
jb 0x2c9e1
cmpl $0x10001, %ebp # imm = 0x10001
movl $0x10000, %ecx # imm = 0x10000
cmovael %ebp, %ecx
movl %r15d, %esi
subl %ecx, %esi
addl %esi, %edx
xorl %ecx, %ecx
cmpl $0x100, %eax # imm = 0x100
setae %cl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2ca47
testl %eax, %eax
je 0x2ca11
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rbx
cmpl %r15d, %ebp
jae 0x2ca29
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2ca82
incl %ebp
jmp 0x2ca16
leaq 0x8(%rsp), %rdi
callq 0x2cad4
movq %rdx, %rbx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
jmp 0x2ca00
|
js_string_codePointRange:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r15, r8
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+48h+var_44]
call JS_ToInt32
push 6
pop rbx
test eax, eax
jnz short loc_2C9FC
mov rdx, [r15+10h]
mov rcx, [r15+18h]
mov rsi, rsp
mov rdi, r14
call JS_ToInt32
test eax, eax
jnz short loc_2C9FC
mov eax, [rsp+48h+var_48]
mov r15d, 110000h
cmp eax, r15d
cmovb r15d, eax
mov ebp, [rsp+48h+var_44]
cmp ebp, r15d
cmovnb ebp, r15d
mov edx, r15d
sub edx, ebp
cmp eax, 10001h
jb short loc_2C9E1
cmp ebp, 10001h
mov ecx, 10000h
cmovnb ecx, ebp
mov esi, r15d
sub esi, ecx
add edx, esi
loc_2C9E1:
xor ecx, ecx
cmp eax, 100h
setnb cl
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call string_buffer_init2
test eax, eax
jz short loc_2CA11
loc_2C9FC:
xor eax, eax
xor ecx, ecx
loc_2CA00:
or rax, rcx
mov rdx, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2CA11:
lea rbx, [rsp+48h+var_40]
loc_2CA16:
cmp ebp, r15d
jnb short loc_2CA29
mov rdi, rbx
mov esi, ebp
call string_buffer_putc
inc ebp
jmp short loc_2CA16
loc_2CA29:
lea rdi, [rsp+48h+var_40]
call string_buffer_end
mov rbx, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov eax, eax
jmp short loc_2CA00
|
unsigned long long js_string_codePointRange(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v6; // r15d
unsigned int v7; // ebp
long long v8; // rdx
int v9; // ecx
long long v10; // rax
unsigned long long v11; // rcx
unsigned int v13; // [rsp+0h] [rbp-48h] BYREF
unsigned int v14; // [rsp+4h] [rbp-44h] BYREF
_BYTE v15[64]; // [rsp+8h] [rbp-40h] BYREF
if ( (unsigned int)JS_ToInt32(a1, (long long)&v14, *(_DWORD **)a5, *(_QWORD *)(a5 + 8))
|| (unsigned int)JS_ToInt32(a1, (long long)&v13, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24)) )
{
goto LABEL_12;
}
v6 = 1114112;
if ( v13 < 0x110000 )
v6 = v13;
v7 = v14;
if ( v14 >= v6 )
v7 = v6;
v8 = v6 - v7;
if ( v13 >= 0x10001 )
{
v9 = 0x10000;
if ( v7 >= 0x10001 )
v9 = v7;
v8 = v6 - v9 + (unsigned int)v8;
}
if ( (unsigned int)string_buffer_init2(a1, v15, v8, v13 >= 0x100) )
{
LABEL_12:
v10 = 0LL;
v11 = 0LL;
}
else
{
while ( v7 < v6 )
string_buffer_putc(v15, v7++);
v10 = string_buffer_end(v15);
v11 = v10 & 0xFFFFFFFF00000000LL;
v10 = (unsigned int)v10;
}
return v11 | v10;
}
|
js_string_codePointRange:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R15,R8
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x4]
CALL 0x001215d7
PUSH 0x6
POP RBX
TEST EAX,EAX
JNZ 0x0012c9fc
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
MOV RSI,RSP
MOV RDI,R14
CALL 0x001215d7
TEST EAX,EAX
JNZ 0x0012c9fc
MOV EAX,dword ptr [RSP]
MOV R15D,0x110000
CMP EAX,R15D
CMOVC R15D,EAX
MOV EBP,dword ptr [RSP + 0x4]
CMP EBP,R15D
CMOVNC EBP,R15D
MOV EDX,R15D
SUB EDX,EBP
CMP EAX,0x10001
JC 0x0012c9e1
CMP EBP,0x10001
MOV ECX,0x10000
CMOVNC ECX,EBP
MOV ESI,R15D
SUB ESI,ECX
ADD EDX,ESI
LAB_0012c9e1:
XOR ECX,ECX
CMP EAX,0x100
SETNC CL
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0012ca47
TEST EAX,EAX
JZ 0x0012ca11
LAB_0012c9fc:
XOR EAX,EAX
XOR ECX,ECX
LAB_0012ca00:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012ca11:
LEA RBX,[RSP + 0x8]
LAB_0012ca16:
CMP EBP,R15D
JNC 0x0012ca29
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0012ca82
INC EBP
JMP 0x0012ca16
LAB_0012ca29:
LEA RDI,[RSP + 0x8]
CALL 0x0012cad4
MOV RBX,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV EAX,EAX
JMP 0x0012ca00
|
int1 [16] js_string_codePointRange(int8 param_1)
{
int iVar1;
ulong uVar2;
uint uVar3;
ulong uVar4;
int8 uVar5;
uint uVar6;
int8 *in_R8;
uint uVar7;
int1 auVar8 [16];
uint local_48;
uint local_44;
int1 local_40 [32];
iVar1 = JS_ToInt32(param_1,&local_44,*in_R8,in_R8[1]);
uVar5 = 6;
if (iVar1 == 0) {
iVar1 = JS_ToInt32(param_1,&local_48,in_R8[2],in_R8[3]);
if (iVar1 == 0) {
uVar7 = 0x110000;
if (local_48 < 0x110000) {
uVar7 = local_48;
}
uVar6 = local_44;
if (uVar7 <= local_44) {
uVar6 = uVar7;
}
iVar1 = uVar7 - uVar6;
if (0x10000 < local_48) {
uVar3 = 0x10000;
if (0x10000 < uVar6) {
uVar3 = uVar6;
}
iVar1 = iVar1 + (uVar7 - uVar3);
}
iVar1 = string_buffer_init2(param_1,local_40,iVar1,0xff < local_48);
if (iVar1 == 0) {
for (; uVar6 < uVar7; uVar6 = uVar6 + 1) {
string_buffer_putc(local_40,uVar6);
}
auVar8 = string_buffer_end(local_40);
uVar5 = auVar8._8_8_;
uVar4 = auVar8._0_8_ & 0xffffffff00000000;
uVar2 = auVar8._0_8_ & 0xffffffff;
goto LAB_0012ca00;
}
}
}
uVar2 = 0;
uVar4 = 0;
LAB_0012ca00:
auVar8._0_8_ = uVar2 | uVar4;
auVar8._8_8_ = uVar5;
return auVar8;
}
|
|
12,667
|
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
|
monkey531[P]llama/common/minja.hpp
|
ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
|
O2
|
cpp
|
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
callq 0x72dec
leaq 0x89c1a(%rip), %rax # 0xfd090
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x39b4a
andq $0x0, 0x40(%rbx)
movups (%r12), %xmm0
andq $0x0, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
andq $0x0, (%r12)
movq 0x38(%rsp), %rax
andq $0x0, 0x50(%rbx)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
andq $0x0, (%r15)
movb 0x30(%rsp), %cl
andq $0x0, 0x60(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
andq $0x0, (%r14)
movb %cl, 0x68(%rbx)
andq $0x0, 0x78(%rbx)
movups (%rax), %xmm0
andq $0x0, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
andq $0x0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x77a66
movq %r14, %rdi
callq 0x23fd0
|
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push r15
push r14
push r13
push r12
push rbx
mov r14, r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
and qword ptr [rbx+40h], 0
movups xmm0, xmmword ptr [r12]
and qword ptr [r12+8], 0
movups xmmword ptr [rbx+38h], xmm0
and qword ptr [r12], 0
mov rax, [rsp+28h+arg_8]
and qword ptr [rbx+50h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [rbx+48h], xmm0
and qword ptr [r15], 0
mov cl, [rsp+28h+arg_0]
and qword ptr [rbx+60h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+58h], xmm0
and qword ptr [r14], 0
mov [rbx+68h], cl
and qword ptr [rbx+78h], 0
movups xmm0, xmmword ptr [rax]
and qword ptr [rax+8], 0
movups xmmword ptr [rbx+70h], xmm0
and qword ptr [rax], 0
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
|
long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
__int128 v12; // xmm0
long long result; // rax
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector((_QWORD *)(a1 + 32), a3);
*(_QWORD *)(a1 + 64) = 0LL;
v12 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v12;
*(_QWORD *)a4 = 0LL;
result = (long long)a8;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
|
ForNode:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
CALL 0x00172dec
LEA RAX,[0x1fd090]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_00173481:
MOV RSI,R13
CALL 0x00139b4a
LAB_00173489:
AND qword ptr [RBX + 0x40],0x0
MOVUPS XMM0,xmmword ptr [R12]
AND qword ptr [R12 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
AND qword ptr [R12],0x0
MOV RAX,qword ptr [RSP + 0x38]
AND qword ptr [RBX + 0x50],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
AND qword ptr [R15],0x0
MOV CL,byte ptr [RSP + 0x30]
AND qword ptr [RBX + 0x60],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
AND qword ptr [R14],0x0
MOV byte ptr [RBX + 0x68],CL
AND qword ptr [RBX + 0x78],0x0
MOVUPS XMM0,xmmword ptr [RAX]
AND qword ptr [RAX + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x70],XMM0
AND qword ptr [RAX],0x0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001fd0a0;
/* try { // try from 00173481 to 00173488 has its CatchHandler @ 001734f9 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar1;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar1;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar1 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar1;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar1 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar1;
*(int8 *)param_7 = 0;
return;
}
|
|
12,668
|
list_builtin_chat_templates[abi:cxx11]()
|
monkey531[P]llama/common/arg.cpp
|
static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
}
|
O2
|
cpp
|
list_builtin_chat_templates[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x231f0
movslq %eax, %rsi
movq %rsp, %rdi
callq 0x53672
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
callq 0x231f0
leaq 0x20(%rsp), %rdi
callq 0x23bb0
movq (%rsp), %r15
movq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r14
leaq 0x79976(%rip), %r13 # 0xaf93f
leaq 0x7d4f3(%rip), %rbp # 0xb34c3
cmpq %r12, %r15
je 0x36001
movq (%r15), %rsi
movq %r14, %rdi
callq 0x238b0
movq 0x8(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %r15
movq %rbp, %rsi
cmoveq %r13, %rsi
movq %rax, %rdi
callq 0x238b0
addq $0x8, %r15
jmp 0x35fd0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x23dd0
leaq 0x20(%rsp), %rdi
callq 0x231e0
movq %rsp, %rdi
callq 0x3d682
movq %rbx, %rax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3603e
jmp 0x36039
movq %rax, %rbx
jmp 0x3604b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x231e0
movq %rsp, %rdi
callq 0x3d682
movq %rbx, %rdi
callq 0x23fb0
nop
|
_ZL27list_builtin_chat_templatesB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 198h
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+1C8h+var_1C8], xmm0
and [rsp+1C8h+var_1B8], 0
xor edi, edi
xor esi, esi
call _llama_chat_builtin_templates
movsxd rsi, eax
mov rdi, rsp
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
mov rdi, qword ptr [rsp+1C8h+var_1C8]
mov rsi, qword ptr [rsp+1C8h+var_1C8+8]
sub rsi, rdi
sar rsi, 3
call _llama_chat_builtin_templates
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r15, qword ptr [rsp+1C8h+var_1C8]
mov r12, qword ptr [rsp+1C8h+var_1C8+8]
lea r14, [rsp+1C8h+var_1A8]
lea r13, aErrorWhileHand_0+34h; ""
lea rbp, aZuD+6; ", "
loc_35FD0:
cmp r15, r12
jz short loc_36001
mov rsi, [r15]
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, qword ptr [rsp+1C8h+var_1C8+8]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp r15, rcx
mov rsi, rbp
cmovz rsi, r13
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add r15, 8
jmp short loc_35FD0
loc_36001:
lea rsi, [rsp+1C8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, rsp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rax, rbx
add rsp, 198h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_3603E
jmp short $+2
loc_36039:
mov rbx, rax
jmp short loc_3604B
loc_3603E:
mov rbx, rax
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_3604B:
mov rdi, rsp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
|
long long list_builtin_chat_templates[abi:cxx11](long long a1)
{
int v1; // eax
_QWORD *v2; // r12
_QWORD *i; // r15
long long v4; // rax
char *v5; // rsi
__int128 v7; // [rsp+0h] [rbp-1C8h] BYREF
long long v8; // [rsp+10h] [rbp-1B8h]
_BYTE v9[8]; // [rsp+20h] [rbp-1A8h] BYREF
_BYTE v10[416]; // [rsp+28h] [rbp-1A0h] BYREF
v7 = 0LL;
v8 = 0LL;
v1 = llama_chat_builtin_templates(0LL, 0LL);
std::vector<char const*>::resize(&v7, v1);
llama_chat_builtin_templates(v7, (long long)(*((_QWORD *)&v7 + 1) - v7) >> 3);
std::ostringstream::basic_ostringstream(v9);
v2 = (_QWORD *)*((_QWORD *)&v7 + 1);
for ( i = (_QWORD *)v7; i != v2; ++i )
{
v4 = std::operator<<<std::char_traits<char>>(v9, *i);
v5 = ", ";
if ( i == (_QWORD *)(*((_QWORD *)&v7 + 1) - 8LL) )
v5 = "";
std::operator<<<std::char_traits<char>>(v4, v5);
}
std::stringbuf::str(a1, v10);
std::ostringstream::~ostringstream(v9);
std::_Vector_base<char const*>::~_Vector_base(&v7);
return a1;
}
|
list_builtin_chat_templates[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
LAB_00135f81:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x001231f0
MOVSXD RSI,EAX
MOV RDI,RSP
CALL 0x00153672
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
SUB RSI,RDI
SAR RSI,0x3
CALL 0x001231f0
LAB_00135faa:
LEA RDI,[RSP + 0x20]
CALL 0x00123bb0
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x20]
LEA R13,[0x1af93f]
LEA RBP,[0x1b34c3]
LAB_00135fd0:
CMP R15,R12
JZ 0x00136001
MOV RSI,qword ptr [R15]
LAB_00135fd8:
MOV RDI,R14
CALL 0x001238b0
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,-0x8
CMP R15,RCX
MOV RSI,RBP
CMOVZ RSI,R13
MOV RDI,RAX
CALL 0x001238b0
ADD R15,0x8
JMP 0x00135fd0
LAB_00136001:
LEA RSI,[RSP + 0x28]
LAB_00136006:
MOV RDI,RBX
CALL 0x00123dd0
LAB_0013600e:
LEA RDI,[RSP + 0x20]
CALL 0x001231e0
MOV RDI,RSP
CALL 0x0013d682
MOV RAX,RBX
ADD RSP,0x198
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
void list_builtin_chat_templates_abi_cxx11_(void)
{
int8 *puVar1;
int iVar2;
ostream *poVar3;
char *pcVar4;
int8 *puVar5;
int8 *local_1c8;
int8 *puStack_1c0;
int8 local_1b8;
ostringstream local_1a8 [376];
local_1c8 = (int8 *)0x0;
puStack_1c0 = (int8 *)0x0;
local_1b8 = 0;
/* try { // try from 00135f81 to 00135fa9 has its CatchHandler @ 00136039 */
iVar2 = llama_chat_builtin_templates(0,0);
std::vector<char_const*,std::allocator<char_const*>>::resize
((vector<char_const*,std::allocator<char_const*>> *)&local_1c8,(long)iVar2);
llama_chat_builtin_templates(local_1c8,(long)puStack_1c0 - (long)local_1c8 >> 3);
/* try { // try from 00135faa to 00135fb3 has its CatchHandler @ 00136037 */
std::__cxx11::ostringstream::ostringstream(local_1a8);
puVar1 = puStack_1c0;
for (puVar5 = local_1c8; puVar5 != puVar1; puVar5 = puVar5 + 1) {
/* try { // try from 00135fd8 to 00135ffa has its CatchHandler @ 0013603e */
poVar3 = std::operator<<((ostream *)local_1a8,(char *)*puVar5);
pcVar4 = ", ";
if (puVar5 == puStack_1c0 + -1) {
pcVar4 = "";
}
std::operator<<(poVar3,pcVar4);
}
/* try { // try from 00136006 to 0013600d has its CatchHandler @ 00136035 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::_Vector_base<char_const*,std::allocator<char_const*>>::~_Vector_base
((_Vector_base<char_const*,std::allocator<char_const*>> *)&local_1c8);
return;
}
|
|
12,669
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::~lexer()
|
monkey531[P]llama/common/./json.hpp
|
~lexer() = default;
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::~lexer():
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0x28a3e
movq (%rax), %rsi
incq %rsi
callq 0x196b0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x28a54
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
jmp 0x196b0
popq %rbx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+50h]; void *
lea rax, [rbx+60h]
cmp rdi, rax
jz short loc_28A3E
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_28A3E:
mov rdi, [rbx+38h]; void *
test rdi, rdi
jz short loc_28A54
mov rsi, [rbx+48h]
sub rsi, rdi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_28A54:
pop rbx
retn
|
void nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(
_QWORD *a1)
{
_QWORD *v2; // rdi
void *v3; // rdi
v2 = (_QWORD *)a1[10];
if ( v2 != a1 + 12 )
operator delete(v2, a1[12] + 1LL);
v3 = (void *)a1[7];
if ( v3 )
operator delete(v3, a1[9] - (_QWORD)v3);
}
|
~lexer:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x50]
LEA RAX,[RBX + 0x60]
CMP RDI,RAX
JZ 0x00128a3e
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001196b0
LAB_00128a3e:
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JZ 0x00128a54
MOV RSI,qword ptr [RBX + 0x48]
SUB RSI,RDI
POP RBX
JMP 0x001196b0
LAB_00128a54:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::~lexer() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::~lexer(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
void *pvVar1;
if (*(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x50) != this + 0x60) {
operator_delete(*(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x50),*(long *)(this + 0x60) + 1);
}
pvVar1 = *(void **)(this + 0x38);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x48) - (long)pvVar1);
return;
}
return;
}
|
|
12,670
|
parent_SK_to_lamport_PK
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/keygen.c
|
static void parent_SK_to_lamport_PK(pow256 PK, const pow256 parent_SK,
unsigned int index)
{
size_t i;
struct {
HMAC_SHA256_CTX ctx;
SHA256_CTX ret;
unsigned char PRK[32], IKM[32];
unsigned char lamport[255][32];
} scratch;
/* salt = I2OSP(index, 4) */
unsigned char salt[4] = { (unsigned char)(index>>24),
(unsigned char)(index>>16),
(unsigned char)(index>>8),
(unsigned char)(index) };
/* IKM = I2OSP(parent_SK, 32) */
for (i = 0; i < 32; i++)
scratch.IKM[i] = parent_SK[31-i];
/* lamport_0 = IKM_to_lamport_SK(IKM, salt) */
HKDF_Extract(scratch.PRK, salt, sizeof(salt), scratch.IKM, 32, 0,
&scratch.ctx);
HKDF_Expand(scratch.lamport[0], sizeof(scratch.lamport),
scratch.PRK, NULL, 0, 0, &scratch.ctx);
vec_zero(scratch.ctx.ctx.buf, sizeof(scratch.ctx.ctx.buf));
scratch.ctx.ctx.buf[32] = 0x80;
scratch.ctx.ctx.buf[62] = 1; /* 32*8 in big endian */
scratch.ctx.ctx.buf[63] = 0;
for (i = 0; i < 255; i++) {
/* lamport_PK = lamport_PK | SHA256(lamport_0[i]) */
sha256_init_h(scratch.ctx.ctx.h);
sha256_bcopy(scratch.ctx.ctx.buf, scratch.lamport[i], 32);
sha256_block_data_order(scratch.ctx.ctx.h, scratch.ctx.ctx.buf, 1);
sha256_emit(scratch.lamport[i], scratch.ctx.ctx.h);
}
/* compressed_lamport_PK = SHA256(lamport_PK) */
sha256_init(&scratch.ret);
sha256_update(&scratch.ret, scratch.lamport, sizeof(scratch.lamport));
/* not_IKM = flip_bits(IKM) */
for (i = 0; i< 32; i++)
scratch.IKM[i] = ~scratch.IKM[i];
/* lamport_1 = IKM_to_lamport_SK(not_IKM, salt) */
HKDF_Extract(scratch.PRK, salt, sizeof(salt), scratch.IKM, 32, 0,
&scratch.ctx);
HKDF_Expand(scratch.lamport[0], sizeof(scratch.lamport),
scratch.PRK, NULL, 0, 0, &scratch.ctx);
vec_zero(scratch.ctx.ctx.buf, sizeof(scratch.ctx.ctx.buf));
scratch.ctx.ctx.buf[32] = 0x80;
scratch.ctx.ctx.buf[62] = 1;
for (i = 0; i < 255; i++) {
/* lamport_PK = lamport_PK | SHA256(lamport_1[i]) */
sha256_init_h(scratch.ctx.ctx.h);
sha256_bcopy(scratch.ctx.ctx.buf, scratch.lamport[i], 32);
sha256_block_data_order(scratch.ctx.ctx.h, scratch.ctx.ctx.buf, 1);
sha256_emit(scratch.lamport[i], scratch.ctx.ctx.h);
}
/* compressed_lamport_PK = SHA256(lamport_PK) */
sha256_update(&scratch.ret, scratch.lamport, sizeof(scratch.lamport));
sha256_final(PK, &scratch.ret);
/*
* scrub the stack just in case next callee inadvertently flashes
* a fragment across application boundary...
*/
vec_zero(&scratch, sizeof(scratch));
}
|
O0
|
c
|
parent_SK_to_lamport_PK:
pushq %rbp
movq %rsp, %rbp
subq $0x21b0, %rsp # imm = 0x21B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0x18, %eax
movb %al, -0x21a4(%rbp)
movl -0x14(%rbp), %eax
shrl $0x10, %eax
movb %al, -0x21a3(%rbp)
movl -0x14(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x21a2(%rbp)
movl -0x14(%rbp), %eax
movb %al, -0x21a1(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jae 0x22aeb
movq -0x10(%rbp), %rax
movl $0x1f, %ecx
subq -0x20(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, -0x2020(%rbp,%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22abb
leaq -0x21a0(%rbp), %rdi
addq $0x160, %rdi # imm = 0x160
leaq -0x21a4(%rbp), %rsi
leaq -0x21a0(%rbp), %rcx
addq $0x180, %rcx # imm = 0x180
leaq -0x21a0(%rbp), %rax
movl $0x4, %edx
movl $0x20, %r8d
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x32820
leaq -0x21a0(%rbp), %rdi
addq $0x1a0, %rdi # imm = 0x1A0
leaq -0x21a0(%rbp), %rdx
addq $0x160, %rdx # imm = 0x160
leaq -0x21a0(%rbp), %rax
movl $0x1fe0, %esi # imm = 0x1FE0
xorl %ecx, %ecx
movl %ecx, %r8d
xorl %r9d, %r9d
movq %r8, %rcx
movq %rax, (%rsp)
callq 0x328d0
leaq -0x21a0(%rbp), %rdi
addq $0x28, %rdi
movl $0x40, %esi
callq 0x23310
movb $-0x80, -0x2158(%rbp)
movb $0x1, -0x213a(%rbp)
movb $0x0, -0x2139(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0xff, -0x20(%rbp)
jae 0x22c34
leaq -0x21a0(%rbp), %rdi
callq 0x32d00
leaq -0x21a0(%rbp), %rdi
addq $0x28, %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x1a0, %rsi # imm = 0x1A0
movq -0x20(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movl $0x20, %edx
callq 0x3e3b0
leaq -0x21a0(%rbp), %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x28, %rsi
movl $0x1, %edx
callq 0x3c000
leaq -0x21a0(%rbp), %rdi
addq $0x1a0, %rdi # imm = 0x1A0
movq -0x20(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x21a0(%rbp), %rsi
callq 0x3e360
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22b9a
leaq -0x21a0(%rbp), %rdi
addq $0xf0, %rdi
callq 0x31c90
leaq -0x21a0(%rbp), %rdi
addq $0xf0, %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x1a0, %rsi # imm = 0x1A0
movl $0x1fe0, %edx # imm = 0x1FE0
callq 0x31ce0
movq $0x0, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jae 0x22ca6
movq -0x20(%rbp), %rax
movzbl -0x2020(%rbp,%rax), %eax
xorl $-0x1, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x2020(%rbp,%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22c75
leaq -0x21a0(%rbp), %rdi
addq $0x160, %rdi # imm = 0x160
leaq -0x21a4(%rbp), %rsi
leaq -0x21a0(%rbp), %rcx
addq $0x180, %rcx # imm = 0x180
leaq -0x21a0(%rbp), %rax
movl $0x4, %edx
movl $0x20, %r8d
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x32820
leaq -0x21a0(%rbp), %rdi
addq $0x1a0, %rdi # imm = 0x1A0
leaq -0x21a0(%rbp), %rdx
addq $0x160, %rdx # imm = 0x160
leaq -0x21a0(%rbp), %rax
movl $0x1fe0, %esi # imm = 0x1FE0
xorl %ecx, %ecx
movl %ecx, %r8d
xorl %r9d, %r9d
movq %r8, %rcx
movq %rax, (%rsp)
callq 0x328d0
leaq -0x21a0(%rbp), %rdi
addq $0x28, %rdi
movl $0x40, %esi
callq 0x23310
movb $-0x80, -0x2158(%rbp)
movb $0x1, -0x213a(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0xff, -0x20(%rbp)
jae 0x22de8
leaq -0x21a0(%rbp), %rdi
callq 0x32d00
leaq -0x21a0(%rbp), %rdi
addq $0x28, %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x1a0, %rsi # imm = 0x1A0
movq -0x20(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movl $0x20, %edx
callq 0x3e3b0
leaq -0x21a0(%rbp), %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x28, %rsi
movl $0x1, %edx
callq 0x3c000
leaq -0x21a0(%rbp), %rdi
addq $0x1a0, %rdi # imm = 0x1A0
movq -0x20(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x21a0(%rbp), %rsi
callq 0x3e360
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x22d4e
leaq -0x21a0(%rbp), %rdi
addq $0xf0, %rdi
leaq -0x21a0(%rbp), %rsi
addq $0x1a0, %rsi # imm = 0x1A0
movl $0x1fe0, %edx # imm = 0x1FE0
callq 0x31ce0
movq -0x8(%rbp), %rdi
leaq -0x21a0(%rbp), %rsi
addq $0xf0, %rsi
callq 0x31e70
leaq -0x21a0(%rbp), %rdi
movl $0x2180, %esi # imm = 0x2180
callq 0x23310
addq $0x21b0, %rsp # imm = 0x21B0
popq %rbp
retq
nop
|
parent_SK_to_lamport_PK:
push rbp
mov rbp, rsp
sub rsp, 21B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
shr eax, 18h
mov [rbp+var_21A4], al
mov eax, [rbp+var_14]
shr eax, 10h
mov [rbp+var_21A3], al
mov eax, [rbp+var_14]
shr eax, 8
mov [rbp+var_21A2], al
mov eax, [rbp+var_14]
mov [rbp+var_21A1], al
mov [rbp+var_20], 0
loc_22ABB:
cmp [rbp+var_20], 20h ; ' '
jnb short loc_22AEB
mov rax, [rbp+var_10]
mov ecx, 1Fh
sub rcx, [rbp+var_20]
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov [rbp+rax+var_2020], cl
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_22ABB
loc_22AEB:
lea rdi, [rbp+var_21A0]
add rdi, 160h
lea rsi, [rbp+var_21A4]
lea rcx, [rbp+var_21A0]
add rcx, 180h
lea rax, [rbp+var_21A0]
mov edx, 4
mov r8d, 20h ; ' '
xor r9d, r9d
mov [rsp+21B0h+var_21B0], rax
call HKDF_Extract
lea rdi, [rbp+var_21A0]
add rdi, 1A0h
lea rdx, [rbp+var_21A0]
add rdx, 160h
lea rax, [rbp+var_21A0]
mov esi, 1FE0h
xor ecx, ecx
mov r8d, ecx
xor r9d, r9d
mov rcx, r8
mov [rsp+21B0h+var_21B0], rax
call HKDF_Expand
lea rdi, [rbp+var_21A0]
add rdi, 28h ; '('
mov esi, 40h ; '@'
call vec_zero
mov [rbp+var_2158], 80h
mov [rbp+var_213A], 1
mov [rbp+var_2139], 0
mov [rbp+var_20], 0
loc_22B9A:
cmp [rbp+var_20], 0FFh
jnb loc_22C34
lea rdi, [rbp+var_21A0]
call sha256_init_h
lea rdi, [rbp+var_21A0]
add rdi, 28h ; '('
lea rsi, [rbp+var_21A0]
add rsi, 1A0h
mov rax, [rbp+var_20]
shl rax, 5
add rsi, rax
mov edx, 20h ; ' '
call blst_sha256_bcopy
lea rdi, [rbp+var_21A0]
lea rsi, [rbp+var_21A0]
add rsi, 28h ; '('
mov edx, 1
call blst_sha256_block_data_order
lea rdi, [rbp+var_21A0]
add rdi, 1A0h
mov rax, [rbp+var_20]
shl rax, 5
add rdi, rax
lea rsi, [rbp+var_21A0]
call blst_sha256_emit
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_22B9A
loc_22C34:
lea rdi, [rbp+var_21A0]
add rdi, 0F0h
call sha256_init
lea rdi, [rbp+var_21A0]
add rdi, 0F0h
lea rsi, [rbp+var_21A0]
add rsi, 1A0h
mov edx, 1FE0h
call sha256_update
mov [rbp+var_20], 0
loc_22C75:
cmp [rbp+var_20], 20h ; ' '
jnb short loc_22CA6
mov rax, [rbp+var_20]
movzx eax, [rbp+rax+var_2020]
xor eax, 0FFFFFFFFh
mov cl, al
mov rax, [rbp+var_20]
mov [rbp+rax+var_2020], cl
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_22C75
loc_22CA6:
lea rdi, [rbp+var_21A0]
add rdi, 160h
lea rsi, [rbp+var_21A4]
lea rcx, [rbp+var_21A0]
add rcx, 180h
lea rax, [rbp+var_21A0]
mov edx, 4
mov r8d, 20h ; ' '
xor r9d, r9d
mov [rsp+21B0h+var_21B0], rax
call HKDF_Extract
lea rdi, [rbp+var_21A0]
add rdi, 1A0h
lea rdx, [rbp+var_21A0]
add rdx, 160h
lea rax, [rbp+var_21A0]
mov esi, 1FE0h
xor ecx, ecx
mov r8d, ecx
xor r9d, r9d
mov rcx, r8
mov [rsp+21B0h+var_21B0], rax
call HKDF_Expand
lea rdi, [rbp+var_21A0]
add rdi, 28h ; '('
mov esi, 40h ; '@'
call vec_zero
mov [rbp+var_2158], 80h
mov [rbp+var_213A], 1
mov [rbp+var_20], 0
loc_22D4E:
cmp [rbp+var_20], 0FFh
jnb loc_22DE8
lea rdi, [rbp+var_21A0]
call sha256_init_h
lea rdi, [rbp+var_21A0]
add rdi, 28h ; '('
lea rsi, [rbp+var_21A0]
add rsi, 1A0h
mov rax, [rbp+var_20]
shl rax, 5
add rsi, rax
mov edx, 20h ; ' '
call blst_sha256_bcopy
lea rdi, [rbp+var_21A0]
lea rsi, [rbp+var_21A0]
add rsi, 28h ; '('
mov edx, 1
call blst_sha256_block_data_order
lea rdi, [rbp+var_21A0]
add rdi, 1A0h
mov rax, [rbp+var_20]
shl rax, 5
add rdi, rax
lea rsi, [rbp+var_21A0]
call blst_sha256_emit
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_22D4E
loc_22DE8:
lea rdi, [rbp+var_21A0]
add rdi, 0F0h
lea rsi, [rbp+var_21A0]
add rsi, 1A0h
mov edx, 1FE0h
call sha256_update
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_21A0]
add rsi, 0F0h
call sha256_final
lea rdi, [rbp+var_21A0]
mov esi, 2180h
call vec_zero
add rsp, 21B0h
pop rbp
retn
|
long long parent_SK_to_lamport_PK(long long a1, long long a2, int a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v10; // [rsp+0h] [rbp-21B0h]
long long v11; // [rsp+0h] [rbp-21B0h]
long long v12; // [rsp+8h] [rbp-21A8h] BYREF
long long v13; // [rsp+10h] [rbp-21A0h] BYREF
long long v14; // [rsp+18h] [rbp-2198h]
long long v15; // [rsp+20h] [rbp-2190h]
long long v16; // [rsp+28h] [rbp-2188h]
long long v17; // [rsp+30h] [rbp-2180h]
long long v18; // [rsp+38h] [rbp-2178h] BYREF
long long v19; // [rsp+40h] [rbp-2170h]
long long v20; // [rsp+48h] [rbp-2168h]
long long v21; // [rsp+50h] [rbp-2160h]
long long v22; // [rsp+58h] [rbp-2158h]
long long v23; // [rsp+60h] [rbp-2150h]
long long v24; // [rsp+68h] [rbp-2148h]
char v25; // [rsp+76h] [rbp-213Ah]
char v26; // [rsp+77h] [rbp-2139h]
_BYTE v27[112]; // [rsp+100h] [rbp-20B0h] BYREF
_BYTE v28[32]; // [rsp+170h] [rbp-2040h] BYREF
_BYTE v29[32]; // [rsp+190h] [rbp-2020h] BYREF
_OWORD v30[510]; // [rsp+1B0h] [rbp-2000h] BYREF
unsigned long long i; // [rsp+2190h] [rbp-20h]
int v32; // [rsp+219Ch] [rbp-14h]
long long v33; // [rsp+21A0h] [rbp-10h]
long long v34; // [rsp+21A8h] [rbp-8h]
v34 = a1;
v33 = a2;
v32 = a3;
BYTE4(v12) = HIBYTE(a3);
BYTE5(v12) = BYTE2(a3);
BYTE6(v12) = BYTE1(a3);
HIBYTE(v12) = a3;
for ( i = 0LL; i < 0x20; ++i )
v29[i] = *(_BYTE *)(v33 + 31 - i);
HKDF_Extract((unsigned int)v28, (unsigned int)&v12 + 4, 4, (unsigned int)v29, 32, 0, (long long)&v13);
HKDF_Expand((unsigned int)v30, 8160, (unsigned int)v28, 0, 0, 0, (long long)&v13);
vec_zero(&v18, 64LL);
LOBYTE(v22) = 0x80;
v25 = 1;
v26 = 0;
for ( i = 0LL; i < 0xFF; ++i )
{
sha256_init_h(&v13);
blst_sha256_bcopy(&v18, &v30[2 * i], 32LL);
blst_sha256_block_data_order(
(unsigned int)&v13,
(unsigned int)&v18,
1,
v3,
v4,
v5,
v10,
v12,
v13,
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21,
v22,
v23,
v24);
blst_sha256_emit(&v30[2 * i], &v13);
}
sha256_init(v27);
sha256_update(v27, v30, 8160LL);
for ( i = 0LL; i < 0x20; ++i )
v29[i] = ~v29[i];
HKDF_Extract((unsigned int)v28, (unsigned int)&v12 + 4, 4, (unsigned int)v29, 32, 0, (long long)&v13);
HKDF_Expand((unsigned int)v30, 8160, (unsigned int)v28, 0, 0, 0, (long long)&v13);
vec_zero(&v18, 64LL);
LOBYTE(v22) = 0x80;
v25 = 1;
for ( i = 0LL; i < 0xFF; ++i )
{
sha256_init_h(&v13);
blst_sha256_bcopy(&v18, &v30[2 * i], 32LL);
blst_sha256_block_data_order(
(unsigned int)&v13,
(unsigned int)&v18,
1,
v6,
v7,
v8,
v11,
v12,
v13,
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21,
v22,
v23,
v24);
blst_sha256_emit(&v30[2 * i], &v13);
}
sha256_update(v27, v30, 8160LL);
sha256_final(v34, v27);
return vec_zero(&v13, 8576LL);
}
|
parent_SK_to_lamport_PK:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x21b0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
SHR EAX,0x18
MOV byte ptr [RBP + -0x21a4],AL
MOV EAX,dword ptr [RBP + -0x14]
SHR EAX,0x10
MOV byte ptr [RBP + -0x21a3],AL
MOV EAX,dword ptr [RBP + -0x14]
SHR EAX,0x8
MOV byte ptr [RBP + -0x21a2],AL
MOV EAX,dword ptr [RBP + -0x14]
MOV byte ptr [RBP + -0x21a1],AL
MOV qword ptr [RBP + -0x20],0x0
LAB_00122abb:
CMP qword ptr [RBP + -0x20],0x20
JNC 0x00122aeb
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x1f
SUB RCX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + RAX*0x1 + -0x2020],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00122abb
LAB_00122aeb:
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x160
LEA RSI,[RBP + -0x21a4]
LEA RCX,[RBP + -0x21a0]
ADD RCX,0x180
LEA RAX,[RBP + -0x21a0]
MOV EDX,0x4
MOV R8D,0x20
XOR R9D,R9D
MOV qword ptr [RSP],RAX
CALL 0x00132820
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x1a0
LEA RDX,[RBP + -0x21a0]
ADD RDX,0x160
LEA RAX,[RBP + -0x21a0]
MOV ESI,0x1fe0
XOR ECX,ECX
MOV R8D,ECX
XOR R9D,R9D
MOV RCX,R8
MOV qword ptr [RSP],RAX
CALL 0x001328d0
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x28
MOV ESI,0x40
CALL 0x00123310
MOV byte ptr [RBP + -0x2158],0x80
MOV byte ptr [RBP + -0x213a],0x1
MOV byte ptr [RBP + -0x2139],0x0
MOV qword ptr [RBP + -0x20],0x0
LAB_00122b9a:
CMP qword ptr [RBP + -0x20],0xff
JNC 0x00122c34
LEA RDI,[RBP + -0x21a0]
CALL 0x00132d00
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x28
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x1a0
MOV RAX,qword ptr [RBP + -0x20]
SHL RAX,0x5
ADD RSI,RAX
MOV EDX,0x20
CALL 0x0013e3b0
LEA RDI,[RBP + -0x21a0]
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x28
MOV EDX,0x1
CALL 0x0013c000
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x1a0
MOV RAX,qword ptr [RBP + -0x20]
SHL RAX,0x5
ADD RDI,RAX
LEA RSI,[RBP + -0x21a0]
CALL 0x0013e360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00122b9a
LAB_00122c34:
LEA RDI,[RBP + -0x21a0]
ADD RDI,0xf0
CALL 0x00131c90
LEA RDI,[RBP + -0x21a0]
ADD RDI,0xf0
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x1a0
MOV EDX,0x1fe0
CALL 0x00131ce0
MOV qword ptr [RBP + -0x20],0x0
LAB_00122c75:
CMP qword ptr [RBP + -0x20],0x20
JNC 0x00122ca6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x2020]
XOR EAX,0xffffffff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + RAX*0x1 + -0x2020],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00122c75
LAB_00122ca6:
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x160
LEA RSI,[RBP + -0x21a4]
LEA RCX,[RBP + -0x21a0]
ADD RCX,0x180
LEA RAX,[RBP + -0x21a0]
MOV EDX,0x4
MOV R8D,0x20
XOR R9D,R9D
MOV qword ptr [RSP],RAX
CALL 0x00132820
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x1a0
LEA RDX,[RBP + -0x21a0]
ADD RDX,0x160
LEA RAX,[RBP + -0x21a0]
MOV ESI,0x1fe0
XOR ECX,ECX
MOV R8D,ECX
XOR R9D,R9D
MOV RCX,R8
MOV qword ptr [RSP],RAX
CALL 0x001328d0
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x28
MOV ESI,0x40
CALL 0x00123310
MOV byte ptr [RBP + -0x2158],0x80
MOV byte ptr [RBP + -0x213a],0x1
MOV qword ptr [RBP + -0x20],0x0
LAB_00122d4e:
CMP qword ptr [RBP + -0x20],0xff
JNC 0x00122de8
LEA RDI,[RBP + -0x21a0]
CALL 0x00132d00
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x28
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x1a0
MOV RAX,qword ptr [RBP + -0x20]
SHL RAX,0x5
ADD RSI,RAX
MOV EDX,0x20
CALL 0x0013e3b0
LEA RDI,[RBP + -0x21a0]
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x28
MOV EDX,0x1
CALL 0x0013c000
LEA RDI,[RBP + -0x21a0]
ADD RDI,0x1a0
MOV RAX,qword ptr [RBP + -0x20]
SHL RAX,0x5
ADD RDI,RAX
LEA RSI,[RBP + -0x21a0]
CALL 0x0013e360
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00122d4e
LAB_00122de8:
LEA RDI,[RBP + -0x21a0]
ADD RDI,0xf0
LEA RSI,[RBP + -0x21a0]
ADD RSI,0x1a0
MOV EDX,0x1fe0
CALL 0x00131ce0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x21a0]
ADD RSI,0xf0
CALL 0x00131e70
LEA RDI,[RBP + -0x21a0]
MOV ESI,0x2180
CALL 0x00123310
ADD RSP,0x21b0
POP RBP
RET
|
void parent_SK_to_lamport_PK(int8 param_1,long param_2,int4 param_3)
{
int1 local_21ac;
int1 local_21ab;
int1 local_21aa;
int1 local_21a9;
int1 local_21a8 [40];
int1 auStack_2180 [32];
int1 local_2160;
int1 local_2142;
int1 local_2141;
int1 auStack_20b8 [112];
int1 auStack_2048 [32];
byte abStack_2028 [32];
int1 auStack_2008 [8160];
ulong local_28;
int4 local_1c;
long local_18;
int8 local_10;
local_21ac = (int1)((uint)param_3 >> 0x18);
local_21ab = (int1)((uint)param_3 >> 0x10);
local_21aa = (int1)((uint)param_3 >> 8);
local_21a9 = (int1)param_3;
for (local_28 = 0; local_28 < 0x20; local_28 = local_28 + 1) {
abStack_2028[local_28] = *(byte *)(param_2 + (0x1f - local_28));
}
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
HKDF_Extract(auStack_2048,&local_21ac,4,abStack_2028,0x20,0,local_21a8);
HKDF_Expand(auStack_2008,0x1fe0,auStack_2048,0,0,0,local_21a8);
vec_zero(auStack_2180,0x40);
local_2160 = 0x80;
local_2142 = 1;
local_2141 = 0;
for (local_28 = 0; local_28 < 0xff; local_28 = local_28 + 1) {
sha256_init_h(local_21a8);
blst_sha256_bcopy(auStack_2180,auStack_2008 + local_28 * 0x20,0x20);
blst_sha256_block_data_order(local_21a8,auStack_2180,1);
blst_sha256_emit(auStack_2008 + local_28 * 0x20,local_21a8);
}
sha256_init(auStack_20b8);
sha256_update(auStack_20b8,auStack_2008,0x1fe0);
for (local_28 = 0; local_28 < 0x20; local_28 = local_28 + 1) {
abStack_2028[local_28] = abStack_2028[local_28] ^ 0xff;
}
HKDF_Extract(auStack_2048,&local_21ac,4,abStack_2028,0x20,0,local_21a8);
HKDF_Expand(auStack_2008,0x1fe0,auStack_2048,0,0,0,local_21a8);
vec_zero(auStack_2180,0x40);
local_2160 = 0x80;
local_2142 = 1;
for (local_28 = 0; local_28 < 0xff; local_28 = local_28 + 1) {
sha256_init_h(local_21a8);
blst_sha256_bcopy(auStack_2180,auStack_2008 + local_28 * 0x20,0x20);
blst_sha256_block_data_order(local_21a8,auStack_2180,1);
blst_sha256_emit(auStack_2008 + local_28 * 0x20,local_21a8);
}
sha256_update(auStack_20b8,auStack_2008,0x1fe0);
sha256_final(local_10,auStack_20b8);
vec_zero(local_21a8,0x2180);
return;
}
|
|
12,671
|
google::protobuf::compiler::CodeGeneratorResponse_File::_internal_mutable_generated_code_info()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.h
|
inline ::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* CodeGeneratorResponse_File::_internal_mutable_generated_code_info() {
_impl_._has_bits_[0] |= 0x00000008u;
if (_impl_.generated_code_info_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo>(GetArenaForAllocation());
_impl_.generated_code_info_ = p;
}
return _impl_.generated_code_info_;
}
|
O0
|
c
|
google::protobuf::compiler::CodeGeneratorResponse_File::_internal_mutable_generated_code_info():
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
orl $0x8, %esi
movl %esi, (%rcx,%rdx,4)
cmpq $0x0, 0x30(%rax)
jne 0xb04f6
movq (%rsp), %rdi
callq 0x292e0
movq %rax, %rdi
callq 0xb17d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq (%rsp), %rax
movq 0x30(%rax), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN6google8protobuf8compiler26CodeGeneratorResponse_File37_internal_mutable_generated_code_infoEv:
sub rsp, 28h
mov [rsp+28h+var_18], rdi
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_28], rax
mov rcx, rax
add rcx, 10h
mov [rsp+28h+var_8], rcx
mov [rsp+28h+var_C], 0
mov rcx, [rsp+28h+var_8]
movsxd rdx, [rsp+28h+var_C]
mov esi, [rcx+rdx*4]
or esi, 8
mov [rcx+rdx*4], esi
cmp qword ptr [rax+30h], 0
jnz short loc_B04F6
mov rdi, [rsp+28h+var_28]; this
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rdi, rax; int
call _ZN6google8protobuf11MessageLite18CreateMaybeMessageINS0_17GeneratedCodeInfoEEEPT_PNS0_5ArenaE; google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::GeneratedCodeInfo>(google::protobuf::Arena *)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_20], rcx
mov rcx, [rsp+28h+var_20]
mov [rax+30h], rcx
loc_B04F6:
mov rax, [rsp+28h+var_28]
mov rax, [rax+30h]
add rsp, 28h
retn
|
long long google::protobuf::compiler::CodeGeneratorResponse_File::_internal_mutable_generated_code_info(
google::protobuf::compiler::CodeGeneratorResponse_File *this)
{
int ArenaForAllocation; // eax
*((_DWORD *)this + 4) |= 8u;
if ( !*((_QWORD *)this + 6) )
{
ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this);
*((_QWORD *)this + 6) = google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::GeneratedCodeInfo>(ArenaForAllocation);
}
return *((_QWORD *)this + 6);
}
|
_internal_mutable_generated_code_info:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x1c],0x0
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x1c]
MOV ESI,dword ptr [RCX + RDX*0x4]
OR ESI,0x8
MOV dword ptr [RCX + RDX*0x4],ESI
CMP qword ptr [RAX + 0x30],0x0
JNZ 0x001b04f6
MOV RDI,qword ptr [RSP]
CALL 0x001292e0
MOV RDI,RAX
CALL 0x001b17d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x30],RCX
LAB_001b04f6:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x30]
ADD RSP,0x28
RET
|
/* google::protobuf::compiler::CodeGeneratorResponse_File::_internal_mutable_generated_code_info()
*/
int8 __thiscall
google::protobuf::compiler::CodeGeneratorResponse_File::_internal_mutable_generated_code_info
(CodeGeneratorResponse_File *this)
{
Arena *pAVar1;
GeneratedCodeInfo *pGVar2;
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | 8;
if (*(long *)(this + 0x30) == 0) {
pAVar1 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)this);
pGVar2 = MessageLite::CreateMaybeMessage<google::protobuf::GeneratedCodeInfo>(pAVar1);
*(GeneratedCodeInfo **)(this + 0x30) = pGVar2;
}
return *(int8 *)(this + 0x30);
}
|
|
12,672
|
my_interval_timer
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
}
|
O0
|
c
|
my_interval_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x25380
imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00
addq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_interval_timer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
lea rsi, [rbp+var_10]
call _clock_gettime
imul rax, [rbp+var_10], 3B9ACA00h
add rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long my_interval_timer()
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
|
my_interval_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
LEA RSI,[RBP + -0x10]
CALL 0x00125380
IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00
ADD RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18.tv_sec * 1000000000 + local_18.tv_nsec;
}
|
|
12,673
|
stbi__extend_receive(stbi__jpeg*, int)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
{
unsigned int k;
int sgn;
if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative)
k = stbi_lrot(j->code_buffer, n);
j->code_buffer = k & ~stbi__bmask[n];
k &= stbi__bmask[n];
j->code_bits -= n;
return k + (stbi__jbias[n] & (sgn - 1));
}
|
O2
|
c
|
stbi__extend_receive(stbi__jpeg*, int):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4824(%rdi), %edx
cmpl %esi, %edx
jge 0x41810
movq %rbx, %rdi
callq 0x4154b
movl 0x4824(%rbx), %edx
xorl %eax, %eax
subl %ebp, %edx
jl 0x41858
movl 0x4820(%rbx), %edi
movl %edi, %esi
movl %ebp, %ecx
roll %cl, %esi
movl %ebp, %ecx
leaq 0x10185(%rip), %rax # 0x519b0
movl (%rax,%rcx,4), %eax
movl %eax, %r8d
notl %r8d
andl %esi, %r8d
movl %r8d, 0x4820(%rbx)
andl %eax, %esi
movl %edx, 0x4824(%rbx)
xorl %eax, %eax
testl %edi, %edi
js 0x41856
leaq 0x101ad(%rip), %rax # 0x51a00
movl (%rax,%rcx,4), %eax
addl %esi, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_ZL20stbi__extend_receiveP10stbi__jpegi:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov edx, [rdi+4824h]
cmp edx, esi
jge short loc_41810
mov rdi, rbx
call _ZL24stbi__grow_buffer_unsafeP10stbi__jpeg; stbi__grow_buffer_unsafe(stbi__jpeg *)
mov edx, [rbx+4824h]
loc_41810:
xor eax, eax
sub edx, ebp
jl short loc_41858
mov edi, [rbx+4820h]
mov esi, edi
mov ecx, ebp
rol esi, cl
mov ecx, ebp
lea rax, _ZL11stbi__bmask; stbi__bmask
mov eax, [rax+rcx*4]
mov r8d, eax
not r8d
and r8d, esi
mov [rbx+4820h], r8d
and esi, eax
mov [rbx+4824h], edx
xor eax, eax
test edi, edi
js short loc_41856
lea rax, _ZL11stbi__jbias; stbi__jbias
mov eax, [rax+rcx*4]
loc_41856:
add eax, esi
loc_41858:
add rsp, 8
pop rbx
pop rbp
retn
|
long long stbi__extend_receive(long long a1, int a2)
{
int v4; // edx
long long result; // rax
bool v6; // cc
int v7; // edx
int v8; // edi
int v9; // esi
int v10; // eax
int v11; // esi
int v12; // eax
v4 = *(_DWORD *)(a1 + 18468);
if ( v4 < a2 )
{
stbi__grow_buffer_unsafe(a1);
v4 = *(_DWORD *)(a1 + 18468);
}
result = 0LL;
v6 = v4 < a2;
v7 = v4 - a2;
if ( !v6 )
{
v8 = *(_DWORD *)(a1 + 18464);
v9 = __ROL4__(*(_DWORD *)(a1 + 18464), a2);
v10 = stbi__bmask[a2];
*(_DWORD *)(a1 + 18464) = v9 & ~v10;
v11 = v10 & v9;
*(_DWORD *)(a1 + 18468) = v7;
v12 = 0;
if ( v8 >= 0 )
v12 = stbi__jbias[a2];
return (unsigned int)(v11 + v12);
}
return result;
}
|
stbi__extend_receive:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV EDX,dword ptr [RDI + 0x4824]
CMP EDX,ESI
JGE 0x00141810
MOV RDI,RBX
CALL 0x0014154b
MOV EDX,dword ptr [RBX + 0x4824]
LAB_00141810:
XOR EAX,EAX
SUB EDX,EBP
JL 0x00141858
MOV EDI,dword ptr [RBX + 0x4820]
MOV ESI,EDI
MOV ECX,EBP
ROL ESI,CL
MOV ECX,EBP
LEA RAX,[0x1519b0]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV R8D,EAX
NOT R8D
AND R8D,ESI
MOV dword ptr [RBX + 0x4820],R8D
AND ESI,EAX
MOV dword ptr [RBX + 0x4824],EDX
XOR EAX,EAX
TEST EDI,EDI
JS 0x00141856
LEA RAX,[0x151a00]
MOV EAX,dword ptr [RAX + RCX*0x4]
LAB_00141856:
ADD EAX,ESI
LAB_00141858:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* stbi__extend_receive(stbi__jpeg*, int) */
int stbi__extend_receive(stbi__jpeg *param_1,int param_2)
{
uint uVar1;
uint uVar2;
byte bVar3;
int iVar4;
int iVar5;
uint uVar6;
iVar5 = *(int *)(param_1 + 0x4824);
if (iVar5 < param_2) {
stbi__grow_buffer_unsafe(param_1);
iVar5 = *(int *)(param_1 + 0x4824);
}
iVar4 = 0;
if (param_2 <= iVar5) {
uVar1 = *(uint *)(param_1 + 0x4820);
bVar3 = (byte)param_2 & 0x1f;
uVar6 = uVar1 << bVar3 | uVar1 >> 0x20 - bVar3;
uVar2 = *(uint *)(stbi__bmask + (ulong)(uint)param_2 * 4);
*(uint *)(param_1 + 0x4820) = ~uVar2 & uVar6;
*(int *)(param_1 + 0x4824) = iVar5 - param_2;
iVar4 = 0;
if (-1 < (int)uVar1) {
iVar4 = *(int *)(stbi__jbias + (ulong)(uint)param_2 * 4);
}
iVar4 = iVar4 + (uVar6 & uVar2);
}
return iVar4;
}
|
|
12,674
|
test::stdev_ts() const
|
llama.cpp/examples/llama-bench/llama-bench.cpp
|
double stdev_ts() const { return ::stdev(get_ts()); }
|
O3
|
cpp
|
test::stdev_ts() const:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x30894
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %rax
subq %rdi, %rax
sarq $0x3, %rax
xorpd %xmm0, %xmm0
cmpq $0x2, %rax
jb 0x306d0
cmpq %rcx, %rdi
je 0x30649
xorpd %xmm1, %xmm1
movq %rdi, %rdx
addsd (%rdx), %xmm1
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0x305fc
movq %rax, %xmm0
punpckldq 0xea5a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xea62(%rip), %xmm0 # 0x3f080
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2 # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
movsd (%rdi), %xmm3
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
addq $0x8, %rdi
cmpq %rcx, %rdi
jne 0x3062e
divsd %xmm2, %xmm1
jmp 0x30672
movq %rax, %xmm0
punpckldq 0xea1a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xea22(%rip), %xmm0 # 0x3f080
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2 # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
decq %rax
movq %rax, %xmm3
punpckldq 0xe9ee(%rip), %xmm3 # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0xe9f6(%rip), %xmm3 # 0x3f080
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4 # xmm4 = xmm4[1],xmm3[1]
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
unpcklpd %xmm3, %xmm3 # xmm3 = xmm3[0,0]
addpd %xmm4, %xmm3
divpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x306c6
sqrtsd %xmm0, %xmm0
jmp 0x306cb
callq 0x16570
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x306ec
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
movsd %xmm0, (%rsp)
callq 0x16100
movsd (%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
retq
|
_ZNK4test8stdev_tsEv:
push rbx
sub rsp, 20h
mov rsi, rdi
lea rbx, [rsp+28h+var_20]
mov rdi, rbx; this
call _ZNK4test6get_tsEv; test::get_ts(void)
mov rdi, [rbx]
mov rcx, [rbx+8]
mov rax, rcx
sub rax, rdi
sar rax, 3
xorpd xmm0, xmm0
cmp rax, 2
jb loc_306D0
cmp rdi, rcx
jz short loc_30649
xorpd xmm1, xmm1
mov rdx, rdi
loc_305FC:
addsd xmm1, qword ptr [rdx]
add rdx, 8
cmp rdx, rcx
jnz short loc_305FC
movq xmm0, rax
punpckldq xmm0, cs:xmmword_3F070
subpd xmm0, cs:xmmword_3F080
movapd xmm2, xmm0
unpckhpd xmm2, xmm0
addsd xmm2, xmm0
xorpd xmm0, xmm0
loc_3062E:
movsd xmm3, qword ptr [rdi]
mulsd xmm3, xmm3
addsd xmm0, xmm3
add rdi, 8
cmp rdi, rcx
jnz short loc_3062E
divsd xmm1, xmm2
jmp short loc_30672
loc_30649:
movq xmm0, rax
punpckldq xmm0, cs:xmmword_3F070
subpd xmm0, cs:xmmword_3F080
movapd xmm2, xmm0
unpckhpd xmm2, xmm0
addsd xmm2, xmm0
xorpd xmm1, xmm1
xorpd xmm0, xmm0
loc_30672:
dec rax
movq xmm3, rax
punpckldq xmm3, cs:xmmword_3F070
subpd xmm3, cs:xmmword_3F080
movapd xmm4, xmm3
unpckhpd xmm4, xmm3
mulsd xmm1, xmm1
mulsd xmm1, xmm2
unpcklpd xmm0, xmm1
unpcklpd xmm3, xmm3
addpd xmm3, xmm4
divpd xmm0, xmm3
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
subsd xmm0, xmm1
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_306C6
sqrtsd xmm0, xmm0
jmp short loc_306CB
loc_306C6:
call _sqrt
loc_306CB:
mov rdi, [rsp+28h+var_20]; void *
loc_306D0:
test rdi, rdi
jz short loc_306EC
mov rsi, [rsp+28h+var_10]
sub rsi, rdi; unsigned __int64
movsd [rsp+28h+var_28], xmm0
call __ZdlPvm; operator delete(void *,ulong)
movsd xmm0, [rsp+28h+var_28]
loc_306EC:
add rsp, 20h
pop rbx
retn
|
double test::stdev_ts(test *this)
{
double *v1; // rdi
unsigned long long v2; // rax
double result; // xmm0_8
__m128d v4; // xmm1
double *v5; // rdx
__m128d v6; // xmm0
double v7; // xmm2_8
__m128d v8; // xmm0
__m128d v9; // xmm0
__m128d v10; // xmm3
__m128d v11; // xmm0
double v12; // xmm0_8
void *v13; // [rsp+8h] [rbp-20h] BYREF
_BYTE *v14; // [rsp+10h] [rbp-18h]
long long v15; // [rsp+18h] [rbp-10h]
test::get_ts((test *)&v13);
v1 = (double *)v13;
v2 = (v14 - (_BYTE *)v13) >> 3;
result = 0.0;
if ( v2 >= 2 )
{
if ( v13 == v14 )
{
v9 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v2, (__m128i)xmmword_3F070), (__m128d)xmmword_3F080);
v7 = _mm_unpackhi_pd(v9, v9).m128d_f64[0] + v9.m128d_f64[0];
v4 = 0LL;
v8 = 0LL;
}
else
{
v4 = 0LL;
v5 = (double *)v13;
do
v4.m128d_f64[0] = v4.m128d_f64[0] + *v5++;
while ( v5 != (double *)v14 );
v6 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v2, (__m128i)xmmword_3F070), (__m128d)xmmword_3F080);
v7 = _mm_unpackhi_pd(v6, v6).m128d_f64[0] + v6.m128d_f64[0];
v8 = 0LL;
do
{
v8.m128d_f64[0] = v8.m128d_f64[0] + *v1 * *v1;
++v1;
}
while ( v1 != (double *)v14 );
v4.m128d_f64[0] = v4.m128d_f64[0] / v7;
}
v10 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)(v2 - 1), (__m128i)xmmword_3F070), (__m128d)xmmword_3F080);
v4.m128d_f64[0] = v4.m128d_f64[0] * v4.m128d_f64[0] * v7;
v11 = _mm_div_pd(_mm_unpacklo_pd(v8, v4), _mm_add_pd(_mm_unpacklo_pd(v10, v10), _mm_unpackhi_pd(v10, v10)));
v12 = v11.m128d_f64[0] - _mm_unpackhi_pd(v11, v11).m128d_f64[0];
if ( v12 < 0.0 )
result = sqrt(v12);
else
result = sqrt(v12);
v1 = (double *)v13;
}
if ( v1 )
operator delete(v1, v15 - (_QWORD)v1);
return result;
}
|
stdev_ts:
PUSH RBX
SUB RSP,0x20
MOV RSI,RDI
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00130894
MOV RDI,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,RCX
SUB RAX,RDI
SAR RAX,0x3
XORPD XMM0,XMM0
CMP RAX,0x2
JC 0x001306d0
CMP RDI,RCX
JZ 0x00130649
XORPD XMM1,XMM1
MOV RDX,RDI
LAB_001305fc:
ADDSD XMM1,qword ptr [RDX]
ADD RDX,0x8
CMP RDX,RCX
JNZ 0x001305fc
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x0013f070]
SUBPD XMM0,xmmword ptr [0x0013f080]
MOVAPD XMM2,XMM0
UNPCKHPD XMM2,XMM0
ADDSD XMM2,XMM0
XORPD XMM0,XMM0
LAB_0013062e:
MOVSD XMM3,qword ptr [RDI]
MULSD XMM3,XMM3
ADDSD XMM0,XMM3
ADD RDI,0x8
CMP RDI,RCX
JNZ 0x0013062e
DIVSD XMM1,XMM2
JMP 0x00130672
LAB_00130649:
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x0013f070]
SUBPD XMM0,xmmword ptr [0x0013f080]
MOVAPD XMM2,XMM0
UNPCKHPD XMM2,XMM0
ADDSD XMM2,XMM0
XORPD XMM1,XMM1
XORPD XMM0,XMM0
LAB_00130672:
DEC RAX
MOVQ XMM3,RAX
PUNPCKLDQ XMM3,xmmword ptr [0x0013f070]
SUBPD XMM3,xmmword ptr [0x0013f080]
MOVAPD XMM4,XMM3
UNPCKHPD XMM4,XMM3
MULSD XMM1,XMM1
MULSD XMM1,XMM2
UNPCKLPD XMM0,XMM1
UNPCKLPD XMM3,XMM3
ADDPD XMM3,XMM4
DIVPD XMM0,XMM3
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
SUBSD XMM0,XMM1
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x001306c6
SQRTSD XMM0,XMM0
JMP 0x001306cb
LAB_001306c6:
CALL 0x00116570
LAB_001306cb:
MOV RDI,qword ptr [RSP + 0x8]
LAB_001306d0:
TEST RDI,RDI
JZ 0x001306ec
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,RDI
MOVSD qword ptr [RSP],XMM0
CALL 0x00116100
MOVSD XMM0,qword ptr [RSP]
LAB_001306ec:
ADD RSP,0x20
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* test::stdev_ts() const */
void test::stdev_ts(void)
{
ulong uVar1;
long lVar2;
double *pdVar3;
double dVar4;
int iVar8;
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
double dVar9;
double dVar10;
double dVar11;
int1 auVar12 [16];
double dVar14;
int1 auVar13 [16];
double *local_20;
double *local_18;
long local_10;
get_ts();
uVar1 = (long)local_18 - (long)local_20 >> 3;
if (1 < uVar1) {
iVar8 = (int)((long)local_18 - (long)local_20 >> 0x23);
if (local_20 == local_18) {
auVar7._8_4_ = iVar8;
auVar7._0_8_ = uVar1;
auVar7._12_4_ = DAT_0013f070._4_4_;
dVar10 = (auVar7._8_8_ - _UNK_0013f088) +
((double)CONCAT44((int4)DAT_0013f070,(int)uVar1) - _DAT_0013f080);
dVar9 = 0.0;
dVar4 = 0.0;
}
else {
dVar9 = 0.0;
pdVar3 = local_20;
do {
dVar9 = dVar9 + *pdVar3;
pdVar3 = pdVar3 + 1;
} while (pdVar3 != local_18);
auVar5._8_4_ = iVar8;
auVar5._0_8_ = uVar1;
auVar5._12_4_ = DAT_0013f070._4_4_;
dVar10 = (auVar5._8_8_ - _UNK_0013f088) +
((double)CONCAT44((int4)DAT_0013f070,(int)uVar1) - _DAT_0013f080);
dVar4 = 0.0;
pdVar3 = local_20;
do {
dVar4 = dVar4 + *pdVar3 * *pdVar3;
pdVar3 = pdVar3 + 1;
} while (pdVar3 != local_18);
dVar9 = dVar9 / dVar10;
}
lVar2 = uVar1 - 1;
auVar12._8_4_ = (int)((ulong)lVar2 >> 0x20);
auVar12._0_8_ = lVar2;
auVar12._12_4_ = DAT_0013f070._4_4_;
dVar11 = (double)CONCAT44((int4)DAT_0013f070,(int)lVar2) - _DAT_0013f080;
dVar14 = auVar12._8_8_ - _UNK_0013f088;
auVar6._8_8_ = dVar9 * dVar9 * dVar10;
auVar6._0_8_ = dVar4;
auVar13._0_8_ = dVar11 + dVar14;
auVar13._8_8_ = dVar11 + dVar14;
auVar7 = divpd(auVar6,auVar13);
dVar4 = auVar7._0_8_ - auVar7._8_8_;
if (dVar4 < 0.0) {
sqrt(dVar4);
}
}
if (local_20 != (double *)0x0) {
operator_delete(local_20,local_10 - (long)local_20);
}
return;
}
|
|
12,675
|
my_hash_sort_ucs2_nopad
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e=s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0)
{
my_tosort_ucs2(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+=res;
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_ucs2_nopad:
movq (%rcx), %r9
movq (%r8), %rax
cmpq $0x2, %rdx
jl 0xc8fe1
pushq %rbp
movq %rsp, %rbp
pushq %rbx
addq %rsi, %rdx
movq 0x78(%rdi), %rdi
movq 0x8(%rdi), %rdi
movzbl (%rsi), %r10d
movzbl 0x1(%rsi), %r11d
movq (%rdi,%r10,8), %rbx
testq %rbx, %rbx
je 0xc8f7d
leaq (%r11,%r11,2), %r10
movl 0x8(%rbx,%r10,4), %r10d
jmp 0xc8f84
shll $0x8, %r10d
orq %r11, %r10
movl %r9d, %r11d
andl $0x3f, %r11d
addq %rax, %r11
movzbl %r10b, %ebx
imulq %r11, %rbx
movq %r9, %r11
shlq $0x8, %r11
addq %rbx, %r11
xorq %r9, %r11
movl %r11d, %r9d
andl $0x3f, %r9d
addq %rax, %r9
addq $0x3, %r9
shrl $0x8, %r10d
imulq %r9, %r10
movq %r11, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r11, %r9
addq $0x6, %rax
leaq 0x2(%rsi), %r10
cmpq %rdx, %r10
jae 0xc8fdf
addq $0x4, %rsi
cmpq %rdx, %rsi
movq %r10, %rsi
jbe 0xc8f60
popq %rbx
popq %rbp
movq %r9, (%rcx)
movq %rax, (%r8)
retq
|
my_hash_sort_ucs2_nopad:
mov r9, [rcx]
mov rax, [r8]
cmp rdx, 2
jl loc_C8FE1
push rbp
mov rbp, rsp
push rbx
add rdx, rsi
mov rdi, [rdi+78h]
mov rdi, [rdi+8]
loc_C8F60:
movzx r10d, byte ptr [rsi]
movzx r11d, byte ptr [rsi+1]
mov rbx, [rdi+r10*8]
test rbx, rbx
jz short loc_C8F7D
lea r10, [r11+r11*2]
mov r10d, [rbx+r10*4+8]
jmp short loc_C8F84
loc_C8F7D:
shl r10d, 8
or r10, r11
loc_C8F84:
mov r11d, r9d
and r11d, 3Fh
add r11, rax
movzx ebx, r10b
imul rbx, r11
mov r11, r9
shl r11, 8
add r11, rbx
xor r11, r9
mov r9d, r11d
and r9d, 3Fh
add r9, rax
add r9, 3
shr r10d, 8
imul r10, r9
mov r9, r11
shl r9, 8
add r9, r10
xor r9, r11
add rax, 6
lea r10, [rsi+2]
cmp r10, rdx
jnb short loc_C8FDF
add rsi, 4
cmp rsi, rdx
mov rsi, r10
jbe short loc_C8F60
loc_C8FDF:
pop rbx
pop rbp
loc_C8FE1:
mov [rcx], r9
mov [r8], rax
retn
|
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long v5; // r9
long long result; // rax
unsigned long long v7; // rdx
long long v8; // rdi
long long v9; // r10
long long v10; // r11
long long v11; // rbx
unsigned int v12; // r10d
long long v13; // rbx
bool v14; // cc
v5 = *a4;
result = *a5;
if ( a3 >= 2 )
{
v7 = (unsigned long long)&a2[a3];
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL);
do
{
v9 = *a2;
v10 = a2[1];
v11 = *(_QWORD *)(v8 + 8 * v9);
if ( v11 )
v12 = *(_DWORD *)(v11 + 12 * v10 + 8);
else
v12 = v10 | ((_DWORD)v9 << 8);
v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12;
v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8)
+ ((v5 ^ (v13 + (v5 << 8))) << 8));
result += 6LL;
if ( (unsigned long long)(a2 + 2) >= v7 )
break;
v14 = (unsigned long long)(a2 + 4) <= v7;
a2 += 2;
}
while ( v14 );
}
*a4 = v5;
*a5 = result;
return result;
}
|
my_hash_sort_ucs2_nopad:
MOV R9,qword ptr [RCX]
MOV RAX,qword ptr [R8]
CMP RDX,0x2
JL 0x001c8fe1
PUSH RBP
MOV RBP,RSP
PUSH RBX
ADD RDX,RSI
MOV RDI,qword ptr [RDI + 0x78]
MOV RDI,qword ptr [RDI + 0x8]
LAB_001c8f60:
MOVZX R10D,byte ptr [RSI]
MOVZX R11D,byte ptr [RSI + 0x1]
MOV RBX,qword ptr [RDI + R10*0x8]
TEST RBX,RBX
JZ 0x001c8f7d
LEA R10,[R11 + R11*0x2]
MOV R10D,dword ptr [RBX + R10*0x4 + 0x8]
JMP 0x001c8f84
LAB_001c8f7d:
SHL R10D,0x8
OR R10,R11
LAB_001c8f84:
MOV R11D,R9D
AND R11D,0x3f
ADD R11,RAX
MOVZX EBX,R10B
IMUL RBX,R11
MOV R11,R9
SHL R11,0x8
ADD R11,RBX
XOR R11,R9
MOV R9D,R11D
AND R9D,0x3f
ADD R9,RAX
ADD R9,0x3
SHR R10D,0x8
IMUL R10,R9
MOV R9,R11
SHL R9,0x8
ADD R9,R10
XOR R9,R11
ADD RAX,0x6
LEA R10,[RSI + 0x2]
CMP R10,RDX
JNC 0x001c8fdf
ADD RSI,0x4
CMP RSI,RDX
MOV RSI,R10
JBE 0x001c8f60
LAB_001c8fdf:
POP RBX
POP RBP
LAB_001c8fe1:
MOV qword ptr [RCX],R9
MOV qword ptr [R8],RAX
RET
|
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long lVar1;
long lVar2;
byte *pbVar3;
byte *pbVar4;
ulong uVar5;
ulong uVar6;
uVar6 = *param_4;
lVar2 = *param_5;
if (1 < param_3) {
pbVar3 = param_2;
do {
lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8);
if (lVar1 == 0) {
uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]);
}
else {
uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc);
}
uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6;
uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6;
lVar2 = lVar2 + 6;
} while ((pbVar3 + 2 < param_2 + param_3) &&
(pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3));
}
*param_4 = uVar6;
*param_5 = lVar2;
return;
}
|
|
12,676
|
my_hash_sort_simple
|
eloqsql/strings/ctype-simple.c
|
void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end;
uint16 space_weight= sort_order[' '];
/*
Remove all trailing characters that are equal to space.
We have to do this to be able to compare 'A ' and 'A' as identical.
If the key is long enough, cut the trailing spaces (0x20) using an
optimized function implemented in skip_trailing_spaces().
"len > 16" is just some heuristic here.
Calling skip_triling_space() for short values is not desirable,
because its initialization block may be more expensive than the
performance gained.
*/
end= len > 16 ? skip_trailing_space(key, len) : key + len;
/*
We removed all trailing characters that are binary equal to space 0x20.
Now remove all trailing characters that have weights equal to space.
Some 8bit simple collations may have such characters:
- cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE
- cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE
- koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE
*/
for ( ; key < end ; )
{
if (sort_order[*--end] != space_weight)
{
end++;
break;
}
}
my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2);
}
|
O0
|
c
|
my_hash_sort_simple:
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 %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x20(%rax), %eax
movw %ax, -0x3a(%rbp)
cmpq $0x10, -0x18(%rbp)
jbe 0x7829e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78320
movq %rax, -0x48(%rbp)
jmp 0x782aa
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x782ef
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
je 0x782ed
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x782ef
jmp 0x782b2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x78190
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_sort_simple:
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 [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+20h]
mov [rbp+var_3A], ax
cmp [rbp+var_18], 10h
jbe short loc_7829E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_2
mov [rbp+var_48], rax
jmp short loc_782AA
loc_7829E:
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_782AA:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
loc_782B2:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_782EF
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rdx
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_3A]
cmp eax, ecx
jz short loc_782ED
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_782EF
loc_782ED:
jmp short loc_782B2
loc_782EF:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
sub rdx, rax
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call my_hash_sort_simple_nopad
add rsp, 50h
pop rbp
retn
|
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5)
{
unsigned long long v5; // rcx
long long v7; // [rsp+8h] [rbp-48h]
__int16 v8; // [rsp+16h] [rbp-3Ah]
unsigned long long v9; // [rsp+18h] [rbp-38h]
long long v10; // [rsp+20h] [rbp-30h]
v10 = *(_QWORD *)(a1 + 88);
v8 = *(unsigned __int8 *)(v10 + 32);
if ( a3 <= 0x10 )
v7 = (long long)&a2[a3];
else
v7 = skip_trailing_space_2(a2, a3);
v9 = v7;
while ( (unsigned long long)a2 < v9 )
{
v5 = v9--;
if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 )
return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5);
}
return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5);
}
|
my_hash_sort_simple:
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 qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x20]
MOV word ptr [RBP + -0x3a],AX
CMP qword ptr [RBP + -0x18],0x10
JBE 0x0017829e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00178320
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001782aa
LAB_0017829e:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001782aa:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
LAB_001782b2:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001782ef
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x38],RDX
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,word ptr [RBP + -0x3a]
CMP EAX,ECX
JZ 0x001782ed
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001782ef
LAB_001782ed:
JMP 0x001782b2
LAB_001782ef:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
SUB RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x00178190
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4,
int8 param_5)
{
char cVar1;
long lVar2;
ulong uVar3;
ulong local_50;
ulong local_40;
lVar2 = *(long *)(param_1 + 0x58);
cVar1 = *(char *)(lVar2 + 0x20);
if (param_3 < 0x11) {
local_50 = param_2 + param_3;
}
else {
local_50 = skip_trailing_space(param_2,param_3);
}
local_40 = local_50;
uVar3 = local_40;
do {
local_40 = uVar3;
if (local_40 <= param_2) break;
uVar3 = local_40 - 1;
} while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1);
my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5);
return;
}
|
|
12,677
|
translog_get_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static uchar *translog_get_page(TRANSLOG_VALIDATOR_DATA *data, uchar *buffer,
PAGECACHE_BLOCK_LINK **direct_link)
{
TRANSLOG_ADDRESS addr= *(data->addr), in_buffers;
uint32 file_no= LSN_FILE_NO(addr);
TRANSLOG_FILE *file;
DBUG_ENTER("translog_get_page");
DBUG_PRINT("enter", ("File: %u Offset: %u(0x%x)",
file_no,
(uint) LSN_OFFSET(addr),
(uint) LSN_OFFSET(addr)));
/* it is really page address */
DBUG_ASSERT(LSN_OFFSET(addr) % TRANSLOG_PAGE_SIZE == 0);
if (direct_link)
*direct_link= NULL;
restart:
in_buffers= translog_only_in_buffers();
DBUG_PRINT("info", ("in_buffers: " LSN_FMT,
LSN_IN_PARTS(in_buffers)));
if (in_buffers != LSN_IMPOSSIBLE &&
cmp_translog_addr(addr, in_buffers) >= 0)
{
translog_lock();
DBUG_ASSERT(cmp_translog_addr(addr, log_descriptor.horizon) < 0);
/* recheck with locked loghandler */
in_buffers= translog_only_in_buffers();
if (cmp_translog_addr(addr, in_buffers) >= 0)
{
uint16 buffer_no= log_descriptor.bc.buffer_no;
#ifdef DBUG_ASSERT_EXISTS
uint16 buffer_start= buffer_no;
#endif
struct st_translog_buffer *buffer_unlock= log_descriptor.bc.buffer;
struct st_translog_buffer *curr_buffer= log_descriptor.bc.buffer;
for (;;)
{
/*
if the page is in the buffer and it is the last version of the
page (in case of division the page by buffer flush)
*/
if (curr_buffer->file != NULL &&
cmp_translog_addr(addr, curr_buffer->offset) >= 0 &&
cmp_translog_addr(addr,
(curr_buffer->next_buffer_offset ?
curr_buffer->next_buffer_offset:
curr_buffer->offset + curr_buffer->size)) < 0)
{
TRANSLOG_ADDRESS offset= curr_buffer->offset;
TRANSLOG_FILE *fl= curr_buffer->file;
uchar *from, *table= NULL;
int is_last_unfinished_page;
uint last_protected_sector= 0;
uint skipped_data= curr_buffer->skipped_data;
TRANSLOG_FILE file_copy;
uint8 ver= curr_buffer->ver;
translog_wait_for_writers(curr_buffer);
if (offset != curr_buffer->offset || fl != curr_buffer->file ||
ver != curr_buffer->ver)
{
DBUG_ASSERT(buffer_unlock == curr_buffer);
translog_buffer_unlock(buffer_unlock);
goto restart;
}
DBUG_ASSERT(LSN_FILE_NO(addr) == LSN_FILE_NO(curr_buffer->offset));
from= curr_buffer->buffer + (addr - curr_buffer->offset);
if (skipped_data && addr == curr_buffer->offset)
{
/*
We read page part of which is not present in buffer,
so we should read absent part from file (page cache actually)
*/
file= get_logfile_by_number(file_no);
DBUG_ASSERT(file != NULL);
/*
it's ok to not lock the page because:
- The log handler has it's own page cache.
- There is only one thread that can access the log
cache at a time
*/
if (!(buffer= pagecache_read(log_descriptor.pagecache,
&file->handler,
LSN_OFFSET(addr) / TRANSLOG_PAGE_SIZE,
3, buffer,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
NULL)))
DBUG_RETURN(NULL);
}
else
skipped_data= 0; /* Read after skipped in buffer data */
/*
Now we have correct data in buffer up to 'skipped_data'. The
following memcpy() will move the data from the internal buffer
that was not yet on disk.
*/
memcpy(buffer + skipped_data, from + skipped_data,
TRANSLOG_PAGE_SIZE - skipped_data);
/*
We can use copy then in translog_page_validator() because it
do not put it permanently somewhere.
We have to use copy because after releasing log lock we can't
guaranty that the file still be present (in real life it will be
present but theoretically possible that it will be released
already from last files cache);
*/
file_copy= *(curr_buffer->file);
file_copy.handler.callback_data= (uchar*) &file_copy;
is_last_unfinished_page= ((log_descriptor.bc.buffer ==
curr_buffer) &&
(log_descriptor.bc.ptr >= from) &&
(log_descriptor.bc.ptr <
from + TRANSLOG_PAGE_SIZE));
if (is_last_unfinished_page &&
(buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION))
{
last_protected_sector= ((log_descriptor.bc.previous_offset - 1) /
DISK_DRIVE_SECTOR_SIZE);
table= buffer + log_descriptor.page_overhead -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
}
DBUG_ASSERT(buffer_unlock == curr_buffer);
translog_buffer_unlock(buffer_unlock);
if (is_last_unfinished_page)
{
uint i;
/*
This is last unfinished page => we should not check CRC and
remove only that protection which already installed (no need
to check it)
We do not check the flag of sector protection, because if
(buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION) is
not set then last_protected_sector will be 0 so following loop
will be never executed
*/
DBUG_PRINT("info", ("This is last unfinished page, "
"last protected sector %u",
last_protected_sector));
for (i= 1; i <= last_protected_sector; i++)
{
uint offset= i * DISK_DRIVE_SECTOR_SIZE;
DBUG_PRINT("info", ("Sector %u: 0x%02x <- 0x%02x",
i, buffer[offset],
table[i]));
buffer[offset]= table[i];
}
}
else
{
/*
This IF should be true because we use in-memory data which
supposed to be correct.
*/
PAGECACHE_IO_HOOK_ARGS args;
args.page= buffer;
args.pageno= LSN_OFFSET(addr) / TRANSLOG_PAGE_SIZE;
args.data= (uchar*) &file_copy;
if (translog_page_validator(0, &args))
{
DBUG_ASSERT(0);
buffer= NULL;
}
}
DBUG_RETURN(buffer);
}
buffer_no= (buffer_no + 1) % TRANSLOG_BUFFERS_NO;
curr_buffer= log_descriptor.buffers + buffer_no;
translog_buffer_lock(curr_buffer);
translog_buffer_unlock(buffer_unlock);
buffer_unlock= curr_buffer;
/* we can't make a full circle */
DBUG_ASSERT(buffer_start != buffer_no);
}
}
translog_unlock();
}
file= get_logfile_by_number(file_no);
DBUG_ASSERT(file != NULL);
buffer= pagecache_read(log_descriptor.pagecache, &file->handler,
LSN_OFFSET(addr) / TRANSLOG_PAGE_SIZE,
3, (direct_link ? NULL : buffer),
PAGECACHE_PLAIN_PAGE,
(direct_link ?
PAGECACHE_LOCK_READ :
PAGECACHE_LOCK_LEFT_UNLOCKED),
direct_link);
DBUG_PRINT("info", ("Direct link is assigned to : %p * %p",
direct_link,
(direct_link ? *direct_link : NULL)));
data->was_recovered= file->was_recovered;
DBUG_RETURN(buffer);
}
|
O3
|
c
|
translog_get_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x50(%rbp)
movq (%rdi), %rax
movq (%rax), %r14
movq %r14, %rax
shrq $0x20, %rax
movq %rax, -0x40(%rbp)
testq %rdx, %rdx
je 0x44c15
movq $0x0, (%rdx)
movq %rdx, -0x48(%rbp)
callq 0x4970a
testq %rax, %rax
sete %cl
cmpq %rax, %r14
setl %al
orb %cl, %al
jne 0x44d92
callq 0x43693
callq 0x4970a
cmpq %rax, %r14
jl 0x44d6c
movq %r14, %rbx
movzbl 0xbe2be6(%rip), %r13d # 0xc27836
movq 0xbe2bd1(%rip), %r12 # 0xc27828
movq 0x100038(%r12), %r14
testq %r14, %r14
je 0x44c8e
movq 0x100010(%r12), %r15
cmpq %r15, %rbx
jl 0x44c8e
movq 0x100018(%r12), %rax
testq %rax, %rax
jne 0x44c89
movl 0x100030(%r12), %eax
addq %r15, %rax
cmpq %rax, %rbx
jl 0x44ce9
incl %r13d
andl $0x7, %r13d
imulq $0x100120, %r13, %rax # imm = 0x100120
leaq 0x3e1f0d(%rip), %rcx # 0x426bb0
leaq (%rax,%rcx), %r15
addq $0x2f8, %r15 # imm = 0x2F8
movq %r15, %rdi
callq 0x43733
movq 0x1000d0(%r12), %rdi
testq %rdi, %rdi
jne 0x44cd7
addq $0x100090, %r12 # imm = 0x100090
movq %r12, %rdi
callq 0x2a1f0
movq %r15, %r12
jmp 0x44c57
leaq 0x369d3a(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x44cc3
movl 0x100034(%r12), %eax
movl %eax, -0x34(%rbp)
movb 0x1000d9(%r12), %r13b
movq %r12, %rdi
callq 0x496a0
cmpq 0x100010(%r12), %r15
jne 0x44d26
cmpq 0x100038(%r12), %r14
jne 0x44d26
cmpb 0x1000d9(%r12), %r13b
je 0x44dfa
movq 0x1000d0(%r12), %rdi
testq %rdi, %rdi
jne 0x44d5a
addq $0x100090, %r12 # imm = 0x100090
movq %r12, %rdi
callq 0x2a1f0
callq 0x4970a
testq %rax, %rax
movq %rbx, %r14
je 0x44d92
cmpq %rax, %r14
jge 0x44c32
jmp 0x44d92
leaq 0x369cb7(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x44d33
movq 0xbe2ab5(%rip), %r15 # 0xc27828
movq 0x1000d0(%r15), %rdi
testq %rdi, %rdi
jne 0x44f92
addq $0x100090, %r15 # imm = 0x100090
movq %r15, %rdi
callq 0x2a1f0
movq -0x40(%rbp), %rdi
callq 0x4941e
movq %rax, %rbx
leaq 0x8(%rax), %rsi
shrl $0xd, %r14d
xorl %r8d, %r8d
xorl %eax, %eax
movq -0x48(%rbp), %r10
testq %r10, %r10
setne %al
movq 0x3e1df4(%rip), %rdi # 0x426bb0
cmoveq -0x30(%rbp), %r8
leal (%rax,%rax,2), %eax
movq %r14, %rdx
movl $0x3, %ecx
movl $0x1, %r9d
pushq %r10
pushq %rax
callq 0x4c256
addq $0x10, %rsp
movb 0x50(%rbx), %cl
movq -0x50(%rbp), %rdx
movb %cl, 0x8(%rdx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, -0x34(%rbp)
setne %al
movq %rbx, %rdx
subq %r15, %rdx
sete %cl
andb %al, %cl
xorl %r13d, %r13d
cmpb $0x1, %cl
jne 0x44e62
movq %rbx, %r14
movq -0x40(%rbp), %rdi
movq %rdx, %r15
callq 0x4941e
movq 0x3e1d86(%rip), %rdi # 0x426bb0
leaq 0x8(%rax), %rsi
movl %r14d, %edx
shrl $0xd, %edx
movl $0x3, %ecx
movq -0x30(%rbp), %r8
movl $0x1, %r9d
pushq $0x0
pushq $0x0
callq 0x4c256
movq %r15, %rdx
movl -0x34(%rbp), %ecx
addq $0x10, %rsp
testq %rax, %rax
jne 0x44e68
xorl %edx, %edx
jmp 0x44f8a
xorl %ecx, %ecx
movq -0x30(%rbp), %rax
leaq (%r12,%rdx), %r14
movl %ecx, %esi
movq %rax, -0x30(%rbp)
leaq (%rax,%rsi), %rdi
addq %r14, %rsi
movl $0x2000, %edx # imm = 0x2000
subl %ecx, %edx
callq 0x2a0b0
movq 0x100038(%r12), %rsi
leaq -0xc8(%rbp), %rax
movl $0xb, %ecx
movq %rax, %rdi
rep movsq (%rsi), %es:(%rdi)
movq %rax, 0x48(%rax)
cmpq %r12, 0xbe297e(%rip) # 0xc27828
je 0x44eb4
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x44f0a
movq 0xbe2965(%rip), %rax # 0xc27820
cmpq %r14, %rax
setae %cl
addq $0x2000, %r14 # imm = 0x2000
cmpq %r14, %rax
setb %al
andb %cl, %al
cmpb $0x1, %al
jne 0x44f01
movb $0x1, %r14b
movq -0x30(%rbp), %rcx
testb $0x2, 0x6(%rcx)
je 0x44f04
movzwl 0xbe294b(%rip), %r13d # 0xc27834
decl %r13d
shrl $0x9, %r13d
movzwl 0x3e1cdd(%rip), %eax # 0x426bd4
leaq (%rcx,%rax), %r15
addq $-0x10, %r15
jmp 0x44f0a
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x1000d0(%r12), %rdi
testq %rdi, %rdi
jne 0x44fa7
addq $0x100090, %r12 # imm = 0x100090
movq %r12, %rdi
callq 0x2a1f0
testb %r14b, %r14b
je 0x44f5b
testl %r13d, %r13d
movq -0x30(%rbp), %rdx
je 0x44f8a
incq %r15
shll $0x9, %r13d
xorl %eax, %eax
movb (%r15), %cl
movb %cl, 0x200(%rdx,%rax)
incq %r15
addq $0x200, %rax # imm = 0x200
cmpq %rax, %r13
jne 0x44f41
jmp 0x44f8a
leaq -0x70(%rbp), %rsi
movq -0x30(%rbp), %r14
movq %r14, (%rsi)
shrl $0xd, %ebx
movq %rbx, 0x8(%rsi)
leaq -0xc8(%rbp), %rax
movq %rax, 0x10(%rsi)
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x4949f
movq %r14, %rdx
testb %al, %al
cmovneq %rbx, %rdx
movq %rdx, %rax
jmp 0x44de8
leaq 0x369a7f(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x44d83
leaq 0x369a6a(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x44f1b
|
translog_get_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov [rbp+var_30], rsi
mov [rbp+var_50], rdi
mov rax, [rdi]
mov r14, [rax]
mov rax, r14
shr rax, 20h
mov [rbp+var_40], rax
test rdx, rdx
jz short loc_44C15
mov qword ptr [rdx], 0
loc_44C15:
mov [rbp+var_48], rdx
call translog_only_in_buffers
test rax, rax
setz cl
cmp r14, rax
setl al
or al, cl
jnz loc_44D92
loc_44C32:
call translog_lock
call translog_only_in_buffers
cmp r14, rax
jl loc_44D6C
mov rbx, r14
movzx r13d, byte ptr cs:xmmword_C27830+6
mov r12, qword ptr cs:xmmword_C27820+8
loc_44C57:
mov r14, [r12+100038h]
test r14, r14
jz short loc_44C8E
mov r15, [r12+100010h]
cmp rbx, r15
jl short loc_44C8E
mov rax, [r12+100018h]
test rax, rax
jnz short loc_44C89
mov eax, [r12+100030h]
add rax, r15
loc_44C89:
cmp rbx, rax
jl short loc_44CE9
loc_44C8E:
inc r13d
and r13d, 7
imul rax, r13, 100120h
lea rcx, log_descriptor
lea r15, [rax+rcx]
add r15, 2F8h
mov rdi, r15
call translog_buffer_lock
mov rdi, [r12+1000D0h]
test rdi, rdi
jnz short loc_44CD7
loc_44CC3:
add r12, 100090h
mov rdi, r12
call _pthread_mutex_unlock
mov r12, r15
jmp short loc_44C57
loc_44CD7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_44CC3
loc_44CE9:
mov eax, [r12+100034h]
mov [rbp+var_34], eax
mov r13b, [r12+1000D9h]
mov rdi, r12
call translog_wait_for_writers
cmp r15, [r12+100010h]
jnz short loc_44D26
cmp r14, [r12+100038h]
jnz short loc_44D26
cmp r13b, [r12+1000D9h]
jz loc_44DFA
loc_44D26:
mov rdi, [r12+1000D0h]
test rdi, rdi
jnz short loc_44D5A
loc_44D33:
add r12, 100090h
mov rdi, r12
call _pthread_mutex_unlock
call translog_only_in_buffers
test rax, rax
mov r14, rbx
jz short loc_44D92
cmp r14, rax
jge loc_44C32
jmp short loc_44D92
loc_44D5A:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_44D33
loc_44D6C:
mov r15, qword ptr cs:xmmword_C27820+8
mov rdi, [r15+1000D0h]
test rdi, rdi
jnz loc_44F92
loc_44D83:
add r15, 100090h
mov rdi, r15
call _pthread_mutex_unlock
loc_44D92:
mov rdi, [rbp+var_40]
call get_logfile_by_number
mov rbx, rax
lea rsi, [rax+8]
shr r14d, 0Dh
xor r8d, r8d
xor eax, eax
mov r10, [rbp+var_48]
test r10, r10
setnz al
mov rdi, cs:log_descriptor
cmovz r8, [rbp+var_30]
lea eax, [rax+rax*2]
mov rdx, r14
mov ecx, 3
mov r9d, 1
push r10
push rax
call pagecache_read
add rsp, 10h
mov cl, [rbx+50h]
mov rdx, [rbp+var_50]
mov [rdx+8], cl
loc_44DE8:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44DFA:
cmp [rbp+var_34], 0
setnz al
mov rdx, rbx
sub rdx, r15
setz cl
and cl, al
xor r13d, r13d
cmp cl, 1
jnz short loc_44E62
mov r14, rbx
mov rdi, [rbp+var_40]
mov r15, rdx
call get_logfile_by_number
mov rdi, cs:log_descriptor
lea rsi, [rax+8]
mov edx, r14d
shr edx, 0Dh
mov ecx, 3
mov r8, [rbp+var_30]
mov r9d, 1
push 0
push 0
call pagecache_read
mov rdx, r15
mov ecx, [rbp+var_34]
add rsp, 10h
test rax, rax
jnz short loc_44E68
xor edx, edx
jmp loc_44F8A
loc_44E62:
xor ecx, ecx
mov rax, [rbp+var_30]
loc_44E68:
lea r14, [r12+rdx]
mov esi, ecx
mov [rbp+var_30], rax
lea rdi, [rax+rsi]
add rsi, r14
mov edx, 2000h
sub edx, ecx
call _memcpy
mov rsi, [r12+100038h]
lea rax, [rbp+var_C8]
mov ecx, 0Bh
mov rdi, rax
rep movsq
mov [rax+48h], rax
cmp qword ptr cs:xmmword_C27820+8, r12
jz short loc_44EB4
xor r14d, r14d
xor r15d, r15d
jmp short loc_44F0A
loc_44EB4:
mov rax, qword ptr cs:xmmword_C27820
cmp rax, r14
setnb cl
add r14, 2000h
cmp rax, r14
setb al
and al, cl
cmp al, 1
jnz short loc_44F01
mov r14b, 1
mov rcx, [rbp+var_30]
test byte ptr [rcx+6], 2
jz short loc_44F04
movzx r13d, word ptr cs:xmmword_C27830+4
dec r13d
shr r13d, 9
movzx eax, cs:word_426BD4
lea r15, [rcx+rax]
add r15, 0FFFFFFFFFFFFFFF0h
jmp short loc_44F0A
loc_44F01:
xor r14d, r14d
loc_44F04:
xor r15d, r15d
xor r13d, r13d
loc_44F0A:
mov rdi, [r12+1000D0h]
test rdi, rdi
jnz loc_44FA7
loc_44F1B:
add r12, 100090h
mov rdi, r12
call _pthread_mutex_unlock
test r14b, r14b
jz short loc_44F5B
test r13d, r13d
mov rdx, [rbp+var_30]
jz short loc_44F8A
inc r15
shl r13d, 9
xor eax, eax
loc_44F41:
mov cl, [r15]
mov [rdx+rax+200h], cl
inc r15
add rax, 200h
cmp r13, rax
jnz short loc_44F41
jmp short loc_44F8A
loc_44F5B:
lea rsi, [rbp+var_70]
mov r14, [rbp+var_30]
mov [rsi], r14
shr ebx, 0Dh
mov [rsi+8], rbx
lea rax, [rbp+var_C8]
mov [rsi+10h], rax
xor ebx, ebx
xor edi, edi
call translog_page_validator
mov rdx, r14
test al, al
cmovnz rdx, rbx
loc_44F8A:
mov rax, rdx
jmp loc_44DE8
loc_44F92:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_44D83
loc_44FA7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_44F1B
|
long long translog_get_page(long long **a1, long long a2, _QWORD *a3)
{
long long v3; // r14
long long v4; // rax
long long v5; // rbx
long long v6; // r13
long long *i; // r12
long long v8; // r14
long long v9; // r15
long long v10; // rax
char v11; // r13
long long v12; // rax
long long v13; // r15
long long v14; // rbx
unsigned int v15; // r14d
int v16; // r8d
long long result; // rax
long long v18; // rdx
unsigned int v19; // r13d
int logfile_by_number; // eax
long long v21; // rax
unsigned int v22; // ecx
long long v23; // rdx
unsigned long long v24; // r14
char v25; // r14
long long v26; // r15
_BYTE *v27; // r15
long long v28; // r13
long long v29; // rax
long long v30; // r14
char v31; // al
_QWORD v32[15]; // [rsp+8h] [rbp-C8h] BYREF
long long **v33; // [rsp+80h] [rbp-50h]
_QWORD *v34; // [rsp+88h] [rbp-48h]
unsigned long long v35; // [rsp+90h] [rbp-40h]
unsigned int v36; // [rsp+9Ch] [rbp-34h]
long long v37; // [rsp+A0h] [rbp-30h]
v37 = a2;
v33 = a1;
v3 = **a1;
v35 = HIDWORD(v3);
if ( a3 )
*a3 = 0LL;
v34 = a3;
v4 = translog_only_in_buffers();
if ( v4 != 0 && v3 >= v4 )
{
while ( 1 )
{
translog_lock();
if ( v3 < translog_only_in_buffers() )
break;
v5 = v3;
LOBYTE(v6) = BYTE6(xmmword_C27830);
for ( i = (long long *)*((_QWORD *)&xmmword_C27820 + 1); ; i = &log_descriptor[131108 * v6 + 95] )
{
v8 = i[131079];
if ( v8 )
{
v9 = i[131074];
if ( v5 >= v9 )
{
v10 = i[131075];
if ( !v10 )
v10 = v9 + *((unsigned int *)i + 262156);
if ( v5 < v10 )
break;
}
}
v6 = ((_BYTE)v6 + 1) & 7;
translog_buffer_lock((long long)&log_descriptor[131108 * v6 + 95]);
if ( i[131098] )
PSI_server[44]();
pthread_mutex_unlock(i + 131090);
}
v36 = *((_DWORD *)i + 262157);
v11 = *((_BYTE *)i + 1048793);
translog_wait_for_writers(i);
if ( v9 == i[131074] && v8 == i[131079] && v11 == *((_BYTE *)i + 1048793) )
{
v18 = v5 - v9;
v19 = 0;
if ( v36 != 0 && v5 == v9 )
{
logfile_by_number = get_logfile_by_number(v35);
v21 = pagecache_read(log_descriptor[0], logfile_by_number + 8, (unsigned int)v5 >> 13, 3, v37, 1, 0, 0LL);
v18 = v5 - v9;
v22 = v36;
if ( !v21 )
return 0LL;
}
else
{
v22 = 0;
v21 = v37;
}
v24 = (unsigned long long)i + v18;
v37 = v21;
memcpy(v21 + v22, (char *)i + v18 + v22, 0x2000 - v22);
qmemcpy(v32, (const void *)i[131079], 0x58uLL);
v32[9] = v32;
if ( *((long long **)&xmmword_C27820 + 1) != i )
{
v25 = 0;
v26 = 0LL;
LABEL_39:
if ( i[131098] )
PSI_server[44]();
pthread_mutex_unlock(i + 131090);
if ( v25 )
{
v23 = v37;
if ( v19 )
{
v27 = (_BYTE *)(v26 + 1);
v28 = v19 << 9;
v29 = 0LL;
do
{
*(_BYTE *)(v23 + v29 + 512) = *v27++;
v29 += 512LL;
}
while ( v28 != v29 );
}
}
else
{
v30 = v37;
v32[11] = v37;
v32[12] = (unsigned int)v5 >> 13;
v32[13] = v32;
v31 = translog_page_validator(0LL);
v23 = v30;
if ( v31 )
return 0LL;
}
return v23;
}
if ( (unsigned long long)xmmword_C27820 >= v24 && (unsigned long long)xmmword_C27820 < v24 + 0x2000 )
{
v25 = 1;
if ( (*(_BYTE *)(v37 + 6) & 2) != 0 )
{
v19 = ((unsigned int)WORD2(xmmword_C27830) - 1) >> 9;
v26 = v37 + (unsigned __int16)word_426BD4 - 16;
goto LABEL_39;
}
}
else
{
v25 = 0;
}
v26 = 0LL;
v19 = 0;
goto LABEL_39;
}
if ( i[131098] )
PSI_server[44]();
pthread_mutex_unlock(i + 131090);
v12 = translog_only_in_buffers();
v3 = v5;
if ( !v12 || v5 < v12 )
goto LABEL_25;
}
v13 = *((_QWORD *)&xmmword_C27820 + 1);
if ( *(_QWORD *)(*((_QWORD *)&xmmword_C27820 + 1) + 1048784LL) )
PSI_server[44]();
pthread_mutex_unlock(v13 + 1048720);
}
LABEL_25:
v14 = get_logfile_by_number(v35);
v15 = (unsigned int)v3 >> 13;
v16 = 0;
if ( !v34 )
v16 = v37;
result = pagecache_read(log_descriptor[0], (int)v14 + 8, v15, 3, v16, 1, 3 * (unsigned int)(v34 != 0LL), (long long)v34);
*((_BYTE *)v33 + 8) = *(_BYTE *)(v14 + 80);
return result;
}
|
translog_get_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x50],RDI
MOV RAX,qword ptr [RDI]
MOV R14,qword ptr [RAX]
MOV RAX,R14
SHR RAX,0x20
MOV qword ptr [RBP + -0x40],RAX
TEST RDX,RDX
JZ 0x00144c15
MOV qword ptr [RDX],0x0
LAB_00144c15:
MOV qword ptr [RBP + -0x48],RDX
CALL 0x0014970a
TEST RAX,RAX
SETZ CL
CMP R14,RAX
SETL AL
OR AL,CL
JNZ 0x00144d92
LAB_00144c32:
CALL 0x00143693
CALL 0x0014970a
CMP R14,RAX
JL 0x00144d6c
MOV RBX,R14
MOVZX R13D,byte ptr [0x00d27836]
MOV R12,qword ptr [0x00d27828]
LAB_00144c57:
MOV R14,qword ptr [R12 + 0x100038]
TEST R14,R14
JZ 0x00144c8e
MOV R15,qword ptr [R12 + 0x100010]
CMP RBX,R15
JL 0x00144c8e
MOV RAX,qword ptr [R12 + 0x100018]
TEST RAX,RAX
JNZ 0x00144c89
MOV EAX,dword ptr [R12 + 0x100030]
ADD RAX,R15
LAB_00144c89:
CMP RBX,RAX
JL 0x00144ce9
LAB_00144c8e:
INC R13D
AND R13D,0x7
IMUL RAX,R13,0x100120
LEA RCX,[0x526bb0]
LEA R15,[RAX + RCX*0x1]
ADD R15,0x2f8
MOV RDI,R15
CALL 0x00143733
MOV RDI,qword ptr [R12 + 0x1000d0]
TEST RDI,RDI
JNZ 0x00144cd7
LAB_00144cc3:
ADD R12,0x100090
MOV RDI,R12
CALL 0x0012a1f0
MOV R12,R15
JMP 0x00144c57
LAB_00144cd7:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00144cc3
LAB_00144ce9:
MOV EAX,dword ptr [R12 + 0x100034]
MOV dword ptr [RBP + -0x34],EAX
MOV R13B,byte ptr [R12 + 0x1000d9]
MOV RDI,R12
CALL 0x001496a0
CMP R15,qword ptr [R12 + 0x100010]
JNZ 0x00144d26
CMP R14,qword ptr [R12 + 0x100038]
JNZ 0x00144d26
CMP R13B,byte ptr [R12 + 0x1000d9]
JZ 0x00144dfa
LAB_00144d26:
MOV RDI,qword ptr [R12 + 0x1000d0]
TEST RDI,RDI
JNZ 0x00144d5a
LAB_00144d33:
ADD R12,0x100090
MOV RDI,R12
CALL 0x0012a1f0
CALL 0x0014970a
TEST RAX,RAX
MOV R14,RBX
JZ 0x00144d92
CMP R14,RAX
JGE 0x00144c32
JMP 0x00144d92
LAB_00144d5a:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00144d33
LAB_00144d6c:
MOV R15,qword ptr [0x00d27828]
MOV RDI,qword ptr [R15 + 0x1000d0]
TEST RDI,RDI
JNZ 0x00144f92
LAB_00144d83:
ADD R15,0x100090
MOV RDI,R15
CALL 0x0012a1f0
LAB_00144d92:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0014941e
MOV RBX,RAX
LEA RSI,[RAX + 0x8]
SHR R14D,0xd
XOR R8D,R8D
XOR EAX,EAX
MOV R10,qword ptr [RBP + -0x48]
TEST R10,R10
SETNZ AL
MOV RDI,qword ptr [0x00526bb0]
CMOVZ R8,qword ptr [RBP + -0x30]
LEA EAX,[RAX + RAX*0x2]
MOV RDX,R14
MOV ECX,0x3
MOV R9D,0x1
PUSH R10
PUSH RAX
CALL 0x0014c256
ADD RSP,0x10
MOV CL,byte ptr [RBX + 0x50]
MOV RDX,qword ptr [RBP + -0x50]
MOV byte ptr [RDX + 0x8],CL
LAB_00144de8:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144dfa:
CMP dword ptr [RBP + -0x34],0x0
SETNZ AL
MOV RDX,RBX
SUB RDX,R15
SETZ CL
AND CL,AL
XOR R13D,R13D
CMP CL,0x1
JNZ 0x00144e62
MOV R14,RBX
MOV RDI,qword ptr [RBP + -0x40]
MOV R15,RDX
CALL 0x0014941e
MOV RDI,qword ptr [0x00526bb0]
LEA RSI,[RAX + 0x8]
MOV EDX,R14D
SHR EDX,0xd
MOV ECX,0x3
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,0x1
PUSH 0x0
PUSH 0x0
CALL 0x0014c256
MOV RDX,R15
MOV ECX,dword ptr [RBP + -0x34]
ADD RSP,0x10
TEST RAX,RAX
JNZ 0x00144e68
XOR EDX,EDX
JMP 0x00144f8a
LAB_00144e62:
XOR ECX,ECX
MOV RAX,qword ptr [RBP + -0x30]
LAB_00144e68:
LEA R14,[R12 + RDX*0x1]
MOV ESI,ECX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RAX + RSI*0x1]
ADD RSI,R14
MOV EDX,0x2000
SUB EDX,ECX
CALL 0x0012a0b0
MOV RSI,qword ptr [R12 + 0x100038]
LEA RAX,[RBP + -0xc8]
MOV ECX,0xb
MOV RDI,RAX
MOVSQ.REP RDI,RSI
MOV qword ptr [RAX + 0x48],RAX
CMP qword ptr [0x00d27828],R12
JZ 0x00144eb4
XOR R14D,R14D
XOR R15D,R15D
JMP 0x00144f0a
LAB_00144eb4:
MOV RAX,qword ptr [0x00d27820]
CMP RAX,R14
SETNC CL
ADD R14,0x2000
CMP RAX,R14
SETC AL
AND AL,CL
CMP AL,0x1
JNZ 0x00144f01
MOV R14B,0x1
MOV RCX,qword ptr [RBP + -0x30]
TEST byte ptr [RCX + 0x6],0x2
JZ 0x00144f04
MOVZX R13D,word ptr [0x00d27834]
DEC R13D
SHR R13D,0x9
MOVZX EAX,word ptr [0x00526bd4]
LEA R15,[RCX + RAX*0x1]
ADD R15,-0x10
JMP 0x00144f0a
LAB_00144f01:
XOR R14D,R14D
LAB_00144f04:
XOR R15D,R15D
XOR R13D,R13D
LAB_00144f0a:
MOV RDI,qword ptr [R12 + 0x1000d0]
TEST RDI,RDI
JNZ 0x00144fa7
LAB_00144f1b:
ADD R12,0x100090
MOV RDI,R12
CALL 0x0012a1f0
TEST R14B,R14B
JZ 0x00144f5b
TEST R13D,R13D
MOV RDX,qword ptr [RBP + -0x30]
JZ 0x00144f8a
INC R15
SHL R13D,0x9
XOR EAX,EAX
LAB_00144f41:
MOV CL,byte ptr [R15]
MOV byte ptr [RDX + RAX*0x1 + 0x200],CL
INC R15
ADD RAX,0x200
CMP R13,RAX
JNZ 0x00144f41
JMP 0x00144f8a
LAB_00144f5b:
LEA RSI,[RBP + -0x70]
MOV R14,qword ptr [RBP + -0x30]
MOV qword ptr [RSI],R14
SHR EBX,0xd
MOV qword ptr [RSI + 0x8],RBX
LEA RAX,[RBP + -0xc8]
MOV qword ptr [RSI + 0x10],RAX
XOR EBX,EBX
XOR EDI,EDI
CALL 0x0014949f
MOV RDX,R14
TEST AL,AL
CMOVNZ RDX,RBX
LAB_00144f8a:
MOV RAX,RDX
JMP 0x00144de8
LAB_00144f92:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00144d83
LAB_00144fa7:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00144f1b
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long translog_get_page(int8 *param_1,long param_2,int8 *param_3)
{
int *puVar1;
bool bVar2;
bool bVar3;
char cVar4;
long lVar5;
long lVar6;
long lVar7;
ulong uVar8;
uint uVar9;
int8 *puVar10;
int8 *puVar11;
int *puVar12;
uint uVar13;
ulong uVar14;
int1 *puVar15;
byte bVar16;
int8 local_d0 [9];
int8 *local_88;
long local_78;
ulong local_70;
int8 *local_68;
int8 *local_58;
int8 *local_50;
ulong local_48;
uint local_3c;
long local_38;
bVar16 = 0;
uVar8 = *(ulong *)*param_1;
local_48 = uVar8 >> 0x20;
if (param_3 != (int8 *)0x0) {
*param_3 = 0;
}
local_58 = param_1;
local_50 = param_3;
local_38 = param_2;
lVar5 = translog_only_in_buffers();
if ((long)uVar8 < lVar5 || lVar5 == 0) {
LAB_00144d92:
lVar7 = get_logfile_by_number(local_48);
lVar5 = 0;
if (local_50 == (int8 *)0x0) {
lVar5 = local_38;
}
lVar5 = pagecache_read(log_descriptor,lVar7 + 8,uVar8 >> 0xd & 0x7ffff,3,lVar5,1,
(local_50 != (int8 *)0x0) * '\x03',local_50);
*(int1 *)(local_58 + 1) = *(int1 *)(lVar7 + 0x50);
return lVar5;
}
LAB_00144c32:
translog_lock();
lVar5 = translog_only_in_buffers();
puVar12 = DAT_00d27828;
if (lVar5 <= (long)uVar8) {
uVar14 = (ulong)DAT_00d27836;
do {
lVar5 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0x2f));
if ((lVar5 != 0) &&
(lVar7 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 7)),
lVar7 <= (long)uVar8)) {
lVar6 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0xf));
if (lVar6 == 0) {
lVar6 = (ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0x27)) + lVar7
;
}
if ((long)uVar8 < lVar6) goto LAB_00144ce9;
}
uVar14 = (ulong)((int)uVar14 + 1U & 7);
translog_buffer_lock(&DAT_00526ea8 + uVar14 * 0x100120);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + (long)puVar12) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock
((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + (long)puVar12));
puVar12 = &DAT_00526ea8 + uVar14 * 0x100120;
} while( true );
}
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + (long)DAT_00d27828) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock
((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + (long)puVar12));
goto LAB_00144d92;
LAB_00144ce9:
local_3c = *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0x2b));
cVar4 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + (long)(puVar12 + 1));
translog_wait_for_writers(puVar12);
if (((lVar7 != *(long *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 7))) ||
(lVar5 != *(long *)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0x2f)))) ||
(cVar4 != *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + (long)(puVar12 + 1)))) {
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + (long)puVar12) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock
((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + (long)puVar12));
lVar5 = translog_only_in_buffers();
if ((lVar5 == 0) || ((long)uVar8 < lVar5)) goto LAB_00144d92;
goto LAB_00144c32;
}
uVar13 = 0;
if (uVar8 - lVar7 == 0 && local_3c != 0) {
lVar5 = get_logfile_by_number(local_48);
local_38 = pagecache_read(log_descriptor,lVar5 + 8,uVar8 >> 0xd & 0x7ffff,3,local_38,1,0,0);
uVar9 = local_3c;
if (local_38 == 0) {
return 0;
}
}
else {
uVar9 = 0;
}
puVar1 = puVar12 + (uVar8 - lVar7);
memcpy((void *)(local_38 + (ulong)uVar9),puVar1 + uVar9,(ulong)(0x2000 - uVar9));
local_88 = local_d0;
puVar10 = *(int8 **)(Elf64_Ehdr_00100000.e_ident_pad + (long)(puVar12 + 0x2f));
puVar11 = local_88;
for (lVar5 = 0xb; lVar5 != 0; lVar5 = lVar5 + -1) {
*puVar11 = *puVar10;
puVar10 = puVar10 + (ulong)bVar16 * -2 + 1;
puVar11 = puVar11 + (ulong)bVar16 * -2 + 1;
}
if (DAT_00d27828 == puVar12) {
if (DAT_00d27820 < puVar1 + 0x2000 && puVar1 <= DAT_00d27820) {
bVar2 = true;
bVar3 = true;
if ((*(byte *)(local_38 + 6) & 2) != 0) {
uVar13 = _DAT_00d27834 - 1 >> 9;
puVar15 = (int1 *)(local_38 + (ulong)DAT_00526bd4 + -0x10);
goto LAB_00144f0a;
}
}
else {
bVar3 = false;
}
bVar2 = bVar3;
puVar15 = (int1 *)0x0;
uVar13 = 0;
}
else {
bVar2 = false;
puVar15 = (int1 *)0x0;
}
LAB_00144f0a:
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + (long)puVar12) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock
((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + (long)puVar12));
lVar5 = local_38;
if (bVar2) {
if (uVar13 != 0) {
uVar8 = 0;
do {
puVar15 = puVar15 + 1;
*(int1 *)(local_38 + 0x200 + uVar8) = *puVar15;
uVar8 = uVar8 + 0x200;
} while (uVar13 << 9 != uVar8);
}
}
else {
local_78 = local_38;
local_70 = uVar8 >> 0xd & 0x7ffff;
local_68 = local_d0;
cVar4 = translog_page_validator(0);
if (cVar4 != '\0') {
lVar5 = 0;
}
}
return lVar5;
}
|
|
12,678
|
wt_thd_cond_timedwait
|
eloqsql/mysys/waiting_threads.c
|
int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex)
{
int ret= WT_TIMEOUT;
struct timespec timeout;
my_hrtime_t before, after, starttime;
WT_RESOURCE *rc= thd->waiting_for;
ulonglong end_wait_time;
DBUG_ENTER("wt_thd_cond_timedwait");
DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc));
#ifndef DBUG_OFF
if (rc->cond_mutex)
DBUG_ASSERT(rc->cond_mutex == mutex);
else
rc->cond_mutex= mutex;
mysql_mutex_assert_owner(mutex);
#endif
before= starttime= my_hrtime();
rc_wrlock(rc);
if (rc->owners.elements == 0)
ret= WT_OK;
rc_unlock(rc);
end_wait_time= starttime.val *1000 + (*thd->timeout_short)*1000000ULL;
set_timespec_time_nsec(timeout, end_wait_time);
if (ret == WT_TIMEOUT && !thd->killed)
ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout);
if (ret == WT_TIMEOUT && !thd->killed)
{
int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long);
if (r == WT_FREE_TO_GO)
ret= WT_OK;
else if (r != WT_OK)
ret= WT_DEADLOCK;
else if (*thd->timeout_long > *thd->timeout_short)
{
end_wait_time= starttime.val *1000 + (*thd->timeout_long)*1000000ULL;
set_timespec_time_nsec(timeout, end_wait_time);
if (!thd->killed)
ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout);
}
}
after= my_hrtime();
if (stop_waiting(thd) == WT_DEADLOCK) /* if we're killed */
ret= WT_DEADLOCK;
increment_wait_stats(after.val-before.val, ret);
if (ret == WT_OK)
increment_success_stats();
DBUG_RETURN(ret);
}
|
O3
|
c
|
wt_thd_cond_timedwait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
movq 0x28(%rdi), %r15
callq 0x9e0d8
movq %rax, %r13
leaq 0x18(%r15), %r12
movq %r12, %rdi
callq 0xa3f95
movl 0xe8(%r15), %ebx
movq %r12, %rdi
callq 0xa4036
movq 0x38(%r14), %rax
imulq $0xf4240, (%rax), %rcx # imm = 0xF4240
movq %r13, -0x48(%rbp)
imulq $0x3e8, %r13, %r13 # imm = 0x3E8
addq %r13, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rdx, -0x38(%rbp)
movq %rcx, -0x30(%rbp)
testl %ebx, %ebx
je 0xa6b72
cmpb $0x0, 0x60(%r14)
je 0xa6b7a
movl $0x6e, %r12d
jmp 0xa6c44
xorl %r12d, %r12d
jmp 0xa6c44
leaq 0xa8(%r15), %rdi
cmpq $0x0, 0xd8(%r15)
jne 0xa6cc8
leaq -0x38(%rbp), %rdx
movq %rdi, %r15
movq -0x40(%rbp), %rbx
movq %rbx, %rsi
callq 0x29680
movl %eax, %r12d
cmpl $0x6e, %eax
jne 0xa6c44
cmpb $0x0, 0x60(%r14)
jne 0xa6b67
movq 0x50(%r14), %rax
movl (%rax), %ecx
xorl %r12d, %r12d
movq %r14, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xa6952
cmpl $-0x3, %eax
je 0xa6c44
testl %eax, %eax
jne 0xa6c3e
movq 0x38(%r14), %rcx
movq 0x48(%r14), %rax
movq (%rax), %rax
cmpq (%rcx), %rax
jbe 0xa6b67
imulq $0xf4240, %rax, %rcx # imm = 0xF4240
addq %r13, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, -0x38(%rbp)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, -0x30(%rbp)
cmpb $0x0, 0x60(%r14)
movl $0x6e, %r12d
jne 0xa6c44
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movl $0x437, %ecx # imm = 0x437
callq 0xa6ced
movl %eax, %r12d
jmp 0xa6c44
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
callq 0x9e0d8
movq %rax, %r15
movq %r14, %rdi
callq 0xa6a8a
cmpl $-0x1, %eax
cmovel %eax, %r12d
leaq 0xb61f3e(%rip), %rcx # 0xc08ba0
cmpl $0x6e, %r12d
jne 0xa6c6e
addq $0x60, %rcx
jmp 0xa6cb4
subq -0x48(%rbp), %r15
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
movq %r15, %rax
mulq %rdx
shrq $0x3, %rdx
xorl %eax, %eax
leaq 0xb62091(%rip), %rsi # 0xc08d20
cmpq (%rsi,%rax,8), %rdx
jbe 0xa6ca3
incq %rax
cmpq $0x18, %rax
jne 0xa6c8f
movl $0x18, %eax
movl %eax, %eax
incl (%rcx,%rax,4)
testl %r12d, %r12d
jne 0xa6cb6
leaq 0xb62064(%rip), %rcx # 0xc08d18
incl (%rcx)
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x359e3(%rip), %rcx # 0xdc6b2
leaq -0x38(%rbp), %rdx
movq %rdi, %r15
movq -0x40(%rbp), %rbx
movq %rbx, %rsi
movl $0x42a, %r8d # imm = 0x42A
callq 0x2ef10
jmp 0xa6ba2
|
wt_thd_cond_timedwait:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_40], rsi
mov r14, rdi
mov r15, [rdi+28h]
call my_hrtime
mov r13, rax
lea r12, [r15+18h]
mov rdi, r12
call my_rw_wrlock
mov ebx, [r15+0E8h]
mov rdi, r12
call my_rw_unlock
mov rax, [r14+38h]
imul rcx, [rax], 0F4240h
mov [rbp+var_48], r13
imul r13, 3E8h
add rcx, r13
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_38], rdx
mov [rbp+var_30], rcx
test ebx, ebx
jz short loc_A6B72
cmp byte ptr [r14+60h], 0
jz short loc_A6B7A
loc_A6B67:
mov r12d, 6Eh ; 'n'
jmp loc_A6C44
loc_A6B72:
xor r12d, r12d
jmp loc_A6C44
loc_A6B7A:
lea rdi, [r15+0A8h]
cmp qword ptr [r15+0D8h], 0
jnz loc_A6CC8
lea rdx, [rbp+var_38]
mov r15, rdi
mov rbx, [rbp+var_40]
mov rsi, rbx
call _pthread_cond_timedwait
loc_A6BA2:
mov r12d, eax
cmp eax, 6Eh ; 'n'
jnz loc_A6C44
cmp byte ptr [r14+60h], 0
jnz short loc_A6B67
mov rax, [r14+50h]
mov ecx, [rax]
xor r12d, r12d
mov rdi, r14
mov rsi, r14
xor edx, edx
call deadlock
cmp eax, 0FFFFFFFDh
jz short loc_A6C44
test eax, eax
jnz short loc_A6C3E
mov rcx, [r14+38h]
mov rax, [r14+48h]
mov rax, [rax]
cmp rax, [rcx]
jbe short loc_A6B67
imul rcx, rax, 0F4240h
add rcx, r13
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov [rbp+var_38], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_30], rcx
cmp byte ptr [r14+60h], 0
mov r12d, 6Eh ; 'n'
jnz short loc_A6C44
lea rdx, [rbp+var_38]
mov rdi, r15
mov rsi, rbx
mov ecx, 437h
call inline_mysql_cond_timedwait
mov r12d, eax
jmp short loc_A6C44
loc_A6C3E:
mov r12d, 0FFFFFFFFh
loc_A6C44:
call my_hrtime
mov r15, rax
mov rdi, r14
call stop_waiting
cmp eax, 0FFFFFFFFh
cmovz r12d, eax
lea rcx, wt_wait_stats
cmp r12d, 6Eh ; 'n'
jnz short loc_A6C6E
add rcx, 60h ; '`'
jmp short loc_A6CB4
loc_A6C6E:
sub r15, [rbp+var_48]
mov rdx, 0CCCCCCCCCCCCCCCDh
mov rax, r15
mul rdx
shr rdx, 3
xor eax, eax
lea rsi, wt_wait_table
loc_A6C8F:
cmp rdx, [rsi+rax*8]
jbe short loc_A6CA3
inc rax
cmp rax, 18h
jnz short loc_A6C8F
mov eax, 18h
loc_A6CA3:
mov eax, eax
inc dword ptr [rcx+rax*4]
test r12d, r12d
jnz short loc_A6CB6
lea rcx, wt_success_stats
loc_A6CB4:
inc dword ptr [rcx]
loc_A6CB6:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A6CC8:
lea rcx, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, [rbp+var_38]
mov r15, rdi
mov rbx, [rbp+var_40]
mov rsi, rbx
mov r8d, 42Ah
call psi_cond_timedwait
jmp loc_A6BA2
|
long long wt_thd_cond_timedwait(long long a1, long long a2)
{
long long v3; // r15
unsigned long long v4; // r13
int v5; // ebx
long long v6; // r13
unsigned long long v7; // rcx
unsigned int v8; // r12d
long long v9; // rdi
long long v10; // r15
long long v11; // rbx
unsigned int v12; // eax
int v13; // eax
unsigned long long v14; // rax
unsigned long long v15; // r15
_DWORD *v16; // rcx
long long v17; // rax
unsigned long long v19; // [rsp+8h] [rbp-48h]
unsigned long long v20; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v21; // [rsp+20h] [rbp-30h]
v3 = *(_QWORD *)(a1 + 40);
v4 = my_hrtime();
my_rw_wrlock(v3 + 24);
v5 = *(_DWORD *)(v3 + 232);
my_rw_unlock(v3 + 24);
v19 = v4;
v6 = 1000 * v4;
v7 = v6 + 1000000LL * **(_QWORD **)(a1 + 56);
v20 = v7 / 0x3B9ACA00;
v21 = v7 % 0x3B9ACA00;
if ( !v5 )
{
v8 = 0;
goto LABEL_15;
}
if ( *(_BYTE *)(a1 + 96) )
goto LABEL_3;
v9 = v3 + 168;
if ( *(_QWORD *)(v3 + 216) )
{
v10 = v3 + 168;
v11 = a2;
v12 = psi_cond_timedwait(
v9,
a2,
(long long)&v20,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c",
0x42Au);
}
else
{
v10 = v3 + 168;
v11 = a2;
v12 = pthread_cond_timedwait(v9, a2, &v20);
}
v8 = v12;
if ( v12 != 110 )
goto LABEL_15;
if ( *(_BYTE *)(a1 + 96) )
goto LABEL_3;
v8 = 0;
v13 = deadlock(a1, a1, 0, **(_DWORD **)(a1 + 80));
if ( v13 == -3 )
goto LABEL_15;
if ( v13 )
{
v8 = -1;
goto LABEL_15;
}
v14 = **(_QWORD **)(a1 + 72);
if ( v14 <= **(_QWORD **)(a1 + 56) )
{
LABEL_3:
v8 = 110;
goto LABEL_15;
}
v20 = (v6 + 1000000 * v14) / 0x3B9ACA00;
v21 = (v6 + 1000000 * v14) % 0x3B9ACA00;
v8 = 110;
if ( !*(_BYTE *)(a1 + 96) )
v8 = inline_mysql_cond_timedwait(v10, v11, &v20, 1079LL);
LABEL_15:
v15 = my_hrtime();
if ( (unsigned int)stop_waiting(a1) == -1 )
v8 = -1;
if ( v8 == 110 )
{
v16 = &wt_wait_stats[24];
LABEL_25:
++*v16;
return v8;
}
v17 = 0LL;
while ( (v15 - v19) / 0xA > wt_wait_table[v17] )
{
if ( ++v17 == 24 )
{
LODWORD(v17) = 24;
break;
}
}
++wt_wait_stats[(unsigned int)v17];
if ( !v8 )
{
v16 = &wt_success_stats;
goto LABEL_25;
}
return v8;
}
|
wt_thd_cond_timedwait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x40],RSI
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x28]
CALL 0x0019e0d8
MOV R13,RAX
LEA R12,[R15 + 0x18]
MOV RDI,R12
CALL 0x001a3f95
MOV EBX,dword ptr [R15 + 0xe8]
MOV RDI,R12
CALL 0x001a4036
MOV RAX,qword ptr [R14 + 0x38]
IMUL RCX,qword ptr [RAX],0xf4240
MOV qword ptr [RBP + -0x48],R13
IMUL R13,R13,0x3e8
ADD RCX,R13
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x30],RCX
TEST EBX,EBX
JZ 0x001a6b72
CMP byte ptr [R14 + 0x60],0x0
JZ 0x001a6b7a
LAB_001a6b67:
MOV R12D,0x6e
JMP 0x001a6c44
LAB_001a6b72:
XOR R12D,R12D
JMP 0x001a6c44
LAB_001a6b7a:
LEA RDI,[R15 + 0xa8]
CMP qword ptr [R15 + 0xd8],0x0
JNZ 0x001a6cc8
LEA RDX,[RBP + -0x38]
MOV R15,RDI
MOV RBX,qword ptr [RBP + -0x40]
MOV RSI,RBX
CALL 0x00129680
LAB_001a6ba2:
MOV R12D,EAX
CMP EAX,0x6e
JNZ 0x001a6c44
CMP byte ptr [R14 + 0x60],0x0
JNZ 0x001a6b67
MOV RAX,qword ptr [R14 + 0x50]
MOV ECX,dword ptr [RAX]
XOR R12D,R12D
MOV RDI,R14
MOV RSI,R14
XOR EDX,EDX
CALL 0x001a6952
CMP EAX,-0x3
JZ 0x001a6c44
TEST EAX,EAX
JNZ 0x001a6c3e
MOV RCX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [R14 + 0x48]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RCX]
JBE 0x001a6b67
IMUL RCX,RAX,0xf4240
ADD RCX,R13
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV qword ptr [RBP + -0x38],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x30],RCX
CMP byte ptr [R14 + 0x60],0x0
MOV R12D,0x6e
JNZ 0x001a6c44
LEA RDX,[RBP + -0x38]
MOV RDI,R15
MOV RSI,RBX
MOV ECX,0x437
CALL 0x001a6ced
MOV R12D,EAX
JMP 0x001a6c44
LAB_001a6c3e:
MOV R12D,0xffffffff
LAB_001a6c44:
CALL 0x0019e0d8
MOV R15,RAX
MOV RDI,R14
CALL 0x001a6a8a
CMP EAX,-0x1
CMOVZ R12D,EAX
LEA RCX,[0xd08ba0]
CMP R12D,0x6e
JNZ 0x001a6c6e
ADD RCX,0x60
JMP 0x001a6cb4
LAB_001a6c6e:
SUB R15,qword ptr [RBP + -0x48]
MOV RDX,-0x3333333333333333
MOV RAX,R15
MUL RDX
SHR RDX,0x3
XOR EAX,EAX
LEA RSI,[0xd08d20]
LAB_001a6c8f:
CMP RDX,qword ptr [RSI + RAX*0x8]
JBE 0x001a6ca3
INC RAX
CMP RAX,0x18
JNZ 0x001a6c8f
MOV EAX,0x18
LAB_001a6ca3:
MOV EAX,EAX
INC dword ptr [RCX + RAX*0x4]
TEST R12D,R12D
JNZ 0x001a6cb6
LEA RCX,[0xd08d18]
LAB_001a6cb4:
INC dword ptr [RCX]
LAB_001a6cb6:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a6cc8:
LEA RCX,[0x1dc6b2]
LEA RDX,[RBP + -0x38]
MOV R15,RDI
MOV RBX,qword ptr [RBP + -0x40]
MOV RSI,RBX
MOV R8D,0x42a
CALL 0x0012ef10
JMP 0x001a6ba2
|
int wt_thd_cond_timedwait(long param_1,pthread_mutex_t *param_2)
{
pthread_cond_t *__cond;
int iVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
int *piVar6;
timespec local_40;
lVar4 = *(long *)(param_1 + 0x28);
lVar3 = my_hrtime();
my_rw_wrlock(lVar4 + 0x18);
iVar1 = *(int *)(lVar4 + 0xe8);
my_rw_unlock(lVar4 + 0x18);
local_40.tv_nsec = **(long **)(param_1 + 0x38) * 1000000 + lVar3 * 1000;
local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000;
local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000;
if (iVar1 == 0) {
iVar1 = 0;
goto LAB_001a6c44;
}
if (*(char *)(param_1 + 0x60) == '\0') {
__cond = (pthread_cond_t *)(lVar4 + 0xa8);
if (*(long *)(lVar4 + 0xd8) == 0) {
iVar1 = pthread_cond_timedwait(__cond,param_2,&local_40);
}
else {
iVar1 = psi_cond_timedwait(__cond,param_2,&local_40,
"/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c",
0x42a);
}
if (iVar1 != 0x6e) goto LAB_001a6c44;
if (*(char *)(param_1 + 0x60) == '\0') {
iVar1 = 0;
iVar2 = deadlock(param_1,param_1,0,**(int4 **)(param_1 + 0x50));
if (iVar2 == -3) goto LAB_001a6c44;
if (iVar2 != 0) {
iVar1 = -1;
goto LAB_001a6c44;
}
if (**(ulong **)(param_1 + 0x38) < **(ulong **)(param_1 + 0x48)) {
local_40.tv_nsec = **(ulong **)(param_1 + 0x48) * 1000000 + lVar3 * 1000;
local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000;
local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000;
iVar1 = 0x6e;
if (*(char *)(param_1 + 0x60) == '\0') {
iVar1 = inline_mysql_cond_timedwait(__cond,param_2,&local_40,0x437);
}
goto LAB_001a6c44;
}
}
}
iVar1 = 0x6e;
LAB_001a6c44:
lVar4 = my_hrtime();
iVar2 = stop_waiting(param_1);
if (iVar2 == -1) {
iVar1 = -1;
}
if (iVar1 == 0x6e) {
piVar6 = &DAT_00d08c00;
}
else {
uVar5 = 0;
do {
if ((ulong)(lVar4 - lVar3) / 10 <= (ulong)(&wt_wait_table)[uVar5]) goto LAB_001a6ca3;
uVar5 = uVar5 + 1;
} while (uVar5 != 0x18);
uVar5 = 0x18;
LAB_001a6ca3:
(&wt_wait_stats)[uVar5 & 0xffffffff] = (&wt_wait_stats)[uVar5 & 0xffffffff] + 1;
if (iVar1 != 0) {
return iVar1;
}
piVar6 = &wt_success_stats;
}
*piVar6 = *piVar6 + 1;
return iVar1;
}
|
|
12,679
|
strlength
|
eloqsql/mysys/mf_format.c
|
size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
}
|
O0
|
c
|
strlength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6e143
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x6e11c
jmp 0x6e0cf
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x6e0fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x6e105
jmp 0x6e107
jmp 0x6e0cf
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x6e11a
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6e143
jmp 0x6e11c
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x6e13e
jmp 0x6e124
jmp 0x6e0b4
jmp 0x6e145
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
|
strlength:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov [rbp+var_10], rax
loc_6E0B4:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz loc_6E143
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_6E11C
jmp short $+2
loc_6E0CF:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx ecx, byte ptr [rax+1]
xor eax, eax
cmp ecx, 0
mov [rbp+var_19], al
jz short loc_6E0FC
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setnz al
mov [rbp+var_19], al
loc_6E0FC:
mov al, [rbp+var_19]
test al, 1
jnz short loc_6E105
jmp short loc_6E107
loc_6E105:
jmp short loc_6E0CF
loc_6E107:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_6E11A
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
jmp short loc_6E143
loc_6E11A:
jmp short $+2
loc_6E11C:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_6E124:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx eax, byte ptr [rax+1]
cmp eax, 20h ; ' '
jnz short loc_6E13E
jmp short loc_6E124
loc_6E13E:
jmp loc_6E0B4
loc_6E143:
jmp short $+2
loc_6E145:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
sub rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
pop rbp
retn
|
long long strlength(_BYTE *a1)
{
_BYTE *v1; // rax
_BYTE *v2; // rax
bool v4; // [rsp+Fh] [rbp-19h]
_BYTE *v5; // [rsp+10h] [rbp-18h]
_BYTE *v6; // [rsp+18h] [rbp-10h]
v5 = a1;
v6 = a1;
while ( *v6 )
{
if ( *v6 != 32 )
{
do
{
v1 = v6++;
v4 = 0;
if ( v1[1] )
v4 = *v6 != 32;
}
while ( v4 );
if ( !*v6 )
{
v5 = v6;
return v5 - a1;
}
}
v5 = v6;
do
v2 = v6++;
while ( v2[1] == 32 );
}
return v5 - a1;
}
|
strlength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x10],RAX
LAB_0016e0b4:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0016e143
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0016e11c
JMP 0x0016e0cf
LAB_0016e0cf:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX ECX,byte ptr [RAX + 0x1]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0016e0fc
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0016e0fc:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0016e105
JMP 0x0016e107
LAB_0016e105:
JMP 0x0016e0cf
LAB_0016e107:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x0016e11a
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016e143
LAB_0016e11a:
JMP 0x0016e11c
LAB_0016e11c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_0016e124:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x20
JNZ 0x0016e13e
JMP 0x0016e124
LAB_0016e13e:
JMP 0x0016e0b4
LAB_0016e143:
JMP 0x0016e145
LAB_0016e145:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
char *local_20;
char *local_18;
local_20 = param_1;
local_18 = param_1;
while (*local_18 != '\0') {
if (*local_18 != ' ') {
do {
local_20 = local_18 + 1;
bVar3 = false;
if (local_18[1] != '\0') {
bVar3 = *local_20 != ' ';
}
local_18 = local_20;
} while (bVar3);
if (*local_20 == '\0') break;
}
local_20 = local_18;
do {
pcVar2 = local_18 + 1;
pcVar1 = local_18 + 1;
local_18 = pcVar2;
} while (*pcVar1 == ' ');
}
return (long)local_20 - (long)param_1;
}
|
|
12,680
|
StartTree::Matrix<double>::clear()
|
iqtree3/utils/bionj2.cpp
|
void clear() {
n = 0;
delete [] data;
delete [] rows;
delete [] rowTotals;
data = nullptr;
rows = nullptr;
rowTotals = nullptr;
}
|
O3
|
cpp
|
StartTree::Matrix<double>::clear():
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2661e
callq 0x15410
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2662c
callq 0x15410
movq 0x28(%rbx), %rdi
addq $0x18, %rbx
testq %rdi, %rdi
je 0x2663e
callq 0x15410
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
popq %rbx
retq
|
_ZN9StartTree6MatrixIdE5clearEv:
push rbx
mov rbx, rdi
mov qword ptr [rdi+8], 0
mov rdi, [rdi+18h]; void *
test rdi, rdi
jz short loc_2661E
call __ZdaPv; operator delete[](void *)
loc_2661E:
mov rdi, [rbx+20h]; void *
test rdi, rdi
jz short loc_2662C
call __ZdaPv; operator delete[](void *)
loc_2662C:
mov rdi, [rbx+28h]; void *
add rbx, 18h
test rdi, rdi
jz short loc_2663E
call __ZdaPv; operator delete[](void *)
loc_2663E:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
pop rbx
retn
|
void StartTree::Matrix<double>::clear(_QWORD *a1)
{
void *v2; // rdi
void *v3; // rdi
void *v4; // rdi
_QWORD *v5; // rbx
a1[1] = 0LL;
v2 = (void *)a1[3];
if ( v2 )
operator delete[](v2);
v3 = (void *)a1[4];
if ( v3 )
operator delete[](v3);
v4 = (void *)a1[5];
v5 = a1 + 3;
if ( v4 )
operator delete[](v4);
*(_OWORD *)v5 = 0LL;
v5[2] = 0LL;
}
|
clear:
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI + 0x8],0x0
MOV RDI,qword ptr [RDI + 0x18]
TEST RDI,RDI
JZ 0x0012661e
CALL 0x00115410
LAB_0012661e:
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x0012662c
CALL 0x00115410
LAB_0012662c:
MOV RDI,qword ptr [RBX + 0x28]
ADD RBX,0x18
TEST RDI,RDI
JZ 0x0012663e
CALL 0x00115410
LAB_0012663e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
POP RBX
RET
|
/* StartTree::Matrix<double>::clear() */
void __thiscall StartTree::Matrix<double>::clear(Matrix<double> *this)
{
*(int8 *)(this + 8) = 0;
if (*(void **)(this + 0x18) != (void *)0x0) {
operator_delete__(*(void **)(this + 0x18));
}
if (*(void **)(this + 0x20) != (void *)0x0) {
operator_delete__(*(void **)(this + 0x20));
}
if (*(void **)(this + 0x28) != (void *)0x0) {
operator_delete__(*(void **)(this + 0x28));
}
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
return;
}
|
|
12,681
|
unlink_from_queue
|
eloqsql/mysys/mf_keycache.c
|
static void unlink_from_queue(KEYCACHE_WQUEUE *wqueue,
struct st_my_thread_var *thread)
{
KEYCACHE_DBUG_PRINT("unlink_from_queue", ("thread %ld", (ulong) thread->id));
DBUG_ASSERT(thread->next && thread->prev);
if (thread->next == thread)
{
/* The queue contains only one member */
wqueue->last_thread= NULL;
}
else
{
/* Remove current element from list */
thread->next->prev= thread->prev;
*thread->prev= thread->next;
/* If first element, change list pointer to point to previous element */
if (wqueue->last_thread == thread)
wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next,
thread->prev);
}
thread->next= NULL;
#ifdef DBUG_ASSERT_EXISTS
/*
This makes it easier to see it's not in a chain during debugging.
And some DBUG_ASSERT() rely on it.
*/
thread->prev= NULL;
#endif
}
|
O0
|
c
|
unlink_from_queue:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xe501e
jmp 0xe5020
jmp 0xe5022
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xe5040
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xe509e
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xe509c
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
addq $-0x88, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe509e
movq -0x10(%rbp), %rax
movq $0x0, 0x88(%rax)
popq %rbp
retq
nop
|
unlink_from_queue:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_E501E:
jmp short $+2
loc_E5020:
jmp short $+2
loc_E5022:
mov rax, [rbp+var_10]
mov rax, [rax+88h]
cmp rax, [rbp+var_10]
jnz short loc_E5040
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
jmp short loc_E509E
loc_E5040:
mov rax, [rbp+var_10]
mov rcx, [rax+90h]
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov [rax+90h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+88h]
mov rax, [rbp+var_10]
mov rax, [rax+90h]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
cmp rax, [rbp+var_10]
jnz short loc_E509C
mov rax, [rbp+var_10]
mov rcx, [rax+90h]
add rcx, 0FFFFFFFFFFFFFF78h
mov rax, [rbp+var_8]
mov [rax], rcx
loc_E509C:
jmp short $+2
loc_E509E:
mov rax, [rbp+var_10]
mov qword ptr [rax+88h], 0
pop rbp
retn
|
long long unlink_from_queue(_QWORD *a1, long long a2)
{
long long result; // rax
if ( *(_QWORD *)(a2 + 136) == a2 )
{
*a1 = 0LL;
}
else
{
*(_QWORD *)(*(_QWORD *)(a2 + 136) + 144LL) = *(_QWORD *)(a2 + 144);
**(_QWORD **)(a2 + 144) = *(_QWORD *)(a2 + 136);
if ( *a1 == a2 )
*a1 = *(_QWORD *)(a2 + 144) - 136LL;
}
result = a2;
*(_QWORD *)(a2 + 136) = 0LL;
return result;
}
|
unlink_from_queue:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001e501e
LAB_001e501e:
JMP 0x001e5020
LAB_001e5020:
JMP 0x001e5022
LAB_001e5022:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001e5040
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
JMP 0x001e509e
LAB_001e5040:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001e509c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x90]
ADD RCX,-0x88
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_001e509c:
JMP 0x001e509e
LAB_001e509e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],0x0
POP RBP
RET
|
void unlink_from_queue(long *param_1,long param_2)
{
if (*(long *)(param_2 + 0x88) == param_2) {
*param_1 = 0;
}
else {
*(int8 *)(*(long *)(param_2 + 0x88) + 0x90) = *(int8 *)(param_2 + 0x90);
**(int8 **)(param_2 + 0x90) = *(int8 *)(param_2 + 0x88);
if (*param_1 == param_2) {
*param_1 = *(long *)(param_2 + 0x90) + -0x88;
}
}
*(int8 *)(param_2 + 0x88) = 0;
return;
}
|
|
12,682
|
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
|
monkey531[P]llama/common/common.cpp
|
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
}
|
O0
|
cpp
|
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x100(%rsp)
movl %esi, 0xfc(%rsp)
movq 0x100(%rsp), %rax
movl (%rax), %esi
movq 0x100(%rsp), %rax
movl 0x4(%rax), %edx
movq 0x100(%rsp), %rax
movl 0xc(%rax), %ecx
movq 0x100(%rsp), %rax
movl 0x8(%rax), %r8d
movq 0x100(%rsp), %rax
movl 0x10(%rax), %r9d
movq 0x100(%rsp), %rax
movl 0x14(%rax), %eax
leaq 0x11b7f3(%rip), %rdi # 0x2193a3
movl %eax, (%rsp)
movb $0x0, %al
callq 0x5c100
leaq 0xc0(%rsp), %rdi
callq 0x10be20
movq 0x100(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x100(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xb0(%rsp)
movl $0x0, 0xac(%rsp)
movl 0xac(%rsp), %eax
movq 0x100(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xfddd4
movl $0x0, 0xa8(%rsp)
movl 0xa8(%rsp), %eax
movq 0x100(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xfdd6a
movq 0xb0(%rsp), %rax
movslq 0xa8(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0xfdc4f
jmp 0xfdd54
movq 0xb0(%rsp), %rax
movslq 0xa8(%rsp), %rcx
leaq (%rax,%rcx,4), %rsi
leaq 0xc0(%rsp), %rdi
callq 0x10be50
movq %rax, 0x38(%rsp)
jmp 0xfdc77
movq 0x38(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x10be80
movq %rax, 0x88(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x10be30
testb $0x1, %al
jne 0xfdcb7
jmp 0xfdd52
leaq 0xc0(%rsp), %rdi
callq 0x10beb0
addq $0x1, %rax
cmpq $0x3f, %rax
jb 0xfdcf9
jmp 0xfdd6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x10bfb0
jmp 0xfe048
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x10beb0
movq 0x20(%rsp), %rdi
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movslq 0xa8(%rsp), %rcx
leaq (%rax,%rcx,4), %rsi
callq 0x10bec0
movq %rax, 0x30(%rsp)
jmp 0xfdd45
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
jmp 0xfdd54
movl 0xa8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa8(%rsp)
jmp 0xfdc1c
leaq 0xc0(%rsp), %rdi
callq 0x10beb0
addq $0x1, %rax
cmpq $0x3f, %rax
jb 0xfdd83
jmp 0xfddd4
jmp 0xfdd85
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
movq 0xb8(%rsp), %rax
addq $0x4, %rax
movq %rax, 0xb8(%rsp)
movq 0x100(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0xb0(%rsp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0xb0(%rsp)
jmp 0xfdbfa
leaq 0x11b653(%rip), %rdi # 0x21942e
xorl %eax, %eax
callq 0x5c100
jmp 0xfdde4
leaq 0xc0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x10bef0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x10be80
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x10bf20
testb $0x1, %al
jne 0xfde24
jmp 0xfde5c
leaq 0x70(%rsp), %rdi
callq 0x10bf40
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rsi
movl (%rax), %edx
leaq 0x11b5ff(%rip), %rdi # 0x219444
xorl %eax, %eax
callq 0x5c100
jmp 0xfde4e
jmp 0xfde50
leaq 0x70(%rsp), %rdi
callq 0x10bf60
jmp 0xfde0f
leaq 0x11b5ea(%rip), %rdi # 0x21944d
xorl %eax, %eax
callq 0x5c100
jmp 0xfde6c
movq 0x100(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x100(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xb0(%rsp)
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movq 0x100(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xfe023
movl 0x5c(%rsp), %eax
cltd
idivl 0xfc(%rsp)
cmpl $0x0, %edx
jne 0xfded7
movl 0x5c(%rsp), %esi
leaq 0x11b4bd(%rip), %rdi # 0x219389
xorl %eax, %eax
callq 0x5c100
jmp 0xfded5
jmp 0xfded7
movl $0x0, 0x58(%rsp)
movl 0x58(%rsp), %eax
movq 0x100(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xfdfcc
movq 0xb0(%rsp), %rax
movslq 0x58(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0xfdfac
movq 0xb0(%rsp), %rax
movslq 0x58(%rsp), %rcx
leaq (%rax,%rcx,4), %rsi
leaq 0xc0(%rsp), %rdi
callq 0x10be50
movq %rax, 0x18(%rsp)
jmp 0xfdf30
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x10be80
movq 0x10(%rsp), %rdi
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rsi
callq 0x10bf20
testb $0x1, %al
jne 0xfdf75
jmp 0xfdf94
movq 0x50(%rsp), %rdi
callq 0x10bf90
movq 0x8(%rax), %rcx
leaq 0x11a126(%rip), %rax # 0x2180b0
movsbl (%rax,%rcx), %eax
movl %eax, 0xc(%rsp)
jmp 0xfdf9f
movl $0x2b, %eax
movl %eax, 0xc(%rsp)
jmp 0xfdf9f
movl 0xc(%rsp), %edi
callq 0x5d600
jmp 0xfdfaa
jmp 0xfdfba
movl $0x2e, %edi
callq 0x5d600
jmp 0xfdfb8
jmp 0xfdfba
jmp 0xfdfbc
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0xfdedf
movl $0x20, %edi
callq 0x5d600
jmp 0xfdfd8
jmp 0xfdfda
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
movq 0xb8(%rsp), %rax
addq $0x4, %rax
movq %rax, 0xb8(%rsp)
movq 0x100(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0xb0(%rsp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0xb0(%rsp)
jmp 0xfde9c
leaq 0x11b366(%rip), %rdi # 0x219390
xorl %eax, %eax
callq 0x5c100
jmp 0xfe033
leaq 0xc0(%rsp), %rdi
callq 0x10bfb0
addq $0x108, %rsp # imm = 0x108
retq
movq 0x98(%rsp), %rdi
callq 0x5ccd0
nopw %cs:(%rax,%rax)
|
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
sub rsp, 108h
mov [rsp+108h+var_8], rdi
mov [rsp+108h+var_C], esi
mov rax, [rsp+108h+var_8]
mov esi, [rax]
mov rax, [rsp+108h+var_8]
mov edx, [rax+4]
mov rax, [rsp+108h+var_8]
mov ecx, [rax+0Ch]
mov rax, [rsp+108h+var_8]
mov r8d, [rax+8]
mov rax, [rsp+108h+var_8]
mov r9d, [rax+10h]
mov rax, [rsp+108h+var_8]
mov eax, [rax+14h]
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
mov [rsp+108h+var_108], eax
mov al, 0
call _printf
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEEC2Ev; std::unordered_map<int,ulong>::unordered_map(void)
mov rax, [rsp+108h+var_8]
mov rax, [rax+18h]
mov [rsp+108h+var_50], rax
mov rax, [rsp+108h+var_8]
mov rax, [rax+20h]
mov [rsp+108h+var_58], rax
mov [rsp+108h+var_5C], 0
loc_FDBFA:
mov eax, [rsp+108h+var_5C]
mov rcx, [rsp+108h+var_8]
cmp eax, [rcx]
jge loc_FDDD4
mov [rsp+108h+var_60], 0
loc_FDC1C:
mov eax, [rsp+108h+var_60]
mov rcx, [rsp+108h+var_8]
cmp eax, [rcx+4]
jge loc_FDD6A
mov rax, [rsp+108h+var_58]
movsxd rcx, [rsp+108h+var_60]
cmp dword ptr [rax+rcx*4], 0
jge short loc_FDC4F
jmp loc_FDD54
loc_FDC4F:
mov rax, [rsp+108h+var_58]
movsxd rcx, [rsp+108h+var_60]
lea rsi, [rax+rcx*4]
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE4findERS5_; std::unordered_map<int,ulong>::find(int const&)
mov [rsp+108h+var_D0], rax
jmp short $+2
loc_FDC77:
mov rax, [rsp+108h+var_D0]
mov [rsp+108h+var_68], rax
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE3endEv; std::unordered_map<int,ulong>::end(void)
mov [rsp+108h+var_80], rax
lea rdi, [rsp+108h+var_68]
lea rsi, [rsp+108h+var_80]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKimELb0EEES6_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&,std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&)
test al, 1
jnz short loc_FDCB7
jmp loc_FDD52
loc_FDCB7:
lea rdi, [rsp+108h+var_48]
call _ZNKSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE4sizeEv; std::unordered_map<int,ulong>::size(void)
add rax, 1
cmp rax, 3Fh ; '?'
jb short loc_FDCF9
jmp loc_FDD6A
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_B8]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEED2Ev; std::unordered_map<int,ulong>::~unordered_map()
jmp loc_FE048
loc_FDCF9:
lea rdi, [rsp+108h+var_48]
mov [rsp+108h+var_E8], rdi
call _ZNKSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE4sizeEv; std::unordered_map<int,ulong>::size(void)
mov rdi, [rsp+108h+var_E8]
mov [rsp+108h+var_88], rax
mov rax, [rsp+108h+var_88]
mov [rsp+108h+var_E0], rax
mov rax, [rsp+108h+var_58]
movsxd rcx, [rsp+108h+var_60]
lea rsi, [rax+rcx*4]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEEixERS5_; std::unordered_map<int,ulong>::operator[](int const&)
mov [rsp+108h+var_D8], rax
jmp short $+2
loc_FDD45:
mov rax, [rsp+108h+var_D8]
mov rcx, [rsp+108h+var_E0]
mov [rax], rcx
loc_FDD52:
jmp short $+2
loc_FDD54:
mov eax, [rsp+108h+var_60]
add eax, 1
mov [rsp+108h+var_60], eax
jmp loc_FDC1C
loc_FDD6A:
lea rdi, [rsp+108h+var_48]
call _ZNKSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE4sizeEv; std::unordered_map<int,ulong>::size(void)
add rax, 1
cmp rax, 3Fh ; '?'
jb short loc_FDD83
jmp short loc_FDDD4
loc_FDD83:
jmp short $+2
loc_FDD85:
mov eax, [rsp+108h+var_5C]
add eax, 1
mov [rsp+108h+var_5C], eax
mov rax, [rsp+108h+var_50]
add rax, 4
mov [rsp+108h+var_50], rax
mov rax, [rsp+108h+var_8]
mov ecx, [rax+4]
mov rax, [rsp+108h+var_58]
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rsp+108h+var_58], rax
jmp loc_FDBFA
loc_FDDD4:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
jmp short $+2
loc_FDDE4:
lea rax, [rsp+108h+var_48]
mov [rsp+108h+var_90], rax
mov rdi, [rsp+108h+var_90]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE5beginEv; std::unordered_map<int,ulong>::begin(void)
mov [rsp+108h+var_98], rax
mov rdi, [rsp+108h+var_90]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE3endEv; std::unordered_map<int,ulong>::end(void)
mov [rsp+108h+var_A0], rax
loc_FDE0F:
lea rdi, [rsp+108h+var_98]
lea rsi, [rsp+108h+var_A0]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKimELb0EEES6_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&,std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&)
test al, 1
jnz short loc_FDE24
jmp short loc_FDE5C
loc_FDE24:
lea rdi, [rsp+108h+var_98]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKimELb0ELb0EEdeEv; std::__detail::_Node_iterator<std::pair<int const,ulong>,false,false>::operator*(void)
mov [rsp+108h+var_A8], rax
mov rax, [rsp+108h+var_A8]
mov rsi, [rax+8]
mov edx, [rax]
lea rdi, aZuD; "%zu=%d, "
xor eax, eax
call _printf
jmp short $+2
loc_FDE4E:
jmp short $+2
loc_FDE50:
lea rdi, [rsp+108h+var_98]
call _ZNSt8__detail14_Node_iteratorISt4pairIKimELb0ELb0EEppEv; std::__detail::_Node_iterator<std::pair<int const,ulong>,false,false>::operator++(void)
jmp short loc_FDE0F
loc_FDE5C:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
jmp short $+2
loc_FDE6C:
mov rax, [rsp+108h+var_8]
mov rax, [rax+18h]
mov [rsp+108h+var_50], rax
mov rax, [rsp+108h+var_8]
mov rax, [rax+20h]
mov [rsp+108h+var_58], rax
mov [rsp+108h+var_AC], 0
loc_FDE9C:
mov eax, [rsp+108h+var_AC]
mov rcx, [rsp+108h+var_8]
cmp eax, [rcx]
jge loc_FE023
mov eax, [rsp+108h+var_AC]
cdq
idiv [rsp+108h+var_C]
cmp edx, 0
jnz short loc_FDED7
mov esi, [rsp+108h+var_AC]
lea rdi, a5d; "\n%5d: "
xor eax, eax
call _printf
jmp short $+2
loc_FDED5:
jmp short $+2
loc_FDED7:
mov [rsp+108h+var_B0], 0
loc_FDEDF:
mov eax, [rsp+108h+var_B0]
mov rcx, [rsp+108h+var_8]
cmp eax, [rcx+4]
jge loc_FDFCC
mov rax, [rsp+108h+var_58]
movsxd rcx, [rsp+108h+var_B0]
cmp dword ptr [rax+rcx*4], 0
jl loc_FDFAC
mov rax, [rsp+108h+var_58]
movsxd rcx, [rsp+108h+var_B0]
lea rsi, [rax+rcx*4]
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE4findERS5_; std::unordered_map<int,ulong>::find(int const&)
mov [rsp+108h+var_F0], rax
jmp short $+2
loc_FDF30:
mov rax, [rsp+108h+var_F0]
mov [rsp+108h+var_C0], rax
lea rax, [rsp+108h+var_C0]
mov [rsp+108h+var_B8], rax
mov rax, [rsp+108h+var_B8]
mov [rsp+108h+var_F8], rax
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEE3endEv; std::unordered_map<int,ulong>::end(void)
mov rdi, [rsp+108h+var_F8]
mov [rsp+108h+var_C8], rax
lea rsi, [rsp+108h+var_C8]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKimELb0EEES6_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&,std::__detail::_Node_iterator_base<std::pair<int const,ulong>,false> const&)
test al, 1
jnz short loc_FDF75
jmp short loc_FDF94
loc_FDF75:
mov rdi, [rsp+108h+var_B8]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKimELb0ELb0EEptEv; std::__detail::_Node_iterator<std::pair<int const,ulong>,false,false>::operator->(void)
mov rcx, [rax+8]
lea rax, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
movsx eax, byte ptr [rax+rcx]
mov [rsp+108h+var_FC], eax
jmp short loc_FDF9F
loc_FDF94:
mov eax, 2Bh ; '+'
mov [rsp+108h+var_FC], eax
jmp short $+2
loc_FDF9F:
mov edi, [rsp+108h+var_FC]
call _putchar
jmp short $+2
loc_FDFAA:
jmp short loc_FDFBA
loc_FDFAC:
mov edi, 2Eh ; '.'
call _putchar
jmp short $+2
loc_FDFB8:
jmp short $+2
loc_FDFBA:
jmp short $+2
loc_FDFBC:
mov eax, [rsp+108h+var_B0]
add eax, 1
mov [rsp+108h+var_B0], eax
jmp loc_FDEDF
loc_FDFCC:
mov edi, 20h ; ' '
call _putchar
jmp short $+2
loc_FDFD8:
jmp short $+2
loc_FDFDA:
mov eax, [rsp+108h+var_AC]
add eax, 1
mov [rsp+108h+var_AC], eax
mov rax, [rsp+108h+var_50]
add rax, 4
mov [rsp+108h+var_50], rax
mov rax, [rsp+108h+var_8]
mov ecx, [rax+4]
mov rax, [rsp+108h+var_58]
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rsp+108h+var_58], rax
jmp loc_FDE9C
loc_FE023:
lea rdi, aDoneDumping; "\n=== Done dumping\n"
xor eax, eax
call _printf
jmp short $+2
loc_FE033:
lea rdi, [rsp+108h+var_48]
call _ZNSt13unordered_mapIimSt4hashIiESt8equal_toIiESaISt4pairIKimEEED2Ev; std::unordered_map<int,ulong>::~unordered_map()
add rsp, 108h
retn
loc_FE048:
mov rdi, [rsp+arg_90]
call __Unwind_Resume
|
long long common_kv_cache_dump_view_seqs(int *a1, int a2)
{
unsigned int v3; // [rsp+Ch] [rbp-FCh]
long long v4; // [rsp+40h] [rbp-C8h] BYREF
long long v5; // [rsp+48h] [rbp-C0h] BYREF
long long *v6; // [rsp+50h] [rbp-B8h]
int j; // [rsp+58h] [rbp-B0h]
int v8; // [rsp+5Ch] [rbp-ACh]
long long v9; // [rsp+60h] [rbp-A8h]
long long v10; // [rsp+68h] [rbp-A0h] BYREF
_QWORD v11[2]; // [rsp+70h] [rbp-98h] BYREF
long long v12; // [rsp+80h] [rbp-88h]
long long v13[3]; // [rsp+88h] [rbp-80h] BYREF
long long v14; // [rsp+A0h] [rbp-68h] BYREF
int i; // [rsp+A8h] [rbp-60h]
int v16; // [rsp+ACh] [rbp-5Ch]
long long v17; // [rsp+B0h] [rbp-58h]
long long v18; // [rsp+B8h] [rbp-50h]
_BYTE v19[60]; // [rsp+C0h] [rbp-48h] BYREF
int v20; // [rsp+FCh] [rbp-Ch]
int *v21; // [rsp+100h] [rbp-8h]
v21 = a1;
v20 = a2;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*a1,
a1[1],
a1[3],
a1[2],
a1[4],
a1[5]);
std::unordered_map<int,unsigned long>::unordered_map(v19);
v18 = *((_QWORD *)v21 + 3);
v17 = *((_QWORD *)v21 + 4);
v16 = 0;
while ( v16 < *v21 )
{
for ( i = 0; i < v21[1]; ++i )
{
if ( *(int *)(v17 + 4LL * i) >= 0 )
{
v14 = std::unordered_map<int,unsigned long>::find(v19, v17 + 4LL * i);
v13[0] = std::unordered_map<int,unsigned long>::end(v19);
if ( (std::__detail::operator==(&v14, v13) & 1) != 0 )
{
if ( (unsigned long long)(std::unordered_map<int,unsigned long>::size(v19) + 1) >= 0x3F )
break;
v12 = std::unordered_map<int,unsigned long>::size(v19);
*(_QWORD *)std::unordered_map<int,unsigned long>::operator[](v19, v17 + 4LL * i) = v12;
}
}
}
if ( (unsigned long long)(std::unordered_map<int,unsigned long>::size(v19) + 1) >= 0x3F )
break;
++v16;
v18 += 4LL;
v17 += 4LL * v21[1];
}
printf("=== Sequence legend: ");
v11[1] = v19;
v11[0] = std::unordered_map<int,unsigned long>::begin(v19);
v10 = std::unordered_map<int,unsigned long>::end(v19);
while ( (std::__detail::operator!=(v11, &v10) & 1) != 0 )
{
v9 = std::__detail::_Node_iterator<std::pair<int const,unsigned long>,false,false>::operator*(v11);
printf("%zu=%d, ", *(_QWORD *)(v9 + 8), *(_DWORD *)v9);
std::__detail::_Node_iterator<std::pair<int const,unsigned long>,false,false>::operator++(v11);
}
printf("'+'=other sequence ids");
v18 = *((_QWORD *)v21 + 3);
v17 = *((_QWORD *)v21 + 4);
v8 = 0;
while ( v8 < *v21 )
{
if ( !(v8 % v20) )
printf("\n%5d: ", v8);
for ( j = 0; j < v21[1]; ++j )
{
if ( *(int *)(v17 + 4LL * j) < 0 )
{
putchar(46LL);
}
else
{
v5 = std::unordered_map<int,unsigned long>::find(v19, v17 + 4LL * j);
v6 = &v5;
v4 = std::unordered_map<int,unsigned long>::end(v19);
if ( (std::__detail::operator!=(&v5, &v4) & 1) != 0 )
v3 = common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(std::__detail::_Node_iterator<std::pair<int const,unsigned long>,false,false>::operator->(v6) + 8)];
else
v3 = 43;
putchar(v3);
}
}
putchar(32LL);
++v8;
v18 += 4LL;
v17 += 4LL * v21[1];
}
printf("\n=== Done dumping\n");
return std::unordered_map<int,unsigned long>::~unordered_map(v19);
}
|
common_kv_cache_dump_view_seqs:
SUB RSP,0x108
MOV qword ptr [RSP + 0x100],RDI
MOV dword ptr [RSP + 0xfc],ESI
MOV RAX,qword ptr [RSP + 0x100]
MOV ESI,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x100]
MOV EDX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RSP + 0x100]
MOV R8D,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x100]
MOV R9D,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x100]
MOV EAX,dword ptr [RAX + 0x14]
LEA RDI,[0x3193a3]
MOV dword ptr [RSP],EAX
MOV AL,0x0
CALL 0x0015c100
LEA RDI,[RSP + 0xc0]
CALL 0x0020be20
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0xb0],RAX
MOV dword ptr [RSP + 0xac],0x0
LAB_001fdbfa:
MOV EAX,dword ptr [RSP + 0xac]
MOV RCX,qword ptr [RSP + 0x100]
CMP EAX,dword ptr [RCX]
JGE 0x001fddd4
MOV dword ptr [RSP + 0xa8],0x0
LAB_001fdc1c:
MOV EAX,dword ptr [RSP + 0xa8]
MOV RCX,qword ptr [RSP + 0x100]
CMP EAX,dword ptr [RCX + 0x4]
JGE 0x001fdd6a
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,dword ptr [RSP + 0xa8]
CMP dword ptr [RAX + RCX*0x4],0x0
JGE 0x001fdc4f
JMP 0x001fdd54
LAB_001fdc4f:
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,dword ptr [RSP + 0xa8]
LEA RSI,[RAX + RCX*0x4]
LAB_001fdc63:
LEA RDI,[RSP + 0xc0]
CALL 0x0020be50
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001fdc77
LAB_001fdc77:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0xc0]
CALL 0x0020be80
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x88]
CALL 0x0020be30
TEST AL,0x1
JNZ 0x001fdcb7
JMP 0x001fdd52
LAB_001fdcb7:
LEA RDI,[RSP + 0xc0]
CALL 0x0020beb0
ADD RAX,0x1
CMP RAX,0x3f
JC 0x001fdcf9
JMP 0x001fdd6a
LAB_001fdcf9:
LEA RDI,[RSP + 0xc0]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0020beb0
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,dword ptr [RSP + 0xa8]
LEA RSI,[RAX + RCX*0x4]
CALL 0x0020bec0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001fdd45
LAB_001fdd45:
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
LAB_001fdd52:
JMP 0x001fdd54
LAB_001fdd54:
MOV EAX,dword ptr [RSP + 0xa8]
ADD EAX,0x1
MOV dword ptr [RSP + 0xa8],EAX
JMP 0x001fdc1c
LAB_001fdd6a:
LEA RDI,[RSP + 0xc0]
CALL 0x0020beb0
ADD RAX,0x1
CMP RAX,0x3f
JC 0x001fdd83
JMP 0x001fddd4
LAB_001fdd83:
JMP 0x001fdd85
LAB_001fdd85:
MOV EAX,dword ptr [RSP + 0xac]
ADD EAX,0x1
MOV dword ptr [RSP + 0xac],EAX
MOV RAX,qword ptr [RSP + 0xb8]
ADD RAX,0x4
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001fdbfa
LAB_001fddd4:
LEA RDI,[0x31942e]
XOR EAX,EAX
CALL 0x0015c100
JMP 0x001fdde4
LAB_001fdde4:
LEA RAX,[RSP + 0xc0]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0020bef0
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0020be80
MOV qword ptr [RSP + 0x68],RAX
LAB_001fde0f:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x68]
CALL 0x0020bf20
TEST AL,0x1
JNZ 0x001fde24
JMP 0x001fde5c
LAB_001fde24:
LEA RDI,[RSP + 0x70]
CALL 0x0020bf40
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RAX]
LEA RDI,[0x319444]
XOR EAX,EAX
CALL 0x0015c100
JMP 0x001fde4e
LAB_001fde4e:
JMP 0x001fde50
LAB_001fde50:
LEA RDI,[RSP + 0x70]
CALL 0x0020bf60
JMP 0x001fde0f
LAB_001fde5c:
LEA RDI,[0x31944d]
XOR EAX,EAX
CALL 0x0015c100
JMP 0x001fde6c
LAB_001fde6c:
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0xb0],RAX
MOV dword ptr [RSP + 0x5c],0x0
LAB_001fde9c:
MOV EAX,dword ptr [RSP + 0x5c]
MOV RCX,qword ptr [RSP + 0x100]
CMP EAX,dword ptr [RCX]
JGE 0x001fe023
MOV EAX,dword ptr [RSP + 0x5c]
CDQ
IDIV dword ptr [RSP + 0xfc]
CMP EDX,0x0
JNZ 0x001fded7
MOV ESI,dword ptr [RSP + 0x5c]
LEA RDI,[0x319389]
XOR EAX,EAX
CALL 0x0015c100
JMP 0x001fded5
LAB_001fded5:
JMP 0x001fded7
LAB_001fded7:
MOV dword ptr [RSP + 0x58],0x0
LAB_001fdedf:
MOV EAX,dword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x100]
CMP EAX,dword ptr [RCX + 0x4]
JGE 0x001fdfcc
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,dword ptr [RSP + 0x58]
CMP dword ptr [RAX + RCX*0x4],0x0
JL 0x001fdfac
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,dword ptr [RSP + 0x58]
LEA RSI,[RAX + RCX*0x4]
LEA RDI,[RSP + 0xc0]
CALL 0x0020be50
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001fdf30
LAB_001fdf30:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0xc0]
CALL 0x0020be80
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
LEA RSI,[RSP + 0x40]
CALL 0x0020bf20
TEST AL,0x1
JNZ 0x001fdf75
JMP 0x001fdf94
LAB_001fdf75:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0020bf90
MOV RCX,qword ptr [RAX + 0x8]
LEA RAX,[0x3180b0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001fdf9f
LAB_001fdf94:
MOV EAX,0x2b
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001fdf9f
LAB_001fdf9f:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0015d600
JMP 0x001fdfaa
LAB_001fdfaa:
JMP 0x001fdfba
LAB_001fdfac:
MOV EDI,0x2e
CALL 0x0015d600
JMP 0x001fdfb8
LAB_001fdfb8:
JMP 0x001fdfba
LAB_001fdfba:
JMP 0x001fdfbc
LAB_001fdfbc:
MOV EAX,dword ptr [RSP + 0x58]
ADD EAX,0x1
MOV dword ptr [RSP + 0x58],EAX
JMP 0x001fdedf
LAB_001fdfcc:
MOV EDI,0x20
CALL 0x0015d600
JMP 0x001fdfd8
LAB_001fdfd8:
JMP 0x001fdfda
LAB_001fdfda:
MOV EAX,dword ptr [RSP + 0x5c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x5c],EAX
MOV RAX,qword ptr [RSP + 0xb8]
ADD RAX,0x4
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0xb0]
MOVSXD RCX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001fde9c
LAB_001fe023:
LEA RDI,[0x319390]
XOR EAX,EAX
CALL 0x0015c100
LAB_001fe031:
JMP 0x001fe033
LAB_001fe033:
LEA RDI,[RSP + 0xc0]
CALL 0x0020bfb0
ADD RSP,0x108
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
ulong uVar1;
long lVar2;
int8 uVar3;
int8 *puVar4;
int local_fc;
int8 local_c8;
int8 local_c0;
_Node_iterator_base *local_b8;
int local_b0;
uint local_ac;
uint *local_a8;
int8 local_a0;
int8 local_98;
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
*local_90;
int8 local_88;
int8 local_80 [3];
int8 local_68;
int local_60;
int local_5c;
long local_58;
long local_50;
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
local_48 [60];
int local_c;
llama_kv_cache_view *local_8;
local_c = param_2;
local_8 = param_1;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::unordered_map(local_48);
local_50 = *(long *)(local_8 + 0x18);
local_58 = *(long *)(local_8 + 0x20);
for (local_5c = 0; local_5c < *(int *)local_8; local_5c = local_5c + 1) {
for (local_60 = 0; local_60 < *(int *)(local_8 + 4); local_60 = local_60 + 1) {
if (-1 < *(int *)(local_58 + (long)local_60 * 4)) {
/* try { // try from 001fdc63 to 001fe030 has its CatchHandler @ 001fdcd3 */
local_68 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::find(local_48,(int *)(local_58 + (long)local_60 * 4));
local_80[0] = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::end();
uVar1 = std::__detail::operator==
((_Node_iterator_base *)&local_68,(_Node_iterator_base *)local_80);
if ((uVar1 & 1) != 0) {
lVar2 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::size(local_48);
if (0x3e < lVar2 + 1U) break;
uVar3 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::size(local_48);
local_88 = uVar3;
puVar4 = (int8 *)
std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::operator[](local_48,(int *)(local_58 + (long)local_60 * 4));
*puVar4 = uVar3;
}
}
}
lVar2 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::size(local_48);
if (0x3e < lVar2 + 1U) break;
local_50 = local_50 + 4;
local_58 = local_58 + (long)*(int *)(local_8 + 4) * 4;
}
printf("=== Sequence legend: ");
local_90 = local_48;
local_98 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::begin(local_90);
local_a0 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::end();
while (uVar1 = std::__detail::operator!=
((_Node_iterator_base *)&local_98,(_Node_iterator_base *)&local_a0),
(uVar1 & 1) != 0) {
local_a8 = (uint *)std::__detail::_Node_iterator<std::pair<int_const,unsigned_long>,false,false>
::operator*((_Node_iterator<std::pair<int_const,unsigned_long>,false,false> *
)&local_98);
printf("%zu=%d, ",*(int8 *)(local_a8 + 2),(ulong)*local_a8);
std::__detail::_Node_iterator<std::pair<int_const,unsigned_long>,false,false>::operator++
((_Node_iterator<std::pair<int_const,unsigned_long>,false,false> *)&local_98);
}
printf("\'+\'=other sequence ids");
local_50 = *(long *)(local_8 + 0x18);
local_58 = *(long *)(local_8 + 0x20);
for (local_ac = 0; (int)local_ac < *(int *)local_8; local_ac = local_ac + 1) {
if ((int)local_ac % local_c == 0) {
printf("\n%5d: ",(ulong)local_ac);
}
for (local_b0 = 0; local_b0 < *(int *)(local_8 + 4); local_b0 = local_b0 + 1) {
if (*(int *)(local_58 + (long)local_b0 * 4) < 0) {
putchar(0x2e);
}
else {
local_c0 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::find(local_48,(int *)(local_58 + (long)local_b0 * 4));
local_b8 = (_Node_iterator_base *)&local_c0;
local_c8 = std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::end();
uVar1 = std::__detail::operator!=
((_Node_iterator_base *)&local_c0,(_Node_iterator_base *)&local_c8);
if ((uVar1 & 1) == 0) {
local_fc = 0x2b;
}
else {
lVar2 = std::__detail::_Node_iterator<std::pair<int_const,unsigned_long>,false,false>::
operator->((_Node_iterator<std::pair<int_const,unsigned_long>,false,false> *)
local_b8);
local_fc = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar2 + 8)];
}
putchar(local_fc);
}
}
putchar(0x20);
local_50 = local_50 + 4;
local_58 = local_58 + (long)*(int *)(local_8 + 4) * 4;
}
printf("\n=== Done dumping\n");
std::
unordered_map<int,unsigned_long,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,unsigned_long>>>
::~unordered_map(local_48);
return;
}
|
|
12,683
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7061b(%rip), %rsi # 0xb0e19
leaq 0x10(%rsp), %rdx
callq 0x27c44
cmpq $0x0, 0x8(%r15)
je 0x40842
leaq 0x38(%rsp), %rcx
movb $0x20, (%rcx)
leaq 0x70609(%rip), %rsi # 0xb0e27
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x45851
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x24160
leaq 0x10(%rsp), %rdi
callq 0x241f8
leaq 0x705ed(%rip), %rsi # 0xb0e36
movq %rbx, %rdi
callq 0x24120
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x408b9
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x40604
leaq 0xf(%rsp), %r8
movb $0x27, (%r8)
leaq 0x705b2(%rip), %rdx # 0xb0e39
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x458c1
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x24160
leaq 0x10(%rsp), %rdi
callq 0x241f8
leaq 0x38(%rsp), %rdi
jmp 0x408e9
callq 0x45998
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x7057b(%rip), %rsi # 0xb0e48
leaq 0x10(%rsp), %rdi
callq 0x45939
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x24160
leaq 0x10(%rsp), %rdi
callq 0x241f8
testl %ebp, %ebp
je 0x40929
movl %ebp, %edi
callq 0x45998
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x7054c(%rip), %rsi # 0xb0e54
leaq 0x10(%rsp), %rdi
callq 0x45939
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x24160
leaq 0x10(%rsp), %rdi
callq 0x241f8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241f8
jmp 0x4094b
jmp 0x4095a
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0x40962
jmp 0x4096b
jmp 0x4096b
jmp 0x4095a
jmp 0x4096b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241f8
jmp 0x4096e
jmp 0x4096b
movq %rax, %r14
movq %rbx, %rdi
callq 0x241f8
movq %r14, %rdi
callq 0x23fb0
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
push r15
push r14
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rsi, aSyntaxError; "syntax error "
lea rdx, [rsp+78h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
cmp qword ptr [r15+8], 0
jz short loc_40842
lea rcx, [rsp+78h+var_40]
mov byte ptr [rcx], 20h ; ' '
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+78h+var_68]
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_40842:
lea rsi, asc_B0E36; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz short loc_408B9
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+78h+var_48], rax
lea rdi, [rsp+78h+var_40]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
lea r8, [rsp+78h+var_69]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_48]
lea rcx, [rsp+78h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_40]
jmp short loc_408E9
loc_408B9:
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+78h+var_68]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
loc_408E9:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test ebp, ebp
jz short loc_40929
mov edi, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+78h+var_68]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_40929:
mov rax, rbx
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4094B
jmp short loc_4095A
mov r14, rax
loc_4094B:
lea rdi, [rsp+arg_30]
jmp short loc_40962
jmp short loc_4096B
jmp short loc_4096B
jmp short loc_4095A
jmp short loc_4096B
loc_4095A:
mov r14, rax
lea rdi, [rsp+arg_8]; void *
loc_40962:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4096E
jmp short $+2
loc_4096B:
mov r14, rax
loc_4096E:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message(
_QWORD *a1,
long long a2,
unsigned int a3,
long long a4)
{
_BYTE *v7; // rdi
char v9; // [rsp+Fh] [rbp-69h] BYREF
_BYTE v10[32]; // [rsp+10h] [rbp-68h] BYREF
long long v11; // [rsp+30h] [rbp-48h] BYREF
_QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ");
if ( *(_QWORD *)(a4 + 8) )
{
LOBYTE(v12[0]) = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
v10,
"while parsing ",
a4,
v12);
std::string::append(a1, v10);
std::string::~string(v10);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v11 = *(_QWORD *)(a2 + 152);
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(
(long long)v12,
a2 + 40);
v9 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
v10,
&v11,
"; last read: '",
v12,
&v9);
std::string::append(a1, v10);
std::string::~string(v10);
v7 = v12;
}
else
{
v12[0] = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)();
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "unexpected ");
std::string::append(a1, v10);
v7 = v10;
}
std::string::~string(v7);
if ( a3 )
{
v12[0] = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "; expected ");
std::string::append(a1, v10);
std::string::~string(v10);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x1b0e19]
LEA RDX,[RSP + 0x10]
CALL 0x00127c44
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00140842
LEA RCX,[RSP + 0x38]
MOV byte ptr [RCX],0x20
LAB_00140817:
LEA RSI,[0x1b0e27]
LEA RDI,[RSP + 0x10]
MOV RDX,R15
CALL 0x00145851
LAB_0014082b:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00124160
LEA RDI,[RSP + 0x10]
CALL 0x001241f8
LAB_00140842:
LEA RSI,[0x1b0e36]
MOV RDI,RBX
CALL 0x00124120
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x001408b9
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_0014086a:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00140604
LEA R8,[RSP + 0xf]
MOV byte ptr [R8],0x27
LAB_00140880:
LEA RDX,[0x1b0e39]
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x001458c1
LAB_0014089b:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00124160
LEA RDI,[RSP + 0x10]
CALL 0x001241f8
LEA RDI,[RSP + 0x38]
JMP 0x001408e9
LAB_001408b9:
CALL 0x00145998
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_001408c6:
LEA RSI,[0x1b0e48]
LEA RDI,[RSP + 0x10]
CALL 0x00145939
LAB_001408d7:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00124160
LEA RDI,[RSP + 0x10]
LAB_001408e9:
CALL 0x001241f8
TEST EBP,EBP
JZ 0x00140929
MOV EDI,EBP
CALL 0x00145998
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_00140901:
LEA RSI,[0x1b0e54]
LEA RDI,[RSP + 0x10]
CALL 0x00145939
LAB_00140912:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00124160
LAB_0014091f:
LEA RDI,[RSP + 0x10]
CALL 0x001241f8
LAB_00140929:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */
string * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::exception_message(string *param_1,long param_2,int param_3,string *param_4)
{
string *this;
char local_69;
allocator local_68 [32];
char *local_48;
char *local_40 [4];
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",local_68);
if (*(long *)(param_4 + 8) != 0) {
local_40[0] = (char *)CONCAT71(local_40[0]._1_7_,0x20);
/* try { // try from 00140817 to 0014082a has its CatchHandler @ 00140969 */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
((detail *)local_68,"while parsing ",param_4,(char *)local_40);
/* try { // try from 0014082b to 00140837 has its CatchHandler @ 0014095a */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
/* try { // try from 00140842 to 00140850 has its CatchHandler @ 0014096b */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_48 = *(char **)(param_2 + 0x98);
/* try { // try from 0014086a to 00140876 has its CatchHandler @ 00140954 */
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_token_string();
local_69 = '\'';
/* try { // try from 00140880 to 0014089a has its CatchHandler @ 00140948 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((detail *)local_68,&local_48,"; last read: \'",(string *)local_40,&local_69);
/* try { // try from 0014089b to 001408a7 has its CatchHandler @ 00140937 */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
this = (string *)local_40;
}
else {
local_40[0] = (char *)lexer_base<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>>
::token_type_name();
/* try { // try from 001408c6 to 001408d6 has its CatchHandler @ 00140952 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"unexpected ",local_40);
/* try { // try from 001408d7 to 001408e3 has its CatchHandler @ 00140946 */
std::__cxx11::string::append(param_1);
this = (string *)local_68;
}
std::__cxx11::string::~string(this);
if (param_3 != 0) {
local_40[0] = (char *)lexer_base<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>>
::token_type_name(param_3);
/* try { // try from 00140901 to 00140911 has its CatchHandler @ 00140958 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"; expected ",local_40);
/* try { // try from 00140912 to 0014091e has its CatchHandler @ 00140956 */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
return param_1;
}
|
|
12,684
|
my_uca_charcmp
|
eloqsql/strings/ctype-uca.c
|
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
}
|
O0
|
c
|
my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x4e083
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x4e0a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x4e076
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4e08a
jmp 0x4e078
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4e049
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_charcmp:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_4E049:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_4E083
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_4E076
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_4E08A
loc_4E076:
jmp short $+2
loc_4E078:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_4E049
loc_4E083:
mov [rbp+var_4], 0
loc_4E08A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
|
my_uca_charcmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_0014e049:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x0014e083
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x0014e0a0
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x0014e076
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014e08a
LAB_0014e076:
JMP 0x0014e078
LAB_0014e078:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0014e049
LAB_0014e083:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014e08a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
|
|
12,685
|
httplib::detail::skip_content_with_length(httplib::Stream&, unsigned long)
|
monkey531[P]llama/examples/server/httplib.h
|
inline void skip_content_with_length(Stream &strm, uint64_t len) {
char buf[CPPHTTPLIB_RECV_BUFSIZ];
uint64_t r = 0;
while (r < len) {
auto read_len = static_cast<size_t>(len - r);
auto n = strm.read(buf, (std::min)(read_len, CPPHTTPLIB_RECV_BUFSIZ));
if (n <= 0) { return; }
r += static_cast<uint64_t>(n);
}
}
|
O2
|
c
|
httplib::detail::skip_content_with_length(httplib::Stream&, unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4000, %rsp # imm = 0x4000
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movl $0x4000, %r13d # imm = 0x4000
movq %rsp, %r15
movq %rbx, %rdx
subq %r12, %rdx
jbe 0x62af5
cmpq %r13, %rdx
cmovaeq %r13, %rdx
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x20(%rax)
addq %rax, %r12
testq %rax, %rax
jg 0x62ad2
addq $0x4000, %rsp # imm = 0x4000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
_ZN7httplib6detail24skip_content_with_lengthERNS_6StreamEm:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 4000h
mov rbx, rsi
mov r14, rdi
xor r12d, r12d
mov r13d, 4000h
mov r15, rsp
loc_62AD2:
mov rdx, rbx
sub rdx, r12
jbe short loc_62AF5
cmp rdx, r13
cmovnb rdx, r13
mov rax, [r14]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+20h]
add r12, rax
test rax, rax
jg short loc_62AD2
loc_62AF5:
add rsp, 4000h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
void httplib::detail::skip_content_with_length(httplib::detail *this, httplib::Stream *a2)
{
unsigned long long v2; // r12
char *v3; // rdx
long long v4; // rax
long long v5; // [rsp+0h] [rbp-4028h] BYREF
v2 = 0LL;
do
{
v3 = (char *)a2 - v2;
if ( (unsigned long long)a2 <= v2 )
break;
if ( (unsigned long long)v3 >= 0x4000 )
v3 = (_BYTE *)(&stru_3FF0 + 16);
v4 = (*(long long ( **)(httplib::detail *, long long *, char *))(*(_QWORD *)this + 32LL))(this, &v5, v3);
v2 += v4;
}
while ( v4 > 0 );
}
|
skip_content_with_length:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x4000
MOV RBX,RSI
MOV R14,RDI
XOR R12D,R12D
MOV R13D,0x4000
MOV R15,RSP
LAB_00162ad2:
MOV RDX,RBX
SUB RDX,R12
JBE 0x00162af5
CMP RDX,R13
CMOVNC RDX,R13
MOV RAX,qword ptr [R14]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0x20]
ADD R12,RAX
TEST RAX,RAX
JG 0x00162ad2
LAB_00162af5:
ADD RSP,0x4000
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::detail::skip_content_with_length(httplib::Stream&, unsigned long) */
void httplib::detail::skip_content_with_length(Stream *param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
ulong uVar3;
int1 auStack_4028 [16384];
uVar3 = 0;
do {
uVar2 = param_2 - uVar3;
if (param_2 < uVar3 || uVar2 == 0) {
return;
}
if (0x3fff < uVar2) {
uVar2 = 0x4000;
}
lVar1 = (**(code **)(*(long *)param_1 + 0x20))(param_1,auStack_4028,uVar2);
uVar3 = uVar3 + lVar1;
} while (0 < lVar1);
return;
}
|
|
12,686
|
file_is_directory
|
tsotchke[P]eshkol/src/core/utils/file_io.c
|
bool file_is_directory(const char* path) {
assert(path != NULL);
// Check if the path is a directory
struct stat st;
if (stat(path, &st) != 0) {
set_last_error(errno_to_file_error(errno));
return false;
}
set_last_error(FILE_ERROR_NONE);
return S_ISDIR(st.st_mode);
}
|
O0
|
c
|
file_is_directory:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x63d8
jmp 0x63f7
leaq 0x1b69(%rip), %rdi # 0x7f48
leaq 0x19eb(%rip), %rsi # 0x7dd1
movl $0x401, %edx # imm = 0x401
leaq 0x1e4e(%rip), %rcx # 0x8240
callq 0x2170
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2210
cmpl $0x0, %eax
je 0x6425
callq 0x2060
movl (%rax), %edi
callq 0x4940
movl %eax, %edi
callq 0x4920
movb $0x0, -0x1(%rbp)
jmp 0x6444
xorl %edi, %edi
callq 0x4920
movl -0x88(%rbp), %eax
andl $0xf000, %eax # imm = 0xF000
cmpl $0x4000, %eax # imm = 0x4000
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
file_is_directory:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_63D8
jmp short loc_63F7
loc_63D8:
lea rdi, aSrcPathNull+4; "path != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 401h
lea rcx, aBoolFileIsDire; "_Bool file_is_directory(const char *)"
call ___assert_fail
loc_63F7:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_A0]
call _stat
cmp eax, 0
jz short loc_6425
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov edi, eax
call set_last_error
mov [rbp+var_1], 0
jmp short loc_6444
loc_6425:
xor edi, edi
call set_last_error
mov eax, [rbp+var_88]
and eax, 0F000h
cmp eax, 4000h
setz al
and al, 1
mov [rbp+var_1], al
loc_6444:
mov al, [rbp+var_1]
and al, 1
add rsp, 0A0h
pop rbp
retn
|
bool file_is_directory(long long a1)
{
int *v1; // rax
unsigned int v2; // eax
_BYTE v4[24]; // [rsp+0h] [rbp-A0h] BYREF
int v5; // [rsp+18h] [rbp-88h]
long long v6; // [rsp+90h] [rbp-10h]
v6 = a1;
if ( !a1 )
__assert_fail(
"path != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
1025LL,
"_Bool file_is_directory(const char *)");
if ( (unsigned int)stat(v6, v4) )
{
v1 = (int *)__errno_location();
v2 = errno_to_file_error(*v1);
set_last_error(v2);
return 0;
}
else
{
set_last_error(0);
return (v5 & 0xF000) == 0x4000;
}
}
|
file_is_directory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001063d8
JMP 0x001063f7
LAB_001063d8:
LEA RDI,[0x107f12]
LEA RSI,[0x107dad]
MOV EDX,0x401
LEA RCX,[0x10820a]
CALL 0x00102170
LAB_001063f7:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xa0]
CALL 0x00102210
CMP EAX,0x0
JZ 0x00106425
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104940
MOV EDI,EAX
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00106444
LAB_00106425:
XOR EDI,EDI
CALL 0x00104920
MOV EAX,dword ptr [RBP + -0x88]
AND EAX,0xf000
CMP EAX,0x4000
SETZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_00106444:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
|
bool file_is_directory(char *param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
stat local_a8;
char *local_18;
bool local_9;
local_18 = param_1;
if (param_1 != (char *)0x0) {
iVar1 = stat(param_1,&local_a8);
if (iVar1 == 0) {
set_last_error(0);
local_9 = (local_a8.st_mode & 0xf000) == 0x4000;
}
else {
piVar3 = __errno_location();
uVar2 = errno_to_file_error(*piVar3);
set_last_error(uVar2);
local_9 = false;
}
return local_9;
}
/* WARNING: Subroutine does not return */
__assert_fail("path != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c",
0x401,"_Bool file_is_directory(const char *)");
}
|
|
12,687
|
my_hash_iterate
|
eloqsql/mysys/hash.c
|
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
}
|
O3
|
c
|
my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x18(%rdi), %r12d
testq %r12, %r12
je 0x9762c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
shlq $0x4, %r12
xorl %r13d, %r13d
movq 0x28(%r15), %rax
movq 0x8(%rax,%r13), %rdi
movq %rbx, %rsi
callq *%r14
testb %al, %al
jne 0x97630
addq $0x10, %r13
cmpq %r13, %r12
jne 0x97610
xorl %eax, %eax
jmp 0x97632
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
my_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, [rdi+18h]
test r12, r12
jz short loc_9762C
mov rbx, rdx
mov r14, rsi
mov r15, rdi
shl r12, 4
xor r13d, r13d
loc_97610:
mov rax, [r15+28h]
mov rdi, [rax+r13+8]
mov rsi, rbx
call r14
test al, al
jnz short loc_97630
add r13, 10h
cmp r12, r13
jnz short loc_97610
loc_9762C:
xor eax, eax
jmp short loc_97632
loc_97630:
mov al, 1
loc_97632:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
long long v4; // r12
long long v5; // r13
if ( !*(_DWORD *)(a1 + 24) )
return 0;
v4 = 16LL * *(unsigned int *)(a1 + 24);
v5 = 0LL;
while ( !a2(*(_QWORD *)(*(_QWORD *)(a1 + 40) + v5 + 8), a3) )
{
v5 += 16LL;
if ( v4 == v5 )
return 0;
}
return 1;
}
|
my_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,dword ptr [RDI + 0x18]
TEST R12,R12
JZ 0x0019762c
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
SHL R12,0x4
XOR R13D,R13D
LAB_00197610:
MOV RAX,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + R13*0x1 + 0x8]
MOV RSI,RBX
CALL R14
TEST AL,AL
JNZ 0x00197630
ADD R13,0x10
CMP R12,R13
JNZ 0x00197610
LAB_0019762c:
XOR EAX,EAX
JMP 0x00197632
LAB_00197630:
MOV AL,0x1
LAB_00197632:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
uint uVar1;
char cVar2;
long lVar3;
uVar1 = *(uint *)(param_1 + 0x18);
if ((ulong)uVar1 != 0) {
lVar3 = 0;
do {
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + 8 + lVar3),param_3);
if (cVar2 != '\0') {
return 1;
}
lVar3 = lVar3 + 0x10;
} while ((ulong)uVar1 << 4 != lVar3);
}
return 0;
}
|
|
12,688
|
my_mb_wc_utf8mb3_quick
|
eloqsql/strings/ctype-utf8.h
|
static inline int
my_mb_wc_utf8mb3_quick(my_wc_t * pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s+2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s+3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_utf8mb3_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0xb70d6
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xb7253
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0xb7103
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb7253
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0xb711a
movl $0x0, -0x4(%rbp)
jmp 0xb7253
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0xb7190
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0xb713f
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xb7253
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0xb715d
movl $0x0, -0x4(%rbp)
jmp 0xb7253
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xb7253
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0xb7246
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0xb71b9
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xb7253
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb71f7
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb71f7
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0xb7200
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0xb7200
movl $0x0, -0x4(%rbp)
jmp 0xb7253
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xb7253
jmp 0xb7248
jmp 0xb724a
jmp 0xb724c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_utf8mb3_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_B70D6
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_B7253
loc_B70D6:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_B7103
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_B7253
loc_B7103:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_B711A
mov [rbp+var_4], 0
jmp loc_B7253
loc_B711A:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_B7190
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_B713F
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_B7253
loc_B713F:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_B715D
mov [rbp+var_4], 0
jmp loc_B7253
loc_B715D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_B7253
loc_B7190:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_B7246
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_B71B9
mov [rbp+var_4], 0FFFFFF99h
jmp loc_B7253
loc_B71B9:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B71F7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B71F7
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_B7200
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_B7200
loc_B71F7:
mov [rbp+var_4], 0
jmp short loc_B7253
loc_B7200:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp short loc_B7253
loc_B7246:
jmp short $+2
loc_B7248:
jmp short $+2
loc_B724A:
jmp short $+2
loc_B724C:
mov [rbp+var_4], 0
loc_B7253:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_utf8mb3_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_utf8mb3_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001b70d6
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001b7253
LAB_001b70d6:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x001b7103
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b7253
LAB_001b7103:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x001b711a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b7253
LAB_001b711a:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x001b7190
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001b713f
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001b7253
LAB_001b713f:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x001b715d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b7253
LAB_001b715d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001b7253
LAB_001b7190:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x001b7246
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001b71b9
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001b7253
LAB_001b71b9:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b71f7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b71f7
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x001b7200
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001b7200
LAB_001b71f7:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b7253
LAB_001b7200:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001b7253
LAB_001b7246:
JMP 0x001b7248
LAB_001b7248:
JMP 0x001b724a
LAB_001b724a:
JMP 0x001b724c
LAB_001b724c:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b7253:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb3_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0x80) {
*param_1 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2[1] ^ 0x80) < 0x40) {
*param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
local_c = 0xffffff99;
}
else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_2[1])))) {
*param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 |
(long)(int)(param_2[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
12,689
|
ft_nlq_find_relevance
|
eloqsql/storage/myisam/ft_nlq_search.c
|
float ft_nlq_find_relevance(FT_INFO *handler,
uchar *record __attribute__((unused)),
uint length __attribute__((unused)))
{
int a,b,c;
FT_DOC *docs=handler->doc;
my_off_t docid=handler->info->lastpos;
if (docid == HA_POS_ERROR)
return -5.0;
/* Assuming docs[] is sorted by dpos... */
for (a=0, b=handler->ndocs, c=(a+b)/2; b-a>1; c=(a+b)/2)
{
if (docs[c].dpos > docid)
b=c;
else
a=c;
}
/* bounds check to avoid accessing unallocated handler->doc */
if (a < handler->ndocs && docs[a].dpos == docid)
return (float) docs[a].weight;
else
return 0.0;
}
|
O0
|
c
|
ft_nlq_find_relevance:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x170(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $-0x1, -0x38(%rbp)
jne 0x68a87
movss 0x6f597(%rip), %xmm0 # 0xd8014
movss %xmm0, -0x4(%rbp)
jmp 0x68b3a
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
subl -0x20(%rbp), %eax
cmpl $0x1, %eax
jle 0x68aef
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jbe 0x68ad4
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x68ada
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x68adc
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
jmp 0x68aa9
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x68b32
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jne 0x68b32
movq -0x30(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x68b3a
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ft_nlq_find_relevance:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
add rax, 18h
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+170h]
mov [rbp+var_38], rax
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jnz short loc_68A87
movss xmm0, cs:dword_D8014
movss [rbp+var_4], xmm0
jmp loc_68B3A
loc_68A87:
mov [rbp+var_20], 0
mov rax, [rbp+var_10]
mov eax, [rax+10h]
mov [rbp+var_24], eax
mov eax, [rbp+var_20]
add eax, [rbp+var_24]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_28], eax
loc_68AA9:
mov eax, [rbp+var_24]
sub eax, [rbp+var_20]
cmp eax, 1
jle short loc_68AEF
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_28]
shl rcx, 4
add rax, rcx
mov rax, [rax]
cmp rax, [rbp+var_38]
jbe short loc_68AD4
mov eax, [rbp+var_28]
mov [rbp+var_24], eax
jmp short loc_68ADA
loc_68AD4:
mov eax, [rbp+var_28]
mov [rbp+var_20], eax
loc_68ADA:
jmp short $+2
loc_68ADC:
mov eax, [rbp+var_20]
add eax, [rbp+var_24]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_28], eax
jmp short loc_68AA9
loc_68AEF:
mov eax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp eax, [rcx+10h]
jge short loc_68B32
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_20]
shl rcx, 4
add rax, rcx
mov rax, [rax]
cmp rax, [rbp+var_38]
jnz short loc_68B32
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_20]
shl rcx, 4
add rax, rcx
movsd xmm0, qword ptr [rax+8]
cvtsd2ss xmm0, xmm0
movss [rbp+var_4], xmm0
jmp short loc_68B3A
loc_68B32:
xorps xmm0, xmm0
movss [rbp+var_4], xmm0
loc_68B3A:
movss xmm0, [rbp+var_4]
pop rbp
retn
|
float ft_nlq_find_relevance(long long a1)
{
unsigned long long v3; // [rsp+0h] [rbp-38h]
long long v4; // [rsp+8h] [rbp-30h]
int v5; // [rsp+10h] [rbp-28h]
int v6; // [rsp+14h] [rbp-24h]
int v7; // [rsp+18h] [rbp-20h]
v4 = a1 + 24;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 368LL);
if ( v3 == -1LL )
return -5.0;
v7 = 0;
v6 = *(_DWORD *)(a1 + 16);
v5 = v6 / 2;
while ( v6 - v7 > 1 )
{
if ( *(_QWORD *)(16LL * v5 + v4) <= v3 )
v7 = v5;
else
v6 = v5;
v5 = (v6 + v7) / 2;
}
if ( v7 >= *(_DWORD *)(a1 + 16) || *(_QWORD *)(16LL * v7 + v4) != v3 )
return 0.0;
return *(double *)(16LL * v7 + v4 + 8);
}
|
ft_nlq_find_relevance:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x18
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x170]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],-0x1
JNZ 0x00168a87
MOVSS XMM0,dword ptr [0x001d8014]
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x00168b3a
LAB_00168a87:
MOV dword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,dword ptr [RBP + -0x24]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x28],EAX
LAB_00168aa9:
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,dword ptr [RBP + -0x20]
CMP EAX,0x1
JLE 0x00168aef
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00168ad4
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00168ada
LAB_00168ad4:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x20],EAX
LAB_00168ada:
JMP 0x00168adc
LAB_00168adc:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,dword ptr [RBP + -0x24]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00168aa9
LAB_00168aef:
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x10]
JGE 0x00168b32
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x20]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x38]
JNZ 0x00168b32
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x20]
SHL RCX,0x4
ADD RAX,RCX
MOVSD XMM0,qword ptr [RAX + 0x8]
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x00168b3a
LAB_00168b32:
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
LAB_00168b3a:
MOVSS XMM0,dword ptr [RBP + -0x4]
POP RBP
RET
|
float ft_nlq_find_relevance(long param_1)
{
ulong uVar1;
long lVar2;
int4 local_30;
int4 local_2c;
int4 local_28;
int4 local_c;
lVar2 = param_1 + 0x18;
uVar1 = *(ulong *)(*(long *)(param_1 + 8) + 0x170);
if (uVar1 == 0xffffffffffffffff) {
local_c = DAT_001d8014;
}
else {
local_28 = 0;
local_2c = *(int *)(param_1 + 0x10);
local_30 = local_2c;
while (local_30 = local_30 / 2, 1 < local_2c - local_28) {
if (uVar1 < *(ulong *)(lVar2 + (long)local_30 * 0x10)) {
local_2c = local_30;
}
else {
local_28 = local_30;
}
local_30 = local_28 + local_2c;
}
if ((local_28 < *(int *)(param_1 + 0x10)) &&
(*(ulong *)(lVar2 + (long)local_28 * 0x10) == uVar1)) {
local_c = (float)*(double *)(lVar2 + (long)local_28 * 0x10 + 8);
}
else {
local_c = 0.0;
}
}
return local_c;
}
|
|
12,690
|
PFS_status_stats::aggregate_to(system_status_var*)
|
eloqsql/storage/perfschema/pfs_status.cc
|
void PFS_status_stats::aggregate_to(STATUS_VAR *to)
{
if (m_has_stats)
{
ulong *to_var= (ulong*) to;
for (int i= 0;
i < COUNT_GLOBAL_STATUS_VARS;
i++, to_var++)
{
*to_var += m_stats[i];
}
}
}
|
O0
|
cpp
|
PFS_status_stats::aggregate_to(system_status_var*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, (%rax)
je 0x4a431
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0xf4, -0x1c(%rbp)
jge 0x4a42f
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x4a3f8
jmp 0x4a431
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN16PFS_status_stats12aggregate_toEP17system_status_var:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
test byte ptr [rax], 1
jz short loc_4A431
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov [rbp+var_1C], 0
loc_4A3F8:
cmp [rbp+var_1C], 0F4h
jge short loc_4A42F
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
mov rcx, [rax+rcx*8+8]
mov rax, [rbp+var_18]
add rcx, [rax]
mov [rax], rcx
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp short loc_4A3F8
loc_4A42F:
jmp short $+2
loc_4A431:
pop rbp
retn
|
_QWORD * PFS_status_stats::aggregate_to(_BYTE *a1, _QWORD *a2)
{
_QWORD *result; // rax
int i; // [rsp+Ch] [rbp-1Ch]
_QWORD *v4; // [rsp+10h] [rbp-18h]
result = a1;
if ( (*a1 & 1) != 0 )
{
result = a2;
v4 = a2;
for ( i = 0; i < 244; ++i )
{
*v4 += *(_QWORD *)&a1[8 * i + 8];
result = ++v4;
}
}
return result;
}
|
aggregate_to:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
TEST byte ptr [RAX],0x1
JZ 0x0014a431
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_0014a3f8:
CMP dword ptr [RBP + -0x1c],0xf4
JGE 0x0014a42f
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RAX + RCX*0x8 + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0014a3f8
LAB_0014a42f:
JMP 0x0014a431
LAB_0014a431:
POP RBP
RET
|
/* PFS_status_stats::aggregate_to(system_status_var*) */
void __thiscall PFS_status_stats::aggregate_to(PFS_status_stats *this,system_status_var *param_1)
{
int local_24;
system_status_var *local_20;
if (((byte)*this & 1) != 0) {
local_20 = param_1;
for (local_24 = 0; local_24 < 0xf4; local_24 = local_24 + 1) {
*(long *)local_20 = *(long *)(this + (long)local_24 * 8 + 8) + *(long *)local_20;
local_20 = local_20 + 8;
}
}
return;
}
|
|
12,691
|
maria_ft_parse_internal
|
eloqsql/storage/maria/ma_ft_parser.c
|
static int maria_ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
const char *doc_arg,
int doc_len)
{
uchar *doc= (uchar*) doc_arg;
uchar *end= doc + doc_len;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
TREE *wtree= ft_param->wtree;
FT_WORD w;
DBUG_ENTER("maria_ft_parse_internal");
while (maria_ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*)w.pos, w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_ft_parse_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x230(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq -0x28(%rbp), %rsi
leaq -0x58(%rbp), %rcx
movl $0x1, %r8d
callq 0x4bab0
cmpb $0x0, %al
je 0x4beb0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl -0x50(%rbp), %edx
xorl %ecx, %ecx
callq *%rax
cmpl $0x0, %eax
je 0x4beae
jmp 0x4bea5
movl $0x1, -0x4(%rbp)
jmp 0x4beb9
jmp 0x4be61
jmp 0x4beb2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
maria_ft_parse_internal:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
loc_4BE61:
mov rax, [rbp+var_40]
mov rdi, [rax+230h]
mov rdx, [rbp+var_30]
lea rsi, [rbp+var_28]
lea rcx, [rbp+var_58]
mov r8d, 1
call maria_ft_simple_get_word
cmp al, 0
jz short loc_4BEB0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_58]
mov edx, [rbp+var_50]
xor ecx, ecx
call rax
cmp eax, 0
jz short loc_4BEAE
jmp short $+2
loc_4BEA5:
mov [rbp+var_4], 1
jmp short loc_4BEB9
loc_4BEAE:
jmp short loc_4BE61
loc_4BEB0:
jmp short $+2
loc_4BEB2:
mov [rbp+var_4], 0
loc_4BEB9:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_ft_parse_internal(long long a1, _BYTE *a2, int a3)
{
long long v4; // [rsp+8h] [rbp-58h] BYREF
unsigned int v5; // [rsp+10h] [rbp-50h]
long long v6; // [rsp+20h] [rbp-40h]
long long *v7; // [rsp+28h] [rbp-38h]
_BYTE *v8; // [rsp+30h] [rbp-30h]
_BYTE *v9; // [rsp+38h] [rbp-28h] BYREF
int v10; // [rsp+44h] [rbp-1Ch]
_BYTE *v11; // [rsp+48h] [rbp-18h]
long long v12; // [rsp+50h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a2;
v8 = &a2[a3];
v7 = *(long long **)(a1 + 24);
v6 = *v7;
while ( maria_ft_simple_get_word(*(_QWORD *)(v6 + 560), &v9, (unsigned long long)v8, (long long)&v4, 1) )
{
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(v12 + 8))(v12, v4, v5, 0LL) )
return 1;
}
return 0;
}
|
maria_ft_parse_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0014be61:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x230]
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x28]
LEA RCX,[RBP + -0x58]
MOV R8D,0x1
CALL 0x0014bab0
CMP AL,0x0
JZ 0x0014beb0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x58]
MOV EDX,dword ptr [RBP + -0x50]
XOR ECX,ECX
CALL RAX
CMP EAX,0x0
JZ 0x0014beae
JMP 0x0014bea5
LAB_0014bea5:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014beb9
LAB_0014beae:
JMP 0x0014be61
LAB_0014beb0:
JMP 0x0014beb2
LAB_0014beb2:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014beb9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_ft_parse_internal(long param_1,long param_2,int param_3)
{
char cVar1;
int iVar2;
int8 local_60;
int4 local_58;
long local_48;
long *local_40;
long local_38;
long local_30;
int local_24;
long local_20;
long local_18;
local_38 = param_2 + param_3;
local_40 = *(long **)(param_1 + 0x18);
local_48 = *local_40;
local_30 = param_2;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
cVar1 = maria_ft_simple_get_word
(*(int8 *)(local_48 + 0x230),&local_30,local_38,&local_60,1);
if (cVar1 == '\0') {
return 0;
}
iVar2 = (**(code **)(local_18 + 8))(local_18,local_60,local_58,0);
} while (iVar2 == 0);
return 1;
}
|
|
12,692
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
|
monkey531[P]llama/common/json.hpp
|
boundaries compute_boundaries(FloatType value)
{
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// Convert the IEEE representation into a diyfp.
//
// If v is denormal:
// value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1))
// If v is normalized:
// value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1))
static_assert(std::numeric_limits<FloatType>::is_iec559,
"internal error: dtoa_short requires an IEEE-754 floating-point implementation");
constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit)
constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1);
constexpr int kMinExp = 1 - kBias;
constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1)
using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type;
const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value));
const std::uint64_t E = bits >> (kPrecision - 1);
const std::uint64_t F = bits & (kHiddenBit - 1);
const bool is_denormal = E == 0;
const diyfp v = is_denormal
? diyfp(F, kMinExp)
: diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);
// Compute the boundaries m- and m+ of the floating-point value
// v = f * 2^e.
//
// Determine v- and v+, the floating-point predecessor and successor if v,
// respectively.
//
// v- = v - 2^e if f != 2^(p-1) or e == e_min (A)
// = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B)
//
// v+ = v + 2^e
//
// Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_
// between m- and m+ round to v, regardless of how the input rounding
// algorithm breaks ties.
//
// ---+-------------+-------------+-------------+-------------+--- (A)
// v- m- v m+ v+
//
// -----------------+------+------+-------------+-------------+--- (B)
// v- m- v m+ v+
const bool lower_boundary_is_closer = F == 0 && E > 1;
const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);
const diyfp m_minus = lower_boundary_is_closer
? diyfp(4 * v.f - 1, v.e - 2) // (B)
: diyfp(2 * v.f - 1, v.e - 1); // (A)
// Determine the normalized w+ = m+.
const diyfp w_plus = diyfp::normalize(m_plus);
// Determine w- = m- such that e_(w-) = e_(w+).
const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e);
return {diyfp::normalize(v), w_minus, w_plus};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %xmm0, %rax
movq %rax, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
cmpq %rdx, %rcx
jge 0xdb19c
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xdb1b8
movq %rdi, %rbx
movabsq $0x10000000000000, %r14 # imm = 0x10000000000000
leaq -0x1(%r14), %rdx
andq %rax, %rdx
movq %rax, %rcx
shrq $0x34, %rcx
jne 0xdb0f3
leaq 0x1(,%rax,2), %rdi
addq %rax, %rax
movl $0xfffffbce, 0x4(%rsp) # imm = 0xFFFFFBCE
movl $0xfffffbcd, %esi # imm = 0xFFFFFBCD
jmp 0xdb13b
movq %rdx, %r8
orq %r14, %r8
leal -0x433(%rcx), %esi
movl %esi, 0x4(%rsp)
testq %rdx, %rdx
setne %dl
shrq $0x35, %rax
sete %al
leaq 0x1(,%r8,2), %rdi
leal -0x434(%rcx), %esi
orb %dl, %al
jne 0xdb134
addl $0xfffffbcb, %ecx # imm = 0xFFFFFBCB
movabsq $0x3fffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFF
jmp 0xdb143
leaq (%r8,%r8), %rax
movq %r8, %rdx
decq %rax
movl %esi, %ecx
movq %rdx, %r14
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movl %ecx, 0x8(%r15)
callq 0xdb308
movq %rax, %r12
movl %edx, %r13d
movq %r15, %rdi
movl %edx, %esi
callq 0xdb34a
movq %rax, %r15
movl %edx, %ebp
movq %r14, %rdi
movl 0x4(%rsp), %esi
callq 0xdb308
movq %rax, (%rbx)
movl %edx, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movl %ebp, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movl %r13d, 0x28(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37139(%rip), %rdi # 0x1122dc
leaq 0x2f809(%rip), %rdx # 0x10a9b3
leaq 0x3b7e9(%rip), %rcx # 0x11699a
movl $0x42cb, %esi # imm = 0x42CB
jmp 0xdb1d2
leaq 0x3711d(%rip), %rdi # 0x1122dc
leaq 0x2f7ed(%rip), %rdx # 0x10a9b3
leaq 0x3b8e6(%rip), %rcx # 0x116ab3
movl $0x42cc, %esi # imm = 0x42CC
xorl %eax, %eax
callq 0x1e500
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
movq rax, xmm0
mov rcx, rax
btr rcx, 3Fh ; '?'
mov rdx, 7FF0000000000000h
cmp rcx, rdx
jge loc_DB19C
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe loc_DB1B8
mov rbx, rdi
mov r14, 10000000000000h
lea rdx, [r14-1]
and rdx, rax
mov rcx, rax
shr rcx, 34h
jnz short loc_DB0F3
lea rdi, ds:1[rax*2]
add rax, rax
mov [rsp+48h+var_44], 0FFFFFBCEh
mov esi, 0FFFFFBCDh
jmp short loc_DB13B
loc_DB0F3:
mov r8, rdx
or r8, r14
lea esi, [rcx-433h]
mov [rsp+48h+var_44], esi
test rdx, rdx
setnz dl
shr rax, 35h
setz al
lea rdi, ds:1[r8*2]
lea esi, [rcx-434h]
or al, dl
jnz short loc_DB134
add ecx, 0FFFFFBCBh
mov rax, 3FFFFFFFFFFFFFh
jmp short loc_DB143
loc_DB134:
lea rax, [r8+r8]
mov rdx, r8
loc_DB13B:
dec rax
mov ecx, esi
mov r14, rdx
loc_DB143:
lea r15, [rsp+48h+var_40]
mov [r15], rax
mov [r15+8], ecx
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
mov r12, rax
mov r13d, edx
mov rdi, r15
mov esi, edx
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp12normalize_toERKS3_i; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,int)
mov r15, rax
mov ebp, edx
mov rdi, r14
mov esi, [rsp+48h+var_44]
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
mov [rbx], rax
mov [rbx+8], edx
mov [rbx+10h], r15
mov [rbx+18h], ebp
mov [rbx+20h], r12
mov [rbx+28h], r13d
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_DB19C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStdIsfiniteVal; "std::isfinite(value)"
mov esi, 42CBh
jmp short loc_DB1D2
loc_DB1B8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aValue0; "value > 0"
mov esi, 42CCh
loc_DB1D2:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(
long long a1,
double a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
long long v12; // r14
long long v13; // rdx
long long v14; // rcx
long long v15; // rdi
long long v16; // rax
long long v17; // rsi
int v18; // ecx
long long v19; // rax
long long v20; // r12
unsigned int v21; // edx
unsigned int v22; // r13d
long long v23; // r15
int v24; // edx
int v25; // ebp
int v26; // edx
long long v28; // rsi
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
unsigned int v33; // [rsp+4h] [rbp-44h]
long long v34; // [rsp+8h] [rbp-40h] BYREF
int v35; // [rsp+10h] [rbp-38h]
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v28 = 17099LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17099LL,
"GGML_ASSERT(%s) failed",
"std::isfinite(value)");
}
else
{
if ( a2 > 0.0 )
{
v12 = 0x10000000000000LL;
v13 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL;
v14 = *(_QWORD *)&a2 >> 52;
if ( *(_QWORD *)&a2 >> 52 )
{
v33 = v14 - 1075;
v15 = 2 * (v13 | 0x10000000000000LL) + 1;
v17 = (unsigned int)(v14 - 1076);
if ( v13 == 0 && *(_QWORD *)&a2 >> 53 != 0LL )
{
v18 = v14 - 1077;
v19 = 0x3FFFFFFFFFFFFFLL;
LABEL_9:
v34 = v19;
v35 = v18;
v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v15, v17);
v22 = v21;
v23 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(&v34, v21);
v25 = v24;
*(_QWORD *)a1 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v12, v33);
*(_DWORD *)(a1 + 8) = v26;
*(_QWORD *)(a1 + 16) = v23;
*(_DWORD *)(a1 + 24) = v25;
*(_QWORD *)(a1 + 32) = v20;
*(_DWORD *)(a1 + 40) = v22;
return a1;
}
v16 = 2 * (v13 | 0x10000000000000LL);
v13 |= 0x10000000000000uLL;
}
else
{
v15 = 2LL * *(_QWORD *)&a2 + 1;
v16 = 2LL * *(_QWORD *)&a2;
v33 = -1074;
v17 = 4294966221LL;
}
v19 = v16 - 1;
v18 = v17;
v12 = v13;
goto LABEL_9;
}
v28 = 17100LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17100LL,
"GGML_ASSERT(%s) failed",
"value > 0");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v28,
v29,
v30,
v31,
v32,
a8,
a9,
a10,
a11);
}
|
compute_boundaries<double>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOVQ RAX,XMM0
MOV RCX,RAX
BTR RCX,0x3f
MOV RDX,0x7ff0000000000000
CMP RCX,RDX
JGE 0x001db19c
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x001db1b8
MOV RBX,RDI
MOV R14,0x10000000000000
LEA RDX,[R14 + -0x1]
AND RDX,RAX
MOV RCX,RAX
SHR RCX,0x34
JNZ 0x001db0f3
LEA RDI,[0x1 + RAX*0x2]
ADD RAX,RAX
MOV dword ptr [RSP + 0x4],0xfffffbce
MOV ESI,0xfffffbcd
JMP 0x001db13b
LAB_001db0f3:
MOV R8,RDX
OR R8,R14
LEA ESI,[RCX + -0x433]
MOV dword ptr [RSP + 0x4],ESI
TEST RDX,RDX
SETNZ DL
SHR RAX,0x35
SETZ AL
LEA RDI,[0x1 + R8*0x2]
LEA ESI,[RCX + -0x434]
OR AL,DL
JNZ 0x001db134
ADD ECX,0xfffffbcb
MOV RAX,0x3fffffffffffff
JMP 0x001db143
LAB_001db134:
LEA RAX,[R8 + R8*0x1]
MOV RDX,R8
LAB_001db13b:
DEC RAX
MOV ECX,ESI
MOV R14,RDX
LAB_001db143:
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0x8],ECX
CALL 0x001db308
MOV R12,RAX
MOV R13D,EDX
MOV RDI,R15
MOV ESI,EDX
CALL 0x001db34a
MOV R15,RAX
MOV EBP,EDX
MOV RDI,R14
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x001db308
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x8],EDX
MOV qword ptr [RBX + 0x10],R15
MOV dword ptr [RBX + 0x18],EBP
MOV qword ptr [RBX + 0x20],R12
MOV dword ptr [RBX + 0x28],R13D
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001db19c:
LEA RDI,[0x2122dc]
LEA RDX,[0x20a9b3]
LEA RCX,[0x21699a]
MOV ESI,0x42cb
JMP 0x001db1d2
LAB_001db1b8:
LEA RDI,[0x2122dc]
LEA RDX,[0x20a9b3]
LEA RCX,[0x216ab3]
MOV ESI,0x42cc
LAB_001db1d2:
XOR EAX,EAX
CALL 0x0011e500
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */
dtoa_impl * __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>
(dtoa_impl *this,double param_1)
{
uint uVar1;
char *pcVar2;
diyfp *pdVar3;
int8 uVar4;
diyfp *pdVar5;
diyfp *pdVar6;
diyfp *pdVar7;
int1 auVar8 [12];
int1 auVar9 [12];
int1 auVar10 [12];
int local_44;
long local_40;
int local_38;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
pcVar2 = "std::isfinite(value)";
uVar4 = 0x42cb;
LAB_001db1d2:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar2);
}
if (param_1 <= 0.0) {
pcVar2 = "value > 0";
uVar4 = 0x42cc;
goto LAB_001db1d2;
}
pdVar7 = (diyfp *)0x10000000000000;
pdVar3 = (diyfp *)((ulong)param_1 & 0xfffffffffffff);
if ((ulong)param_1 >> 0x34 == 0) {
pdVar5 = (diyfp *)((long)param_1 * 2 + 1);
local_40 = (long)param_1 * 2;
local_44 = -0x432;
local_38 = -0x433;
pdVar6 = pdVar3;
}
else {
pdVar6 = (diyfp *)((ulong)pdVar3 | 0x10000000000000);
uVar1 = (uint)((ulong)param_1 >> 0x20);
local_44 = (uVar1 >> 0x14) - 0x433;
pdVar5 = (diyfp *)((long)pdVar6 * 2 + 1);
local_38 = (uVar1 >> 0x14) - 0x434;
if ((ulong)param_1 >> 0x35 != 0 && pdVar3 == (diyfp *)0x0) {
local_38 = (uVar1 >> 0x14) - 0x435;
local_40 = 0x3fffffffffffff;
goto LAB_001db143;
}
local_40 = (long)pdVar6 * 2;
}
local_40 = local_40 + -1;
pdVar7 = pdVar6;
LAB_001db143:
auVar8 = diyfp::normalize(pdVar5);
auVar9 = diyfp::normalize_to((diyfp *)&local_40,auVar8._8_4_);
auVar10 = diyfp::normalize(pdVar7,local_44);
*(int1 (*) [12])this = auVar10;
*(int1 (*) [12])(this + 0x10) = auVar9;
*(int1 (*) [12])(this + 0x20) = auVar8;
return this;
}
|
|
12,693
|
clip_n_mmproj_embd
|
llama.cpp/examples/llava/clip.cpp
|
int clip_n_mmproj_embd(const struct clip_ctx * ctx) {
if (ctx->proj_type == PROJECTOR_TYPE_LDP) {
return ctx->vision_model.mm_model_block_1_block_2_1_b->ne[0];
}
if (ctx->proj_type == PROJECTOR_TYPE_LDPV2) {
return ctx->vision_model.mm_model_peg_0_b->ne[0];
}
if (ctx->proj_type == PROJECTOR_TYPE_MLP) {
return ctx->vision_model.mm_2_b->ne[0];
}
if (ctx->proj_type == PROJECTOR_TYPE_MLP_NORM) {
return ctx->vision_model.mm_3_b->ne[0];
}
if (ctx->proj_type == PROJECTOR_TYPE_RESAMPLER) {
if (ctx->minicpmv_version == 2) {
return 4096;
}
else if (ctx->minicpmv_version == 3) {
return 3584;
}
else if (ctx->minicpmv_version == 4) {
return 3584;
}
}
if (ctx->proj_type == PROJECTOR_TYPE_GLM_EDGE){
return ctx->vision_model.mm_model_mlp_3_w->ne[1];
}
if (ctx->proj_type == PROJECTOR_TYPE_MERGER) {
return ctx->vision_model.mm_1_b->ne[0];
}
if (ctx->proj_type == PROJECTOR_TYPE_GEMMA3) {
return ctx->vision_model.mm_input_proj_w->ne[0];
}
std::string proj_type = PROJECTOR_TYPE_NAMES[ctx->proj_type];
throw std::runtime_error(string_format("%s: don't support projector with: %s currently\n", __func__, proj_type.c_str()));
}
|
O3
|
cpp
|
clip_n_mmproj_embd:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rsi
movl 0x300(%rdi), %eax
cmpq $0x7, %rax
ja 0x25a2c
leaq 0x28de4(%rip), %rcx # 0x4e7a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x110(%rsi), %rax
jmp 0x25a1e
movl 0x8(%rsi), %eax
addl $-0x2, %eax
cmpl $0x3, %eax
jae 0x25a2c
movl %eax, %eax
leaq 0x2944e(%rip), %rcx # 0x4ee30
movl (%rcx,%rax,4), %eax
jmp 0x25a21
movq 0x1d8(%rsi), %rax
jmp 0x25a1e
movq 0x258(%rsi), %rax
jmp 0x25a1e
movq 0x2f0(%rsi), %rax
jmp 0x25a1e
movq 0x138(%rsi), %rax
jmp 0x25a1e
movq 0x180(%rsi), %rax
movl 0x18(%rax), %eax
jmp 0x25a21
movq 0x128(%rsi), %rax
movl 0x10(%rax), %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x300, %rsi # imm = 0x300
leaq 0x39f2e(%rip), %rdi # 0x5f968
callq 0x1cec0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x1c710
movl $0x10, %edi
callq 0x1c8e0
movq %rax, %rbx
movq (%r14), %rcx
leaq 0x29895(%rip), %rsi # 0x4f30b
leaq 0x298be(%rip), %rdx # 0x4f33b
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x280e6
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e230
xorl %ebp, %ebp
movq 0x3854e(%rip), %rsi # 0x5dff0
movq 0x38427(%rip), %rdx # 0x5ded0
movq %rbx, %rdi
callq 0x1e4b0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25acf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d4e0
testb %bpl, %bpl
jne 0x25ad9
jmp 0x25ae1
movq %rax, %r14
movq %rbx, %rdi
callq 0x1ce20
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x25af8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1d4e0
movq %r14, %rdi
callq 0x1e5a0
|
clip_n_mmproj_embd:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov rsi, rdi
mov eax, [rdi+300h]
cmp rax, 7; switch 8 cases
ja short def_259C3; jumptable 00000000000259C3 default case
lea rcx, jpt_259C3
movsxd rax, ds:(jpt_259C3 - 4E7A0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_259C5:
mov rax, [rsi+110h]; jumptable 00000000000259C3 case 0
jmp short loc_25A1E
loc_259CE:
mov eax, [rsi+8]; jumptable 00000000000259C3 case 4
add eax, 0FFFFFFFEh
cmp eax, 3
jnb short def_259C3; jumptable 00000000000259C3 default case
mov eax, eax
lea rcx, unk_4EE30
mov eax, [rcx+rax*4]
jmp short loc_25A21
loc_259E7:
mov rax, [rsi+1D8h]; jumptable 00000000000259C3 case 2
jmp short loc_25A1E
loc_259F0:
mov rax, [rsi+258h]; jumptable 00000000000259C3 case 3
jmp short loc_25A1E
loc_259F9:
mov rax, [rsi+2F0h]; jumptable 00000000000259C3 case 7
jmp short loc_25A1E
loc_25A02:
mov rax, [rsi+138h]; jumptable 00000000000259C3 case 1
jmp short loc_25A1E
loc_25A0B:
mov rax, [rsi+180h]; jumptable 00000000000259C3 case 5
mov eax, [rax+18h]
jmp short loc_25A21
loc_25A17:
mov rax, [rsi+128h]; jumptable 00000000000259C3 case 6
loc_25A1E:
mov eax, [rax+10h]
loc_25A21:
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
def_259C3:
add rsi, 300h; jumptable 00000000000259C3 default case
lea rdi, _ZL20PROJECTOR_TYPE_NAMESB5cxx11; PROJECTOR_TYPE_NAMES
call __ZNSt3mapI14projector_typeNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS0_ESaISt4pairIKS0_S6_EEEixERSA_; std::map<projector_type,std::string>::operator[](projector_type const&)
lea r15, [rsp+68h+var_30]
mov [r15-10h], r15
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea r14, [rsp+68h+var_40]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rcx, [r14]
lea rsi, aSDonTSupportPr; "%s: don't support projector with: %s cu"...
lea rdx, aClipNMmprojEmb_0; "clip_n_mmproj_embd"
lea rdi, [rsp+68h+var_60]
xor eax, eax
call _ZL13string_formatB5cxx11PKcz; string_format(char const*,...)
mov bpl, 1
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_25ACF
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25ACF:
test bpl, bpl
jnz short loc_25AD9
jmp short loc_25AE1
mov r14, rax
loc_25AD9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_25AE1:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r15
jz short loc_25AF8
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25AF8:
mov rdi, r14
call __Unwind_Resume
|
long long clip_n_mmproj_embd(long long a1)
{
long long v1; // rax
unsigned int v2; // eax
long long result; // rax
_QWORD *v4; // rax
void *exception; // rbx
int v6; // r8d
int v7; // r9d
_BYTE v8[16]; // [rsp+8h] [rbp-60h] BYREF
void *v9; // [rsp+28h] [rbp-40h] BYREF
long long v10; // [rsp+38h] [rbp-30h] BYREF
switch ( *(_DWORD *)(a1 + 768) )
{
case 0:
v1 = *(_QWORD *)(a1 + 272);
goto LABEL_11;
case 1:
v1 = *(_QWORD *)(a1 + 312);
goto LABEL_11;
case 2:
v1 = *(_QWORD *)(a1 + 472);
goto LABEL_11;
case 3:
v1 = *(_QWORD *)(a1 + 600);
goto LABEL_11;
case 4:
v2 = *(_DWORD *)(a1 + 8) - 2;
if ( v2 >= 3 )
goto LABEL_13;
result = dword_4EE30[v2];
break;
case 5:
return *(unsigned int *)(*(_QWORD *)(a1 + 384) + 24LL);
case 6:
v1 = *(_QWORD *)(a1 + 296);
goto LABEL_11;
case 7:
v1 = *(_QWORD *)(a1 + 752);
LABEL_11:
result = *(unsigned int *)(v1 + 16);
break;
default:
LABEL_13:
v4 = (_QWORD *)std::map<projector_type,std::string>::operator[](&PROJECTOR_TYPE_NAMES[abi:cxx11], a1 + 768);
v9 = &v10;
std::string::_M_construct<char *>(&v9, *v4, *v4 + v4[1]);
exception = __cxa_allocate_exception(0x10uLL);
string_format[abi:cxx11](
(unsigned int)v8,
(unsigned int)"%s: don't support projector with: %s currently\n",
(unsigned int)"clip_n_mmproj_embd",
(_DWORD)v9,
v6,
v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
|
clip_n_mmproj_embd:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RSI,RDI
MOV EAX,dword ptr [RDI + 0x300]
CMP RAX,0x7
JA 0x00125a2c
LEA RCX,[0x14e7a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RSI + 0x110]
JMP 0x00125a1e
caseD_4:
MOV EAX,dword ptr [RSI + 0x8]
ADD EAX,-0x2
CMP EAX,0x3
JNC 0x00125a2c
MOV EAX,EAX
LEA RCX,[0x14ee30]
MOV EAX,dword ptr [RCX + RAX*0x4]
JMP 0x00125a21
caseD_2:
MOV RAX,qword ptr [RSI + 0x1d8]
JMP 0x00125a1e
caseD_3:
MOV RAX,qword ptr [RSI + 0x258]
JMP 0x00125a1e
caseD_7:
MOV RAX,qword ptr [RSI + 0x2f0]
JMP 0x00125a1e
caseD_1:
MOV RAX,qword ptr [RSI + 0x138]
JMP 0x00125a1e
caseD_5:
MOV RAX,qword ptr [RSI + 0x180]
MOV EAX,dword ptr [RAX + 0x18]
JMP 0x00125a21
caseD_6:
MOV RAX,qword ptr [RSI + 0x128]
LAB_00125a1e:
MOV EAX,dword ptr [RAX + 0x10]
LAB_00125a21:
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
default:
ADD RSI,0x300
LEA RDI,[0x15f968]
CALL 0x0011cec0
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011c710
MOV EDI,0x10
CALL 0x0011c8e0
MOV RBX,RAX
MOV RCX,qword ptr [R14]
LAB_00125a6f:
LEA RSI,[0x14f30b]
LEA RDX,[0x14f33b]
LEA RDI,[RSP + 0x8]
XOR EAX,EAX
CALL 0x001280e6
MOV BPL,0x1
LAB_00125a8c:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011e230
XOR EBP,EBP
MOV RSI,qword ptr [0x0015dff0]
MOV RDX,qword ptr [0x0015ded0]
MOV RDI,RBX
CALL 0x0011e4b0
|
int4 clip_n_mmproj_embd(long param_1)
{
uint uVar1;
long lVar2;
long *plVar3;
runtime_error *this;
string local_60 [32];
int1 *local_40 [2];
int1 local_30 [16];
switch(*(int4 *)(param_1 + 0x300)) {
case 0:
lVar2 = *(long *)(param_1 + 0x110);
break;
case 1:
lVar2 = *(long *)(param_1 + 0x138);
break;
case 2:
lVar2 = *(long *)(param_1 + 0x1d8);
break;
case 3:
lVar2 = *(long *)(param_1 + 600);
break;
case 4:
uVar1 = *(int *)(param_1 + 8) - 2;
if (uVar1 < 3) {
return *(int4 *)(&DAT_0014ee30 + (ulong)uVar1 * 4);
}
default:
plVar3 = (long *)std::
map<projector_type,std::__cxx11::string,std::less<projector_type>,std::allocator<std::pair<projector_type_const,std::__cxx11::string>>>
::operator[]((map<projector_type,std::__cxx11::string,std::less<projector_type>,std::allocator<std::pair<projector_type_const,std::__cxx11::string>>>
*)PROJECTOR_TYPE_NAMES_abi_cxx11_,
(projector_type *)(param_1 + 0x300));
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char*>(local_40,*plVar3,plVar3[1] + *plVar3);
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00125a6f to 00125a88 has its CatchHandler @ 00125ad6 */
string_format_abi_cxx11_
((char *)local_60,"%s: don\'t support projector with: %s currently\n",
"clip_n_mmproj_embd",local_40[0]);
/* try { // try from 00125a8c to 00125ab0 has its CatchHandler @ 00125ab1 */
std::runtime_error::runtime_error(this,local_60);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0015dff0,PTR__runtime_error_0015ded0);
case 5:
return *(int4 *)(*(long *)(param_1 + 0x180) + 0x18);
case 6:
lVar2 = *(long *)(param_1 + 0x128);
break;
case 7:
lVar2 = *(long *)(param_1 + 0x2f0);
}
return *(int4 *)(lVar2 + 0x10);
}
|
|
12,694
|
ulight::html::match_character_reference(std::basic_string_view<char8_t, std::char_traits<char8_t>>)
|
ulight/src/main/cpp/html.cpp
|
std::size_t match_character_reference(std::u8string_view str)
{
if (!str.starts_with(u8'&')) {
return 0;
}
const std::size_t result = str.find(u8';', 1);
const bool success = result != std::u8string_view::npos
&& is_character_reference_content(str.substr(1, result - 1));
return success ? result + 1 : 0;
}
|
O0
|
cpp
|
ulight::html::match_character_reference(std::basic_string_view<char8_t, std::char_traits<char8_t>>):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
movl $0x26, %esi
callq 0xb7b0
testb $0x1, %al
jne 0x1006c
movq $0x0, -0x8(%rbp)
jmp 0x100e9
leaq -0x18(%rbp), %rdi
movl $0x3b, %esi
movl $0x1, %edx
callq 0xde40
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x20(%rbp)
movb %al, -0x39(%rbp)
je 0x100bd
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
leaq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xb720
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x10100
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x100d9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x100e1
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x100e1
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN6ulight4html25match_character_referenceESt17basic_string_viewIDuSt11char_traitsIDuEE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_18], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_18]
mov esi, 26h ; '&'
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEDu; std::u8string_view::starts_with(char8_t)
test al, 1
jnz short loc_1006C
mov [rbp+var_8], 0
jmp short loc_100E9
loc_1006C:
lea rdi, [rbp+var_18]
mov esi, 3Bh ; ';'
mov edx, 1
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE4findEDum; std::u8string_view::find(char8_t,ulong)
mov [rbp+var_20], rax
xor eax, eax
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_39], al
jz short loc_100BD
mov rdx, [rbp+var_20]
sub rdx, 1
lea rdi, [rbp+var_18]
mov esi, 1
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6substrEmm; std::u8string_view::substr(ulong,ulong)
mov [rbp+var_38], rax
mov [rbp+var_30], rdx
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
call _ZN6ulight4html12_GLOBAL__N_130is_character_reference_contentESt17basic_string_viewIDuSt11char_traitsIDuEE; ulight::html::`anonymous namespace'::is_character_reference_content(std::u8string_view)
mov [rbp+var_39], al
loc_100BD:
mov al, [rbp+var_39]
and al, 1
mov [rbp+var_21], al
test [rbp+var_21], 1
jz short loc_100D9
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_100E1
loc_100D9:
xor eax, eax
mov [rbp+var_48], rax
jmp short $+2
loc_100E1:
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
loc_100E9:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long ulight::html::match_character_reference(unsigned long long a1, unsigned long long a2)
{
long long v2; // rdx
char is_character_reference_content; // [rsp+17h] [rbp-39h]
long long v6; // [rsp+18h] [rbp-38h]
long long v7; // [rsp+30h] [rbp-20h]
unsigned long long v8[2]; // [rsp+38h] [rbp-18h] BYREF
v8[0] = a1;
v8[1] = a2;
if ( !std::u8string_view::starts_with((long long)v8, 0x26u) )
return 0LL;
v7 = std::u8string_view::find(v8, 0x3Bu, 1uLL);
is_character_reference_content = 0;
if ( v7 != -1 )
{
v6 = std::u8string_view::substr(v8, 1uLL, v7 - 1);
is_character_reference_content = ulight::html::`anonymous namespace'::is_character_reference_content(v6, v2);
}
if ( (is_character_reference_content & 1) != 0 )
return v7 + 1;
else
return 0LL;
}
|
match_character_reference:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x18]
MOV ESI,0x26
CALL 0x0010b7b0
TEST AL,0x1
JNZ 0x0011006c
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001100e9
LAB_0011006c:
LEA RDI,[RBP + -0x18]
MOV ESI,0x3b
MOV EDX,0x1
CALL 0x0010de40
MOV qword ptr [RBP + -0x20],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x20],-0x1
MOV byte ptr [RBP + -0x39],AL
JZ 0x001100bd
MOV RDX,qword ptr [RBP + -0x20]
SUB RDX,0x1
LEA RDI,[RBP + -0x18]
MOV ESI,0x1
CALL 0x0010b720
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],RDX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00110100
MOV byte ptr [RBP + -0x39],AL
LAB_001100bd:
MOV AL,byte ptr [RBP + -0x39]
AND AL,0x1
MOV byte ptr [RBP + -0x21],AL
TEST byte ptr [RBP + -0x21],0x1
JZ 0x001100d9
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001100e1
LAB_001100d9:
XOR EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001100e1
LAB_001100e1:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
LAB_001100e9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
/* ulight::html::match_character_reference(std::basic_string_view<char8_t, std::char_traits<char8_t>
>) */
long __thiscall ulight::html::match_character_reference(html *this,int8 param_2)
{
ulong uVar1;
int1 auVar2 [16];
long local_50;
byte local_41;
html *local_20;
int8 local_18;
long local_10;
local_20 = this;
local_18 = param_2;
uVar1 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20,'&');
if ((uVar1 & 1) == 0) {
local_10 = 0;
}
else {
local_50 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::find
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20,';',1);
local_41 = 0;
if (local_50 != -1) {
auVar2 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::substr
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20,1,
local_50 - 1);
local_41 = (anonymous_namespace)::is_character_reference_content(auVar2._0_8_,auVar2._8_8_);
}
if ((local_41 & 1) == 0) {
local_50 = 0;
}
else {
local_50 = local_50 + 1;
}
local_10 = local_50;
}
return local_10;
}
|
|
12,695
|
check_posix_name
|
eloqsql/build_O3/extra/pcre2/src/pcre2/src/pcre2_compile.c
|
static int
check_posix_name(PCRE2_SPTR ptr, int len)
{
const char *pn = posix_names;
int yield = 0;
while (posix_name_lengths[yield] != 0)
{
if (len == posix_name_lengths[yield] &&
PRIV(strncmp_c8)(ptr, pn, (unsigned int)len) == 0) return yield;
pn += posix_name_lengths[yield] + 1;
yield++;
}
return -1;
}
|
O3
|
c
|
check_posix_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, -0x38(%rbp)
movl %esi, %eax
movq %rax, -0x30(%rbp)
leaq 0x6c73b(%rip), %r13 # 0x117ba0
xorl %ebx, %ebx
leaq 0x68c85(%rip), %r15 # 0x1140f3
movzbl (%rbx,%r15), %r12d
cmpl %r14d, %r12d
jne 0xab48c
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
callq 0xbe49c
testl %eax, %eax
je 0xab4a0
addq %r12, %r13
incq %r13
incq %rbx
cmpq $0xe, %rbx
jne 0xab46e
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
check_posix_name:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, esi
mov [rbp+var_38], rdi
mov eax, esi
mov [rbp+var_30], rax
lea r13, posix_names; "alpha"
xor ebx, ebx
lea r15, posix_name_lengths
loc_AB46E:
movzx r12d, byte ptr [rbx+r15]
cmp r12d, r14d
jnz short loc_AB48C
mov rdi, [rbp+var_38]
mov rsi, r13
mov rdx, [rbp+var_30]
call _pcre2_strncmp_c8_8
test eax, eax
jz short loc_AB4A0
loc_AB48C:
add r13, r12
inc r13
inc rbx
cmp rbx, 0Eh
jnz short loc_AB46E
mov ebx, 0FFFFFFFFh
loc_AB4A0:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long check_posix_name(long long a1, unsigned int a2, long long a3, long long a4, long long a5)
{
const char *v5; // r13
long long v6; // rbx
long long v7; // r12
v5 = "alpha";
v6 = 0LL;
while ( 1 )
{
v7 = posix_name_lengths[v6];
if ( (_DWORD)v7 == a2 && !(unsigned int)pcre2_strncmp_c8_8(a1, v5, a2, a4, a5) )
break;
v5 += v7 + 1;
if ( ++v6 == 14 )
{
LODWORD(v6) = -1;
return (unsigned int)v6;
}
}
return (unsigned int)v6;
}
|
check_posix_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,ESI
MOV qword ptr [RBP + -0x38],RDI
MOV EAX,ESI
MOV qword ptr [RBP + -0x30],RAX
LEA R13,[0x217ba0]
XOR EBX,EBX
LEA R15,[0x2140f3]
LAB_001ab46e:
MOVZX R12D,byte ptr [RBX + R15*0x1]
CMP R12D,R14D
JNZ 0x001ab48c
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001be49c
TEST EAX,EAX
JZ 0x001ab4a0
LAB_001ab48c:
ADD R13,R12
INC R13
INC RBX
CMP RBX,0xe
JNZ 0x001ab46e
MOV EBX,0xffffffff
LAB_001ab4a0:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong check_posix_name(int8 param_1,uint param_2)
{
byte bVar1;
int iVar2;
ulong uVar3;
char *pcVar4;
pcVar4 = "alpha";
uVar3 = 0;
do {
bVar1 = (&posix_name_lengths)[uVar3];
if (bVar1 == param_2) {
iVar2 = _pcre2_strncmp_c8_8(param_1,pcVar4,param_2);
if (iVar2 == 0) goto LAB_001ab4a0;
}
pcVar4 = pcVar4 + (ulong)bVar1 + 1;
uVar3 = uVar3 + 1;
} while (uVar3 != 0xe);
uVar3 = 0xffffffff;
LAB_001ab4a0:
return uVar3 & 0xffffffff;
}
|
|
12,696
|
js_math_random
|
bluesky950520[P]quickjs/quickjs.c
|
static uint64_t xorshift64star(uint64_t *pstate)
{
uint64_t x;
x = *pstate;
x ^= x >> 12;
x ^= x << 25;
x ^= x >> 27;
*pstate = x;
return x * 0x2545F4914F6CDD1D;
}
|
O2
|
c
|
js_math_random:
movq 0x1c8(%rdi), %rax
movq %rax, %rcx
shrq $0xc, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0x19, %rax
xorq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movq %rcx, 0x1c8(%rdi)
movabsq $0x2545f4914f6cdd1d, %rax # imm = 0x2545F4914F6CDD1D
imulq %rcx, %rax
shrq $0xc, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
orq %rax, %rcx
movq %rcx, %xmm0
addsd 0x1baf7(%rip), %xmm0 # 0x85850
movq %xmm0, %rax
pushq $0x7
popq %rdx
retq
|
js_math_random:
mov rax, [rdi+1C8h]
mov rcx, rax
shr rcx, 0Ch
xor rcx, rax
mov rax, rcx
shl rax, 19h
xor rax, rcx
mov rcx, rax
shr rcx, 1Bh
xor rcx, rax
mov [rdi+1C8h], rcx
mov rax, 2545F4914F6CDD1Dh
imul rax, rcx
shr rax, 0Ch
mov rcx, 3FF0000000000000h
or rcx, rax
movq xmm0, rcx
addsd xmm0, cs:qword_85850
movq rax, xmm0
push 7
pop rdx
retn
|
long long js_math_random(long long a1)
{
long long v1; // rcx
long long result; // rax
v1 = *(_QWORD *)(a1 + 456) ^ (*(_QWORD *)(a1 + 456) >> 12) ^ ((*(_QWORD *)(a1 + 456) ^ (*(_QWORD *)(a1 + 456) >> 12)) << 25) ^ ((*(_QWORD *)(a1 + 456) ^ (*(_QWORD *)(a1 + 456) >> 12) ^ ((*(_QWORD *)(a1 + 456) ^ (*(_QWORD *)(a1 + 456) >> 12)) << 25)) >> 27);
*(_QWORD *)(a1 + 456) = v1;
*(double *)&result = COERCE_DOUBLE(((unsigned long long)(0x2545F4914F6CDD1DLL * v1) >> 12) | 0x3FF0000000000000LL)
+ -1.0;
return result;
}
|
js_math_random:
MOV RAX,qword ptr [RDI + 0x1c8]
MOV RCX,RAX
SHR RCX,0xc
XOR RCX,RAX
MOV RAX,RCX
SHL RAX,0x19
XOR RAX,RCX
MOV RCX,RAX
SHR RCX,0x1b
XOR RCX,RAX
MOV qword ptr [RDI + 0x1c8],RCX
MOV RAX,0x2545f4914f6cdd1d
IMUL RAX,RCX
SHR RAX,0xc
MOV RCX,0x3ff0000000000000
OR RCX,RAX
MOVQ XMM0,RCX
ADDSD XMM0,qword ptr [0x00185850]
MOVQ RAX,XMM0
PUSH 0x7
POP RDX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16] js_math_random(long param_1)
{
ulong uVar1;
int1 auVar2 [16];
uVar1 = *(ulong *)(param_1 + 0x1c8) >> 0xc ^ *(ulong *)(param_1 + 0x1c8);
uVar1 = uVar1 << 0x19 ^ uVar1;
uVar1 = uVar1 >> 0x1b ^ uVar1;
*(ulong *)(param_1 + 0x1c8) = uVar1;
auVar2._8_8_ = 7;
auVar2._0_8_ = (double)(uVar1 * 0x2545f4914f6cdd1d >> 0xc | 0x3ff0000000000000) + _DAT_00185850;
return auVar2;
}
|
|
12,697
|
my_error
|
eloqsql/mysys/my_error.c
|
void my_error(uint nr, myf MyFlags, ...)
{
const char *format;
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
if (!(format = my_get_err_msg(nr)))
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
else
{
va_start(args,MyFlags);
(void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff,
sizeof(ebuff), format, args);
va_end(args);
}
(*error_handler_hook)(nr, ebuff, MyFlags);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_error:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp # imm = 0x2F0
testb %al, %al
je 0x7a237
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm1, -0x2b0(%rbp)
movaps %xmm2, -0x2a0(%rbp)
movaps %xmm3, -0x290(%rbp)
movaps %xmm4, -0x280(%rbp)
movaps %xmm5, -0x270(%rbp)
movaps %xmm6, -0x260(%rbp)
movaps %xmm7, -0x250(%rbp)
movq %r9, -0x2c8(%rbp)
movq %r8, -0x2d0(%rbp)
movq %rcx, -0x2d8(%rbp)
movq %rdx, -0x2e0(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x214(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0x7a26f
movl -0x214(%rbp), %edi
callq 0x7a140
movq %rax, -0x228(%rbp)
cmpq $0x0, %rax
jne 0x7a2a9
leaq -0x210(%rbp), %rdi
movl -0x214(%rbp), %ecx
movl $0x200, %esi # imm = 0x200
leaq 0x58240(%rip), %rdx # 0xd24e0
movb $0x0, %al
callq 0xc9d30
jmp 0x7a2fd
leaq -0x240(%rbp), %rax
leaq -0x2f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x210(%rbp), %rsi
movq -0x228(%rbp), %rcx
leaq -0x240(%rbp), %r8
leaq 0x3711e4(%rip), %rdi # 0x3eb4d0
movl $0x200, %edx # imm = 0x200
callq 0xc7710
leaq -0x240(%rbp), %rax
leaq 0x1bdb8c(%rip), %rax # 0x237e90
movq (%rax), %rax
movl -0x214(%rbp), %edi
leaq -0x210(%rbp), %rsi
movq -0x220(%rbp), %rdx
callq *%rax
jmp 0x7a31f
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7a33a
addq $0x2f0, %rsp # imm = 0x2F0
popq %rbp
retq
callq 0x372c0
nop
|
my_error:
push rbp
mov rbp, rsp
sub rsp, 2F0h
test al, al
jz short loc_7A237
movaps [rbp+var_2C0], xmm0
movaps [rbp+var_2B0], xmm1
movaps [rbp+var_2A0], xmm2
movaps [rbp+var_290], xmm3
movaps [rbp+var_280], xmm4
movaps [rbp+var_270], xmm5
movaps [rbp+var_260], xmm6
movaps [rbp+var_250], xmm7
loc_7A237:
mov [rbp+var_2C8], r9
mov [rbp+var_2D0], r8
mov [rbp+var_2D8], rcx
mov [rbp+var_2E0], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_214], edi
mov [rbp+var_220], rsi
jmp short $+2
loc_7A26F:
mov edi, [rbp+var_214]
call my_get_err_msg
mov [rbp+var_228], rax
cmp rax, 0
jnz short loc_7A2A9
lea rdi, [rbp+var_210]
mov ecx, [rbp+var_214]
mov esi, 200h
lea rdx, aUnknownErrorD; "Unknown error %d"
mov al, 0
call my_snprintf
jmp short loc_7A2FD
loc_7A2A9:
lea rax, [rbp+var_240]
lea rcx, [rbp+var_2F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
lea rsi, [rbp+var_210]
mov rcx, [rbp+var_228]
lea r8, [rbp+var_240]
lea rdi, my_charset_utf8mb3_general_ci
mov edx, 200h
call my_vsnprintf_ex
lea rax, [rbp+var_240]
loc_7A2FD:
lea rax, error_handler_hook
mov rax, [rax]
mov edi, [rbp+var_214]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_220]
call rax
jmp short $+2
loc_7A31F:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7A33A
add rsp, 2F0h
pop rbp
retn
loc_7A33A:
call ___stack_chk_fail
|
unsigned long long my_error(unsigned int a1, long long a2, ...)
{
int v2; // r8d
int v3; // r9d
va_list va; // [rsp+B0h] [rbp-240h] BYREF
_BYTE *err_msg; // [rsp+C8h] [rbp-228h]
long long v7; // [rsp+D0h] [rbp-220h]
unsigned int v8; // [rsp+DCh] [rbp-214h]
_BYTE v9[520]; // [rsp+E0h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+2E8h] [rbp-8h]
va_start(va, a2);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_end(va);
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
err_msg = my_get_err_msg(a1);
if ( err_msg )
{
va_start(va, a2);
my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v9, 512LL, err_msg, va);
}
else
{
my_snprintf((unsigned int)v9, 512, (unsigned int)"Unknown error %d", v8, v2, v3);
}
error_handler_hook();
return __readfsqword(0x28u);
}
|
my_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2f0
TEST AL,AL
JZ 0x0017a237
MOVAPS xmmword ptr [RBP + -0x2c0],XMM0
MOVAPS xmmword ptr [RBP + -0x2b0],XMM1
MOVAPS xmmword ptr [RBP + -0x2a0],XMM2
MOVAPS xmmword ptr [RBP + -0x290],XMM3
MOVAPS xmmword ptr [RBP + -0x280],XMM4
MOVAPS xmmword ptr [RBP + -0x270],XMM5
MOVAPS xmmword ptr [RBP + -0x260],XMM6
MOVAPS xmmword ptr [RBP + -0x250],XMM7
LAB_0017a237:
MOV qword ptr [RBP + -0x2c8],R9
MOV qword ptr [RBP + -0x2d0],R8
MOV qword ptr [RBP + -0x2d8],RCX
MOV qword ptr [RBP + -0x2e0],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x214],EDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x0017a26f
LAB_0017a26f:
MOV EDI,dword ptr [RBP + -0x214]
CALL 0x0017a140
MOV qword ptr [RBP + -0x228],RAX
CMP RAX,0x0
JNZ 0x0017a2a9
LEA RDI,[RBP + -0x210]
MOV ECX,dword ptr [RBP + -0x214]
MOV ESI,0x200
LEA RDX,[0x1d24e0]
MOV AL,0x0
CALL 0x001c9d30
JMP 0x0017a2fd
LAB_0017a2a9:
LEA RAX,[RBP + -0x240]
LEA RCX,[RBP + -0x2f0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LEA RSI,[RBP + -0x210]
MOV RCX,qword ptr [RBP + -0x228]
LEA R8,[RBP + -0x240]
LEA RDI,[0x4eb4d0]
MOV EDX,0x200
CALL 0x001c7710
LEA RAX,[RBP + -0x240]
LAB_0017a2fd:
LEA RAX,[0x337e90]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x214]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x220]
CALL RAX
JMP 0x0017a31f
LAB_0017a31f:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017a33a
ADD RSP,0x2f0
POP RBP
RET
LAB_0017a33a:
CALL 0x001372c0
|
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long in_FS_OFFSET;
int1 local_2f8 [16];
int8 local_2e8;
int8 local_2e0;
int8 local_2d8;
int8 local_2d0;
int8 local_2c8;
int8 local_2b8;
int8 local_2a8;
int8 local_298;
int8 local_288;
int8 local_278;
int8 local_268;
int8 local_258;
int4 local_248;
int4 local_244;
int1 *local_240;
int1 *local_238;
long local_230;
int8 local_228;
int4 local_21c;
int1 local_218 [520];
long local_10;
if (in_AL != '\0') {
local_2c8 = param_1;
local_2b8 = param_2;
local_2a8 = param_3;
local_298 = param_4;
local_288 = param_5;
local_278 = param_6;
local_268 = param_7;
local_258 = param_8;
}
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2e8 = param_11;
local_2e0 = param_12;
local_2d8 = param_13;
local_2d0 = param_14;
local_228 = param_10;
local_21c = param_9;
local_230 = my_get_err_msg(param_9);
if (local_230 == 0) {
my_snprintf(local_218,0x200,"Unknown error %d",local_21c);
}
else {
local_238 = local_2f8;
local_240 = &stack0x00000008;
local_244 = 0x30;
local_248 = 0x10;
my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_218,0x200,local_230,&local_248);
}
(*(code *)error_handler_hook)(local_21c,local_218,local_228);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,698
|
print_comment
|
eloqsql/mysys/my_getopt.c
|
static uint print_comment(const char *comment,
int curpos, int startpos, int width)
{
const char *end= strend(comment);
int endpos= startpos + width;
for (; curpos < startpos; curpos++)
putchar(' ');
if (*comment == '.' || *comment == ',')
{
putchar(*comment);
comment++;
curpos++;
}
while (end - comment > endpos - curpos)
{
const char *line_end;
for (line_end= comment + endpos - curpos;
line_end > comment && *line_end != ' ';
line_end--);
for (; comment < line_end; comment++)
putchar(*comment);
while (*comment == ' ')
comment++; /* skip the space, as a newline will take it's place now */
putchar('\n');
for (curpos= 0; curpos < startpos; curpos++)
putchar(' ');
}
printf("%s", comment);
return curpos + (int)(end - comment);
}
|
O0
|
c
|
print_comment:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x154810
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xf54d8
movl $0x20, %edi
callq 0x2a8c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf54bb
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0xf54f0
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xf5511
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x2a8c0
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf5513
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl -0xc(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0xf55f8
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x31(%rbp)
jbe 0xf556a
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xf5573
jmp 0xf5583
jmp 0xf5575
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xf554b
jmp 0xf5585
movq -0x8(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xf55a9
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x2a8c0
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xf5585
jmp 0xf55ab
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xf55c5
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xf55ab
movl $0xa, %edi
callq 0x2a8c0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xf55f3
movl $0x20, %edi
callq 0x2a8c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf55d6
jmp 0xf5513
movq -0x8(%rbp), %rsi
leaq 0x684d2(%rip), %rdi # 0x15dad5
movb $0x0, %al
callq 0x2a060
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
addl %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
|
print_comment:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov rdi, [rbp+var_8]
call strend
mov [rbp+var_20], rax
mov eax, [rbp+var_10]
add eax, [rbp+var_14]
mov [rbp+var_24], eax
loc_F54BB:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jge short loc_F54D8
mov edi, 20h ; ' '
call _putchar
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_F54BB
loc_F54D8:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_F54F0
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jnz short loc_F5511
loc_F54F0:
mov rax, [rbp+var_8]
movsx edi, byte ptr [rax]
call _putchar
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
loc_F5511:
jmp short $+2
loc_F5513:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, [rbp+var_C]
movsxd rcx, ecx
cmp rax, rcx
jle loc_F55F8
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_24]
add rax, rcx
movsxd rdx, [rbp+var_C]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_30], rax
loc_F554B:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_31], al
jbe short loc_F556A
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setnz al
mov [rbp+var_31], al
loc_F556A:
mov al, [rbp+var_31]
test al, 1
jnz short loc_F5573
jmp short loc_F5583
loc_F5573:
jmp short $+2
loc_F5575:
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
jmp short loc_F554B
loc_F5583:
jmp short $+2
loc_F5585:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_30]
jnb short loc_F55A9
mov rax, [rbp+var_8]
movsx edi, byte ptr [rax]
call _putchar
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_F5585
loc_F55A9:
jmp short $+2
loc_F55AB:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jnz short loc_F55C5
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_F55AB
loc_F55C5:
mov edi, 0Ah
call _putchar
mov [rbp+var_C], 0
loc_F55D6:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jge short loc_F55F3
mov edi, 20h ; ' '
call _putchar
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_F55D6
loc_F55F3:
jmp loc_F5513
loc_F55F8:
mov rsi, [rbp+var_8]
lea rdi, aAtLineDPosDS+13h; "%s"
mov al, 0
call _printf
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_8]
sub rcx, rdx
add eax, ecx
add rsp, 40h
pop rbp
retn
|
long long print_comment(const char *a1, int j, int a3, int a4)
{
bool v5; // [rsp+Fh] [rbp-31h]
const char *i; // [rsp+10h] [rbp-30h]
int v7; // [rsp+1Ch] [rbp-24h]
long long v8; // [rsp+20h] [rbp-20h]
const char *v12; // [rsp+38h] [rbp-8h]
v12 = a1;
v8 = strend(a1);
v7 = a4 + a3;
while ( j < a3 )
{
putchar(32LL);
++j;
}
if ( *a1 == 46 || *a1 == 44 )
{
putchar((unsigned int)*a1);
v12 = a1 + 1;
++j;
}
while ( v8 - (long long)v12 > v7 - j )
{
for ( i = &v12[v7 - j]; ; --i )
{
v5 = 0;
if ( i > v12 )
v5 = *i != 32;
if ( !v5 )
break;
}
while ( v12 < i )
putchar((unsigned int)*v12++);
while ( *v12 == 32 )
++v12;
putchar(10LL);
for ( j = 0; j < a3; ++j )
putchar(32LL);
}
printf("%s", v12);
return (unsigned int)(v8 - (_DWORD)v12 + j);
}
|
print_comment:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00254810
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
LAB_001f54bb:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001f54d8
MOV EDI,0x20
CALL 0x0012a8c0
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f54bb
LAB_001f54d8:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x001f54f0
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JNZ 0x001f5511
LAB_001f54f0:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDI,byte ptr [RAX]
CALL 0x0012a8c0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
LAB_001f5511:
JMP 0x001f5513
LAB_001f5513:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,dword ptr [RBP + -0xc]
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x001f55f8
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOVSXD RDX,dword ptr [RBP + -0xc]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_001f554b:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x31],AL
JBE 0x001f556a
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f556a:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001f5573
JMP 0x001f5583
LAB_001f5573:
JMP 0x001f5575
LAB_001f5575:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001f554b
LAB_001f5583:
JMP 0x001f5585
LAB_001f5585:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001f55a9
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDI,byte ptr [RAX]
CALL 0x0012a8c0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f5585
LAB_001f55a9:
JMP 0x001f55ab
LAB_001f55ab:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JNZ 0x001f55c5
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f55ab
LAB_001f55c5:
MOV EDI,0xa
CALL 0x0012a8c0
MOV dword ptr [RBP + -0xc],0x0
LAB_001f55d6:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001f55f3
MOV EDI,0x20
CALL 0x0012a8c0
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f55d6
LAB_001f55f3:
JMP 0x001f5513
LAB_001f55f8:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x25dad5]
MOV AL,0x0
CALL 0x0012a060
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
ADD EAX,ECX
ADD RSP,0x40
POP RBP
RET
|
int print_comment(char *param_1,int param_2,int param_3,int param_4)
{
long lVar1;
bool bVar2;
char *local_38;
int local_14;
char *local_10;
lVar1 = strend(param_1);
for (local_14 = param_2; local_14 < param_3; local_14 = local_14 + 1) {
putchar(0x20);
}
if ((*param_1 == '.') || (local_10 = param_1, *param_1 == ',')) {
putchar((int)*param_1);
local_10 = param_1 + 1;
local_14 = local_14 + 1;
}
while ((long)((param_3 + param_4) - local_14) < lVar1 - (long)local_10) {
local_38 = local_10 + ((long)(param_3 + param_4) - (long)local_14);
while( true ) {
bVar2 = false;
if (local_10 < local_38) {
bVar2 = *local_38 != ' ';
}
if (!bVar2) break;
local_38 = local_38 + -1;
}
for (; local_10 < local_38; local_10 = local_10 + 1) {
putchar((int)*local_10);
}
for (; *local_10 == ' '; local_10 = local_10 + 1) {
}
putchar(10);
for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) {
putchar(0x20);
}
}
printf("%s",local_10);
return local_14 + ((int)lVar1 - (int)local_10);
}
|
|
12,699
|
ps_fetch_int32
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break; */
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break;
default:
{
int32 sval= sint4korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 4;
}
break;
}
}
|
O3
|
c
|
ps_fetch_int32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x60(%rdi), %eax
cmpl $0x9, %eax
je 0x24389
cmpl $0x3, %eax
jne 0x2439c
movq %rbx, %rdx
movl $0x4, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2376c
movq (%rbx), %rax
movslq (%rax), %rax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movl %eax, %edx
cmoveq %rax, %rdx
callq 0x24e47
addq $0x4, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ps_fetch_int32:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
mov eax, [rdi+60h]
cmp eax, 9
jz short loc_24389
cmp eax, 3
jnz short loc_2439C
loc_24389:
mov rdx, rbx
mov ecx, 4
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_2439C:
mov rax, [rbx]
movsxd rax, dword ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
mov edx, eax
cmovz rdx, rax
call convert_from_long
add qword ptr [rbx], 4
add rsp, 8
pop rbx
pop rbp
retn
|
long long ps_fetch_int32(long long a1, long long a2, _BYTE **a3)
{
int v4; // eax
long long result; // rax
long long v6; // rdx
v4 = *(_DWORD *)(a1 + 96);
if ( v4 == 9 || v4 == 3 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u);
v6 = *(unsigned int *)*a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 )
v6 = *(int *)*a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 4;
return result;
}
|
ps_fetch_int32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EAX,dword ptr [RDI + 0x60]
CMP EAX,0x9
JZ 0x00124389
CMP EAX,0x3
JNZ 0x0012439c
LAB_00124389:
MOV RDX,RBX
MOV ECX,0x4
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0012376c
LAB_0012439c:
MOV RAX,qword ptr [RBX]
MOVSXD RAX,dword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOV EDX,EAX
CMOVZ RDX,RAX
CALL 0x00124e47
ADD qword ptr [RBX],0x4
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int32(long param_1,long param_2,long *param_3)
{
ulong uVar1;
if ((*(int *)(param_1 + 0x60) != 9) && (*(int *)(param_1 + 0x60) != 3)) {
uVar1 = (ulong)*(uint *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
uVar1 = (long)(int)*(uint *)*param_3;
}
convert_from_long(param_1,param_2,uVar1);
*param_3 = *param_3 + 4;
return;
}
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4);
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.