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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
17,500
|
JS_ThrowTypeErrorReadOnly
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom)
{
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom);
return -1;
} else {
return FALSE;
}
}
|
O0
|
c
|
JS_ThrowTypeErrorReadOnly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl 0x14(%rsp), %eax
andl $0x4000, %eax # imm = 0x4000
cmpl $0x0, %eax
jne 0x6100c
movl 0x14(%rsp), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
je 0x6103d
movq 0x18(%rsp), %rdi
callq 0x37f40
cmpl $0x0, %eax
je 0x6103d
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
leaq 0xad17b(%rip), %rdx # 0x10e197
leaq 0xa863d(%rip), %rcx # 0x109660
movb $0x0, %al
callq 0x603e0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x61045
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
JS_ThrowTypeErrorReadOnly:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov [rsp+28h+var_18], edx
mov eax, [rsp+28h+var_14]
and eax, 4000h
cmp eax, 0
jnz short loc_6100C
mov eax, [rsp+28h+var_14]
and eax, 8000h
cmp eax, 0
jz short loc_6103D
mov rdi, [rsp+28h+var_10]
call is_strict_mode
cmp eax, 0
jz short loc_6103D
loc_6100C:
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_18]
lea rdx, aSIsReadOnly; "'%s' is read-only"
lea rcx, aIncludeQuickjs+1Bh; ""
mov al, 0
call __JS_ThrowTypeErrorAtom
mov [rsp+28h+var_28], rax
mov [rsp+28h+var_20], rdx
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_61045
loc_6103D:
mov [rsp+28h+var_4], 0
loc_61045:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long JS_ThrowTypeErrorReadOnly(
long long a1,
__int16 a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
if ( (a2 & 0x4000) != 0 || a2 < 0 && is_strict_mode(a1) )
{
_JS_ThrowTypeErrorAtom(a1, a3, "'%s' is read-only", a4, a5, a6, a7, a8, a9, a10, a11);
return (unsigned int)-1;
}
else
{
return 0;
}
}
|
JS_ThrowTypeErrorReadOnly:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV dword ptr [RSP + 0x10],EDX
MOV EAX,dword ptr [RSP + 0x14]
AND EAX,0x4000
CMP EAX,0x0
JNZ 0x0016100c
MOV EAX,dword ptr [RSP + 0x14]
AND EAX,0x8000
CMP EAX,0x0
JZ 0x0016103d
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00137f40
CMP EAX,0x0
JZ 0x0016103d
LAB_0016100c:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x10]
LEA RDX,[0x20e197]
LEA RCX,[0x209660]
MOV AL,0x0
CALL 0x001603e0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00161045
LAB_0016103d:
MOV dword ptr [RSP + 0x24],0x0
LAB_00161045:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 JS_ThrowTypeErrorReadOnly(int8 param_1,uint param_2,int4 param_3)
{
int iVar1;
int4 local_4;
if ((param_2 & 0x4000) == 0) {
if ((param_2 & 0x8000) != 0) {
iVar1 = is_strict_mode(param_1);
if (iVar1 != 0) goto LAB_0016100c;
}
local_4 = 0;
}
else {
LAB_0016100c:
__JS_ThrowTypeErrorAtom(param_1,param_3,"\'%s\' is read-only","");
local_4 = 0xffffffff;
}
return local_4;
}
|
|
17,501
|
JS_ThrowTypeErrorReadOnly
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom)
{
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom);
return -1;
} else {
return FALSE;
}
}
|
O1
|
c
|
JS_ThrowTypeErrorReadOnly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
btl $0xe, %esi
jb 0x3db8d
xorl %eax, %eax
testw %si, %si
jns 0x3dbb2
movq 0x18(%rbx), %rcx
movq 0x108(%rcx), %rcx
testq %rcx, %rcx
je 0x3dbb2
cmpl $0x0, 0x40(%rcx)
jns 0x3dbb2
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
callq 0x221f0
leaq 0x61593(%rip), %rsi # 0x9f133
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
retq
|
JS_ThrowTypeErrorReadOnly:
push rbx
sub rsp, 40h
mov rbx, rdi
bt esi, 0Eh
jb short loc_3DB8D
xor eax, eax
test si, si
jns short loc_3DBB2
mov rcx, [rbx+18h]
mov rcx, [rcx+108h]
test rcx, rcx
jz short loc_3DBB2
cmp dword ptr [rcx+40h], 0
jns short loc_3DBB2
loc_3DB8D:
mov rdi, [rbx+18h]
mov rsi, rsp
call JS_AtomGetStrRT
lea rsi, aSIsReadOnly; "'%s' is read-only"
mov rdi, rbx
mov rdx, rax
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
loc_3DBB2:
add rsp, 40h
pop rbx
retn
|
long long JS_ThrowTypeErrorReadOnly(
long long a1,
__int16 a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long result; // rax
long long v12; // rcx
unsigned long long StrRT; // rax
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
char v19[72]; // [rsp+0h] [rbp-48h] BYREF
if ( (a2 & 0x4000) != 0
|| (result = 0LL, a2 < 0) && (v12 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v12 + 64) < 0 )
{
StrRT = JS_AtomGetStrRT(*(_QWORD *)(a1 + 24), v19, a3);
JS_ThrowTypeError(
a1,
(long long)"'%s' is read-only",
StrRT,
v14,
v15,
v16,
a4,
a5,
a6,
a7,
v17,
v18,
a10,
a11,
v19[0]);
return 0xFFFFFFFFLL;
}
return result;
}
| |||
17,502
|
JS_ThrowTypeErrorReadOnly
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom)
{
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom);
return -1;
} else {
return FALSE;
}
}
|
O2
|
c
|
JS_ThrowTypeErrorReadOnly:
btl $0xe, %esi
jb 0x3638b
xorl %eax, %eax
testw %si, %si
jns 0x3638a
movq 0x18(%rdi), %rcx
movq 0x108(%rcx), %rcx
testq %rcx, %rcx
je 0x3638a
cmpl $0x0, 0x40(%rcx)
js 0x3638b
retq
pushq %rax
leaq 0x4fcf0(%rip), %rax # 0x86083
movl %edx, %esi
movq %rax, %rdx
callq 0x35e6d
pushq $-0x1
popq %rax
addq $0x8, %rsp
retq
|
JS_ThrowTypeErrorReadOnly:
bt esi, 0Eh
jb short loc_3638B
xor eax, eax
test si, si
jns short locret_3638A
mov rcx, [rdi+18h]
mov rcx, [rcx+108h]
test rcx, rcx
jz short locret_3638A
cmp dword ptr [rcx+40h], 0
js short loc_3638B
locret_3638A:
retn
loc_3638B:
push rax
lea rax, aSIsReadOnly; "'%s' is read-only"
mov esi, edx
mov rdx, rax
call __JS_ThrowTypeErrorAtom
push 0FFFFFFFFFFFFFFFFh
pop rax
add rsp, 8
retn
|
long long JS_ThrowTypeErrorReadOnly(
long long a1,
__int16 a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long result; // rax
long long v12; // rcx
if ( (a2 & 0x4000) != 0
|| (result = 0LL, a2 < 0) && (v12 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v12 + 64) < 0 )
{
_JS_ThrowTypeErrorAtom(a1, a3, "'%s' is read-only", a4, a5, a6, a7, a8, a9, a10, a11);
return -1LL;
}
return result;
}
|
JS_ThrowTypeErrorReadOnly:
BT ESI,0xe
JC 0x0013638b
XOR EAX,EAX
TEST SI,SI
JNS 0x0013638a
MOV RCX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RCX + 0x108]
TEST RCX,RCX
JZ 0x0013638a
CMP dword ptr [RCX + 0x40],0x0
JS 0x0013638b
LAB_0013638a:
RET
LAB_0013638b:
PUSH RAX
LEA RAX,[0x186083]
MOV ESI,EDX
MOV RDX,RAX
CALL 0x00135e6d
PUSH -0x1
POP RAX
ADD RSP,0x8
RET
|
int8 JS_ThrowTypeErrorReadOnly(long param_1,uint param_2,int4 param_3)
{
long lVar1;
if ((param_2 >> 0xe & 1) == 0) {
if (((-1 < (short)param_2) || (lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108), lVar1 == 0)
) || (-1 < *(int *)(lVar1 + 0x40))) {
return 0;
}
}
__JS_ThrowTypeErrorAtom(param_1,param_3,"\'%s\' is read-only");
return 0xffffffffffffffff;
}
|
|
17,503
|
my_caseup_str_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_caseup_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xb644e
jmp 0xb6450
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xb647e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0xb72b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xb6487
jmp 0xb64d6
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xb7410
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb7470
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0xb64af
jmp 0xb64d6
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xb6450
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
|
my_caseup_str_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_B644E:
jmp short $+2
loc_B6450:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_B647E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_utf8mb3_uni_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_B647E:
mov al, [rbp+var_39]
test al, 1
jnz short loc_B6487
jmp short loc_B64D6
loc_B6487:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uni_utf8mb3_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_B64AF
jmp short loc_B64D6
loc_B64AF:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_B6450
loc_B64D6:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
|
_BYTE * my_caseup_str_utf8mb3(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_utf8mb3_uni_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_toupper_utf8mb3(v4, &v8);
v6 = my_uni_utf8mb3_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
|
my_caseup_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001b644e
LAB_001b644e:
JMP 0x001b6450
LAB_001b6450:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x001b647e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001b72b0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001b647e:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x001b6487
JMP 0x001b64d6
LAB_001b6487:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x001b7410
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b7470
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x001b64af
JMP 0x001b64d6
LAB_001b64af:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b6450
LAB_001b64d6:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_caseup_str_utf8mb3(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_20);
iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
|
|
17,504
|
testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
AssertionResult EqFailure(const char* lhs_expression,
const char* rhs_expression,
const std::string& lhs_value,
const std::string& rhs_value, bool ignoring_case) {
Message msg;
msg << "Expected equality of these values:";
msg << "\n " << lhs_expression;
if (lhs_value != lhs_expression) {
msg << "\n Which is: " << lhs_value;
}
msg << "\n " << rhs_expression;
if (rhs_value != rhs_expression) {
msg << "\n Which is: " << rhs_value;
}
if (ignoring_case) {
msg << "\nIgnoring case";
}
if (!lhs_value.empty() && !rhs_value.empty()) {
const std::vector<std::string> lhs_lines = SplitEscapedString(lhs_value);
const std::vector<std::string> rhs_lines = SplitEscapedString(rhs_value);
if (lhs_lines.size() > 1 || rhs_lines.size() > 1) {
msg << "\nWith diff:\n"
<< edit_distance::CreateUnifiedDiff(lhs_lines, rhs_lines);
}
}
return AssertionFailure() << msg;
}
|
O3
|
cpp
|
testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %ebp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, 0x30(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5e3fe
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x278ff(%rip), %rsi # 0x86d92
movl $0x22, %edx
callq 0x11b90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x27908(%rip), %rsi # 0x86db5
movl $0x3, %edx
callq 0x11b90
movq 0x8(%rsp), %rbx
addq $0x10, %rbx
testq %r13, %r13
je 0x5f4d5
movq %r13, %rdi
callq 0x114d0
movq %rax, %rdx
movq %r13, %rsi
jmp 0x5f4e1
movl $0x6, %edx
leaq 0x2076a(%rip), %rsi # 0x7fc4b
movq %rbx, %rdi
callq 0x11b90
movq %r15, %rdi
movq %r13, %rsi
callq 0x32fde
testl %eax, %eax
je 0x5f527
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x278b1(%rip), %rsi # 0x86db9
movl $0xf, %edx
callq 0x11b90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq (%r15), %rsi
movq 0x8(%r15), %rdx
callq 0x11b90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x2787e(%rip), %rsi # 0x86db5
movl $0x3, %edx
callq 0x11b90
movq 0x8(%rsp), %rbx
addq $0x10, %rbx
testq %r12, %r12
je 0x5f55f
movq %r12, %rdi
callq 0x114d0
movq %rax, %rdx
movq %r12, %rsi
jmp 0x5f56b
movl $0x6, %edx
leaq 0x206e0(%rip), %rsi # 0x7fc4b
movq %rbx, %rdi
callq 0x11b90
movq %r14, %rdi
movq %r12, %rsi
callq 0x32fde
testl %eax, %eax
je 0x5f5b1
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x27827(%rip), %rsi # 0x86db9
movl $0xf, %edx
callq 0x11b90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x11b90
testb %bpl, %bpl
je 0x5f5d0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x27803(%rip), %rsi # 0x86dc9
movl $0xe, %edx
callq 0x11b90
cmpq $0x0, 0x8(%r15)
movq 0x30(%rsp), %rbx
je 0x5f69f
cmpq $0x0, 0x8(%r14)
je 0x5f69f
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x5f772
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x5f772
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
cmpq $0x20, %rax
ja 0x5f625
movq 0x40(%rsp), %rax
subq 0x38(%rsp), %rax
cmpq $0x21, %rax
jb 0x5f68b
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x277a3(%rip), %rsi # 0x86dd8
movl $0xc, %edx
callq 0x11b90
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movl $0x2, %ecx
callq 0x5ed88
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x11b90
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f68b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x38(%rsp), %rdi
callq 0x73be2
leaq 0x50(%rsp), %rdi
callq 0x73be2
leaq 0x18(%rsp), %r14
movb $0x0, -0x8(%r14)
movq $0x0, (%r14)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x73910
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4fa28
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x5f6dc
movq %r14, %rdi
callq 0x1919a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5f6ec
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f723
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x5f723
jmp 0x5f720
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x73be2
jmp 0x5f732
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x73be2
jmp 0x5f75a
jmp 0x5f757
movq %rax, %rbx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x5f75a
movq %r14, %rdi
callq 0x1919a
jmp 0x5f75a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5f76a
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x11760
|
_ZN7testing8internal9EqFailureEPKcS2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov ebp, r9d
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov [rsp+98h+var_68], rdi
lea rbx, [rsp+98h+var_90]
mov rdi, rbx; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rbx]
add rdi, 10h
lea rsi, aExpectedEquali; "Expected equality of these values:"
mov edx, 22h ; '"'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, asc_86DB5; "\n "
mov edx, 3
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+98h+var_90]
add rbx, 10h
test r13, r13
jz short loc_5F4D5
mov rdi, r13
call _strlen
mov rdx, rax
mov rsi, r13
jmp short loc_5F4E1
loc_5F4D5:
mov edx, 6
lea rsi, aNull; "(null)"
loc_5F4E1:
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 rdi, r15
mov rsi, r13
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_5F527
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, aWhichIs; "\n Which is: "
mov edx, 0Fh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+98h+var_90]
add rdi, 10h
mov rsi, [r15]
mov rdx, [r15+8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_5F527:
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, asc_86DB5; "\n "
mov edx, 3
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+98h+var_90]
add rbx, 10h
test r12, r12
jz short loc_5F55F
mov rdi, r12
call _strlen
mov rdx, rax
mov rsi, r12
jmp short loc_5F56B
loc_5F55F:
mov edx, 6
lea rsi, aNull; "(null)"
loc_5F56B:
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 rdi, r14
mov rsi, r12
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_5F5B1
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, aWhichIs; "\n Which is: "
mov edx, 0Fh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+98h+var_90]
add rdi, 10h
mov rsi, [r14]
mov rdx, [r14+8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_5F5B1:
test bpl, bpl
jz short loc_5F5D0
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, aIgnoringCase; "\nIgnoring case"
mov edx, 0Eh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_5F5D0:
cmp qword ptr [r15+8], 0
mov rbx, [rsp+98h+var_68]
jz loc_5F69F
cmp qword ptr [r14+8], 0
jz loc_5F69F
lea rdi, [rsp+98h+var_48]; int
mov rsi, r15; int
call _ZN7testing8internal12_GLOBAL__N_118SplitEscapedStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::SplitEscapedString(std::string const&)
lea rdi, [rsp+98h+var_60]; int
mov rsi, r14; int
call _ZN7testing8internal12_GLOBAL__N_118SplitEscapedStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::SplitEscapedString(std::string const&)
mov rax, [rsp+98h+var_40]
sub rax, qword ptr [rsp+98h+var_48]
cmp rax, 20h ; ' '
ja short loc_5F625
mov rax, [rsp+98h+var_58]
sub rax, qword ptr [rsp+98h+var_60]
cmp rax, 21h ; '!'
jb short loc_5F68B
loc_5F625:
mov rdi, [rsp+98h+var_90]
add rdi, 10h
lea rsi, aWithDiff; "\nWith diff:\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+98h+var_88]
lea rsi, [rsp+98h+var_48]
lea rdx, [rsp+98h+var_60]
mov ecx, 2
call _ZN7testing8internal13edit_distance17CreateUnifiedDiffERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESC_m; testing::internal::edit_distance::CreateUnifiedDiff(std::vector<std::string> const&,std::vector<std::string> const&,ulong)
mov rdi, [rsp+98h+var_90]
add rdi, 10h
mov rsi, [rsp+98h+var_88]
mov rdx, [rsp+98h+var_80]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+98h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5F68B
mov rsi, [rsp+98h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5F68B:
lea rdi, [rsp+98h+var_60]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+98h+var_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_5F69F:
lea r14, [rsp+98h+var_80]
mov byte ptr [r14-8], 0
mov qword ptr [r14], 0
lea rdi, [rsp+98h+var_88]; this
lea rsi, [rsp+98h+var_90]
call _ZN7testing15AssertionResultlsINS_7MessageEEERS0_RKT_; testing::AssertionResult::operator<<<testing::Message>(testing::Message const&)
mov rdi, rbx
mov rsi, rax
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
mov rsi, [rsp+98h+var_80]
test rsi, rsi
jz short loc_5F6DC
mov rdi, r14
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_5F6DC:
mov rdi, [rsp+98h+var_90]
test rdi, rdi
jz short loc_5F6EC
mov rax, [rdi]
call qword ptr [rax+8]
loc_5F6EC:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5F723
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5F723
jmp short $+2
loc_5F720:
mov rbx, rax
loc_5F723:
lea rdi, [rsp+arg_30]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_5F732
mov rbx, rax
loc_5F732:
lea rdi, [rsp+arg_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_5F75A
jmp short loc_5F757
mov rbx, rax
mov rsi, [rsp+arg_10]
test rsi, rsi
jz short loc_5F75A
mov rdi, r14
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_5F75A
loc_5F757:
mov rbx, rax
loc_5F75A:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_5F76A
mov rax, [rdi]
call qword ptr [rax+8]
loc_5F76A:
mov rdi, rbx
call __Unwind_Resume
|
testing::AssertionResult * testing::internal::EqFailure(
testing::AssertionResult *a1,
const char *a2,
long long a3,
_QWORD *a4,
_QWORD *a5,
char a6)
{
long long v10; // r13
long long v11; // rbx
long long v12; // rdx
long long v13; // rbx
long long v14; // rdx
const char *v15; // rsi
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
testing::AssertionResult *v20; // rbx
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
const testing::AssertionResult *v25; // rax
void *v27; // [rsp+0h] [rbp-98h]
void *v28; // [rsp+0h] [rbp-98h]
long long v29; // [rsp+8h] [rbp-90h] BYREF
long long *v30; // [rsp+10h] [rbp-88h] BYREF
long long v31; // [rsp+18h] [rbp-80h] BYREF
long long v32; // [rsp+20h] [rbp-78h] BYREF
testing::AssertionResult *v33; // [rsp+30h] [rbp-68h]
int v34[2]; // [rsp+38h] [rbp-60h] BYREF
long long v35; // [rsp+40h] [rbp-58h]
int v36[2]; // [rsp+50h] [rbp-48h] BYREF
long long v37; // [rsp+58h] [rbp-40h]
v10 = (long long)a2;
v33 = a1;
testing::Message::Message((testing::Message *)&v29);
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "Expected equality of these values:", 34LL);
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\n ", 3LL);
v11 = v29 + 16;
if ( a2 )
{
v12 = strlen(a2);
}
else
{
v12 = 6LL;
a2 = "(null)";
}
std::__ostream_insert<char,std::char_traits<char>>(v11, a2, v12);
if ( (unsigned int)std::string::compare(a4, v10) )
{
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\n Which is: ", 15LL);
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, *a4, a4[1]);
}
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\n ", 3LL);
v13 = v29 + 16;
if ( a3 )
{
v14 = strlen(a3);
v15 = (const char *)a3;
}
else
{
v14 = 6LL;
v15 = "(null)";
}
std::__ostream_insert<char,std::char_traits<char>>(v13, v15, v14);
if ( (unsigned int)std::string::compare(a5, a3) )
{
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\n Which is: ", 15LL);
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, *a5, a5[1]);
}
if ( a6 )
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\nIgnoring case", 14LL);
v20 = v33;
if ( a4[1] && a5[1] )
{
testing::internal::`anonymous namespace'::SplitEscapedString(
(int)v36,
(int)a4,
v16,
v17,
v18,
v19,
v27,
v29,
(long long)v30);
testing::internal::`anonymous namespace'::SplitEscapedString(
(int)v34,
(int)a5,
v21,
v22,
v23,
v24,
v28,
v29,
(long long)v30);
if ( (unsigned long long)(v37 - *(_QWORD *)v36) > 0x20 || (unsigned long long)(v35 - *(_QWORD *)v34) >= 0x21 )
{
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, "\nWith diff:\n", 12LL);
testing::internal::edit_distance::CreateUnifiedDiff((long long)&v30, (long long *)v36, (long long *)v34, 2LL);
std::__ostream_insert<char,std::char_traits<char>>(v29 + 16, v30, v31);
if ( v30 != &v32 )
operator delete(v30, v32 + 1);
}
std::vector<std::string>::~vector(v34);
std::vector<std::string>::~vector(v36);
}
LOBYTE(v30) = 0;
v25 = (const testing::AssertionResult *)testing::AssertionResult::operator<<<testing::Message>(
(testing::AssertionResult *)&v30,
(long long)v27,
v29,
(int)v30,
0LL);
testing::AssertionResult::AssertionResult(v20, v25);
if ( v31 )
std::default_delete<std::string>::operator()((long long)&v31, v31);
if ( v29 )
(*(void ( **)(long long))(*(_QWORD *)v29 + 8LL))(v29);
return v20;
}
|
EqFailure:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV EBP,R9D
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV qword ptr [RSP + 0x30],RDI
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0015e3fe
MOV RDI,qword ptr [RBX]
ADD RDI,0x10
LAB_0015f48c:
LEA RSI,[0x186d92]
MOV EDX,0x22
CALL 0x00111b90
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LEA RSI,[0x186db5]
MOV EDX,0x3
CALL 0x00111b90
MOV RBX,qword ptr [RSP + 0x8]
ADD RBX,0x10
TEST R13,R13
JZ 0x0015f4d5
MOV RDI,R13
CALL 0x001114d0
MOV RDX,RAX
MOV RSI,R13
JMP 0x0015f4e1
LAB_0015f4d5:
MOV EDX,0x6
LEA RSI,[0x17fc4b]
LAB_0015f4e1:
MOV RDI,RBX
CALL 0x00111b90
MOV RDI,R15
MOV RSI,R13
CALL 0x00132fde
TEST EAX,EAX
JZ 0x0015f527
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LEA RSI,[0x186db9]
MOV EDX,0xf
CALL 0x00111b90
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
CALL 0x00111b90
LAB_0015f527:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LEA RSI,[0x186db5]
MOV EDX,0x3
CALL 0x00111b90
MOV RBX,qword ptr [RSP + 0x8]
ADD RBX,0x10
TEST R12,R12
JZ 0x0015f55f
MOV RDI,R12
CALL 0x001114d0
MOV RDX,RAX
MOV RSI,R12
JMP 0x0015f56b
LAB_0015f55f:
MOV EDX,0x6
LEA RSI,[0x17fc4b]
LAB_0015f56b:
MOV RDI,RBX
CALL 0x00111b90
MOV RDI,R14
MOV RSI,R12
CALL 0x00132fde
TEST EAX,EAX
JZ 0x0015f5b1
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LEA RSI,[0x186db9]
MOV EDX,0xf
CALL 0x00111b90
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
CALL 0x00111b90
LAB_0015f5b1:
TEST BPL,BPL
JZ 0x0015f5d0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LEA RSI,[0x186dc9]
MOV EDX,0xe
CALL 0x00111b90
LAB_0015f5d0:
CMP qword ptr [R15 + 0x8],0x0
MOV RBX,qword ptr [RSP + 0x30]
JZ 0x0015f69f
CMP qword ptr [R14 + 0x8],0x0
JZ 0x0015f69f
LAB_0015f5eb:
LEA RDI,[RSP + 0x50]
MOV RSI,R15
CALL 0x0015f772
LAB_0015f5f8:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x0015f772
MOV RAX,qword ptr [RSP + 0x58]
SUB RAX,qword ptr [RSP + 0x50]
CMP RAX,0x20
JA 0x0015f625
MOV RAX,qword ptr [RSP + 0x40]
SUB RAX,qword ptr [RSP + 0x38]
CMP RAX,0x21
JC 0x0015f68b
LAB_0015f625:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LAB_0015f62e:
LEA RSI,[0x186dd8]
MOV EDX,0xc
CALL 0x00111b90
LAB_0015f63f:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x38]
MOV ECX,0x2
CALL 0x0015ed88
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0015f66b:
CALL 0x00111b90
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015f68b
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00111120
LAB_0015f68b:
LEA RDI,[RSP + 0x38]
CALL 0x00173be2
LEA RDI,[RSP + 0x50]
CALL 0x00173be2
LAB_0015f69f:
LEA R14,[RSP + 0x18]
MOV byte ptr [R14 + -0x8],0x0
MOV qword ptr [R14],0x0
LAB_0015f6b0:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x8]
CALL 0x00173910
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0014fa28
LAB_0015f6ca:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0015f6dc
MOV RDI,R14
CALL 0x0011919a
LAB_0015f6dc:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0015f6ec
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0015f6ec:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::EqFailure(char const*, char const*, std::__cxx11::string const&,
std::__cxx11::string const&, bool) */
AssertionResult * __thiscall
testing::internal::EqFailure
(internal *this,char *param_1,char *param_2,string *param_3,string *param_4,bool param_5)
{
internal *this_00;
int iVar1;
size_t sVar2;
AssertionResult *pAVar3;
ostream *poVar4;
char *pcVar5;
long *local_90;
edit_distance local_88;
int7 uStack_87;
string *local_80;
long local_78 [2];
internal *local_68;
long local_60;
long local_58;
long local_48;
long local_40;
local_68 = this;
Message::Message((Message *)&local_90);
/* try { // try from 0015f48c to 0015f5cf has its CatchHandler @ 0015f757 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),"Expected equality of these values:",0x22);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_90 + 2),"\n ",3);
poVar4 = (ostream *)(local_90 + 2);
if (param_1 == (char *)0x0) {
sVar2 = 6;
pcVar5 = "(null)";
}
else {
sVar2 = strlen(param_1);
pcVar5 = param_1;
}
std::__ostream_insert<char,std::char_traits<char>>(poVar4,pcVar5,sVar2);
iVar1 = std::__cxx11::string::compare(param_3,param_1);
if (iVar1 != 0) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),"\n Which is: ",0xf);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),*(char **)param_3,*(long *)(param_3 + 8));
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_90 + 2),"\n ",3);
poVar4 = (ostream *)(local_90 + 2);
if (param_2 == (char *)0x0) {
sVar2 = 6;
pcVar5 = "(null)";
}
else {
sVar2 = strlen(param_2);
pcVar5 = param_2;
}
std::__ostream_insert<char,std::char_traits<char>>(poVar4,pcVar5,sVar2);
iVar1 = std::__cxx11::string::compare(param_4,param_2);
if (iVar1 != 0) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),"\n Which is: ",0xf);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),*(char **)param_4,*(long *)(param_4 + 8));
}
if (param_5) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),"\nIgnoring case",0xe);
}
this_00 = local_68;
if ((*(long *)(param_3 + 8) != 0) && (*(long *)(param_4 + 8) != 0)) {
/* try { // try from 0015f5eb to 0015f5f7 has its CatchHandler @ 0015f73e */
(anonymous_namespace)::SplitEscapedString((_anonymous_namespace_ *)&local_48,param_3);
/* try { // try from 0015f5f8 to 0015f604 has its CatchHandler @ 0015f72f */
(anonymous_namespace)::SplitEscapedString((_anonymous_namespace_ *)&local_60,param_4);
if ((0x20 < (ulong)(local_40 - local_48)) || (0x20 < (ulong)(local_58 - local_60))) {
/* try { // try from 0015f62e to 0015f63e has its CatchHandler @ 0015f720 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),"\nWith diff:\n",0xc);
/* try { // try from 0015f63f to 0015f657 has its CatchHandler @ 0015f71e */
edit_distance::CreateUnifiedDiff(&local_88,(vector *)&local_48,(vector *)&local_60,2);
/* try { // try from 0015f66b to 0015f66f has its CatchHandler @ 0015f6fe */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_90 + 2),(char *)CONCAT71(uStack_87,local_88),(long)local_80);
if ((long *)CONCAT71(uStack_87,local_88) != local_78) {
operator_delete((long *)CONCAT71(uStack_87,local_88),local_78[0] + 1);
}
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_60);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48);
}
local_88 = (edit_distance)0x0;
local_80 = (string *)0x0;
/* try { // try from 0015f6b0 to 0015f6c9 has its CatchHandler @ 0015f740 */
pAVar3 = AssertionResult::operator<<((AssertionResult *)&local_88,(Message *)&local_90);
AssertionResult::AssertionResult((AssertionResult *)this_00,pAVar3);
if (local_80 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_80,local_80);
}
if (local_90 != (long *)0x0) {
(**(code **)(*local_90 + 8))();
}
return (AssertionResult *)this_00;
}
|
|
17,505
|
getopt_double_limit_value
|
eloqsql/mysys/my_getopt.c
|
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix)
{
my_bool adjusted= FALSE;
double old= num;
double min, max;
DBUG_ENTER("getopt_double_limit_value");
max= getopt_ulonglong2double(optp->max_value);
min= getopt_ulonglong2double(optp->min_value);
if (max && num > max)
{
num= max;
adjusted= TRUE;
}
if (num < min)
{
num= min;
adjusted= TRUE;
}
if (fix)
*fix= adjusted;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': value %g adjusted to %g",
optp->name, old, num);
DBUG_RETURN(num);
}
|
O0
|
c
|
getopt_double_limit_value:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xdc920
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0xdc920
movsd %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xdec29
jp 0xdec29
jmp 0xdec43
movsd -0x8(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jbe 0xdec43
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movb $0x1, -0x19(%rbp)
movsd -0x8(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xdec61
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movb $0x1, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xdec73
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0xdeca6
cmpb $0x0, -0x19(%rbp)
je 0xdeca4
leaq 0x1d40d0(%rip), %rax # 0x2b2d50
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movsd -0x28(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
movl $0x1, %edi
leaq 0x6b7d4(%rip), %rsi # 0x14a474
movb $0x2, %al
callq *%rcx
jmp 0xdeca6
jmp 0xdeca8
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
getopt_double_limit_value:
push rbp
mov rbp, rsp
sub rsp, 40h
movsd [rbp+var_8], xmm0
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], 0
movsd xmm0, [rbp+var_8]
movsd [rbp+var_28], xmm0
mov rax, [rbp+var_10]
mov rdi, [rax+50h]
call getopt_ulonglong2double
movsd [rbp+var_38], xmm0
mov rax, [rbp+var_10]
mov rdi, [rax+48h]
call getopt_ulonglong2double
movsd [rbp+var_30], xmm0
movsd xmm0, [rbp+var_38]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_DEC29
jp short loc_DEC29
jmp short loc_DEC43
loc_DEC29:
movsd xmm0, [rbp+var_8]
ucomisd xmm0, [rbp+var_38]
jbe short loc_DEC43
movsd xmm0, [rbp+var_38]
movsd [rbp+var_8], xmm0
mov [rbp+var_19], 1
loc_DEC43:
movsd xmm1, [rbp+var_8]
movsd xmm0, [rbp+var_30]
ucomisd xmm0, xmm1
jbe short loc_DEC61
movsd xmm0, [rbp+var_30]
movsd [rbp+var_8], xmm0
mov [rbp+var_19], 1
loc_DEC61:
cmp [rbp+var_18], 0
jz short loc_DEC73
mov cl, [rbp+var_19]
mov rax, [rbp+var_18]
mov [rax], cl
jmp short loc_DECA6
loc_DEC73:
cmp [rbp+var_19], 0
jz short loc_DECA4
lea rax, my_getopt_error_reporter
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rdx, [rax]
movsd xmm0, [rbp+var_28]
movsd xmm1, [rbp+var_8]
mov edi, 1
lea rsi, aOptionSValueGA; "option '%s': value %g adjusted to %g"
mov al, 2
call rcx
loc_DECA4:
jmp short $+2
loc_DECA6:
jmp short $+2
loc_DECA8:
movsd xmm0, [rbp+var_8]
movsd [rbp+var_40], xmm0
movsd xmm0, [rbp+var_40]
add rsp, 40h
pop rbp
retn
|
double getopt_double_limit_value(_QWORD *a1, char *a2, double a3)
{
double v4; // [rsp+8h] [rbp-38h]
double v5; // [rsp+10h] [rbp-30h]
char v7; // [rsp+27h] [rbp-19h]
double v8; // [rsp+38h] [rbp-8h]
v8 = a3;
v7 = 0;
v4 = getopt_ulonglong2double(a1[10]);
v5 = getopt_ulonglong2double(a1[9]);
if ( v4 != 0.0 && v8 > v4 )
{
v8 = v4;
v7 = 1;
}
if ( v5 > v8 )
{
v8 = v5;
v7 = 1;
}
if ( a2 )
{
*a2 = v7;
}
else if ( v7 )
{
my_getopt_error_reporter(1, (long long)"option '%s': value %g adjusted to %g", *a1, a3, v8);
}
return v8;
}
|
getopt_double_limit_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOVSD qword ptr [RBP + -0x8],XMM0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],0x0
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD qword ptr [RBP + -0x28],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x001dc920
MOVSD qword ptr [RBP + -0x38],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x001dc920
MOVSD qword ptr [RBP + -0x30],XMM0
MOVSD XMM0,qword ptr [RBP + -0x38]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001dec29
JP 0x001dec29
JMP 0x001dec43
LAB_001dec29:
MOVSD XMM0,qword ptr [RBP + -0x8]
UCOMISD XMM0,qword ptr [RBP + -0x38]
JBE 0x001dec43
MOVSD XMM0,qword ptr [RBP + -0x38]
MOVSD qword ptr [RBP + -0x8],XMM0
MOV byte ptr [RBP + -0x19],0x1
LAB_001dec43:
MOVSD XMM1,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RBP + -0x30]
UCOMISD XMM0,XMM1
JBE 0x001dec61
MOVSD XMM0,qword ptr [RBP + -0x30]
MOVSD qword ptr [RBP + -0x8],XMM0
MOV byte ptr [RBP + -0x19],0x1
LAB_001dec61:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001dec73
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
JMP 0x001deca6
LAB_001dec73:
CMP byte ptr [RBP + -0x19],0x0
JZ 0x001deca4
LEA RAX,[0x3b2d50]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD XMM1,qword ptr [RBP + -0x8]
MOV EDI,0x1
LEA RSI,[0x24a474]
MOV AL,0x2
CALL RCX
LAB_001deca4:
JMP 0x001deca6
LAB_001deca6:
JMP 0x001deca8
LAB_001deca8:
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD qword ptr [RBP + -0x40],XMM0
MOVSD XMM0,qword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
|
double getopt_double_limit_value(double param_1,int8 *param_2,char *param_3)
{
double dVar1;
double dVar2;
char local_21;
double local_10;
local_21 = '\0';
dVar1 = (double)getopt_ulonglong2double(param_2[10]);
dVar2 = (double)getopt_ulonglong2double(param_2[9]);
if (((dVar1 != 0.0) || (local_10 = param_1, NAN(dVar1))) && (local_10 = param_1, dVar1 < param_1))
{
local_21 = '\x01';
local_10 = dVar1;
}
if (local_10 < dVar2) {
local_21 = '\x01';
local_10 = dVar2;
}
if (param_3 == (char *)0x0) {
if (local_21 != '\0') {
(*(code *)my_getopt_error_reporter)
(param_1,local_10,1,"option \'%s\': value %g adjusted to %g",*param_2);
}
}
else {
*param_3 = local_21;
}
return local_10;
}
|
|
17,506
|
getopt_double_limit_value
|
eloqsql/mysys/my_getopt.c
|
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix)
{
my_bool adjusted= FALSE;
double old= num;
double min, max;
DBUG_ENTER("getopt_double_limit_value");
max= getopt_ulonglong2double(optp->max_value);
min= getopt_ulonglong2double(optp->min_value);
if (max && num > max)
{
num= max;
adjusted= TRUE;
}
if (num < min)
{
num= min;
adjusted= TRUE;
}
if (fix)
*fix= adjusted;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': value %g adjusted to %g",
optp->name, old, num);
DBUG_RETURN(num);
}
|
O3
|
c
|
getopt_double_limit_value:
movsd 0x48(%rdi), %xmm4
movsd 0x50(%rdi), %xmm1
movapd %xmm1, %xmm2
cmpltpd %xmm0, %xmm2
xorpd %xmm3, %xmm3
cmpneqpd %xmm1, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %eax
testb $0x1, %al
jne 0xab304
movapd %xmm0, %xmm1
ucomisd %xmm1, %xmm4
seta %cl
orb %cl, %al
maxsd %xmm1, %xmm4
testq %rsi, %rsi
je 0xab31c
andb $0x1, %al
movb %al, (%rsi)
jmp 0xab355
testb $0x1, %al
je 0xab355
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2f85a9(%rip), %rcx # 0x3a38d8
movq (%rdi), %rdx
leaq 0x50242(%rip), %rsi # 0xfb57b
movl $0x1, %edi
movapd %xmm4, %xmm1
movb $0x2, %al
movsd %xmm4, -0x8(%rbp)
callq *(%rcx)
movsd -0x8(%rbp), %xmm4
addq $0x10, %rsp
popq %rbp
movapd %xmm4, %xmm0
retq
|
getopt_double_limit_value:
movsd xmm4, qword ptr [rdi+48h]
movsd xmm1, qword ptr [rdi+50h]
movapd xmm2, xmm1
cmpltpd xmm2, xmm0
xorpd xmm3, xmm3
cmpneqpd xmm3, xmm1
andpd xmm3, xmm2
movd eax, xmm3
test al, 1
jnz short loc_AB304
movapd xmm1, xmm0
loc_AB304:
ucomisd xmm4, xmm1
setnbe cl
or al, cl
maxsd xmm4, xmm1
test rsi, rsi
jz short loc_AB31C
and al, 1
mov [rsi], al
jmp short loc_AB355
loc_AB31C:
test al, 1
jz short loc_AB355
push rbp
mov rbp, rsp
sub rsp, 10h
lea rcx, my_getopt_error_reporter
mov rdx, [rdi]
lea rsi, aOptionSValueGA; "option '%s': value %g adjusted to %g"
mov edi, 1
movapd xmm1, xmm4
mov al, 2
movsd qword ptr [rbp-8], xmm4
call qword ptr [rcx]
movsd xmm4, qword ptr [rbp-8]
add rsp, 10h
pop rbp
loc_AB355:
movapd xmm0, xmm4
retn
|
__int128 __usercall getopt_double_limit_value@<xmm0>(_QWORD *a1@<rdi>, _BYTE *a2@<rsi>, __m128d a3@<xmm0>)
{
__int128 v3; // xmm4
__m128d v4; // xmm1
char v5; // al
char v6; // al
unsigned long long v8; // [rsp-10h] [rbp-10h]
v3 = (unsigned long long)a1[9];
v4 = (__m128d)(unsigned long long)a1[10];
v5 = _mm_cvtsi128_si32((__m128i)_mm_and_pd(_mm_cmpneq_pd((__m128d)0LL, v4), _mm_cmplt_pd(v4, a3)));
if ( (v5 & 1) == 0 )
v4.m128d_f64[0] = a3.m128d_f64[0];
v6 = (*(double *)&v3 > v4.m128d_f64[0]) | v5;
*(double *)&v3 = fmax(*(double *)&v3, v4.m128d_f64[0]);
if ( a2 )
{
*a2 = v6 & 1;
}
else if ( (v6 & 1) != 0 )
{
v8 = v3;
my_getopt_error_reporter(1, "option '%s': value %g adjusted to %g", *a1, a3.m128d_f64[0], *(double *)&v3);
return v8;
}
return v3;
}
|
getopt_double_limit_value:
MOVSD XMM4,qword ptr [RDI + 0x48]
MOVSD XMM1,qword ptr [RDI + 0x50]
MOVAPD XMM2,XMM1
CMPLTPD XMM2,XMM0
XORPD XMM3,XMM3
CMPNEQPD XMM3,XMM1
ANDPD XMM3,XMM2
MOVD EAX,XMM3
TEST AL,0x1
JNZ 0x001ab304
MOVAPD XMM1,XMM0
LAB_001ab304:
UCOMISD XMM4,XMM1
SETA CL
OR AL,CL
MAXSD XMM4,XMM1
TEST RSI,RSI
JZ 0x001ab31c
AND AL,0x1
MOV byte ptr [RSI],AL
JMP 0x001ab355
LAB_001ab31c:
TEST AL,0x1
JZ 0x001ab355
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RCX,[0x4a38d8]
MOV RDX,qword ptr [RDI]
LEA RSI,[0x1fb57b]
MOV EDI,0x1
MOVAPD XMM1,XMM4
MOV AL,0x2
MOVSD qword ptr [RBP + -0x8],XMM4
CALL qword ptr [RCX]
MOVSD XMM4,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
LAB_001ab355:
MOVAPD XMM0,XMM4
RET
|
double getopt_double_limit_value(double param_1,int8 *param_2,long param_3)
{
double dVar1;
bool bVar2;
bool bVar3;
double dVar4;
double dVar5;
dVar1 = (double)param_2[9];
dVar4 = (double)param_2[10];
bVar2 = dVar4 < param_1;
bVar3 = dVar4 != 0.0;
if (!bVar3 || !bVar2) {
dVar4 = param_1;
}
dVar5 = dVar1;
if (dVar1 <= dVar4) {
dVar5 = dVar4;
}
if (param_3 == 0) {
if (bVar3 && bVar2 || dVar4 < dVar1) {
(*(code *)my_getopt_error_reporter)
(param_1,dVar5,1,"option \'%s\': value %g adjusted to %g",*param_2);
}
}
else {
*(bool *)param_3 = bVar3 && bVar2 || dVar4 < dVar1;
}
return dVar5;
}
|
|
17,507
|
mbedtls_pk_debug
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pk.c
|
int mbedtls_pk_debug(const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items)
{
PK_VALIDATE_RET(ctx != NULL);
if (ctx->pk_info == NULL) {
return MBEDTLS_ERR_PK_BAD_INPUT_DATA;
}
if (ctx->pk_info->debug_func == NULL) {
return MBEDTLS_ERR_PK_TYPE_MISMATCH;
}
ctx->pk_info->debug_func(ctx->pk_ctx, items);
return 0;
}
|
O3
|
c
|
mbedtls_pk_debug:
movq (%rdi), %rax
testq %rax, %rax
je 0x8bbb2
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x8bbb8
pushq %rax
movq 0x8(%rdi), %rdi
callq *%rax
xorl %eax, %eax
addq $0x8, %rsp
retq
movl $0xffffc180, %eax # imm = 0xFFFFC180
retq
movl $0xffffc100, %eax # imm = 0xFFFFC100
retq
|
mbedtls_pk_debug:
mov rax, [rdi]
test rax, rax
jz short loc_8BBB2
mov rax, [rax+58h]
test rax, rax
jz short loc_8BBB8
push rax
mov rdi, [rdi+8]
call rax
xor eax, eax
add rsp, 8
retn
loc_8BBB2:
mov eax, 0FFFFC180h
retn
loc_8BBB8:
mov eax, 0FFFFC100h
retn
|
long long mbedtls_pk_debug(_QWORD *a1)
{
void ( *v1)(_QWORD); // rax
if ( !*a1 )
return 4294951296LL;
v1 = *(void ( **)(_QWORD))(*a1 + 88LL);
if ( !v1 )
return 4294951168LL;
v1(a1[1]);
return 0LL;
}
|
mbedtls_pk_debug:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0018bbb2
MOV RAX,qword ptr [RAX + 0x58]
TEST RAX,RAX
JZ 0x0018bbb8
PUSH RAX
MOV RDI,qword ptr [RDI + 0x8]
CALL RAX
XOR EAX,EAX
ADD RSP,0x8
RET
LAB_0018bbb2:
MOV EAX,0xffffc180
RET
LAB_0018bbb8:
MOV EAX,0xffffc100
RET
|
int8 mbedtls_pk_debug(long *param_1)
{
code *pcVar1;
if (*param_1 == 0) {
return 0xffffc180;
}
pcVar1 = *(code **)(*param_1 + 0x58);
if (pcVar1 != (code *)0x0) {
(*pcVar1)(param_1[1]);
return 0;
}
return 0xffffc100;
}
|
|
17,508
|
LefDefParser::defiSubnet::Destroy()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
|
void defiSubnet::Destroy() {
clear();
free(name_);
free((char*)(instances_));
free((char*)(pins_));
free(musts_);
free(synthesized_);
}
|
O3
|
cpp
|
LefDefParser::defiSubnet::Destroy():
pushq %rbx
movq %rdi, %rbx
callq 0x1fd68
movq (%rbx), %rdi
callq 0x6220
movq 0x18(%rbx), %rdi
callq 0x6220
movq 0x20(%rbx), %rdi
callq 0x6220
movq 0x30(%rbx), %rdi
callq 0x6220
movq 0x28(%rbx), %rdi
popq %rbx
jmp 0x6220
|
_ZN12LefDefParser10defiSubnet7DestroyEv:
push rbx
mov rbx, rdi
call _ZN12LefDefParser10defiSubnet5clearEv; LefDefParser::defiSubnet::clear(void)
mov rdi, [rbx]
call _free
mov rdi, [rbx+18h]
call _free
mov rdi, [rbx+20h]
call _free
mov rdi, [rbx+30h]
call _free
mov rdi, [rbx+28h]
pop rbx
jmp _free
|
long long LefDefParser::defiSubnet::Destroy(LefDefParser::defiSubnet *this)
{
LefDefParser::defiSubnet::clear(this);
free(*(_QWORD *)this);
free(*((_QWORD *)this + 3));
free(*((_QWORD *)this + 4));
free(*((_QWORD *)this + 6));
return free(*((_QWORD *)this + 5));
}
|
Destroy:
PUSH RBX
MOV RBX,RDI
CALL 0x0011fd68
MOV RDI,qword ptr [RBX]
CALL 0x00106220
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00106220
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x00106220
MOV RDI,qword ptr [RBX + 0x30]
CALL 0x00106220
MOV RDI,qword ptr [RBX + 0x28]
POP RBX
JMP 0x00106220
|
/* LefDefParser::defiSubnet::Destroy() */
void __thiscall LefDefParser::defiSubnet::Destroy(defiSubnet *this)
{
clear(this);
free(*(void **)this);
free(*(void **)(this + 0x18));
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x28));
return;
}
|
|
17,509
|
ggml_calloc
|
monkey531[P]llama/ggml/src/ggml.c
|
inline static void * ggml_calloc(size_t num, size_t size) {
if (num == 0 || size == 0) {
GGML_LOG_WARN("Behavior may be unexpected when allocating 0 bytes for ggml_calloc!\n");
return NULL;
}
void * result = calloc(num, size);
if (result == NULL) {
GGML_LOG_ERROR("%s: failed to allocate %6.2f MB\n", __func__, size/(1024.0*1024.0));
GGML_ABORT("fatal error");
}
return result;
}
|
O0
|
c
|
ggml_calloc:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x53f8e
cmpq $0x0, 0x10(%rsp)
jne 0x53faf
movl $0x3, %edi
leaq 0x62a9d(%rip), %rsi # 0xb6a37
movb $0x0, %al
callq 0x41c30
movq $0x0, 0x20(%rsp)
jmp 0x5403d
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x42810
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x54033
movaps 0x6003e(%rip), %xmm1 # 0xb4010
movq 0x10(%rsp), %xmm0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x6003c(%rip), %xmm1 # 0xb4020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x60005(%rip), %xmm1 # 0xb4000
divsd %xmm1, %xmm0
movl $0x4, %edi
leaq 0x6253b(%rip), %rsi # 0xb6546
leaq 0x62a6a(%rip), %rdx # 0xb6a7c
movb $0x1, %al
callq 0x41c30
leaq 0x60597(%rip), %rdi # 0xb45b7
movl $0x14e, %esi # imm = 0x14E
leaq 0x62547(%rip), %rdx # 0xb6573
movb $0x0, %al
callq 0x46770
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
ggml_calloc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
cmp [rsp+28h+var_10], 0
jz short loc_53F8E
cmp [rsp+28h+var_18], 0
jnz short loc_53FAF
loc_53F8E:
mov edi, 3
lea rsi, aBehaviorMayBeU_1; "Behavior may be unexpected when allocat"...
mov al, 0
call _ggml_log_internal
mov [rsp+28h+var_8], 0
jmp loc_5403D
loc_53FAF:
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
call _calloc
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jnz short loc_54033
movaps xmm1, cs:xmmword_B4010
movq xmm0, [rsp+28h+var_18]
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_B4020
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, cs:qword_B4000
divsd xmm0, xmm1
mov edi, 4
lea rsi, aSFailedToAlloc; "%s: failed to allocate %6.2f MB\n"
lea rdx, aGgmlCalloc; "ggml_calloc"
mov al, 1
call _ggml_log_internal
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 14Eh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_54033:
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_8], rax
loc_5403D:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long ggml_calloc(long long a1, long long a2)
{
__m128d v2; // xmm0
long long v4; // [rsp+8h] [rbp-20h]
__m128i v5; // [rsp+10h] [rbp-18h] BYREF
v5.m128i_i64[1] = a1;
v5.m128i_i64[0] = a2;
if ( a1 && v5.m128i_i64[0] )
{
v4 = calloc(v5.m128i_i64[1], v5.m128i_i64[0]);
if ( !v4 )
{
v2 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v5), (__m128i)xmmword_B4010), (__m128d)xmmword_B4020);
ggml_log_internal(
4u,
(long long)"%s: failed to allocate %6.2f MB\n",
"ggml_calloc",
(_mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0]) / 1048576.0);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
334,
(long long)"fatal error");
}
return v4;
}
else
{
ggml_log_internal(3u, (long long)"Behavior may be unexpected when allocating 0 bytes for ggml_calloc!\n");
return 0LL;
}
}
|
ggml_calloc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00153f8e
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00153faf
LAB_00153f8e:
MOV EDI,0x3
LEA RSI,[0x1b6a37]
MOV AL,0x0
CALL 0x00141c30
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0015403d
LAB_00153faf:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00142810
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00154033
MOVAPS XMM1,xmmword ptr [0x001b4010]
MOVQ XMM0,qword ptr [RSP + 0x10]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x001b4020]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x001b4000]
DIVSD XMM0,XMM1
MOV EDI,0x4
LEA RSI,[0x1b6546]
LEA RDX,[0x1b6a7c]
MOV AL,0x1
CALL 0x00141c30
LEA RDI,[0x1b45b7]
MOV ESI,0x14e
LEA RDX,[0x1b6573]
MOV AL,0x0
CALL 0x00146770
LAB_00154033:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_0015403d:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void * ggml_calloc(size_t param_1,size_t param_2)
{
int1 auVar1 [16];
void *local_8;
if ((param_1 == 0) || (param_2 == 0)) {
ggml_log_internal(3,"Behavior may be unexpected when allocating 0 bytes for ggml_calloc!\n");
local_8 = (void *)0x0;
}
else {
local_8 = calloc(param_1,param_2);
if (local_8 == (void *)0x0) {
auVar1._8_4_ = (int)(param_2 >> 0x20);
auVar1._0_8_ = param_2;
auVar1._12_4_ = _UNK_001b4014;
ggml_log_internal(((auVar1._8_8_ - _UNK_001b4028) +
((double)CONCAT44(_DAT_001b4010,(int)param_2) - _DAT_001b4020)) /
DAT_001b4000,4,"%s: failed to allocate %6.2f MB\n","ggml_calloc");
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x14e,
"fatal error");
}
}
return local_8;
}
|
|
17,510
|
Timer::Timer(Irq&)
|
sp1187[P]veesem/src/core/spg200/timer.cc
|
Timer::Timer(Irq& irq) : irq_(irq) {}
|
O0
|
cpp
|
Timer::Timer(Irq&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x18ea0
movq -0x18(%rbp), %rdi
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF
movb $0x0, 0x18(%rdi)
movw $0x0, 0x1a(%rdi)
movw $0x0, 0x1c(%rdi)
movb $0x0, 0x1e(%rdi)
movw $0x0, 0x20(%rdi)
movw $0x0, 0x22(%rdi)
addq $0x24, %rdi
callq 0x18ed0
movq -0x18(%rbp), %rdi
addq $0x26, %rdi
callq 0x18ef0
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x18f10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5TimerC2ER3Irq:
push rbp; Alternative name is 'Timer::Timer(Irq &)'
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_18], rdi
mov rax, [rbp+var_10]
mov [rdi], rax
add rdi, 8
call _ZN14DivisibleClockILi27000000ELi32768EEC2Ev; DivisibleClock<27000000,32768>::DivisibleClock(void)
mov rdi, [rbp+var_18]
mov dword ptr [rdi+10h], 0FFFFFFFFh
mov dword ptr [rdi+14h], 0FFFFFFFFh
mov byte ptr [rdi+18h], 0
mov word ptr [rdi+1Ah], 0
mov word ptr [rdi+1Ch], 0
mov byte ptr [rdi+1Eh], 0
mov word ptr [rdi+20h], 0
mov word ptr [rdi+22h], 0
add rdi, 24h ; '$'; this
call _ZN5Timer13TimebaseSetupC2Ev; Timer::TimebaseSetup::TimebaseSetup(void)
mov rdi, [rbp+var_18]
add rdi, 26h ; '&'; this
call _ZN5Timer13TimerAControlC2Ev; Timer::TimerAControl::TimerAControl(void)
mov rdi, [rbp+var_18]
add rdi, 28h ; '('; this
call _ZN5Timer13TimerBControlC2Ev; Timer::TimerBControl::TimerBControl(void)
add rsp, 20h
pop rbp
retn
|
void Timer::Timer(Timer *this, Irq *a2)
{
*(_QWORD *)this = a2;
DivisibleClock<27000000,32768>::DivisibleClock((char *)this + 8);
*((_DWORD *)this + 4) = -1;
*((_DWORD *)this + 5) = -1;
*((_BYTE *)this + 24) = 0;
*((_WORD *)this + 13) = 0;
*((_WORD *)this + 14) = 0;
*((_BYTE *)this + 30) = 0;
*((_WORD *)this + 16) = 0;
*((_WORD *)this + 17) = 0;
Timer::TimebaseSetup::TimebaseSetup((Timer *)((char *)this + 36));
Timer::TimerAControl::TimerAControl((Timer *)((char *)this + 38));
Timer::TimerBControl::TimerBControl((Timer *)((char *)this + 40));
}
|
Timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
CALL 0x00118ea0
MOV RDI,qword ptr [RBP + -0x18]
MOV dword ptr [RDI + 0x10],0xffffffff
MOV dword ptr [RDI + 0x14],0xffffffff
MOV byte ptr [RDI + 0x18],0x0
MOV word ptr [RDI + 0x1a],0x0
MOV word ptr [RDI + 0x1c],0x0
MOV byte ptr [RDI + 0x1e],0x0
MOV word ptr [RDI + 0x20],0x0
MOV word ptr [RDI + 0x22],0x0
ADD RDI,0x24
CALL 0x00118ed0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x26
CALL 0x00118ef0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x28
CALL 0x00118f10
ADD RSP,0x20
POP RBP
RET
|
/* Timer::Timer(Irq&) */
void __thiscall Timer::Timer(Timer *this,Irq *param_1)
{
*(Irq **)this = param_1;
DivisibleClock<27000000,32768>::DivisibleClock((DivisibleClock<27000000,32768> *)(this + 8));
*(int4 *)(this + 0x10) = 0xffffffff;
*(int4 *)(this + 0x14) = 0xffffffff;
this[0x18] = (Timer)0x0;
*(int2 *)(this + 0x1a) = 0;
*(int2 *)(this + 0x1c) = 0;
this[0x1e] = (Timer)0x0;
*(int2 *)(this + 0x20) = 0;
*(int2 *)(this + 0x22) = 0;
TimebaseSetup::TimebaseSetup((TimebaseSetup *)(this + 0x24));
TimerAControl::TimerAControl((TimerAControl *)(this + 0x26));
TimerBControl::TimerBControl((TimerBControl *)(this + 0x28));
return;
}
|
|
17,511
|
lf_pinbox_init
|
eloqsql/mysys/lf_alloc-pin.c
|
void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset,
lf_pinbox_free_func *free_func, void *free_func_arg)
{
DBUG_ASSERT(free_ptr_offset % sizeof(void *) == 0);
lf_dynarray_init(&pinbox->pinarray, sizeof(LF_PINS));
pinbox->pinstack_top_ver= 0;
pinbox->pins_in_array= 0;
pinbox->free_ptr_offset= free_ptr_offset;
pinbox->free_func= free_func;
pinbox->free_func_arg= free_func_arg;
}
|
O0
|
c
|
lf_pinbox_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0xfc119
movq -0x8(%rbp), %rdi
movl $0x78, %esi
callq 0xfcca0
movq -0x8(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
lf_pinbox_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_FC119:
mov rdi, [rbp+var_8]
mov esi, 78h ; 'x'
call lf_dynarray_init
mov rax, [rbp+var_8]
mov dword ptr [rax+3Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+40h], 0
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+38h], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+28h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+30h], rcx
add rsp, 20h
pop rbp
retn
|
long long lf_pinbox_init(long long a1, int a2, long long a3, long long a4)
{
long long result; // rax
lf_dynarray_init(a1, 120LL);
*(_DWORD *)(a1 + 60) = 0;
*(_DWORD *)(a1 + 64) = 0;
*(_DWORD *)(a1 + 56) = a2;
*(_QWORD *)(a1 + 40) = a3;
result = a1;
*(_QWORD *)(a1 + 48) = a4;
return result;
}
|
lf_pinbox_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x001fc119
LAB_001fc119:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x78
CALL 0x001fcca0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x3c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x40],0x0
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x38],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],RCX
ADD RSP,0x20
POP RBP
RET
|
void lf_pinbox_init(long param_1,int4 param_2,int8 param_3,int8 param_4)
{
lf_dynarray_init(param_1,0x78);
*(int4 *)(param_1 + 0x3c) = 0;
*(int4 *)(param_1 + 0x40) = 0;
*(int4 *)(param_1 + 0x38) = param_2;
*(int8 *)(param_1 + 0x28) = param_3;
*(int8 *)(param_1 + 0x30) = param_4;
return;
}
|
|
17,512
|
w_search
|
eloqsql/storage/maria/ma_write.c
|
static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key,
my_off_t page_pos,
MARIA_PAGE *father_page, uchar *father_keypos,
my_bool insert_last)
{
int error,flag;
uchar *temp_buff,*keypos,*keybuff;
my_bool was_last_key, buff_alloced;
my_off_t next_page, dup_key_pos;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
DBUG_ENTER("w_search");
DBUG_PRINT("enter", ("page: %lu", (ulong) (page_pos/keyinfo->block_length)));
alloc_on_stack(*info->stack_end_ptr, temp_buff, buff_alloced,
(keyinfo->block_length + keyinfo->max_store_length*3));
if (!temp_buff)
DBUG_RETURN(1);
keybuff= temp_buff + (keyinfo->block_length + keyinfo->max_store_length*2);
if (_ma_fetch_keypage(&page, info, keyinfo, page_pos, PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, temp_buff, 0))
goto err;
flag= (*keyinfo->bin_search)(key, &page, comp_flag, &keypos,
keybuff, &was_last_key);
if (flag == 0)
{
MARIA_KEY tmp_key;
/* get position to record with duplicated key */
tmp_key.keyinfo= keyinfo;
tmp_key.data= keybuff;
if ((*keyinfo->get_key)(&tmp_key, page.flag, page.node, &keypos))
dup_key_pos= _ma_row_pos_from_key(&tmp_key);
else
dup_key_pos= HA_OFFSET_ERROR;
if (keyinfo->flag & HA_FULLTEXT)
{
uint off;
int subkeys;
get_key_full_length_rdonly(off, keybuff);
subkeys=ft_sintXkorr(keybuff+off);
comp_flag=SEARCH_SAME;
if (subkeys >= 0)
{
/* normal word, one-level tree structure */
flag=(*keyinfo->bin_search)(key, &page, comp_flag,
&keypos, keybuff, &was_last_key);
}
else
{
/* popular word. two-level tree. going down */
my_off_t root= dup_key_pos;
MARIA_KEY subkey;
get_key_full_length_rdonly(off, key->data);
subkey.keyinfo= keyinfo= &share->ft2_keyinfo;
subkey.data= key->data + off;
subkey.data_length= key->data_length - off;
subkey.ref_length= key->ref_length;
subkey.flag= key->flag;
/* we'll modify key entry 'in vivo' */
keypos-= keyinfo->keylength + page.node;
error= _ma_ck_real_write_btree(info, &subkey, &root, comp_flag);
_ma_dpointer(share, keypos+HA_FT_WLEN, root);
subkeys--; /* should there be underflow protection ? */
DBUG_ASSERT(subkeys < 0);
ft_intXstore(keypos, subkeys);
if (!error)
{
page_mark_changed(info, &page);
if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED,
DFLT_INIT_HITS))
goto err;
}
stack_alloc_free(temp_buff, buff_alloced);
DBUG_RETURN(error);
}
}
else /* not HA_FULLTEXT, normal HA_NOSAME key */
{
/*
TODO
When the index will support true versioning - with multiple
identical values in the UNIQUE index, invisible to each other -
the following should be changed to "continue inserting keys, at the
end (of the row or statement) wait". We need to wait on *all*
unique conflicts at once, not one-at-a-time, because we need to
know all blockers in advance, otherwise we'll have incomplete wait-for
graph.
*/
/*
transaction that has inserted the conflicting key may be in progress.
the caller will wait for it to be committed or aborted.
*/
info->dup_key_trid= _ma_trid_from_key(&tmp_key);
info->dup_key_pos= dup_key_pos;
my_errno= HA_ERR_FOUND_DUPP_KEY;
DBUG_PRINT("warning",
("Duplicate key. dup_key_trid: %lu pos %lu visible: %d",
(ulong) info->dup_key_trid,
(ulong) info->dup_key_pos,
info->trn ? trnman_can_read_from(info->trn,
info->dup_key_trid) : 2));
goto err;
}
}
if (flag == MARIA_FOUND_WRONG_KEY)
{
my_errno= HA_ERR_CRASHED;
goto err;
}
if (!was_last_key)
insert_last=0;
next_page= _ma_kpos(page.node, keypos);
if (next_page == HA_OFFSET_ERROR ||
(error= w_search(info, comp_flag, key, next_page,
&page, keypos, insert_last)) > 0)
{
error= _ma_insert(info, key, &page, keypos, keybuff,
father_page, father_keypos, insert_last);
if (error < 0)
goto err;
page_mark_changed(info, &page);
if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED,
DFLT_INIT_HITS))
goto err;
}
stack_alloc_free(temp_buff, buff_alloced);
DBUG_RETURN(error);
err:
stack_alloc_free(temp_buff, buff_alloced);
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN(-1);
}
|
O3
|
c
|
w_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, -0x68(%rbp)
movq %r8, -0x60(%rbp)
movq %rcx, %r12
movl %esi, -0x48(%rbp)
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq %rax, -0x58(%rbp)
movq %rdx, -0x70(%rbp)
movq 0x8(%rdx), %r13
movzwl 0xa6(%r13), %r15d
movzwl 0xb0(%r13), %ebx
leaq (%rbx,%rbx,2), %rsi
addq %r15, %rsi
leaq -0xb0(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rdi), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x64b1d
cmpq $0x10000, %rax # imm = 0x10000
ja 0x64b07
cmpl $0x1000, %esi # imm = 0x1000
jb 0x64b1d
cmpq $0x8001, %rax # imm = 0x8001
jb 0x64b1d
movq %rsp, %rax
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %rax
movq %rax, %rsp
movb $0x1, %cl
movl %ecx, -0x44(%rbp)
jmp 0x64b49
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9fd89
testq %rax, %rax
je 0x64bd3
movzwl 0xa6(%r13), %r15d
movzwl 0xb0(%r13), %ebx
movl $0x0, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
movq %rax, -0x50(%rbp)
pushq %rax
callq 0x58ed6
addq $0x10, %rsp
testb %al, %al
je 0x64b90
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpb $0x0, -0x44(%rbp)
jne 0x64bd9
movq -0x50(%rbp), %rdi
callq 0x9ffb6
jmp 0x64bd9
leaq (%r15,%rbx,2), %r12
addq -0x50(%rbp), %r12
leaq -0xb0(%rbp), %rsi
leaq -0x40(%rbp), %rcx
leaq -0x31(%rbp), %r9
movq -0x70(%rbp), %r15
movq %r15, %rdi
movl -0x48(%rbp), %edx
movq %r12, %r8
callq *0xd8(%r13)
testl %eax, %eax
je 0x64bfe
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jne 0x64c3f
callq 0xa1afa
movl $0x7e, (%rax)
jmp 0x64b79
movl $0x1, %r13d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x64ec3
movl %r13d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
movq %r13, 0x8(%rdi)
movq %r12, (%rdi)
movl -0x88(%rbp), %edx
movl -0x84(%rbp), %esi
leaq -0x40(%rbp), %rcx
callq *0xe0(%r13)
testl %eax, %eax
je 0x64cf4
leaq -0xd0(%rbp), %rdi
callq 0x5704c
movq %rax, %rbx
jmp 0x64cfb
xorl %eax, %eax
cmpb $0x0, -0x31(%rbp)
movzbl 0x10(%rbp), %ebx
cmovel %eax, %ebx
movl -0x88(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x56ee7
movsbl %bl, %ebx
cmpq $-0x1, %rax
je 0x64c91
movq -0x40(%rbp), %r9
subq $0x8, %rsp
leaq -0xb0(%rbp), %r8
movq %r14, %rdi
movl -0x48(%rbp), %esi
movq %r15, %rdx
movq %rax, %rcx
pushq %rbx
callq 0x64a7e
addq $0x10, %rsp
testl %eax, %eax
jle 0x64d41
movq -0x40(%rbp), %rcx
leaq -0xb0(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r8
movq -0x60(%rbp), %r9
pushq %rbx
pushq -0x68(%rbp)
callq 0x651af
addq $0x10, %rsp
testl %eax, %eax
js 0x64b79
movl %eax, %r13d
movq 0x2e8(%r14), %rax
leaq -0xb0(%rbp), %rdi
movl 0x30(%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movl $0x2, %esi
movl $0x3, %edx
callq 0x59015
testb %al, %al
jne 0x64b79
jmp 0x64d44
movq $-0x1, %rbx
testb $-0x80, 0xa2(%r13)
jne 0x64d2f
leaq -0xd0(%rbp), %rdi
callq 0x57104
movq %rax, 0x430(%r14)
movq %rbx, 0x428(%r14)
callq 0xa1afa
movl $0x79, (%rax)
jmp 0x64b79
movzbl (%r12), %eax
cmpq $0xff, %rax
je 0x64d57
incq %rax
jmp 0x64d68
movl %eax, %r13d
cmpb $0x0, -0x44(%rbp)
movq -0x50(%rbp), %rdi
je 0x64b89
jmp 0x64bd9
movzwl 0x1(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %rax
movzbl (%r12,%rax), %ecx
shll $0x18, %ecx
js 0x64d9f
leaq -0xb0(%rbp), %rsi
movl $0x4, -0x48(%rbp)
leaq -0x40(%rbp), %rcx
leaq -0x31(%rbp), %r9
movq %r15, %rdi
movl $0x4, %edx
movq %r12, %r8
callq *0xd8(%r13)
jmp 0x64bbf
movzwl 0x2(%r12,%rax), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movzbl 0x1(%r12,%rax), %r13d
shll $0x10, %r13d
orl %edx, %r13d
orl %ecx, %r13d
movq %rbx, -0x78(%rbp)
movq (%r15), %rax
movzbl (%rax), %ecx
cmpl $0xff, %ecx
je 0x64dd2
incl %ecx
jmp 0x64de0
movzwl 0x1(%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl $0x3, %ecx
movq -0x58(%rbp), %rbx
leaq 0x458(%rbx), %rdx
leaq -0xf0(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movl %ecx, %edx
addq %rdx, %rax
movq %rax, (%rsi)
movl 0x10(%r15), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsi)
movq 0x14(%r15), %rax
movq %rax, 0x14(%rsi)
movzwl 0x502(%rbx), %eax
addl -0x88(%rbp), %eax
subq %rax, -0x40(%rbp)
leaq -0x78(%rbp), %r12
movq %r14, %rdi
movq %r12, %rdx
movl $0x4, %ecx
callq 0x64a20
movl %eax, %r15d
movq -0x40(%rbp), %rsi
addq $0x4, %rsi
movq (%r12), %rdx
movq %rbx, %rdi
callq 0x57230
movl %r13d, %edx
decl %edx
movq -0x40(%rbp), %rax
movb %dl, 0x3(%rax)
movq -0x40(%rbp), %rax
movb %dh, 0x2(%rax)
movl %edx, %eax
shrl $0x10, %eax
movq -0x40(%rbp), %rcx
movb %al, 0x1(%rcx)
shrl $0x18, %edx
movq -0x40(%rbp), %rax
movb %dl, (%rax)
testb %r15b, %r15b
je 0x64e90
cmpb $0x0, -0x44(%rbp)
jne 0x64e87
movq -0x50(%rbp), %rdi
callq 0x9ffb6
movzbl %r15b, %r13d
jmp 0x64bd9
movq 0x2e8(%r14), %rax
leaq -0xb0(%rbp), %rdi
movl 0x30(%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movl $0x2, %esi
movl $0x3, %edx
callq 0x59015
testb %al, %al
jne 0x64b79
jmp 0x64e78
callq 0x29270
|
w_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov [rbp+var_68], r9
mov [rbp+var_60], r8
mov r12, rcx
mov [rbp+var_48], esi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov [rbp+var_58], rax
mov [rbp+var_70], rdx
mov r13, [rdx+8]
movzx r15d, word ptr [r13+0A6h]
movzx ebx, word ptr [r13+0B0h]
lea rsi, [rbx+rbx*2]
add rsi, r15
lea rcx, [rbp+var_B0]
mov [rcx], rsi
mov rax, [rdi+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_64B1D
cmp rax, offset stru_10000
ja short loc_64B07
cmp esi, 1000h
jb short loc_64B1D
cmp rax, 8001h
jb short loc_64B1D
loc_64B07:
mov rax, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub rax, rsi
mov rsp, rax
mov cl, 1
mov [rbp+var_44], ecx
jmp short loc_64B49
loc_64B1D:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_64BD3
movzx r15d, word ptr [r13+0A6h]
movzx ebx, word ptr [r13+0B0h]
mov [rbp+var_44], 0
loc_64B49:
lea rdi, [rbp+var_B0]
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8d, 4
mov r9d, 3
push 0
mov [rbp+var_50], rax
push rax
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_64B90
loc_64B79:
mov r13d, 0FFFFFFFFh
cmp byte ptr [rbp+var_44], 0
jnz short loc_64BD9
mov rdi, [rbp+var_50]
loc_64B89:
call my_free
jmp short loc_64BD9
loc_64B90:
lea r12, [r15+rbx*2]
add r12, [rbp+var_50]
lea rsi, [rbp+var_B0]
lea rcx, [rbp+var_40]
lea r9, [rbp+var_31]
mov r15, [rbp+var_70]
mov rdi, r15
mov edx, [rbp+var_48]
mov r8, r12
call qword ptr [r13+0D8h]
test eax, eax
jz short loc_64BFE
loc_64BBF:
cmp eax, 7FFFFFFFh
jnz short loc_64C3F
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp short loc_64B79
loc_64BD3:
mov r13d, 1
loc_64BD9:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_64EC3
mov eax, r13d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_64BFE:
lea rdi, [rbp+var_D0]
mov [rdi+8], r13
mov [rdi], r12
mov edx, [rbp+var_88]
mov esi, [rbp+var_84]
lea rcx, [rbp+var_40]
call qword ptr [r13+0E0h]
test eax, eax
jz loc_64CF4
lea rdi, [rbp+var_D0]
call _ma_row_pos_from_key
mov rbx, rax
jmp loc_64CFB
loc_64C3F:
xor eax, eax
cmp [rbp+var_31], 0
movzx ebx, [rbp+arg_0]
cmovz ebx, eax
mov edi, [rbp+var_88]
mov rsi, [rbp+var_40]
call _ma_kpos
movsx ebx, bl
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_64C91
mov r9, [rbp+var_40]
sub rsp, 8
lea r8, [rbp+var_B0]
mov rdi, r14
mov esi, [rbp+var_48]
mov rdx, r15
mov rcx, rax
push rbx
call w_search
add rsp, 10h
test eax, eax
jle loc_64D41
loc_64C91:
mov rcx, [rbp+var_40]
lea rdx, [rbp+var_B0]
mov rdi, r14
mov rsi, r15
mov r8, r12
mov r9, [rbp+var_60]
push rbx
push [rbp+var_68]
call _ma_insert
add rsp, 10h
test eax, eax
js loc_64B79
mov r13d, eax
mov rax, [r14+2E8h]
lea rdi, [rbp+var_B0]
mov ecx, [rdi+30h]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov esi, 2
mov edx, 3
call _ma_write_keypage
test al, al
jnz loc_64B79
jmp short loc_64D44
loc_64CF4:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_64CFB:
test byte ptr [r13+0A2h], 80h
jnz short loc_64D2F
lea rdi, [rbp+var_D0]
call _ma_trid_from_key
mov [r14+430h], rax
mov [r14+428h], rbx
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
jmp loc_64B79
loc_64D2F:
movzx eax, byte ptr [r12]
cmp rax, 0FFh
jz short loc_64D57
inc rax
jmp short loc_64D68
loc_64D41:
mov r13d, eax
loc_64D44:
cmp byte ptr [rbp+var_44], 0
mov rdi, [rbp+var_50]
jz loc_64B89
jmp loc_64BD9
loc_64D57:
movzx eax, word ptr [r12+1]
rol ax, 8
movzx eax, ax
add rax, 3
loc_64D68:
movzx ecx, byte ptr [r12+rax]
shl ecx, 18h
js short loc_64D9F
lea rsi, [rbp+var_B0]
mov [rbp+var_48], 4
lea rcx, [rbp+var_40]
lea r9, [rbp+var_31]
mov rdi, r15
mov edx, 4
mov r8, r12
call qword ptr [r13+0D8h]
jmp loc_64BBF
loc_64D9F:
movzx edx, word ptr [r12+rax+2]
rol dx, 8
movzx edx, dx
movzx r13d, byte ptr [r12+rax+1]
shl r13d, 10h
or r13d, edx
or r13d, ecx
mov [rbp+var_78], rbx
mov rax, [r15]
movzx ecx, byte ptr [rax]
cmp ecx, 0FFh
jz short loc_64DD2
inc ecx
jmp short loc_64DE0
loc_64DD2:
movzx ecx, word ptr [rax+1]
rol cx, 8
movzx ecx, cx
add ecx, 3
loc_64DE0:
mov rbx, [rbp+var_58]
lea rdx, [rbx+458h]
lea rsi, [rbp+var_F0]
mov [rsi+8], rdx
mov edx, ecx
add rax, rdx
mov [rsi], rax
mov eax, [r15+10h]
sub eax, ecx
mov [rsi+10h], eax
mov rax, [r15+14h]
mov [rsi+14h], rax
movzx eax, word ptr [rbx+502h]
add eax, [rbp+var_88]
sub [rbp+var_40], rax
lea r12, [rbp+var_78]
mov rdi, r14
mov rdx, r12
mov ecx, 4
call _ma_ck_real_write_btree
mov r15d, eax
mov rsi, [rbp+var_40]
add rsi, 4
mov rdx, [r12]
mov rdi, rbx
call _ma_dpointer
mov edx, r13d
dec edx
mov rax, [rbp+var_40]
mov [rax+3], dl
mov rax, [rbp+var_40]
mov [rax+2], dh
mov eax, edx
shr eax, 10h
mov rcx, [rbp+var_40]
mov [rcx+1], al
shr edx, 18h
mov rax, [rbp+var_40]
mov [rax], dl
test r15b, r15b
jz short loc_64E90
loc_64E78:
cmp byte ptr [rbp+var_44], 0
jnz short loc_64E87
mov rdi, [rbp+var_50]
call my_free
loc_64E87:
movzx r13d, r15b
jmp loc_64BD9
loc_64E90:
mov rax, [r14+2E8h]
lea rdi, [rbp+var_B0]
mov ecx, [rdi+30h]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov esi, 2
mov edx, 3
call _ma_write_keypage
test al, al
jnz loc_64B79
jmp short loc_64E78
loc_64EC3:
call ___stack_chk_fail
|
long long w_search(
long long a1,
unsigned int a2,
unsigned __int8 **a3,
unsigned long long a4,
long long a5,
long long a6,
char a7)
{
long long v9; // r13
long long v10; // r15
long long v11; // rbx
long long *v12; // rsi
long long **v13; // rcx
unsigned long long v14; // rax
bool v15; // cc
unsigned long long v16; // rax
char *v17; // rax
unsigned int v18; // r13d
char *v19; // rdi
unsigned __int8 *v20; // r12
unsigned __int8 **v21; // r15
unsigned __int8 **v22; // rdi
int v23; // eax
const char *v25; // rsi
long long v26; // rbx
long long v28; // rax
int v29; // eax
int v30; // eax
long long v31; // rax
long long v32; // rax
int v33; // r13d
unsigned __int8 *v34; // rax
int v35; // ecx
unsigned int v36; // ecx
long long v37; // rbx
bool v38; // r15
_QWORD v39[2]; // [rsp+0h] [rbp-F0h] BYREF
unsigned int v40; // [rsp+10h] [rbp-E0h]
long long v41; // [rsp+14h] [rbp-DCh]
long long v42[4]; // [rsp+20h] [rbp-D0h] BYREF
long long *v43[5]; // [rsp+40h] [rbp-B0h] BYREF
unsigned int v44; // [rsp+68h] [rbp-88h]
unsigned int v45; // [rsp+6Ch] [rbp-84h]
unsigned int v46; // [rsp+70h] [rbp-80h]
long long v47; // [rsp+78h] [rbp-78h] BYREF
unsigned __int8 **v48; // [rsp+80h] [rbp-70h]
long long v49; // [rsp+88h] [rbp-68h]
long long v50; // [rsp+90h] [rbp-60h]
long long v51; // [rsp+98h] [rbp-58h]
char *v52; // [rsp+A0h] [rbp-50h]
unsigned int v53; // [rsp+A8h] [rbp-48h]
int v54; // [rsp+ACh] [rbp-44h]
_BYTE *v55; // [rsp+B0h] [rbp-40h] BYREF
char v56; // [rsp+BFh] [rbp-31h] BYREF
unsigned long long v57; // [rsp+C0h] [rbp-30h]
v49 = a6;
v50 = a5;
v53 = a2;
v57 = __readfsqword(0x28u);
v51 = *(_QWORD *)a1;
v48 = a3;
v9 = (long long)a3[1];
v10 = *(unsigned __int16 *)(v9 + 166);
v11 = *(unsigned __int16 *)(v9 + 176);
v12 = (long long *)(v10 + 3 * v11);
v13 = v43;
v43[0] = v12;
v14 = **(_QWORD **)(a1 + 120) - (_QWORD)v43;
v15 = v14 <= (unsigned long long)v12;
v16 = v14 - (_QWORD)v12;
if ( v15 || v16 <= (unsigned long long)&stru_10000 && ((unsigned int)v12 < 0x1000 || v16 < 0x8001) )
{
v17 = (char *)my_malloc(0LL, v12, 65552LL);
if ( !v17 )
return 1;
v10 = *(unsigned __int16 *)(v9 + 166);
v11 = *(unsigned __int16 *)(v9 + 176);
v54 = 0;
}
else
{
v17 = (char *)v39 - (((_DWORD)v12 + 15) & 0xFFFFFFF0);
LOBYTE(v13) = 1;
v54 = (int)v13;
}
v52 = v17;
if ( ma_fetch_keypage((long long)v43, a1, v9, a4, 4u, 3, (long long)v17) )
goto LABEL_9;
v20 = (unsigned __int8 *)&v52[2 * v11 + v10];
v21 = v48;
v22 = v48;
v23 = (*(long long ( **)(unsigned __int8 **, long long **, _QWORD, _BYTE **, unsigned __int8 *, char *))(v9 + 216))(
v48,
v43,
v53,
&v55,
v20,
&v56);
if ( v23 )
{
LABEL_13:
if ( v23 == 0x7FFFFFFF )
{
*(_DWORD *)my_thread_var(v22, (const char *)v43) = 126;
goto LABEL_9;
}
if ( !v56 )
a7 = 0;
v28 = ma_kpos(v44, (long long)v55);
if ( v28 == -1 || (v29 = w_search(a1, v53, (_DWORD)v21, v28, (unsigned int)v43, (_DWORD)v55, a7), v29 > 0) )
{
v30 = ma_insert(a1, (_DWORD)v21, (unsigned int)v43, (_DWORD)v55, (_DWORD)v20, v50, v49, a7);
if ( v30 < 0 )
goto LABEL_9;
v18 = v30;
*(_BYTE *)(*(_QWORD *)(a1 + 744) + 24LL * v46 + 16) = 1;
if ( (unsigned __int8)ma_write_keypage(v43, 2u, 3) )
goto LABEL_9;
}
else
{
v18 = v29;
}
v19 = v52;
if ( (_BYTE)v54 )
return v18;
goto LABEL_11;
}
v42[1] = v9;
v42[0] = (long long)v20;
v25 = (const char *)v45;
if ( (*(unsigned int ( **)(long long *, _QWORD, _QWORD, _BYTE **))(v9 + 224))(v42, v45, v44, &v55) )
v26 = ma_row_pos_from_key(v42);
else
v26 = -1LL;
if ( *(char *)(v9 + 162) >= 0 )
{
*(_QWORD *)(a1 + 1072) = ma_trid_from_key((long long)v42);
*(_QWORD *)(a1 + 1064) = v26;
*(_DWORD *)my_thread_var(v42, v25) = 121;
goto LABEL_9;
}
v31 = *v20;
if ( v31 == 255 )
v32 = (unsigned __int16)__ROL2__(*(_WORD *)(v20 + 1), 8) + 3LL;
else
v32 = v31 + 1;
if ( (v20[v32] & 0x80) == 0 )
{
v53 = 4;
v22 = v21;
v23 = (*(long long ( **)(unsigned __int8 **, long long **, long long, _BYTE **, unsigned __int8 *, char *))(v9 + 216))(
v21,
v43,
4LL,
&v55,
v20,
&v56);
goto LABEL_13;
}
v33 = (v20[v32] << 24) | (unsigned __int16)__ROL2__(*(_WORD *)&v20[v32 + 2], 8) | (v20[v32 + 1] << 16);
v47 = v26;
v34 = *v21;
v35 = **v21;
if ( v35 == 255 )
v36 = (unsigned __int16)__ROL2__(*(_WORD *)(v34 + 1), 8) + 3;
else
v36 = v35 + 1;
v37 = v51;
v39[1] = v51 + 1112;
v39[0] = &v34[v36];
v40 = *((_DWORD *)v21 + 4) - v36;
v41 = *(long long *)((char *)v21 + 20);
v55 += -v44 - *(unsigned __int16 *)(v51 + 1282);
v38 = ma_ck_real_write_btree(a1, (long long)v39, &v47, 4);
ma_dpointer(v37, (long long)(v55 + 4), v47);
v55[3] = v33 - 1;
v55[2] = (unsigned __int16)(v33 - 1) >> 8;
v55[1] = (unsigned int)(v33 - 1) >> 16;
*v55 = (unsigned int)(v33 - 1) >> 24;
if ( v38 || (*(_BYTE *)(*(_QWORD *)(a1 + 744) + 24LL * v46 + 16) = 1, !(unsigned __int8)ma_write_keypage(v43, 2u, 3)) )
{
if ( !(_BYTE)v54 )
my_free(v52);
return v38;
}
LABEL_9:
v18 = -1;
if ( !(_BYTE)v54 )
{
v19 = v52;
LABEL_11:
my_free(v19);
}
return v18;
}
|
w_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RBP + -0x68],R9
MOV qword ptr [RBP + -0x60],R8
MOV R12,RCX
MOV dword ptr [RBP + -0x48],ESI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x70],RDX
MOV R13,qword ptr [RDX + 0x8]
MOVZX R15D,word ptr [R13 + 0xa6]
MOVZX EBX,word ptr [R13 + 0xb0]
LEA RSI,[RBX + RBX*0x2]
ADD RSI,R15
LEA RCX,[RBP + -0xb0]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00164b1d
CMP RAX,0x10000
JA 0x00164b07
CMP ESI,0x1000
JC 0x00164b1d
CMP RAX,0x8001
JC 0x00164b1d
LAB_00164b07:
MOV RAX,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB RAX,RSI
MOV RSP,RAX
MOV CL,0x1
MOV dword ptr [RBP + -0x44],ECX
JMP 0x00164b49
LAB_00164b1d:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019fd89
TEST RAX,RAX
JZ 0x00164bd3
MOVZX R15D,word ptr [R13 + 0xa6]
MOVZX EBX,word ptr [R13 + 0xb0]
MOV dword ptr [RBP + -0x44],0x0
LAB_00164b49:
LEA RDI,[RBP + -0xb0]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
MOV qword ptr [RBP + -0x50],RAX
PUSH RAX
CALL 0x00158ed6
ADD RSP,0x10
TEST AL,AL
JZ 0x00164b90
LAB_00164b79:
MOV R13D,0xffffffff
CMP byte ptr [RBP + -0x44],0x0
JNZ 0x00164bd9
MOV RDI,qword ptr [RBP + -0x50]
LAB_00164b89:
CALL 0x0019ffb6
JMP 0x00164bd9
LAB_00164b90:
LEA R12,[R15 + RBX*0x2]
ADD R12,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0xb0]
LEA RCX,[RBP + -0x40]
LEA R9,[RBP + -0x31]
MOV R15,qword ptr [RBP + -0x70]
MOV RDI,R15
MOV EDX,dword ptr [RBP + -0x48]
MOV R8,R12
CALL qword ptr [R13 + 0xd8]
TEST EAX,EAX
JZ 0x00164bfe
LAB_00164bbf:
CMP EAX,0x7fffffff
JNZ 0x00164c3f
CALL 0x001a1afa
MOV dword ptr [RAX],0x7e
JMP 0x00164b79
LAB_00164bd3:
MOV R13D,0x1
LAB_00164bd9:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00164ec3
MOV EAX,R13D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00164bfe:
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RDI + 0x8],R13
MOV qword ptr [RDI],R12
MOV EDX,dword ptr [RBP + -0x88]
MOV ESI,dword ptr [RBP + -0x84]
LEA RCX,[RBP + -0x40]
CALL qword ptr [R13 + 0xe0]
TEST EAX,EAX
JZ 0x00164cf4
LEA RDI,[RBP + -0xd0]
CALL 0x0015704c
MOV RBX,RAX
JMP 0x00164cfb
LAB_00164c3f:
XOR EAX,EAX
CMP byte ptr [RBP + -0x31],0x0
MOVZX EBX,byte ptr [RBP + 0x10]
CMOVZ EBX,EAX
MOV EDI,dword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x00156ee7
MOVSX EBX,BL
CMP RAX,-0x1
JZ 0x00164c91
MOV R9,qword ptr [RBP + -0x40]
SUB RSP,0x8
LEA R8,[RBP + -0xb0]
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x48]
MOV RDX,R15
MOV RCX,RAX
PUSH RBX
CALL 0x00164a7e
ADD RSP,0x10
TEST EAX,EAX
JLE 0x00164d41
LAB_00164c91:
MOV RCX,qword ptr [RBP + -0x40]
LEA RDX,[RBP + -0xb0]
MOV RDI,R14
MOV RSI,R15
MOV R8,R12
MOV R9,qword ptr [RBP + -0x60]
PUSH RBX
PUSH qword ptr [RBP + -0x68]
CALL 0x001651af
ADD RSP,0x10
TEST EAX,EAX
JS 0x00164b79
MOV R13D,EAX
MOV RAX,qword ptr [R14 + 0x2e8]
LEA RDI,[RBP + -0xb0]
MOV ECX,dword ptr [RDI + 0x30]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV ESI,0x2
MOV EDX,0x3
CALL 0x00159015
TEST AL,AL
JNZ 0x00164b79
JMP 0x00164d44
LAB_00164cf4:
MOV RBX,-0x1
LAB_00164cfb:
TEST byte ptr [R13 + 0xa2],0x80
JNZ 0x00164d2f
LEA RDI,[RBP + -0xd0]
CALL 0x00157104
MOV qword ptr [R14 + 0x430],RAX
MOV qword ptr [R14 + 0x428],RBX
CALL 0x001a1afa
MOV dword ptr [RAX],0x79
JMP 0x00164b79
LAB_00164d2f:
MOVZX EAX,byte ptr [R12]
CMP RAX,0xff
JZ 0x00164d57
INC RAX
JMP 0x00164d68
LAB_00164d41:
MOV R13D,EAX
LAB_00164d44:
CMP byte ptr [RBP + -0x44],0x0
MOV RDI,qword ptr [RBP + -0x50]
JZ 0x00164b89
JMP 0x00164bd9
LAB_00164d57:
MOVZX EAX,word ptr [R12 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD RAX,0x3
LAB_00164d68:
MOVZX ECX,byte ptr [R12 + RAX*0x1]
SHL ECX,0x18
JS 0x00164d9f
LEA RSI,[RBP + -0xb0]
MOV dword ptr [RBP + -0x48],0x4
LEA RCX,[RBP + -0x40]
LEA R9,[RBP + -0x31]
MOV RDI,R15
MOV EDX,0x4
MOV R8,R12
CALL qword ptr [R13 + 0xd8]
JMP 0x00164bbf
LAB_00164d9f:
MOVZX EDX,word ptr [R12 + RAX*0x1 + 0x2]
ROL DX,0x8
MOVZX EDX,DX
MOVZX R13D,byte ptr [R12 + RAX*0x1 + 0x1]
SHL R13D,0x10
OR R13D,EDX
OR R13D,ECX
MOV qword ptr [RBP + -0x78],RBX
MOV RAX,qword ptr [R15]
MOVZX ECX,byte ptr [RAX]
CMP ECX,0xff
JZ 0x00164dd2
INC ECX
JMP 0x00164de0
LAB_00164dd2:
MOVZX ECX,word ptr [RAX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
ADD ECX,0x3
LAB_00164de0:
MOV RBX,qword ptr [RBP + -0x58]
LEA RDX,[RBX + 0x458]
LEA RSI,[RBP + -0xf0]
MOV qword ptr [RSI + 0x8],RDX
MOV EDX,ECX
ADD RAX,RDX
MOV qword ptr [RSI],RAX
MOV EAX,dword ptr [R15 + 0x10]
SUB EAX,ECX
MOV dword ptr [RSI + 0x10],EAX
MOV RAX,qword ptr [R15 + 0x14]
MOV qword ptr [RSI + 0x14],RAX
MOVZX EAX,word ptr [RBX + 0x502]
ADD EAX,dword ptr [RBP + -0x88]
SUB qword ptr [RBP + -0x40],RAX
LEA R12,[RBP + -0x78]
MOV RDI,R14
MOV RDX,R12
MOV ECX,0x4
CALL 0x00164a20
MOV R15D,EAX
MOV RSI,qword ptr [RBP + -0x40]
ADD RSI,0x4
MOV RDX,qword ptr [R12]
MOV RDI,RBX
CALL 0x00157230
MOV EDX,R13D
DEC EDX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x3],DL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x2],DH
MOV EAX,EDX
SHR EAX,0x10
MOV RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RCX + 0x1],AL
SHR EDX,0x18
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX],DL
TEST R15B,R15B
JZ 0x00164e90
LAB_00164e78:
CMP byte ptr [RBP + -0x44],0x0
JNZ 0x00164e87
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0019ffb6
LAB_00164e87:
MOVZX R13D,R15B
JMP 0x00164bd9
LAB_00164e90:
MOV RAX,qword ptr [R14 + 0x2e8]
LEA RDI,[RBP + -0xb0]
MOV ECX,dword ptr [RDI + 0x30]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV ESI,0x2
MOV EDX,0x3
CALL 0x00159015
TEST AL,AL
JNZ 0x00164b79
JMP 0x00164e78
LAB_00164ec3:
CALL 0x00129270
|
uint w_search(long *param_1,int4 param_2,int8 *param_3,int8 param_4,
int8 param_5,int8 param_6,char param_7)
{
byte bVar1;
byte bVar2;
ushort uVar3;
code *pcVar4;
int8 *puVar5;
int8 uVar6;
long lVar7;
int4 uVar8;
char cVar9;
byte bVar10;
int iVar11;
int iVar12;
uint uVar13;
ulong uVar14;
ulong uVar15;
int4 *puVar16;
long lVar17;
long lVar18;
long lVar19;
ulong uVar20;
byte **ppbVar21;
int1 *puVar22;
byte *pbVar23;
ulong uVar24;
long in_FS_OFFSET;
byte *local_f8;
long local_f0;
int local_e8;
int8 local_e4;
byte *local_d8;
long local_d0;
ulong local_b8 [5];
int local_90;
int4 local_8c;
uint local_88;
long local_80;
int8 *local_78;
int8 local_70;
int8 local_68;
long local_60;
int1 *local_58;
int4 local_50;
int4 local_4c;
int1 *local_48;
char local_39;
long local_38;
ppbVar21 = &local_f8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = *param_1;
lVar18 = param_3[1];
uVar24 = (ulong)*(ushort *)(lVar18 + 0xa6);
uVar20 = (ulong)*(ushort *)(lVar18 + 0xb0);
local_b8[0] = uVar20 * 3 + uVar24;
uVar14 = *(long *)param_1[0xf] - (long)local_b8;
uVar15 = uVar14 - local_b8[0];
local_78 = param_3;
local_70 = param_6;
local_68 = param_5;
local_50 = param_2;
if ((local_b8[0] < uVar14) &&
((0x10000 < uVar15 || ((0xfff < (uint)local_b8[0] && (0x8000 < uVar15)))))) {
puVar22 = (int1 *)((long)&local_f8 - (ulong)((uint)local_b8[0] + 0xf & 0xfffffff0));
local_4c = (int4)CONCAT71((int7)((ulong)local_b8 >> 8),1);
ppbVar21 = (byte **)puVar22;
}
else {
puVar22 = (int1 *)my_malloc(0,local_b8[0],0x10010);
if (puVar22 == (int1 *)0x0) {
uVar13 = 1;
goto LAB_00164bd9;
}
uVar24 = (ulong)*(ushort *)(lVar18 + 0xa6);
uVar20 = (ulong)*(ushort *)(lVar18 + 0xb0);
local_4c = 0;
ppbVar21 = &local_f8;
}
*(int8 *)((long)ppbVar21 + -8) = 0;
local_58 = puVar22;
*(int1 **)((long)ppbVar21 + -0x10) = puVar22;
*(int8 *)((long)ppbVar21 + -0x18) = 0x164b71;
cVar9 = _ma_fetch_keypage(local_b8,param_1,lVar18,param_4,4,3);
uVar8 = local_50;
puVar5 = local_78;
if (cVar9 == '\0') {
pbVar23 = local_58 + uVar24 + uVar20 * 2;
pcVar4 = *(code **)(lVar18 + 0xd8);
*(int8 *)((long)ppbVar21 + -8) = 0x164bbb;
iVar11 = (*pcVar4)(puVar5,local_b8,uVar8,&local_48,pbVar23,&local_39);
iVar12 = local_90;
if (iVar11 == 0) {
pcVar4 = *(code **)(lVar18 + 0xe0);
local_d8 = pbVar23;
local_d0 = lVar18;
*(int8 *)((long)ppbVar21 + -8) = 0x164c23;
iVar12 = (*pcVar4)(&local_d8,local_8c,iVar12,&local_48);
if (iVar12 == 0) {
lVar17 = -1;
}
else {
*(int8 *)((long)ppbVar21 + -8) = 0x164c37;
lVar17 = _ma_row_pos_from_key(&local_d8);
}
lVar7 = local_60;
if ((*(byte *)(lVar18 + 0xa2) & 0x80) == 0) {
*(int8 *)((long)ppbVar21 + -8) = 0x164d11;
lVar18 = _ma_trid_from_key(&local_d8);
param_1[0x86] = lVar18;
param_1[0x85] = lVar17;
*(int8 *)((long)ppbVar21 + -8) = 0x164d24;
puVar16 = (int4 *)_my_thread_var();
*puVar16 = 0x79;
goto LAB_00164b79;
}
if ((ulong)*pbVar23 == 0xff) {
lVar19 = (ulong)(ushort)(*(ushort *)(pbVar23 + 1) << 8 | *(ushort *)(pbVar23 + 1) >> 8) + 3;
}
else {
lVar19 = (ulong)*pbVar23 + 1;
}
bVar1 = pbVar23[lVar19];
if ((int)((uint)bVar1 << 0x18) < 0) {
uVar3 = *(ushort *)(pbVar23 + lVar19 + 2);
bVar2 = pbVar23[lVar19 + 1];
local_f8 = (byte *)*puVar5;
if (*local_f8 == 0xff) {
uVar13 = (ushort)(*(ushort *)(local_f8 + 1) << 8 | *(ushort *)(local_f8 + 1) >> 8) + 3;
}
else {
uVar13 = *local_f8 + 1;
}
local_f0 = local_60 + 0x458;
local_f8 = local_f8 + uVar13;
local_e8 = *(int *)(puVar5 + 2) - uVar13;
local_e4 = *(int8 *)((long)puVar5 + 0x14);
local_48 = local_48 + -(ulong)((uint)*(ushort *)(local_60 + 0x502) + local_90);
local_80 = lVar17;
*(int8 *)((long)ppbVar21 + -8) = 0x164e34;
bVar10 = _ma_ck_real_write_btree(param_1,&local_f8,&local_80,4);
lVar18 = local_80;
puVar22 = local_48 + 4;
*(int8 *)((long)ppbVar21 + -8) = 0x164e4b;
_ma_dpointer(lVar7,puVar22,lVar18);
iVar12 = CONCAT13(bVar1,CONCAT12(bVar2,uVar3 << 8 | uVar3 >> 8)) + -1;
local_48[3] = (char)iVar12;
local_48[2] = (char)((uint)iVar12 >> 8);
local_48[1] = (char)((uint)iVar12 >> 0x10);
*local_48 = (char)((uint)iVar12 >> 0x18);
if (bVar10 == 0) {
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_88 * 0x18) = 1;
*(int8 *)((long)ppbVar21 + -8) = 0x164eb9;
cVar9 = _ma_write_keypage(local_b8,2,3);
if (cVar9 != '\0') goto LAB_00164b79;
}
puVar22 = local_58;
if ((char)local_4c == '\0') {
*(int8 *)((long)ppbVar21 + -8) = 0x164e87;
my_free(puVar22);
}
uVar13 = (uint)bVar10;
goto LAB_00164bd9;
}
local_50 = 4;
pcVar4 = *(code **)(lVar18 + 0xd8);
*(int8 *)((long)ppbVar21 + -8) = 0x164d9a;
iVar11 = (*pcVar4)(puVar5,local_b8,4,&local_48,pbVar23,&local_39);
}
puVar22 = local_48;
if (iVar11 == 0x7fffffff) {
*(int8 *)((long)ppbVar21 + -8) = 0x164bcb;
puVar16 = (int4 *)_my_thread_var();
*puVar16 = 0x7e;
goto LAB_00164b79;
}
if (local_39 == '\0') {
param_7 = '\0';
}
*(int8 *)((long)ppbVar21 + -8) = 0x164c5b;
lVar18 = _ma_kpos(local_90,puVar22);
puVar22 = local_48;
uVar8 = local_50;
if (lVar18 == -1) {
LAB_00164c91:
puVar22 = local_48;
uVar6 = local_68;
*(ulong *)((long)ppbVar21 + -8) = (ulong)(uint)(int)param_7;
*(int8 *)((long)ppbVar21 + -0x10) = local_70;
*(int8 *)((long)ppbVar21 + -0x18) = 0x164cb2;
uVar13 = _ma_insert(param_1,puVar5,local_b8,puVar22,pbVar23,uVar6);
if (-1 < (int)uVar13) {
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_88 * 0x18) = 1;
*(int8 *)((long)ppbVar21 + -8) = 0x164cea;
cVar9 = _ma_write_keypage(local_b8,2,3);
if (cVar9 == '\0') goto LAB_00164d44;
}
goto LAB_00164b79;
}
*(ulong *)((long)ppbVar21 + -0x10) = (ulong)(uint)(int)param_7;
*(int8 *)((long)ppbVar21 + -0x18) = 0x164c85;
uVar13 = w_search(param_1,uVar8,puVar5,lVar18,local_b8,puVar22);
if (0 < (int)uVar13) goto LAB_00164c91;
LAB_00164d44:
puVar22 = local_58;
}
else {
LAB_00164b79:
uVar13 = 0xffffffff;
puVar22 = local_58;
}
local_58 = puVar22;
if ((char)local_4c == '\0') {
*(int8 *)((long)ppbVar21 + -8) = 0x164b8e;
my_free(puVar22);
}
LAB_00164bd9:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar13;
}
/* WARNING: Subroutine does not return */
*(code **)((long)ppbVar21 + -8) = _ma_enlarge_root;
__stack_chk_fail();
}
|
|
17,513
|
mariadb_compression_algorithm_str
|
eloqsql/libmariadb/libmariadb/ma_compress.c
|
const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm)
{
switch(algorithm) {
case COMPRESSION_NONE:
case COMPRESSION_ZLIB:
case COMPRESSION_ZSTD:
return compression_algorithms[algorithm] ;
default:
return compression_algorithms[COMPRESSION_UNKNOWN];
}
}
|
O3
|
c
|
mariadb_compression_algorithm_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shlq $0x3, %rax
cmpl $0x3, %edi
leaq 0x2ff7b8(%rip), %rcx # 0x34c680
movl $0x18, %edx
cmovbq %rax, %rdx
movq (%rcx,%rdx), %rax
popq %rbp
retq
|
_mariadb_compression_algorithm_str:
push rbp
mov rbp, rsp
mov eax, edi
shl rax, 3
cmp edi, 3
lea rcx, compression_algorithms
mov edx, 18h
cmovb rdx, rax
mov rax, [rcx+rdx]
pop rbp
retn
|
char * mariadb_compression_algorithm_str(unsigned int a1)
{
long long v1; // rdx
v1 = 3LL;
if ( a1 < 3 )
v1 = a1;
return compression_algorithms[v1];
}
|
_mariadb_compression_algorithm_str:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL RAX,0x3
CMP EDI,0x3
LEA RCX,[0x44c680]
MOV EDX,0x18
CMOVC RDX,RAX
MOV RAX,qword ptr [RCX + RDX*0x1]
POP RBP
RET
|
int8 _mariadb_compression_algorithm_str(uint param_1)
{
long lVar1;
lVar1 = 0x18;
if (param_1 < 3) {
lVar1 = (ulong)param_1 << 3;
}
return *(int8 *)(compression_algorithms + lVar1);
}
|
|
17,514
|
rw_pr_init
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
}
|
O0
|
c
|
rw_pr_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x25660
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x25510
movq -0x8(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x60(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
|
rw_pr_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call _pthread_mutex_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
xor eax, eax
mov esi, eax
call _pthread_cond_init
mov rax, [rbp+var_8]
mov dword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+5Ch], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+60h], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_DWORD *)(a1 + 88) = 0;
*(_DWORD *)(a1 + 92) = 0;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
|
rw_pr_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00125660
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00125510
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x5c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int4 *)((long)param_1 + 0x58) = 0;
*(int4 *)((long)param_1 + 0x5c) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
|
|
17,515
|
cleanup_dirname
|
eloqsql/mysys/mf_pack.c
|
size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
}
|
O0
|
c
|
cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0xe8d28
leaq -0x210(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x2f, -0xd(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
leaq 0x6b24a(%rip), %rsi # 0x153fa1
callq 0x2a710
leaq -0xd(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x238(%rbp)
movb (%rax), %al
movq -0x230(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0xe9171
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xe8dbd
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xe9158
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq -0x228(%rbp), %rax
jbe 0xe9074
movq -0x230(%rbp), %rdi
xorl %eax, %eax
subq -0x228(%rbp), %rax
addq %rax, %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x2a810
cmpl $0x0, %eax
jne 0xe9074
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xe906f
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0xe8eff
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xe8e90
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xe8eff
leaq 0xb997c1(%rip), %rax # 0xc82658
cmpq $0x0, (%rax)
jne 0xe8ebb
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0xe915a
leaq -0x210(%rbp), %rdi
leaq 0xb9978f(%rip), %rax # 0xc82658
movq (%rax), %rsi
callq 0x2a710
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xe8efd
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xe8eff
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xe8fab
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xe8f32
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xe8fab
leaq 0xb99737(%rip), %rdi # 0xc82670
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0xf0350
cmpl $0x0, %eax
je 0xe8f6a
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0xe915a
leaq -0x210(%rbp), %rdi
leaq 0xb996f8(%rip), %rsi # 0xc82670
callq 0x2a710
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xe8fa9
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xe8fab
movq -0x230(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rcx
xorl %eax, %eax
cmpq -0x240(%rbp), %rcx
movb %al, -0x249(%rbp)
jb 0xe8fe7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0xe8ff3
jmp 0xe9007
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xe8fb9
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7e, %eax
je 0xe9043
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
jb 0xe906d
movq -0x230(%rbp), %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x2a810
cmpl $0x0, %eax
jne 0xe906d
movq -0x248(%rbp), %rdi
addq $0x1, %rdi
leaq -0xd(%rbp), %rsi
callq 0x2a710
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
jmp 0xe915a
jmp 0xe906f
jmp 0xe9156
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
movq -0x228(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xe90cc
movq -0x240(%rbp), %rdi
leaq -0xd(%rbp), %rsi
addq $0x1, %rsi
movq -0x228(%rbp), %rdx
subq $0x1, %rdx
callq 0x2a810
cmpl $0x0, %eax
jne 0xe90cc
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0xe9154
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jle 0xe9107
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xe9107
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xe9152
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0xe9150
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0xe9150
movq -0x230(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0xe9150
movq -0x230(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x230(%rbp)
jmp 0xe9152
jmp 0xe9154
jmp 0xe9156
jmp 0xe9158
jmp 0xe915a
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xe8d78
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x2a710
jmp 0xe9186
jmp 0xe9188
movq -0x230(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xe91c2
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x2a250
nopw (%rax,%rax)
|
cleanup_dirname:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
jmp short $+2
loc_E8D28:
lea rax, [rbp+var_210]
mov [rbp+var_240], rax
mov rax, [rbp+var_220]
mov [rbp+var_238], rax
mov [rbp+var_D], 2Fh ; '/'
lea rdi, [rbp+var_D]
add rdi, 1
lea rsi, asc_153FA1; ".."
call _stpcpy
lea rcx, [rbp+var_D]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_240]
mov [rbp+var_230], rax
loc_E8D78:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 1
mov [rbp+var_238], rcx
mov al, [rax]
mov rcx, [rbp+var_230]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz loc_E9171
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_E8DBD
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
loc_E8DBD:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_E9158
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, [rbp+var_228]
jbe loc_E9074
mov rdi, [rbp+var_230]
xor eax, eax
sub rax, [rbp+var_228]
add rdi, rax
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz loc_E9074
mov rdx, [rbp+var_228]
mov rax, [rbp+var_230]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz loc_E906F
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz loc_E8EFF
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_E8E90
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_E8EFF
loc_E8E90:
lea rax, home_dir
cmp qword ptr [rax], 0
jnz short loc_E8EBB
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_E915A
loc_E8EBB:
lea rdi, [rbp+var_210]
lea rax, home_dir
mov rsi, [rax]
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_E8EFD
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_E8EFD:
jmp short $+2
loc_E8EFF:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_E8FAB
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_E8F32
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_E8FAB
loc_E8F32:
lea rdi, curr_dir
mov esi, 200h
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jz short loc_E8F6A
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_E915A
loc_E8F6A:
lea rdi, [rbp+var_210]
lea rsi, curr_dir
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_E8FA9
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_E8FA9:
jmp short $+2
loc_E8FAB:
mov rax, [rbp+var_230]
mov [rbp+var_248], rax
loc_E8FB9:
mov rcx, [rbp+var_230]
xor eax, eax
cmp rcx, [rbp+var_240]
mov [rbp+var_249], al
jb short loc_E8FE7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_E8FE7:
mov al, [rbp+var_249]
test al, 1
jnz short loc_E8FF3
jmp short loc_E9007
loc_E8FF3:
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_E8FB9
loc_E9007:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jz short loc_E9043
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jb short loc_E906D
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz short loc_E906D
loc_E9043:
mov rdi, [rbp+var_248]
add rdi, 1
lea rsi, [rbp+var_D]
call _stpcpy
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
jmp loc_E915A
loc_E906D:
jmp short $+2
loc_E906F:
jmp loc_E9156
loc_E9074:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
mov rcx, [rbp+var_228]
sub rcx, 1
cmp rax, rcx
jnz short loc_E90CC
mov rdi, [rbp+var_240]
lea rsi, [rbp+var_D]
add rsi, 1
mov rdx, [rbp+var_228]
sub rdx, 1
call _memcmp
cmp eax, 0
jnz short loc_E90CC
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
jmp loc_E9154
loc_E90CC:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 0
jle short loc_E9107
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_E9107
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_E9152
loc_E9107:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 1
jle short loc_E9150
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Eh ; '.'
jnz short loc_E9150
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-2]
cmp eax, 2Fh ; '/'
jnz short loc_E9150
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_230], rax
loc_E9150:
jmp short $+2
loc_E9152:
jmp short $+2
loc_E9154:
jmp short $+2
loc_E9156:
jmp short $+2
loc_E9158:
jmp short $+2
loc_E915A:
mov rax, [rbp+var_230]
add rax, 1
mov [rbp+var_230], rax
jmp loc_E8D78
loc_E9171:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call _stpcpy
jmp short $+2
loc_E9186:
jmp short $+2
loc_E9188:
mov rax, [rbp+var_230]
lea rcx, [rbp+var_210]
sub rax, rcx
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_E91C2
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_E91C2:
call ___stack_chk_fail
|
long long cleanup_dirname(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
bool v4; // [rsp+17h] [rbp-249h]
_BYTE *v5; // [rsp+18h] [rbp-248h]
_BYTE *v6; // [rsp+20h] [rbp-240h]
_BYTE *i; // [rsp+30h] [rbp-230h]
unsigned long long v9; // [rsp+38h] [rbp-228h]
long long v10; // [rsp+48h] [rbp-218h]
_BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF
char v12; // [rsp+253h] [rbp-Dh] BYREF
_BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __readfsqword(0x28u);
v10 = a1;
v6 = v11;
v12 = 47;
v9 = stpcpy(v13, "..") - (_QWORD)&v12;
for ( i = v11; ; ++i )
{
v2 = a2++;
LOBYTE(v2) = *v2;
*i = (_BYTE)v2;
if ( !(_BYTE)v2 )
break;
if ( *i == 47 )
*i = 47;
if ( *i == 47 )
{
if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) )
{
i -= v9;
if ( i != v6 )
{
if ( *--i == 126 && (i == v6 || *(i - 1) == 47) )
{
if ( !home_dir )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, home_dir) - 1);
if ( *i == 47 )
--i;
}
if ( *i == 46 && (i == v6 || *(i - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1);
if ( *i == 47 )
--i;
}
v5 = i;
while ( 1 )
{
v4 = 0;
if ( i >= v6 )
v4 = *i != 47;
if ( !v4 )
break;
--i;
}
if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) )
{
i = (_BYTE *)stpcpy(v5 + 1, &v12);
*i = 47;
}
}
}
else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) )
{
v6 = i;
}
else if ( i - v6 > 0 && *(i - 1) == 47 )
{
--i;
}
else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 )
{
i -= 2;
}
}
}
stpcpy(v10, v11);
return i - v11;
}
|
cleanup_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x001e8d28
LAB_001e8d28:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x238],RAX
MOV byte ptr [RBP + -0xd],0x2f
LEA RDI,[RBP + -0xd]
ADD RDI,0x1
LEA RSI,[0x253fa1]
CALL 0x0012a710
LEA RCX,[RBP + -0xd]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV qword ptr [RBP + -0x230],RAX
LAB_001e8d78:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x238],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x230]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001e9171
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001e8dbd
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
LAB_001e8dbd:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001e9158
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,qword ptr [RBP + -0x228]
JBE 0x001e9074
MOV RDI,qword ptr [RBP + -0x230]
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x228]
ADD RDI,RAX
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x0012a810
CMP EAX,0x0
JNZ 0x001e9074
MOV RDX,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x230]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001e906f
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x001e8eff
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001e8e90
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001e8eff
LAB_001e8e90:
LEA RAX,[0xd82658]
CMP qword ptr [RAX],0x0
JNZ 0x001e8ebb
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001e915a
LAB_001e8ebb:
LEA RDI,[RBP + -0x210]
LEA RAX,[0xd82658]
MOV RSI,qword ptr [RAX]
CALL 0x0012a710
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001e8efd
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_001e8efd:
JMP 0x001e8eff
LAB_001e8eff:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001e8fab
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001e8f32
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001e8fab
LAB_001e8f32:
LEA RDI,[0xd82670]
MOV ESI,0x200
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f0350
CMP EAX,0x0
JZ 0x001e8f6a
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001e915a
LAB_001e8f6a:
LEA RDI,[RBP + -0x210]
LEA RSI,[0xd82670]
CALL 0x0012a710
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001e8fa9
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_001e8fa9:
JMP 0x001e8fab
LAB_001e8fab:
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x248],RAX
LAB_001e8fb9:
MOV RCX,qword ptr [RBP + -0x230]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x240]
MOV byte ptr [RBP + -0x249],AL
JC 0x001e8fe7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_001e8fe7:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x001e8ff3
JMP 0x001e9007
LAB_001e8ff3:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001e8fb9
LAB_001e9007:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JZ 0x001e9043
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JC 0x001e906d
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x0012a810
CMP EAX,0x0
JNZ 0x001e906d
LAB_001e9043:
MOV RDI,qword ptr [RBP + -0x248]
ADD RDI,0x1
LEA RSI,[RBP + -0xd]
CALL 0x0012a710
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
JMP 0x001e915a
LAB_001e906d:
JMP 0x001e906f
LAB_001e906f:
JMP 0x001e9156
LAB_001e9074:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x228]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x001e90cc
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0xd]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x228]
SUB RDX,0x1
CALL 0x0012a810
CMP EAX,0x0
JNZ 0x001e90cc
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001e9154
LAB_001e90cc:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x0
JLE 0x001e9107
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001e9107
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001e9152
LAB_001e9107:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x001e9150
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2e
JNZ 0x001e9150
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x2f
JNZ 0x001e9150
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x230],RAX
LAB_001e9150:
JMP 0x001e9152
LAB_001e9152:
JMP 0x001e9154
LAB_001e9154:
JMP 0x001e9156
LAB_001e9156:
JMP 0x001e9158
LAB_001e9158:
JMP 0x001e915a
LAB_001e915a:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001e8d78
LAB_001e9171:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0012a710
JMP 0x001e9186
LAB_001e9186:
JMP 0x001e9188
LAB_001e9188:
MOV RAX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001e91c2
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_001e91c2:
CALL 0x0012a250
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong __n;
char *pcVar4;
long in_FS_OFFSET;
bool bVar5;
char *local_248;
char *local_240;
char *local_238;
char local_218 [515];
char local_15;
char acStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = local_218;
local_15 = '/';
pcVar3 = stpcpy(acStack_14,"..");
__n = (long)pcVar3 - (long)&local_15;
local_240 = param_2;
local_238 = local_248;
do {
cVar1 = *local_240;
*local_238 = cVar1;
if (cVar1 == '\0') {
stpcpy(param_1,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_238 - (long)local_218;
}
if (*local_238 == '/') {
*local_238 = '/';
}
if (*local_238 == '/') {
if ((__n < (ulong)((long)local_238 - (long)local_248)) &&
(iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) {
local_238 = local_238 + -__n;
if (local_238 != local_248) {
pcVar3 = local_238 + -1;
if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) {
if (home_dir == (char *)0x0) {
local_238 = pcVar3 + __n + 1;
goto LAB_001e915a;
}
pcVar4 = stpcpy(local_218,home_dir);
pcVar3 = pcVar4 + -1;
if (pcVar4[-1] == '/') {
pcVar3 = pcVar4 + -2;
}
}
local_238 = pcVar3;
pcVar3 = local_238;
if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
local_238 = local_238 + __n + 1;
goto LAB_001e915a;
}
pcVar4 = stpcpy(local_218,&curr_dir);
local_238 = pcVar4 + -1;
pcVar3 = local_238;
if (*local_238 == '/') {
local_238 = pcVar4 + -2;
pcVar3 = local_238;
}
}
while( true ) {
bVar5 = false;
if (local_248 <= local_238) {
bVar5 = *local_238 != '/';
}
if (!bVar5) break;
local_238 = local_238 + -1;
}
if ((local_238[1] == '~') ||
((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) {
local_238 = stpcpy(pcVar3 + 1,&local_15);
*local_238 = '/';
}
}
}
else if (((long)local_238 - (long)local_248 == __n - 1) &&
(iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) {
local_248 = local_238;
}
else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) {
if ((1 < (long)local_238 - (long)local_248) &&
((local_238[-1] == '.' && (local_238[-2] == '/')))) {
local_238 = local_238 + -2;
}
}
else {
local_238 = local_238 + -1;
}
}
LAB_001e915a:
local_238 = local_238 + 1;
local_240 = local_240 + 1;
} while( true );
}
|
|
17,516
|
my_wc_mb_8bit
|
eloqsql/strings/ctype-simple.c
|
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_wc_mb_8bit:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x70bd1
pushq %rbp
movq %rsp, %rbp
movq 0x70(%rdi), %rcx
movq 0x8(%rcx), %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0x70bd0
addq $0x2, %rcx
movzwl -0x2(%rcx), %r9d
movq %rsi, %r8
subq %r9, %r8
jb 0x70bab
movzwl (%rcx), %r9d
cmpq %rsi, %r9
jae 0x70bba
movq 0x16(%rcx), %rdi
addq $0x10, %rcx
testq %rdi, %rdi
jne 0x70b95
jmp 0x70bd0
movb (%rdi,%r8), %al
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_8bit:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_70BD1
push rbp
mov rbp, rsp
mov rcx, [rdi+70h]
mov rdi, [rcx+8]
xor eax, eax
test rdi, rdi
jz short loc_70BD0
add rcx, 2
loc_70B95:
movzx r9d, word ptr [rcx-2]
mov r8, rsi
sub r8, r9
jb short loc_70BAB
movzx r9d, word ptr [rcx]
cmp r9, rsi
jnb short loc_70BBA
loc_70BAB:
mov rdi, [rcx+16h]
add rcx, 10h
test rdi, rdi
jnz short loc_70B95
jmp short loc_70BD0
loc_70BBA:
mov al, [rdi+r8]
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
loc_70BD0:
pop rbp
locret_70BD1:
retn
|
long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rcx
long long v6; // rdi
unsigned __int16 *i; // rcx
unsigned long long v8; // r9
char v9; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *(_QWORD *)(a1 + 112);
v6 = *(_QWORD *)(v5 + 8);
result = 0LL;
if ( v6 )
{
for ( i = (unsigned __int16 *)(v5 + 2); ; i += 8 )
{
v8 = *(i - 1);
if ( a2 >= v8 && *i >= a2 )
break;
v6 = *(_QWORD *)(i + 11);
if ( !v6 )
return result;
}
v9 = *(_BYTE *)(v6 + a2 - v8);
*a3 = v9;
return (v9 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
|
my_wc_mb_8bit:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00170bd1
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI + 0x70]
MOV RDI,qword ptr [RCX + 0x8]
XOR EAX,EAX
TEST RDI,RDI
JZ 0x00170bd0
ADD RCX,0x2
LAB_00170b95:
MOVZX R9D,word ptr [RCX + -0x2]
MOV R8,RSI
SUB R8,R9
JC 0x00170bab
MOVZX R9D,word ptr [RCX]
CMP R9,RSI
JNC 0x00170bba
LAB_00170bab:
MOV RDI,qword ptr [RCX + 0x16]
ADD RCX,0x10
TEST RDI,RDI
JNZ 0x00170b95
JMP 0x00170bd0
LAB_00170bba:
MOV AL,byte ptr [RDI + R8*0x1]
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_00170bd0:
POP RBP
LAB_00170bd1:
RET
|
ulong my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
ushort *puVar3;
long lVar4;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
lVar4 = *(long *)(*(long *)(param_1 + 0x70) + 8);
uVar2 = 0;
if (lVar4 != 0) {
puVar3 = (ushort *)(*(long *)(param_1 + 0x70) + 2);
do {
if ((puVar3[-1] <= param_2) && (param_2 <= *puVar3)) {
cVar1 = *(char *)(lVar4 + (param_2 - puVar3[-1]));
*param_3 = cVar1;
return (ulong)(param_2 == 0 || cVar1 != '\0');
}
lVar4 = *(long *)(puVar3 + 0xb);
puVar3 = puVar3 + 8;
} while (lVar4 != 0);
}
}
return uVar2;
}
|
|
17,517
|
heap_rkey
|
eloqsql/storage/heap/hp_rkey.c
|
int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function find_flag)
{
uchar *pos;
HP_SHARE *share= info->s;
HP_KEYDEF *keyinfo= share->keydef + inx;
DBUG_ENTER("heap_rkey");
DBUG_PRINT("enter",("info: %p inx: %d", info, inx));
if ((uint) inx >= share->keys)
{
DBUG_RETURN(my_errno= HA_ERR_WRONG_INDEX);
}
info->lastinx= inx;
info->current_record= (ulong) ~0L; /* For heap_rrnd() */
info->key_version= info->s->key_version;
if (keyinfo->algorithm == HA_KEY_ALG_BTREE)
{
heap_rb_param custom_arg;
custom_arg.keyseg= info->s->keydef[inx].seg;
custom_arg.key_length= info->lastkey_len=
hp_rb_pack_key(keyinfo, (uchar*) info->lastkey,
(uchar*) key, keypart_map);
custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME;
/* for next rkey() after deletion */
if (find_flag == HA_READ_AFTER_KEY)
info->last_find_flag= HA_READ_KEY_OR_NEXT;
else if (find_flag == HA_READ_BEFORE_KEY)
info->last_find_flag= HA_READ_KEY_OR_PREV;
else
info->last_find_flag= find_flag;
if (!(pos= tree_search_key(&keyinfo->rb_tree, info->lastkey, info->parents,
&info->last_pos, find_flag, &custom_arg)))
{
info->update= HA_STATE_NO_KEY;
DBUG_RETURN(my_errno= HA_ERR_KEY_NOT_FOUND);
}
memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), sizeof(uchar*));
info->current_ptr= pos;
}
else
{
if (!(pos= hp_search(info, share->keydef + inx, key, 0)))
{
info->update= HA_STATE_NO_KEY;
DBUG_RETURN(my_errno);
}
if ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART_KEY)) != HA_NOSAME)
memcpy(info->lastkey, key, (size_t) keyinfo->length);
}
memcpy(record, pos, (size_t) share->reclength);
info->update= HA_STATE_AKTIV;
DBUG_RETURN(0);
}
|
O3
|
c
|
heap_rkey:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %r14
cmpl %edx, 0x100(%r14)
jbe 0x280aa
movq %rcx, %r13
movq %rdi, %rbx
movq %rsi, -0x30(%rbp)
movslq %edx, %rax
imulq $0x368, %rax, %rsi # imm = 0x368
movq 0x98(%r14), %r15
addq %rsi, %r15
movl %eax, 0x28(%rdi)
movq $-0x1, 0x18(%rdi)
movl 0xec(%r14), %eax
movl %eax, 0x268(%rdi)
cmpb $0x1, 0xc(%r15)
jne 0x280bf
movl %r9d, %r12d
movq 0x98(%r14), %rax
movq 0x10(%rax,%rsi), %rax
movq %rax, -0x40(%rbp)
movq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r8, %rcx
callq 0x268fd
movl %eax, 0x270(%rbx)
movl %eax, -0x38(%rbp)
movl $0x5, -0x34(%rbp)
cmpl $0x3, %r12d
je 0x2810b
cmpl $0x4, %r12d
jne 0x28112
movl $0x2, %eax
jmp 0x28115
callq 0x2a59a
movl $0x7c, (%rax)
movl $0x7c, %eax
jmp 0x2818e
addq 0x98(%r14), %rsi
movq %rbx, %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x26b06
testq %rax, %rax
je 0x280f8
movq %rax, %r12
movl (%r15), %eax
andl $0x41, %eax
cmpl $0x1, %eax
je 0x28159
movq 0x40(%rbx), %rdi
movl 0x8(%r15), %edx
movq %r13, %rsi
callq 0x24210
jmp 0x28159
movl $0x40, 0x38(%rbx)
callq 0x2a59a
movl (%rax), %eax
jmp 0x2818e
movl $0x1, %eax
jmp 0x28115
movl %r12d, %eax
movl %eax, 0x50(%rbx)
leaq 0xb8(%r15), %rdi
movq 0x40(%rbx), %rsi
leaq 0x58(%rbx), %rdx
leaq 0x260(%rbx), %rcx
leaq -0x40(%rbp), %r9
movl %r12d, %r8d
callq 0x2d4d1
testq %rax, %rax
je 0x28177
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq *0x360(%r15)
movl %eax, %eax
movq (%r12,%rax), %r12
movq %r12, 0x8(%rbx)
movq -0x30(%rbp), %rdi
movl 0xf4(%r14), %edx
movq %r12, %rsi
callq 0x24210
movl $0x2, 0x38(%rbx)
xorl %eax, %eax
jmp 0x2818e
movl $0x40, 0x38(%rbx)
callq 0x2a59a
movl $0x78, (%rax)
movl $0x78, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
heap_rkey:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, [rdi]
cmp [r14+100h], edx
jbe loc_280AA
mov r13, rcx
mov rbx, rdi
mov [rbp+var_30], rsi
movsxd rax, edx
imul rsi, rax, 368h
mov r15, [r14+98h]
add r15, rsi
mov [rdi+28h], eax
mov qword ptr [rdi+18h], 0FFFFFFFFFFFFFFFFh
mov eax, [r14+0ECh]
mov [rdi+268h], eax
cmp byte ptr [r15+0Ch], 1
jnz short loc_280BF
mov r12d, r9d
mov rax, [r14+98h]
mov rax, [rax+rsi+10h]
mov [rbp+var_40], rax
mov rsi, [rbx+40h]
mov rdi, r15
mov rdx, r13
mov rcx, r8
call hp_rb_pack_key
mov [rbx+270h], eax
mov [rbp+var_38], eax
mov [rbp+var_34], 5
cmp r12d, 3
jz short loc_2810B
cmp r12d, 4
jnz short loc_28112
mov eax, 2
jmp short loc_28115
loc_280AA:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
mov eax, 7Ch ; '|'
jmp loc_2818E
loc_280BF:
add rsi, [r14+98h]
mov rdi, rbx
mov rdx, r13
xor ecx, ecx
call hp_search
test rax, rax
jz short loc_280F8
mov r12, rax
mov eax, [r15]
and eax, 41h
cmp eax, 1
jz short loc_28159
mov rdi, [rbx+40h]
mov edx, [r15+8]
mov rsi, r13
call _memcpy
jmp short loc_28159
loc_280F8:
mov dword ptr [rbx+38h], 40h ; '@'
call _my_thread_var
mov eax, [rax]
jmp loc_2818E
loc_2810B:
mov eax, 1
jmp short loc_28115
loc_28112:
mov eax, r12d
loc_28115:
mov [rbx+50h], eax
lea rdi, [r15+0B8h]
mov rsi, [rbx+40h]
lea rdx, [rbx+58h]
lea rcx, [rbx+260h]
lea r9, [rbp+var_40]
mov r8d, r12d
call tree_search_key
test rax, rax
jz short loc_28177
mov r12, rax
mov rdi, r15
mov rsi, rax
call qword ptr [r15+360h]
mov eax, eax
mov r12, [r12+rax]
mov [rbx+8], r12
loc_28159:
mov rdi, [rbp+var_30]
mov edx, [r14+0F4h]
mov rsi, r12
call _memcpy
mov dword ptr [rbx+38h], 2
xor eax, eax
jmp short loc_2818E
loc_28177:
mov dword ptr [rbx+38h], 40h ; '@'
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov eax, 78h ; 'x'
loc_2818E:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long heap_rkey(long long *a1, long long a2, unsigned int a3, char *a4, unsigned long long a5, unsigned int a6)
{
long long v6; // r14
long long v8; // rsi
long long v9; // r15
unsigned int v11; // eax
int v12; // eax
unsigned long long v14; // rsi
long long v15; // rax
long long v16; // r12
long long v17; // rsi
long long v18; // rax
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
long long v23; // [rsp+0h] [rbp-40h] BYREF
long long v24; // [rsp+8h] [rbp-38h]
long long v25; // [rsp+10h] [rbp-30h]
v6 = *a1;
if ( *(_DWORD *)(*a1 + 256) <= a3 )
{
*(_DWORD *)my_thread_var(a1, a2) = 124;
return 124LL;
}
v25 = a2;
v8 = 872LL * (int)a3;
v9 = v8 + *(_QWORD *)(v6 + 152);
*((_DWORD *)a1 + 10) = a3;
a1[3] = -1LL;
*((_DWORD *)a1 + 154) = *(_DWORD *)(v6 + 236);
if ( *(_BYTE *)(v9 + 12) != 1 )
{
v14 = *(_QWORD *)(v6 + 152) + v8;
v15 = hp_search(a1, v14, a4, 0);
if ( !v15 )
{
*((_DWORD *)a1 + 14) = 64;
return *(unsigned int *)my_thread_var(a1, v14);
}
v16 = v15;
if ( (*(_DWORD *)v9 & 0x41) != 1 )
memcpy(a1[8], a4, *(unsigned int *)(v9 + 8));
goto LABEL_15;
}
v23 = *(_QWORD *)(*(_QWORD *)(v6 + 152) + v8 + 16);
v11 = hp_rb_pack_key(v9, (char *)a1[8], a4, a5);
*((_DWORD *)a1 + 156) = v11;
v24 = v11 | 0x500000000LL;
if ( a6 == 3 )
{
v12 = 1;
}
else if ( a6 == 4 )
{
v12 = 2;
}
else
{
v12 = a6;
}
*((_DWORD *)a1 + 20) = v12;
v17 = a1[8];
v18 = ((long long ( *)(long long, long long, long long *, long long *, _QWORD, long long *))tree_search_key)(
v9 + 184,
v17,
a1 + 11,
a1 + 76,
a6,
&v23);
if ( v18 )
{
v16 = *(_QWORD *)(v18
+ (*(unsigned int ( **)(long long, long long, long long, long long, long long, long long, long long, long long, long long))(v9 + 864))(
v9,
v18,
v19,
v20,
v21,
v22,
v23,
v24,
v25));
a1[1] = v16;
LABEL_15:
memcpy(v25, v16, *(unsigned int *)(v6 + 244));
*((_DWORD *)a1 + 14) = 2;
return 0LL;
}
*((_DWORD *)a1 + 14) = 64;
*(_DWORD *)my_thread_var(v9 + 184, v17) = 120;
return 120LL;
}
|
heap_rkey:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,qword ptr [RDI]
CMP dword ptr [R14 + 0x100],EDX
JBE 0x001280aa
MOV R13,RCX
MOV RBX,RDI
MOV qword ptr [RBP + -0x30],RSI
MOVSXD RAX,EDX
IMUL RSI,RAX,0x368
MOV R15,qword ptr [R14 + 0x98]
ADD R15,RSI
MOV dword ptr [RDI + 0x28],EAX
MOV qword ptr [RDI + 0x18],-0x1
MOV EAX,dword ptr [R14 + 0xec]
MOV dword ptr [RDI + 0x268],EAX
CMP byte ptr [R15 + 0xc],0x1
JNZ 0x001280bf
MOV R12D,R9D
MOV RAX,qword ptr [R14 + 0x98]
MOV RAX,qword ptr [RAX + RSI*0x1 + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RSI,qword ptr [RBX + 0x40]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R8
CALL 0x001268fd
MOV dword ptr [RBX + 0x270],EAX
MOV dword ptr [RBP + -0x38],EAX
MOV dword ptr [RBP + -0x34],0x5
CMP R12D,0x3
JZ 0x0012810b
CMP R12D,0x4
JNZ 0x00128112
MOV EAX,0x2
JMP 0x00128115
LAB_001280aa:
CALL 0x0012a59a
MOV dword ptr [RAX],0x7c
MOV EAX,0x7c
JMP 0x0012818e
LAB_001280bf:
ADD RSI,qword ptr [R14 + 0x98]
MOV RDI,RBX
MOV RDX,R13
XOR ECX,ECX
CALL 0x00126b06
TEST RAX,RAX
JZ 0x001280f8
MOV R12,RAX
MOV EAX,dword ptr [R15]
AND EAX,0x41
CMP EAX,0x1
JZ 0x00128159
MOV RDI,qword ptr [RBX + 0x40]
MOV EDX,dword ptr [R15 + 0x8]
MOV RSI,R13
CALL 0x00124210
JMP 0x00128159
LAB_001280f8:
MOV dword ptr [RBX + 0x38],0x40
CALL 0x0012a59a
MOV EAX,dword ptr [RAX]
JMP 0x0012818e
LAB_0012810b:
MOV EAX,0x1
JMP 0x00128115
LAB_00128112:
MOV EAX,R12D
LAB_00128115:
MOV dword ptr [RBX + 0x50],EAX
LEA RDI,[R15 + 0xb8]
MOV RSI,qword ptr [RBX + 0x40]
LEA RDX,[RBX + 0x58]
LEA RCX,[RBX + 0x260]
LEA R9,[RBP + -0x40]
MOV R8D,R12D
CALL 0x0012d4d1
TEST RAX,RAX
JZ 0x00128177
MOV R12,RAX
MOV RDI,R15
MOV RSI,RAX
CALL qword ptr [R15 + 0x360]
MOV EAX,EAX
MOV R12,qword ptr [R12 + RAX*0x1]
MOV qword ptr [RBX + 0x8],R12
LAB_00128159:
MOV RDI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [R14 + 0xf4]
MOV RSI,R12
CALL 0x00124210
MOV dword ptr [RBX + 0x38],0x2
XOR EAX,EAX
JMP 0x0012818e
LAB_00128177:
MOV dword ptr [RBX + 0x38],0x40
CALL 0x0012a59a
MOV dword ptr [RAX],0x78
MOV EAX,0x78
LAB_0012818e:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
heap_rkey(long *param_1,void *param_2,uint param_3,void *param_4,int8 param_5,int param_6)
{
long lVar1;
int iVar2;
uint uVar3;
int4 uVar4;
void *__src;
int4 *puVar5;
long lVar6;
uint *puVar7;
int8 local_48;
int4 local_40;
int4 local_3c;
void *local_38;
lVar1 = *param_1;
if (param_3 < *(uint *)(lVar1 + 0x100)) {
lVar6 = (long)(int)param_3 * 0x368;
puVar7 = (uint *)(*(long *)(lVar1 + 0x98) + lVar6);
*(uint *)(param_1 + 5) = param_3;
param_1[3] = -1;
*(int4 *)(param_1 + 0x4d) = *(int4 *)(lVar1 + 0xec);
local_38 = param_2;
if ((char)puVar7[3] == '\x01') {
local_48 = *(int8 *)(*(long *)(lVar1 + 0x98) + 0x10 + lVar6);
local_40 = hp_rb_pack_key(puVar7,param_1[8],param_4,param_5);
*(int4 *)(param_1 + 0x4e) = local_40;
local_3c = 5;
if (param_6 == 3) {
iVar2 = 1;
}
else {
iVar2 = param_6;
if (param_6 == 4) {
iVar2 = 2;
}
}
*(int *)(param_1 + 10) = iVar2;
lVar6 = tree_search_key(puVar7 + 0x2e,param_1[8],param_1 + 0xb,param_1 + 0x4c,param_6,
&local_48);
if (lVar6 == 0) {
*(int4 *)(param_1 + 7) = 0x40;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x78;
return 0x78;
}
uVar3 = (**(code **)(puVar7 + 0xd8))(puVar7,lVar6);
__src = *(void **)(lVar6 + (ulong)uVar3);
param_1[1] = (long)__src;
}
else {
__src = (void *)hp_search(param_1,lVar6 + *(long *)(lVar1 + 0x98),param_4,0);
if (__src == (void *)0x0) {
*(int4 *)(param_1 + 7) = 0x40;
puVar5 = (int4 *)_my_thread_var();
return *puVar5;
}
if ((*puVar7 & 0x41) != 1) {
memcpy((void *)param_1[8],param_4,(ulong)puVar7[2]);
}
}
memcpy(local_38,__src,(ulong)*(uint *)(lVar1 + 0xf4));
*(int4 *)(param_1 + 7) = 2;
uVar4 = 0;
}
else {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7c;
uVar4 = 0x7c;
}
return uVar4;
}
|
|
17,518
|
mysql_load_plugin_v
|
eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c
|
struct st_mysql_client_plugin * STDCALL
mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
int argc, va_list args)
{
const char *errmsg;
#ifdef _WIN32
char errbuf[1024];
#endif
char dlpath[FN_REFLEN+1];
void *sym, *dlhandle = NULL;
struct st_mysql_client_plugin *plugin;
char *env_plugin_dir= getenv("MARIADB_PLUGIN_DIR");
CLEAR_CLIENT_ERROR(mysql);
if (is_not_initialized(mysql, name))
return NULL;
pthread_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */
if (type >= 0 && find_plugin(name, type))
{
errmsg= "it is already loaded";
goto err;
}
/* Compile dll path */
#ifndef WIN32
snprintf(dlpath, sizeof(dlpath) - 1, "%s/%s%s",
mysql->options.extension && mysql->options.extension->plugin_dir ?
mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir :
MARIADB_PLUGINDIR, name, SO_EXT);
#else
{
char *p= (mysql->options.extension && mysql->options.extension->plugin_dir) ?
mysql->options.extension->plugin_dir : env_plugin_dir;
snprintf(dlpath, sizeof(dlpath), "%s%s%s%s", p ? p : "", p ? "\\" : "", name, SO_EXT);
}
#endif
if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\"))
{
errmsg= "invalid plugin name";
goto err;
}
/* Open new dll handle */
if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW)))
{
#ifdef _WIN32
char winmsg[255];
size_t len;
winmsg[0] = 0;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
winmsg, 255, NULL);
len= strlen(winmsg);
while (len > 0 && (winmsg[len - 1] == '\n' || winmsg[len - 1] == '\r'))
len--;
if (len)
winmsg[len] = 0;
snprintf(errbuf, sizeof(errbuf), "%s Library path is '%s'", winmsg, dlpath);
errmsg= errbuf;
#else
errmsg= dlerror();
#endif
goto err;
}
if (!(sym= dlsym(dlhandle, plugin_declarations_sym)))
{
errmsg= "not a plugin";
(void)dlclose(dlhandle);
goto err;
}
plugin= (struct st_mysql_client_plugin*)sym;
if (type >=0 && type != plugin->type)
{
errmsg= "type mismatch";
goto err;
}
if (strcmp(name, plugin->name))
{
errmsg= "name mismatch";
goto err;
}
if (type < 0 && find_plugin(name, plugin->type))
{
errmsg= "it is already loaded";
goto err;
}
plugin= add_plugin(mysql, plugin, dlhandle, argc, args);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return plugin;
err:
if (dlhandle)
dlclose(dlhandle);
pthread_mutex_unlock(&LOCK_load_client_plugin);
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN,
ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg);
return NULL;
}
|
O3
|
c
|
mysql_load_plugin_v:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %r8, -0x258(%rbp)
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x8a8b4(%rip), %rdi # 0x10f67a
callq 0x5f8b0
movq %rax, %r15
movl $0x0, 0x90(%r14)
movl $0x30303030, 0x297(%r14) # imm = 0x30303030
movw $0x30, 0x29b(%r14)
movb $0x0, 0x97(%r14)
movq 0x2a0(%r14), %rax
testq %rax, %rax
je 0x84e09
movl $0x0, 0x4(%rax)
cmpb $0x0, 0x3db070(%rip) # 0x45fe80
je 0x84e3f
leaq 0x3db06f(%rip), %rdi # 0x45fe88
callq 0x5f2e0
testl %r13d, %r13d
js 0x84e71
movq %rbx, %rdi
movl %r13d, %esi
callq 0x84d1b
testq %rax, %rax
je 0x84e71
leaq 0x8a853(%rip), %r15 # 0x10f68d
jmp 0x84f7b
leaq 0x3600da(%rip), %rax # 0x3e4f20
movq (%rax), %rdx
leaq 0x3600e0(%rip), %rax # 0x3e4f30
movq 0x1d8(%rax), %rcx
leaq 0x8a93f(%rip), %r9 # 0x10f79d
xorl %r12d, %r12d
movq %r14, %rdi
movl $0x80b, %esi # imm = 0x80B
movq %rbx, %r8
jmp 0x84fb0
movq 0x480(%r14), %rax
testq %rax, %rax
je 0x84e85
movq (%rax), %r9
testq %r9, %r9
jne 0x84e93
testq %r15, %r15
leaq 0x8a81b(%rip), %r9 # 0x10f6aa
cmovneq %r15, %r9
leaq 0x8a82e(%rip), %r10 # 0x10f6c8
leaq 0x8a801(%rip), %r8 # 0x10f6a2
leaq -0x240(%rbp), %rdi
movl $0x200, %esi # imm = 0x200
movl $0x201, %ecx # imm = 0x201
movl $0x1, %edx
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x5feb0
addq $0x10, %rsp
leaq 0x8a800(%rip), %rsi # 0x10f6cc
movq %rbx, %rdi
callq 0x5f640
testq %rax, %rax
je 0x84ee5
leaq 0x8a800(%rip), %r15 # 0x10f6e0
jmp 0x84f7b
leaq -0x240(%rbp), %rdi
movl $0x2, %esi
callq 0x5fa80
testq %rax, %rax
je 0x84f4a
movl %r12d, -0x24c(%rbp)
leaq 0x8a7eb(%rip), %rsi # 0x10f6f4
movq %rax, %r12
movq %rax, %rdi
callq 0x5f1e0
testq %rax, %rax
je 0x84f54
movq %rax, %r15
movq %r12, -0x248(%rbp)
testl %r13d, %r13d
js 0x84f2d
cmpl %r13d, (%r15)
jne 0x84f65
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x5fa10
testl %eax, %eax
je 0x84fdb
leaq 0x8a7e9(%rip), %r15 # 0x10f731
jmp 0x84f6c
callq 0x5f3c0
movq %rax, %r15
jmp 0x84f7b
movq %r12, %rdi
callq 0x5fce0
leaq 0x8a7b3(%rip), %r15 # 0x10f716
jmp 0x84f73
leaq 0x8a7b7(%rip), %r15 # 0x10f723
movq -0x248(%rbp), %r12
movq %r12, %rdi
callq 0x5fce0
leaq 0x3daf06(%rip), %rdi # 0x45fe88
callq 0x5f290
leaq 0x35ff92(%rip), %rax # 0x3e4f20
movq (%rax), %rdx
leaq 0x35ff98(%rip), %rax # 0x3e4f30
movq 0x1d8(%rax), %rcx
xorl %r12d, %r12d
movq %r14, %rdi
movl $0x80b, %esi # imm = 0x80B
movq %rbx, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x72dd1
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8502c
movq %r12, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
js 0x85010
movq %r14, %rdi
movq %r15, %rsi
movq -0x248(%rbp), %rdx
movl -0x24c(%rbp), %ecx
movq -0x258(%rbp), %r8
callq 0x84a8c
movq %rax, %r12
leaq 0x3dae7f(%rip), %rdi # 0x45fe88
callq 0x5f290
jmp 0x84fb7
movl (%r15), %esi
movq %rbx, %rdi
callq 0x84d1b
testq %rax, %rax
je 0x84fe0
leaq 0x8a666(%rip), %r15 # 0x10f68d
jmp 0x84f6c
callq 0x5f320
|
mysql_load_plugin_v:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 238h
mov [rbp+var_258], r8
mov r12d, ecx
mov r13d, edx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rdi, aMariadbPluginD; "MARIADB_PLUGIN_DIR"
call _getenv
mov r15, rax
mov dword ptr [r14+90h], 0
mov dword ptr [r14+297h], 30303030h
mov word ptr [r14+29Bh], 30h ; '0'
mov byte ptr [r14+97h], 0
mov rax, [r14+2A0h]
test rax, rax
jz short loc_84E09
mov dword ptr [rax+4], 0
loc_84E09:
cmp cs:initialized, 0
jz short loc_84E3F
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_lock
test r13d, r13d
js short loc_84E71
mov rdi, rbx
mov esi, r13d
call find_plugin
test rax, rax
jz short loc_84E71
lea r15, aItIsAlreadyLoa; "it is already loaded"
jmp loc_84F7B
loc_84E3F:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
lea r9, aNotInitialized; "not initialized"
xor r12d, r12d
mov rdi, r14
mov esi, 80Bh
mov r8, rbx
jmp loc_84FB0
loc_84E71:
mov rax, [r14+480h]
test rax, rax
jz short loc_84E85
mov r9, [rax]
test r9, r9
jnz short loc_84E93
loc_84E85:
test r15, r15
lea r9, aHomeMonoInstal; "/home/mono/install/lib/plugin"
cmovnz r9, r15
loc_84E93:
lea r10, aSo; ".so"
lea r8, aSSS; "%s/%s%s"
lea rdi, [rbp+var_240]
mov esi, 200h
mov ecx, 201h
mov edx, 1
xor eax, eax
push r10
push rbx
call ___snprintf_chk
add rsp, 10h
lea rsi, asc_10F6CC; "()[]!@#$%^&/*;.,'?\\"
mov rdi, rbx
call _strpbrk
test rax, rax
jz short loc_84EE5
lea r15, aInvalidPluginN; "invalid plugin name"
jmp loc_84F7B
loc_84EE5:
lea rdi, [rbp+var_240]
mov esi, 2
call _dlopen
test rax, rax
jz short loc_84F4A
mov [rbp+var_24C], r12d
lea rsi, aMysqlClientPlu_1; "_mysql_client_plugin_declaration_"
mov r12, rax
mov rdi, rax
call _dlsym
test rax, rax
jz short loc_84F54
mov r15, rax
mov [rbp+var_248], r12
test r13d, r13d
js short loc_84F2D
cmp [r15], r13d
jnz short loc_84F65
loc_84F2D:
mov rsi, [r15+8]
mov rdi, rbx
call _strcmp
test eax, eax
jz loc_84FDB
lea r15, aNameMismatch; "name mismatch"
jmp short loc_84F6C
loc_84F4A:
call _dlerror
mov r15, rax
jmp short loc_84F7B
loc_84F54:
mov rdi, r12
call _dlclose
lea r15, aNotAPlugin; "not a plugin"
jmp short loc_84F73
loc_84F65:
lea r15, aTypeMismatch; "type mismatch"
loc_84F6C:
mov r12, [rbp+var_248]
loc_84F73:
mov rdi, r12
call _dlclose
loc_84F7B:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
xor r12d, r12d
mov rdi, r14
mov esi, 80Bh
mov r8, rbx
mov r9, r15
loc_84FB0:
xor eax, eax
call my_set_error
loc_84FB7:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_8502C
mov rax, r12
add rsp, 238h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_84FDB:
test r13d, r13d
js short loc_85010
loc_84FE0:
mov rdi, r14
mov rsi, r15
mov rdx, [rbp+var_248]
mov ecx, [rbp+var_24C]
mov r8, [rbp+var_258]
call add_plugin
mov r12, rax
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
jmp short loc_84FB7
loc_85010:
mov esi, [r15]
mov rdi, rbx
call find_plugin
test rax, rax
jz short loc_84FE0
lea r15, aItIsAlreadyLoa; "it is already loaded"
jmp loc_84F6C
loc_8502C:
call ___stack_chk_fail
|
long long mysql_load_plugin_v(long long a1, const char *a2, int a3, unsigned int a4, long long a5)
{
long long v7; // r15
long long v8; // rax
const char *v9; // r15
long long v10; // r12
const char **v11; // rax
const char *v12; // r9
double v13; // xmm0_8
long long v14; // rax
long long v15; // r12
long long v16; // rax
int *v17; // r15
unsigned int v20; // [rsp+14h] [rbp-24Ch]
_BYTE v21[528]; // [rsp+20h] [rbp-240h] BYREF
unsigned long long v22; // [rsp+230h] [rbp-30h]
v22 = __readfsqword(0x28u);
v7 = getenv("MARIADB_PLUGIN_DIR");
*(_DWORD *)(a1 + 144) = 0;
strcpy((char *)(a1 + 663), "00000");
*(_BYTE *)(a1 + 151) = 0;
v8 = *(_QWORD *)(a1 + 672);
if ( v8 )
*(_DWORD *)(v8 + 4) = 0;
if ( initialized )
{
pthread_mutex_lock(&LOCK_load_client_plugin);
if ( a3 >= 0 && find_plugin((long long)a2, a3) )
{
v9 = "it is already loaded";
}
else
{
v11 = *(const char ***)(a1 + 1152);
if ( !v11 || (v12 = *v11) == 0LL )
{
v12 = "/home/mono/install/lib/plugin";
if ( v7 )
v12 = (const char *)v7;
}
v13 = __snprintf_chk(v21, 512LL, 1LL, 513LL, "%s/%s%s", v12, a2, ".so");
if ( strpbrk(a2, "()[]!@#$%^&/*;.,'?\\", v13) )
{
v9 = "invalid plugin name";
}
else
{
v14 = dlopen(v21, 2LL);
if ( v14 )
{
v20 = a4;
v15 = v14;
v16 = dlsym(v14, "_mysql_client_plugin_declaration_");
if ( v16 )
{
v17 = (int *)v16;
if ( a3 < 0 || *(_DWORD *)v16 == a3 )
{
if ( !(unsigned int)strcmp(a2, *(_QWORD *)(v16 + 8)) )
{
if ( a3 >= 0 || !find_plugin((long long)a2, *v17) )
{
v10 = add_plugin(a1, (long long)v17, v15, v20, a5);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return v10;
}
v9 = "it is already loaded";
}
else
{
v9 = "name mismatch";
}
}
else
{
v9 = "type mismatch";
}
}
else
{
dlclose(v15);
v9 = "not a plugin";
}
dlclose(v15);
}
else
{
v9 = (const char *)dlerror();
}
}
}
pthread_mutex_unlock(&LOCK_load_client_plugin);
v10 = 0LL;
my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, v9);
}
else
{
v10 = 0LL;
my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, "not initialized");
}
return v10;
}
|
mysql_load_plugin_v:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x238
MOV qword ptr [RBP + -0x258],R8
MOV R12D,ECX
MOV R13D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x20f67a]
CALL 0x0015f8b0
MOV R15,RAX
MOV dword ptr [R14 + 0x90],0x0
MOV dword ptr [R14 + 0x297],0x30303030
MOV word ptr [R14 + 0x29b],0x30
MOV byte ptr [R14 + 0x97],0x0
MOV RAX,qword ptr [R14 + 0x2a0]
TEST RAX,RAX
JZ 0x00184e09
MOV dword ptr [RAX + 0x4],0x0
LAB_00184e09:
CMP byte ptr [0x0055fe80],0x0
JZ 0x00184e3f
LEA RDI,[0x55fe88]
CALL 0x0015f2e0
TEST R13D,R13D
JS 0x00184e71
MOV RDI,RBX
MOV ESI,R13D
CALL 0x00184d1b
TEST RAX,RAX
JZ 0x00184e71
LEA R15,[0x20f68d]
JMP 0x00184f7b
LAB_00184e3f:
LEA RAX,[0x4e4f20]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x4e4f30]
MOV RCX,qword ptr [RAX + 0x1d8]
LEA R9,[0x20f79d]
XOR R12D,R12D
MOV RDI,R14
MOV ESI,0x80b
MOV R8,RBX
JMP 0x00184fb0
LAB_00184e71:
MOV RAX,qword ptr [R14 + 0x480]
TEST RAX,RAX
JZ 0x00184e85
MOV R9,qword ptr [RAX]
TEST R9,R9
JNZ 0x00184e93
LAB_00184e85:
TEST R15,R15
LEA R9,[0x20f6aa]
CMOVNZ R9,R15
LAB_00184e93:
LEA R10,[0x20f6c8]
LEA R8,[0x20f6a2]
LEA RDI,[RBP + -0x240]
MOV ESI,0x200
MOV ECX,0x201
MOV EDX,0x1
XOR EAX,EAX
PUSH R10
PUSH RBX
CALL 0x0015feb0
ADD RSP,0x10
LEA RSI,[0x20f6cc]
MOV RDI,RBX
CALL 0x0015f640
TEST RAX,RAX
JZ 0x00184ee5
LEA R15,[0x20f6e0]
JMP 0x00184f7b
LAB_00184ee5:
LEA RDI,[RBP + -0x240]
MOV ESI,0x2
CALL 0x0015fa80
TEST RAX,RAX
JZ 0x00184f4a
MOV dword ptr [RBP + -0x24c],R12D
LEA RSI,[0x20f6f4]
MOV R12,RAX
MOV RDI,RAX
CALL 0x0015f1e0
TEST RAX,RAX
JZ 0x00184f54
MOV R15,RAX
MOV qword ptr [RBP + -0x248],R12
TEST R13D,R13D
JS 0x00184f2d
CMP dword ptr [R15],R13D
JNZ 0x00184f65
LAB_00184f2d:
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x0015fa10
TEST EAX,EAX
JZ 0x00184fdb
LEA R15,[0x20f731]
JMP 0x00184f6c
LAB_00184f4a:
CALL 0x0015f3c0
MOV R15,RAX
JMP 0x00184f7b
LAB_00184f54:
MOV RDI,R12
CALL 0x0015fce0
LEA R15,[0x20f716]
JMP 0x00184f73
LAB_00184f65:
LEA R15,[0x20f723]
LAB_00184f6c:
MOV R12,qword ptr [RBP + -0x248]
LAB_00184f73:
MOV RDI,R12
CALL 0x0015fce0
LAB_00184f7b:
LEA RDI,[0x55fe88]
CALL 0x0015f290
LEA RAX,[0x4e4f20]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x4e4f30]
MOV RCX,qword ptr [RAX + 0x1d8]
XOR R12D,R12D
MOV RDI,R14
MOV ESI,0x80b
MOV R8,RBX
MOV R9,R15
LAB_00184fb0:
XOR EAX,EAX
CALL 0x00172dd1
LAB_00184fb7:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018502c
MOV RAX,R12
ADD RSP,0x238
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00184fdb:
TEST R13D,R13D
JS 0x00185010
LAB_00184fe0:
MOV RDI,R14
MOV RSI,R15
MOV RDX,qword ptr [RBP + -0x248]
MOV ECX,dword ptr [RBP + -0x24c]
MOV R8,qword ptr [RBP + -0x258]
CALL 0x00184a8c
MOV R12,RAX
LEA RDI,[0x55fe88]
CALL 0x0015f290
JMP 0x00184fb7
LAB_00185010:
MOV ESI,dword ptr [R15]
MOV RDI,RBX
CALL 0x00184d1b
TEST RAX,RAX
JZ 0x00184fe0
LEA R15,[0x20f68d]
JMP 0x00184f6c
LAB_0018502c:
CALL 0x0015f320
|
int8
mysql_load_plugin_v(long param_1,char *param_2,int param_3,int4 param_4,int8 param_5)
{
int iVar1;
char *pcVar2;
long lVar3;
int *piVar4;
int8 uVar5;
long lVar6;
char *pcVar7;
long in_FS_OFFSET;
int1 local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar2 = getenv("MARIADB_PLUGIN_DIR");
*(int4 *)(param_1 + 0x90) = 0;
*(int4 *)(param_1 + 0x297) = 0x30303030;
*(int2 *)(param_1 + 0x29b) = 0x30;
*(int1 *)(param_1 + 0x97) = 0;
if (*(long *)(param_1 + 0x2a0) != 0) {
*(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0;
}
if (initialized == '\0') {
pcVar2 = "not initialized";
}
else {
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
if ((param_3 < 0) || (lVar3 = find_plugin(param_2,param_3), lVar3 == 0)) {
if (((*(long **)(param_1 + 0x480) == (long *)0x0) ||
(pcVar7 = (char *)**(long **)(param_1 + 0x480), pcVar7 == (char *)0x0)) &&
(pcVar7 = "/home/mono/install/lib/plugin", pcVar2 != (char *)0x0)) {
pcVar7 = pcVar2;
}
__snprintf_chk(local_248,0x200,1,0x201,"%s/%s%s",pcVar7,param_2,&DAT_0020f6c8);
pcVar2 = strpbrk(param_2,"()[]!@#$%^&/*;.,\'?\\");
if (pcVar2 == (char *)0x0) {
lVar3 = dlopen(local_248,2);
if (lVar3 == 0) {
pcVar2 = (char *)dlerror();
}
else {
piVar4 = (int *)dlsym(lVar3,"_mysql_client_plugin_declaration_");
if (piVar4 == (int *)0x0) {
dlclose(lVar3);
pcVar2 = "not a plugin";
}
else if ((param_3 < 0) || (*piVar4 == param_3)) {
iVar1 = strcmp(param_2,*(char **)(piVar4 + 2));
if (iVar1 == 0) {
if ((-1 < param_3) || (lVar6 = find_plugin(param_2,*piVar4), lVar6 == 0)) {
uVar5 = add_plugin(param_1,piVar4,lVar3,param_4,param_5);
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
goto LAB_00184fb7;
}
pcVar2 = "it is already loaded";
}
else {
pcVar2 = "name mismatch";
}
}
else {
pcVar2 = "type mismatch";
}
dlclose(lVar3);
}
}
else {
pcVar2 = "invalid plugin name";
}
}
else {
pcVar2 = "it is already loaded";
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
}
uVar5 = 0;
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____004e5108,
param_2,pcVar2);
LAB_00184fb7:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar5;
}
|
|
17,519
|
ma_real_read
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
static ulong ma_real_read(NET *net, size_t *complen)
{
uchar *pos;
ssize_t length;
uint i;
ulong len=packet_error;
size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
NET_HEADER_SIZE);
*complen = 0;
net->reading_or_writing=1;
pos = net->buff + net->where_b; /* net->packet -4 */
for (i=0 ; i < 2 ; i++)
{
while (remain > 0)
{
/* First read is done with non blocking mode */
if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L)
{
len= packet_error;
net->error=2; /* Close socket */
goto end;
}
remain -= (ulong) length;
pos+= (ulong) length;
}
if (i == 0)
{ /* First parts is packet length */
ulong helping;
net->pkt_nr= net->buff[net->where_b + 3];
net->compress_pkt_nr= ++net->pkt_nr;
#ifdef HAVE_COMPRESS
if (net->compress)
{
/* complen is > 0 if package is really compressed */
*complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE]));
}
#endif
len=uint3korr(net->buff+net->where_b);
if (!len)
goto end;
helping = max(len,(ulong)*complen) + net->where_b;
/* The necessary size of net->buff */
if (helping >= net->max_packet)
{
if (net_realloc(net, helping))
{
len= packet_error; /* Return error */
goto end;
}
}
pos=net->buff + net->where_b;
remain = len;
}
}
end:
net->reading_or_writing=0;
return(len);
}
|
O0
|
c
|
ma_real_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x84(%rax), %edx
movl $0x4, %eax
movl $0x7, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jae 0x46c31
jmp 0x46a57
cmpq $0x0, -0x38(%rbp)
jbe 0x46ab2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x23800
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jg 0x46a95
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movb $0x2, 0x94(%rax)
jmp 0x46c33
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x46a57
cmpl $0x0, -0x24(%rbp)
jne 0x46c21
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movzbl 0x3(%rax,%rcx), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x46b4d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movzbl 0x4(%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x48(%rdx), %rdx
movzbl 0x5(%rcx,%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x48(%rdx), %rdx
movzbl 0x6(%rcx,%rdx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x48(%rdx), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x48(%rdx), %rdx
movzbl 0x2(%rcx,%rdx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x46ba7
jmp 0x46c33
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x46bbe
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x46bc9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x46c05
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x46cd0
cmpb $0x0, %al
je 0x46c03
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x30(%rbp)
jmp 0x46c33
jmp 0x46c05
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x46c23
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x46a4b
jmp 0x46c33
movq -0x8(%rbp), %rax
movb $0x0, 0x80(%rax)
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ma_real_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov eax, 0FFFFFFFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
movsx edx, byte ptr [rax+84h]
mov eax, 4
mov ecx, 7
cmp edx, 0
cmovnz eax, ecx
cdqe
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+80h], 1
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_18], rax
mov [rbp+var_24], 0
loc_46A4B:
cmp [rbp+var_24], 2
jnb loc_46C31
jmp short $+2
loc_46A57:
cmp [rbp+var_38], 0
jbe short loc_46AB2
mov rax, [rbp+var_8]
mov rdi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_38]
call ma_pvio_cache_read
mov [rbp+var_20], rax
cmp rax, 0
jg short loc_46A95
mov eax, 0FFFFFFFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov byte ptr [rax+94h], 2
jmp loc_46C33
loc_46A95:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
jmp short loc_46A57
loc_46AB2:
cmp [rbp+var_24], 0
jnz loc_46C21
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx+48h]
movzx ecx, byte ptr [rax+rcx+3]
mov rax, [rbp+var_8]
mov [rax+60h], ecx
mov rax, [rbp+var_8]
mov ecx, [rax+60h]
add ecx, 1
mov [rax+60h], ecx
mov rax, [rbp+var_8]
mov [rax+64h], ecx
mov rax, [rbp+var_8]
cmp byte ptr [rax+84h], 0
jz short loc_46B4D
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx+48h]
movzx eax, byte ptr [rax+rcx+4]
mov rcx, [rbp+var_8]
mov rcx, [rcx+8]
mov rdx, [rbp+var_8]
mov rdx, [rdx+48h]
movzx ecx, byte ptr [rcx+rdx+5]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_8]
mov rcx, [rcx+8]
mov rdx, [rbp+var_8]
mov rdx, [rdx+48h]
movzx ecx, byte ptr [rcx+rdx+6]
shl ecx, 10h
add eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_46B4D:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx+48h]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_8]
mov rcx, [rcx+8]
mov rdx, [rbp+var_8]
mov rdx, [rdx+48h]
movzx ecx, byte ptr [rcx+rdx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_8]
mov rcx, [rcx+8]
mov rdx, [rbp+var_8]
mov rdx, [rdx+48h]
movzx ecx, byte ptr [rcx+rdx+2]
shl ecx, 10h
add eax, ecx
mov eax, eax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_46BA7
jmp loc_46C33
loc_46BA7:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jbe short loc_46BBE
mov rax, [rbp+var_30]
mov [rbp+var_48], rax
jmp short loc_46BC9
loc_46BBE:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_48], rax
loc_46BC9:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_8]
cmp rax, [rcx+50h]
jb short loc_46C05
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_40]
call net_realloc
cmp al, 0
jz short loc_46C03
mov eax, 0FFFFFFFFh
mov [rbp+var_30], rax
jmp short loc_46C33
loc_46C03:
jmp short $+2
loc_46C05:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_46C21:
jmp short $+2
loc_46C23:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_46A4B
loc_46C31:
jmp short $+2
loc_46C33:
mov rax, [rbp+var_8]
mov byte ptr [rax+80h], 0
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
|
unsigned long long ma_real_read(long long a1, unsigned long long *a2)
{
int v2; // eax
int v3; // ecx
long long v4; // rdx
unsigned long long v6; // [rsp+8h] [rbp-48h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
unsigned long long v8; // [rsp+18h] [rbp-38h]
unsigned long long v9; // [rsp+20h] [rbp-30h]
unsigned int i; // [rsp+2Ch] [rbp-24h]
long long v11; // [rsp+30h] [rbp-20h]
long long v12; // [rsp+38h] [rbp-18h]
v9 = 0xFFFFFFFFLL;
v2 = 4;
if ( *(_BYTE *)(a1 + 132) )
v2 = 7;
v8 = v2;
*a2 = 0LL;
*(_BYTE *)(a1 + 128) = 1;
v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8);
for ( i = 0; i < 2; ++i )
{
while ( v8 )
{
v11 = ma_pvio_cache_read(*(_QWORD **)a1, v12, v8);
if ( v11 <= 0 )
{
v9 = 0xFFFFFFFFLL;
*(_BYTE *)(a1 + 148) = 2;
goto LABEL_21;
}
v8 -= v11;
v12 += v11;
}
if ( !i )
{
*(_DWORD *)(a1 + 96) = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 3LL);
v3 = *(_DWORD *)(a1 + 96) + 1;
*(_DWORD *)(a1 + 96) = v3;
*(_DWORD *)(a1 + 100) = v3;
if ( *(_BYTE *)(a1 + 132) )
*a2 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 6LL) << 16)
+ (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 5LL) << 8)
+ (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 4LL);
v4 = *(_QWORD *)(a1 + 72);
v9 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16)
+ (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8)
+ (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4);
if ( !((*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16)
+ (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8)
+ *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4)) )
break;
if ( v9 <= *a2 )
v6 = *a2;
else
v6 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16)
+ (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 1LL) << 8)
+ (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72));
v7 = *(_QWORD *)(a1 + 72) + v6;
if ( v7 >= *(_QWORD *)(a1 + 80) && (unsigned __int8)net_realloc(a1, v7) )
{
v9 = 0xFFFFFFFFLL;
break;
}
v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8);
v8 = v9;
}
}
LABEL_21:
*(_BYTE *)(a1 + 128) = 0;
return v9;
}
|
ma_real_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDX,byte ptr [RAX + 0x84]
MOV EAX,0x4
MOV ECX,0x7
CMP EDX,0x0
CMOVNZ EAX,ECX
CDQE
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x80],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x24],0x0
LAB_00146a4b:
CMP dword ptr [RBP + -0x24],0x2
JNC 0x00146c31
JMP 0x00146a57
LAB_00146a57:
CMP qword ptr [RBP + -0x38],0x0
JBE 0x00146ab2
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00123800
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JG 0x00146a95
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x94],0x2
JMP 0x00146c33
LAB_00146a95:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00146a57
LAB_00146ab2:
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00146c21
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x48]
MOVZX ECX,byte ptr [RAX + RCX*0x1 + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x60]
ADD ECX,0x1
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x64],ECX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x00146b4d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x48]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x48]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x5]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x48]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x6]
SHL ECX,0x10
ADD EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_00146b4d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x48]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x48]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x48]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00146ba7
JMP 0x00146c33
LAB_00146ba7:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JBE 0x00146bbe
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00146bc9
LAB_00146bbe:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_00146bc9:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x50]
JC 0x00146c05
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x00146cd0
CMP AL,0x0
JZ 0x00146c03
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00146c33
LAB_00146c03:
JMP 0x00146c05
LAB_00146c05:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_00146c21:
JMP 0x00146c23
LAB_00146c23:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00146a4b
LAB_00146c31:
JMP 0x00146c33
LAB_00146c33:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
ulong ma_real_read(int8 *param_1,ulong *param_2)
{
char cVar1;
int iVar2;
long lVar3;
ulong local_50;
ulong local_40;
ulong local_38;
uint local_2c;
long local_20;
local_38 = 0xffffffff;
iVar2 = 4;
if (*(char *)((long)param_1 + 0x84) != '\0') {
iVar2 = 7;
}
local_40 = (ulong)iVar2;
*param_2 = 0;
*(int1 *)(param_1 + 0x10) = 1;
local_20 = param_1[1] + param_1[9];
local_2c = 0;
do {
if (1 < local_2c) {
LAB_00146c33:
*(int1 *)(param_1 + 0x10) = 0;
return local_38;
}
for (; local_40 != 0; local_40 = local_40 - lVar3) {
lVar3 = ma_pvio_cache_read(*param_1,local_20,local_40);
if (lVar3 < 1) {
local_38 = 0xffffffff;
*(int1 *)((long)param_1 + 0x94) = 2;
goto LAB_00146c33;
}
local_20 = lVar3 + local_20;
}
if (local_2c == 0) {
*(uint *)(param_1 + 0xc) = (uint)*(byte *)(param_1[1] + 3 + param_1[9]);
iVar2 = *(int *)(param_1 + 0xc);
*(int *)(param_1 + 0xc) = iVar2 + 1;
*(int *)((long)param_1 + 100) = iVar2 + 1;
if (*(char *)((long)param_1 + 0x84) != '\0') {
*param_2 = (ulong)((uint)*(byte *)(param_1[1] + 4 + param_1[9]) +
(uint)*(byte *)(param_1[1] + 5 + param_1[9]) * 0x100 +
(uint)*(byte *)(param_1[1] + 6 + param_1[9]) * 0x10000);
}
local_40 = (ulong)((uint)*(byte *)(param_1[1] + param_1[9]) +
(uint)*(byte *)(param_1[1] + 1 + param_1[9]) * 0x100 +
(uint)*(byte *)(param_1[1] + 2 + param_1[9]) * 0x10000);
local_38 = local_40;
if (local_40 == 0) goto LAB_00146c33;
local_50 = local_40;
if (local_40 <= *param_2) {
local_50 = *param_2;
}
if (((ulong)param_1[10] <= local_50 + param_1[9]) &&
(cVar1 = net_realloc(param_1,local_50 + param_1[9]), cVar1 != '\0')) {
local_38 = 0xffffffff;
goto LAB_00146c33;
}
local_20 = param_1[1] + param_1[9];
}
local_2c = local_2c + 1;
} while( true );
}
|
|
17,520
|
ma_real_read
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
static ulong ma_real_read(NET *net, size_t *complen)
{
uchar *pos;
ssize_t length;
uint i;
ulong len=packet_error;
size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
NET_HEADER_SIZE);
*complen = 0;
net->reading_or_writing=1;
pos = net->buff + net->where_b; /* net->packet -4 */
for (i=0 ; i < 2 ; i++)
{
while (remain > 0)
{
/* First read is done with non blocking mode */
if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L)
{
len= packet_error;
net->error=2; /* Close socket */
goto end;
}
remain -= (ulong) length;
pos+= (ulong) length;
}
if (i == 0)
{ /* First parts is packet length */
ulong helping;
net->pkt_nr= net->buff[net->where_b + 3];
net->compress_pkt_nr= ++net->pkt_nr;
#ifdef HAVE_COMPRESS
if (net->compress)
{
/* complen is > 0 if package is really compressed */
*complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE]));
}
#endif
len=uint3korr(net->buff+net->where_b);
if (!len)
goto end;
helping = max(len,(ulong)*complen) + net->where_b;
/* The necessary size of net->buff */
if (helping >= net->max_packet)
{
if (net_realloc(net, helping))
{
len= packet_error; /* Return error */
goto end;
}
}
pos=net->buff + net->where_b;
remain = len;
}
}
end:
net->reading_or_writing=0;
return(len);
}
|
O3
|
c
|
ma_real_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpb $0x0, 0x84(%rdi)
setne %al
leaq (%rax,%rax,2), %r15
addq $0x4, %r15
movq %rsi, -0x30(%rbp)
movq $0x0, (%rsi)
movb $0x1, 0x80(%rdi)
movq 0x8(%rdi), %r12
addq 0x48(%rdi), %r12
movb $0x1, %r14b
movq (%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1d3e9
testq %rax, %rax
jle 0x31ad3
addq %rax, %r12
subq %rax, %r15
jne 0x319ee
testb $0x1, %r14b
je 0x31ae0
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %r12
movzbl 0x3(%rax,%r12), %ecx
incl %ecx
movl %ecx, 0x60(%rbx)
movl %ecx, 0x64(%rbx)
cmpb $0x0, 0x84(%rbx)
je 0x31a57
movzwl 0x4(%rax,%r12), %ecx
movzbl 0x6(%rax,%r12), %eax
shll $0x10, %eax
orq %rcx, %rax
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rax
movq 0x48(%rbx), %r12
movzwl (%rax,%r12), %ecx
movzbl 0x2(%rax,%r12), %r15d
shll $0x10, %r15d
orq %rcx, %r15
je 0x31af9
movq -0x30(%rbp), %rcx
movq (%rcx), %r14
cmpq %r14, %r15
cmovaq %r15, %r14
addq %r12, %r14
cmpq 0x50(%rbx), %r14
jb 0x31ac5
cmpq %r14, 0x58(%rbx)
jbe 0x31afe
addq $0xfff, %r14 # imm = 0xFFF
andq $-0x1000, %r14 # imm = 0xF000
leaq 0x7(%r14), %rsi
movq %rax, %rdi
callq 0x13730
testq %rax, %rax
je 0x31b25
movq %rax, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movq %r14, 0x50(%rbx)
movq %rax, %rcx
addq %r14, %rcx
movq %rcx, 0x10(%rbx)
movq 0x48(%rbx), %r12
addq %rax, %r12
xorl %r14d, %r14d
movq %r15, %r13
jmp 0x319ee
movb $0x2, 0x94(%rbx)
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movb $0x0, 0x80(%rbx)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x31ae0
movb $0x1, 0x94(%rbx)
movq (%rbx), %r8
movq 0x40(%r8), %rdi
leaq 0x16f4d(%rip), %rax # 0x48a60
movq (%rax), %rdx
movl $0x7e4, %esi # imm = 0x7E4
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
jmp 0x31ada
movb $0x1, 0x94(%rbx)
jmp 0x31ada
|
ma_real_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r13d, 0FFFFFFFFh
xor eax, eax
cmp byte ptr [rdi+84h], 0
setnz al
lea r15, [rax+rax*2]
add r15, 4
mov [rbp+var_30], rsi
mov qword ptr [rsi], 0
mov byte ptr [rdi+80h], 1
mov r12, [rdi+8]
add r12, [rdi+48h]
mov r14b, 1
loc_319EE:
mov rdi, [rbx]
mov rsi, r12
mov rdx, r15
call ma_pvio_cache_read
test rax, rax
jle loc_31AD3
add r12, rax
sub r15, rax
jnz short loc_319EE
test r14b, 1
jz loc_31AE0
mov rax, [rbx+8]
mov r12, [rbx+48h]
movzx ecx, byte ptr [rax+r12+3]
inc ecx
mov [rbx+60h], ecx
mov [rbx+64h], ecx
cmp byte ptr [rbx+84h], 0
jz short loc_31A57
movzx ecx, word ptr [rax+r12+4]
movzx eax, byte ptr [rax+r12+6]
shl eax, 10h
or rax, rcx
mov rcx, [rbp+var_30]
mov [rcx], rax
mov rax, [rbx+8]
mov r12, [rbx+48h]
loc_31A57:
movzx ecx, word ptr [rax+r12]
movzx r15d, byte ptr [rax+r12+2]
shl r15d, 10h
or r15, rcx
jz loc_31AF9
mov rcx, [rbp+var_30]
mov r14, [rcx]
cmp r15, r14
cmova r14, r15
add r14, r12
cmp r14, [rbx+50h]
jb short loc_31AC5
cmp [rbx+58h], r14
jbe short loc_31AFE
add r14, 0FFFh
and r14, 0FFFFFFFFFFFFF000h
lea rsi, [r14+7]
mov rdi, rax
call _realloc
test rax, rax
jz short loc_31B25
mov [rbx+18h], rax
mov [rbx+8], rax
mov [rbx+50h], r14
mov rcx, rax
add rcx, r14
mov [rbx+10h], rcx
mov r12, [rbx+48h]
loc_31AC5:
add r12, rax
xor r14d, r14d
mov r13, r15
jmp loc_319EE
loc_31AD3:
mov byte ptr [rbx+94h], 2
loc_31ADA:
mov r13d, 0FFFFFFFFh
loc_31AE0:
mov byte ptr [rbx+80h], 0
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_31AF9:
xor r13d, r13d
jmp short loc_31AE0
loc_31AFE:
mov byte ptr [rbx+94h], 1
mov r8, [rbx]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7E4h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
jmp short loc_31ADA
loc_31B25:
mov byte ptr [rbx+94h], 1
jmp short loc_31ADA
|
long long ma_real_read(long long a1, unsigned long long *a2)
{
long long v2; // r13
unsigned long long v3; // r15
long long v4; // r12
char i; // r14
long long v6; // rax
long long v7; // rax
long long v8; // r12
int v9; // ecx
unsigned long long v10; // r14
unsigned long long v11; // r14
unsigned long long v12; // r14
v2 = 0xFFFFFFFFLL;
v3 = 3LL * (*(_BYTE *)(a1 + 132) != 0) + 4;
*a2 = 0LL;
*(_BYTE *)(a1 + 128) = 1;
v4 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8);
for ( i = 1; ; i = 0 )
{
do
{
v6 = ma_pvio_cache_read(*(_QWORD **)a1, v4, v3);
if ( v6 <= 0 )
{
*(_BYTE *)(a1 + 148) = 2;
goto LABEL_16;
}
v4 += v6;
v3 -= v6;
}
while ( v3 );
if ( (i & 1) == 0 )
goto LABEL_17;
v7 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 72);
v9 = *(unsigned __int8 *)(v7 + v8 + 3) + 1;
*(_DWORD *)(a1 + 96) = v9;
*(_DWORD *)(a1 + 100) = v9;
if ( *(_BYTE *)(a1 + 132) )
{
*a2 = *(unsigned __int16 *)(v7 + v8 + 4) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 6) << 16);
v7 = *(_QWORD *)(a1 + 8);
v8 = *(_QWORD *)(a1 + 72);
}
v3 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16);
if ( !v3 )
break;
v10 = *a2;
if ( v3 > *a2 )
v10 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16);
v11 = v8 + v10;
if ( v11 >= *(_QWORD *)(a1 + 80) )
{
if ( *(_QWORD *)(a1 + 88) <= v11 )
{
*(_BYTE *)(a1 + 148) = 1;
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
2020LL,
SQLSTATE_UNKNOWN,
0LL);
}
else
{
v12 = (v11 + 4095) & 0xFFFFFFFFFFFFF000LL;
v7 = realloc(v7, v12 + 7);
if ( v7 )
{
*(_QWORD *)(a1 + 24) = v7;
*(_QWORD *)(a1 + 8) = v7;
*(_QWORD *)(a1 + 80) = v12;
*(_QWORD *)(a1 + 16) = v12 + v7;
v8 = *(_QWORD *)(a1 + 72);
goto LABEL_14;
}
*(_BYTE *)(a1 + 148) = 1;
}
LABEL_16:
v2 = 0xFFFFFFFFLL;
goto LABEL_17;
}
LABEL_14:
v4 = v7 + v8;
v2 = v3;
}
v2 = 0LL;
LABEL_17:
*(_BYTE *)(a1 + 128) = 0;
return v2;
}
|
ma_real_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R13D,0xffffffff
XOR EAX,EAX
CMP byte ptr [RDI + 0x84],0x0
SETNZ AL
LEA R15,[RAX + RAX*0x2]
ADD R15,0x4
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RSI],0x0
MOV byte ptr [RDI + 0x80],0x1
MOV R12,qword ptr [RDI + 0x8]
ADD R12,qword ptr [RDI + 0x48]
MOV R14B,0x1
LAB_001319ee:
MOV RDI,qword ptr [RBX]
MOV RSI,R12
MOV RDX,R15
CALL 0x0011d3e9
TEST RAX,RAX
JLE 0x00131ad3
ADD R12,RAX
SUB R15,RAX
JNZ 0x001319ee
TEST R14B,0x1
JZ 0x00131ae0
MOV RAX,qword ptr [RBX + 0x8]
MOV R12,qword ptr [RBX + 0x48]
MOVZX ECX,byte ptr [RAX + R12*0x1 + 0x3]
INC ECX
MOV dword ptr [RBX + 0x60],ECX
MOV dword ptr [RBX + 0x64],ECX
CMP byte ptr [RBX + 0x84],0x0
JZ 0x00131a57
MOVZX ECX,word ptr [RAX + R12*0x1 + 0x4]
MOVZX EAX,byte ptr [RAX + R12*0x1 + 0x6]
SHL EAX,0x10
OR RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBX + 0x8]
MOV R12,qword ptr [RBX + 0x48]
LAB_00131a57:
MOVZX ECX,word ptr [RAX + R12*0x1]
MOVZX R15D,byte ptr [RAX + R12*0x1 + 0x2]
SHL R15D,0x10
OR R15,RCX
JZ 0x00131af9
MOV RCX,qword ptr [RBP + -0x30]
MOV R14,qword ptr [RCX]
CMP R15,R14
CMOVA R14,R15
ADD R14,R12
CMP R14,qword ptr [RBX + 0x50]
JC 0x00131ac5
CMP qword ptr [RBX + 0x58],R14
JBE 0x00131afe
ADD R14,0xfff
AND R14,-0x1000
LEA RSI,[R14 + 0x7]
MOV RDI,RAX
CALL 0x00113730
TEST RAX,RAX
JZ 0x00131b25
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x50],R14
MOV RCX,RAX
ADD RCX,R14
MOV qword ptr [RBX + 0x10],RCX
MOV R12,qword ptr [RBX + 0x48]
LAB_00131ac5:
ADD R12,RAX
XOR R14D,R14D
MOV R13,R15
JMP 0x001319ee
LAB_00131ad3:
MOV byte ptr [RBX + 0x94],0x2
LAB_00131ada:
MOV R13D,0xffffffff
LAB_00131ae0:
MOV byte ptr [RBX + 0x80],0x0
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00131af9:
XOR R13D,R13D
JMP 0x00131ae0
LAB_00131afe:
MOV byte ptr [RBX + 0x94],0x1
MOV R8,qword ptr [RBX]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7e4
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
JMP 0x00131ada
LAB_00131b25:
MOV byte ptr [RBX + 0x94],0x1
JMP 0x00131ada
|
ulong ma_real_read(long *param_1,ulong *param_2)
{
char cVar1;
long lVar2;
void *__ptr;
int iVar3;
long lVar4;
ulong uVar5;
bool bVar6;
ulong uVar7;
uVar5 = 0xffffffff;
cVar1 = *(char *)((long)param_1 + 0x84);
*param_2 = 0;
*(int1 *)(param_1 + 0x10) = 1;
lVar4 = param_1[1] + param_1[9];
bVar6 = true;
uVar7 = (ulong)(cVar1 != '\0') * 3 + 4;
do {
do {
lVar2 = ma_pvio_cache_read(*param_1,lVar4,uVar7);
if (lVar2 < 1) {
*(int1 *)((long)param_1 + 0x94) = 2;
LAB_00131ada:
uVar5 = 0xffffffff;
LAB_00131ae0:
*(int1 *)(param_1 + 0x10) = 0;
return uVar5;
}
lVar4 = lVar4 + lVar2;
uVar7 = uVar7 - lVar2;
} while (uVar7 != 0);
if (!bVar6) goto LAB_00131ae0;
__ptr = (void *)param_1[1];
lVar4 = param_1[9];
iVar3 = *(byte *)((long)__ptr + lVar4 + 3) + 1;
*(int *)(param_1 + 0xc) = iVar3;
*(int *)((long)param_1 + 100) = iVar3;
if (*(char *)((long)param_1 + 0x84) != '\0') {
*param_2 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 6),
*(int2 *)((long)__ptr + lVar4 + 4));
__ptr = (void *)param_1[1];
lVar4 = param_1[9];
}
uVar5 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 2),
*(int2 *)((long)__ptr + lVar4));
if (uVar5 == 0) {
uVar5 = 0;
goto LAB_00131ae0;
}
uVar7 = *param_2;
if (*param_2 < uVar5) {
uVar7 = uVar5;
}
uVar7 = uVar7 + lVar4;
if ((ulong)param_1[10] <= uVar7) {
if ((ulong)param_1[0xb] <= uVar7) {
*(int1 *)((long)param_1 + 0x94) = 1;
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7e4,SQLSTATE_UNKNOWN,0);
goto LAB_00131ada;
}
uVar7 = uVar7 + 0xfff & 0xfffffffffffff000;
__ptr = realloc(__ptr,uVar7 + 7);
if (__ptr == (void *)0x0) {
*(int1 *)((long)param_1 + 0x94) = 1;
goto LAB_00131ada;
}
param_1[3] = (long)__ptr;
param_1[1] = (long)__ptr;
param_1[10] = uVar7;
param_1[2] = (long)__ptr + uVar7;
lVar4 = param_1[9];
}
lVar4 = lVar4 + (long)__ptr;
bVar6 = false;
uVar7 = uVar5;
} while( true );
}
|
|
17,521
|
httplib::detail::SocketStream::is_readable() const
|
monkey531[P]llama/examples/server/httplib.h
|
inline bool SocketStream::is_readable() const {
return select_read(sock_, read_timeout_sec_, read_timeout_usec_) > 0;
}
|
O3
|
c
|
httplib::detail::SocketStream::is_readable() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl 0x8(%rdi), %ebx
cmpl $0x3ff, %ebx # imm = 0x3FF
jle 0x421e7
xorl %eax, %eax
jmp 0x422b4
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leal 0x3f(%rbx), %eax
testl %ebx, %ebx
cmovnsl %ebx, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %ebx, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x20(%rsp,%rax,8)
movups 0x10(%rdi), %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
incl %ebx
movl %ebx, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1fa40
movl %eax, %ebp
testl %eax, %eax
jns 0x422af
callq 0x1f060
cmpl $0x4, (%rax)
jne 0x422af
movq %rax, %r14
movq %rsp, %r15
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r13
movq $0x0, (%rsp)
movq $0x3e8, 0x8(%rsp) # imm = 0x3E8
movq %r15, %rdi
movq %r15, %rsi
callq 0x1f2f0
cmpl $-0x1, %eax
jne 0x42292
cmpl $0x4, (%r14)
je 0x4227c
movl %ebx, %edi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x1fa40
movl %eax, %ebp
testl %eax, %eax
jns 0x422af
cmpl $0x4, (%r14)
je 0x4226b
testl %ebp, %ebp
setg %al
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZNK7httplib6detail12SocketStream11is_readableEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov ebx, [rdi+8]
cmp ebx, 3FFh
jle short loc_421E7
xor eax, eax
jmp loc_422B4
loc_421E7:
xorps xmm0, xmm0
lea rsi, [rsp+0D8h+var_B8]
movaps xmmword ptr [rsi+70h], xmm0
movaps xmmword ptr [rsi+60h], xmm0
movaps xmmword ptr [rsi+50h], xmm0
movaps xmmword ptr [rsi+40h], xmm0
movaps xmmword ptr [rsi+30h], xmm0
movaps xmmword ptr [rsi+20h], xmm0
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi], xmm0
lea eax, [rbx+3Fh]
test ebx, ebx
cmovns eax, ebx
mov edx, eax
and edx, 0FFFFFFC0h
mov ecx, ebx
sub ecx, edx
mov edx, 1
shl rdx, cl
sar eax, 6
cdqe
or [rsp+rax*8+0D8h+var_B8], rdx
movups xmm0, xmmword ptr [rdi+10h]
lea r8, [rsp+0D8h+var_C8]
movaps xmmword ptr [r8], xmm0
inc ebx
mov edi, ebx
xor edx, edx
xor ecx, ecx
call _select
mov ebp, eax
test eax, eax
jns short loc_422AF
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_422AF
mov r14, rax
mov r15, rsp
lea r12, [rsp+0D8h+var_B8]
lea r13, [rsp+0D8h+var_C8]
loc_4226B:
mov [rsp+0D8h+var_D8], 0
mov [rsp+0D8h+var_D0], 3E8h
loc_4227C:
mov rdi, r15
mov rsi, r15
call _nanosleep
cmp eax, 0FFFFFFFFh
jnz short loc_42292
cmp dword ptr [r14], 4
jz short loc_4227C
loc_42292:
mov edi, ebx
mov rsi, r12
xor edx, edx
xor ecx, ecx
mov r8, r13
call _select
mov ebp, eax
test eax, eax
jns short loc_422AF
cmp dword ptr [r14], 4
jz short loc_4226B
loc_422AF:
test ebp, ebp
setnle al
loc_422B4:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool httplib::detail::SocketStream::is_readable(httplib::detail::SocketStream *this)
{
char v1; // al
int v2; // ebx
unsigned int v4; // ebx
int v5; // ebp
_DWORD *v6; // rax
_DWORD *v7; // r14
_QWORD v8[2]; // [rsp+0h] [rbp-D8h] BYREF
__int128 v9; // [rsp+10h] [rbp-C8h]
_QWORD v10[23]; // [rsp+20h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 2);
if ( v2 > 1023 )
return 0;
memset(v10, 0, 128);
v10[v2 / 64] |= 1LL << (v2 - (v1 & 0xC0u));
v9 = *((_OWORD *)this + 1);
v4 = v2 + 1;
v5 = select(v4, v10, 0LL, 0LL);
if ( v5 < 0 )
{
v6 = (_DWORD *)__errno_location();
if ( *v6 == 4 )
{
v7 = v6;
do
{
v8[0] = 0LL;
v8[1] = 1000LL;
while ( (unsigned int)nanosleep(v8, v8) == -1 && *v7 == 4 )
;
v5 = select(v4, v10, 0LL, 0LL);
}
while ( v5 < 0 && *v7 == 4 );
}
}
return v5 > 0;
}
|
is_readable:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV EBX,dword ptr [RDI + 0x8]
CMP EBX,0x3ff
JLE 0x001421e7
XOR EAX,EAX
JMP 0x001422b4
LAB_001421e7:
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x20]
MOVAPS xmmword ptr [RSI + 0x70],XMM0
MOVAPS xmmword ptr [RSI + 0x60],XMM0
MOVAPS xmmword ptr [RSI + 0x50],XMM0
MOVAPS xmmword ptr [RSI + 0x40],XMM0
MOVAPS xmmword ptr [RSI + 0x30],XMM0
MOVAPS xmmword ptr [RSI + 0x20],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI],XMM0
LEA EAX,[RBX + 0x3f]
TEST EBX,EBX
CMOVNS EAX,EBX
MOV EDX,EAX
AND EDX,0xffffffc0
MOV ECX,EBX
SUB ECX,EDX
MOV EDX,0x1
SHL RDX,CL
SAR EAX,0x6
CDQE
OR qword ptr [RSP + RAX*0x8 + 0x20],RDX
MOVUPS XMM0,xmmword ptr [RDI + 0x10]
LEA R8,[RSP + 0x10]
MOVAPS xmmword ptr [R8],XMM0
INC EBX
MOV EDI,EBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0011fa40
MOV EBP,EAX
TEST EAX,EAX
JNS 0x001422af
CALL 0x0011f060
CMP dword ptr [RAX],0x4
JNZ 0x001422af
MOV R14,RAX
MOV R15,RSP
LEA R12,[RSP + 0x20]
LEA R13,[RSP + 0x10]
LAB_0014226b:
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x3e8
LAB_0014227c:
MOV RDI,R15
MOV RSI,R15
CALL 0x0011f2f0
CMP EAX,-0x1
JNZ 0x00142292
CMP dword ptr [R14],0x4
JZ 0x0014227c
LAB_00142292:
MOV EDI,EBX
MOV RSI,R12
XOR EDX,EDX
XOR ECX,ECX
MOV R8,R13
CALL 0x0011fa40
MOV EBP,EAX
TEST EAX,EAX
JNS 0x001422af
CMP dword ptr [R14],0x4
JZ 0x0014226b
LAB_001422af:
TEST EBP,EBP
SETG AL
LAB_001422b4:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::SocketStream::is_readable() const */
bool __thiscall httplib::detail::SocketStream::is_readable(SocketStream *this)
{
int iVar1;
bool bVar2;
int iVar3;
int *piVar4;
timespec local_d8;
timeval local_c8;
fd_set local_b8;
iVar1 = *(int *)(this + 8);
if (iVar1 < 0x400) {
local_b8.fds_bits[0xe] = 0;
local_b8.fds_bits[0xf] = 0;
local_b8.fds_bits[0xc] = 0;
local_b8.fds_bits[0xd] = 0;
local_b8.fds_bits[10] = 0;
local_b8.fds_bits[0xb] = 0;
local_b8.fds_bits[8] = 0;
local_b8.fds_bits[9] = 0;
local_b8.fds_bits[6] = 0;
local_b8.fds_bits[7] = 0;
local_b8.fds_bits[4] = 0;
local_b8.fds_bits[5] = 0;
local_b8.fds_bits[2] = 0;
local_b8.fds_bits[3] = 0;
local_b8.fds_bits[0] = 0;
local_b8.fds_bits[1] = 0;
iVar3 = iVar1 + 0x3f;
if (-1 < iVar1) {
iVar3 = iVar1;
}
local_b8.fds_bits[iVar3 >> 6] =
local_b8.fds_bits[iVar3 >> 6] | 1L << ((byte)(iVar1 % 0x40) & 0x3f);
local_c8.tv_sec = *(__time_t *)(this + 0x10);
local_c8.tv_usec = *(__suseconds_t *)(this + 0x18);
iVar3 = select(iVar1 + 1,&local_b8,(fd_set *)0x0,(fd_set *)0x0,&local_c8);
if (iVar3 < 0) {
piVar4 = __errno_location();
if (*piVar4 == 4) {
do {
local_d8.tv_sec = 0;
local_d8.tv_nsec = 1000;
do {
iVar3 = nanosleep(&local_d8,&local_d8);
if (iVar3 != -1) break;
} while (*piVar4 == 4);
iVar3 = select(iVar1 + 1,&local_b8,(fd_set *)0x0,(fd_set *)0x0,&local_c8);
} while ((iVar3 < 0) && (*piVar4 == 4));
}
}
bVar2 = 0 < iVar3;
}
else {
bVar2 = false;
}
return bVar2;
}
|
|
17,522
|
psi_rwlock_tryrdlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_TRYREADLOCK, file, line);
int result= rw_tryrdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_tryrdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b63f6(%rip), %rax # 0x238fa0
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x2, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x862a0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x82c03
leaq 0x1b63b0(%rip), %rax # 0x238fa0
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_tryrdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 2
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_tryrdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_82C03
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_82C03:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_tryrdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 144),
2LL,
a2,
a3);
v4 = my_rw_tryrdlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[53])(v5, v4);
return v4;
}
|
psi_rwlock_tryrdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x338fa0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x2
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001862a0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00182c03
LEA RAX,[0x338fa0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00182c03:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_tryrdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),2,param_2,param_3);
uVar1 = my_rw_tryrdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
17,523
|
lunasvg::SVGClipPathElement::requiresMasking() const
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
bool SVGClipPathElement::requiresMasking() const
{
if(clipper())
return true;
const SVGGeometryElement* prevShapeElement = nullptr;
for(const auto& child : children()) {
auto element = toSVGElement(child);
if(element == nullptr || element->isDisplayNone())
continue;
auto shapeElement = toSVGGeometryElement(element);
if(shapeElement == nullptr) {
if(element->isTextPositioningElement())
return true;
if(element->id() != ElementID::Use)
continue;
if(element->clipper())
return true;
shapeElement = toSVGGeometryElement(element->firstChild());
}
if(shapeElement == nullptr || !shapeElement->isRenderable())
continue;
if(prevShapeElement || shapeElement->clipper())
return true;
prevShapeElement = shapeElement;
}
return false;
}
|
O0
|
cpp
|
lunasvg::SVGClipPathElement::requiresMasking() const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x21690
cmpq $0x0, %rax
je 0x1d028
movb $0x1, -0x1(%rbp)
jmp 0x1d154
movq -0x50(%rbp), %rdi
movq $0x0, -0x18(%rbp)
callq 0xe950
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe970
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe9a0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xe9d0
testb $0x1, %al
jne 0x1d06d
jmp 0x1d150
leaq -0x28(%rbp), %rdi
callq 0xea00
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1fda0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1d09d
movq -0x40(%rbp), %rdi
callq 0x20470
testb $0x1, %al
jne 0x1d09d
jmp 0x1d0a2
jmp 0x1d142
movq -0x40(%rbp), %rdi
callq 0x216e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x1d108
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
testb $0x1, %al
jne 0x1d0c6
jmp 0x1d0cf
movb $0x1, -0x1(%rbp)
jmp 0x1d154
movq -0x40(%rbp), %rdi
callq 0x1fe70
cmpb $0x18, %al
je 0x1d0de
jmp 0x1d142
movq -0x40(%rbp), %rdi
callq 0x21690
cmpq $0x0, %rax
je 0x1d0f3
movb $0x1, -0x1(%rbp)
jmp 0x1d154
movq -0x40(%rbp), %rdi
callq 0x191e0
movq %rax, %rdi
callq 0x216e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x1d11c
movq -0x48(%rbp), %rdi
callq 0x21720
testb $0x1, %al
jne 0x1d11e
jmp 0x1d142
cmpq $0x0, -0x18(%rbp)
jne 0x1d134
movq -0x48(%rbp), %rdi
callq 0x21690
cmpq $0x0, %rax
je 0x1d13a
movb $0x1, -0x1(%rbp)
jmp 0x1d154
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xea90
jmp 0x1d057
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ZNK7lunasvg18SVGClipPathElement15requiresMaskingEv:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]; this
mov [rbp+var_50], rdi
call _ZNK7lunasvg10SVGElement7clipperEv; lunasvg::SVGElement::clipper(void)
cmp rax, 0
jz short loc_1D028
mov [rbp+var_1], 1
jmp loc_1D154
loc_1D028:
mov rdi, [rbp+var_50]
mov [rbp+var_18], 0
call _ZNK7lunasvg10SVGElement8childrenB5cxx11Ev; lunasvg::SVGElement::children(void)
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE5beginEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]
call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE3endEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::end(void)
mov [rbp+var_30], rax
loc_1D057:
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]; lunasvg::SVGNode *
call _ZStneRKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEES8_; std::operator!=(std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&,std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&)
test al, 1
jnz short loc_1D06D
jmp loc_1D150
loc_1D06D:
lea rdi, [rbp+var_28]
call _ZNKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEdeEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _ZN7lunasvg12toSVGElementERKSt10unique_ptrINS_7SVGNodeESt14default_deleteIS1_EE; lunasvg::toSVGElement(std::unique_ptr<lunasvg::SVGNode> const&)
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz short loc_1D09D
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg10SVGElement13isDisplayNoneEv; lunasvg::SVGElement::isDisplayNone(void)
test al, 1
jnz short loc_1D09D
jmp short loc_1D0A2
loc_1D09D:
jmp loc_1D142
loc_1D0A2:
mov rdi, [rbp+var_40]; this
call _ZN7lunasvg20toSVGGeometryElementEPKNS_7SVGNodeE; lunasvg::toSVGGeometryElement(lunasvg::SVGNode const*)
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jnz short loc_1D108
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+38h]
test al, 1
jnz short loc_1D0C6
jmp short loc_1D0CF
loc_1D0C6:
mov [rbp+var_1], 1
jmp loc_1D154
loc_1D0CF:
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void)
cmp al, 18h
jz short loc_1D0DE
jmp short loc_1D142
loc_1D0DE:
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg10SVGElement7clipperEv; lunasvg::SVGElement::clipper(void)
cmp rax, 0
jz short loc_1D0F3
mov [rbp+var_1], 1
jmp short loc_1D154
loc_1D0F3:
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg10SVGElement10firstChildEv; lunasvg::SVGElement::firstChild(void)
mov rdi, rax; this
call _ZN7lunasvg20toSVGGeometryElementEPKNS_7SVGNodeE; lunasvg::toSVGGeometryElement(lunasvg::SVGNode const*)
mov [rbp+var_48], rax
loc_1D108:
cmp [rbp+var_48], 0
jz short loc_1D11C
mov rdi, [rbp+var_48]; this
call _ZNK7lunasvg18SVGGeometryElement12isRenderableEv; lunasvg::SVGGeometryElement::isRenderable(void)
test al, 1
jnz short loc_1D11E
loc_1D11C:
jmp short loc_1D142
loc_1D11E:
cmp [rbp+var_18], 0
jnz short loc_1D134
mov rdi, [rbp+var_48]; this
call _ZNK7lunasvg10SVGElement7clipperEv; lunasvg::SVGElement::clipper(void)
cmp rax, 0
jz short loc_1D13A
loc_1D134:
mov [rbp+var_1], 1
jmp short loc_1D154
loc_1D13A:
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
loc_1D142:
lea rdi, [rbp+var_28]
call _ZNSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEppEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(void)
jmp loc_1D057
loc_1D150:
mov [rbp+var_1], 0
loc_1D154:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
|
char lunasvg::SVGClipPathElement::requiresMasking(lunasvg::SVGClipPathElement *this)
{
lunasvg *Child; // rax
lunasvg::SVGElement *v3; // [rsp+8h] [rbp-48h]
lunasvg::SVGElement *v4; // [rsp+10h] [rbp-40h]
long long v5; // [rsp+18h] [rbp-38h]
long long v6; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v7; // [rsp+28h] [rbp-28h] BYREF
_QWORD *v8; // [rsp+30h] [rbp-20h]
lunasvg::SVGElement *v9; // [rsp+38h] [rbp-18h]
lunasvg::SVGElement *v10; // [rsp+40h] [rbp-10h]
v10 = this;
if ( !lunasvg::SVGElement::clipper(this) )
{
v9 = 0LL;
v8 = (_QWORD *)lunasvg::SVGElement::children[abi:cxx11]((long long)this);
v7 = (_QWORD *)std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(v8);
v6 = std::list<std::unique_ptr<lunasvg::SVGNode>>::end((long long)v8);
while ( 1 )
{
if ( !std::operator!=(&v7, &v6) )
return 0;
v5 = std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(&v7);
v4 = (lunasvg::SVGElement *)lunasvg::toSVGElement(v5);
if ( v4 && (lunasvg::SVGElement::isDisplayNone(v4) & 1) == 0 )
{
v3 = (lunasvg::SVGElement *)lunasvg::toSVGGeometryElement(v4, (const lunasvg::SVGNode *)&v6);
if ( !v3 )
{
if ( ((*(long long ( **)(lunasvg::SVGElement *))(*(_QWORD *)v4 + 56LL))(v4) & 1) != 0 )
return 1;
if ( (unsigned __int8)lunasvg::SVGElement::id(v4) != 24 )
goto LABEL_22;
if ( lunasvg::SVGElement::clipper(v4) )
return 1;
Child = (lunasvg *)lunasvg::SVGElement::firstChild(v4);
v3 = (lunasvg::SVGElement *)lunasvg::toSVGGeometryElement(Child, (const lunasvg::SVGNode *)&v6);
}
if ( v3 && (lunasvg::SVGGeometryElement::isRenderable(v3) & 1) != 0 )
{
if ( v9 || lunasvg::SVGElement::clipper(v3) )
return 1;
v9 = v3;
}
}
LABEL_22:
std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(&v7);
}
}
return 1;
}
|
requiresMasking:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RDI
CALL 0x00121690
CMP RAX,0x0
JZ 0x0011d028
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0011d154
LAB_0011d028:
MOV RDI,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x18],0x0
CALL 0x0010e950
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e970
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e9a0
MOV qword ptr [RBP + -0x30],RAX
LAB_0011d057:
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x0010e9d0
TEST AL,0x1
JNZ 0x0011d06d
JMP 0x0011d150
LAB_0011d06d:
LEA RDI,[RBP + -0x28]
CALL 0x0010ea00
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0011fda0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0011d09d
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00120470
TEST AL,0x1
JNZ 0x0011d09d
JMP 0x0011d0a2
LAB_0011d09d:
JMP 0x0011d142
LAB_0011d0a2:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001216e0
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0011d108
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x38]
TEST AL,0x1
JNZ 0x0011d0c6
JMP 0x0011d0cf
LAB_0011d0c6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0011d154
LAB_0011d0cf:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0011fe70
CMP AL,0x18
JZ 0x0011d0de
JMP 0x0011d142
LAB_0011d0de:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00121690
CMP RAX,0x0
JZ 0x0011d0f3
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0011d154
LAB_0011d0f3:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001191e0
MOV RDI,RAX
CALL 0x001216e0
MOV qword ptr [RBP + -0x48],RAX
LAB_0011d108:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0011d11c
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00121720
TEST AL,0x1
JNZ 0x0011d11e
LAB_0011d11c:
JMP 0x0011d142
LAB_0011d11e:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0011d134
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00121690
CMP RAX,0x0
JZ 0x0011d13a
LAB_0011d134:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0011d154
LAB_0011d13a:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
LAB_0011d142:
LEA RDI,[RBP + -0x28]
CALL 0x0010ea90
JMP 0x0011d057
LAB_0011d150:
MOV byte ptr [RBP + -0x1],0x0
LAB_0011d154:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
/* lunasvg::SVGClipPathElement::requiresMasking() const */
int1 __thiscall lunasvg::SVGClipPathElement::requiresMasking(SVGClipPathElement *this)
{
char cVar1;
long lVar2;
ulong uVar3;
unique_ptr *puVar4;
SVGElement *this_00;
SVGNode *pSVar5;
SVGGeometryElement *local_50;
int8 local_38;
int8 local_30;
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
*local_28;
SVGGeometryElement *local_20;
SVGClipPathElement *local_18;
int1 local_9;
local_18 = this;
lVar2 = SVGElement::clipper((SVGElement *)this);
if (lVar2 == 0) {
local_20 = (SVGGeometryElement *)0x0;
local_28 = (list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
*)SVGElement::children_abi_cxx11_((SVGElement *)this);
local_30 = std::__cxx11::
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
::begin(local_28);
local_38 = std::__cxx11::
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
::end(local_28);
while (uVar3 = std::operator!=((_List_const_iterator *)&local_30,
(_List_const_iterator *)&local_38), (uVar3 & 1) != 0) {
puVar4 = (unique_ptr *)
std::
_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
::operator*((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
*)&local_30);
this_00 = (SVGElement *)toSVGElement(puVar4);
if ((this_00 != (SVGElement *)0x0) &&
(uVar3 = SVGElement::isDisplayNone(this_00), (uVar3 & 1) == 0)) {
local_50 = (SVGGeometryElement *)toSVGGeometryElement((SVGNode *)this_00);
if (local_50 == (SVGGeometryElement *)0x0) {
uVar3 = (**(code **)(*(long *)this_00 + 0x38))();
if ((uVar3 & 1) != 0) {
return 1;
}
cVar1 = SVGElement::id(this_00);
if (cVar1 != '\x18') goto LAB_0011d142;
lVar2 = SVGElement::clipper(this_00);
if (lVar2 != 0) {
return 1;
}
pSVar5 = (SVGNode *)SVGElement::firstChild(this_00);
local_50 = (SVGGeometryElement *)toSVGGeometryElement(pSVar5);
}
if ((local_50 != (SVGGeometryElement *)0x0) &&
(uVar3 = SVGGeometryElement::isRenderable(local_50), (uVar3 & 1) != 0)) {
if ((local_20 != (SVGGeometryElement *)0x0) ||
(lVar2 = SVGElement::clipper((SVGElement *)local_50), lVar2 != 0)) {
return 1;
}
local_20 = local_50;
}
}
LAB_0011d142:
std::
_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
::operator++((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
*)&local_30);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
17,524
|
lunasvg::SVGClipPathElement::requiresMasking() const
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
bool SVGClipPathElement::requiresMasking() const
{
if(clipper())
return true;
const SVGGeometryElement* prevShapeElement = nullptr;
for(const auto& child : children()) {
auto element = toSVGElement(child);
if(element == nullptr || element->isDisplayNone())
continue;
auto shapeElement = toSVGGeometryElement(element);
if(shapeElement == nullptr) {
if(element->isTextPositioningElement())
return true;
if(element->id() != ElementID::Use)
continue;
if(element->clipper())
return true;
shapeElement = toSVGGeometryElement(element->firstChild());
}
if(shapeElement == nullptr || !shapeElement->isRenderable())
continue;
if(prevShapeElement || shapeElement->clipper())
return true;
prevShapeElement = shapeElement;
}
return false;
}
|
O1
|
cpp
|
lunasvg::SVGClipPathElement::requiresMasking() const:
movb $0x1, %al
cmpq $0x0, 0x28(%rdi)
je 0x12482
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x58(%rdi), %r13
addq $0x58, %r14
cmpq %r14, %r13
je 0x125a1
xorl %r12d, %r12d
movq 0x10(%r13), %r15
testq %r15, %r15
je 0x124ba
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
testb %al, %al
jne 0x124bd
xorl %r15d, %r15d
movl $0x3, %ebp
testq %r15, %r15
je 0x1253c
cmpb $0x1, 0x40(%r15)
je 0x1253c
movq %r12, %rbx
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
testb %al, %al
movl $0x0, %r12d
cmovneq %r15, %r12
testq %r12, %r12
je 0x12527
testq %r12, %r12
je 0x12539
cmpq $0x0, 0x98(%r12)
je 0x12539
cmpb $0x1, 0x40(%r12)
je 0x12539
cmpb $0x0, 0x42(%r12)
jne 0x12539
movl $0x1, %ebp
testq %rbx, %rbx
jne 0x12539
xorl %ebp, %ebp
cmpq $0x0, 0x28(%r12)
setne %bpl
cmoveq %r12, %rbx
jmp 0x12539
movq (%r15), %rax
movq %r15, %rdi
callq *0x38(%rax)
testb %al, %al
je 0x12554
movl $0x1, %ebp
movq %rbx, %r12
cmpl $0x3, %ebp
je 0x12545
testl %ebp, %ebp
jne 0x125a5
movq (%r13), %r13
cmpq %r14, %r13
jne 0x124a4
jmp 0x125a1
cmpb $0x18, 0x43(%r15)
movq %rbx, %r12
jne 0x1253c
cmpq $0x0, 0x28(%r15)
je 0x1256c
movl $0x1, %ebp
jmp 0x1253c
movq 0x58(%r15), %rax
addq $0x58, %r15
cmpq %r15, %rax
je 0x1257f
movq 0x10(%rax), %r12
jmp 0x12582
xorl %r12d, %r12d
testq %r12, %r12
je 0x12599
movq (%r12), %rax
movq %r12, %rdi
callq *0x30(%rax)
testb %al, %al
jne 0x124eb
xorl %r12d, %r12d
jmp 0x124eb
xorl %eax, %eax
jmp 0x125a7
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZNK7lunasvg18SVGClipPathElement15requiresMaskingEv:
mov al, 1
cmp qword ptr [rdi+28h], 0
jz short loc_12482
retn
loc_12482:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov r13, [rdi+58h]
add r14, 58h ; 'X'
cmp r13, r14
jz loc_125A1
xor r12d, r12d
loc_124A4:
mov r15, [r13+10h]
test r15, r15
jz short loc_124BA
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+18h]
test al, al
jnz short loc_124BD
loc_124BA:
xor r15d, r15d
loc_124BD:
mov ebp, 3
test r15, r15
jz short loc_1253C
cmp byte ptr [r15+40h], 1
jz short loc_1253C
mov rbx, r12
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+30h]
test al, al
mov r12d, 0
cmovnz r12, r15
test r12, r12
jz short loc_12527
loc_124EB:
test r12, r12
jz short loc_12539
cmp qword ptr [r12+98h], 0
jz short loc_12539
cmp byte ptr [r12+40h], 1
jz short loc_12539
cmp byte ptr [r12+42h], 0
jnz short loc_12539
mov ebp, 1
test rbx, rbx
jnz short loc_12539
xor ebp, ebp
cmp qword ptr [r12+28h], 0
setnz bpl
cmovz rbx, r12
jmp short loc_12539
loc_12527:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+38h]
test al, al
jz short loc_12554
mov ebp, 1
loc_12539:
mov r12, rbx
loc_1253C:
cmp ebp, 3
jz short loc_12545
test ebp, ebp
jnz short loc_125A5
loc_12545:
mov r13, [r13+0]
cmp r13, r14
jnz loc_124A4
jmp short loc_125A1
loc_12554:
cmp byte ptr [r15+43h], 18h
mov r12, rbx
jnz short loc_1253C
cmp qword ptr [r15+28h], 0
jz short loc_1256C
mov ebp, 1
jmp short loc_1253C
loc_1256C:
mov rax, [r15+58h]
add r15, 58h ; 'X'
cmp rax, r15
jz short loc_1257F
mov r12, [rax+10h]
jmp short loc_12582
loc_1257F:
xor r12d, r12d
loc_12582:
test r12, r12
jz short loc_12599
mov rax, [r12]
mov rdi, r12
call qword ptr [rax+30h]
test al, al
jnz loc_124EB
loc_12599:
xor r12d, r12d
jmp loc_124EB
loc_125A1:
xor eax, eax
jmp short loc_125A7
loc_125A5:
mov al, 1
loc_125A7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char lunasvg::SVGClipPathElement::requiresMasking(lunasvg::SVGClipPathElement *this)
{
char result; // al
_QWORD *v2; // r13
long long v3; // r12
long long v4; // r15
int v5; // ebp
long long v6; // rbx
long long v7; // r12
long long v8; // rax
result = 1;
if ( !*((_QWORD *)this + 5) )
{
v2 = (_QWORD *)*((_QWORD *)this + 11);
if ( v2 == (_QWORD *)((char *)this + 88) )
return 0;
v3 = 0LL;
while ( 1 )
{
v4 = v2[2];
if ( !v4 || !(*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v4 + 24LL))(v2[2]) )
v4 = 0LL;
v5 = 3;
if ( v4 )
{
if ( *(_BYTE *)(v4 + 64) != 1 )
break;
}
LABEL_23:
if ( v5 != 3 && v5 )
return 1;
v2 = (_QWORD *)*v2;
if ( v2 == (_QWORD *)((char *)this + 88) )
return 0;
}
v6 = v3;
v7 = 0LL;
if ( (*(unsigned __int8 ( **)(long long))(*(_QWORD *)v4 + 48LL))(v4) )
v7 = v4;
if ( !v7 )
{
if ( (*(unsigned __int8 ( **)(long long))(*(_QWORD *)v4 + 56LL))(v4) )
{
v5 = 1;
LABEL_22:
v3 = v6;
goto LABEL_23;
}
v3 = v6;
if ( *(_BYTE *)(v4 + 67) != 24 )
goto LABEL_23;
if ( *(_QWORD *)(v4 + 40) )
{
v5 = 1;
goto LABEL_23;
}
v8 = *(_QWORD *)(v4 + 88);
if ( v8 == v4 + 88 )
v7 = 0LL;
else
v7 = *(_QWORD *)(v8 + 16);
if ( !v7 || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)v7 + 48LL))(v7) )
v7 = 0LL;
}
if ( v7 )
{
if ( *(_QWORD *)(v7 + 152) )
{
if ( *(_BYTE *)(v7 + 64) != 1 && !*(_BYTE *)(v7 + 66) )
{
v5 = 1;
if ( !v6 )
{
v5 = *(_QWORD *)(v7 + 40) != 0LL;
if ( !*(_QWORD *)(v7 + 40) )
v6 = v7;
}
}
}
}
goto LABEL_22;
}
return result;
}
|
requiresMasking:
MOV AL,0x1
CMP qword ptr [RDI + 0x28],0x0
JZ 0x00112482
RET
LAB_00112482:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R13,qword ptr [RDI + 0x58]
ADD R14,0x58
CMP R13,R14
JZ 0x001125a1
XOR R12D,R12D
LAB_001124a4:
MOV R15,qword ptr [R13 + 0x10]
TEST R15,R15
JZ 0x001124ba
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x18]
TEST AL,AL
JNZ 0x001124bd
LAB_001124ba:
XOR R15D,R15D
LAB_001124bd:
MOV EBP,0x3
TEST R15,R15
JZ 0x0011253c
CMP byte ptr [R15 + 0x40],0x1
JZ 0x0011253c
MOV RBX,R12
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x30]
TEST AL,AL
MOV R12D,0x0
CMOVNZ R12,R15
TEST R12,R12
JZ 0x00112527
LAB_001124eb:
TEST R12,R12
JZ 0x00112539
CMP qword ptr [R12 + 0x98],0x0
JZ 0x00112539
CMP byte ptr [R12 + 0x40],0x1
JZ 0x00112539
CMP byte ptr [R12 + 0x42],0x0
JNZ 0x00112539
MOV EBP,0x1
TEST RBX,RBX
JNZ 0x00112539
XOR EBP,EBP
CMP qword ptr [R12 + 0x28],0x0
SETNZ BPL
CMOVZ RBX,R12
JMP 0x00112539
LAB_00112527:
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x38]
TEST AL,AL
JZ 0x00112554
MOV EBP,0x1
LAB_00112539:
MOV R12,RBX
LAB_0011253c:
CMP EBP,0x3
JZ 0x00112545
TEST EBP,EBP
JNZ 0x001125a5
LAB_00112545:
MOV R13,qword ptr [R13]
CMP R13,R14
JNZ 0x001124a4
JMP 0x001125a1
LAB_00112554:
CMP byte ptr [R15 + 0x43],0x18
MOV R12,RBX
JNZ 0x0011253c
CMP qword ptr [R15 + 0x28],0x0
JZ 0x0011256c
MOV EBP,0x1
JMP 0x0011253c
LAB_0011256c:
MOV RAX,qword ptr [R15 + 0x58]
ADD R15,0x58
CMP RAX,R15
JZ 0x0011257f
MOV R12,qword ptr [RAX + 0x10]
JMP 0x00112582
LAB_0011257f:
XOR R12D,R12D
LAB_00112582:
TEST R12,R12
JZ 0x00112599
MOV RAX,qword ptr [R12]
MOV RDI,R12
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JNZ 0x001124eb
LAB_00112599:
XOR R12D,R12D
JMP 0x001124eb
LAB_001125a1:
XOR EAX,EAX
JMP 0x001125a7
LAB_001125a5:
MOV AL,0x1
LAB_001125a7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGClipPathElement::requiresMasking() const */
int8 __thiscall lunasvg::SVGClipPathElement::requiresMasking(SVGClipPathElement *this)
{
char cVar1;
char cVar2;
char cVar3;
long *plVar4;
long *plVar5;
SVGClipPathElement *pSVar6;
long *plVar7;
if (*(long *)(this + 0x28) != 0) {
return 1;
}
pSVar6 = *(SVGClipPathElement **)(this + 0x58);
if (pSVar6 != this + 0x58) {
plVar4 = (long *)0x0;
do {
plVar7 = *(long **)(pSVar6 + 0x10);
if ((plVar7 == (long *)0x0) || (cVar1 = (**(code **)(*plVar7 + 0x18))(plVar7), cVar1 == '\0'))
{
plVar7 = (long *)0x0;
}
cVar3 = '\x03';
cVar1 = '\x03';
if ((plVar7 != (long *)0x0) && ((char)plVar7[8] != '\x01')) {
cVar2 = (**(code **)(*plVar7 + 0x30))(plVar7);
plVar5 = (long *)0x0;
if (cVar2 != '\0') {
plVar5 = plVar7;
}
if (plVar5 == (long *)0x0) {
cVar2 = (**(code **)(*plVar7 + 0x38))(plVar7);
if (cVar2 == '\0') {
if (*(char *)((long)plVar7 + 0x43) == '\x18') {
if (plVar7[5] == 0) {
if ((long *)plVar7[0xb] == plVar7 + 0xb) {
plVar5 = (long *)0x0;
}
else {
plVar5 = (long *)((long *)plVar7[0xb])[2];
}
if ((plVar5 == (long *)0x0) ||
(cVar1 = (**(code **)(*plVar5 + 0x30))(plVar5), cVar1 == '\0')) {
plVar5 = (long *)0x0;
}
goto LAB_001124eb;
}
cVar1 = '\x01';
}
}
else {
cVar1 = '\x01';
}
}
else {
LAB_001124eb:
cVar1 = cVar3;
if (((((plVar5 != (long *)0x0) && (plVar5[0x13] != 0)) && ((char)plVar5[8] != '\x01')) &&
((*(char *)((long)plVar5 + 0x42) == '\0' && (cVar1 = '\x01', plVar4 == (long *)0x0))))
&& (cVar1 = plVar5[5] != 0, !(bool)cVar1)) {
plVar4 = plVar5;
}
}
}
if ((cVar1 != '\x03') && (cVar1 != '\0')) {
return 1;
}
pSVar6 = *(SVGClipPathElement **)pSVar6;
} while (pSVar6 != this + 0x58);
}
return 0;
}
|
|
17,525
|
lunasvg::SVGClipPathElement::requiresMasking() const
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
bool SVGClipPathElement::requiresMasking() const
{
if(clipper())
return true;
const SVGGeometryElement* prevShapeElement = nullptr;
for(const auto& child : children()) {
auto element = toSVGElement(child);
if(element == nullptr || element->isDisplayNone())
continue;
auto shapeElement = toSVGGeometryElement(element);
if(shapeElement == nullptr) {
if(element->isTextPositioningElement())
return true;
if(element->id() != ElementID::Use)
continue;
if(element->clipper())
return true;
shapeElement = toSVGGeometryElement(element->firstChild());
}
if(shapeElement == nullptr || !shapeElement->isRenderable())
continue;
if(prevShapeElement || shapeElement->clipper())
return true;
prevShapeElement = shapeElement;
}
return false;
}
|
O3
|
cpp
|
lunasvg::SVGClipPathElement::requiresMasking() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movb $0x1, %bl
cmpq $0x0, 0x28(%rdi)
jne 0x1219b
movq %rdi, %r14
movq 0x58(%rdi), %r12
addq $0x58, %r14
cmpq %r14, %r12
je 0x12199
xorl %r13d, %r13d
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x12111
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
testb %al, %al
je 0x12111
cmpb $0x1, 0x40(%r15)
jne 0x12122
movq %r13, %r15
movq (%r12), %r12
movq %r15, %r13
cmpq %r14, %r12
jne 0x120f3
jmp 0x12199
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
testb %al, %al
je 0x12155
cmpq $0x0, 0x98(%r15)
je 0x12111
cmpb $0x1, 0x40(%r15)
je 0x12111
cmpb $0x0, 0x42(%r15)
jne 0x12111
testq %r13, %r13
jne 0x1219b
cmpq $0x0, 0x28(%r15)
je 0x12114
jmp 0x1219b
movq (%r15), %rax
movq %r15, %rdi
callq *0x38(%rax)
testb %al, %al
jne 0x1219b
cmpb $0x18, 0x43(%r15)
jne 0x12111
cmpq $0x0, 0x28(%r15)
jne 0x1219b
movq 0x58(%r15), %rax
addq $0x58, %r15
cmpq %r15, %rax
je 0x12111
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x12111
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
testb %al, %al
je 0x12111
jmp 0x1212f
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
_ZNK7lunasvg18SVGClipPathElement15requiresMaskingEv:
push r15
push r14
push r13
push r12
push rbx
mov bl, 1
cmp qword ptr [rdi+28h], 0
jnz loc_1219B
mov r14, rdi
mov r12, [rdi+58h]
add r14, 58h ; 'X'
cmp r12, r14
jz loc_12199
xor r13d, r13d
loc_120F3:
mov r15, [r12+10h]
test r15, r15
jz short loc_12111
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+18h]
test al, al
jz short loc_12111
cmp byte ptr [r15+40h], 1
jnz short loc_12122
loc_12111:
mov r15, r13
loc_12114:
mov r12, [r12]
mov r13, r15
cmp r12, r14
jnz short loc_120F3
jmp short loc_12199
loc_12122:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+30h]
test al, al
jz short loc_12155
loc_1212F:
cmp qword ptr [r15+98h], 0
jz short loc_12111
cmp byte ptr [r15+40h], 1
jz short loc_12111
cmp byte ptr [r15+42h], 0
jnz short loc_12111
test r13, r13
jnz short loc_1219B
cmp qword ptr [r15+28h], 0
jz short loc_12114
jmp short loc_1219B
loc_12155:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+38h]
test al, al
jnz short loc_1219B
cmp byte ptr [r15+43h], 18h
jnz short loc_12111
cmp qword ptr [r15+28h], 0
jnz short loc_1219B
mov rax, [r15+58h]
add r15, 58h ; 'X'
cmp rax, r15
jz short loc_12111
mov r15, [rax+10h]
test r15, r15
jz short loc_12111
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+30h]
test al, al
jz loc_12111
jmp short loc_1212F
loc_12199:
xor ebx, ebx
loc_1219B:
mov eax, ebx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long lunasvg::SVGClipPathElement::requiresMasking(lunasvg::SVGClipPathElement *this)
{
unsigned int v1; // ebx
_QWORD *v2; // r12
long long v3; // r13
long long v4; // r15
long long v5; // rax
LOBYTE(v1) = 1;
if ( !*((_QWORD *)this + 5) )
{
v2 = (_QWORD *)*((_QWORD *)this + 11);
if ( v2 != (_QWORD *)((char *)this + 88) )
{
v3 = 0LL;
do
{
v4 = v2[2];
if ( !v4
|| !(*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v4 + 24LL))(v2[2])
|| *(_BYTE *)(v4 + 64) == 1 )
{
goto LABEL_7;
}
if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)v4 + 48LL))(v4) )
{
if ( (*(unsigned __int8 ( **)(long long))(*(_QWORD *)v4 + 56LL))(v4) )
return v1;
if ( *(_BYTE *)(v4 + 67) != 24 )
goto LABEL_7;
if ( *(_QWORD *)(v4 + 40) )
return v1;
v5 = *(_QWORD *)(v4 + 88);
if ( v5 == v4 + 88 )
goto LABEL_7;
v4 = *(_QWORD *)(v5 + 16);
if ( !v4 || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)v4 + 48LL))(v4) )
goto LABEL_7;
}
if ( *(_QWORD *)(v4 + 152) && *(_BYTE *)(v4 + 64) != 1 && !*(_BYTE *)(v4 + 66) )
{
if ( v3 || *(_QWORD *)(v4 + 40) )
return v1;
}
else
{
LABEL_7:
v4 = v3;
}
v2 = (_QWORD *)*v2;
v3 = v4;
}
while ( v2 != (_QWORD *)((char *)this + 88) );
}
return 0;
}
return v1;
}
|
requiresMasking:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV BL,0x1
CMP qword ptr [RDI + 0x28],0x0
JNZ 0x0011219b
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x58]
ADD R14,0x58
CMP R12,R14
JZ 0x00112199
XOR R13D,R13D
LAB_001120f3:
MOV R15,qword ptr [R12 + 0x10]
TEST R15,R15
JZ 0x00112111
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x18]
TEST AL,AL
JZ 0x00112111
CMP byte ptr [R15 + 0x40],0x1
JNZ 0x00112122
LAB_00112111:
MOV R15,R13
LAB_00112114:
MOV R12,qword ptr [R12]
MOV R13,R15
CMP R12,R14
JNZ 0x001120f3
JMP 0x00112199
LAB_00112122:
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x00112155
LAB_0011212f:
CMP qword ptr [R15 + 0x98],0x0
JZ 0x00112111
CMP byte ptr [R15 + 0x40],0x1
JZ 0x00112111
CMP byte ptr [R15 + 0x42],0x0
JNZ 0x00112111
TEST R13,R13
JNZ 0x0011219b
CMP qword ptr [R15 + 0x28],0x0
JZ 0x00112114
JMP 0x0011219b
LAB_00112155:
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x38]
TEST AL,AL
JNZ 0x0011219b
CMP byte ptr [R15 + 0x43],0x18
JNZ 0x00112111
CMP qword ptr [R15 + 0x28],0x0
JNZ 0x0011219b
MOV RAX,qword ptr [R15 + 0x58]
ADD R15,0x58
CMP RAX,R15
JZ 0x00112111
MOV R15,qword ptr [RAX + 0x10]
TEST R15,R15
JZ 0x00112111
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x00112111
JMP 0x0011212f
LAB_00112199:
XOR EBX,EBX
LAB_0011219b:
MOV EAX,EBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* lunasvg::SVGClipPathElement::requiresMasking() const */
ulong __thiscall lunasvg::SVGClipPathElement::requiresMasking(SVGClipPathElement *this)
{
char cVar1;
int8 unaff_RBX;
ulong uVar2;
SVGClipPathElement *pSVar3;
long *plVar4;
long *plVar5;
uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (*(long *)(this + 0x28) == 0) {
pSVar3 = *(SVGClipPathElement **)(this + 0x58);
if (pSVar3 != this + 0x58) {
plVar4 = (long *)0x0;
do {
plVar5 = *(long **)(pSVar3 + 0x10);
if (((plVar5 != (long *)0x0) &&
(cVar1 = (**(code **)(*plVar5 + 0x18))(plVar5), cVar1 != '\0')) &&
((char)plVar5[8] != '\x01')) {
cVar1 = (**(code **)(*plVar5 + 0x30))(plVar5);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*plVar5 + 0x38))(plVar5);
if (cVar1 != '\0') goto LAB_0011219b;
if (*(char *)((long)plVar5 + 0x43) == '\x18') {
if (plVar5[5] != 0) goto LAB_0011219b;
if ((((long *)plVar5[0xb] != plVar5 + 0xb) &&
(plVar5 = (long *)((long *)plVar5[0xb])[2], plVar5 != (long *)0x0)) &&
(cVar1 = (**(code **)(*plVar5 + 0x30))(plVar5), cVar1 != '\0')) goto LAB_0011212f;
}
}
else {
LAB_0011212f:
if (((plVar5[0x13] != 0) && ((char)plVar5[8] != '\x01')) &&
((*(char *)((long)plVar5 + 0x42) == '\0' &&
((plVar4 != (long *)0x0 || (plVar4 = plVar5, plVar5[5] != 0)))))) goto LAB_0011219b;
}
}
pSVar3 = *(SVGClipPathElement **)pSVar3;
} while (pSVar3 != this + 0x58);
}
uVar2 = 0;
}
LAB_0011219b:
return uVar2 & 0xffffffff;
}
|
|
17,526
|
translog_fill_overhead_table
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_fill_overhead_table()
{
uint i;
for (i= 0; i < TRANSLOG_FLAGS_NUM; i++)
{
page_overhead[i]= 7;
if (i & TRANSLOG_PAGE_CRC)
page_overhead[i]+= CRC_SIZE;
if (i & TRANSLOG_SECTOR_PROTECTION)
page_overhead[i]+= TRANSLOG_PAGE_SIZE /
DISK_DRIVE_SECTOR_SIZE;
}
}
|
O0
|
c
|
translog_fill_overhead_table:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
jae 0x2f19f
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc4bb73(%rip), %rax # 0xc7acb0
movl $0x7, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2f16b
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc4bb55(%rip), %rax # 0xc7acb0
movl (%rax,%rcx,4), %edx
addl $0x4, %edx
leaq 0xc4bb48(%rip), %rax # 0xc7acb0
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2f192
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc4bb2e(%rip), %rax # 0xc7acb0
movl (%rax,%rcx,4), %edx
addl $0x10, %edx
leaq 0xc4bb21(%rip), %rax # 0xc7acb0
movl %edx, (%rax,%rcx,4)
jmp 0x2f194
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2f12b
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_fill_overhead_table:
push rbp
mov rbp, rsp
mov [rbp+var_4], 0
loc_2F12B:
cmp [rbp+var_4], 8
jnb short loc_2F19F
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, page_overhead
mov dword ptr [rax+rcx*4], 7
mov eax, [rbp+var_4]
and eax, 1
cmp eax, 0
jz short loc_2F16B
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, page_overhead
mov edx, [rax+rcx*4]
add edx, 4
lea rax, page_overhead
mov [rax+rcx*4], edx
loc_2F16B:
mov eax, [rbp+var_4]
and eax, 2
cmp eax, 0
jz short loc_2F192
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, page_overhead
mov edx, [rax+rcx*4]
add edx, 10h
lea rax, page_overhead
mov [rax+rcx*4], edx
loc_2F192:
jmp short $+2
loc_2F194:
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_2F12B
loc_2F19F:
pop rbp
retn
|
long long translog_fill_overhead_table()
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-4h]
for ( i = 0; i < 8; ++i )
{
page_overhead[i] = 7;
if ( (i & 1) != 0 )
page_overhead[i] += 4;
if ( (i & 2) != 0 )
page_overhead[i] += 16;
result = i + 1;
}
return result;
}
|
translog_fill_overhead_table:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],0x0
LAB_0012f12b:
CMP dword ptr [RBP + -0x4],0x8
JNC 0x0012f19f
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0xd7acb0]
MOV dword ptr [RAX + RCX*0x4],0x7
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0012f16b
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0xd7acb0]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,0x4
LEA RAX,[0xd7acb0]
MOV dword ptr [RAX + RCX*0x4],EDX
LAB_0012f16b:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0012f192
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0xd7acb0]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,0x10
LEA RAX,[0xd7acb0]
MOV dword ptr [RAX + RCX*0x4],EDX
LAB_0012f192:
JMP 0x0012f194
LAB_0012f194:
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012f12b
LAB_0012f19f:
POP RBP
RET
|
void translog_fill_overhead_table(void)
{
uint local_c;
for (local_c = 0; local_c < 8; local_c = local_c + 1) {
*(int4 *)(page_overhead + (ulong)local_c * 4) = 7;
if ((local_c & 1) != 0) {
*(int *)(page_overhead + (ulong)local_c * 4) =
*(int *)(page_overhead + (ulong)local_c * 4) + 4;
}
if ((local_c & 2) != 0) {
*(int *)(page_overhead + (ulong)local_c * 4) =
*(int *)(page_overhead + (ulong)local_c * 4) + 0x10;
}
}
return;
}
|
|
17,527
|
my_hash_sort_bin
|
eloqsql/strings/ctype-bin.c
|
void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
const uchar *end = key + len;
ulong tmp1= *nr1;
ulong tmp2= *nr2;
for (; key < end ; key++)
{
MY_HASH_ADD(tmp1, tmp2, (uint) *key);
}
*nr1= tmp1;
*nr2= tmp2;
}
|
O0
|
c
|
my_hash_sort_bin:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3d18e
jmp 0x3d146
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x3d180
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3d13a
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_sort_bin:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
loc_3D13A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb short loc_3D18E
jmp short $+2
loc_3D146:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_3D180:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_3D13A
loc_3D18E:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
pop rbp
retn
|
_QWORD * my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+8h] [rbp-38h]
unsigned __int8 *v8; // [rsp+30h] [rbp-10h]
v8 = a2;
v7 = *a4;
v6 = *a5;
while ( v8 < &a2[a3] )
{
v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F));
v6 += 3LL;
++v8;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
|
my_hash_sort_bin:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013d13a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0013d18e
JMP 0x0013d146
LAB_0013d146:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013d180
LAB_0013d180:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013d13a
LAB_0013d18e:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)*local_18 + local_40 * 0x100 ^ local_40;
local_48 = local_48 + 3;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
|
|
17,528
|
init_partitioned_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
}
|
O3
|
c
|
init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x60(%rbp)
movl %r8d, -0x5c(%rbp)
movl %ecx, -0x58(%rbp)
movl 0x1c(%rdi), %r14d
movl %esi, -0x54(%rbp)
movl %esi, 0x18(%rdi)
cmpb $0x0, (%rdi)
movq %rdi, -0x38(%rbp)
je 0x9a478
movq %rdi, %r15
movq 0x8(%rdi), %r12
jmp 0x9a4bd
movq %rdx, %rbx
leaq 0xb6dd76(%rip), %rax # 0xc081f8
movl (%rax), %edi
leaq (,%r14,8), %r15
movl $0x10, %edx
movq %r15, %rsi
callq 0x9fd51
testq %rax, %rax
je 0x9a686
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x292a0
movq -0x38(%rbp), %r15
movq %r12, 0x8(%r15)
movq %rbx, %rdx
xorl %edi, %edi
movq %rdx, -0x40(%rbp)
movq %rdx, %rax
xorl %edx, %edx
divq %r14
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rax, -0x50(%rbp)
mulq %rcx
testl %r14d, %r14d
jle 0x9a62e
shrq $0x2, %rdx
movq %rdx, -0x68(%rbp)
movq $0x0, -0x48(%rbp)
xorl %ebx, %ebx
movb (%r15), %r13b
testb %r13b, %r13b
movq %r12, -0x30(%rbp)
je 0x9a509
movq (%r12), %r12
jmp 0x9a530
leaq 0xb6dce8(%rip), %rax # 0xc081f8
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0x9fd51
testq %rax, %rax
je 0x9a5ba
movq %rax, %r12
movb $0x0, (%rax)
movq %r12, %rdi
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl -0x60(%rbp), %r9d
callq 0x98a65
movl %eax, %r15d
testl %eax, %eax
jle 0x9a573
movq -0x48(%rbp), %rax
addl %r15d, %eax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %r12, (%rax)
movq %rax, %r12
addq $0x8, %r12
movq -0x38(%rbp), %r15
jmp 0x9a616
movq %r12, %rdi
movl $0x1, %esi
callq 0x99966
testb %r13b, %r13b
je 0x9a5c0
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0x9a598
andb %cl, %al
je 0x9a5db
movq %r12, %rdi
callq 0x9ff7e
movq -0x30(%rbp), %rdi
leaq 0x8(%rdi), %rsi
movl %ebx, %edx
notl %edx
addl %r14d, %edx
shlq $0x3, %rdx
callq 0x29110
jmp 0x9a5f3
movq -0x30(%rbp), %r12
jmp 0x9a616
movq %r12, %rdi
callq 0x9ff7e
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0x9a5f3
andb %cl, %al
jne 0x9a5f3
movq -0x40(%rbp), %rax
subq -0x68(%rbp), %rax
movq -0x38(%rbp), %r15
jbe 0x9a68d
movq -0x30(%rbp), %r12
jmp 0x9a604
decl %r14d
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
je 0x9a621
decl %ebx
movl %r14d, %ecx
movq %rax, -0x40(%rbp)
xorl %edx, %edx
divq %rcx
movq %rax, -0x50(%rbp)
incl %ebx
cmpl %r14d, %ebx
jl 0x9a4f7
movq %r12, %rcx
movq 0x8(%r15), %r12
movq -0x48(%rbp), %rdi
jmp 0x9a631
movq %r12, %rcx
subq %r12, %rcx
shrq $0x3, %rcx
movl %ecx, 0x1c(%r15)
movl %ecx, %eax
imulq -0x50(%rbp), %rax
movq %rax, 0x10(%r15)
testl %ecx, %ecx
jle 0x9a66a
movl %ecx, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %edx, %edx
movq 0x8(%r15), %rsi
movq (%rsi,%rdx,8), %rsi
movl %ecx, 0x164(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x9a654
movb $0x1, (%r15)
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl %edi, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x9a677
movq -0x30(%rbp), %r12
jmp 0x9a621
|
init_partitioned_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9d
mov [rbp+var_5C], r8d
mov [rbp+var_58], ecx
mov r14d, [rdi+1Ch]
mov [rbp+var_54], esi
mov [rdi+18h], esi
cmp byte ptr [rdi], 0
mov [rbp+var_38], rdi
jz short loc_9A478
mov r15, rdi
mov r12, [rdi+8]
jmp short loc_9A4BD
loc_9A478:
mov rbx, rdx
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
lea r15, ds:0[r14*8]
mov edx, 10h
mov rsi, r15
call my_malloc
test rax, rax
jz loc_9A686
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r15
call _memset
mov r15, [rbp+var_38]
mov [r15+8], r12
mov rdx, rbx
loc_9A4BD:
xor edi, edi
mov [rbp+var_40], rdx
mov rax, rdx
xor edx, edx
div r14
mov rcx, 0CCCCCCCCCCCCCCCDh
mov [rbp+var_50], rax
mul rcx
test r14d, r14d
jle loc_9A62E
shr rdx, 2
mov [rbp+var_68], rdx
mov [rbp+var_48], 0
xor ebx, ebx
loc_9A4F7:
mov r13b, [r15]
test r13b, r13b
mov [rbp+var_30], r12
jz short loc_9A509
mov r12, [r12]
jmp short loc_9A530
loc_9A509:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
test rax, rax
jz loc_9A5BA
mov r12, rax
mov byte ptr [rax], 0
loc_9A530:
mov rdi, r12
mov esi, [rbp+var_54]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_58]
mov r8d, [rbp+var_5C]
mov r9d, [rbp+var_60]
call init_simple_key_cache
mov r15d, eax
test eax, eax
jle short loc_9A573
mov rax, [rbp+var_48]
add eax, r15d
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rax], r12
mov r12, rax
add r12, 8
mov r15, [rbp+var_38]
jmp loc_9A616
loc_9A573:
mov rdi, r12
mov esi, 1
call end_simple_key_cache
test r13b, r13b
jz short loc_9A5C0
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_9A598
and al, cl
jz short loc_9A5DB
loc_9A598:
mov rdi, r12
call my_free
mov rdi, [rbp+var_30]
lea rsi, [rdi+8]
mov edx, ebx
not edx
add edx, r14d
shl rdx, 3
call _memmove
jmp short loc_9A5F3
loc_9A5BA:
mov r12, [rbp+var_30]
jmp short loc_9A616
loc_9A5C0:
mov rdi, r12
call my_free
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_9A5F3
and al, cl
jnz short loc_9A5F3
loc_9A5DB:
mov rax, [rbp+var_40]
sub rax, [rbp+var_68]
mov r15, [rbp+var_38]
jbe loc_9A68D
mov r12, [rbp+var_30]
jmp short loc_9A604
loc_9A5F3:
dec r14d
mov r15, [rbp+var_38]
mov rax, [rbp+var_40]
mov r12, [rbp+var_30]
jz short loc_9A621
loc_9A604:
dec ebx
mov ecx, r14d
mov [rbp+var_40], rax
xor edx, edx
div rcx
mov [rbp+var_50], rax
loc_9A616:
inc ebx
cmp ebx, r14d
jl loc_9A4F7
loc_9A621:
mov rcx, r12
mov r12, [r15+8]
mov rdi, [rbp+var_48]
jmp short loc_9A631
loc_9A62E:
mov rcx, r12
loc_9A631:
sub rcx, r12
shr rcx, 3
mov [r15+1Ch], ecx
mov eax, ecx
imul rax, [rbp+var_50]
mov [r15+10h], rax
test ecx, ecx
jle short loc_9A66A
mov eax, ecx
and eax, 7FFFFFFFh
xor edx, edx
loc_9A654:
mov rsi, [r15+8]
mov rsi, [rsi+rdx*8]
mov [rsi+164h], ecx
inc rdx
cmp rax, rdx
jnz short loc_9A654
loc_9A66A:
mov byte ptr [r15], 1
xor eax, eax
cmp ecx, 1
sbb eax, eax
or eax, edi
loc_9A677:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A686:
mov eax, 0FFFFFFFFh
jmp short loc_9A677
loc_9A68D:
mov r12, [rbp+var_30]
jmp short loc_9A621
|
long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
unsigned long long v6; // r14
char *v7; // r15
char **v8; // r12
unsigned long long v9; // rbx
long long v10; // rax
int v11; // edi
unsigned __int128 v12; // rax
int v13; // ebx
char v14; // r13
char *v15; // r12
char *v16; // rax
int inited; // r15d
unsigned long long v18; // rax
char **v19; // rcx
unsigned long long v20; // rcx
long long v21; // rdx
unsigned long long v23; // [rsp+8h] [rbp-68h]
unsigned long long v27; // [rsp+20h] [rbp-50h]
int v28; // [rsp+28h] [rbp-48h]
unsigned long long v29; // [rsp+30h] [rbp-40h]
char **v31; // [rsp+40h] [rbp-30h]
v6 = *((unsigned int *)a1 + 7);
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v7 = a1;
v8 = (char **)*((_QWORD *)a1 + 1);
}
else
{
v9 = a3;
v10 = my_malloc(key_memory_KEY_CACHE, 8 * v6, 16LL);
if ( !v10 )
return 0xFFFFFFFFLL;
v8 = (char **)v10;
memset(v10, 0LL, 8 * v6);
v7 = a1;
*((_QWORD *)a1 + 1) = v8;
a3 = v9;
}
v11 = 0;
v29 = a3;
v27 = a3 / v6;
v12 = 0xCCCCCCCCCCCCCCCDLL * (unsigned __int128)(a3 / v6);
if ( (int)v6 <= 0 )
{
v19 = v8;
goto LABEL_27;
}
v23 = *((_QWORD *)&v12 + 1) >> 2;
v28 = 0;
v13 = 0;
while ( 1 )
{
v14 = *v7;
v31 = v8;
if ( *v7 )
{
v15 = *v8;
}
else
{
v16 = (char *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL);
if ( !v16 )
goto LABEL_24;
v15 = v16;
*v16 = 0;
}
inited = init_simple_key_cache(v15, a2, v27, a4, a5, a6);
if ( inited <= 0 )
break;
v28 += inited;
*v31 = v15;
v8 = v31 + 1;
v7 = a1;
LABEL_24:
if ( ++v13 >= (int)v6 )
goto LABEL_25;
}
end_simple_key_cache((long long)v15, 1);
if ( v14 )
{
if ( v13 > 0 || inited != 0 && v13 == 0 )
{
my_free(v15);
memmove(v31, v31 + 1, 8LL * (unsigned int)(v6 + ~v13));
goto LABEL_22;
}
}
else
{
my_free(v15);
if ( v13 > 0 || inited != 0 && v13 == 0 )
{
LABEL_22:
LODWORD(v6) = v6 - 1;
v7 = a1;
v18 = v29;
v8 = v31;
if ( !(_DWORD)v6 )
goto LABEL_25;
goto LABEL_23;
}
}
v18 = v29 - v23;
v7 = a1;
if ( v29 > v23 )
{
v8 = v31;
LABEL_23:
--v13;
v29 = v18;
v27 = v18 / (unsigned int)v6;
goto LABEL_24;
}
v8 = v31;
LABEL_25:
v19 = v8;
v8 = (char **)*((_QWORD *)v7 + 1);
v11 = v28;
LABEL_27:
v20 = (unsigned long long)((char *)v19 - (char *)v8) >> 3;
*((_DWORD *)v7 + 7) = v20;
*((_QWORD *)v7 + 2) = v27 * (unsigned int)v20;
if ( (int)v20 > 0 )
{
v21 = 0LL;
do
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)v7 + 1) + 8 * v21++) + 356LL) = v20;
while ( (v20 & 0x7FFFFFFF) != v21 );
}
*v7 = 1;
return v11 | (unsigned int)-((_DWORD)v20 == 0);
}
|
init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x60],R9D
MOV dword ptr [RBP + -0x5c],R8D
MOV dword ptr [RBP + -0x58],ECX
MOV R14D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x54],ESI
MOV dword ptr [RDI + 0x18],ESI
CMP byte ptr [RDI],0x0
MOV qword ptr [RBP + -0x38],RDI
JZ 0x0019a478
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x8]
JMP 0x0019a4bd
LAB_0019a478:
MOV RBX,RDX
LEA RAX,[0xd081f8]
MOV EDI,dword ptr [RAX]
LEA R15,[R14*0x8]
MOV EDX,0x10
MOV RSI,R15
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x0019a686
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R15
CALL 0x001292a0
MOV R15,qword ptr [RBP + -0x38]
MOV qword ptr [R15 + 0x8],R12
MOV RDX,RBX
LAB_0019a4bd:
XOR EDI,EDI
MOV qword ptr [RBP + -0x40],RDX
MOV RAX,RDX
XOR EDX,EDX
DIV R14
MOV RCX,-0x3333333333333333
MOV qword ptr [RBP + -0x50],RAX
MUL RCX
TEST R14D,R14D
JLE 0x0019a62e
SHR RDX,0x2
MOV qword ptr [RBP + -0x68],RDX
MOV qword ptr [RBP + -0x48],0x0
XOR EBX,EBX
LAB_0019a4f7:
MOV R13B,byte ptr [R15]
TEST R13B,R13B
MOV qword ptr [RBP + -0x30],R12
JZ 0x0019a509
MOV R12,qword ptr [R12]
JMP 0x0019a530
LAB_0019a509:
LEA RAX,[0xd081f8]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x0019a5ba
MOV R12,RAX
MOV byte ptr [RAX],0x0
LAB_0019a530:
MOV RDI,R12
MOV ESI,dword ptr [RBP + -0x54]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x58]
MOV R8D,dword ptr [RBP + -0x5c]
MOV R9D,dword ptr [RBP + -0x60]
CALL 0x00198a65
MOV R15D,EAX
TEST EAX,EAX
JLE 0x0019a573
MOV RAX,qword ptr [RBP + -0x48]
ADD EAX,R15D
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],R12
MOV R12,RAX
ADD R12,0x8
MOV R15,qword ptr [RBP + -0x38]
JMP 0x0019a616
LAB_0019a573:
MOV RDI,R12
MOV ESI,0x1
CALL 0x00199966
TEST R13B,R13B
JZ 0x0019a5c0
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x0019a598
AND AL,CL
JZ 0x0019a5db
LAB_0019a598:
MOV RDI,R12
CALL 0x0019ff7e
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RDI + 0x8]
MOV EDX,EBX
NOT EDX
ADD EDX,R14D
SHL RDX,0x3
CALL 0x00129110
JMP 0x0019a5f3
LAB_0019a5ba:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x0019a616
LAB_0019a5c0:
MOV RDI,R12
CALL 0x0019ff7e
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x0019a5f3
AND AL,CL
JNZ 0x0019a5f3
LAB_0019a5db:
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x68]
MOV R15,qword ptr [RBP + -0x38]
JBE 0x0019a68d
MOV R12,qword ptr [RBP + -0x30]
JMP 0x0019a604
LAB_0019a5f3:
DEC R14D
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV R12,qword ptr [RBP + -0x30]
JZ 0x0019a621
LAB_0019a604:
DEC EBX
MOV ECX,R14D
MOV qword ptr [RBP + -0x40],RAX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_0019a616:
INC EBX
CMP EBX,R14D
JL 0x0019a4f7
LAB_0019a621:
MOV RCX,R12
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBP + -0x48]
JMP 0x0019a631
LAB_0019a62e:
MOV RCX,R12
LAB_0019a631:
SUB RCX,R12
SHR RCX,0x3
MOV dword ptr [R15 + 0x1c],ECX
MOV EAX,ECX
IMUL RAX,qword ptr [RBP + -0x50]
MOV qword ptr [R15 + 0x10],RAX
TEST ECX,ECX
JLE 0x0019a66a
MOV EAX,ECX
AND EAX,0x7fffffff
XOR EDX,EDX
LAB_0019a654:
MOV RSI,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV dword ptr [RSI + 0x164],ECX
INC RDX
CMP RAX,RDX
JNZ 0x0019a654
LAB_0019a66a:
MOV byte ptr [R15],0x1
XOR EAX,EAX
CMP ECX,0x1
SBB EAX,EAX
OR EAX,EDI
LAB_0019a677:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a686:
MOV EAX,0xffffffff
JMP 0x0019a677
LAB_0019a68d:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x0019a621
|
uint init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5
,int4 param_6)
{
char cVar1;
int iVar2;
uint uVar3;
int8 *__s;
int1 *puVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
int8 *puVar8;
uint uVar9;
bool bVar10;
ulong local_58;
ulong local_48;
uVar7 = *(uint *)(param_1 + 0x1c);
uVar5 = (ulong)uVar7;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
__s = (int8 *)my_malloc(key_memory_KEY_CACHE,uVar5 * 8,0x10);
if (__s == (int8 *)0x0) {
return 0xffffffff;
}
memset(__s,0,uVar5 * 8);
*(int8 **)(param_1 + 8) = __s;
}
else {
__s = *(int8 **)(param_1 + 8);
}
uVar3 = 0;
local_58 = param_3 / uVar5;
puVar8 = __s;
if (0 < (int)uVar7) {
uVar6 = local_58 / 5;
uVar3 = 0;
uVar7 = 0;
local_48 = param_3;
do {
cVar1 = *param_1;
if (cVar1 == '\0') {
puVar4 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (puVar4 != (int1 *)0x0) {
*puVar4 = 0;
goto LAB_0019a530;
}
}
else {
puVar4 = (int1 *)*__s;
LAB_0019a530:
iVar2 = init_simple_key_cache(puVar4,param_2,local_58,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(puVar4,1);
if (cVar1 == '\0') {
my_free(puVar4);
if (((int)uVar7 < 1) && (uVar7 != 0 || iVar2 == 0)) goto LAB_0019a5db;
LAB_0019a5f3:
uVar9 = (int)uVar5 - 1;
uVar5 = (ulong)uVar9;
if (uVar9 == 0) break;
}
else {
if ((0 < (int)uVar7) || (uVar7 == 0 && iVar2 != 0)) {
my_free(puVar4);
memmove(__s,__s + 1,(ulong)(~uVar7 + (int)uVar5) << 3);
goto LAB_0019a5f3;
}
LAB_0019a5db:
bVar10 = local_48 < uVar6;
local_48 = local_48 - uVar6;
if (bVar10 || local_48 == 0) break;
}
uVar7 = uVar7 - 1;
local_58 = local_48 / uVar5;
}
else {
uVar3 = uVar3 + iVar2;
*__s = puVar4;
__s = __s + 1;
}
}
uVar7 = uVar7 + 1;
} while ((int)uVar7 < (int)uVar5);
puVar8 = *(int8 **)(param_1 + 8);
}
uVar5 = (ulong)((long)__s - (long)puVar8) >> 3;
uVar7 = (uint)uVar5;
*(uint *)(param_1 + 0x1c) = uVar7;
*(ulong *)(param_1 + 0x10) = (uVar5 & 0xffffffff) * local_58;
if (0 < (int)uVar7) {
uVar5 = 0;
do {
*(uint *)(*(long *)(*(long *)(param_1 + 8) + uVar5 * 8) + 0x164) = uVar7;
uVar5 = uVar5 + 1;
} while ((uVar7 & 0x7fffffff) != uVar5);
}
*param_1 = '\x01';
return -(uint)(uVar7 == 0) | uVar3;
}
|
|
17,529
|
js_create_module_function
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_create_module_function(JSContext *ctx, JSModuleDef *m)
{
BOOL is_c_module;
int i;
JSVarRef *var_ref;
if (m->func_created)
return 0;
is_c_module = (m->init_func != NULL);
if (is_c_module) {
/* initialize the exported variables */
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL) {
var_ref = js_create_module_var(ctx, FALSE);
if (!var_ref)
return -1;
me->u.local.var_ref = var_ref;
}
}
} else {
if (js_create_module_bytecode_function(ctx, m))
return -1;
}
m->func_created = TRUE;
/* do it on the dependencies */
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
if (js_create_module_function(ctx, rme->module) < 0)
return -1;
}
return 0;
}
|
O1
|
c
|
js_create_module_function:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %ebp, %ebp
cmpb $0x0, 0x82(%rsi)
jne 0x4458a
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x78(%rsi)
je 0x444c0
cmpl $0x0, 0x30(%r14)
jle 0x44548
movl $0x10, %r15d
xorl %r12d, %r12d
movq 0x28(%r14), %r13
cmpl $0x0, (%r13,%r15)
je 0x444aa
incq %r12
movslq 0x30(%r14), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x44489
jmp 0x44548
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1103b
testq %rax, %rax
je 0x444f3
movq %rax, -0x8(%r13,%r15)
jmp 0x44495
movsd 0x68(%r14), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x70(%r14), %r15
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0xd, %ecx
callq 0x20f05
movq %rdx, %r12
movq %rax, 0x8(%rsp)
cmpl $0x6, %r12d
jne 0x444fd
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x4458a
movq %r15, 0x20(%rsp)
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %r15
movq %r13, 0x30(%r15)
incl (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r15)
movslq 0x5c(%r13), %rsi
testq %rsi, %rsi
jne 0x4459b
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x68(%r14)
movq %r12, 0x70(%r14)
movq 0x10(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq 0x20(%rsp), %rdx
callq 0x1d8c6
movb $0x1, 0x82(%r14)
cmpl $0x0, 0x20(%r14)
jle 0x4458a
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x18(%r14), %rax
movq (%rax,%r15), %rsi
movq %rbx, %rdi
callq 0x4444b
testl %eax, %eax
js 0x444f3
incq %r12
movslq 0x20(%r14), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x44560
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0xee06
testq %rax, %rax
je 0x44607
movq %rax, %rcx
addq $0x38, %r15
movq %rax, (%r15)
cmpl $0x0, 0x5c(%r13)
jle 0x44525
xorl %r15d, %r15d
movq %rcx, 0x18(%rsp)
movq 0x38(%r13), %rax
movzbl (%rax,%r15,8), %esi
testb $0x1, %sil
jne 0x445e9
incq %r15
movslq 0x5c(%r13), %rax
cmpq %rax, %r15
jl 0x445c9
jmp 0x44525
shrl $0x3, %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x1103b
movq 0x18(%rsp), %rcx
testq %rax, %rax
je 0x44607
movq %rax, (%rcx,%r15,8)
jmp 0x445d8
movq 0x8(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x444f3
|
js_create_module_function:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
xor ebp, ebp
cmp byte ptr [rsi+82h], 0
jnz loc_4458A
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rsi+78h], 0
jz short loc_444C0
cmp dword ptr [r14+30h], 0
jle loc_44548
mov r15d, 10h
xor r12d, r12d
loc_44489:
mov r13, [r14+28h]
cmp dword ptr [r13+r15+0], 0
jz short loc_444AA
loc_44495:
inc r12
movsxd rax, dword ptr [r14+30h]
add r15, 20h ; ' '
cmp r12, rax
jl short loc_44489
jmp loc_44548
loc_444AA:
mov rdi, rbx
xor esi, esi
call js_create_module_var
test rax, rax
jz short loc_444F3
mov [r13+r15-8], rax
jmp short loc_44495
loc_444C0:
movsd xmm0, qword ptr [r14+68h]
movsd [rsp+58h+var_48], xmm0
mov r15, [r14+70h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 0Dh
call JS_NewObjectProtoClass
mov r12, rdx
mov [rsp+58h+var_50], rax
cmp r12d, 6
jnz short loc_444FD
loc_444F3:
mov ebp, 0FFFFFFFFh
jmp loc_4458A
loc_444FD:
mov [rsp+58h+var_38], r15
mov r13, [rsp+58h+var_48]
mov r15, [rsp+58h+var_50]
mov [r15+30h], r13
inc dword ptr [r13+0]
xorps xmm0, xmm0
movups xmmword ptr [r15+38h], xmm0
movsxd rsi, dword ptr [r13+5Ch]
test rsi, rsi
jnz short loc_4459B
loc_44525:
movsd xmm0, [rsp+58h+var_50]
movsd qword ptr [r14+68h], xmm0
mov [r14+70h], r12
mov rsi, [rsp+58h+var_48]
mov rdi, [rbx+18h]
mov rdx, [rsp+58h+var_38]
call JS_FreeValueRT
loc_44548:
mov byte ptr [r14+82h], 1
cmp dword ptr [r14+20h], 0
jle short loc_4458A
mov r15d, 8
xor r12d, r12d
loc_44560:
mov rax, [r14+18h]
mov rsi, [rax+r15]
mov rdi, rbx
call js_create_module_function
test eax, eax
js loc_444F3
inc r12
movsxd rax, dword ptr [r14+20h]
add r15, 10h
cmp r12, rax
jl short loc_44560
xor ebp, ebp
loc_4458A:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4459B:
shl rsi, 3
mov rdi, rbx
call js_mallocz
test rax, rax
jz short loc_44607
mov rcx, rax
add r15, 38h ; '8'
mov [r15], rax
cmp dword ptr [r13+5Ch], 0
jle loc_44525
xor r15d, r15d
mov [rsp+58h+var_40], rcx
loc_445C9:
mov rax, [r13+38h]
movzx esi, byte ptr [rax+r15*8]
test sil, 1
jnz short loc_445E9
loc_445D8:
inc r15
movsxd rax, dword ptr [r13+5Ch]
cmp r15, rax
jl short loc_445C9
jmp loc_44525
loc_445E9:
shr esi, 3
and esi, 1
mov rdi, rbx
call js_create_module_var
mov rcx, [rsp+58h+var_40]
test rax, rax
jz short loc_44607
mov [rcx+r15*8], rax
jmp short loc_445D8
loc_44607:
mov rsi, [rsp+58h+var_50]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_444F3
|
long long js_create_module_function(long long *a1, long long a2)
{
unsigned int v2; // ebp
long long v4; // r15
long long v5; // r12
long long v6; // r13
long long module_var; // rax
long long v8; // r15
long long v9; // rax
long long v10; // rdx
long long v11; // r12
long long v12; // r15
long long v13; // r12
long long v15; // rax
long long v16; // r15
unsigned int v17; // esi
long long v18; // rax
long long v19; // [rsp+8h] [rbp-50h]
long long v20; // [rsp+10h] [rbp-48h]
long long v21; // [rsp+18h] [rbp-40h]
long long v22; // [rsp+20h] [rbp-38h]
v2 = 0;
if ( !*(_BYTE *)(a2 + 130) )
{
if ( *(_QWORD *)(a2 + 120) )
{
if ( *(int *)(a2 + 48) > 0 )
{
v4 = 16LL;
v5 = 0LL;
while ( 1 )
{
v6 = *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v6 + v4) )
{
module_var = js_create_module_var((long long)a1, 0);
if ( !module_var )
return (unsigned int)-1;
*(_QWORD *)(v6 + v4 - 8) = module_var;
}
++v5;
v4 += 32LL;
if ( v5 >= *(int *)(a2 + 48) )
goto LABEL_14;
}
}
goto LABEL_14;
}
v20 = *(_QWORD *)(a2 + 104);
v8 = *(_QWORD *)(a2 + 112);
v9 = JS_NewObjectProtoClass((long long)a1, a1[9], a1[10], 0xDu);
v11 = v10;
v19 = v9;
if ( (_DWORD)v10 == 6 )
return (unsigned int)-1;
v22 = v8;
*(_QWORD *)(v9 + 48) = v20;
++*(_DWORD *)v20;
*(_OWORD *)(v9 + 56) = 0LL;
if ( *(_DWORD *)(v20 + 92) )
{
v15 = js_mallocz((long long)a1, 8LL * *(int *)(v20 + 92));
if ( !v15 )
{
LABEL_28:
JS_FreeValueRT(a1[3], (_DWORD *)v19, v11);
return (unsigned int)-1;
}
*(_QWORD *)(v19 + 56) = v15;
if ( *(int *)(v20 + 92) > 0 )
{
v16 = 0LL;
v21 = v15;
do
{
v17 = *(unsigned __int8 *)(*(_QWORD *)(v20 + 56) + 8 * v16);
if ( (v17 & 1) != 0 )
{
v18 = js_create_module_var((long long)a1, (v17 >> 3) & 1);
if ( !v18 )
goto LABEL_28;
*(_QWORD *)(v21 + 8 * v16) = v18;
}
++v16;
}
while ( v16 < *(int *)(v20 + 92) );
}
}
*(_QWORD *)(a2 + 104) = v19;
*(_QWORD *)(a2 + 112) = v11;
JS_FreeValueRT(a1[3], (_DWORD *)v20, v22);
LABEL_14:
*(_BYTE *)(a2 + 130) = 1;
if ( *(int *)(a2 + 32) <= 0 )
return v2;
v12 = 8LL;
v13 = 0LL;
while ( (int)js_create_module_function(a1, *(_QWORD *)(*(_QWORD *)(a2 + 24) + v12)) >= 0 )
{
++v13;
v12 += 16LL;
if ( v13 >= *(int *)(a2 + 32) )
return 0;
}
return (unsigned int)-1;
}
return v2;
}
|
js_create_module_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
XOR EBP,EBP
CMP byte ptr [RSI + 0x82],0x0
JNZ 0x0014458a
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x78],0x0
JZ 0x001444c0
CMP dword ptr [R14 + 0x30],0x0
JLE 0x00144548
MOV R15D,0x10
XOR R12D,R12D
LAB_00144489:
MOV R13,qword ptr [R14 + 0x28]
CMP dword ptr [R13 + R15*0x1],0x0
JZ 0x001444aa
LAB_00144495:
INC R12
MOVSXD RAX,dword ptr [R14 + 0x30]
ADD R15,0x20
CMP R12,RAX
JL 0x00144489
JMP 0x00144548
LAB_001444aa:
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0011103b
TEST RAX,RAX
JZ 0x001444f3
MOV qword ptr [R13 + R15*0x1 + -0x8],RAX
JMP 0x00144495
LAB_001444c0:
MOVSD XMM0,qword ptr [R14 + 0x68]
MOVSD qword ptr [RSP + 0x10],XMM0
MOV R15,qword ptr [R14 + 0x70]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0xd
CALL 0x00120f05
MOV R12,RDX
MOV qword ptr [RSP + 0x8],RAX
CMP R12D,0x6
JNZ 0x001444fd
LAB_001444f3:
MOV EBP,0xffffffff
JMP 0x0014458a
LAB_001444fd:
MOV qword ptr [RSP + 0x20],R15
MOV R13,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x30],R13
INC dword ptr [R13]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x38],XMM0
MOVSXD RSI,dword ptr [R13 + 0x5c]
TEST RSI,RSI
JNZ 0x0014459b
LAB_00144525:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [R14 + 0x68],XMM0
MOV qword ptr [R14 + 0x70],R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011d8c6
LAB_00144548:
MOV byte ptr [R14 + 0x82],0x1
CMP dword ptr [R14 + 0x20],0x0
JLE 0x0014458a
MOV R15D,0x8
XOR R12D,R12D
LAB_00144560:
MOV RAX,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RAX + R15*0x1]
MOV RDI,RBX
CALL 0x0014444b
TEST EAX,EAX
JS 0x001444f3
INC R12
MOVSXD RAX,dword ptr [R14 + 0x20]
ADD R15,0x10
CMP R12,RAX
JL 0x00144560
XOR EBP,EBP
LAB_0014458a:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014459b:
SHL RSI,0x3
MOV RDI,RBX
CALL 0x0010ee06
TEST RAX,RAX
JZ 0x00144607
MOV RCX,RAX
ADD R15,0x38
MOV qword ptr [R15],RAX
CMP dword ptr [R13 + 0x5c],0x0
JLE 0x00144525
XOR R15D,R15D
MOV qword ptr [RSP + 0x18],RCX
LAB_001445c9:
MOV RAX,qword ptr [R13 + 0x38]
MOVZX ESI,byte ptr [RAX + R15*0x8]
TEST SIL,0x1
JNZ 0x001445e9
LAB_001445d8:
INC R15
MOVSXD RAX,dword ptr [R13 + 0x5c]
CMP R15,RAX
JL 0x001445c9
JMP 0x00144525
LAB_001445e9:
SHR ESI,0x3
AND ESI,0x1
MOV RDI,RBX
CALL 0x0011103b
MOV RCX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00144607
MOV qword ptr [RCX + R15*0x8],RAX
JMP 0x001445d8
LAB_00144607:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011d8c6
JMP 0x001444f3
|
int8 js_create_module_function(long param_1,long param_2)
{
int *piVar1;
byte bVar2;
int8 uVar3;
int iVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
int1 auVar9 [16];
if (*(char *)(param_2 + 0x82) != '\0') {
return 0;
}
if (*(long *)(param_2 + 0x78) == 0) {
piVar1 = *(int **)(param_2 + 0x68);
uVar3 = *(int8 *)(param_2 + 0x70);
auVar9 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),0xd)
;
lVar6 = auVar9._0_8_;
if (auVar9._8_4_ == 6) {
return 0xffffffff;
}
*(int **)(lVar6 + 0x30) = piVar1;
*piVar1 = *piVar1 + 1;
*(int8 *)(lVar6 + 0x38) = 0;
*(int8 *)(lVar6 + 0x40) = 0;
if ((long)piVar1[0x17] != 0) {
lVar7 = js_mallocz(param_1,(long)piVar1[0x17] << 3);
if (lVar7 == 0) {
LAB_00144607:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar6,auVar9._8_8_);
return 0xffffffff;
}
*(long *)(lVar6 + 0x38) = lVar7;
if (0 < piVar1[0x17]) {
lVar8 = 0;
do {
bVar2 = *(byte *)(*(long *)(piVar1 + 0xe) + lVar8 * 8);
if ((bVar2 & 1) != 0) {
lVar5 = js_create_module_var(param_1,bVar2 >> 3 & 1);
if (lVar5 == 0) goto LAB_00144607;
*(long *)(lVar7 + lVar8 * 8) = lVar5;
}
lVar8 = lVar8 + 1;
} while (lVar8 < piVar1[0x17]);
}
}
*(int1 (*) [16])(param_2 + 0x68) = auVar9;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar1,uVar3);
}
else if (0 < *(int *)(param_2 + 0x30)) {
lVar7 = 0x10;
lVar6 = 0;
do {
lVar8 = *(long *)(param_2 + 0x28);
if (*(int *)(lVar8 + lVar7) == 0) {
lVar5 = js_create_module_var(param_1,0);
if (lVar5 == 0) {
return 0xffffffff;
}
*(long *)(lVar8 + -8 + lVar7) = lVar5;
}
lVar6 = lVar6 + 1;
lVar7 = lVar7 + 0x20;
} while (lVar6 < *(int *)(param_2 + 0x30));
}
*(int1 *)(param_2 + 0x82) = 1;
if (0 < *(int *)(param_2 + 0x20)) {
lVar7 = 8;
lVar6 = 0;
do {
iVar4 = js_create_module_function(param_1,*(int8 *)(*(long *)(param_2 + 0x18) + lVar7));
if (iVar4 < 0) {
return 0xffffffff;
}
lVar6 = lVar6 + 1;
lVar7 = lVar7 + 0x10;
} while (lVar6 < *(int *)(param_2 + 0x20));
}
return 0;
}
|
|
17,530
|
js_create_module_function
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_create_module_function(JSContext *ctx, JSModuleDef *m)
{
BOOL is_c_module;
int i;
JSVarRef *var_ref;
if (m->func_created)
return 0;
is_c_module = (m->init_func != NULL);
if (is_c_module) {
/* initialize the exported variables */
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL) {
var_ref = js_create_module_var(ctx, FALSE);
if (!var_ref)
return -1;
me->u.local.var_ref = var_ref;
}
}
} else {
if (js_create_module_bytecode_function(ctx, m))
return -1;
}
m->func_created = TRUE;
/* do it on the dependencies */
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
if (js_create_module_function(ctx, rme->module) < 0)
return -1;
}
return 0;
}
|
O2
|
c
|
js_create_module_function:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x82(%rsi)
je 0x3bfcd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x78(%rsi)
pushq $-0x1
popq %rbx
je 0x3c01a
pushq $0x10
popq %r12
xorl %r13d, %r13d
movslq 0x30(%r15), %rax
cmpq %rax, %r13
jge 0x3c0df
movq 0x28(%r15), %rbp
cmpl $0x0, (%rbp,%r12)
jne 0x3c011
movq %r14, %rdi
xorl %esi, %esi
callq 0x3c132
testq %rax, %rax
je 0x3bfbc
movq %rax, -0x8(%rbp,%r12)
incq %r13
addq $0x20, %r12
jmp 0x3bfe4
movq 0x68(%r15), %r12
movq 0x70(%r15), %r13
movq 0x48(%r14), %rsi
movq 0x50(%r14), %rdx
pushq $0xd
popq %rcx
movq %r14, %rdi
callq 0x1b069
cmpl $0x6, %edx
je 0x3bfbc
movq %rdx, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, 0x30(%rax)
incl (%r12)
xorps %xmm0, %xmm0
movq %rax, (%rsp)
movups %xmm0, 0x38(%rax)
movslq 0x5c(%r12), %rsi
testq %rsi, %rsi
je 0x3c0be
shlq $0x3, %rsi
movq %r14, %rdi
callq 0x17241
testq %rax, %rax
je 0x3c11c
movq %rax, %rbp
movq (%rsp), %rax
addq $0x38, %rax
movq %rbp, (%rax)
xorl %r13d, %r13d
movslq 0x5c(%r12), %rax
cmpq %rax, %r13
jge 0x3c0be
movq 0x38(%r12), %rax
movzbl (%rax,%r13,8), %esi
testb $0x1, %sil
je 0x3c0b9
shrl $0x3, %esi
andl $0x1, %esi
movq %r14, %rdi
callq 0x3c132
testq %rax, %rax
je 0x3c11c
movq %rax, (%rbp,%r13,8)
incq %r13
jmp 0x3c087
movq (%rsp), %rax
movq %rax, 0x68(%r15)
movq 0x8(%rsp), %rax
movq %rax, 0x70(%r15)
movq %r14, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x1801e
movb $0x1, 0x82(%r15)
pushq $0x8
popq %r12
pushq $-0x1
popq %r13
movslq 0x20(%r15), %rax
incq %r13
cmpq %rax, %r13
jge 0x3bfba
movq 0x18(%r15), %rax
movq (%rax,%r12), %rsi
addq $0x10, %r12
movq %r14, %rdi
callq 0x3bfa3
testl %eax, %eax
jns 0x3c0ef
jmp 0x3bfbc
movq %r14, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x1801e
jmp 0x3bfbc
|
js_create_module_function:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp byte ptr [rsi+82h], 0
jz short loc_3BFCD
loc_3BFBA:
xor ebx, ebx
loc_3BFBC:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3BFCD:
mov r15, rsi
mov r14, rdi
cmp qword ptr [rsi+78h], 0
push 0FFFFFFFFFFFFFFFFh
pop rbx
jz short loc_3C01A
push 10h
pop r12
xor r13d, r13d
loc_3BFE4:
movsxd rax, dword ptr [r15+30h]
cmp r13, rax
jge loc_3C0DF
mov rbp, [r15+28h]
cmp dword ptr [rbp+r12+0], 0
jnz short loc_3C011
mov rdi, r14
xor esi, esi
call js_create_module_var
test rax, rax
jz short loc_3BFBC
mov [rbp+r12-8], rax
loc_3C011:
inc r13
add r12, 20h ; ' '
jmp short loc_3BFE4
loc_3C01A:
mov r12, [r15+68h]
mov r13, [r15+70h]
mov rsi, [r14+48h]
mov rdx, [r14+50h]
push 0Dh
pop rcx
mov rdi, r14
call JS_NewObjectProtoClass
cmp edx, 6
jz short loc_3BFBC
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_38], r13
mov [rax+30h], r12
inc dword ptr [r12]
xorps xmm0, xmm0
mov [rsp+48h+var_48], rax
movups xmmword ptr [rax+38h], xmm0
movsxd rsi, dword ptr [r12+5Ch]
test rsi, rsi
jz short loc_3C0BE
shl rsi, 3
mov rdi, r14
call js_mallocz
test rax, rax
jz loc_3C11C
mov rbp, rax
mov rax, [rsp+48h+var_48]
add rax, 38h ; '8'
mov [rax], rbp
xor r13d, r13d
loc_3C087:
movsxd rax, dword ptr [r12+5Ch]
cmp r13, rax
jge short loc_3C0BE
mov rax, [r12+38h]
movzx esi, byte ptr [rax+r13*8]
test sil, 1
jz short loc_3C0B9
shr esi, 3
and esi, 1
mov rdi, r14
call js_create_module_var
test rax, rax
jz short loc_3C11C
mov [rbp+r13*8+0], rax
loc_3C0B9:
inc r13
jmp short loc_3C087
loc_3C0BE:
mov rax, [rsp+48h+var_48]
mov [r15+68h], rax
mov rax, [rsp+48h+var_40]
mov [r15+70h], rax
mov rdi, r14
mov rsi, r12
mov rdx, [rsp+48h+var_38]
call JS_FreeValue
loc_3C0DF:
mov byte ptr [r15+82h], 1
push 8
pop r12
push 0FFFFFFFFFFFFFFFFh
pop r13
loc_3C0EF:
movsxd rax, dword ptr [r15+20h]
inc r13
cmp r13, rax
jge loc_3BFBA
mov rax, [r15+18h]
mov rsi, [rax+r12]
add r12, 10h
mov rdi, r14
call js_create_module_function
test eax, eax
jns short loc_3C0EF
jmp loc_3BFBC
loc_3C11C:
mov rdi, r14
mov rsi, [rsp+48h+var_48]
mov rdx, [rsp+48h+var_40]
call JS_FreeValue
jmp loc_3BFBC
|
long long js_create_module_function(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v5; // r12
long long i; // r13
long long v7; // rbp
long long module_var; // rax
long long v9; // r12
long long v10; // r13
long long v11; // rax
long long v12; // rdx
long long v13; // rax
long long v14; // rbp
long long j; // r13
unsigned int v16; // esi
long long v17; // rax
long long v18; // r12
long long v19; // r13
long long v20; // rsi
long long v21; // [rsp+0h] [rbp-48h]
long long v22; // [rsp+8h] [rbp-40h]
long long v23; // [rsp+10h] [rbp-38h]
if ( !*(_BYTE *)(a2 + 130) )
{
v2 = -1;
if ( *(_QWORD *)(a2 + 120) )
{
v5 = 16LL;
for ( i = 0LL; i < *(int *)(a2 + 48); ++i )
{
v7 = *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v7 + v5) )
{
module_var = js_create_module_var(a1, 0LL);
if ( !module_var )
return v2;
*(_QWORD *)(v7 + v5 - 8) = module_var;
}
v5 += 32LL;
}
}
else
{
v9 = *(_QWORD *)(a2 + 104);
v10 = *(_QWORD *)(a2 + 112);
v11 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xDu);
if ( (_DWORD)v12 == 6 )
return v2;
v22 = v12;
v23 = v10;
*(_QWORD *)(v11 + 48) = v9;
++*(_DWORD *)v9;
v21 = v11;
*(_OWORD *)(v11 + 56) = 0LL;
if ( *(_DWORD *)(v9 + 92) )
{
v13 = js_mallocz(a1, 8LL * *(int *)(v9 + 92));
if ( !v13 )
{
LABEL_25:
JS_FreeValue(a1, v21, v22);
return v2;
}
v14 = v13;
*(_QWORD *)(v21 + 56) = v13;
for ( j = 0LL; j < *(int *)(v9 + 92); ++j )
{
v16 = *(unsigned __int8 *)(*(_QWORD *)(v9 + 56) + 8 * j);
if ( (v16 & 1) != 0 )
{
v17 = js_create_module_var(a1, (v16 >> 3) & 1);
if ( !v17 )
goto LABEL_25;
*(_QWORD *)(v14 + 8 * j) = v17;
}
}
}
*(_QWORD *)(a2 + 104) = v21;
*(_QWORD *)(a2 + 112) = v22;
JS_FreeValue(a1, v9, v23);
}
*(_BYTE *)(a2 + 130) = 1;
v18 = 8LL;
v19 = -1LL;
while ( ++v19 < *(int *)(a2 + 32) )
{
v20 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v18);
v18 += 16LL;
if ( (int)js_create_module_function(a1, v20) < 0 )
return v2;
}
}
return 0;
}
|
js_create_module_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP byte ptr [RSI + 0x82],0x0
JZ 0x0013bfcd
LAB_0013bfba:
XOR EBX,EBX
LAB_0013bfbc:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013bfcd:
MOV R15,RSI
MOV R14,RDI
CMP qword ptr [RSI + 0x78],0x0
PUSH -0x1
POP RBX
JZ 0x0013c01a
PUSH 0x10
POP R12
XOR R13D,R13D
LAB_0013bfe4:
MOVSXD RAX,dword ptr [R15 + 0x30]
CMP R13,RAX
JGE 0x0013c0df
MOV RBP,qword ptr [R15 + 0x28]
CMP dword ptr [RBP + R12*0x1],0x0
JNZ 0x0013c011
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013c132
TEST RAX,RAX
JZ 0x0013bfbc
MOV qword ptr [RBP + R12*0x1 + -0x8],RAX
LAB_0013c011:
INC R13
ADD R12,0x20
JMP 0x0013bfe4
LAB_0013c01a:
MOV R12,qword ptr [R15 + 0x68]
MOV R13,qword ptr [R15 + 0x70]
MOV RSI,qword ptr [R14 + 0x48]
MOV RDX,qword ptr [R14 + 0x50]
PUSH 0xd
POP RCX
MOV RDI,R14
CALL 0x0011b069
CMP EDX,0x6
JZ 0x0013bfbc
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],R13
MOV qword ptr [RAX + 0x30],R12
INC dword ptr [R12]
XORPS XMM0,XMM0
MOV qword ptr [RSP],RAX
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOVSXD RSI,dword ptr [R12 + 0x5c]
TEST RSI,RSI
JZ 0x0013c0be
SHL RSI,0x3
MOV RDI,R14
CALL 0x00117241
TEST RAX,RAX
JZ 0x0013c11c
MOV RBP,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,0x38
MOV qword ptr [RAX],RBP
XOR R13D,R13D
LAB_0013c087:
MOVSXD RAX,dword ptr [R12 + 0x5c]
CMP R13,RAX
JGE 0x0013c0be
MOV RAX,qword ptr [R12 + 0x38]
MOVZX ESI,byte ptr [RAX + R13*0x8]
TEST SIL,0x1
JZ 0x0013c0b9
SHR ESI,0x3
AND ESI,0x1
MOV RDI,R14
CALL 0x0013c132
TEST RAX,RAX
JZ 0x0013c11c
MOV qword ptr [RBP + R13*0x8],RAX
LAB_0013c0b9:
INC R13
JMP 0x0013c087
LAB_0013c0be:
MOV RAX,qword ptr [RSP]
MOV qword ptr [R15 + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x70],RAX
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
LAB_0013c0df:
MOV byte ptr [R15 + 0x82],0x1
PUSH 0x8
POP R12
PUSH -0x1
POP R13
LAB_0013c0ef:
MOVSXD RAX,dword ptr [R15 + 0x20]
INC R13
CMP R13,RAX
JGE 0x0013bfba
MOV RAX,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RAX + R12*0x1]
ADD R12,0x10
MOV RDI,R14
CALL 0x0013bfa3
TEST EAX,EAX
JNS 0x0013c0ef
JMP 0x0013bfbc
LAB_0013c11c:
MOV RDI,R14
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011801e
JMP 0x0013bfbc
|
int4 js_create_module_function(long param_1,long param_2)
{
int8 *puVar1;
byte bVar2;
int *piVar3;
int8 uVar4;
int iVar5;
long lVar6;
int4 uVar7;
long lVar8;
long lVar9;
long lVar10;
int1 auVar11 [16];
if (*(char *)(param_2 + 0x82) == '\0') {
uVar7 = 0xffffffff;
if (*(long *)(param_2 + 0x78) == 0) {
piVar3 = *(int **)(param_2 + 0x68);
uVar4 = *(int8 *)(param_2 + 0x70);
auVar11 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),
0xd);
lVar8 = auVar11._0_8_;
if (auVar11._8_4_ == 6) {
return 0xffffffff;
}
*(int **)(lVar8 + 0x30) = piVar3;
*piVar3 = *piVar3 + 1;
*(int8 *)(lVar8 + 0x38) = 0;
*(int8 *)(lVar8 + 0x40) = 0;
if ((long)piVar3[0x17] != 0) {
lVar9 = js_mallocz(param_1,(long)piVar3[0x17] << 3);
if (lVar9 == 0) {
LAB_0013c11c:
JS_FreeValue(param_1,lVar8,auVar11._8_8_);
return 0xffffffff;
}
*(long *)(lVar8 + 0x38) = lVar9;
for (lVar10 = 0; lVar10 < piVar3[0x17]; lVar10 = lVar10 + 1) {
bVar2 = *(byte *)(*(long *)(piVar3 + 0xe) + lVar10 * 8);
if ((bVar2 & 1) != 0) {
lVar6 = js_create_module_var(param_1,bVar2 >> 3 & 1);
if (lVar6 == 0) goto LAB_0013c11c;
*(long *)(lVar9 + lVar10 * 8) = lVar6;
}
}
}
*(int1 (*) [16])(param_2 + 0x68) = auVar11;
JS_FreeValue(param_1,piVar3,uVar4);
}
else {
lVar8 = 0x10;
for (lVar9 = 0; lVar9 < *(int *)(param_2 + 0x30); lVar9 = lVar9 + 1) {
lVar10 = *(long *)(param_2 + 0x28);
if (*(int *)(lVar10 + lVar8) == 0) {
lVar6 = js_create_module_var(param_1,0);
if (lVar6 == 0) {
return 0xffffffff;
}
*(long *)(lVar10 + -8 + lVar8) = lVar6;
}
lVar8 = lVar8 + 0x20;
}
}
*(int1 *)(param_2 + 0x82) = 1;
lVar8 = 8;
lVar9 = -1;
do {
lVar9 = lVar9 + 1;
if (*(int *)(param_2 + 0x20) <= lVar9) goto LAB_0013bfba;
puVar1 = (int8 *)(*(long *)(param_2 + 0x18) + lVar8);
lVar8 = lVar8 + 0x10;
iVar5 = js_create_module_function(param_1,*puVar1);
} while (-1 < iVar5);
}
else {
LAB_0013bfba:
uVar7 = 0;
}
return uVar7;
}
|
|
17,531
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!object) throw std::runtime_error("CallExpr.object is null");
auto obj = object->evaluate(context);
if (!obj.is_callable()) {
throw std::runtime_error("Object is not callable: " + obj.dump(2));
}
auto vargs = args.evaluate(context);
return obj.call(context, vargs);
}
|
O2
|
cpp
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x7367a
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x67744
cmpq $0x0, 0x30(%r12)
je 0x736aa
addq $0x30, %r15
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x713ea
leaq 0x50(%rsp), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x72166
movq %rsp, %rdi
callq 0x7224a
leaq 0x50(%rsp), %rdi
callq 0x679d4
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x46030(%rip), %rsi # 0xb96bc
movq %rax, %rdi
callq 0x24330
movq 0x90955(%rip), %rsi # 0x103ff0
movq 0x908b6(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x2
popq %rdx
xorl %ecx, %ecx
callq 0x67bc2
leaq 0x46287(%rip), %rsi # 0xb9957
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5d362
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x24e80
xorl %ebp, %ebp
movq 0x908fc(%rip), %rsi # 0x103ff0
movq 0x9085d(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
movq %rax, %r14
movq %rsp, %rdi
callq 0x25258
jmp 0x73716
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x25258
testb %bpl, %bpl
jne 0x7372a
jmp 0x73751
movq %rax, %r14
movq %rbx, %rdi
callq 0x246b0
jmp 0x73751
movq %rax, %r14
movq %rbx, %rdi
callq 0x246b0
jmp 0x7375b
movq %rax, %r14
movq %rsp, %rdi
callq 0x7224a
jmp 0x73751
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x679d4
movq %r14, %rdi
callq 0x24fe0
nop
|
_ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz short loc_7367A
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+0C8h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz short loc_736AA
add r15, 30h ; '0'
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
lea rsi, [rsp+0C8h+var_78]
mov rcx, rsp
mov rdi, rbx
mov rdx, r14
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rdi, rsp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7367A:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aMethodcallexpr+6; char *
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_736AA:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_98]
lea rsi, [rsp+0C8h+var_78]
push 2
pop rdx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aObjectIsNotCal; "Object is not callable: "
mov rdi, rsp
lea rdx, [rsp+0C8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73716
mov r14, rax
mov bpl, 1
loc_73716:
lea rdi, [rsp+0C8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7372A
jmp short loc_73751
mov r14, rax
loc_7372A:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_73751
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_7375B
mov r14, rax
mov rdi, rsp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_73751
mov r14, rax
loc_73751:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_7375B:
mov rdi, r14
call __Unwind_Resume
|
long long minja::CallExpr::do_evaluate(long long a1, long long a2)
{
void (***v3)(void); // rsi
std::runtime_error *exception; // rbx
void *v6; // rbx
_OWORD v7[3]; // [rsp+0h] [rbp-C8h] BYREF
_BYTE v8[32]; // [rsp+30h] [rbp-98h] BYREF
_BYTE v9[48]; // [rsp+50h] [rbp-78h] BYREF
long long v10; // [rsp+80h] [rbp-48h]
v3 = *(void (****)(void))(a2 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "CallExpr.object is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v9, v3);
if ( !v10 )
{
v6 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)v9, 2u, 0);
std::operator+<char>((long long)v7, (long long)"Object is not callable: ", (long long)v8);
std::runtime_error::runtime_error(v6, v7);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::ArgumentsExpression::evaluate(v7, (void (*****)(void))(a2 + 48));
minja::Value::call(a1, (long long)v9);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7);
minja::Value::~Value((minja::Value *)v9);
return a1;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0017367a
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x50]
MOV RDI,R12
CALL 0x00167744
CMP qword ptr [R12 + 0x30],0x0
JZ 0x001736aa
ADD R15,0x30
LAB_00173634:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x001713ea
LAB_00173642:
LEA RSI,[RSP + 0x50]
MOV RCX,RSP
MOV RDI,RBX
MOV RDX,R14
CALL 0x00172166
LAB_00173655:
MOV RDI,RSP
CALL 0x0017224a
LEA RDI,[RSP + 0x50]
CALL 0x001679d4
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017367a:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_00173685:
LEA RSI,[0x1b96bc]
MOV RDI,RAX
CALL 0x00124330
LAB_00173694:
MOV RSI,qword ptr [0x00203ff0]
MOV RDX,qword ptr [0x00203f58]
MOV RDI,RBX
CALL 0x00124f50
LAB_001736aa:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_001736b5:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
PUSH 0x2
POP RDX
XOR ECX,ECX
CALL 0x00167bc2
LAB_001736c9:
LEA RSI,[0x1b9957]
MOV RDI,RSP
LEA RDX,[RSP + 0x30]
CALL 0x0015d362
MOV BPL,0x1
LAB_001736e0:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00124e80
XOR EBP,EBP
MOV RSI,qword ptr [0x00203ff0]
MOV RDX,qword ptr [0x00203f58]
MOV RDI,RBX
CALL 0x00124f50
|
/* minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
CallExpr * __thiscall minja::CallExpr::do_evaluate(CallExpr *this,shared_ptr *param_1)
{
runtime_error *prVar1;
ArgumentsExpression aAStack_c8 [48];
int1 local_98 [32];
Expression local_78 [48];
long local_48;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00173685 to 00173693 has its CatchHandler @ 00173734 */
std::runtime_error::runtime_error(prVar1,"CallExpr.object is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 00173634 to 00173641 has its CatchHandler @ 0017374e */
ArgumentsExpression::evaluate(aAStack_c8,param_1 + 0x30);
/* try { // try from 00173642 to 00173654 has its CatchHandler @ 00173741 */
Value::call(this,(ArgumentsValue *)local_78);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)aAStack_c8);
Value::~Value((Value *)local_78);
return this;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001736b5 to 001736c8 has its CatchHandler @ 00173727 */
Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0));
/* try { // try from 001736c9 to 001736dc has its CatchHandler @ 00173710 */
std::operator+((char *)aAStack_c8,(string *)"Object is not callable: ");
/* try { // try from 001736e0 to 00173702 has its CatchHandler @ 00173703 */
std::runtime_error::runtime_error(prVar1,(string *)aAStack_c8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
|
|
17,532
|
my_get_err_msg
|
eloqsql/mysys/my_error.c
|
const char *my_get_err_msg(uint nr)
{
const char *format;
struct my_err_head *meh_p;
/* Search for the range this error is in. */
for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next)
if (nr <= meh_p->meh_last)
break;
/*
If we found the range this error number is in, get the format string.
If the string is empty, or a NULL pointer, or if we're out of return,
we return NULL.
*/
if (!(format= (meh_p && (nr >= meh_p->meh_first)) ?
meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) ||
!*format)
return NULL;
return format;
}
|
O0
|
c
|
my_get_err_msg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq 0x1d01d6(%rip), %rax # 0x2bf9c8
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xef81a
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
ja 0xef80b
jmp 0xef81a
jmp 0xef80d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xef7f6
cmpq $0x0, -0x20(%rbp)
je 0xef850
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0xef850
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %edi
callq *%rax
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl 0x10(%rdx), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0xef858
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0xef858
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xef86f
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xef879
movq $0x0, -0x8(%rbp)
jmp 0xef881
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_get_err_msg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_C], edi
mov rax, cs:my_errmsgs_list
mov [rbp+var_20], rax
loc_EF7F6:
cmp [rbp+var_20], 0
jz short loc_EF81A
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+14h]
ja short loc_EF80B
jmp short loc_EF81A
loc_EF80B:
jmp short $+2
loc_EF80D:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_EF7F6
loc_EF81A:
cmp [rbp+var_20], 0
jz short loc_EF850
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+10h]
jb short loc_EF850
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov edi, [rbp+var_C]
call rax
mov ecx, [rbp+var_C]
mov rdx, [rbp+var_20]
sub ecx, [rdx+10h]
mov ecx, ecx
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
jmp short loc_EF858
loc_EF850:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_EF858:
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_EF86F
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_EF879
loc_EF86F:
mov [rbp+var_8], 0
jmp short loc_EF881
loc_EF879:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_EF881:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_BYTE * my_get_err_msg(unsigned int a1)
{
_BYTE *v2; // [rsp+8h] [rbp-28h]
long long *i; // [rsp+10h] [rbp-20h]
for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i )
;
if ( i && a1 >= *((_DWORD *)i + 4) )
v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4)));
else
v2 = 0LL;
if ( v2 && *v2 )
return v2;
else
return 0LL;
}
|
my_get_err_msg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0xc],EDI
MOV RAX,qword ptr [0x003bf9c8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001ef7f6:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001ef81a
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x14]
JA 0x001ef80b
JMP 0x001ef81a
LAB_001ef80b:
JMP 0x001ef80d
LAB_001ef80d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001ef7f6
LAB_001ef81a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001ef850
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x10]
JC 0x001ef850
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RBP + -0xc]
CALL RAX
MOV ECX,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
SUB ECX,dword ptr [RDX + 0x10]
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001ef858
LAB_001ef850:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001ef858
LAB_001ef858:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x001ef86f
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x001ef879
LAB_001ef86f:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001ef881
LAB_001ef879:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_001ef881:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_get_err_msg(uint param_1)
{
long lVar1;
char *local_30;
int8 *local_28;
char *local_10;
for (local_28 = (int8 *)my_errmsgs_list;
(local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1));
local_28 = (int8 *)*local_28) {
}
if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) {
local_30 = (char *)0x0;
}
else {
lVar1 = (*(code *)local_28[1])(param_1);
local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8);
}
if ((local_30 == (char *)0x0) || (*local_30 == '\0')) {
local_10 = (char *)0x0;
}
else {
local_10 = local_30;
}
return local_10;
}
|
|
17,533
|
update_key_parts
|
eloqsql/storage/myisam/mi_check.c
|
void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
ulonglong *unique, ulonglong *notnull,
ulonglong records)
{
ulonglong count=0,tmp, unique_tuples;
ulonglong tuples= records;
uint parts;
for (parts=0 ; parts < keyinfo->keysegs ; parts++)
{
count+=unique[parts];
unique_tuples= count + 1;
if (notnull)
{
tuples= notnull[parts];
/*
#(unique_tuples not counting tuples with NULLs) =
#(unique_tuples counting tuples with NULLs as different) -
#(tuples with NULLs)
*/
unique_tuples -= (records - notnull[parts]);
}
if (unique_tuples == 0)
tmp= 1;
else if (count == 0)
tmp= tuples; /* 1 unique tuple */
else
tmp= (tuples + unique_tuples/2) / unique_tuples;
/*
for some weird keys (e.g. FULLTEXT) tmp can be <1 here.
let's ensure it is not
*/
set_if_bigger(tmp,1);
/* Keys are stored as 32 byte int's; Ensure we don't get an overflow */
if (tmp >= (ulonglong) ~(uint32) 0)
tmp=(ulonglong) ~(uint32) 0;
*rec_per_key_part=(ulong) tmp;
rec_per_key_part++;
}
}
|
O0
|
c
|
update_key_parts:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jae 0x3293b
movq -0x18(%rbp), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x328b1
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %edx
subq (%rax,%rdx,8), %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x328c2
movq $0x1, -0x38(%rbp)
jmp 0x328ef
cmpq $0x0, -0x30(%rbp)
jne 0x328d3
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x328ed
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
shrq %rcx
addq %rcx, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x40(%rbp)
movq %rax, -0x38(%rbp)
jmp 0x328ef
jmp 0x328f1
cmpq $0x1, -0x38(%rbp)
jae 0x32900
movq $0x1, -0x38(%rbp)
jmp 0x32902
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x38(%rbp)
jb 0x32916
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3284f
popq %rbp
retq
nopl (%rax)
|
update_key_parts:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], 0
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov [rbp+var_4C], 0
loc_3284F:
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_8]
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jnb loc_3293B
mov rax, [rbp+var_18]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx*8]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_40], rax
cmp [rbp+var_20], 0
jz short loc_328B1
mov rax, [rbp+var_20]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx*8]
mov [rbp+var_48], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
mov edx, [rbp+var_4C]
sub rcx, [rax+rdx*8]
mov rax, [rbp+var_40]
sub rax, rcx
mov [rbp+var_40], rax
loc_328B1:
cmp [rbp+var_40], 0
jnz short loc_328C2
mov [rbp+var_38], 1
jmp short loc_328EF
loc_328C2:
cmp [rbp+var_30], 0
jnz short loc_328D3
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
jmp short loc_328ED
loc_328D3:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
shr rcx, 1
add rax, rcx
xor ecx, ecx
mov edx, ecx
div [rbp+var_40]
mov [rbp+var_38], rax
loc_328ED:
jmp short $+2
loc_328EF:
jmp short $+2
loc_328F1:
cmp [rbp+var_38], 1
jnb short loc_32900
mov [rbp+var_38], 1
loc_32900:
jmp short $+2
loc_32902:
mov eax, 0FFFFFFFFh
cmp [rbp+var_38], rax
jb short loc_32916
mov eax, 0FFFFFFFFh
mov [rbp+var_38], rax
loc_32916:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_10], rax
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_3284F
loc_3293B:
pop rbp
retn
|
long long update_key_parts(long long a1, unsigned long long *a2, long long a3, long long a4, unsigned long long a5)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-4Ch]
unsigned long long v7; // [rsp+4h] [rbp-48h]
unsigned long long v8; // [rsp+Ch] [rbp-40h]
unsigned long long v9; // [rsp+14h] [rbp-38h]
long long v10; // [rsp+1Ch] [rbp-30h]
v10 = 0LL;
v7 = a5;
for ( i = 0; ; ++i )
{
result = i;
if ( i >= *(unsigned __int16 *)(a1 + 8) )
break;
v10 += *(_QWORD *)(a3 + 8LL * i);
v8 = v10 + 1;
if ( a4 )
{
v7 = *(_QWORD *)(a4 + 8LL * i);
v8 -= a5 - v7;
}
if ( v8 )
{
if ( v10 )
v9 = ((v8 >> 1) + v7) / v8;
else
v9 = v7;
}
else
{
v9 = 1LL;
}
if ( !v9 )
v9 = 1LL;
if ( v9 >= 0xFFFFFFFF )
v9 = 0xFFFFFFFFLL;
*a2++ = v9;
}
return result;
}
|
update_key_parts:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV dword ptr [RBP + -0x4c],0x0
LAB_0013284f:
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JNC 0x0013293b
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001328b1
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x4c]
SUB RCX,qword ptr [RAX + RDX*0x8]
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_001328b1:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x001328c2
MOV qword ptr [RBP + -0x38],0x1
JMP 0x001328ef
LAB_001328c2:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001328d3
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001328ed
LAB_001328d3:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SHR RCX,0x1
ADD RAX,RCX
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_001328ed:
JMP 0x001328ef
LAB_001328ef:
JMP 0x001328f1
LAB_001328f1:
CMP qword ptr [RBP + -0x38],0x1
JNC 0x00132900
MOV qword ptr [RBP + -0x38],0x1
LAB_00132900:
JMP 0x00132902
LAB_00132902:
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x38],RAX
JC 0x00132916
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x38],RAX
LAB_00132916:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0013284f
LAB_0013293b:
POP RBP
RET
|
void update_key_parts(long param_1,ulong *param_2,long param_3,long param_4,ulong param_5)
{
uint local_54;
ulong local_50;
ulong local_48;
ulong local_40;
long local_38;
ulong *local_18;
local_38 = 0;
local_50 = param_5;
local_18 = param_2;
for (local_54 = 0; local_54 < *(ushort *)(param_1 + 8); local_54 = local_54 + 1) {
local_38 = *(long *)(param_3 + (ulong)local_54 * 8) + local_38;
local_48 = local_38 + 1;
if (param_4 != 0) {
local_50 = *(ulong *)(param_4 + (ulong)local_54 * 8);
local_48 = local_48 - (param_5 - *(long *)(param_4 + (ulong)local_54 * 8));
}
if (local_48 == 0) {
local_40 = 1;
}
else if (local_38 == 0) {
local_40 = local_50;
}
else {
local_40 = (local_50 + (local_48 >> 1)) / local_48;
}
if (local_40 == 0) {
local_40 = 1;
}
if (0xfffffffe < local_40) {
local_40 = 0xffffffff;
}
*local_18 = local_40;
local_18 = local_18 + 1;
}
return;
}
|
|
17,534
|
nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
T& at(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it->second;
}
}
JSON_THROW(std::out_of_range("key not found"));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rbx
cmpq 0x8(%r15), %rbx
je 0x6a2a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48cc8
testb %al, %al
jne 0x6a29b
addq $0x60, %rbx
jmp 0x6a280
addq $0x10, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %rbx
leaq 0x33434(%rip), %rsi # 0x9d6ee
movq %rax, %rdi
callq 0x210e0
movq 0x71cef(%rip), %rsi # 0xdbfb8
movq 0x71cd0(%rip), %rdx # 0xdbfa0
movq %rbx, %rdi
callq 0x21b70
movq %rax, %r14
movq %rbx, %rdi
callq 0x21530
movq %r14, %rdi
callq 0x21be0
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
mov rbx, [rdi]
loc_6A280:
cmp rbx, [r15+8]
jz short loc_6A2A8
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_6A29B
add rbx, 60h ; '`'
jmp short loc_6A280
loc_6A29B:
add rbx, 10h
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_6A2A8:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "key not found"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
unsigned __int8 * nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>::at(
unsigned __int8 **a1,
unsigned __int8 *a2,
__m128d a3)
{
unsigned __int8 *i; // rbx
std::out_of_range *exception; // rbx
for ( i = *a1; ; i += 96 )
{
if ( i == a1[1] )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "key not found");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) )
break;
}
return i + 16;
}
|
at:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI]
LAB_0016a280:
CMP RBX,qword ptr [R15 + 0x8]
JZ 0x0016a2a8
MOV RDI,RBX
MOV RSI,R14
CALL 0x00148cc8
TEST AL,AL
JNZ 0x0016a29b
ADD RBX,0x60
JMP 0x0016a280
LAB_0016a29b:
ADD RBX,0x10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0016a2a8:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV RBX,RAX
LAB_0016a2b3:
LEA RSI,[0x19d6ee]
MOV RDI,RAX
CALL 0x001210e0
LAB_0016a2c2:
MOV RSI,qword ptr [0x001dbfb8]
MOV RDX,qword ptr [0x001dbfa0]
MOV RDI,RBX
CALL 0x00121b70
|
/* nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<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, minja::Value> >
>::at(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&) */
basic_json * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<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,minja::Value>>>
::at(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<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,minja::Value>>>
*this,basic_json *param_1)
{
char cVar1;
out_of_range *this_00;
basic_json *pbVar2;
pbVar2 = *(basic_json **)this;
while( true ) {
if (pbVar2 == *(basic_json **)(this + 8)) {
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0016a2b3 to 0016a2c1 has its CatchHandler @ 0016a2d8 */
std::out_of_range::out_of_range(this_00,"key not found");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001dbfb8,PTR__out_of_range_001dbfa0);
}
cVar1 = operator==(pbVar2,param_1);
if (cVar1 != '\0') break;
pbVar2 = pbVar2 + 0x60;
}
return pbVar2 + 0x10;
}
|
|
17,535
|
minja::Parser::parseExpression(bool)
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
}
|
O2
|
cpp
|
minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3b2b6
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x308d6
testb %bpl, %bpl
je 0x308d6
leaq 0xa0534(%rip), %rax # 0xd0d70
movb (%rax), %al
testb %al, %al
je 0x30900
leaq 0xa0503(%rip), %rdx # 0xd0d50
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x309ea
leaq 0x18(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x20d98
testq %r15, %r15
je 0x308d6
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x305c6
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3b4b8
leaq 0x28(%rsp), %r8
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rsp, %rcx
callq 0x3b6a9
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x304ca
leaq 0x18(%rsp), %rdi
callq 0x3b6d0
leaq 0x40(%rsp), %rdi
callq 0x304ca
jmp 0x308e8
movaps (%rsp), %xmm0
andq $0x0, 0x8(%rsp)
movups %xmm0, (%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x304ca
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0469(%rip), %rdi # 0xd0d70
callq 0x20c10
testl %eax, %eax
je 0x30846
leaq 0xa0435(%rip), %rdi # 0xd0d50
leaq 0x5d2b4(%rip), %rsi # 0x8dbd6
pushq $0x10
popq %rdx
callq 0x30546
leaq -0x385(%rip), %rdi # 0x305ac
leaq 0xa0418(%rip), %rsi # 0xd0d50
leaq 0x9fd99(%rip), %rdx # 0xd06d8
callq 0x205f0
leaq 0xa0425(%rip), %rdi # 0xd0d70
callq 0x20470
jmp 0x30846
movq %rax, %rbx
leaq 0xa0411(%rip), %rdi # 0xd0d70
callq 0x20460
jmp 0x30989
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3b6d0
jmp 0x30978
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x304ca
jmp 0x30989
jmp 0x30986
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x304ca
movq %rbx, %rdi
callq 0x20bb0
|
_ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_308D6
test bpl, bpl
jz loc_308D6
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_30900
loc_30846:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+88h+var_70]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_70]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_308D6
lea rdi, [rsp+88h+var_50]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+88h+var_70]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
lea r8, [rsp+88h+var_60]
lea rdi, [rsp+88h+var_38]
lea rsi, [rsp+88h+var_50]
lea rdx, [rsp+88h+var_70]
mov rcx, rsp
call _ZSt11make_sharedIN5minja6IfExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_S6_EES4_IT_EDpOT0_; std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression> &&)
lea rdi, [rsp+88h+var_30]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_70]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_308E8
loc_308D6:
movaps xmm0, [rsp+88h+var_88]
and qword ptr [rsp+88h+var_88+8], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rsp+88h+var_88], 0
loc_308E8:
lea rdi, [rsp+88h+var_88+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_30900:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_30846
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_30846
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_30989
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_30978
mov rbx, rax
loc_30978:
lea rdi, [rsp+arg_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_30989
jmp short $+2
loc_30986:
mov rbx, rax
loc_30989:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, _QWORD *a2, char a3)
{
int v4; // r8d
int v5; // r9d
long long v6; // r15
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v10; // [rsp+0h] [rbp-88h] BYREF
_BYTE v11[8]; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+20h] [rbp-68h]
_BYTE v13[16]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF
long long v15; // [rsp+40h] [rbp-48h] BYREF
_OWORD v16[3]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_6;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)v11,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
SBYTE8(v10));
v6 = v12;
std::string::~string(v11);
if ( v6 )
{
minja::Parser::get_location((minja::Parser *)v14, a2);
minja::Parser::parseIfExpression((minja::Parser *)v11);
std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(
v16,
v14,
v11,
&v10,
v13);
v7 = v16[0];
*((_QWORD *)&v16[0] + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v16[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v16 + 1);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair(v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
}
else
{
LABEL_6:
v8 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v10 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return this;
}
|
parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0013b2b6
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x001308d6
TEST BPL,BPL
JZ 0x001308d6
LEA RAX,[0x1d0d70]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00130900
LAB_00130846:
LEA RDX,[0x1d0d50]
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001309ea
LEA RDI,[RSP + 0x18]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00120d98
TEST R15,R15
JZ 0x001308d6
LAB_00130870:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x001305c6
LAB_0013087d:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0013b4b8
LEA R8,[RSP + 0x28]
LAB_0013088f:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x18]
MOV RCX,RSP
CALL 0x0013b6a9
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x001304ca
LEA RDI,[RSP + 0x18]
CALL 0x0013b6d0
LEA RDI,[RSP + 0x40]
CALL 0x001304ca
JMP 0x001308e8
LAB_001308d6:
MOVAPS XMM0,xmmword ptr [RSP]
AND qword ptr [RSP + 0x8],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RSP],0x0
LAB_001308e8:
LEA RDI,[RSP + 0x8]
CALL 0x001304ca
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00130900:
LEA RDI,[0x1d0d70]
CALL 0x00120c10
TEST EAX,EAX
JZ 0x00130846
LAB_00130914:
LEA RDI,[0x1d0d50]
LEA RSI,[0x18dbd6]
PUSH 0x10
POP RDX
CALL 0x00130546
LAB_0013092a:
LEA RDI,[0x1305ac]
LEA RSI,[0x1d0d50]
LEA RDX,[0x1d06d8]
CALL 0x001205f0
LEA RDI,[0x1d0d70]
CALL 0x00120470
JMP 0x00130846
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
int8 uVar1;
int iVar2;
char in_DL;
long in_RSI;
int7 in_register_00000039;
int8 *puVar3;
int8 local_88;
int8 auStack_80 [2];
string local_70 [8];
long local_68;
shared_ptr local_50 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [16];
int8 local_38;
int8 auStack_30 [2];
puVar3 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((*(long *)(in_RSI + 0x20) != *(long *)(in_RSI + 0x18)) && (in_DL != '\0')) {
if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 00130914 to 00130929 has its CatchHandler @ 00130955 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_0018dbd6,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
}
/* try { // try from 00130846 to 0013085c has its CatchHandler @ 00130986 */
consumeToken(local_70);
std::__cxx11::string::~string(local_70);
if (local_68 != 0) {
/* try { // try from 00130870 to 0013087c has its CatchHandler @ 00130984 */
get_location();
/* try { // try from 0013087d to 00130889 has its CatchHandler @ 00130975 */
parseIfExpression();
/* try { // try from 0013088f to 001308a5 has its CatchHandler @ 00130966 */
std::
make_shared<minja::IfExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>
((Location *)&local_38,local_50,(shared_ptr *)local_70,(shared_ptr *)&local_88);
uVar1 = auStack_30[0];
auStack_30[0] = 0;
*puVar3 = local_38;
puVar3[1] = uVar1;
local_38 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_30);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair
((pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>> *)
local_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
goto LAB_001308e8;
}
}
uVar1 = auStack_80[0];
auStack_80[0] = 0;
*puVar3 = local_88;
puVar3[1] = uVar1;
local_88 = 0;
LAB_001308e8:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_80);
return puVar3;
}
|
|
17,536
|
minja::Parser::parseExpression(bool)
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
}
|
O3
|
cpp
|
minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3b966
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x2f5a0
testb %bpl, %bpl
je 0x2f5a0
leaq 0xad80e(%rip), %rax # 0xdcd40
movb (%rax), %al
testb %al, %al
je 0x2f66e
leaq 0xad7dd(%rip), %rdx # 0xdcd20
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x2f714
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x2f574
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x2f5a0
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x2f5bb
movq 0xaca02(%rip), %rcx # 0xdbf98
cmpb $0x0, (%rcx)
je 0x2f5b7
incl 0x8(%rax)
jmp 0x2f5bb
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x3bbf4
movl $0x60, %edi
callq 0x18690
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xab48c(%rip), %rax # 0xdaa88
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x588c0
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x2f638
callq 0x2f20e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2f647
callq 0x2f20e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2f656
callq 0x2f20e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2f5a7
callq 0x2f20e
jmp 0x2f5a7
leaq 0xad6cb(%rip), %rdi # 0xdcd40
callq 0x18c00
testl %eax, %eax
je 0x2f53c
leaq 0xad697(%rip), %rdi # 0xdcd20
leaq 0x79576(%rip), %rsi # 0xa8c06
movl $0x10, %edx
callq 0x2f27e
leaq -0x3bb(%rip), %rdi # 0x2f2e6
leaq 0xad678(%rip), %rsi # 0xdcd20
leaq 0xacff9(%rip), %rdx # 0xdc6a8
callq 0x185d0
leaq 0xad685(%rip), %rdi # 0xdcd40
callq 0x18440
jmp 0x2f53c
movq %rax, %rbx
leaq 0xad671(%rip), %rdi # 0xdcd40
callq 0x18430
jmp 0x2f6fc
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3bdc0
jmp 0x2f6e8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2f6fc
callq 0x2f20e
jmp 0x2f6fc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2f70b
callq 0x2f20e
movq %rbx, %rdi
callq 0x18bb0
nop
|
_ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_2F5A0
test bpl, bpl
jz short loc_2F5A0
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_2F66E
loc_2F53C:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_2F574
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2F574:
test r15, r15
jz short loc_2F5A0
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_2F5BB
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2F5B7
inc dword ptr [rax+8]
jmp short loc_2F5BB
loc_2F5A0:
movaps xmm0, [rsp+78h+var_78]
movups xmmword ptr [rbx], xmm0
loc_2F5A7:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2F5B7:
lock inc dword ptr [rax+8]
loc_2F5BB:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_2F638
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2F638:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_2F647
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2F647:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_2F656
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2F656:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz loc_2F5A7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_2F5A7
loc_2F66E:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_2F53C
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_2F53C
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_2F6FC
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_2F6E8
mov rbx, rax
loc_2F6E8:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_2F6FC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_2F6FC
mov rbx, rax
loc_2F6FC:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_2F70B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2F70B:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
_QWORD *v9; // r14
__int128 v10; // [rsp+0h] [rbp-78h] BYREF
long long v11; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long *v14; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v17; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v14,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
*((long long *)&v10 + 1));
v6 = v15;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v6 )
{
v11 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v12 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v13 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v14);
v9 = (_QWORD *)operator new(0x60uLL);
v9[1] = 0x100000001LL;
*v9 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16);
*(_QWORD *)this = v9 + 2;
*((_QWORD *)this + 1) = v9;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
}
else
{
LABEL_10:
*(_OWORD *)this = v10;
}
return this;
}
|
parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0013b966
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0012f5a0
TEST BPL,BPL
JZ 0x0012f5a0
LEA RAX,[0x1dcd40]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0012f66e
LAB_0012f53c:
LEA RDX,[0x1dcd20]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0012f714
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0012f574
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001186a0
LAB_0012f574:
TEST R15,R15
JZ 0x0012f5a0
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0012f5bb
MOV RCX,qword ptr [0x001dbf98]
CMP byte ptr [RCX],0x0
JZ 0x0012f5b7
INC dword ptr [RAX + 0x8]
JMP 0x0012f5bb
LAB_0012f5a0:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LAB_0012f5a7:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012f5b7:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012f5bb:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_0012f5c8:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0013bbf4
LAB_0012f5d5:
MOV EDI,0x60
CALL 0x00118690
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x1daa88]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x001588c0
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x0012f638
CALL 0x0012f20e
LAB_0012f638:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0012f647
CALL 0x0012f20e
LAB_0012f647:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0012f656
CALL 0x0012f20e
LAB_0012f656:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012f5a7
CALL 0x0012f20e
JMP 0x0012f5a7
LAB_0012f66e:
LEA RDI,[0x1dcd40]
CALL 0x00118c00
TEST EAX,EAX
JZ 0x0012f53c
LAB_0012f682:
LEA RDI,[0x1dcd20]
LEA RSI,[0x1a8c06]
MOV EDX,0x10
CALL 0x0012f27e
LAB_0012f69a:
LEA RDI,[0x12f2e6]
LEA RSI,[0x1dcd20]
LEA RDX,[0x1dc6a8]
CALL 0x001185d0
LEA RDI,[0x1dcd40]
CALL 0x00118440
JMP 0x0012f53c
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') &&
(iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) {
/* try { // try from 0012f682 to 0012f699 has its CatchHandler @ 0012f6c5 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001a8c06,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
/* try { // try from 0012f53c to 0012f554 has its CatchHandler @ 0012f6f9 */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001dbf98 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 0012f5c8 to 0012f5d4 has its CatchHandler @ 0012f6e5 */
parseIfExpression();
/* try { // try from 0012f5d5 to 0012f5de has its CatchHandler @ 0012f6d6 */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_001daa98;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
return puVar4;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
return puVar4;
}
}
*puVar4 = local_78;
puVar4[1] = p_Stack_70;
return puVar4;
}
|
|
17,537
|
inline_mysql_file_tell
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline my_off_t
inline_mysql_file_tell(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_tell(file, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_tell(file, flags);
return result;
}
|
O3
|
c
|
inline_mysql_file_tell:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebx
leaq 0x343476(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
movl $0x9, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x41bc5
movl %ebx, %edi
xorl %esi, %esi
callq 0xa04c8
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x18(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2a448
movq (%r14), %rax
jmp 0x41bbc
|
inline_mysql_file_tell:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov ebx, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_60]
mov esi, ebx
mov edx, 9
call qword ptr [rax+158h]
test rax, rax
jnz short loc_41BC5
mov edi, ebx
xor esi, esi
call my_tell
loc_41BBC:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_41BC5:
lea r14, [rbp+var_18]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call inline_mysql_file_tell_cold_1
mov rax, [r14]
jmp short loc_41BBC
|
long long inline_mysql_file_tell(unsigned int a1)
{
long long v1; // rax
_BYTE v3[72]; // [rsp+0h] [rbp-60h] BYREF
_QWORD v4[3]; // [rsp+48h] [rbp-18h] BYREF
v1 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v3, a1, 9LL);
if ( !v1 )
return my_tell(a1, 0LL);
inline_mysql_file_tell_cold_1(v1, a1, v4);
return v4[0];
}
|
inline_mysql_file_tell:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,EDI
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x60]
MOV ESI,EBX
MOV EDX,0x9
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00141bc5
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a04c8
LAB_00141bbc:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00141bc5:
LEA R14,[RBP + -0x18]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012a448
MOV RAX,qword ptr [R14]
JMP 0x00141bbc
|
int8 inline_mysql_file_tell(int4 param_1)
{
long lVar1;
int1 local_68 [72];
int8 local_20;
lVar1 = (**(code **)(PSI_server + 0x158))(local_68,param_1,9);
if (lVar1 == 0) {
local_20 = my_tell(param_1,0);
}
else {
inline_mysql_file_tell_cold_1(lVar1,param_1,&local_20);
}
return local_20;
}
|
|
17,538
|
LefDefParser::lefiPin::addForeign(char const*, int, double, double, int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
|
void
lefiPin::addForeign(const char *name,
int hasPnt,
double x,
double y,
int orient)
{
int i;
int *hfo;
int *hfp;
int *fo;
double *fx;
double *fy;
char **f;
if (foreignAllocated_ == numForeigns_) {
if (foreignAllocated_ == 0)
foreignAllocated_ = 16; // since it involves char*, it will
// costly in the number is too small
else
foreignAllocated_ *= 2;
hfo = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
hfp = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
fo = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
fx = (double*) lefMalloc(sizeof(double) * foreignAllocated_);
fy = (double*) lefMalloc(sizeof(double) * foreignAllocated_);
f = (char**) lefMalloc(sizeof(char*) * foreignAllocated_);
if (numForeigns_ != 0) {
for (i = 0; i < numForeigns_; i++) {
hfo[i] = hasForeignOrient_[i];
hfp[i] = hasForeignPoint_[i];
fo[i] = foreignOrient_[i];
fx[i] = foreignX_[i];
fy[i] = foreignY_[i];
f[i] = foreign_[i];
}
lefFree((char*) (hasForeignOrient_));
lefFree((char*) (hasForeignPoint_));
lefFree((char*) (foreignOrient_));
lefFree((char*) (foreignX_));
lefFree((char*) (foreignY_));
lefFree((char*) (foreign_));
}
hasForeignOrient_ = hfo;
hasForeignPoint_ = hfp;
foreignOrient_ = fo;
foreignX_ = fx;
foreignY_ = fy;
foreign_ = f;
}
// orient=-1 means no orient was specified.
if (orient != -1)
hasForeignOrient_[numForeigns_] = 1;
else
hasForeignOrient_[numForeigns_] = -1;
hasForeignPoint_[numForeigns_] = hasPnt;
foreignOrient_[numForeigns_] = orient;
foreignX_[numForeigns_] = x;
foreignY_[numForeigns_] = y;
foreign_[numForeigns_] = (char*) lefMalloc(strlen(name) + 1);
strcpy(foreign_[numForeigns_], CASE(name));
numForeigns_ += 1;
}
|
O0
|
cpp
|
LefDefParser::lefiPin::addForeign(char const*, int, double, double, int):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movsd %xmm0, 0x58(%rsp)
movsd %xmm1, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq 0x70(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x34(%rcx), %eax
cmpl 0x30(%rcx), %eax
jne 0x42507
movq 0x10(%rsp), %rax
cmpl $0x0, 0x34(%rax)
jne 0x422f1
movq 0x10(%rsp), %rax
movl $0x10, 0x34(%rax)
jmp 0x422fe
movq 0x10(%rsp), %rax
movl 0x34(%rax), %ecx
shll %ecx
movl %ecx, 0x34(%rax)
movq 0x10(%rsp), %rax
movslq 0x34(%rax), %rdi
shlq $0x2, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x40(%rsp)
movslq 0x34(%rax), %rdi
shlq $0x2, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rsp)
movslq 0x34(%rax), %rdi
shlq $0x2, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rsp)
movslq 0x34(%rax), %rdi
shlq $0x3, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movslq 0x34(%rax), %rdi
shlq $0x3, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movslq 0x34(%rax), %rdi
shlq $0x3, %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
cmpl $0x0, 0x30(%rax)
je 0x424cc
movl $0x0, 0x48(%rsp)
movq 0x10(%rsp), %rcx
movl 0x48(%rsp), %eax
cmpl 0x30(%rcx), %eax
jge 0x42478
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rcx
movslq 0x48(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x40(%rsp), %rcx
movslq 0x48(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x40(%rax), %rcx
movslq 0x48(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x38(%rsp), %rcx
movslq 0x48(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x48(%rax), %rcx
movslq 0x48(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x30(%rsp), %rcx
movslq 0x48(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x50(%rax), %rcx
movslq 0x48(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x28(%rsp), %rcx
movslq 0x48(%rsp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x58(%rax), %rcx
movslq 0x48(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x20(%rsp), %rcx
movslq 0x48(%rsp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x60(%rax), %rax
movslq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rax
movslq 0x48(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x423b1
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0x38c90
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x50(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x60(%rax)
cmpl $-0x1, 0x4c(%rsp)
je 0x42524
movq 0x10(%rsp), %rcx
movq 0x38(%rcx), %rax
movslq 0x30(%rcx), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x42538
movq 0x10(%rsp), %rcx
movq 0x38(%rcx), %rax
movslq 0x30(%rcx), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rcx
movl 0x64(%rsp), %esi
movq 0x40(%rcx), %rax
movslq 0x30(%rcx), %rdx
movl %esi, (%rax,%rdx,4)
movl 0x4c(%rsp), %esi
movq 0x48(%rcx), %rax
movslq 0x30(%rcx), %rdx
movl %esi, (%rax,%rdx,4)
movsd 0x58(%rsp), %xmm0
movq 0x50(%rcx), %rax
movslq 0x30(%rcx), %rdx
movsd %xmm0, (%rax,%rdx,8)
movsd 0x50(%rsp), %xmm0
movq 0x58(%rcx), %rax
movslq 0x30(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x68(%rsp), %rdi
callq 0x20d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x359d0
movq 0x10(%rsp), %rcx
movq %rax, %rsi
movq 0x60(%rcx), %rax
movslq 0x30(%rcx), %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x60(%rcx), %rax
movslq 0x30(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
callq 0x3f780
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x2250
movq 0x10(%rsp), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser7lefiPin10addForeignEPKciddi:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_14], edx
movsd [rsp+78h+var_20], xmm0
movsd [rsp+78h+var_2C+4], xmm1
mov dword ptr [rsp+78h+var_2C], ecx
mov rcx, [rsp+78h+var_8]
mov [rsp+78h+var_68], rcx
mov eax, [rcx+34h]
cmp eax, [rcx+30h]
jnz loc_42507
mov rax, [rsp+78h+var_68]
cmp dword ptr [rax+34h], 0
jnz short loc_422F1
mov rax, [rsp+78h+var_68]
mov dword ptr [rax+34h], 10h
jmp short loc_422FE
loc_422F1:
mov rax, [rsp+78h+var_68]
mov ecx, [rax+34h]
shl ecx, 1
mov [rax+34h], ecx
loc_422FE:
mov rax, [rsp+78h+var_68]
movsxd rdi, dword ptr [rax+34h]
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_38], rcx
movsxd rdi, dword ptr [rax+34h]
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_40], rcx
movsxd rdi, dword ptr [rax+34h]
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_48], rcx
movsxd rdi, dword ptr [rax+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_50], rcx
movsxd rdi, dword ptr [rax+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_58], rcx
movsxd rdi, dword ptr [rax+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_60], rcx
cmp dword ptr [rax+30h], 0
jz loc_424CC
mov [rsp+78h+var_30], 0
loc_423B1:
mov rcx, [rsp+78h+var_68]
mov eax, [rsp+78h+var_30]
cmp eax, [rcx+30h]
jge loc_42478
mov rax, [rsp+78h+var_68]
mov rcx, [rax+38h]
movsxd rdx, [rsp+78h+var_30]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+78h+var_38]
movsxd rdx, [rsp+78h+var_30]
mov [rcx+rdx*4], esi
mov rcx, [rax+40h]
movsxd rdx, [rsp+78h+var_30]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+78h+var_40]
movsxd rdx, [rsp+78h+var_30]
mov [rcx+rdx*4], esi
mov rcx, [rax+48h]
movsxd rdx, [rsp+78h+var_30]
mov esi, [rcx+rdx*4]; void *
mov rcx, [rsp+78h+var_48]
movsxd rdx, [rsp+78h+var_30]
mov [rcx+rdx*4], esi
mov rcx, [rax+50h]
movsxd rdx, [rsp+78h+var_30]
movsd xmm0, qword ptr [rcx+rdx*8]
mov rcx, [rsp+78h+var_50]
movsxd rdx, [rsp+78h+var_30]
movsd qword ptr [rcx+rdx*8], xmm0
mov rcx, [rax+58h]
movsxd rdx, [rsp+78h+var_30]
movsd xmm0, qword ptr [rcx+rdx*8]
mov rcx, [rsp+78h+var_58]
movsxd rdx, [rsp+78h+var_30]
movsd qword ptr [rcx+rdx*8], xmm0
mov rax, [rax+60h]
movsxd rcx, [rsp+78h+var_30]
mov rdx, [rax+rcx*8]
mov rax, [rsp+78h+var_60]
movsxd rcx, [rsp+78h+var_30]
mov [rax+rcx*8], rdx
mov eax, [rsp+78h+var_30]
add eax, 1
mov [rsp+78h+var_30], eax
jmp loc_423B1
loc_42478:
mov rax, [rsp+78h+var_68]
mov rdi, [rax+38h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+78h+var_68]
mov rdi, [rax+40h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+78h+var_68]
mov rdi, [rax+48h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+78h+var_68]
mov rdi, [rax+50h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+78h+var_68]
mov rdi, [rax+58h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+78h+var_68]
mov rdi, [rax+60h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_424CC:
mov rax, [rsp+78h+var_68]
mov rcx, [rsp+78h+var_38]
mov [rax+38h], rcx
mov rcx, [rsp+78h+var_40]
mov [rax+40h], rcx
mov rcx, [rsp+78h+var_48]
mov [rax+48h], rcx
mov rcx, [rsp+78h+var_50]
mov [rax+50h], rcx
mov rcx, [rsp+78h+var_58]
mov [rax+58h], rcx
mov rcx, [rsp+78h+var_60]
mov [rax+60h], rcx
loc_42507:
cmp dword ptr [rsp+78h+var_2C], 0FFFFFFFFh
jz short loc_42524
mov rcx, [rsp+78h+var_68]
mov rax, [rcx+38h]
movsxd rcx, dword ptr [rcx+30h]
mov dword ptr [rax+rcx*4], 1
jmp short loc_42538
loc_42524:
mov rcx, [rsp+78h+var_68]
mov rax, [rcx+38h]
movsxd rcx, dword ptr [rcx+30h]
mov dword ptr [rax+rcx*4], 0FFFFFFFFh
loc_42538:
mov rcx, [rsp+78h+var_68]
mov esi, [rsp+78h+var_14]
mov rax, [rcx+40h]
movsxd rdx, dword ptr [rcx+30h]
mov [rax+rdx*4], esi
mov esi, dword ptr [rsp+78h+var_2C]; unsigned __int64
mov rax, [rcx+48h]
movsxd rdx, dword ptr [rcx+30h]
mov [rax+rdx*4], esi
movsd xmm0, [rsp+78h+var_20]
mov rax, [rcx+50h]
movsxd rdx, dword ptr [rcx+30h]
movsd qword ptr [rax+rdx*8], xmm0
movsd xmm0, [rsp+78h+var_2C+4]
mov rax, [rcx+58h]
movsxd rcx, dword ptr [rcx+30h]
movsd qword ptr [rax+rcx*8], xmm0
mov rdi, [rsp+78h+var_10]
call _strlen
mov rdi, rax
add rdi, 1; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [rsp+78h+var_68]
mov rsi, rax; char *
mov rax, [rcx+60h]
movsxd rdx, dword ptr [rcx+30h]
mov [rax+rdx*8], rsi
mov rax, [rcx+60h]
movsxd rcx, dword ptr [rcx+30h]
mov rax, [rax+rcx*8]
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_10]; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, [rsp+78h+var_70]
mov rsi, rax
call _strcpy
mov rax, [rsp+78h+var_68]
mov ecx, [rax+30h]
add ecx, 1
mov [rax+30h], ecx
add rsp, 78h
retn
|
LefDefParser::lefiPin * LefDefParser::lefiPin::addForeign(
LefDefParser::lefiPin *this,
LefDefParser *a2,
int a3,
double a4,
double a5,
int a6)
{
long long v6; // rax
char *v7; // rax
LefDefParser *v8; // rax
LefDefParser::lefiPin *result; // rax
long long v10; // [rsp+8h] [rbp-70h]
long long v11; // [rsp+18h] [rbp-60h]
long long v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long v14; // [rsp+30h] [rbp-48h]
long long v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h]
int i; // [rsp+48h] [rbp-30h]
LefDefParser *v20; // [rsp+68h] [rbp-10h]
v20 = a2;
if ( *((_DWORD *)this + 13) == *((_DWORD *)this + 12) )
{
if ( *((_DWORD *)this + 13) )
*((_DWORD *)this + 13) *= 2;
else
*((_DWORD *)this + 13) = 16;
v16 = LefDefParser::lefMalloc((LefDefParser *)(4LL * *((int *)this + 13)));
v15 = LefDefParser::lefMalloc((LefDefParser *)(4LL * *((int *)this + 13)));
v14 = LefDefParser::lefMalloc((LefDefParser *)(4LL * *((int *)this + 13)));
v13 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
v12 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
v11 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
if ( *((_DWORD *)this + 12) )
{
for ( i = 0; i < *((_DWORD *)this + 12); ++i )
{
*(_DWORD *)(v16 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 7) + 4LL * i);
*(_DWORD *)(v15 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 8) + 4LL * i);
a2 = (LefDefParser *)*(unsigned int *)(*((_QWORD *)this + 9) + 4LL * i);
*(_DWORD *)(v14 + 4LL * i) = (_DWORD)a2;
*(_QWORD *)(v13 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 10) + 8LL * i);
*(_QWORD *)(v12 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 11) + 8LL * i);
*(_QWORD *)(v11 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 12) + 8LL * i);
}
LefDefParser::lefFree(*((LefDefParser **)this + 7), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 8), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 9), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 10), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 11), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 12), a2);
}
*((_QWORD *)this + 7) = v16;
*((_QWORD *)this + 8) = v15;
*((_QWORD *)this + 9) = v14;
*((_QWORD *)this + 10) = v13;
*((_QWORD *)this + 11) = v12;
*((_QWORD *)this + 12) = v11;
}
if ( a6 == -1 )
*(_DWORD *)(*((_QWORD *)this + 7) + 4LL * *((int *)this + 12)) = -1;
else
*(_DWORD *)(*((_QWORD *)this + 7) + 4LL * *((int *)this + 12)) = 1;
*(_DWORD *)(*((_QWORD *)this + 8) + 4LL * *((int *)this + 12)) = a3;
*(_DWORD *)(*((_QWORD *)this + 9) + 4LL * *((int *)this + 12)) = a6;
*(double *)(*((_QWORD *)this + 10) + 8LL * *((int *)this + 12)) = a4;
*(double *)(*((_QWORD *)this + 11) + 8LL * *((int *)this + 12)) = a5;
v6 = strlen(v20);
v7 = (char *)LefDefParser::lefMalloc((LefDefParser *)(v6 + 1));
*(_QWORD *)(*((_QWORD *)this + 12) + 8LL * *((int *)this + 12)) = v7;
v10 = *(_QWORD *)(*((_QWORD *)this + 12) + 8LL * *((int *)this + 12));
v8 = LefDefParser::CASE(v20, v7);
strcpy(v10, v8);
result = this;
++*((_DWORD *)this + 12);
return result;
}
|
addForeign:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV dword ptr [RSP + 0x64],EDX
MOVSD qword ptr [RSP + 0x58],XMM0
MOVSD qword ptr [RSP + 0x50],XMM1
MOV dword ptr [RSP + 0x4c],ECX
MOV RCX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RCX
MOV EAX,dword ptr [RCX + 0x34]
CMP EAX,dword ptr [RCX + 0x30]
JNZ 0x00142507
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x34],0x0
JNZ 0x001422f1
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x34],0x10
JMP 0x001422fe
LAB_001422f1:
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x34]
SHL ECX,0x1
MOV dword ptr [RAX + 0x34],ECX
LAB_001422fe:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x2
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RCX
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x2
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RCX
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x2
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RCX
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x3
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RCX
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x3
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RCX
MOVSXD RDI,dword ptr [RAX + 0x34]
SHL RDI,0x3
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RCX
CMP dword ptr [RAX + 0x30],0x0
JZ 0x001424cc
MOV dword ptr [RSP + 0x48],0x0
LAB_001423b1:
MOV RCX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x48]
CMP EAX,dword ptr [RCX + 0x30]
JGE 0x00142478
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x38]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x40]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x40]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x38]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x48]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x30]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x50]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOVSD XMM0,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV RCX,qword ptr [RAX + 0x58]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOVSD XMM0,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x48]
MOVSD qword ptr [RCX + RDX*0x8],XMM0
MOV RAX,qword ptr [RAX + 0x60]
MOVSXD RCX,dword ptr [RSP + 0x48]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x48]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x48]
ADD EAX,0x1
MOV dword ptr [RSP + 0x48],EAX
JMP 0x001423b1
LAB_00142478:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x40]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x58]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x00138c90
LAB_001424cc:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x60],RCX
LAB_00142507:
CMP dword ptr [RSP + 0x4c],-0x1
JZ 0x00142524
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RCX + 0x38]
MOVSXD RCX,dword ptr [RCX + 0x30]
MOV dword ptr [RAX + RCX*0x4],0x1
JMP 0x00142538
LAB_00142524:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RCX + 0x38]
MOVSXD RCX,dword ptr [RCX + 0x30]
MOV dword ptr [RAX + RCX*0x4],0xffffffff
LAB_00142538:
MOV RCX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x64]
MOV RAX,qword ptr [RCX + 0x40]
MOVSXD RDX,dword ptr [RCX + 0x30]
MOV dword ptr [RAX + RDX*0x4],ESI
MOV ESI,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RCX + 0x48]
MOVSXD RDX,dword ptr [RCX + 0x30]
MOV dword ptr [RAX + RDX*0x4],ESI
MOVSD XMM0,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RCX + 0x50]
MOVSXD RDX,dword ptr [RCX + 0x30]
MOVSD qword ptr [RAX + RDX*0x8],XMM0
MOVSD XMM0,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RCX + 0x58]
MOVSXD RCX,dword ptr [RCX + 0x30]
MOVSD qword ptr [RAX + RCX*0x8],XMM0
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x001020d0
MOV RDI,RAX
ADD RDI,0x1
CALL 0x001359d0
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,RAX
MOV RAX,qword ptr [RCX + 0x60]
MOVSXD RDX,dword ptr [RCX + 0x30]
MOV qword ptr [RAX + RDX*0x8],RSI
MOV RAX,qword ptr [RCX + 0x60]
MOVSXD RCX,dword ptr [RCX + 0x30]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x0013f780
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
CALL 0x00102250
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x30]
ADD ECX,0x1
MOV dword ptr [RAX + 0x30],ECX
ADD RSP,0x78
RET
|
/* LefDefParser::lefiPin::addForeign(char const*, int, double, double, int) */
void __thiscall
LefDefParser::lefiPin::addForeign
(lefiPin *this,char *param_1,int param_2,double param_3,double param_4,int param_5)
{
char *__dest;
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
size_t sVar7;
int8 uVar8;
char *__src;
int local_30;
if (*(int *)(this + 0x34) == *(int *)(this + 0x30)) {
if (*(int *)(this + 0x34) == 0) {
*(int4 *)(this + 0x34) = 0x10;
}
else {
*(int *)(this + 0x34) = *(int *)(this + 0x34) << 1;
}
lVar1 = lefMalloc((long)*(int *)(this + 0x34) << 2);
lVar2 = lefMalloc((long)*(int *)(this + 0x34) << 2);
lVar3 = lefMalloc((long)*(int *)(this + 0x34) << 2);
lVar4 = lefMalloc((long)*(int *)(this + 0x34) << 3);
lVar5 = lefMalloc((long)*(int *)(this + 0x34) << 3);
lVar6 = lefMalloc((long)*(int *)(this + 0x34) << 3);
if (*(int *)(this + 0x30) != 0) {
for (local_30 = 0; local_30 < *(int *)(this + 0x30); local_30 = local_30 + 1) {
*(int4 *)(lVar1 + (long)local_30 * 4) =
*(int4 *)(*(long *)(this + 0x38) + (long)local_30 * 4);
*(int4 *)(lVar2 + (long)local_30 * 4) =
*(int4 *)(*(long *)(this + 0x40) + (long)local_30 * 4);
*(int4 *)(lVar3 + (long)local_30 * 4) =
*(int4 *)(*(long *)(this + 0x48) + (long)local_30 * 4);
*(int8 *)(lVar4 + (long)local_30 * 8) =
*(int8 *)(*(long *)(this + 0x50) + (long)local_30 * 8);
*(int8 *)(lVar5 + (long)local_30 * 8) =
*(int8 *)(*(long *)(this + 0x58) + (long)local_30 * 8);
*(int8 *)(lVar6 + (long)local_30 * 8) =
*(int8 *)(*(long *)(this + 0x60) + (long)local_30 * 8);
}
lefFree(*(void **)(this + 0x38));
lefFree(*(void **)(this + 0x40));
lefFree(*(void **)(this + 0x48));
lefFree(*(void **)(this + 0x50));
lefFree(*(void **)(this + 0x58));
lefFree(*(void **)(this + 0x60));
}
*(long *)(this + 0x38) = lVar1;
*(long *)(this + 0x40) = lVar2;
*(long *)(this + 0x48) = lVar3;
*(long *)(this + 0x50) = lVar4;
*(long *)(this + 0x58) = lVar5;
*(long *)(this + 0x60) = lVar6;
}
if (param_5 == -1) {
*(int4 *)(*(long *)(this + 0x38) + (long)*(int *)(this + 0x30) * 4) = 0xffffffff;
}
else {
*(int4 *)(*(long *)(this + 0x38) + (long)*(int *)(this + 0x30) * 4) = 1;
}
*(int *)(*(long *)(this + 0x40) + (long)*(int *)(this + 0x30) * 4) = param_2;
*(int *)(*(long *)(this + 0x48) + (long)*(int *)(this + 0x30) * 4) = param_5;
*(double *)(*(long *)(this + 0x50) + (long)*(int *)(this + 0x30) * 8) = param_3;
*(double *)(*(long *)(this + 0x58) + (long)*(int *)(this + 0x30) * 8) = param_4;
sVar7 = strlen(param_1);
uVar8 = lefMalloc(sVar7 + 1);
*(int8 *)(*(long *)(this + 0x60) + (long)*(int *)(this + 0x30) * 8) = uVar8;
__dest = *(char **)(*(long *)(this + 0x60) + (long)*(int *)(this + 0x30) * 8);
__src = (char *)CASE(param_1);
strcpy(__dest,__src);
*(int *)(this + 0x30) = *(int *)(this + 0x30) + 1;
return;
}
|
|
17,539
|
LefDefParser::lefiPin::addForeign(char const*, int, double, double, int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
|
void
lefiPin::addForeign(const char *name,
int hasPnt,
double x,
double y,
int orient)
{
int i;
int *hfo;
int *hfp;
int *fo;
double *fx;
double *fy;
char **f;
if (foreignAllocated_ == numForeigns_) {
if (foreignAllocated_ == 0)
foreignAllocated_ = 16; // since it involves char*, it will
// costly in the number is too small
else
foreignAllocated_ *= 2;
hfo = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
hfp = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
fo = (int*) lefMalloc(sizeof(int) * foreignAllocated_);
fx = (double*) lefMalloc(sizeof(double) * foreignAllocated_);
fy = (double*) lefMalloc(sizeof(double) * foreignAllocated_);
f = (char**) lefMalloc(sizeof(char*) * foreignAllocated_);
if (numForeigns_ != 0) {
for (i = 0; i < numForeigns_; i++) {
hfo[i] = hasForeignOrient_[i];
hfp[i] = hasForeignPoint_[i];
fo[i] = foreignOrient_[i];
fx[i] = foreignX_[i];
fy[i] = foreignY_[i];
f[i] = foreign_[i];
}
lefFree((char*) (hasForeignOrient_));
lefFree((char*) (hasForeignPoint_));
lefFree((char*) (foreignOrient_));
lefFree((char*) (foreignX_));
lefFree((char*) (foreignY_));
lefFree((char*) (foreign_));
}
hasForeignOrient_ = hfo;
hasForeignPoint_ = hfp;
foreignOrient_ = fo;
foreignX_ = fx;
foreignY_ = fy;
foreign_ = f;
}
// orient=-1 means no orient was specified.
if (orient != -1)
hasForeignOrient_[numForeigns_] = 1;
else
hasForeignOrient_[numForeigns_] = -1;
hasForeignPoint_[numForeigns_] = hasPnt;
foreignOrient_[numForeigns_] = orient;
foreignX_[numForeigns_] = x;
foreignY_[numForeigns_] = y;
foreign_[numForeigns_] = (char*) lefMalloc(strlen(name) + 1);
strcpy(foreign_[numForeigns_], CASE(name));
numForeigns_ += 1;
}
|
O3
|
cpp
|
LefDefParser::lefiPin::addForeign(char const*, int, double, double, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl 0x34(%rdi), %eax
cmpl 0x30(%rdi), %eax
jne 0x29436
movl %edx, (%rsp)
movl %ecx, 0x4(%rsp)
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movq %r15, 0x20(%rsp)
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, 0x34(%rbx)
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x24985
movq %rax, 0x8(%rsp)
movslq 0x34(%rbx), %rdi
shlq $0x2, %rdi
callq 0x24985
movq %rax, %r13
movslq 0x34(%rbx), %rdi
shlq $0x2, %rdi
callq 0x24985
movq %rax, %r15
movslq 0x34(%rbx), %rdi
shlq $0x3, %rdi
callq 0x24985
movq %rax, %r14
movslq 0x34(%rbx), %rdi
shlq $0x3, %rdi
callq 0x24985
movq %rax, %rbp
movslq 0x34(%rbx), %rdi
shlq $0x3, %rdi
callq 0x24985
movq %rax, %r12
cmpl $0x0, 0x30(%rbx)
je 0x29401
movq 0x8(%rsp), %rdx
jle 0x293cb
xorl %eax, %eax
movq 0x38(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%rdx,%rax,4)
movq 0x40(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%r13,%rax,4)
movq 0x48(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%r15,%rax,4)
movq 0x50(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
movq 0x58(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rbp,%rax,8)
movq 0x60(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, (%r12,%rax,8)
incq %rax
movslq 0x30(%rbx), %rcx
cmpq %rcx, %rax
jl 0x29374
movq 0x38(%rbx), %rdi
callq 0x26040
movq 0x40(%rbx), %rdi
callq 0x26040
movq 0x48(%rbx), %rdi
callq 0x26040
movq 0x50(%rbx), %rdi
callq 0x26040
movq 0x58(%rbx), %rdi
callq 0x26040
movq 0x60(%rbx), %rdi
callq 0x26040
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rbx)
movq %r13, 0x40(%rbx)
movq %r15, 0x48(%rbx)
movq %r14, 0x50(%rbx)
movq %rbp, 0x58(%rbx)
movq %r12, 0x60(%rbx)
movq 0x20(%rsp), %r15
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
movl 0x4(%rsp), %ecx
movl (%rsp), %edx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
movq 0x38(%rbx), %rsi
movslq 0x30(%rbx), %rdi
leal -0x1(,%rax,2), %eax
movl %eax, (%rsi,%rdi,4)
movq 0x40(%rbx), %rax
movslq 0x30(%rbx), %rsi
movl %edx, (%rax,%rsi,4)
movq 0x48(%rbx), %rax
movslq 0x30(%rbx), %rdx
movl %ecx, (%rax,%rdx,4)
movq 0x50(%rbx), %rax
movslq 0x30(%rbx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x58(%rbx), %rax
movsd %xmm1, (%rax,%rcx,8)
movq %r15, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x24985
movq 0x60(%rbx), %rcx
movslq 0x30(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x60(%rbx), %rax
movq (%rax,%rdx,8), %r14
movq %r15, %rdi
callq 0x27c0a
movq %r14, %rdi
movq %rax, %rsi
callq 0x21b0
incl 0x30(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser7lefiPin10addForeignEPKciddi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rsi
mov rbx, rdi
mov eax, [rdi+34h]
cmp eax, [rdi+30h]
jnz loc_29436
mov [rsp+58h+var_58], edx
mov [rsp+58h+var_54], ecx
movsd [rsp+58h+var_48], xmm0
movsd [rsp+58h+var_40], xmm1
mov [rsp+58h+var_38], r15
lea ecx, [rax+rax]
test eax, eax
mov eax, 10h
cmovnz eax, ecx
mov [rbx+34h], eax
movsxd rdi, eax
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+58h+var_50], rax
movsxd rdi, dword ptr [rbx+34h]
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r13, rax
movsxd rdi, dword ptr [rbx+34h]
shl rdi, 2; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
movsxd rdi, dword ptr [rbx+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
movsxd rdi, dword ptr [rbx+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbp, rax
movsxd rdi, dword ptr [rbx+34h]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
cmp dword ptr [rbx+30h], 0
jz loc_29401
mov rdx, [rsp+58h+var_50]
jle short loc_293CB
xor eax, eax
loc_29374:
mov rcx, [rbx+38h]
mov ecx, [rcx+rax*4]
mov [rdx+rax*4], ecx
mov rcx, [rbx+40h]
mov ecx, [rcx+rax*4]
mov [r13+rax*4+0], ecx
mov rcx, [rbx+48h]
mov ecx, [rcx+rax*4]
mov [r15+rax*4], ecx
mov rcx, [rbx+50h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [r14+rax*8], xmm0
mov rcx, [rbx+58h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [rbp+rax*8+0], xmm0
mov rcx, [rbx+60h]
mov rcx, [rcx+rax*8]
mov [r12+rax*8], rcx
inc rax
movsxd rcx, dword ptr [rbx+30h]
cmp rax, rcx
jl short loc_29374
loc_293CB:
mov rdi, [rbx+38h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+40h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+48h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+50h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+58h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+60h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_29401:
mov rax, [rsp+58h+var_50]
mov [rbx+38h], rax
mov [rbx+40h], r13
mov [rbx+48h], r15
mov [rbx+50h], r14
mov [rbx+58h], rbp
mov [rbx+60h], r12
mov r15, [rsp+58h+var_38]
movsd xmm1, [rsp+58h+var_40]
movsd xmm0, [rsp+58h+var_48]
mov ecx, [rsp+58h+var_54]
mov edx, [rsp+58h+var_58]
loc_29436:
xor eax, eax
cmp ecx, 0FFFFFFFFh
setnz al
mov rsi, [rbx+38h]
movsxd rdi, dword ptr [rbx+30h]
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
mov [rsi+rdi*4], eax
mov rax, [rbx+40h]
movsxd rsi, dword ptr [rbx+30h]; char *
mov [rax+rsi*4], edx
mov rax, [rbx+48h]
movsxd rdx, dword ptr [rbx+30h]
mov [rax+rdx*4], ecx
mov rax, [rbx+50h]
movsxd rcx, dword ptr [rbx+30h]
movsd qword ptr [rax+rcx*8], xmm0
mov rax, [rbx+58h]
movsd qword ptr [rax+rcx*8], xmm1
mov rdi, r15
call _strlen
lea rdi, [rax+1]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [rbx+60h]
movsxd rdx, dword ptr [rbx+30h]
mov [rcx+rdx*8], rax
mov rax, [rbx+60h]
mov r14, [rax+rdx*8]
mov rdi, r15; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r14
mov rsi, rax
call _strcpy
inc dword ptr [rbx+30h]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::lefiPin::addForeign(
LefDefParser::lefiPin *this,
LefDefParser *a2,
int a3,
double a4,
double a5,
int a6)
{
LefDefParser *v6; // r15
int v7; // eax
int v8; // ecx
bool v9; // zf
int v10; // eax
long long v11; // r13
long long v12; // r15
long long v13; // r14
long long v14; // rbp
long long v15; // r12
long long v16; // rax
char *v17; // rsi
long long v18; // rcx
long long v19; // rax
long long v20; // rax
long long v21; // rdx
long long v22; // r14
LefDefParser *v23; // rax
long long result; // rax
int v25; // [rsp+0h] [rbp-58h]
int v26; // [rsp+4h] [rbp-54h]
long long v27; // [rsp+8h] [rbp-50h]
v6 = a2;
v7 = *((_DWORD *)this + 13);
if ( v7 == *((_DWORD *)this + 12) )
{
v25 = a3;
v26 = a6;
v8 = 2 * v7;
v9 = v7 == 0;
v10 = 16;
if ( !v9 )
v10 = v8;
*((_DWORD *)this + 13) = v10;
v27 = LefDefParser::lefMalloc((LefDefParser *)(4LL * v10));
v11 = LefDefParser::lefMalloc((LefDefParser *)(4LL * *((int *)this + 13)));
v12 = LefDefParser::lefMalloc((LefDefParser *)(4LL * *((int *)this + 13)));
v13 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
v14 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
v15 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 13)));
if ( *((_DWORD *)this + 12) )
{
if ( *((int *)this + 12) > 0 )
{
v16 = 0LL;
do
{
*(_DWORD *)(v27 + 4 * v16) = *(_DWORD *)(*((_QWORD *)this + 7) + 4 * v16);
*(_DWORD *)(v11 + 4 * v16) = *(_DWORD *)(*((_QWORD *)this + 8) + 4 * v16);
*(_DWORD *)(v12 + 4 * v16) = *(_DWORD *)(*((_QWORD *)this + 9) + 4 * v16);
*(_QWORD *)(v13 + 8 * v16) = *(_QWORD *)(*((_QWORD *)this + 10) + 8 * v16);
*(_QWORD *)(v14 + 8 * v16) = *(_QWORD *)(*((_QWORD *)this + 11) + 8 * v16);
*(_QWORD *)(v15 + 8 * v16) = *(_QWORD *)(*((_QWORD *)this + 12) + 8 * v16);
++v16;
}
while ( v16 < *((int *)this + 12) );
}
LefDefParser::lefFree(*((LefDefParser **)this + 7), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 8), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 9), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 10), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 11), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 12), a2);
}
*((_QWORD *)this + 7) = v27;
*((_QWORD *)this + 8) = v11;
*((_QWORD *)this + 9) = v12;
*((_QWORD *)this + 10) = v13;
*((_QWORD *)this + 11) = v14;
*((_QWORD *)this + 12) = v15;
v6 = a2;
a6 = v26;
a3 = v25;
}
*(_DWORD *)(*((_QWORD *)this + 7) + 4LL * *((int *)this + 12)) = 2 * (a6 != -1) - 1;
v17 = (char *)*((int *)this + 12);
*(_DWORD *)(*((_QWORD *)this + 8) + 4LL * (_QWORD)v17) = a3;
*(_DWORD *)(*((_QWORD *)this + 9) + 4LL * *((int *)this + 12)) = a6;
v18 = *((int *)this + 12);
*(double *)(*((_QWORD *)this + 10) + 8 * v18) = a4;
*(double *)(*((_QWORD *)this + 11) + 8 * v18) = a5;
v19 = strlen(v6);
v20 = LefDefParser::lefMalloc((LefDefParser *)(v19 + 1));
v21 = *((int *)this + 12);
*(_QWORD *)(*((_QWORD *)this + 12) + 8 * v21) = v20;
v22 = *(_QWORD *)(*((_QWORD *)this + 12) + 8 * v21);
v23 = LefDefParser::CASE(v6, v17);
result = strcpy(v22, v23);
++*((_DWORD *)this + 12);
return result;
}
|
addForeign:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x34]
CMP EAX,dword ptr [RDI + 0x30]
JNZ 0x00129436
MOV dword ptr [RSP],EDX
MOV dword ptr [RSP + 0x4],ECX
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD qword ptr [RSP + 0x18],XMM1
MOV qword ptr [RSP + 0x20],R15
LEA ECX,[RAX + RAX*0x1]
TEST EAX,EAX
MOV EAX,0x10
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0x34],EAX
MOVSXD RDI,EAX
SHL RDI,0x2
CALL 0x00124985
MOV qword ptr [RSP + 0x8],RAX
MOVSXD RDI,dword ptr [RBX + 0x34]
SHL RDI,0x2
CALL 0x00124985
MOV R13,RAX
MOVSXD RDI,dword ptr [RBX + 0x34]
SHL RDI,0x2
CALL 0x00124985
MOV R15,RAX
MOVSXD RDI,dword ptr [RBX + 0x34]
SHL RDI,0x3
CALL 0x00124985
MOV R14,RAX
MOVSXD RDI,dword ptr [RBX + 0x34]
SHL RDI,0x3
CALL 0x00124985
MOV RBP,RAX
MOVSXD RDI,dword ptr [RBX + 0x34]
SHL RDI,0x3
CALL 0x00124985
MOV R12,RAX
CMP dword ptr [RBX + 0x30],0x0
JZ 0x00129401
MOV RDX,qword ptr [RSP + 0x8]
JLE 0x001293cb
XOR EAX,EAX
LAB_00129374:
MOV RCX,qword ptr [RBX + 0x38]
MOV ECX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV RCX,qword ptr [RBX + 0x40]
MOV ECX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [R13 + RAX*0x4],ECX
MOV RCX,qword ptr [RBX + 0x48]
MOV ECX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [R15 + RAX*0x4],ECX
MOV RCX,qword ptr [RBX + 0x50]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [R14 + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x58]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [RBP + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x60]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV qword ptr [R12 + RAX*0x8],RCX
INC RAX
MOVSXD RCX,dword ptr [RBX + 0x30]
CMP RAX,RCX
JL 0x00129374
LAB_001293cb:
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x48]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x50]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x58]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x60]
CALL 0x00126040
LAB_00129401:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],R13
MOV qword ptr [RBX + 0x48],R15
MOV qword ptr [RBX + 0x50],R14
MOV qword ptr [RBX + 0x58],RBP
MOV qword ptr [RBX + 0x60],R12
MOV R15,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [RSP + 0x18]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RSP]
LAB_00129436:
XOR EAX,EAX
CMP ECX,-0x1
SETNZ AL
MOV RSI,qword ptr [RBX + 0x38]
MOVSXD RDI,dword ptr [RBX + 0x30]
LEA EAX,[-0x1 + RAX*0x2]
MOV dword ptr [RSI + RDI*0x4],EAX
MOV RAX,qword ptr [RBX + 0x40]
MOVSXD RSI,dword ptr [RBX + 0x30]
MOV dword ptr [RAX + RSI*0x4],EDX
MOV RAX,qword ptr [RBX + 0x48]
MOVSXD RDX,dword ptr [RBX + 0x30]
MOV dword ptr [RAX + RDX*0x4],ECX
MOV RAX,qword ptr [RBX + 0x50]
MOVSXD RCX,dword ptr [RBX + 0x30]
MOVSD qword ptr [RAX + RCX*0x8],XMM0
MOV RAX,qword ptr [RBX + 0x58]
MOVSD qword ptr [RAX + RCX*0x8],XMM1
MOV RDI,R15
CALL 0x001020d0
LEA RDI,[RAX + 0x1]
CALL 0x00124985
MOV RCX,qword ptr [RBX + 0x60]
MOVSXD RDX,dword ptr [RBX + 0x30]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBX + 0x60]
MOV R14,qword ptr [RAX + RDX*0x8]
MOV RDI,R15
CALL 0x00127c0a
MOV RDI,R14
MOV RSI,RAX
CALL 0x001021b0
INC dword ptr [RBX + 0x30]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefiPin::addForeign(char const*, int, double, double, int) */
void __thiscall
LefDefParser::lefiPin::addForeign
(lefiPin *this,char *param_1,int param_2,double param_3,double param_4,int param_5)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
size_t sVar10;
int8 uVar11;
char *__src;
char *pcVar12;
ulong uVar13;
iVar1 = *(int *)(this + 0x34);
if (iVar1 == *(int *)(this + 0x30)) {
iVar2 = 0x10;
if (iVar1 != 0) {
iVar2 = iVar1 * 2;
}
*(int *)(this + 0x34) = iVar2;
pcVar12 = param_1;
lVar3 = lefMalloc((LefDefParser *)((long)iVar2 << 2),(ulong)param_1);
lVar4 = lefMalloc((LefDefParser *)((long)*(int *)(this + 0x34) << 2),(ulong)pcVar12);
lVar5 = lefMalloc((LefDefParser *)((long)*(int *)(this + 0x34) << 2),(ulong)pcVar12);
lVar6 = lefMalloc((LefDefParser *)((long)*(int *)(this + 0x34) << 3),(ulong)pcVar12);
lVar7 = lefMalloc((LefDefParser *)((long)*(int *)(this + 0x34) << 3),(ulong)pcVar12);
lVar8 = lefMalloc((LefDefParser *)((long)*(int *)(this + 0x34) << 3),(ulong)pcVar12);
if (*(int *)(this + 0x30) != 0) {
if (0 < *(int *)(this + 0x30)) {
lVar9 = 0;
do {
*(int4 *)(lVar3 + lVar9 * 4) = *(int4 *)(*(long *)(this + 0x38) + lVar9 * 4);
*(int4 *)(lVar4 + lVar9 * 4) = *(int4 *)(*(long *)(this + 0x40) + lVar9 * 4);
*(int4 *)(lVar5 + lVar9 * 4) = *(int4 *)(*(long *)(this + 0x48) + lVar9 * 4);
*(int8 *)(lVar6 + lVar9 * 8) = *(int8 *)(*(long *)(this + 0x50) + lVar9 * 8);
*(int8 *)(lVar7 + lVar9 * 8) = *(int8 *)(*(long *)(this + 0x58) + lVar9 * 8);
*(int8 *)(lVar8 + lVar9 * 8) = *(int8 *)(*(long *)(this + 0x60) + lVar9 * 8);
lVar9 = lVar9 + 1;
} while (lVar9 < *(int *)(this + 0x30));
}
lefFree(*(void **)(this + 0x38));
lefFree(*(void **)(this + 0x40));
lefFree(*(void **)(this + 0x48));
lefFree(*(void **)(this + 0x50));
lefFree(*(void **)(this + 0x58));
lefFree(*(void **)(this + 0x60));
}
*(long *)(this + 0x38) = lVar3;
*(long *)(this + 0x40) = lVar4;
*(long *)(this + 0x48) = lVar5;
*(long *)(this + 0x50) = lVar6;
*(long *)(this + 0x58) = lVar7;
*(long *)(this + 0x60) = lVar8;
}
*(uint *)(*(long *)(this + 0x38) + (long)*(int *)(this + 0x30) * 4) =
(uint)(param_5 != -1) * 2 + -1;
uVar13 = (ulong)*(int *)(this + 0x30);
*(int *)(*(long *)(this + 0x40) + uVar13 * 4) = param_2;
*(int *)(*(long *)(this + 0x48) + (long)*(int *)(this + 0x30) * 4) = param_5;
iVar1 = *(int *)(this + 0x30);
*(double *)(*(long *)(this + 0x50) + (long)iVar1 * 8) = param_3;
*(double *)(*(long *)(this + 0x58) + (long)iVar1 * 8) = param_4;
sVar10 = strlen(param_1);
uVar11 = lefMalloc((LefDefParser *)(sVar10 + 1),uVar13);
iVar1 = *(int *)(this + 0x30);
*(int8 *)(*(long *)(this + 0x60) + (long)iVar1 * 8) = uVar11;
pcVar12 = *(char **)(*(long *)(this + 0x60) + (long)iVar1 * 8);
__src = (char *)CASE(param_1);
strcpy(pcVar12,__src);
*(int *)(this + 0x30) = *(int *)(this + 0x30) + 1;
return;
}
|
|
17,540
|
write_hook_for_undo_row_insert
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool write_hook_for_undo_row_insert(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
MARIA_SHARE *share= tbl_info->s;
share->state.state.records++;
share->state.state.checksum+= *(ha_checksum *)hook_arg;
return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg);
}
|
O3
|
c
|
write_hook_for_undo_row_insert:
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rax
incq 0x18(%rax)
movl (%r8), %edx
addl %edx, 0x48(%rax)
movq (%rcx), %rax
movq %rax, 0x98(%rsi)
movq 0xa0(%rsi), %rcx
movq %rcx, %rdx
shlq $0x8, %rdx
je 0x4e225
xorl %eax, %eax
popq %rbp
retq
orq %rax, %rcx
movq %rcx, 0xa0(%rsi)
jmp 0x4e221
|
write_hook_for_undo_row_insert:
push rbp
mov rbp, rsp
mov rax, [rdx]
inc qword ptr [rax+18h]
mov edx, [r8]
add [rax+48h], edx
mov rax, [rcx]
mov [rsi+98h], rax
mov rcx, [rsi+0A0h]
mov rdx, rcx
shl rdx, 8
jz short loc_4E225
loc_4E221:
xor eax, eax
pop rbp
retn
loc_4E225:
or rcx, rax
mov [rsi+0A0h], rcx
jmp short loc_4E221
|
long long write_hook_for_undo_row_insert(long long a1, long long a2, long long *a3, long long *a4, _DWORD *a5)
{
long long v5; // rax
long long v6; // rax
v5 = *a3;
++*(_QWORD *)(v5 + 24);
*(_DWORD *)(v5 + 72) += *a5;
v6 = *a4;
*(_QWORD *)(a2 + 152) = *a4;
if ( !(*(_QWORD *)(a2 + 160) << 8) )
*(_QWORD *)(a2 + 160) |= v6;
return 0LL;
}
|
write_hook_for_undo_row_insert:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDX]
INC qword ptr [RAX + 0x18]
MOV EDX,dword ptr [R8]
ADD dword ptr [RAX + 0x48],EDX
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI + 0x98],RAX
MOV RCX,qword ptr [RSI + 0xa0]
MOV RDX,RCX
SHL RDX,0x8
JZ 0x0014e225
LAB_0014e221:
XOR EAX,EAX
POP RBP
RET
LAB_0014e225:
OR RCX,RAX
MOV qword ptr [RSI + 0xa0],RCX
JMP 0x0014e221
|
int8
write_hook_for_undo_row_insert
(int8 param_1,long param_2,long *param_3,ulong *param_4,int *param_5)
{
long *plVar1;
int *piVar2;
long lVar3;
ulong uVar4;
lVar3 = *param_3;
plVar1 = (long *)(lVar3 + 0x18);
*plVar1 = *plVar1 + 1;
piVar2 = (int *)(lVar3 + 0x48);
*piVar2 = *piVar2 + *param_5;
uVar4 = *param_4;
*(ulong *)(param_2 + 0x98) = uVar4;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar4;
}
return 0;
}
|
|
17,541
|
minja::Value::to_int() const
|
monkey531[P]llama/common/minja.hpp
|
int64_t to_int() const {
if (is_null()) return 0;
if (is_boolean()) return get<bool>() ? 1 : 0;
if (is_number()) return static_cast<int64_t>(get<double>());
if (is_string()) {
try {
return std::stol(get<std::string>());
} catch (const std::exception &) {
return 0;
}
}
return 0;
}
|
O1
|
cpp
|
minja::Value::to_int() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movb 0x40(%rdi), %al
jne 0x75aae
cmpq $0x0, 0x10(%rsi)
jne 0x75aae
testb %al, %al
jne 0x75aae
cmpq $0x0, 0x30(%rsi)
jne 0x75aae
xorl %ebx, %ebx
jmp 0x75b50
cmpb $0x4, %al
jne 0x75ac2
movq %rsi, %rdi
callq 0x3fede
movzbl %al, %ebx
jmp 0x75b50
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x75ad9
movq %rsi, %rdi
callq 0x3e568
cvttsd2si %xmm0, %rbx
jmp 0x75b50
cmpb $0x3, %al
jne 0x75aa7
leaq 0x8(%rsp), %rdi
callq 0x3ffd8
movq 0x8(%rsp), %r15
callq 0x18060
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x18930
cmpq %r15, (%r12)
je 0x75b60
movq %rax, %rbx
movl (%r14), %eax
testl %eax, %eax
je 0x75b32
cmpl $0x22, %eax
jne 0x75b35
leaq 0x39b05(%rip), %rdi # 0xaf632
callq 0x18980
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75b50
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39acb(%rip), %rdi # 0xaf632
callq 0x18400
movq %rdx, %r15
movq %rax, %rbx
jmp 0x75b9e
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x75b83
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75b9e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
cmpl $0x1, %r15d
jne 0x75bb6
callq 0x182b0
callq 0x18ab0
jmp 0x75aa7
callq 0x18b90
nop
|
_ZNK5minja5Value6to_intEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov rsi, rdi
cmp qword ptr [rdi+20h], 0
mov al, [rdi+40h]
jnz short loc_75AAE
cmp qword ptr [rsi+10h], 0
jnz short loc_75AAE
test al, al
jnz short loc_75AAE
cmp qword ptr [rsi+30h], 0
jnz short loc_75AAE
loc_75AA7:
xor ebx, ebx
jmp loc_75B50
loc_75AAE:
cmp al, 4
jnz short loc_75AC2
mov rdi, rsi
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
movzx ebx, al
jmp loc_75B50
loc_75AC2:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_75AD9
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
cvttsd2si rbx, xmm0
jmp short loc_75B50
loc_75AD9:
cmp al, 3
jnz short loc_75AA7
lea rdi, [rsp+58h+var_50]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov r15, [rsp+58h+var_50]
call ___errno_location
mov r14, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+58h+var_30]
mov rdi, r15
mov rsi, r12
mov edx, 0Ah
call _strtol
cmp [r12], r15
jz short loc_75B60
mov rbx, rax
mov eax, [r14]
test eax, eax
jz short loc_75B32
cmp eax, 22h ; '"'
jnz short loc_75B35
lea rdi, aStol; "stol"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_75B32:
mov [r14], ebp
loc_75B35:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75B50
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75B50:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_75B60:
lea rdi, aStol; "stol"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov r15, rdx
mov rbx, rax
jmp short loc_75B9E
mov r15, rdx
mov rbx, rax
cmp dword ptr [r14], 0
jnz short loc_75B83
mov [r14], ebp
loc_75B83:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75B9E
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75B9E:
mov rdi, rbx; void *
cmp r15d, 1
jnz short loc_75BB6
call ___cxa_begin_catch
call ___cxa_end_catch
jmp loc_75AA7
loc_75BB6:
call __Unwind_Resume
|
long long minja::Value::to_int(minja::Value *this)
{
char v1; // al
long long v2; // rbx
long long *v3; // r15
int *v4; // r14
int v5; // ebp
long long v6; // rax
void *v8; // rdi
int v9; // edx
long long *v10; // [rsp+8h] [rbp-50h] BYREF
long long v11; // [rsp+18h] [rbp-40h] BYREF
long long *v12; // [rsp+28h] [rbp-30h] BYREF
v1 = *((_BYTE *)this + 64);
if ( !*((_QWORD *)this + 4) && !*((_QWORD *)this + 2) && !v1 && !*((_QWORD *)this + 6) )
return 0LL;
if ( v1 == 4 )
return (unsigned __int8)minja::Value::get<bool>(this);
if ( (unsigned __int8)(v1 - 5) <= 2u )
return (unsigned int)(int)minja::Value::get<double>(this);
if ( v1 != 3 )
return 0LL;
minja::Value::get<std::string>((long long)&v10, this);
v3 = v10;
v4 = (int *)__errno_location();
v5 = *v4;
*v4 = 0;
v6 = strtol(v3, &v12, 10LL);
if ( v12 == v3 )
{
v8 = (void *)std::__throw_invalid_argument("stol");
if ( v9 != 1 )
_Unwind_Resume(v8);
__cxa_begin_catch(v8);
__cxa_end_catch();
return 0LL;
}
v2 = v6;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stol");
}
else
{
*v4 = v5;
}
if ( v10 != &v11 )
operator delete(v10, v11 + 1);
return v2;
}
|
to_int:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RSI,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV AL,byte ptr [RDI + 0x40]
JNZ 0x00175aae
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x00175aae
TEST AL,AL
JNZ 0x00175aae
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x00175aae
LAB_00175aa7:
XOR EBX,EBX
JMP 0x00175b50
LAB_00175aae:
CMP AL,0x4
JNZ 0x00175ac2
MOV RDI,RSI
CALL 0x0013fede
MOVZX EBX,AL
JMP 0x00175b50
LAB_00175ac2:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x00175ad9
MOV RDI,RSI
CALL 0x0013e568
CVTTSD2SI RBX,XMM0
JMP 0x00175b50
LAB_00175ad9:
CMP AL,0x3
JNZ 0x00175aa7
LAB_00175add:
LEA RDI,[RSP + 0x8]
CALL 0x0013ffd8
MOV R15,qword ptr [RSP + 0x8]
CALL 0x00118060
MOV R14,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x28]
MOV RDI,R15
MOV RSI,R12
MOV EDX,0xa
CALL 0x00118930
CMP qword ptr [R12],R15
JZ 0x00175b60
MOV RBX,RAX
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x00175b32
CMP EAX,0x22
JNZ 0x00175b35
LAB_00175b26:
LEA RDI,[0x1af632]
CALL 0x00118980
LAB_00175b32:
MOV dword ptr [R14],EBP
LAB_00175b35:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00175b50
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00175b50:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00175b60:
LEA RDI,[0x1af632]
CALL 0x00118400
LAB_00175b6c:
MOV R15,RDX
MOV RBX,RAX
JMP 0x00175b9e
LAB_00175b9e:
MOV RDI,RBX
CMP R15D,0x1
JNZ 0x00175bb6
CALL 0x001182b0
CALL 0x00118ab0
JMP 0x00175aa7
LAB_00175bb6:
CALL 0x00118b90
|
/* minja::Value::to_int() const */
ulong __thiscall minja::Value::to_int(Value *this)
{
Value VVar1;
int iVar2;
bool bVar3;
int *piVar4;
ulong uVar5;
double dVar6;
int1 auVar7 [12];
long *local_50;
long local_40 [2];
long *local_30;
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
return 0;
}
if (VVar1 == (Value)0x4) {
bVar3 = get<bool>(this);
return (ulong)bVar3;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar6 = get<double>(this);
return (long)dVar6;
}
if (VVar1 != (Value)0x3) {
return 0;
}
/* try { // try from 00175add to 00175ae6 has its CatchHandler @ 00175b6c */
get<std::__cxx11::string>();
piVar4 = __errno_location();
iVar2 = *piVar4;
*piVar4 = 0;
uVar5 = strtol((char *)local_50,(char **)&local_30,10);
if (local_30 == local_50) {
auVar7 = std::__throw_invalid_argument("stol");
/* catch(type#1 @ 001e2728, ) { ... } // from try @ 00175add with catch @
00175b6c */
if (auVar7._8_4_ == 1) {
__cxa_begin_catch();
__cxa_end_catch();
return 0;
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar7._0_8_);
}
if (*piVar4 != 0) {
if (*piVar4 != 0x22) goto LAB_00175b35;
/* try { // try from 00175b26 to 00175b6b has its CatchHandler @ 00175b74 */
std::__throw_out_of_range("stol");
}
*piVar4 = iVar2;
LAB_00175b35:
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
return uVar5;
}
return uVar5;
}
|
|
17,542
|
minja::Value::to_int() const
|
monkey531[P]llama/common/minja.hpp
|
int64_t to_int() const {
if (is_null()) return 0;
if (is_boolean()) return get<bool>() ? 1 : 0;
if (is_number()) return static_cast<int64_t>(get<double>());
if (is_string()) {
try {
return std::stol(get<std::string>());
} catch (const std::exception &) {
return 0;
}
}
return 0;
}
|
O3
|
cpp
|
minja::Value::to_int() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movb 0x40(%rdi), %al
jne 0x7474e
cmpq $0x0, 0x10(%rsi)
jne 0x7474e
testb %al, %al
jne 0x7474e
cmpq $0x0, 0x30(%rsi)
jne 0x7474e
xorl %ebx, %ebx
jmp 0x747f0
cmpb $0x4, %al
jne 0x74762
movq %rsi, %rdi
callq 0x3f376
movzbl %al, %ebx
jmp 0x747f0
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x74779
movq %rsi, %rdi
callq 0x3d9aa
cvttsd2si %xmm0, %rbx
jmp 0x747f0
cmpb $0x3, %al
jne 0x74747
leaq 0x8(%rsp), %rdi
callq 0x3f486
movq 0x8(%rsp), %r15
callq 0x18060
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x18930
cmpq %r15, (%r12)
je 0x74800
movq %rax, %rbx
movl (%r14), %eax
testl %eax, %eax
je 0x747d2
cmpl $0x22, %eax
jne 0x747d5
leaq 0x37e55(%rip), %rdi # 0xac622
callq 0x18980
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x747f0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37e1b(%rip), %rdi # 0xac622
callq 0x18400
movq %rdx, %r15
movq %rax, %rbx
jmp 0x7483e
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x74823
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7483e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
cmpl $0x1, %r15d
jne 0x74856
callq 0x182b0
callq 0x18ab0
jmp 0x74747
callq 0x18b90
nop
|
_ZNK5minja5Value6to_intEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov rsi, rdi
cmp qword ptr [rdi+20h], 0
mov al, [rdi+40h]
jnz short loc_7474E
cmp qword ptr [rsi+10h], 0
jnz short loc_7474E
test al, al
jnz short loc_7474E
cmp qword ptr [rsi+30h], 0
jnz short loc_7474E
loc_74747:
xor ebx, ebx
jmp loc_747F0
loc_7474E:
cmp al, 4
jnz short loc_74762
mov rdi, rsi
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
movzx ebx, al
jmp loc_747F0
loc_74762:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_74779
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
cvttsd2si rbx, xmm0
jmp short loc_747F0
loc_74779:
cmp al, 3
jnz short loc_74747
lea rdi, [rsp+58h+var_50]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov r15, [rsp+58h+var_50]
call ___errno_location
mov r14, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+58h+var_30]
mov rdi, r15
mov rsi, r12
mov edx, 0Ah
call _strtol
cmp [r12], r15
jz short loc_74800
mov rbx, rax
mov eax, [r14]
test eax, eax
jz short loc_747D2
cmp eax, 22h ; '"'
jnz short loc_747D5
lea rdi, aStol; "stol"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_747D2:
mov [r14], ebp
loc_747D5:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_747F0
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_747F0:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_74800:
lea rdi, aStol; "stol"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov r15, rdx
mov rbx, rax
jmp short loc_7483E
mov r15, rdx
mov rbx, rax
cmp dword ptr [r14], 0
jnz short loc_74823
mov [r14], ebp
loc_74823:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7483E
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7483E:
mov rdi, rbx; void *
cmp r15d, 1
jnz short loc_74856
call ___cxa_begin_catch
call ___cxa_end_catch
jmp loc_74747
loc_74856:
call __Unwind_Resume
|
long long minja::Value::to_int(minja::Value *this)
{
char v1; // al
long long v2; // rbx
long long *v3; // r15
int *v4; // r14
int v5; // ebp
long long v6; // rax
void *v8; // rdi
int v9; // edx
long long *v10; // [rsp+8h] [rbp-50h] BYREF
long long v11; // [rsp+18h] [rbp-40h] BYREF
long long *v12; // [rsp+28h] [rbp-30h] BYREF
v1 = *((_BYTE *)this + 64);
if ( !*((_QWORD *)this + 4) && !*((_QWORD *)this + 2) && !v1 && !*((_QWORD *)this + 6) )
return 0LL;
if ( v1 == 4 )
return (unsigned __int8)minja::Value::get<bool>(this);
if ( (unsigned __int8)(v1 - 5) <= 2u )
return (unsigned int)(int)minja::Value::get<double>(this);
if ( v1 != 3 )
return 0LL;
minja::Value::get<std::string>((long long)&v10, this);
v3 = v10;
v4 = (int *)__errno_location();
v5 = *v4;
*v4 = 0;
v6 = strtol(v3, &v12, 10LL);
if ( v12 == v3 )
{
v8 = (void *)std::__throw_invalid_argument("stol");
if ( v9 != 1 )
_Unwind_Resume(v8);
__cxa_begin_catch(v8);
__cxa_end_catch();
return 0LL;
}
v2 = v6;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stol");
}
else
{
*v4 = v5;
}
if ( v10 != &v11 )
operator delete(v10, v11 + 1);
return v2;
}
|
to_int:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RSI,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV AL,byte ptr [RDI + 0x40]
JNZ 0x0017474e
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x0017474e
TEST AL,AL
JNZ 0x0017474e
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x0017474e
LAB_00174747:
XOR EBX,EBX
JMP 0x001747f0
LAB_0017474e:
CMP AL,0x4
JNZ 0x00174762
MOV RDI,RSI
CALL 0x0013f376
MOVZX EBX,AL
JMP 0x001747f0
LAB_00174762:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x00174779
MOV RDI,RSI
CALL 0x0013d9aa
CVTTSD2SI RBX,XMM0
JMP 0x001747f0
LAB_00174779:
CMP AL,0x3
JNZ 0x00174747
LAB_0017477d:
LEA RDI,[RSP + 0x8]
CALL 0x0013f486
MOV R15,qword ptr [RSP + 0x8]
CALL 0x00118060
MOV R14,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x28]
MOV RDI,R15
MOV RSI,R12
MOV EDX,0xa
CALL 0x00118930
CMP qword ptr [R12],R15
JZ 0x00174800
MOV RBX,RAX
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x001747d2
CMP EAX,0x22
JNZ 0x001747d5
LAB_001747c6:
LEA RDI,[0x1ac622]
CALL 0x00118980
LAB_001747d2:
MOV dword ptr [R14],EBP
LAB_001747d5:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001747f0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_001747f0:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00174800:
LEA RDI,[0x1ac622]
CALL 0x00118400
LAB_0017480c:
MOV R15,RDX
MOV RBX,RAX
JMP 0x0017483e
LAB_0017483e:
MOV RDI,RBX
CMP R15D,0x1
JNZ 0x00174856
CALL 0x001182b0
CALL 0x00118ab0
JMP 0x00174747
LAB_00174856:
CALL 0x00118b90
|
/* minja::Value::to_int() const */
ulong __thiscall minja::Value::to_int(Value *this)
{
Value VVar1;
int iVar2;
bool bVar3;
int *piVar4;
ulong uVar5;
double dVar6;
int1 auVar7 [12];
long *local_50;
long local_40 [2];
long *local_30;
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
return 0;
}
if (VVar1 == (Value)0x4) {
bVar3 = get<bool>(this);
return (ulong)bVar3;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar6 = get<double>(this);
return (long)dVar6;
}
if (VVar1 != (Value)0x3) {
return 0;
}
/* try { // try from 0017477d to 00174786 has its CatchHandler @ 0017480c */
get<std::__cxx11::string>();
piVar4 = __errno_location();
iVar2 = *piVar4;
*piVar4 = 0;
uVar5 = strtol((char *)local_50,(char **)&local_30,10);
if (local_30 == local_50) {
auVar7 = std::__throw_invalid_argument("stol");
/* catch(type#1 @ 001df728, ) { ... } // from try @ 0017477d with catch @
0017480c */
if (auVar7._8_4_ == 1) {
__cxa_begin_catch();
__cxa_end_catch();
return 0;
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar7._0_8_);
}
if (*piVar4 != 0) {
if (*piVar4 != 0x22) goto LAB_001747d5;
/* try { // try from 001747c6 to 0017480b has its CatchHandler @ 00174814 */
std::__throw_out_of_range("stol");
}
*piVar4 = iVar2;
LAB_001747d5:
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
return uVar5;
}
return uVar5;
}
|
|
17,543
|
JS_SpeciesConstructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_SpeciesConstructor(JSContext *ctx, JSValue obj,
JSValue defaultConstructor)
{
JSValue ctor, species;
if (!JS_IsObject(obj))
return JS_ThrowTypeErrorNotAnObject(ctx);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsUndefined(ctor))
return js_dup(defaultConstructor);
if (!JS_IsObject(ctor)) {
JS_FreeValue(ctx, ctor);
return JS_ThrowTypeErrorNotAnObject(ctx);
}
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
if (JS_IsUndefined(species) || JS_IsNull(species))
return js_dup(defaultConstructor);
if (!JS_IsConstructor(ctx, species)) {
JS_FreeValue(ctx, species);
return JS_ThrowTypeError(ctx, "not a constructor");
}
return species;
}
|
O0
|
c
|
JS_SpeciesConstructor:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x2af70
cmpl $0x0, %eax
jne 0x7485a
movq 0x40(%rsp), %rdi
callq 0x2f5a0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x74a4a
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x3d, %ecx
callq 0x29d80
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x748be
movq 0x30(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x74a4a
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x748f0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x216d0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x74a4a
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2af70
cmpl $0x0, %eax
jne 0x74931
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x23c90
movq 0x40(%rsp), %rdi
callq 0x2f5a0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x74a4a
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl $0xdd, %ecx
callq 0x29d80
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x23c90
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x749a7
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x74a4a
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
jne 0x749cf
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2e240
cmpl $0x0, %eax
je 0x749ea
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x216d0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x74a4a
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x380f0
cmpl $0x0, %eax
jne 0x74a36
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x23c90
movq 0x40(%rsp), %rdi
leaq 0x99d21(%rip), %rsi # 0x10e744
movb $0x0, %al
callq 0x2d300
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x74a4a
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopl (%rax)
|
JS_SpeciesConstructor:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_30], rcx
mov [rsp+78h+var_28], r8
mov [rsp+78h+var_38], rdi
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_18]
call JS_IsObject
cmp eax, 0
jnz short loc_7485A
mov rdi, [rsp+78h+var_38]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp loc_74A4A
loc_7485A:
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_18]
mov ecx, 3Dh ; '='
call JS_GetProperty
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_48], rax
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_40], rax
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_748BE
mov rax, [rsp+78h+var_48]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_40]
mov [rsp+78h+var_8], rax
jmp loc_74A4A
loc_748BE:
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_40]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_748F0
mov rdi, [rsp+78h+var_30]
mov rsi, [rsp+78h+var_28]
call js_dup
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp loc_74A4A
loc_748F0:
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_40]
call JS_IsObject
cmp eax, 0
jnz short loc_74931
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
call JS_FreeValue
mov rdi, [rsp+78h+var_38]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp loc_74A4A
loc_74931:
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
mov ecx, 0DDh
call JS_GetProperty
mov [rsp+78h+var_78], rax
mov [rsp+78h+var_70], rdx
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_58], rax
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
call JS_FreeValue
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_749A7
mov rax, [rsp+78h+var_58]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_8], rax
jmp loc_74A4A
loc_749A7:
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call JS_IsUndefined_0
cmp eax, 0
jnz short loc_749CF
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call JS_IsNull_0
cmp eax, 0
jz short loc_749EA
loc_749CF:
mov rdi, [rsp+78h+var_30]
mov rsi, [rsp+78h+var_28]
call js_dup
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp short loc_74A4A
loc_749EA:
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_50]
call JS_IsConstructor
cmp eax, 0
jnz short loc_74A36
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_50]
call JS_FreeValue
mov rdi, [rsp+78h+var_38]
lea rsi, aNotAConstructo; "not a constructor"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp short loc_74A4A
loc_74A36:
mov rax, [rsp+78h+var_58]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_8], rax
loc_74A4A:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
_DWORD * JS_SpeciesConstructor(
long long a1,
long long a2,
long long a3,
_DWORD *a4,
unsigned int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
long long v28; // rdx
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
long long v36; // [rsp+0h] [rbp-78h]
long long Property; // [rsp+10h] [rbp-68h]
long long v38; // [rsp+28h] [rbp-50h]
long long v39; // [rsp+38h] [rbp-40h]
int v43; // [rsp+58h] [rbp-20h]
int v44; // [rsp+60h] [rbp-18h]
v43 = a2;
v44 = a3;
if ( !JS_IsObject(a2, a3) )
return (_DWORD *)JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v19, v20, a12, a13, a3, v15, v16, v17, v18);
Property = JS_GetProperty(a1, v43, v44, 61);
v39 = v21;
if ( JS_IsException_1(Property, v21) )
return (_DWORD *)Property;
if ( JS_IsUndefined_0(Property, v39) )
return js_dup(a4, a5);
if ( !JS_IsObject(Property, v39) )
{
JS_FreeValue(a1, Property, v39);
return (_DWORD *)JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v26, v27, a12, a13, Property, v22, v23, v24, v25);
}
v36 = JS_GetProperty(a1, Property, v39, 221);
v38 = v28;
JS_FreeValue(a1, Property, v39);
if ( JS_IsException_1(v36, v38) )
return (_DWORD *)v36;
if ( JS_IsUndefined_0(v36, v38) || JS_IsNull_0(v36, v38) )
return js_dup(a4, a5);
if ( JS_IsConstructor(a1, v36, v38) )
return (_DWORD *)v36;
JS_FreeValue(a1, v36, v38);
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"not a constructor",
v29,
v30,
v31,
v32,
a6,
a7,
a8,
a9,
v33,
v34,
a12,
a13,
v36);
}
|
JS_SpeciesConstructor:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x50],R8
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x0012af70
CMP EAX,0x0
JNZ 0x0017485a
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0012f5a0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00174a4a
LAB_0017485a:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV ECX,0x3d
CALL 0x00129d80
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001748be
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00174a4a
LAB_001748be:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001748f0
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x001216d0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00174a4a
LAB_001748f0:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x0012af70
CMP EAX,0x0
JNZ 0x00174931
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0012f5a0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00174a4a
LAB_00174931:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV ECX,0xdd
CALL 0x00129d80
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001749a7
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00174a4a
LAB_001749a7:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0012e260
CMP EAX,0x0
JNZ 0x001749cf
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0012e240
CMP EAX,0x0
JZ 0x001749ea
LAB_001749cf:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x001216d0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00174a4a
LAB_001749ea:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x001380f0
CMP EAX,0x0
JNZ 0x00174a36
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[0x20e744]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00174a4a
LAB_00174a36:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
LAB_00174a4a:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
JS_SpeciesConstructor
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int1 auVar6 [16];
iVar1 = JS_IsObject(param_2,param_3);
if (iVar1 == 0) {
auVar6 = JS_ThrowTypeErrorNotAnObject(param_1);
}
else {
auVar6 = JS_GetProperty(param_1,param_2,param_3,0x3d);
uVar4 = auVar6._8_8_;
uVar2 = auVar6._0_8_;
iVar1 = JS_IsException(uVar2,uVar4);
if (iVar1 == 0) {
iVar1 = JS_IsUndefined(uVar2,uVar4);
if (iVar1 == 0) {
iVar1 = JS_IsObject(uVar2,uVar4);
if (iVar1 == 0) {
JS_FreeValue(param_1,uVar2,uVar4);
auVar6 = JS_ThrowTypeErrorNotAnObject(param_1);
}
else {
auVar6 = JS_GetProperty(param_1,uVar2,uVar4,0xdd);
uVar5 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
JS_FreeValue(param_1,uVar2,uVar4);
iVar1 = JS_IsException(uVar3,uVar5);
if (iVar1 == 0) {
iVar1 = JS_IsUndefined(uVar3,uVar5);
if ((iVar1 == 0) && (iVar1 = JS_IsNull(uVar3,uVar5), iVar1 == 0)) {
iVar1 = JS_IsConstructor(param_1,uVar3,uVar5);
if (iVar1 == 0) {
JS_FreeValue(param_1,uVar3,uVar5);
auVar6 = JS_ThrowTypeError(param_1,"not a constructor");
}
}
else {
auVar6 = js_dup(param_4,param_5);
}
}
}
}
else {
auVar6 = js_dup(param_4,param_5);
}
}
}
return auVar6;
}
|
|
17,544
|
JS_SpeciesConstructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_SpeciesConstructor(JSContext *ctx, JSValue obj,
JSValue defaultConstructor)
{
JSValue ctor, species;
if (!JS_IsObject(obj))
return JS_ThrowTypeErrorNotAnObject(ctx);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsUndefined(ctor))
return js_dup(defaultConstructor);
if (!JS_IsObject(ctor)) {
JS_FreeValue(ctx, ctor);
return JS_ThrowTypeErrorNotAnObject(ctx);
}
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
if (JS_IsUndefined(species) || JS_IsNull(species))
return js_dup(defaultConstructor);
if (!JS_IsConstructor(ctx, species)) {
JS_FreeValue(ctx, species);
return JS_ThrowTypeError(ctx, "not a constructor");
}
return species;
}
|
O1
|
c
|
JS_SpeciesConstructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
cmpl $-0x1, %edx
jne 0x44119
movq %r8, %r14
movq %rcx, %rbx
movq %r15, %rdi
movl $0x3d, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %r12
cmpl $-0x1, %r12d
je 0x4414f
cmpl $0x6, %r12d
je 0x44147
cmpl $0x3, %r12d
je 0x4418f
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
leaq 0x5af05(%rip), %rsi # 0x9f025
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rbx
movq %r12, %r14
jmp 0x44132
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0xdd, %ecx
movq %r13, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, 0x10(%rsp)
movq %rdx, %rbp
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
leal -0x2(%rbp), %eax
cmpl $0x2, %eax
jae 0x441a3
movq %rbx, 0x8(%rsp)
cmpl $-0x9, %r14d
jb 0x44132
movq 0x8(%rsp), %rax
incl (%rax)
jmp 0x44132
cmpl $0x6, %ebp
jne 0x441b2
movq 0x10(%rsp), %rbx
movq %rbp, %r14
jmp 0x44132
movq 0x10(%rsp), %rsi
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %ebp
jne 0x441cc
movq 0x8(%rsp), %rax
testb $0x10, 0x5(%rax)
jne 0x441e4
movq 0x18(%r15), %rdi
movq %rbp, %rdx
callq 0x1d8c6
leaq 0x5b501(%rip), %rsi # 0x9f6e0
jmp 0x44120
movq %rsi, %rbx
jmp 0x441ad
|
JS_SpeciesConstructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
cmp edx, 0FFFFFFFFh
jnz short loc_44119
mov r14, r8
mov rbx, rcx
mov rdi, r15
mov ecx, 3Dh ; '='
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
mov r12, rdx
cmp r12d, 0FFFFFFFFh
jz short loc_4414F
cmp r12d, 6
jz short loc_44147
cmp r12d, 3
jz loc_4418F
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
loc_44119:
lea rsi, aOperandPrototy+20h; "not an object"
loc_44120:
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
loc_44132:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44147:
mov rbx, r13
mov r14, r12
jmp short loc_44132
loc_4414F:
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov ecx, 0DDh
mov r8, r13
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov [rsp+48h+var_38], rax
mov rbp, rdx
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
lea eax, [rbp-2]
cmp eax, 2
jnb short loc_441A3
loc_4418F:
mov [rsp+48h+var_40], rbx
cmp r14d, 0FFFFFFF7h
jb short loc_44132
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
jmp short loc_44132
loc_441A3:
cmp ebp, 6
jnz short loc_441B2
mov rbx, [rsp+48h+var_38]
loc_441AD:
mov r14, rbp
jmp short loc_44132
loc_441B2:
mov rsi, [rsp+48h+var_38]
mov [rsp+48h+var_40], rsi
cmp ebp, 0FFFFFFFFh
jnz short loc_441CC
mov rax, [rsp+48h+var_40]
test byte ptr [rax+5], 10h
jnz short loc_441E4
loc_441CC:
mov rdi, [r15+18h]
mov rdx, rbp
call JS_FreeValueRT
lea rsi, aNotAConstructo; "not a constructor"
jmp loc_44120
loc_441E4:
mov rbx, rsi
jmp short loc_441AD
|
_DWORD * JS_SpeciesConstructor(
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)
{
unsigned int v14; // r14d
_DWORD *v15; // rbx
_DWORD *PropertyInternal2; // rax
long long v17; // rdx
_DWORD *v18; // r13
long long v19; // r12
char *v20; // rsi
long long v22; // rdx
long long v23; // rbp
char v24; // [rsp+0h] [rbp-48h]
unsigned long long v25; // [rsp+10h] [rbp-38h]
if ( (_DWORD)a3 != -1 )
goto LABEL_6;
v14 = a5;
v15 = (_DWORD *)a4;
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0x3Du, a2, a3, 0LL, 0);
v18 = PropertyInternal2;
v19 = v17;
switch ( (_DWORD)v17 )
{
case 0xFFFFFFFF:
v25 = JS_GetPropertyInternal2(a1, (long long)PropertyInternal2, v17, 0xDDu, (long long)PropertyInternal2, v17, 0LL, 0);
v23 = v22;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v18, v19);
if ( (unsigned int)(v23 - 2) >= 2 )
{
if ( (_DWORD)v23 == 6 )
return (_DWORD *)v25;
if ( (_DWORD)v23 == -1 && (*(_BYTE *)(v25 + 5) & 0x10) != 0 )
return (_DWORD *)v25;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v25, v23);
v20 = "not a constructor";
goto LABEL_7;
}
break;
case 6:
return PropertyInternal2;
case 3:
break;
default:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v17);
LABEL_6:
v20 = "not an object";
LABEL_7:
v15 = 0LL;
JS_ThrowTypeError(a1, (long long)v20, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v24);
return v15;
}
if ( v14 >= 0xFFFFFFF7 )
++*v15;
return v15;
}
| |||
17,545
|
JS_SpeciesConstructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_SpeciesConstructor(JSContext *ctx, JSValue obj,
JSValue defaultConstructor)
{
JSValue ctor, species;
if (!JS_IsObject(obj))
return JS_ThrowTypeErrorNotAnObject(ctx);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsUndefined(ctor))
return js_dup(defaultConstructor);
if (!JS_IsObject(ctor)) {
JS_FreeValue(ctx, ctor);
return JS_ThrowTypeErrorNotAnObject(ctx);
}
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
if (JS_IsUndefined(species) || JS_IsNull(species))
return js_dup(defaultConstructor);
if (!JS_IsConstructor(ctx, species)) {
JS_FreeValue(ctx, species);
return JS_ThrowTypeError(ctx, "not a constructor");
}
return species;
}
|
O2
|
c
|
JS_SpeciesConstructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
cmpl $-0x1, %edx
jne 0x3bb22
movq %r8, %r14
movq %rcx, %rbx
pushq $0x3d
popq %rcx
movq %r15, %rdi
callq 0x1b043
movq %rax, %rbp
movq %rdx, %r12
cmpl $-0x1, %r12d
je 0x3bb4d
cmpl $0x6, %r12d
je 0x3bb45
cmpl $0x3, %r12d
je 0x3bb93
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1801e
movq %r15, %rdi
callq 0x1d5e1
pushq $0x6
popq %r14
xorl %ebx, %ebx
movq %rbx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rbx
movq %r12, %r14
jmp 0x3bb30
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0xdd, %ecx
callq 0x1b043
movq %rax, (%rsp)
movq %rdx, %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1801e
leal -0x2(%r13), %eax
cmpl $0x2, %eax
jb 0x3bb93
cmpl $-0x1, %r13d
je 0x3bb9d
cmpl $0x6, %r13d
movq (%rsp), %rbx
jne 0x3bba7
movq %r13, %r14
jmp 0x3bb30
cmpl $-0x9, %r14d
jb 0x3bb30
incl (%rbx)
jmp 0x3bb30
movq (%rsp), %rbx
testb $0x10, 0x5(%rbx)
jne 0x3bb8e
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1801e
leaq 0x4aa74(%rip), %rsi # 0x86630
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %r14
jmp 0x3bb30
|
JS_SpeciesConstructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
cmp edx, 0FFFFFFFFh
jnz short loc_3BB22
mov r14, r8
mov rbx, rcx
push 3Dh ; '='
pop rcx
mov rdi, r15
call JS_GetProperty
mov rbp, rax
mov r12, rdx
cmp r12d, 0FFFFFFFFh
jz short loc_3BB4D
cmp r12d, 6
jz short loc_3BB45
cmp r12d, 3
jz short loc_3BB93
mov rdi, r15
mov rsi, rbp
mov rdx, r12
call JS_FreeValue
loc_3BB22:
mov rdi, r15
call JS_ThrowTypeErrorNotAnObject
push 6
pop r14
xor ebx, ebx
loc_3BB30:
mov rax, rbx
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3BB45:
mov rbx, rbp
mov r14, r12
jmp short loc_3BB30
loc_3BB4D:
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov ecx, 0DDh
call JS_GetProperty
mov [rsp+38h+var_38], rax
mov r13, rdx
mov rdi, r15
mov rsi, rbp
mov rdx, r12
call JS_FreeValue
lea eax, [r13-2]
cmp eax, 2
jb short loc_3BB93
cmp r13d, 0FFFFFFFFh
jz short loc_3BB9D
cmp r13d, 6
mov rbx, [rsp+38h+var_38]
jnz short loc_3BBA7
loc_3BB8E:
mov r14, r13
jmp short loc_3BB30
loc_3BB93:
cmp r14d, 0FFFFFFF7h
jb short loc_3BB30
inc dword ptr [rbx]
jmp short loc_3BB30
loc_3BB9D:
mov rbx, [rsp+38h+var_38]
test byte ptr [rbx+5], 10h
jnz short loc_3BB8E
loc_3BBA7:
mov rdi, r15
mov rsi, rbx
mov rdx, r13
call JS_FreeValue
lea rsi, aNotAConstructo; "not a constructor"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
push 6
pop r14
jmp loc_3BB30
|
_DWORD * JS_SpeciesConstructor(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
unsigned int v15; // r14d
_DWORD *v16; // rbx
long long Property; // rax
long long v18; // rdx
long long v19; // rbp
long long v20; // r12
long long v22; // rdx
long long v23; // r13
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
char v30; // [rsp+0h] [rbp-38h]
long long v31; // [rsp+0h] [rbp-38h]
v30 = v14;
if ( (_DWORD)a3 != -1 )
goto LABEL_6;
v15 = a5;
v16 = (_DWORD *)a4;
Property = JS_GetProperty(a1, a2, -1, 61);
v19 = Property;
v20 = v18;
if ( (_DWORD)v18 != -1 )
{
if ( (_DWORD)v18 == 6 )
return (_DWORD *)Property;
if ( (_DWORD)v18 != 3 )
{
a2 = Property;
JS_FreeValue(a1, Property, v18);
LABEL_6:
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v30);
return 0LL;
}
goto LABEL_13;
}
v31 = JS_GetProperty(a1, Property, -1, 221);
v23 = v22;
JS_FreeValue(a1, v19, v20);
if ( (unsigned int)(v23 - 2) < 2 )
{
LABEL_13:
if ( v15 >= 0xFFFFFFF7 )
++*v16;
return v16;
}
if ( (_DWORD)v23 == -1 )
{
v16 = (_DWORD *)v31;
if ( (*(_BYTE *)(v31 + 5) & 0x10) != 0 )
return v16;
}
else
{
v16 = (_DWORD *)v31;
if ( (_DWORD)v23 == 6 )
return v16;
}
JS_FreeValue(a1, (long long)v16, v23);
v16 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a constructor", v24, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v31);
return v16;
}
|
JS_SpeciesConstructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
CMP EDX,-0x1
JNZ 0x0013bb22
MOV R14,R8
MOV RBX,RCX
PUSH 0x3d
POP RCX
MOV RDI,R15
CALL 0x0011b043
MOV RBP,RAX
MOV R12,RDX
CMP R12D,-0x1
JZ 0x0013bb4d
CMP R12D,0x6
JZ 0x0013bb45
CMP R12D,0x3
JZ 0x0013bb93
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
CALL 0x0011801e
LAB_0013bb22:
MOV RDI,R15
CALL 0x0011d5e1
PUSH 0x6
POP R14
XOR EBX,EBX
LAB_0013bb30:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013bb45:
MOV RBX,RBP
MOV R14,R12
JMP 0x0013bb30
LAB_0013bb4d:
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
MOV ECX,0xdd
CALL 0x0011b043
MOV qword ptr [RSP],RAX
MOV R13,RDX
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
CALL 0x0011801e
LEA EAX,[R13 + -0x2]
CMP EAX,0x2
JC 0x0013bb93
CMP R13D,-0x1
JZ 0x0013bb9d
CMP R13D,0x6
MOV RBX,qword ptr [RSP]
JNZ 0x0013bba7
LAB_0013bb8e:
MOV R14,R13
JMP 0x0013bb30
LAB_0013bb93:
CMP R14D,-0x9
JC 0x0013bb30
INC dword ptr [RBX]
JMP 0x0013bb30
LAB_0013bb9d:
MOV RBX,qword ptr [RSP]
TEST byte ptr [RBX + 0x5],0x10
JNZ 0x0013bb8e
LAB_0013bba7:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R13
CALL 0x0011801e
LEA RSI,[0x186630]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP R14
JMP 0x0013bb30
|
int1 [16]
JS_SpeciesConstructor
(int8 param_1,int8 param_2,int8 param_3,int *param_4,int8 param_5)
{
int1 auVar1 [16];
int1 auVar2 [16];
int8 uVar3;
int8 uVar4;
int iVar5;
int1 auVar6 [16];
auVar2._8_8_ = param_5;
auVar2._0_8_ = param_4;
auVar1._8_8_ = param_5;
auVar1._0_8_ = param_4;
if ((int)param_3 == -1) {
auVar6 = JS_GetProperty(param_1,param_2,param_3,0x3d);
uVar4 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar5 = auVar6._8_4_;
if (iVar5 == -1) {
auVar6 = JS_GetProperty(param_1,uVar3,uVar4,0xdd);
JS_FreeValue(param_1,uVar3,uVar4);
iVar5 = auVar6._8_4_;
if (1 < iVar5 - 2U) {
if (iVar5 == -1) {
if ((*(byte *)(auVar6._0_8_ + 5) & 0x10) != 0) {
return auVar6;
}
}
else if (iVar5 == 6) {
return auVar6;
}
JS_FreeValue(param_1,auVar6._0_8_,auVar6._8_8_);
JS_ThrowTypeError(param_1,"not a constructor");
return ZEXT816(6) << 0x40;
}
}
else {
if (iVar5 == 6) {
return auVar6;
}
if (iVar5 != 3) {
JS_FreeValue(param_1,uVar3,uVar4);
goto LAB_0013bb22;
}
}
if (0xfffffff6 < (uint)param_5) {
*param_4 = *param_4 + 1;
auVar1 = auVar2;
}
}
else {
LAB_0013bb22:
JS_ThrowTypeErrorNotAnObject(param_1);
auVar1 = ZEXT816(6) << 0x40;
}
return auVar1;
}
|
|
17,546
|
deflate_huff
|
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/deflate.c
|
local block_state deflate_huff(s, flush)
deflate_state *s;
int flush;
{
int bflush; /* set if current block must be flushed */
for (;;) {
/* Make sure that we have a literal to write. */
if (s->lookahead == 0) {
fill_window(s);
if (s->lookahead == 0) {
if (flush == Z_NO_FLUSH)
return need_more;
break; /* flush the current block */
}
}
/* Output a literal byte */
s->match_length = 0;
Tracevv((stderr,"%c", s->window[s->strstart]));
_tr_tally_lit(s, s->window[s->strstart], bflush);
s->lookahead--;
s->strstart++;
if (bflush) FLUSH_BLOCK(s, 0);
}
s->insert = 0;
if (flush == Z_FINISH) {
FLUSH_BLOCK(s, 1);
return finish_done;
}
if (s->sym_next)
FLUSH_BLOCK(s, 0);
return block_done;
}
|
O3
|
c
|
deflate_huff:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %r15d, %r15d
cmpl $0x0, 0xb4(%rbx)
jne 0x5c2f
movq %rbx, %rdi
callq 0x44a6
cmpl $0x0, 0xb4(%rbx)
je 0x5d11
movl $0x0, 0xa0(%rbx)
movq 0x60(%rbx), %rax
movl 0xac(%rbx), %ecx
movzbl (%rax,%rcx), %eax
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %r15b, (%rcx,%rdx)
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %r15b, (%rcx,%rdx)
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %al, (%rcx,%rdx)
incw 0xd4(%rbx,%rax,4)
movl 0x170c(%rbx), %ecx
decl 0xb4(%rbx)
movl 0xac(%rbx), %eax
incl %eax
cmpl 0x1710(%rbx), %ecx
movl %eax, 0xac(%rbx)
jne 0x5c11
movq 0x98(%rbx), %rcx
testq %rcx, %rcx
js 0x5cd6
movl %ecx, %esi
addq 0x60(%rbx), %rsi
jmp 0x5cd8
xorl %esi, %esi
movl %eax, %edx
subq %rcx, %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xd13b
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x5767
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x5c11
jmp 0x5ddd
testl %ebp, %ebp
je 0x5d38
movl $0x0, 0x172c(%rbx)
cmpl $0x4, %ebp
jne 0x5d40
movq 0x98(%rbx), %rax
testq %rax, %rax
js 0x5d64
movl %eax, %esi
addq 0x60(%rbx), %rsi
jmp 0x5d66
xorl %r14d, %r14d
jmp 0x5ddd
cmpl $0x0, 0x170c(%rbx)
je 0x5dd7
movq 0x98(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
js 0x5da4
movl %eax, %esi
addq 0x60(%rbx), %rsi
jmp 0x5da6
xorl %esi, %esi
movl 0xac(%rbx), %edx
subq %rax, %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0xd13b
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x5767
movq (%rbx), %rax
cmpl $0x1, 0x20(%rax)
movl $0x3, %r14d
sbbl $0x0, %r14d
jmp 0x5ddd
xorl %esi, %esi
movl 0xac(%rbx), %edx
subq %rax, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xd13b
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x5767
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0x5ddd
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
deflate_huff:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, esi
mov rbx, rdi
xor r15d, r15d
loc_5C11:
cmp dword ptr [rbx+0B4h], 0
jnz short loc_5C2F
mov rdi, rbx
call fill_window
cmp dword ptr [rbx+0B4h], 0
jz loc_5D11
loc_5C2F:
mov dword ptr [rbx+0A0h], 0
mov rax, [rbx+60h]
mov ecx, [rbx+0ACh]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbx+1700h]
mov edx, [rbx+170Ch]
lea esi, [rdx+1]
mov [rbx+170Ch], esi
mov [rcx+rdx], r15b
mov rcx, [rbx+1700h]
mov edx, [rbx+170Ch]
lea esi, [rdx+1]
mov [rbx+170Ch], esi
mov [rcx+rdx], r15b
mov rcx, [rbx+1700h]
mov edx, [rbx+170Ch]
lea esi, [rdx+1]
mov [rbx+170Ch], esi
mov [rcx+rdx], al
inc word ptr [rbx+rax*4+0D4h]
mov ecx, [rbx+170Ch]
dec dword ptr [rbx+0B4h]
mov eax, [rbx+0ACh]
inc eax
cmp ecx, [rbx+1710h]
mov [rbx+0ACh], eax
jnz loc_5C11
mov rcx, [rbx+98h]
test rcx, rcx
js short loc_5CD6
mov esi, ecx
add rsi, [rbx+60h]
jmp short loc_5CD8
loc_5CD6:
xor esi, esi
loc_5CD8:
mov edx, eax
sub rdx, rcx
xor r14d, r14d
mov rdi, rbx
xor ecx, ecx
call _tr_flush_block
mov eax, [rbx+0ACh]
mov [rbx+98h], rax
mov rdi, [rbx]
call flush_pending
mov rax, [rbx]
cmp dword ptr [rax+20h], 0
jnz loc_5C11
jmp loc_5DDD
loc_5D11:
test ebp, ebp
jz short loc_5D38
mov dword ptr [rbx+172Ch], 0
cmp ebp, 4
jnz short loc_5D40
mov rax, [rbx+98h]
test rax, rax
js short loc_5D64
mov esi, eax
add rsi, [rbx+60h]
jmp short loc_5D66
loc_5D38:
xor r14d, r14d
jmp loc_5DDD
loc_5D40:
cmp dword ptr [rbx+170Ch], 0
jz loc_5DD7
mov rax, [rbx+98h]
xor r14d, r14d
test rax, rax
js short loc_5DA4
mov esi, eax
add rsi, [rbx+60h]
jmp short loc_5DA6
loc_5D64:
xor esi, esi
loc_5D66:
mov edx, [rbx+0ACh]
sub rdx, rax
mov rdi, rbx
mov ecx, 1
call _tr_flush_block
mov eax, [rbx+0ACh]
mov [rbx+98h], rax
mov rdi, [rbx]
call flush_pending
mov rax, [rbx]
cmp dword ptr [rax+20h], 1
mov r14d, 3
sbb r14d, 0
jmp short loc_5DDD
loc_5DA4:
xor esi, esi
loc_5DA6:
mov edx, [rbx+0ACh]
sub rdx, rax
mov rdi, rbx
xor ecx, ecx
call _tr_flush_block
mov eax, [rbx+0ACh]
mov [rbx+98h], rax
mov rdi, [rbx]
call flush_pending
mov rax, [rbx]
cmp dword ptr [rax+20h], 0
jz short loc_5DDD
loc_5DD7:
mov r14d, 1
loc_5DDD:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
unsigned long long deflate_huff(long long a1, int a2)
{
long long v3; // rax
long long v4; // rcx
long long v5; // rdx
long long v6; // rcx
long long v7; // rdx
long long v8; // rcx
long long v9; // rdx
unsigned int v10; // eax
bool v11; // zf
long long v12; // rcx
long long v13; // rsi
unsigned int v14; // r14d
long long v15; // rax
long long v16; // rsi
long long v17; // rax
long long v18; // rsi
while ( 1 )
{
if ( !*(_DWORD *)(a1 + 180) )
{
fill_window((_QWORD *)a1);
if ( !*(_DWORD *)(a1 + 180) )
break;
}
*(_DWORD *)(a1 + 160) = 0;
v3 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 96) + *(unsigned int *)(a1 + 172));
v4 = *(_QWORD *)(a1 + 5888);
v5 = *(unsigned int *)(a1 + 5900);
*(_DWORD *)(a1 + 5900) = v5 + 1;
*(_BYTE *)(v4 + v5) = 0;
v6 = *(_QWORD *)(a1 + 5888);
v7 = *(unsigned int *)(a1 + 5900);
*(_DWORD *)(a1 + 5900) = v7 + 1;
*(_BYTE *)(v6 + v7) = 0;
v8 = *(_QWORD *)(a1 + 5888);
v9 = *(unsigned int *)(a1 + 5900);
*(_DWORD *)(a1 + 5900) = v9 + 1;
*(_BYTE *)(v8 + v9) = v3;
++*(_WORD *)(a1 + 4 * v3 + 212);
LODWORD(v8) = *(_DWORD *)(a1 + 5900);
--*(_DWORD *)(a1 + 180);
v10 = *(_DWORD *)(a1 + 172) + 1;
v11 = (_DWORD)v8 == *(_DWORD *)(a1 + 5904);
*(_DWORD *)(a1 + 172) = v10;
if ( v11 )
{
v12 = *(_QWORD *)(a1 + 152);
v13 = v12 < 0 ? 0LL : *(_QWORD *)(a1 + 96) + (unsigned int)v12;
v14 = 0;
tr_flush_block(a1, v13, v10 - v12, 0LL);
*(_QWORD *)(a1 + 152) = *(unsigned int *)(a1 + 172);
flush_pending(*(_QWORD *)a1);
if ( !*(_DWORD *)(*(_QWORD *)a1 + 32LL) )
return v14;
}
}
if ( a2 )
{
*(_DWORD *)(a1 + 5932) = 0;
if ( a2 == 4 )
{
v15 = *(_QWORD *)(a1 + 152);
if ( v15 < 0 )
v16 = 0LL;
else
v16 = *(_QWORD *)(a1 + 96) + (unsigned int)v15;
tr_flush_block(a1, v16, *(unsigned int *)(a1 + 172) - v15, 1LL);
*(_QWORD *)(a1 + 152) = *(unsigned int *)(a1 + 172);
flush_pending(*(_QWORD *)a1);
return ((*(unsigned int *)(*(_QWORD *)a1 + 32LL) | 0x300000000uLL) - 1) >> 32;
}
else
{
if ( !*(_DWORD *)(a1 + 5900) )
return 1;
v17 = *(_QWORD *)(a1 + 152);
v14 = 0;
v18 = v17 < 0 ? 0LL : *(_QWORD *)(a1 + 96) + (unsigned int)v17;
tr_flush_block(a1, v18, *(unsigned int *)(a1 + 172) - v17, 0LL);
*(_QWORD *)(a1 + 152) = *(unsigned int *)(a1 + 172);
flush_pending(*(_QWORD *)a1);
if ( *(_DWORD *)(*(_QWORD *)a1 + 32LL) )
return 1;
}
}
else
{
return 0;
}
return v14;
}
|
deflate_huff:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
XOR R15D,R15D
LAB_00105c11:
CMP dword ptr [RBX + 0xb4],0x0
JNZ 0x00105c2f
MOV RDI,RBX
CALL 0x001044a6
CMP dword ptr [RBX + 0xb4],0x0
JZ 0x00105d11
LAB_00105c2f:
MOV dword ptr [RBX + 0xa0],0x0
MOV RAX,qword ptr [RBX + 0x60]
MOV ECX,dword ptr [RBX + 0xac]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBX + 0x1700]
MOV EDX,dword ptr [RBX + 0x170c]
LEA ESI,[RDX + 0x1]
MOV dword ptr [RBX + 0x170c],ESI
MOV byte ptr [RCX + RDX*0x1],R15B
MOV RCX,qword ptr [RBX + 0x1700]
MOV EDX,dword ptr [RBX + 0x170c]
LEA ESI,[RDX + 0x1]
MOV dword ptr [RBX + 0x170c],ESI
MOV byte ptr [RCX + RDX*0x1],R15B
MOV RCX,qword ptr [RBX + 0x1700]
MOV EDX,dword ptr [RBX + 0x170c]
LEA ESI,[RDX + 0x1]
MOV dword ptr [RBX + 0x170c],ESI
MOV byte ptr [RCX + RDX*0x1],AL
INC word ptr [RBX + RAX*0x4 + 0xd4]
MOV ECX,dword ptr [RBX + 0x170c]
DEC dword ptr [RBX + 0xb4]
MOV EAX,dword ptr [RBX + 0xac]
INC EAX
CMP ECX,dword ptr [RBX + 0x1710]
MOV dword ptr [RBX + 0xac],EAX
JNZ 0x00105c11
MOV RCX,qword ptr [RBX + 0x98]
TEST RCX,RCX
JS 0x00105cd6
MOV ESI,ECX
ADD RSI,qword ptr [RBX + 0x60]
JMP 0x00105cd8
LAB_00105cd6:
XOR ESI,ESI
LAB_00105cd8:
MOV EDX,EAX
SUB RDX,RCX
XOR R14D,R14D
MOV RDI,RBX
XOR ECX,ECX
CALL 0x0010d13b
MOV EAX,dword ptr [RBX + 0xac]
MOV qword ptr [RBX + 0x98],RAX
MOV RDI,qword ptr [RBX]
CALL 0x00105767
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x20],0x0
JNZ 0x00105c11
JMP 0x00105ddd
LAB_00105d11:
TEST EBP,EBP
JZ 0x00105d38
MOV dword ptr [RBX + 0x172c],0x0
CMP EBP,0x4
JNZ 0x00105d40
MOV RAX,qword ptr [RBX + 0x98]
TEST RAX,RAX
JS 0x00105d64
MOV ESI,EAX
ADD RSI,qword ptr [RBX + 0x60]
JMP 0x00105d66
LAB_00105d38:
XOR R14D,R14D
JMP 0x00105ddd
LAB_00105d40:
CMP dword ptr [RBX + 0x170c],0x0
JZ 0x00105dd7
MOV RAX,qword ptr [RBX + 0x98]
XOR R14D,R14D
TEST RAX,RAX
JS 0x00105da4
MOV ESI,EAX
ADD RSI,qword ptr [RBX + 0x60]
JMP 0x00105da6
LAB_00105d64:
XOR ESI,ESI
LAB_00105d66:
MOV EDX,dword ptr [RBX + 0xac]
SUB RDX,RAX
MOV RDI,RBX
MOV ECX,0x1
CALL 0x0010d13b
MOV EAX,dword ptr [RBX + 0xac]
MOV qword ptr [RBX + 0x98],RAX
MOV RDI,qword ptr [RBX]
CALL 0x00105767
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x20],0x1
MOV R14D,0x3
SBB R14D,0x0
JMP 0x00105ddd
LAB_00105da4:
XOR ESI,ESI
LAB_00105da6:
MOV EDX,dword ptr [RBX + 0xac]
SUB RDX,RAX
MOV RDI,RBX
XOR ECX,ECX
CALL 0x0010d13b
MOV EAX,dword ptr [RBX + 0xac]
MOV qword ptr [RBX + 0x98],RAX
MOV RDI,qword ptr [RBX]
CALL 0x00105767
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x20],0x0
JZ 0x00105ddd
LAB_00105dd7:
MOV R14D,0x1
LAB_00105ddd:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int deflate_huff(long *param_1,int param_2)
{
short *psVar1;
byte bVar2;
ulong uVar3;
uint uVar4;
long lVar5;
while ((*(int *)((long)param_1 + 0xb4) != 0 ||
(fill_window(param_1), *(int *)((long)param_1 + 0xb4) != 0))) {
*(int4 *)(param_1 + 0x14) = 0;
bVar2 = *(byte *)(param_1[0xc] + (ulong)*(uint *)((long)param_1 + 0xac));
uVar4 = *(uint *)((long)param_1 + 0x170c);
*(uint *)((long)param_1 + 0x170c) = uVar4 + 1;
*(int1 *)(param_1[0x2e0] + (ulong)uVar4) = 0;
uVar4 = *(uint *)((long)param_1 + 0x170c);
*(uint *)((long)param_1 + 0x170c) = uVar4 + 1;
*(int1 *)(param_1[0x2e0] + (ulong)uVar4) = 0;
uVar4 = *(uint *)((long)param_1 + 0x170c);
*(uint *)((long)param_1 + 0x170c) = uVar4 + 1;
*(byte *)(param_1[0x2e0] + (ulong)uVar4) = bVar2;
psVar1 = (short *)((long)param_1 + (ulong)bVar2 * 4 + 0xd4);
*psVar1 = *psVar1 + 1;
*(int *)((long)param_1 + 0xb4) = *(int *)((long)param_1 + 0xb4) + -1;
uVar4 = *(int *)((long)param_1 + 0xac) + 1;
*(uint *)((long)param_1 + 0xac) = uVar4;
if (*(int *)((long)param_1 + 0x170c) == (int)param_1[0x2e2]) {
uVar3 = param_1[0x13];
if ((long)uVar3 < 0) {
lVar5 = 0;
}
else {
lVar5 = (uVar3 & 0xffffffff) + param_1[0xc];
}
_tr_flush_block(param_1,lVar5,uVar4 - uVar3,0);
param_1[0x13] = (ulong)*(uint *)((long)param_1 + 0xac);
flush_pending(*param_1);
if (*(int *)(*param_1 + 0x20) == 0) {
return 0;
}
}
}
if (param_2 == 0) {
return 0;
}
*(int4 *)((long)param_1 + 0x172c) = 0;
if (param_2 != 4) {
if (*(int *)((long)param_1 + 0x170c) != 0) {
uVar3 = param_1[0x13];
if ((long)uVar3 < 0) {
lVar5 = 0;
}
else {
lVar5 = (uVar3 & 0xffffffff) + param_1[0xc];
}
_tr_flush_block(param_1,lVar5,*(uint *)((long)param_1 + 0xac) - uVar3,0);
param_1[0x13] = (ulong)*(uint *)((long)param_1 + 0xac);
flush_pending(*param_1);
if (*(int *)(*param_1 + 0x20) == 0) {
return 0;
}
}
return 1;
}
uVar3 = param_1[0x13];
if ((long)uVar3 < 0) {
lVar5 = 0;
}
else {
lVar5 = (uVar3 & 0xffffffff) + param_1[0xc];
}
_tr_flush_block(param_1,lVar5,*(uint *)((long)param_1 + 0xac) - uVar3,1);
param_1[0x13] = (ulong)*(uint *)((long)param_1 + 0xac);
flush_pending(*param_1);
return 3 - (uint)(*(int *)(*param_1 + 0x20) == 0);
}
|
|
17,547
|
inline_mysql_cond_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
}
|
O0
|
c
|
inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1aadce(%rip), %rax # 0x1d6b08
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24380
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
|
long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))(a1, a2);
return pthread_cond_init(a2, a3);
}
|
inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x2d6b08]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124380
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
|
17,548
|
JS_MarkValue
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_MarkValue(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
if (JS_VALUE_HAS_REF_COUNT(val)) {
switch(JS_VALUE_GET_TAG(val)) {
case JS_TAG_OBJECT:
case JS_TAG_FUNCTION_BYTECODE:
mark_func(rt, JS_VALUE_GET_PTR(val));
break;
default:
break;
}
}
}
|
O1
|
c
|
JS_MarkValue:
movq %rsi, -0x8(%rsp)
notl %edx
testl $0xfffffffe, %edx # imm = 0xFFFFFFFE
jne 0x213c2
movq -0x8(%rsp), %rsi
jmpq *%rcx
retq
|
JS_MarkValue:
mov [rsp+var_8], rsi
not edx
test edx, 0FFFFFFFEh
jnz short locret_213C2
mov rsi, [rsp+var_8]
jmp rcx
locret_213C2:
retn
|
long long JS_MarkValue(long long a1, long long a2, int a3, long long ( *a4)(long long, long long))
{
long long result; // rax
if ( (~a3 & 0xFFFFFFFE) == 0 )
return a4(a1, a2);
return result;
}
|
JS_MarkValue:
MOV qword ptr [RSP + -0x8],RSI
NOT EDX
TEST EDX,0xfffffffe
JNZ 0x001213c2
MOV RSI,qword ptr [RSP + -0x8]
JMP RCX
LAB_001213c2:
RET
|
void JS_MarkValue(int8 param_1,int8 param_2,uint param_3,code *UNRECOVERED_JUMPTABLE)
{
if ((~param_3 & 0xfffffffe) == 0) {
/* WARNING: Could not recover jumptable at 0x001213c0. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,param_2);
return;
}
return;
}
|
|
17,549
|
JS_MarkValue
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_MarkValue(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
if (JS_VALUE_HAS_REF_COUNT(val)) {
switch(JS_VALUE_GET_TAG(val)) {
case JS_TAG_OBJECT:
case JS_TAG_FUNCTION_BYTECODE:
mark_func(rt, JS_VALUE_GET_PTR(val));
break;
default:
break;
}
}
}
|
O2
|
c
|
JS_MarkValue:
notl %edx
testl $0xfffffffe, %edx # imm = 0xFFFFFFFE
jne 0x1b518
jmpq *%rcx
retq
|
JS_MarkValue:
not edx
test edx, 0FFFFFFFEh
jnz short locret_1B518
jmp rcx
locret_1B518:
retn
|
long long JS_MarkValue(long long a1, long long a2, int a3, long long (*a4)(void))
{
long long result; // rax
if ( (~a3 & 0xFFFFFFFE) == 0 )
return a4();
return result;
}
|
JS_MarkValue:
NOT EDX
TEST EDX,0xfffffffe
JNZ 0x0011b518
JMP RCX
LAB_0011b518:
RET
|
void JS_MarkValue(int8 param_1,int8 param_2,uint param_3,code *UNRECOVERED_JUMPTABLE)
{
if ((~param_3 & 0xfffffffe) == 0) {
/* WARNING: Could not recover jumptable at 0x0011b516. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
return;
}
return;
}
|
|
17,550
|
JS_MarkValue
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_MarkValue(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
if (JS_VALUE_HAS_REF_COUNT(val)) {
switch(JS_VALUE_GET_TAG(val)) {
case JS_TAG_OBJECT:
case JS_TAG_FUNCTION_BYTECODE:
mark_func(rt, JS_VALUE_GET_PTR(val));
break;
default:
break;
}
}
}
|
O3
|
c
|
JS_MarkValue:
notl %edx
testl $0xfffffffe, %edx # imm = 0xFFFFFFFE
jne 0x21afb
jmpq *%rcx
retq
|
JS_MarkValue:
not edx
test edx, 0FFFFFFFEh
jnz short locret_21AFB
jmp rcx
locret_21AFB:
retn
|
long long JS_MarkValue(long long a1, long long a2, int a3, long long (*a4)(void))
{
long long result; // rax
if ( (~a3 & 0xFFFFFFFE) == 0 )
return a4();
return result;
}
|
JS_MarkValue:
NOT EDX
TEST EDX,0xfffffffe
JNZ 0x00121afb
JMP RCX
LAB_00121afb:
RET
|
void JS_MarkValue(int8 param_1,int8 param_2,uint param_3,code *UNRECOVERED_JUMPTABLE)
{
if ((~param_3 & 0xfffffffe) == 0) {
/* WARNING: Could not recover jumptable at 0x00121af9. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
return;
}
return;
}
|
|
17,551
|
void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long)
|
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR20 void assign(UInt n) {
size_t num_bigits = 0;
do {
bigits_[num_bigits++] = static_cast<bigit>(n);
n >>= bigit_bits;
} while (n != 0);
bigits_.resize(num_bigits);
exp_ = 0;
}
|
O3
|
c
|
void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
xorl %r14d, %r14d
movl %esi, (%rax,%r14,4)
incq %r14
shrq $0x20, %rsi
jne 0x47d5e
movq 0x18(%rbx), %rax
leaq -0x1(%r14), %rcx
cmpq %rcx, %rax
ja 0x47d87
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rax)
movq 0x18(%rbx), %rax
cmpq %r14, %rax
cmovbq %rax, %r14
movq %r14, 0x10(%rbx)
movl $0x0, 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+8]
xor r14d, r14d
loc_47D5E:
mov [rax+r14*4], esi
inc r14
shr rsi, 20h
jnz short loc_47D5E
mov rax, [rbx+18h]
lea rcx, [r14-1]
cmp rax, rcx
ja short loc_47D87
mov rax, [rbx]
mov rdi, rbx
mov rsi, r14
call qword ptr [rax]
mov rax, [rbx+18h]
loc_47D87:
cmp rax, r14
cmovb r14, rax
mov [rbx+10h], r14
mov dword ptr [rbx+0A0h], 0
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_(
long long a1,
unsigned long long a2)
{
long long v2; // rax
unsigned long long v3; // r14
unsigned long long result; // rax
v2 = *(_QWORD *)(a1 + 8);
v3 = 0LL;
do
{
*(_DWORD *)(v2 + 4 * v3++) = a2;
a2 >>= 32;
}
while ( a2 );
result = *(_QWORD *)(a1 + 24);
if ( result <= v3 - 1 )
{
(**(void ( ***)(long long, unsigned long long))a1)(a1, v3);
result = *(_QWORD *)(a1 + 24);
}
if ( result < v3 )
v3 = result;
*(_QWORD *)(a1 + 16) = v3;
*(_DWORD *)(a1 + 160) = 0;
return result;
}
|
_ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x8]
XOR R14D,R14D
LAB_00147d5e:
MOV dword ptr [RAX + R14*0x4],ESI
INC R14
SHR RSI,0x20
JNZ 0x00147d5e
MOV RAX,qword ptr [RBX + 0x18]
LEA RCX,[R14 + -0x1]
CMP RAX,RCX
JA 0x00147d87
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x18]
LAB_00147d87:
CMP RAX,R14
CMOVC R14,RAX
MOV qword ptr [RBX + 0x10],R14
MOV dword ptr [RBX + 0xa0],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
void _ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_
(int8 *param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
lVar1 = param_1[1];
uVar4 = 0;
do {
uVar3 = uVar4;
*(int *)(lVar1 + uVar3 * 4) = (int)param_2;
uVar4 = uVar3 + 1;
param_2 = param_2 >> 0x20;
} while (param_2 != 0);
uVar2 = param_1[3];
if (uVar2 <= uVar3) {
(**(code **)*param_1)(param_1,uVar4);
uVar2 = param_1[3];
}
if (uVar2 < uVar4) {
uVar4 = uVar2;
}
param_1[2] = uVar4;
*(int4 *)(param_1 + 0x14) = 0;
return;
}
|
|
17,552
|
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()
|
hkr04[P]cpp-mcp/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;
}
|
|
17,553
|
ma_close
|
eloqsql/libmariadb/libmariadb/ma_io.c
|
int ma_close(MA_FILE *file)
{
int rc;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
rc= fclose((FILE *)file->ptr);
free(file);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
rc= rio_plugin->methods->mclose(file);
break;
#endif
default:
return -1;
}
return rc;
}
|
O0
|
c
|
ma_close:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x50dfc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x50e5d
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x1, %eax
je 0x50e16
jmp 0x50e0c
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x50e31
jmp 0x50e4e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x14430
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x14530
jmp 0x50e57
leaq 0x31e98(%rip), %rax # 0x82cd0
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x14(%rbp)
jmp 0x50e57
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x50e5d
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_close:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_50DFC
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_50E5D
loc_50DFC:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], eax
sub eax, 1
jz short loc_50E16
jmp short $+2
loc_50E0C:
mov eax, [rbp+var_18]
sub eax, 2
jz short loc_50E31
jmp short loc_50E4E
loc_50E16:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _fclose
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]
call _free
jmp short loc_50E57
loc_50E31:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_14], eax
jmp short loc_50E57
loc_50E4E:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_50E5D
loc_50E57:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_50E5D:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long ma_close(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
v2 = fclose(*(_QWORD *)(a1 + 8));
free(a1);
}
else
{
if ( *(_DWORD *)a1 != 2 )
return (unsigned int)-1;
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1);
}
return v2;
}
return (unsigned int)-1;
}
|
ma_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00150dfc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00150e5d
LAB_00150dfc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x18],EAX
SUB EAX,0x1
JZ 0x00150e16
JMP 0x00150e0c
LAB_00150e0c:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x2
JZ 0x00150e31
JMP 0x00150e4e
LAB_00150e16:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00114430
MOV dword ptr [RBP + -0x14],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00114530
JMP 0x00150e57
LAB_00150e31:
LEA RAX,[0x182cd0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00150e57
LAB_00150e4e:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00150e5d
LAB_00150e57:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_00150e5d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_close(int *param_1)
{
int local_1c;
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else {
if (*param_1 == 1) {
local_1c = fclose(*(FILE **)(param_1 + 2));
free(param_1);
}
else {
if (*param_1 != 2) {
return -1;
}
local_1c = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1);
}
local_c = local_1c;
}
return local_c;
}
|
|
17,554
|
my_getwd
|
eloqsql/mysys/my_getwd.c
|
int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
}
|
O3
|
c
|
my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x9f5d1
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0xb6aaf0(%rip), %rax # 0xc0a060
cmpb $0x0, (%rax)
je 0x9f58b
decq %rdx
leaq 0xb6aae1(%rip), %rsi # 0xc0a060
movq %r14, %rdi
callq 0xd8104
xorl %ebx, %ebx
jmp 0x9f5d1
cmpq $0x1, %rdx
je 0x9f5d1
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x29330
testb $0x10, %r15b
je 0x9f5de
testq %rax, %rax
jne 0x9f5de
callq 0x297b0
movq %rax, %r14
movl (%rax), %r15d
callq 0xa2a4e
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x9f103
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0xd80bc
cmpb $0x2f, -0x1(%rax)
je 0x9f5f1
movw $0x2f, (%rax)
leaq 0xb6aa68(%rip), %rdi # 0xc0a060
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x9f582
|
my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_9F5D1
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_9F58B
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_9F582:
call strmake
xor ebx, ebx
jmp short loc_9F5D1
loc_9F58B:
cmp rdx, 1
jz short loc_9F5D1
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_9F5DE
test rax, rax
jnz short loc_9F5DE
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_9F5D1:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9F5DE:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_9F5F1
mov word ptr [rax], 2Fh ; '/'
loc_9F5F1:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_9F582
|
long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
const char *v8; // rsi
long long v9; // rax
unsigned int *v10; // r14
unsigned int v11; // r15d
_WORD *v13; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = (const char *)(unsigned int)(a2 - 2);
v9 = getcwd(a1, v8);
if ( (a3 & 0x10) != 0 && !v9 )
{
v10 = (unsigned int *)__errno_location(a1);
v11 = *v10;
*(_DWORD *)my_thread_var(a1, v8) = v11;
my_error(0x10u, 4LL, *v10);
return v3;
}
v13 = (_WORD *)strend(a1);
if ( *((_BYTE *)v13 - 1) != 47 )
*v13 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake(a1, v7, v6);
return 0;
}
return v3;
}
|
my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x0019f5d1
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0xd0a060]
CMP byte ptr [RAX],0x0
JZ 0x0019f58b
DEC RDX
LEA RSI,[0xd0a060]
MOV RDI,R14
LAB_0019f582:
CALL 0x001d8104
XOR EBX,EBX
JMP 0x0019f5d1
LAB_0019f58b:
CMP RDX,0x1
JZ 0x0019f5d1
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x00129330
TEST R15B,0x10
JZ 0x0019f5de
TEST RAX,RAX
JNZ 0x0019f5de
CALL 0x001297b0
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x001a2a4e
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x0019f103
LAB_0019f5d1:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019f5de:
MOV RDI,R14
CALL 0x001d80bc
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x0019f5f1
MOV word ptr [RAX],0x2f
LAB_0019f5f1:
LEA RDI,[0xd0a060]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x0019f582
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
|
|
17,555
|
LoadSoundFromWave
|
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/raudio.c
|
Sound LoadSoundFromWave(Wave wave)
{
Sound sound = { 0 };
if (wave.data != NULL)
{
// When using miniaudio we need to do our own mixing
// To simplify this we need convert the format of each sound to be consistent with
// the format used to open the playback AUDIO.System.device. We can do this two ways:
//
// 1) Convert the whole sound in one go at load time (here)
// 2) Convert the audio data in chunks at mixing time
//
// First option has been selected, format conversion is done on the loading stage
// The downside is that it uses more memory if the original sound is u8 or s16
ma_format formatIn = ((wave.sampleSize == 8)? ma_format_u8 : ((wave.sampleSize == 16)? ma_format_s16 : ma_format_f32));
ma_uint32 frameCountIn = wave.frameCount;
ma_uint32 frameCount = (ma_uint32)ma_convert_frames(NULL, 0, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, NULL, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed to get frame count for format conversion");
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, frameCount, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // early return to avoid dereferencing the audioBuffer null pointer
}
frameCount = (ma_uint32)ma_convert_frames(audioBuffer->data, frameCount, AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, wave.data, frameCountIn, formatIn, wave.channels, wave.sampleRate);
if (frameCount == 0) TRACELOG(LOG_WARNING, "SOUND: Failed format conversion");
sound.frameCount = frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
}
|
O2
|
c
|
LoadSoundFromWave:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x60(%rsp), %r14
testq %r14, %r14
je 0x3b375
leaq 0x50(%rsp), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
cmpl $0x10, %ecx
setne %dl
cmpl $0x8, %ecx
leal 0x2(%rdx,%rdx,2), %ecx
pushq $0x1
popq %r13
cmovnel %ecx, %r13d
movl (%rax), %r10d
movl 0x4(%rax), %ebp
movl 0xe89f8(%rip), %r8d # 0x123c94
movl 0xc(%rax), %eax
pushq $0x5
popq %rdx
pushq $0x2
popq %rcx
xorl %edi, %edi
xorl %esi, %esi
xorl %r9d, %r9d
pushq %rbp
movq %rax, 0x10(%rsp)
pushq %rax
pushq %r13
movq %r10, 0x28(%rsp)
pushq %r10
callq 0x228c1
addq $0x20, %rsp
movq %rax, %r12
testl %r12d, %r12d
jne 0x3b2de
leaq 0x80ae8(%rip), %rsi # 0xbbdbc
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa1353
movl 0xe89b0(%rip), %edx # 0x123c94
pushq $0x5
popq %rdi
pushq $0x2
popq %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x3a9f4
testq %rax, %rax
je 0x3b364
movq %rax, %r15
movq 0x170(%rax), %rdi
movl %r12d, %esi
movl 0xe8986(%rip), %r8d # 0x123c94
pushq $0x5
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %r9
pushq %rbp
pushq 0x10(%rsp)
pushq %r13
pushq 0x28(%rsp)
callq 0x228c1
addq $0x20, %rsp
movq %rax, %r14
testl %r14d, %r14d
jne 0x3b344
leaq 0x80ad8(%rip), %rsi # 0xbbe12
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa1353
movl %r14d, 0x20(%rbx)
movl 0xe8946(%rip), %eax # 0x123c94
movl %eax, 0x10(%rbx)
movabsq $0x200000020, %rax # imm = 0x200000020
movq %rax, 0x14(%rbx)
movq %r15, (%rbx)
jmp 0x3b375
leaq 0x80a88(%rip), %rsi # 0xbbdf3
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa1353
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
LoadSoundFromWave:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
and qword ptr [rdi+20h], 0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov r14, [rsp+48h+arg_10]
test r14, r14
jz loc_3B375
lea rax, [rsp+48h+arg_0]
mov ecx, [rax+8]
xor edx, edx
cmp ecx, 10h
setnz dl
cmp ecx, 8
lea ecx, [rdx+rdx*2+2]
push 1
pop r13
cmovnz r13d, ecx
mov r10d, [rax]
mov ebp, [rax+4]
mov r8d, cs:dword_123C94
mov eax, [rax+0Ch]
push 5
pop rdx
push 2
pop rcx
xor edi, edi
xor esi, esi
xor r9d, r9d
push rbp
mov [rsp+50h+var_40], rax
push rax
push r13
mov [rsp+60h+var_38], r10
push r10
call ma_convert_frames
add rsp, 20h
mov r12, rax
test r12d, r12d
jnz short loc_3B2DE
lea rsi, aSoundFailedToG; "SOUND: Failed to get frame count for fo"...
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B2DE:
mov edx, cs:dword_123C94
push 5
pop rdi
push 2
pop rsi
mov ecx, r12d
xor r8d, r8d
call LoadAudioBuffer
test rax, rax
jz short loc_3B364
mov r15, rax
mov rdi, [rax+170h]
mov esi, r12d
mov r8d, cs:dword_123C94
push 5
pop rdx
push 2
pop rcx
mov r9, r14
push rbp
push [rsp+50h+var_40]
push r13
push [rsp+60h+var_38]
call ma_convert_frames
add rsp, 20h
mov r14, rax
test r14d, r14d
jnz short loc_3B344
lea rsi, aSoundFailedFor; "SOUND: Failed format conversion"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B344:
mov [rbx+20h], r14d
mov eax, cs:dword_123C94
mov [rbx+10h], eax
mov rax, 200000020h
mov [rbx+14h], rax
mov [rbx], r15
jmp short loc_3B375
loc_3B364:
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B375:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LoadSoundFromWave(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
int v9; // r13d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
unsigned int v14; // r12d
long long AudioBuffer; // rax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v20; // r15
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
int v25; // r14d
*(_QWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( a9 )
{
v9 = 1;
if ( (_DWORD)a8 != 8 )
v9 = 3 * ((_DWORD)a8 != 16) + 2;
v14 = ma_convert_frames(0LL, 0LL, 5, 2, dword_123C94, 0LL, (unsigned int)a7, v9, SHIDWORD(a8), SHIDWORD(a7));
if ( !v14 )
TraceLog(4, (unsigned int)"SOUND: Failed to get frame count for format conversion", v10, v11, v12, v13);
AudioBuffer = LoadAudioBuffer(5, 2, dword_123C94, v14, 0);
if ( AudioBuffer )
{
v20 = AudioBuffer;
v25 = ma_convert_frames(
*(_QWORD *)(AudioBuffer + 368),
v14,
5,
2,
dword_123C94,
a9,
(unsigned int)a7,
v9,
SHIDWORD(a8),
SHIDWORD(a7));
if ( !v25 )
TraceLog(4, (unsigned int)"SOUND: Failed format conversion", v21, v22, v23, v24);
*(_DWORD *)(a1 + 32) = v25;
*(_DWORD *)(a1 + 16) = dword_123C94;
*(_QWORD *)(a1 + 20) = 0x200000020LL;
*(_QWORD *)a1 = v20;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v16, v17, v18, v19);
}
}
return a1;
}
|
LoadSoundFromWave:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
AND qword ptr [RDI + 0x20],0x0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV R14,qword ptr [RSP + 0x60]
TEST R14,R14
JZ 0x0013b375
LEA RAX,[RSP + 0x50]
MOV ECX,dword ptr [RAX + 0x8]
XOR EDX,EDX
CMP ECX,0x10
SETNZ DL
CMP ECX,0x8
LEA ECX,[RDX + RDX*0x2 + 0x2]
PUSH 0x1
POP R13
CMOVNZ R13D,ECX
MOV R10D,dword ptr [RAX]
MOV EBP,dword ptr [RAX + 0x4]
MOV R8D,dword ptr [0x00223c94]
MOV EAX,dword ptr [RAX + 0xc]
PUSH 0x5
POP RDX
PUSH 0x2
POP RCX
XOR EDI,EDI
XOR ESI,ESI
XOR R9D,R9D
PUSH RBP
MOV qword ptr [RSP + 0x10],RAX
PUSH RAX
PUSH R13
MOV qword ptr [RSP + 0x28],R10
PUSH R10
CALL 0x001228c1
ADD RSP,0x20
MOV R12,RAX
TEST R12D,R12D
JNZ 0x0013b2de
LEA RSI,[0x1bbdbc]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a1353
LAB_0013b2de:
MOV EDX,dword ptr [0x00223c94]
PUSH 0x5
POP RDI
PUSH 0x2
POP RSI
MOV ECX,R12D
XOR R8D,R8D
CALL 0x0013a9f4
TEST RAX,RAX
JZ 0x0013b364
MOV R15,RAX
MOV RDI,qword ptr [RAX + 0x170]
MOV ESI,R12D
MOV R8D,dword ptr [0x00223c94]
PUSH 0x5
POP RDX
PUSH 0x2
POP RCX
MOV R9,R14
PUSH RBP
PUSH qword ptr [RSP + 0x10]
PUSH R13
PUSH qword ptr [RSP + 0x28]
CALL 0x001228c1
ADD RSP,0x20
MOV R14,RAX
TEST R14D,R14D
JNZ 0x0013b344
LEA RSI,[0x1bbe12]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a1353
LAB_0013b344:
MOV dword ptr [RBX + 0x20],R14D
MOV EAX,dword ptr [0x00223c94]
MOV dword ptr [RBX + 0x10],EAX
MOV RAX,0x200000020
MOV qword ptr [RBX + 0x14],RAX
MOV qword ptr [RBX],R15
JMP 0x0013b375
LAB_0013b364:
LEA RSI,[0x1bbdf3]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a1353
LAB_0013b375:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * LoadSoundFromWave(long *param_1)
{
char cVar1;
int iVar2;
long lVar3;
int4 uStack0000000000000008;
int4 uStack000000000000000c;
int iStack0000000000000010;
int4 uStack0000000000000014;
long in_stack_00000018;
param_1[4] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
if (in_stack_00000018 != 0) {
cVar1 = '\x01';
if (iStack0000000000000010 != 8) {
cVar1 = (iStack0000000000000010 != 0x10) * '\x03' + '\x02';
}
iVar2 = ma_convert_frames(0,0,5,2,AUDIO._1028_4_,0,uStack0000000000000008,cVar1,
uStack0000000000000014,uStack000000000000000c);
if (iVar2 == 0) {
TraceLog(4,"SOUND: Failed to get frame count for format conversion");
}
lVar3 = LoadAudioBuffer(5,2,AUDIO._1028_4_,iVar2,0);
if (lVar3 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
iVar2 = ma_convert_frames(*(int8 *)(lVar3 + 0x170),iVar2,5,2,AUDIO._1028_4_,
in_stack_00000018,uStack0000000000000008,cVar1,
uStack0000000000000014,uStack000000000000000c);
if (iVar2 == 0) {
TraceLog(4,"SOUND: Failed format conversion");
}
*(int *)(param_1 + 4) = iVar2;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int8 *)((long)param_1 + 0x14) = 0x200000020;
*param_1 = lVar3;
}
}
return param_1;
}
|
|
17,556
|
pagecache_unlock
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_unlock(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page,
LSN lsn, my_bool was_changed)
{
PAGECACHE_BLOCK_LINK *block;
int page_st;
DBUG_ENTER("pagecache_unlock");
DBUG_PRINT("enter", ("fd: %u page: %lu %s %s",
(uint) file->file, (ulong) pageno,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
/* we do not allow any lock/pin increasing here */
DBUG_ASSERT(pin != PAGECACHE_PIN);
DBUG_ASSERT(lock != PAGECACHE_LOCK_READ && lock != PAGECACHE_LOCK_WRITE);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
/*
As soon as we keep lock cache can be used, and we have lock because want
to unlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
inc_counter_for_resize_op(pagecache);
/* See NOTE for pagecache_unlock about registering requests */
block= find_block(pagecache, file, pageno, 0, 0, 0,
pin == PAGECACHE_PIN_LEFT_UNPINNED, FALSE, &page_st);
PCBLOCK_INFO(block);
DBUG_ASSERT(block != 0 && page_st == PAGE_READ);
if (first_REDO_LSN_for_page)
{
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE_UNLOCK);
DBUG_ASSERT(pin == PAGECACHE_UNPIN);
pagecache_set_block_rec_lsn(block, first_REDO_LSN_for_page);
}
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/* if we lock for write we must link the block to changed blocks */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0 ||
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED));
/*
if was_changed then status should be PCBLOCK_DIRECT_W or marked
as dirty
*/
DBUG_ASSERT(!was_changed || (block->status & PCBLOCK_DIRECT_W) ||
(block->status & PCBLOCK_CHANGED));
if ((block->status & PCBLOCK_DIRECT_W) &&
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ))
{
if (!(block->status & PCBLOCK_CHANGED) && was_changed)
link_to_changed_list(pagecache, block);
block->status&= ~PCBLOCK_DIRECT_W;
DBUG_PRINT("info", ("Drop PCBLOCK_DIRECT_W for block: %p", block));
}
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
{
DBUG_ASSERT(0); /* should not happend */
}
remove_reader(block);
/*
Link the block into the LRU chain if it's the last submitted request
for the block and block will not be pinned.
See NOTE for pagecache_unlock about registering requests.
*/
if (pin != PAGECACHE_PIN_LEFT_PINNED)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
pagecache_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb 0x18(%rbp), %al
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
jmp 0x981c8
jmp 0x981ca
jmp 0x981cc
jmp 0x981ce
jmp 0x981d0
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
leaq 0xc5d96(%rip), %rsi # 0x15df78
movl $0xc97, %edx # imm = 0xC97
callq 0x97f90
jmp 0x981ee
movq -0x8(%rbp), %rdi
callq 0x98340
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
cmpl $0x1, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %r10b
xorl %r9d, %r9d
leaq -0x34(%rbp), %rax
movl %r9d, %ecx
movl %r9d, %r8d
movsbl %r10b, %r10d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x98360
movq %rax, -0x30(%rbp)
jmp 0x9823f
jmp 0x98241
jmp 0x98243
cmpq $0x0, -0x28(%rbp)
je 0x9825f
jmp 0x9824c
jmp 0x9824e
jmp 0x98250
jmp 0x98252
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x98b70
cmpq $0x0, 0x10(%rbp)
je 0x98277
movq -0x8(%rbp), %rdi
movq 0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x98bb0
jmp 0x98279
jmp 0x9827b
jmp 0x9827d
jmp 0x9827f
movq -0x30(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x982d4
cmpl $0x6, -0x1c(%rbp)
je 0x9829b
cmpl $0x7, -0x1c(%rbp)
jne 0x982d4
movq -0x30(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x982c1
movsbl 0x18(%rbp), %eax
cmpl $0x0, %eax
je 0x982c1
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x98cc0
movq -0x30(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x41, %ecx
movw %cx, 0x74(%rax)
jmp 0x982d2
jmp 0x982d4
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
xorl %r8d, %r8d
callq 0x98d50
cmpb $0x0, %al
je 0x982f4
jmp 0x982f0
jmp 0x982f2
jmp 0x982f4
movq -0x30(%rbp), %rdi
callq 0x98ea0
cmpl $0x0, -0x20(%rbp)
je 0x98315
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x98ef0
movq -0x8(%rbp), %rdi
callq 0x99070
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x98000
jmp 0x98330
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
pagecache_unlock:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov [rbp+var_28], r9
jmp short $+2
loc_981C8:
jmp short $+2
loc_981CA:
jmp short $+2
loc_981CC:
jmp short $+2
loc_981CE:
jmp short $+2
loc_981D0:
mov rdi, [rbp+var_8]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C97h
call inline_mysql_mutex_lock_12
jmp short $+2
loc_981EE:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
cmp [rbp+var_20], 1
setz al
and al, 1
movzx eax, al
mov r10b, al
xor r9d, r9d
lea rax, [rbp+var_34]
mov ecx, r9d
mov r8d, r9d
movsx r10d, r10b
mov [rsp+50h+var_50], r10d
mov [rsp+50h+var_48], 0
mov [rsp+50h+var_40], rax
call find_block
mov [rbp+var_30], rax
jmp short $+2
loc_9823F:
jmp short $+2
loc_98241:
jmp short $+2
loc_98243:
cmp [rbp+var_28], 0
jz short loc_9825F
jmp short $+2
loc_9824C:
jmp short $+2
loc_9824E:
jmp short $+2
loc_98250:
jmp short $+2
loc_98252:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
call pagecache_set_block_rec_lsn
loc_9825F:
cmp [rbp+arg_0], 0
jz short loc_98277
mov rdi, [rbp+var_8]
mov rsi, [rbp+arg_0]
mov rdx, [rbp+var_30]
call check_and_set_lsn
loc_98277:
jmp short $+2
loc_98279:
jmp short $+2
loc_9827B:
jmp short $+2
loc_9827D:
jmp short $+2
loc_9827F:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+74h]
and eax, 40h
cmp eax, 0
jz short loc_982D4
cmp [rbp+var_1C], 6
jz short loc_9829B
cmp [rbp+var_1C], 7
jnz short loc_982D4
loc_9829B:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+74h]
and eax, 20h
cmp eax, 0
jnz short loc_982C1
movsx eax, [rbp+arg_8]
cmp eax, 0
jz short loc_982C1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
call link_to_changed_list
loc_982C1:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFBFh
mov [rax+74h], cx
jmp short $+2
loc_982D2:
jmp short $+2
loc_982D4:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_1C]
mov ecx, [rbp+var_20]
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_982F4
jmp short $+2
loc_982F0:
jmp short $+2
loc_982F2:
jmp short $+2
loc_982F4:
mov rdi, [rbp+var_30]
call remove_reader
cmp [rbp+var_20], 0
jz short loc_98315
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov edx, 1
call unreg_request
loc_98315:
mov rdi, [rbp+var_8]
call dec_counter_for_resize_op
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_13
jmp short $+2
loc_98330:
add rsp, 50h
pop rbp
retn
|
long long pagecache_unlock(
long long a1,
long long a2,
long long a3,
unsigned int a4,
unsigned int a5,
long long a6,
long long a7,
char a8)
{
_BYTE v9[4]; // [rsp+1Ch] [rbp-34h] BYREF
long long block; // [rsp+20h] [rbp-30h]
long long v11; // [rsp+28h] [rbp-28h]
unsigned int v12; // [rsp+30h] [rbp-20h]
unsigned int v13; // [rsp+34h] [rbp-1Ch]
long long v14; // [rsp+38h] [rbp-18h]
long long v15; // [rsp+40h] [rbp-10h]
long long v16; // [rsp+48h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
inline_mysql_mutex_lock_12(
a1 + 200,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xC97u);
inc_counter_for_resize_op(a1);
block = find_block(a1, a2, v14, 0, 0, 0, v12 == 1, 0, (long long)v9);
if ( v11 )
pagecache_set_block_rec_lsn(block, v11);
if ( a7 )
check_and_set_lsn(v16, a7, block);
if ( (*(_WORD *)(block + 116) & 0x40) != 0 && (v13 == 6 || v13 == 7) )
{
if ( (*(_WORD *)(block + 116) & 0x20) == 0 && a8 )
link_to_changed_list(v16, block);
*(_WORD *)(block + 116) &= ~0x40u;
}
make_lock_and_pin(v16, block, v13, v12, 0LL);
remove_reader(block);
if ( v12 )
unreg_request(v16, block, 1LL);
dec_counter_for_resize_op(v16);
return inline_mysql_mutex_unlock_13(v16 + 200);
}
|
pagecache_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,byte ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV qword ptr [RBP + -0x28],R9
JMP 0x001981c8
LAB_001981c8:
JMP 0x001981ca
LAB_001981ca:
JMP 0x001981cc
LAB_001981cc:
JMP 0x001981ce
LAB_001981ce:
JMP 0x001981d0
LAB_001981d0:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
LEA RSI,[0x25df78]
MOV EDX,0xc97
CALL 0x00197f90
JMP 0x001981ee
LAB_001981ee:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00198340
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CMP dword ptr [RBP + -0x20],0x1
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV R10B,AL
XOR R9D,R9D
LEA RAX,[RBP + -0x34]
MOV ECX,R9D
MOV R8D,R9D
MOVSX R10D,R10B
MOV dword ptr [RSP],R10D
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00198360
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0019823f
LAB_0019823f:
JMP 0x00198241
LAB_00198241:
JMP 0x00198243
LAB_00198243:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0019825f
JMP 0x0019824c
LAB_0019824c:
JMP 0x0019824e
LAB_0019824e:
JMP 0x00198250
LAB_00198250:
JMP 0x00198252
LAB_00198252:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00198b70
LAB_0019825f:
CMP qword ptr [RBP + 0x10],0x0
JZ 0x00198277
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00198bb0
LAB_00198277:
JMP 0x00198279
LAB_00198279:
JMP 0x0019827b
LAB_0019827b:
JMP 0x0019827d
LAB_0019827d:
JMP 0x0019827f
LAB_0019827f:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001982d4
CMP dword ptr [RBP + -0x1c],0x6
JZ 0x0019829b
CMP dword ptr [RBP + -0x1c],0x7
JNZ 0x001982d4
LAB_0019829b:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0x20
CMP EAX,0x0
JNZ 0x001982c1
MOVSX EAX,byte ptr [RBP + 0x18]
CMP EAX,0x0
JZ 0x001982c1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00198cc0
LAB_001982c1:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xffffffbf
MOV word ptr [RAX + 0x74],CX
JMP 0x001982d2
LAB_001982d2:
JMP 0x001982d4
LAB_001982d4:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x1c]
MOV ECX,dword ptr [RBP + -0x20]
XOR R8D,R8D
CALL 0x00198d50
CMP AL,0x0
JZ 0x001982f4
JMP 0x001982f0
LAB_001982f0:
JMP 0x001982f2
LAB_001982f2:
JMP 0x001982f4
LAB_001982f4:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00198ea0
CMP dword ptr [RBP + -0x20],0x0
JZ 0x00198315
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,0x1
CALL 0x00198ef0
LAB_00198315:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00199070
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x00198000
JMP 0x00198330
LAB_00198330:
ADD RSP,0x50
POP RBP
RET
|
void pagecache_unlock(long param_1,int8 param_2,int8 param_3,int param_4,int param_5,
long param_6,long param_7,char param_8)
{
int1 local_3c [4];
long local_38;
long local_30;
int local_28;
int local_24;
int8 local_20;
int8 local_18;
long local_10;
local_30 = param_6;
local_28 = param_5;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
inline_mysql_mutex_lock
(param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xc97);
inc_counter_for_resize_op(local_10);
local_38 = find_block(local_10,local_18,local_20,0,0,0,local_28 == 1,0,local_3c);
if (local_30 != 0) {
pagecache_set_block_rec_lsn(local_38,local_30);
}
if (param_7 != 0) {
check_and_set_lsn(local_10,param_7,local_38);
}
if (((*(ushort *)(local_38 + 0x74) & 0x40) != 0) && ((local_24 == 6 || (local_24 == 7)))) {
if (((*(ushort *)(local_38 + 0x74) & 0x20) == 0) && (param_8 != '\0')) {
link_to_changed_list(local_10,local_38);
}
*(ushort *)(local_38 + 0x74) = *(ushort *)(local_38 + 0x74) & 0xffbf;
}
make_lock_and_pin(local_10,local_38,local_24,local_28,0);
remove_reader(local_38);
if (local_28 != 0) {
unreg_request(local_10,local_38,1);
}
dec_counter_for_resize_op(local_10);
inline_mysql_mutex_unlock(local_10 + 200);
return;
}
|
|
17,557
|
primegen_count
|
xtate/src/crypto/crypto-primegen.c
|
uint64_t primegen_count(primegen *pg, uint64_t to) {
uint64_t count = 0;
for (;;) {
register int pos;
register int j;
register uint32_t bits;
register uint32_t smallcount;
while (pg->num) {
if (pg->p[pg->num - 1] >= to)
return count;
++count;
--pg->num;
}
smallcount = 0;
pos = pg->pos;
while ((pos < B32) && (pg->base + 1920 < to)) {
for (j = 0; j < 16; ++j) {
bits = ~pg->buf[j][pos];
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
}
pg->base += 1920;
++pos;
}
pg->pos = pos;
count += smallcount;
if (pos == B32)
while (pg->base + B * 60 < to) {
primegen_sieve(pg);
pg->L += B;
smallcount = 0;
for (j = 0; j < 16; ++j)
for (pos = 0; pos < B32; ++pos) {
bits = ~pg->buf[j][pos];
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
bits >>= 8;
smallcount += pop[bits & 255];
}
count += smallcount;
pg->base += B * 60;
}
primegen_fill(pg);
}
}
|
O3
|
c
|
primegen_count:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x3e8f8(%rdi), %r12
xorl %r14d, %r14d
movl $0xff, %ebp
leaq 0x419fe(%rip), %r13 # 0x5fe40
movslq 0x3f900(%r15), %rax
testq %rax, %rax
je 0x1e481
leal -0x1(%rax), %ecx
leaq (%r14,%rcx), %rdx
incq %rdx
leaq (%r12,%rax,8), %rsi
negq %rax
xorl %edi, %edi
cmpq %rbx, (%rsi,%rdi,8)
jae 0x1e5fb
leal (%rcx,%rdi), %r8d
movl %r8d, 0x3f900(%r15)
decq %rdi
cmpq %rdi, %rax
jne 0x1e461
movq %rdx, %r14
movslq 0x3f904(%r15), %rax
cmpq $0xfa3, %rax # imm = 0xFA3
jg 0x1e529
movq 0x3f908(%r15), %rdx
leaq (%r15,%rax,4), %rsi
xorl %ecx, %ecx
addq $0x780, %rdx # imm = 0x780
cmpq %rbx, %rdx
jae 0x1e5e2
movq $-0x3e900, %rdi # imm = 0xFFFC1700
movl 0x3e900(%rsi,%rdi), %r8d
notl %r8d
movl %r8d, %r9d
andl %ebp, %r9d
addl (%r13,%r9,8), %ecx
movl %r8d, %r9d
shrl $0x8, %r9d
andl %ebp, %r9d
addl (%r13,%r9,8), %ecx
movl %r8d, %r9d
shrl $0xd, %r9d
andl $0x7f8, %r9d # imm = 0x7F8
addl (%r9,%r13), %ecx
shrl $0x18, %r8d
addl (%r13,%r8,8), %ecx
addq $0x3e90, %rdi # imm = 0x3E90
jne 0x1e4b8
movq %rdx, 0x3f908(%r15)
incq %rax
addq $0x4, %rsi
cmpq $0xfa4, %rax # imm = 0xFA4
jne 0x1e4a1
movl %ecx, %eax
movl $0xfa4, 0x3f904(%r15) # imm = 0xFA4
addq %rax, %r14
jmp 0x1e534
cmpl $0xfa4, %eax # imm = 0xFA4
jne 0x1e5ee
movq 0x3f908(%r15), %rax
movl $0x754e00, %ecx # imm = 0x754E00
addq %rcx, %rax
cmpq %rbx, %rax
jae 0x1e5ee
movq %r15, %rdi
callq 0x1d4e8
addq $0x1f480, 0x3f910(%r15) # imm = 0x1F480
xorl %eax, %eax
movq %r15, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
notl %edi
movl %edi, %r8d
andl %ebp, %r8d
addl (%r13,%r8,8), %edx
movl %edi, %r8d
shrl $0x8, %r8d
andl %ebp, %r8d
addl (%r13,%r8,8), %edx
movl %edi, %r8d
shrl $0xd, %r8d
andl $0x7f8, %r8d # imm = 0x7F8
addl (%r8,%r13), %edx
shrl $0x18, %edi
addl (%r13,%rdi,8), %edx
incq %rsi
cmpq $0xfa4, %rsi # imm = 0xFA4
jne 0x1e568
incq %rax
addq $0x3e90, %rcx # imm = 0x3E90
cmpq $0x10, %rax
jne 0x1e566
movl %edx, %eax
addq %rax, %r14
movq 0x3f908(%r15), %rax
leaq 0x754e00(%rax), %rcx
movq %rcx, 0x3f908(%r15)
addq $0xea9c00, %rax # imm = 0xEA9C00
jmp 0x1e543
movl %eax, 0x3f904(%r15)
movl %ecx, %eax
addq %rax, %r14
movq %r15, %rdi
callq 0x1dfc5
jmp 0x1e442
subq %rdi, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
primegen_count:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r15, rdi
lea r12, [rdi+3E8F8h]
xor r14d, r14d
mov ebp, 0FFh
lea r13, pop
loc_1E442:
movsxd rax, dword ptr ds:loc_3F900[r15]
test rax, rax
jz short loc_1E481
lea ecx, [rax-1]
lea rdx, [r14+rcx]
inc rdx
lea rsi, [r12+rax*8]
neg rax
xor edi, edi
loc_1E461:
cmp [rsi+rdi*8], rbx
jnb loc_1E5FB
lea r8d, [rcx+rdi]
mov dword ptr ds:loc_3F900[r15], r8d
dec rdi
cmp rax, rdi
jnz short loc_1E461
mov r14, rdx
loc_1E481:
movsxd rax, dword ptr [r15+3F904h]
cmp rax, 0FA3h
jg loc_1E529
mov rdx, [r15+3F908h]
lea rsi, [r15+rax*4]
xor ecx, ecx
loc_1E4A1:
add rdx, 780h
cmp rdx, rbx
jnb loc_1E5E2
mov rdi, 0FFFFFFFFFFFC1700h
loc_1E4B8:
mov r8d, dword ptr ds:loc_3E900[rsi+rdi]
not r8d
mov r9d, r8d
and r9d, ebp
add ecx, [r13+r9*8+0]
mov r9d, r8d
shr r9d, 8
and r9d, ebp
add ecx, [r13+r9*8+0]
mov r9d, r8d
shr r9d, 0Dh
and r9d, 7F8h
add ecx, [r9+r13]
shr r8d, 18h
add ecx, [r13+r8*8+0]
add rdi, 3E90h
jnz short loc_1E4B8
mov [r15+3F908h], rdx
inc rax
add rsi, 4
cmp rax, 0FA4h
jnz short loc_1E4A1
mov eax, ecx
mov dword ptr [r15+3F904h], 0FA4h
add r14, rax
jmp short loc_1E534
loc_1E529:
cmp eax, 0FA4h
jnz loc_1E5EE
loc_1E534:
mov rax, [r15+3F908h]
mov ecx, 754E00h
add rax, rcx
loc_1E543:
cmp rax, rbx
jnb loc_1E5EE
mov rdi, r15
call primegen_sieve
add qword ptr [r15+3F910h], 1F480h
xor eax, eax
mov rcx, r15
xor edx, edx
loc_1E566:
xor esi, esi
loc_1E568:
mov edi, [rcx+rsi*4]
not edi
mov r8d, edi
and r8d, ebp
add edx, [r13+r8*8+0]
mov r8d, edi
shr r8d, 8
and r8d, ebp
add edx, [r13+r8*8+0]
mov r8d, edi
shr r8d, 0Dh
and r8d, 7F8h
add edx, [r8+r13]
shr edi, 18h
add edx, [r13+rdi*8+0]
inc rsi
cmp rsi, 0FA4h
jnz short loc_1E568
inc rax
add rcx, 3E90h
cmp rax, 10h
jnz short loc_1E566
mov eax, edx
add r14, rax
mov rax, [r15+3F908h]
lea rcx, [rax+754E00h]
mov [r15+3F908h], rcx
add rax, 0EA9C00h
jmp loc_1E543
loc_1E5E2:
mov [r15+3F904h], eax
mov eax, ecx
add r14, rax
loc_1E5EE:
mov rdi, r15
call primegen_fill
jmp loc_1E442
loc_1E5FB:
sub r14, rdi
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long primegen_count(long long a1, unsigned long long a2)
{
long long v4; // r12
long long v5; // r14
long long v6; // rax
long long v7; // rcx
long long v8; // rsi
long long v9; // rax
long long v10; // rdi
long long v11; // rax
unsigned long long v12; // rdx
long long v13; // rsi
unsigned int v14; // ecx
long long v15; // rdi
unsigned long long i; // rax
long long v17; // rax
long long v18; // rcx
unsigned int v19; // edx
long long j; // rsi
long long v21; // rax
v4 = a1 + 256248;
v5 = 0LL;
while ( 1 )
{
v6 = *(int *)((char *)&loc_3F900 + a1);
if ( *(_DWORD *)((char *)&loc_3F900 + a1) )
break;
LABEL_7:
v11 = *(int *)(a1 + 260356);
if ( v11 > 4003 )
{
if ( (_DWORD)v11 == 4004 )
{
LABEL_15:
for ( i = *(_QWORD *)(a1 + 260360) + 7687680LL; i < a2; i = v21 + 15375360 )
{
primegen_sieve(a1);
*(_QWORD *)(a1 + 260368) += 128128LL;
v17 = 0LL;
v18 = a1;
v19 = 0;
do
{
for ( j = 0LL; j != 4004; ++j )
v19 += pop[2 * ((unsigned int)~*(_DWORD *)(v18 + 4 * j) >> 24)]
+ *(_DWORD *)((char *)pop + (((unsigned int)~*(_DWORD *)(v18 + 4 * j) >> 13) & 0x7F8))
+ pop[2 * (unsigned __int8)((unsigned __int16)~*(_WORD *)(v18 + 4 * j) >> 8)]
+ pop[2 * (unsigned __int8)~*(_BYTE *)(v18 + 4 * j)];
++v17;
v18 += 16016LL;
}
while ( v17 != 16 );
v5 += v19;
v21 = *(_QWORD *)(a1 + 260360);
*(_QWORD *)(a1 + 260360) = v21 + 7687680;
}
}
}
else
{
v12 = *(_QWORD *)(a1 + 260360);
v13 = a1 + 4 * v11;
v14 = 0;
while ( 1 )
{
v12 += 1920LL;
if ( v12 >= a2 )
break;
v15 = -256256LL;
do
{
v14 += pop[2 * ((unsigned int)~*(_DWORD *)((char *)&loc_3E900 + v13 + v15) >> 24)]
+ *(_DWORD *)((char *)pop + (((unsigned int)~*(_DWORD *)((char *)&loc_3E900 + v13 + v15) >> 13) & 0x7F8))
+ pop[2 * (unsigned __int8)((unsigned __int16)~*(_WORD *)((char *)&loc_3E900 + v13 + v15) >> 8)]
+ pop[2 * (unsigned __int8)~*((_BYTE *)&loc_3E900 + v13 + v15)];
v15 += 16016LL;
}
while ( v15 );
*(_QWORD *)(a1 + 260360) = v12;
++v11;
v13 += 4LL;
if ( v11 == 4004 )
{
*(_DWORD *)(a1 + 260356) = 4004;
v5 += v14;
goto LABEL_15;
}
}
*(_DWORD *)(a1 + 260356) = v11;
v5 += v14;
}
primegen_fill(a1);
}
v7 = (unsigned int)(v6 - 1);
v8 = v4 + 8 * v6;
v9 = -v6;
v10 = 0LL;
while ( *(_QWORD *)(v8 + 8 * v10) < a2 )
{
*(_DWORD *)((char *)&loc_3F900 + a1) = v7 + v10--;
if ( v9 == v10 )
{
v5 += v7 + 1;
goto LABEL_7;
}
}
return v5 - v10;
}
|
primegen_count:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R15,RDI
LEA R12,[RDI + 0x3e8f8]
XOR R14D,R14D
MOV EBP,0xff
LEA R13,[0x15fe40]
LAB_0011e442:
MOVSXD RAX,dword ptr [R15 + 0x3f900]
TEST RAX,RAX
JZ 0x0011e481
LEA ECX,[RAX + -0x1]
LEA RDX,[R14 + RCX*0x1]
INC RDX
LEA RSI,[R12 + RAX*0x8]
NEG RAX
XOR EDI,EDI
LAB_0011e461:
CMP qword ptr [RSI + RDI*0x8],RBX
JNC 0x0011e5fb
LEA R8D,[RCX + RDI*0x1]
MOV dword ptr [R15 + 0x3f900],R8D
DEC RDI
CMP RAX,RDI
JNZ 0x0011e461
MOV R14,RDX
LAB_0011e481:
MOVSXD RAX,dword ptr [R15 + 0x3f904]
CMP RAX,0xfa3
JG 0x0011e529
MOV RDX,qword ptr [R15 + 0x3f908]
LEA RSI,[R15 + RAX*0x4]
XOR ECX,ECX
LAB_0011e4a1:
ADD RDX,0x780
CMP RDX,RBX
JNC 0x0011e5e2
MOV RDI,-0x3e900
LAB_0011e4b8:
MOV R8D,dword ptr [RSI + RDI*0x1 + 0x3e900]
NOT R8D
MOV R9D,R8D
AND R9D,EBP
ADD ECX,dword ptr [R13 + R9*0x8]
MOV R9D,R8D
SHR R9D,0x8
AND R9D,EBP
ADD ECX,dword ptr [R13 + R9*0x8]
MOV R9D,R8D
SHR R9D,0xd
AND R9D,0x7f8
ADD ECX,dword ptr [R9 + R13*0x1]
SHR R8D,0x18
ADD ECX,dword ptr [R13 + R8*0x8]
ADD RDI,0x3e90
JNZ 0x0011e4b8
MOV qword ptr [R15 + 0x3f908],RDX
INC RAX
ADD RSI,0x4
CMP RAX,0xfa4
JNZ 0x0011e4a1
MOV EAX,ECX
MOV dword ptr [R15 + 0x3f904],0xfa4
ADD R14,RAX
JMP 0x0011e534
LAB_0011e529:
CMP EAX,0xfa4
JNZ 0x0011e5ee
LAB_0011e534:
MOV RAX,qword ptr [R15 + 0x3f908]
MOV ECX,0x754e00
ADD RAX,RCX
LAB_0011e543:
CMP RAX,RBX
JNC 0x0011e5ee
MOV RDI,R15
CALL 0x0011d4e8
ADD qword ptr [R15 + 0x3f910],0x1f480
XOR EAX,EAX
MOV RCX,R15
XOR EDX,EDX
LAB_0011e566:
XOR ESI,ESI
LAB_0011e568:
MOV EDI,dword ptr [RCX + RSI*0x4]
NOT EDI
MOV R8D,EDI
AND R8D,EBP
ADD EDX,dword ptr [R13 + R8*0x8]
MOV R8D,EDI
SHR R8D,0x8
AND R8D,EBP
ADD EDX,dword ptr [R13 + R8*0x8]
MOV R8D,EDI
SHR R8D,0xd
AND R8D,0x7f8
ADD EDX,dword ptr [R8 + R13*0x1]
SHR EDI,0x18
ADD EDX,dword ptr [R13 + RDI*0x8]
INC RSI
CMP RSI,0xfa4
JNZ 0x0011e568
INC RAX
ADD RCX,0x3e90
CMP RAX,0x10
JNZ 0x0011e566
MOV EAX,EDX
ADD R14,RAX
MOV RAX,qword ptr [R15 + 0x3f908]
LEA RCX,[RAX + 0x754e00]
MOV qword ptr [R15 + 0x3f908],RCX
ADD RAX,0xea9c00
JMP 0x0011e543
LAB_0011e5e2:
MOV dword ptr [R15 + 0x3f904],EAX
MOV EAX,ECX
ADD R14,RAX
LAB_0011e5ee:
MOV RDI,R15
CALL 0x0011dfc5
JMP 0x0011e442
LAB_0011e5fb:
SUB R14,RDI
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long primegen_count(long param_1,ulong param_2)
{
long lVar1;
long lVar2;
uint uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long lVar7;
lVar2 = 0;
do {
lVar1 = (long)*(int *)(param_1 + 0x3f900);
lVar5 = lVar2;
if (lVar1 != 0) {
uVar3 = *(int *)(param_1 + 0x3f900) - 1;
lVar5 = lVar2 + (ulong)uVar3 + 1;
lVar7 = 0;
do {
if (param_2 <= *(ulong *)(param_1 + 0x3e8f8 + lVar1 * 8 + lVar7 * 8)) {
return lVar2 - lVar7;
}
*(uint *)(param_1 + 0x3f900) = uVar3 + (int)lVar7;
lVar7 = lVar7 + -1;
} while (-lVar7 != lVar1);
}
lVar2 = (long)*(int *)(param_1 + 0x3f904);
if (lVar2 < 0xfa4) {
uVar6 = *(ulong *)(param_1 + 0x3f908);
lVar1 = param_1 + lVar2 * 4;
uVar4 = 0;
do {
uVar6 = uVar6 + 0x780;
if (param_2 <= uVar6) {
*(int *)(param_1 + 0x3f904) = (int)lVar2;
lVar5 = lVar5 + uVar4;
goto LAB_0011e5ee;
}
lVar7 = -0x3e900;
do {
uVar3 = ~*(uint *)(lVar1 + 0x3e900 + lVar7);
uVar4 = (ulong)(uint)((int)uVar4 + *(int *)(pop + (ulong)(uVar3 & 0xff) * 8) +
*(int *)(pop + (ulong)(uVar3 >> 8 & 0xff) * 8) +
*(int *)(pop + (uVar3 >> 0xd & 0x7f8)) +
*(int *)(pop + (ulong)(uVar3 >> 0x18) * 8));
lVar7 = lVar7 + 0x3e90;
} while (lVar7 != 0);
*(ulong *)(param_1 + 0x3f908) = uVar6;
lVar2 = lVar2 + 1;
lVar1 = lVar1 + 4;
} while (lVar2 != 0xfa4);
*(int4 *)(param_1 + 0x3f904) = 0xfa4;
lVar5 = lVar5 + uVar4;
LAB_0011e534:
uVar6 = *(long *)(param_1 + 0x3f908) + 0x754e00;
while (uVar6 < param_2) {
primegen_sieve(param_1);
*(long *)(param_1 + 0x3f910) = *(long *)(param_1 + 0x3f910) + 0x1f480;
lVar1 = 0;
uVar6 = 0;
lVar2 = param_1;
do {
lVar7 = 0;
do {
uVar3 = ~*(uint *)(lVar2 + lVar7 * 4);
uVar6 = (ulong)(uint)((int)uVar6 + *(int *)(pop + (ulong)(uVar3 & 0xff) * 8) +
*(int *)(pop + (ulong)(uVar3 >> 8 & 0xff) * 8) +
*(int *)(pop + (uVar3 >> 0xd & 0x7f8)) +
*(int *)(pop + (ulong)(uVar3 >> 0x18) * 8));
lVar7 = lVar7 + 1;
} while (lVar7 != 0xfa4);
lVar1 = lVar1 + 1;
lVar2 = lVar2 + 0x3e90;
} while (lVar1 != 0x10);
lVar5 = lVar5 + uVar6;
lVar2 = *(long *)(param_1 + 0x3f908);
*(long *)(param_1 + 0x3f908) = lVar2 + 0x754e00;
uVar6 = lVar2 + 0xea9c00;
}
}
else if (*(int *)(param_1 + 0x3f904) == 0xfa4) goto LAB_0011e534;
LAB_0011e5ee:
primegen_fill();
lVar2 = lVar5;
} while( true );
}
|
|
17,558
|
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O3
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %r12d
movl %edi, %esi
leaq 0x33b050(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r13
movl $0x2, %edx
movq %r15, %rcx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x4a006
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x9fca4
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33b003(%rip), %r13 # 0x385010
movq (%r13), %rcx
leaq 0x8ec50(%rip), %rsi # 0xd8c68
movq %rax, %rdi
movl %r12d, %edx
callq *0x1f0(%rcx)
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x9fca4
movl %eax, %ebx
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x49ff5
|
inline_mysql_file_open:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r8
mov r14d, ecx
mov r15, rdx
mov r12d, esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
lea r13, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_4A006
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
loc_49FF5:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4A006:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, r12d
call qword ptr [rcx+1F0h]
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_49FF5
|
long long inline_mysql_file_open(unsigned int a1, unsigned int a2, long long a3, unsigned int a4, long long a5)
{
long long v8; // rax
_BYTE v10[72]; // [rsp+8h] [rbp-78h] BYREF
long long v11[6]; // [rsp+50h] [rbp-30h] BYREF
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, a1, 2LL, a3, v11);
v11[0] = v8;
if ( v8 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
a2);
a5 = (unsigned int)my_open(a3, a4, a5);
((void ( *)(long long, long long))PSI_server[64])(v11[0], a5);
}
else
{
LODWORD(a5) = my_open(a3, a4, a5);
}
return (unsigned int)a5;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDX
MOV R12D,ESI
MOV ESI,EDI
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
LEA R13,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x0014a006
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x0019fca4
MOV EBX,EAX
LAB_00149ff5:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014a006:
LEA R13,[0x485010]
MOV RCX,qword ptr [R13]
LEA RSI,[0x1d8c68]
MOV RDI,RAX
MOV EDX,R12D
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x0019fca4
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x00149ff5
|
int4
inline_mysql_file_open
(int4 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
int1 local_80 [72];
long local_38;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,param_1,2,param_3,&local_38);
if (local_38 == 0) {
uVar1 = my_open(param_3,param_4,param_5);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
param_2);
uVar1 = my_open(param_3,param_4,param_5);
(**(code **)(PSI_server + 0x200))(local_38,uVar1);
}
return uVar1;
}
|
|
17,559
|
lo0bits
|
eloqsql/strings/dtoa.c
|
static int lo0bits(ULong *y)
{
register int k;
register ULong x= *y;
if (x & 7)
{
if (x & 1)
return 0;
if (x & 2)
{
*y= x >> 1;
return 1;
}
*y= x >> 2;
return 2;
}
k= 0;
if (!(x & 0xffff))
{
k= 16;
x>>= 16;
}
if (!(x & 0xff))
{
k+= 8;
x>>= 8;
}
if (!(x & 0xf))
{
k+= 4;
x>>= 4;
}
if (!(x & 0x3))
{
k+= 2;
x>>= 2;
}
if (!(x & 1))
{
k++;
x>>= 1;
if (!x)
return 32;
}
*y= x;
return k;
}
|
O0
|
c
|
lo0bits:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0xd165d
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xd1623
movl $0x0, -0x4(%rbp)
jmp 0xd1716
movl -0x18(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xd1645
movl -0x18(%rbp), %ecx
shrl %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xd1716
movl -0x18(%rbp), %ecx
shrl $0x2, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xd1716
movl $0x0, -0x14(%rbp)
movl -0x18(%rbp), %eax
andl $0xffff, %eax # imm = 0xFFFF
cmpl $0x0, %eax
jne 0xd1681
movl $0x10, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x10, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
jne 0xd16a0
movl -0x14(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0xd16bd
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x4, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0xd16da
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xd1707
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0xd1705
movl $0x20, -0x4(%rbp)
jmp 0xd1716
jmp 0xd1707
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
lo0bits:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], eax
mov eax, [rbp+var_18]
and eax, 7
cmp eax, 0
jz short loc_D165D
mov eax, [rbp+var_18]
and eax, 1
cmp eax, 0
jz short loc_D1623
mov [rbp+var_4], 0
jmp loc_D1716
loc_D1623:
mov eax, [rbp+var_18]
and eax, 2
cmp eax, 0
jz short loc_D1645
mov ecx, [rbp+var_18]
shr ecx, 1
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 1
jmp loc_D1716
loc_D1645:
mov ecx, [rbp+var_18]
shr ecx, 2
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 2
jmp loc_D1716
loc_D165D:
mov [rbp+var_14], 0
mov eax, [rbp+var_18]
and eax, 0FFFFh
cmp eax, 0
jnz short loc_D1681
mov [rbp+var_14], 10h
mov eax, [rbp+var_18]
shr eax, 10h
mov [rbp+var_18], eax
loc_D1681:
mov eax, [rbp+var_18]
and eax, 0FFh
cmp eax, 0
jnz short loc_D16A0
mov eax, [rbp+var_14]
add eax, 8
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 8
mov [rbp+var_18], eax
loc_D16A0:
mov eax, [rbp+var_18]
and eax, 0Fh
cmp eax, 0
jnz short loc_D16BD
mov eax, [rbp+var_14]
add eax, 4
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 4
mov [rbp+var_18], eax
loc_D16BD:
mov eax, [rbp+var_18]
and eax, 3
cmp eax, 0
jnz short loc_D16DA
mov eax, [rbp+var_14]
add eax, 2
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 2
mov [rbp+var_18], eax
loc_D16DA:
mov eax, [rbp+var_18]
and eax, 1
cmp eax, 0
jnz short loc_D1707
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
shr eax, 1
mov [rbp+var_18], eax
cmp [rbp+var_18], 0
jnz short loc_D1705
mov [rbp+var_4], 20h ; ' '
jmp short loc_D1716
loc_D1705:
jmp short $+2
loc_D1707:
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_D1716:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long lo0bits(unsigned int *a1)
{
unsigned int v2; // [rsp+0h] [rbp-18h]
unsigned int v3; // [rsp+4h] [rbp-14h]
v2 = *a1;
if ( (*a1 & 7) != 0 )
{
if ( (v2 & 1) != 0 )
{
return 0;
}
else if ( (v2 & 2) != 0 )
{
*a1 = v2 >> 1;
return 1;
}
else
{
*a1 = v2 >> 2;
return 2;
}
}
else
{
v3 = 0;
if ( !(_WORD)v2 )
{
v3 = 16;
v2 >>= 16;
}
if ( !(_BYTE)v2 )
{
v3 += 8;
v2 >>= 8;
}
if ( (v2 & 0xF) == 0 )
{
v3 += 4;
v2 >>= 4;
}
if ( (v2 & 3) == 0 )
{
v3 += 2;
v2 >>= 2;
}
if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) )
{
*a1 = v2;
return v3;
}
else
{
return 32;
}
}
}
|
lo0bits:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x7
CMP EAX,0x0
JZ 0x001d165d
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001d1623
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d1716
LAB_001d1623:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001d1645
MOV ECX,dword ptr [RBP + -0x18]
SHR ECX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001d1716
LAB_001d1645:
MOV ECX,dword ptr [RBP + -0x18]
SHR ECX,0x2
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001d1716
LAB_001d165d:
MOV dword ptr [RBP + -0x14],0x0
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xffff
CMP EAX,0x0
JNZ 0x001d1681
MOV dword ptr [RBP + -0x14],0x10
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x10
MOV dword ptr [RBP + -0x18],EAX
LAB_001d1681:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xff
CMP EAX,0x0
JNZ 0x001d16a0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x8
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x8
MOV dword ptr [RBP + -0x18],EAX
LAB_001d16a0:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x001d16bd
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x4
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x4
MOV dword ptr [RBP + -0x18],EAX
LAB_001d16bd:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x3
CMP EAX,0x0
JNZ 0x001d16da
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x2
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x2
MOV dword ptr [RBP + -0x18],EAX
LAB_001d16da:
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001d1707
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x001d1705
MOV dword ptr [RBP + -0x4],0x20
JMP 0x001d1716
LAB_001d1705:
JMP 0x001d1707
LAB_001d1707:
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_001d1716:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int lo0bits(uint *param_1)
{
uint local_20;
int local_1c;
int local_c;
local_20 = *param_1;
if ((local_20 & 7) == 0) {
local_1c = 0;
if ((local_20 & 0xffff) == 0) {
local_1c = 0x10;
local_20 = local_20 >> 0x10;
}
if ((local_20 & 0xff) == 0) {
local_1c = local_1c + 8;
local_20 = local_20 >> 8;
}
if ((local_20 & 0xf) == 0) {
local_1c = local_1c + 4;
local_20 = local_20 >> 4;
}
if ((local_20 & 3) == 0) {
local_1c = local_1c + 2;
local_20 = local_20 >> 2;
}
if ((local_20 & 1) == 0) {
local_1c = local_1c + 1;
local_20 = local_20 >> 1;
if (local_20 == 0) {
return 0x20;
}
}
*param_1 = local_20;
local_c = local_1c;
}
else if ((local_20 & 1) == 0) {
if ((local_20 & 2) == 0) {
*param_1 = local_20 >> 2;
local_c = 2;
}
else {
*param_1 = local_20 >> 1;
local_c = 1;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
17,560
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
monkey531[P]llama/common/json.hpp
|
bool key(string_t& val)
{
BasicJsonType k = BasicJsonType(val);
// check callback for key
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);
key_keep_stack.push_back(keep);
// add discarded value at given key and store the reference for later
if (keep && ref_stack.back())
{
object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded);
}
return true;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x450ea
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x4
popq %rdx
movq %r15, %rcx
callq 0x4316e
movl %eax, %ebp
leaq 0x48(%rbx), %rdi
movzbl %al, %esi
callq 0x423e4
testb %bpl, %bpl
je 0x42cc6
movq 0x10(%rbx), %rax
cmpq $0x0, -0x8(%rax)
je 0x42cc6
leaq 0xa8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x43a1e
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x45122
leaq 0x8(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x4184c
movq %rax, 0x70(%rbx)
movq %r14, %rdi
callq 0x3ecc6
leaq 0x18(%rsp), %rdi
callq 0x3ecc6
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3ecc6
jmp 0x42cef
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3ecc6
movq %rbx, %rdi
callq 0x24030
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+48h+var_30]
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 4
pop rdx
mov rcx, r15
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)
mov ebp, eax
lea rdi, [rbx+48h]
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
test bpl, bpl
jz short loc_42CC6
mov rax, [rbx+10h]
cmp qword ptr [rax-8], 0
jz short loc_42CC6
lea rsi, [rbx+0A8h]
lea rdi, [rsp+48h+var_40]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rdi, [rax+8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&)
lea r14, [rsp+48h+var_40]
mov rdi, rax
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov [rbx+70h], rax
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_42CC6:
lea rdi, [rsp+48h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov al, 1
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_42CEF
mov rbx, rax
loc_42CEF:
lea rdi, [rsp+arg_10]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, rbx
call __Unwind_Resume
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::key(
_QWORD *a1,
long long a2)
{
unsigned __int8 v2; // bp
long long v3; // rax
_BYTE v5[16]; // [rsp+8h] [rbp-40h] BYREF
_BYTE v6[48]; // [rsp+18h] [rbp-30h] BYREF
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v6);
v2 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 16,
(a1[2] - a1[1]) >> 3,
4LL,
v6);
std::vector<bool>::push_back((long long)(a1 + 9), v2);
if ( v2 && *(_QWORD *)(a1[2] - 8LL) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v5,
a1 + 21);
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[](
*(_QWORD *)(*(_QWORD *)(a1[2] - 8LL) + 8LL),
a2);
a1[14] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v3,
(long long)v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v5);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v6);
return 1;
}
|
key:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x18]
MOV RDI,R15
CALL 0x001450ea
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_00142c5c:
PUSH 0x4
POP RDX
MOV RCX,R15
CALL 0x0014316e
MOV EBP,EAX
LEA RDI,[RBX + 0x48]
MOVZX ESI,AL
CALL 0x001423e4
TEST BPL,BPL
JZ 0x00142cc6
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RAX + -0x8],0x0
JZ 0x00142cc6
LEA RSI,[RBX + 0xa8]
LEA RDI,[RSP + 0x8]
CALL 0x00143a1e
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LAB_00142ca2:
MOV RSI,R14
CALL 0x00145122
LAB_00142caa:
LEA R14,[RSP + 0x8]
MOV RDI,RAX
MOV RSI,R14
CALL 0x0014184c
MOV qword ptr [RBX + 0x70],RAX
MOV RDI,R14
CALL 0x0013ecc6
LAB_00142cc6:
LEA RDI,[RSP + 0x18]
CALL 0x0013ecc6
MOV AL,0x1
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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> >::key(std::__cxx11::string&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_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>>
::key(json_sax_dom_callback_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>>
*this,string *param_1)
{
bool bVar1;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar2;
int8 uVar3;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_30 [16];
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_30);
/* try { // try from 00142c5c to 00142c95 has its CatchHandler @ 00142cec */
bVar1 = (bool)std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,
4,local_30);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1);
if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 0)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_40,this + 0xa8);
/* try { // try from 00142ca2 to 00142ca9 has its CatchHandler @ 00142cdd */
pbVar2 = (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>
*)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1);
uVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(pbVar2,local_40);
*(int8 *)(this + 0x70) = uVar3;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_30);
return 1;
}
|
|
17,561
|
extend_area_on_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
}
|
O3
|
c
|
extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r12d
movq %rdx, %rbx
movq %rdi, %r15
movzbl 0x8(%rsi), %edx
movq (%rdi), %rdi
movl 0x7bc(%rdi), %eax
movzwl (%rbx), %r9d
testw %r9w, %r9w
je 0x5f6cd
movzwl 0x2(%rbx), %r8d
addl %r8d, (%r14)
jmp 0x5f735
movzbl 0x2(%rbx), %r8d
cmpq $0xff, %r8
je 0x5f6f0
leaq (%rsi,%rax), %r9
shll $0x2, %r8d
subq %r8, %r9
movb 0x3(%rbx), %r8b
movb %r8b, -0x5(%r9)
jmp 0x5f6f8
movb 0x3(%rbx), %r8b
movb %r8b, 0x9(%rsi)
cmpb $-0x1, %r8b
je 0x5f715
leaq (%rsi,%rax), %r9
movzbl %r8b, %r8d
shll $0x2, %r8d
subq %r8, %r9
movb 0x2(%rbx), %r8b
movb %r8b, -0x6(%r9)
leaq -0x3(%rbx), %r9
movq %r9, %r8
cmpb $0x0, -0x1(%r9)
jne 0x5f72d
leaq -0x4(%r8), %r9
cmpb $0x0, (%r8)
je 0x5f719
movzwl -0x1(%r8), %r9d
xorl %r8d, %r8d
movzwl %r9w, %r11d
cmpl %r12d, %r8d
jae 0x5f7e1
leaq (%rsi,%rax), %r13
addq $-0x4, %r13
leaq 0x4(%rbx), %r10
cmpq %r13, %r10
jae 0x5f76a
movzwl (%r10), %r9d
addq $0x4, %r10
testl %r9d, %r9d
je 0x5f74e
movzwl -0x2(%r10), %r10d
addl %r9d, %r10d
jmp 0x5f775
movl 0xc18(%rdi), %r10d
addl $0xc, %r10d
subl %r10d, %r11d
addl %r11d, %r8d
cmpl %r12d, %r8d
jae 0x5f7de
leal -0x1(%rdx), %r8d
cmpl %ecx, %r8d
jne 0x5f797
leal (%r10,%rdx,4), %edx
subl %edx, %eax
addl $-0x4, %eax
movl %eax, %r8d
jmp 0x5f7b5
leaq -0x3(%rbx), %rdx
movq %rdx, %rax
cmpb $0x0, -0x1(%rdx)
jne 0x5f7ad
leaq -0x4(%rax), %rdx
cmpb $0x0, (%rax)
je 0x5f79b
movzwl -0x1(%rax), %r8d
subl %r10d, %r8d
cmpl %r12d, %r8d
jae 0x5f7de
movw %r10w, (%rbx)
movw $0x0, 0x2(%rbx)
cmpb $0x0, 0x20(%rbp)
je 0x5f809
movq 0x8(%r15), %rax
movq 0x80(%rax), %r8
movl 0x3b8(%rdi), %r9d
jmp 0x5f80f
movl %r10d, %r11d
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movw %r11w, (%rbx)
movw %r8w, 0x2(%rbx)
movl %r11d, (%rcx)
movl %r8d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %ecx, %edx
movl $0x1, %ecx
callq 0x5c124
movzwl 0x2(%rbx), %r8d
cmpl %r12d, %r8d
jae 0x5f836
movq %r15, %rdi
movl $0x7f, %esi
callq 0x36a4c
movb $0x1, %al
jmp 0x5f7fa
movzwl (%rbx), %r11d
movl %r8d, (%r14)
jmp 0x5f7e1
|
extend_area_on_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r12d, r8d
mov rbx, rdx
mov r15, rdi
movzx edx, byte ptr [rsi+8]
mov rdi, [rdi]
mov eax, [rdi+7BCh]
movzx r9d, word ptr [rbx]
test r9w, r9w
jz short loc_5F6CD
movzx r8d, word ptr [rbx+2]
add [r14], r8d
jmp short loc_5F735
loc_5F6CD:
movzx r8d, byte ptr [rbx+2]
cmp r8, 0FFh
jz short loc_5F6F0
lea r9, [rsi+rax]
shl r8d, 2
sub r9, r8
mov r8b, [rbx+3]
mov [r9-5], r8b
jmp short loc_5F6F8
loc_5F6F0:
mov r8b, [rbx+3]
mov [rsi+9], r8b
loc_5F6F8:
cmp r8b, 0FFh
jz short loc_5F715
lea r9, [rsi+rax]
movzx r8d, r8b
shl r8d, 2
sub r9, r8
mov r8b, [rbx+2]
mov [r9-6], r8b
loc_5F715:
lea r9, [rbx-3]
loc_5F719:
mov r8, r9
cmp byte ptr [r9-1], 0
jnz short loc_5F72D
lea r9, [r8-4]
cmp byte ptr [r8], 0
jz short loc_5F719
loc_5F72D:
movzx r9d, word ptr [r8-1]
xor r8d, r8d
loc_5F735:
movzx r11d, r9w
cmp r8d, r12d
jnb loc_5F7E1
lea r13, [rsi+rax]
add r13, 0FFFFFFFFFFFFFFFCh
lea r10, [rbx+4]
loc_5F74E:
cmp r10, r13
jnb short loc_5F76A
movzx r9d, word ptr [r10]
add r10, 4
test r9d, r9d
jz short loc_5F74E
movzx r10d, word ptr [r10-2]
add r10d, r9d
jmp short loc_5F775
loc_5F76A:
mov r10d, [rdi+0C18h]
add r10d, 0Ch
loc_5F775:
sub r11d, r10d
add r8d, r11d
cmp r8d, r12d
jnb short loc_5F7DE
lea r8d, [rdx-1]
cmp r8d, ecx
jnz short loc_5F797
lea edx, [r10+rdx*4]
sub eax, edx
add eax, 0FFFFFFFCh
mov r8d, eax
jmp short loc_5F7B5
loc_5F797:
lea rdx, [rbx-3]
loc_5F79B:
mov rax, rdx
cmp byte ptr [rdx-1], 0
jnz short loc_5F7AD
lea rdx, [rax-4]
cmp byte ptr [rax], 0
jz short loc_5F79B
loc_5F7AD:
movzx r8d, word ptr [rax-1]
sub r8d, r10d
loc_5F7B5:
cmp r8d, r12d
jnb short loc_5F7DE
mov [rbx], r10w
mov word ptr [rbx+2], 0
cmp [rbp+arg_10], 0
jz short loc_5F809
mov rax, [r15+8]
mov r8, [rax+80h]
mov r9d, [rdi+3B8h]
jmp short loc_5F80F
loc_5F7DE:
mov r11d, r10d
loc_5F7E1:
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_0]
mov [rbx], r11w
mov [rbx+2], r8w
mov [rcx], r11d
mov [rax], r8d
xor eax, eax
loc_5F7FA:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5F809:
xor r8d, r8d
xor r9d, r9d
loc_5F80F:
mov edx, ecx
mov ecx, 1
call _ma_compact_block_page
movzx r8d, word ptr [rbx+2]
cmp r8d, r12d
jnb short loc_5F836
mov rdi, r15
mov esi, 7Fh
call _ma_set_fatal_error
mov al, 1
jmp short loc_5F7FA
loc_5F836:
movzx r11d, word ptr [rbx]
mov [r14], r8d
jmp short loc_5F7E1
|
char extend_area_on_page(
long long a1,
long long a2,
unsigned __int16 *a3,
int a4,
unsigned int a5,
_DWORD *a6,
_DWORD *a7,
_DWORD *a8,
char a9)
{
int v13; // edx
_DWORD *v14; // rdi
long long v15; // rax
unsigned __int16 v16; // r9
long long v17; // r8
long long v18; // r8
long long v19; // r9
unsigned __int8 v20; // r8
char *v21; // r9
int v22; // r11d
unsigned __int16 *v23; // r10
int v24; // r9d
int v25; // r10d
_BYTE *v26; // rdx
_BYTE *v27; // rax
unsigned long long v28; // r8
unsigned int v29; // r9d
long long v31; // rdx
long long v32; // rcx
int v33; // r9d
v13 = *(unsigned __int8 *)(a2 + 8);
v14 = *(_DWORD **)a1;
v15 = (unsigned int)v14[495];
v16 = *a3;
if ( *a3 )
{
LODWORD(v17) = a3[1];
*a6 += v17;
}
else
{
v18 = *((unsigned __int8 *)a3 + 2);
if ( v18 == 255 )
{
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(a2 + 9) = v20;
}
else
{
v19 = a2 + v15 - (unsigned int)(4 * v18);
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(v19 - 5) = v20;
}
if ( v20 != 0xFF )
*(_BYTE *)(a2 + v15 - 4 * (unsigned int)v20 - 6) = *((_BYTE *)a3 + 2);
v21 = (char *)a3 - 3;
do
{
v17 = (long long)v21;
if ( *(v21 - 1) )
break;
v21 -= 4;
}
while ( !*(_BYTE *)v17 );
v16 = *(_WORD *)(v17 - 1);
LODWORD(v17) = 0;
}
v22 = v16;
if ( (unsigned int)v17 < a5 )
{
v23 = a3 + 2;
while ( (unsigned long long)v23 < a2 + v15 - 4 )
{
v24 = *v23;
v23 += 2;
if ( v24 )
{
v25 = v24 + *(v23 - 1);
goto LABEL_18;
}
}
v25 = v14[774] + 12;
LABEL_18:
LODWORD(v17) = v22 - v25 + v17;
if ( (unsigned int)v17 >= a5 )
goto LABEL_28;
if ( v13 - 1 == a4 )
{
LODWORD(v17) = v15 - (v25 + 4 * v13) - 4;
}
else
{
v26 = (char *)a3 - 3;
do
{
v27 = v26;
if ( *(v26 - 1) )
break;
v26 -= 4;
}
while ( !*v27 );
LODWORD(v17) = *(unsigned __int16 *)(v27 - 1) - v25;
}
if ( (unsigned int)v17 >= a5 )
{
LABEL_28:
v22 = v25;
}
else
{
*a3 = v25;
a3[1] = 0;
if ( a9 )
{
v28 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 128LL);
v29 = v14[238];
}
else
{
v28 = 0LL;
v29 = 0;
}
ma_compact_block_page((long long)v14, a2, a4, 1, v28, v29);
v17 = a3[1];
if ( (unsigned int)v17 < a5 )
{
ma_set_fatal_error((_DWORD *)a1, 127LL, v31, v32, v17, v33);
return 1;
}
v22 = *a3;
*a6 = v17;
}
}
*a3 = v22;
a3[1] = v17;
*a7 = v22;
*a8 = v17;
return 0;
}
|
extend_area_on_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R12D,R8D
MOV RBX,RDX
MOV R15,RDI
MOVZX EDX,byte ptr [RSI + 0x8]
MOV RDI,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x7bc]
MOVZX R9D,word ptr [RBX]
TEST R9W,R9W
JZ 0x0015f6cd
MOVZX R8D,word ptr [RBX + 0x2]
ADD dword ptr [R14],R8D
JMP 0x0015f735
LAB_0015f6cd:
MOVZX R8D,byte ptr [RBX + 0x2]
CMP R8,0xff
JZ 0x0015f6f0
LEA R9,[RSI + RAX*0x1]
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [R9 + -0x5],R8B
JMP 0x0015f6f8
LAB_0015f6f0:
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [RSI + 0x9],R8B
LAB_0015f6f8:
CMP R8B,0xff
JZ 0x0015f715
LEA R9,[RSI + RAX*0x1]
MOVZX R8D,R8B
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x2]
MOV byte ptr [R9 + -0x6],R8B
LAB_0015f715:
LEA R9,[RBX + -0x3]
LAB_0015f719:
MOV R8,R9
CMP byte ptr [R9 + -0x1],0x0
JNZ 0x0015f72d
LEA R9,[R8 + -0x4]
CMP byte ptr [R8],0x0
JZ 0x0015f719
LAB_0015f72d:
MOVZX R9D,word ptr [R8 + -0x1]
XOR R8D,R8D
LAB_0015f735:
MOVZX R11D,R9W
CMP R8D,R12D
JNC 0x0015f7e1
LEA R13,[RSI + RAX*0x1]
ADD R13,-0x4
LEA R10,[RBX + 0x4]
LAB_0015f74e:
CMP R10,R13
JNC 0x0015f76a
MOVZX R9D,word ptr [R10]
ADD R10,0x4
TEST R9D,R9D
JZ 0x0015f74e
MOVZX R10D,word ptr [R10 + -0x2]
ADD R10D,R9D
JMP 0x0015f775
LAB_0015f76a:
MOV R10D,dword ptr [RDI + 0xc18]
ADD R10D,0xc
LAB_0015f775:
SUB R11D,R10D
ADD R8D,R11D
CMP R8D,R12D
JNC 0x0015f7de
LEA R8D,[RDX + -0x1]
CMP R8D,ECX
JNZ 0x0015f797
LEA EDX,[R10 + RDX*0x4]
SUB EAX,EDX
ADD EAX,-0x4
MOV R8D,EAX
JMP 0x0015f7b5
LAB_0015f797:
LEA RDX,[RBX + -0x3]
LAB_0015f79b:
MOV RAX,RDX
CMP byte ptr [RDX + -0x1],0x0
JNZ 0x0015f7ad
LEA RDX,[RAX + -0x4]
CMP byte ptr [RAX],0x0
JZ 0x0015f79b
LAB_0015f7ad:
MOVZX R8D,word ptr [RAX + -0x1]
SUB R8D,R10D
LAB_0015f7b5:
CMP R8D,R12D
JNC 0x0015f7de
MOV word ptr [RBX],R10W
MOV word ptr [RBX + 0x2],0x0
CMP byte ptr [RBP + 0x20],0x0
JZ 0x0015f809
MOV RAX,qword ptr [R15 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x0015f80f
LAB_0015f7de:
MOV R11D,R10D
LAB_0015f7e1:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x10]
MOV word ptr [RBX],R11W
MOV word ptr [RBX + 0x2],R8W
MOV dword ptr [RCX],R11D
MOV dword ptr [RAX],R8D
XOR EAX,EAX
LAB_0015f7fa:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015f809:
XOR R8D,R8D
XOR R9D,R9D
LAB_0015f80f:
MOV EDX,ECX
MOV ECX,0x1
CALL 0x0015c124
MOVZX R8D,word ptr [RBX + 0x2]
CMP R8D,R12D
JNC 0x0015f836
MOV RDI,R15
MOV ESI,0x7f
CALL 0x00136a4c
MOV AL,0x1
JMP 0x0015f7fa
LAB_0015f836:
MOVZX R11D,word ptr [RBX]
MOV dword ptr [R14],R8D
JMP 0x0015f7e1
|
int8
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
ushort uVar2;
uint uVar3;
long lVar4;
char *pcVar5;
ushort *puVar6;
ulong uVar7;
char *pcVar8;
byte bVar9;
uint uVar10;
int8 uVar11;
int4 uVar12;
uint uVar13;
ushort *puVar14;
bVar1 = *(byte *)(param_2 + 8);
lVar4 = *param_1;
uVar3 = *(uint *)(lVar4 + 0x7bc);
uVar7 = (ulong)uVar3;
uVar2 = *param_3;
if (uVar2 == 0) {
if ((byte)param_3[1] == 0xff) {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + 9) = bVar9;
}
else {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + uVar7 + (ulong)(byte)param_3[1] * -4 + -5) = bVar9;
}
if (bVar9 != 0xff) {
*(char *)(param_2 + uVar7 + (ulong)bVar9 * -4 + -6) = (char)param_3[1];
}
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar2 = *(ushort *)(pcVar8 + -1);
uVar10 = 0;
}
else {
uVar10 = (uint)param_3[1];
*param_6 = *param_6 + (uint)param_3[1];
}
uVar13 = (uint)uVar2;
if (uVar10 < param_5) {
puVar6 = param_3 + 2;
do {
puVar14 = puVar6;
if ((ushort *)(param_2 + uVar7 + -4) <= puVar14) {
uVar13 = *(int *)(lVar4 + 0xc18) + 0xc;
goto LAB_0015f775;
}
puVar6 = puVar14 + 2;
} while (*puVar14 == 0);
uVar13 = (uint)puVar14[1] + (uint)*puVar14;
LAB_0015f775:
uVar10 = uVar10 + (uVar2 - uVar13);
if (uVar10 < param_5) {
if (bVar1 - 1 == param_4) {
uVar10 = (uVar3 - (uVar13 + (uint)bVar1 * 4)) - 4;
}
else {
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar10 = *(ushort *)(pcVar8 + -1) - uVar13;
}
if (uVar10 < param_5) {
*param_3 = (ushort)uVar13;
param_3[1] = 0;
if (param_9 == '\0') {
uVar11 = 0;
uVar12 = 0;
}
else {
uVar11 = *(int8 *)(param_1[1] + 0x80);
uVar12 = *(int4 *)(lVar4 + 0x3b8);
}
_ma_compact_block_page(lVar4,param_2,param_4,1,uVar11,uVar12);
uVar10 = (uint)param_3[1];
if (uVar10 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
uVar13 = (uint)*param_3;
*param_6 = uVar10;
}
}
}
*param_3 = (ushort)uVar13;
param_3[1] = (ushort)uVar10;
*param_7 = uVar13;
*param_8 = uVar10;
return 0;
}
|
|
17,562
|
my_strntoul_8bit
|
eloqsql/strings/ctype-simple.c
|
ulong my_strntoul_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register uint32 cutoff;
register uint cutlim;
register uint32 i;
register const char *s;
const char *save, *e;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for( ; s<e && my_isspace(cs, *s); s++);
if (s==e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = ((uint32)~0L) / (uint32) base;
cutlim = (uint) (((uint32)~0L) % (uint32) base);
overflow = 0;
i = 0;
for ( ; s != e; ++s)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (uint32) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(uint32) 0);
}
return (negative ? -((long) i) : (long) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
}
|
O0
|
c
|
my_strntoul_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq -0x60(%rbp), %rcx
movb %al, -0x66(%rbp)
jae 0x43878
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x66(%rbp)
movb -0x66(%rbp), %al
testb $0x1, %al
jne 0x43881
jmp 0x43891
jmp 0x43883
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x43849
movq -0x50(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x438a0
jmp 0x43a4c
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x438c1
movl $0x1, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x438eb
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x438e2
movl $0x0, -0x3c(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x438e9
movl $0x0, -0x3c(%rbp)
jmp 0x438eb
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x40(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x44(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x439ec
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0x65(%rbp)
movzbl -0x65(%rbp), %eax
cmpl $0x30, %eax
jl 0x43950
movzbl -0x65(%rbp), %eax
cmpl $0x39, %eax
jg 0x43950
movzbl -0x65(%rbp), %eax
subl $0x30, %eax
movb %al, -0x65(%rbp)
jmp 0x43998
movzbl -0x65(%rbp), %eax
cmpl $0x41, %eax
jl 0x43971
movzbl -0x65(%rbp), %eax
cmpl $0x5a, %eax
jg 0x43971
movzbl -0x65(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x65(%rbp)
jmp 0x43996
movzbl -0x65(%rbp), %eax
cmpl $0x61, %eax
jl 0x43992
movzbl -0x65(%rbp), %eax
cmpl $0x7a, %eax
jg 0x43992
movzbl -0x65(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x65(%rbp)
jmp 0x43994
jmp 0x439ec
jmp 0x43996
jmp 0x43998
movzbl -0x65(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x439a3
jmp 0x439ec
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
ja 0x439bc
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x439c5
movzbl -0x65(%rbp), %eax
cmpl -0x44(%rbp), %eax
jbe 0x439c5
movl $0x1, -0x64(%rbp)
jmp 0x439d9
movl -0x24(%rbp), %eax
imull -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movzbl -0x65(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x439db
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x4391b
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0x439f8
jmp 0x43a4c
cmpq $0x0, -0x30(%rbp)
je 0x43a0a
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x64(%rbp)
je 0x43a25
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x43a70
cmpl $0x0, -0x3c(%rbp)
je 0x43a3b
movl -0x48(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x43a42
movl -0x48(%rbp), %eax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x43a70
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x43a68
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strntoul_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_43849:
mov rcx, [rbp+var_50]
xor eax, eax
cmp rcx, [rbp+var_60]
mov [rbp+var_66], al
jnb short loc_43878
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_50]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_66], al
loc_43878:
mov al, [rbp+var_66]
test al, 1
jnz short loc_43881
jmp short loc_43891
loc_43881:
jmp short $+2
loc_43883:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_43849
loc_43891:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_60]
jnz short loc_438A0
jmp loc_43A4C
loc_438A0:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_438C1
mov [rbp+var_3C], 1
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_438EB
loc_438C1:
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_438E2
mov [rbp+var_3C], 0
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_438E9
loc_438E2:
mov [rbp+var_3C], 0
loc_438E9:
jmp short $+2
loc_438EB:
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_40], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_44], edx
mov [rbp+var_64], 0
mov [rbp+var_48], 0
loc_4391B:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_60]
jz loc_439EC
mov rax, [rbp+var_50]
mov al, [rax]
mov [rbp+var_65], al
movzx eax, [rbp+var_65]
cmp eax, 30h ; '0'
jl short loc_43950
movzx eax, [rbp+var_65]
cmp eax, 39h ; '9'
jg short loc_43950
movzx eax, [rbp+var_65]
sub eax, 30h ; '0'
mov [rbp+var_65], al
jmp short loc_43998
loc_43950:
movzx eax, [rbp+var_65]
cmp eax, 41h ; 'A'
jl short loc_43971
movzx eax, [rbp+var_65]
cmp eax, 5Ah ; 'Z'
jg short loc_43971
movzx eax, [rbp+var_65]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_65], al
jmp short loc_43996
loc_43971:
movzx eax, [rbp+var_65]
cmp eax, 61h ; 'a'
jl short loc_43992
movzx eax, [rbp+var_65]
cmp eax, 7Ah ; 'z'
jg short loc_43992
movzx eax, [rbp+var_65]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_65], al
jmp short loc_43994
loc_43992:
jmp short loc_439EC
loc_43994:
jmp short $+2
loc_43996:
jmp short $+2
loc_43998:
movzx eax, [rbp+var_65]
cmp eax, [rbp+var_24]
jl short loc_439A3
jmp short loc_439EC
loc_439A3:
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
ja short loc_439BC
mov eax, [rbp+var_48]
cmp eax, [rbp+var_40]
jnz short loc_439C5
movzx eax, [rbp+var_65]
cmp eax, [rbp+var_44]
jbe short loc_439C5
loc_439BC:
mov [rbp+var_64], 1
jmp short loc_439D9
loc_439C5:
mov eax, [rbp+var_24]
imul eax, [rbp+var_48]
mov [rbp+var_48], eax
movzx eax, [rbp+var_65]
add eax, [rbp+var_48]
mov [rbp+var_48], eax
loc_439D9:
jmp short $+2
loc_439DB:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_4391B
loc_439EC:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnz short loc_439F8
jmp short loc_43A4C
loc_439F8:
cmp [rbp+var_30], 0
jz short loc_43A0A
mov rcx, [rbp+var_50]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_43A0A:
cmp [rbp+var_64], 0
jz short loc_43A25
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_43A70
loc_43A25:
cmp [rbp+var_3C], 0
jz short loc_43A3B
mov eax, [rbp+var_48]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_70], rax
jmp short loc_43A42
loc_43A3B:
mov eax, [rbp+var_48]
mov [rbp+var_70], rax
loc_43A42:
mov rax, [rbp+var_70]
mov [rbp+var_8], rax
jmp short loc_43A70
loc_43A4C:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_43A68
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_43A68:
mov [rbp+var_8], 0
loc_43A70:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long my_strntoul_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
bool v8; // [rsp+Ah] [rbp-66h]
unsigned __int8 v9; // [rsp+Bh] [rbp-65h]
unsigned __int8 v10; // [rsp+Bh] [rbp-65h]
int v11; // [rsp+Ch] [rbp-64h]
_BYTE *v12; // [rsp+10h] [rbp-60h]
_BYTE *v13; // [rsp+18h] [rbp-58h]
_BYTE *v14; // [rsp+20h] [rbp-50h]
unsigned int v15; // [rsp+28h] [rbp-48h]
unsigned long long v16; // [rsp+2Ch] [rbp-44h]
int v17; // [rsp+34h] [rbp-3Ch]
*a6 = 0;
v14 = a2;
v12 = &a2[a3];
while ( 1 )
{
v8 = 0;
if ( v14 < v12 )
v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0;
if ( !v8 )
break;
++v14;
}
if ( v14 == v12 )
goto LABEL_37;
if ( *v14 == 45 )
{
v17 = 1;
++v14;
}
else
{
v17 = 0;
if ( *v14 == 43 )
++v14;
}
v13 = v14;
v11 = 0;
v15 = 0;
while ( v14 != v12 )
{
v9 = *v14;
if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u )
{
if ( v9 < 0x41u || v9 > 0x5Au )
{
if ( v9 < 0x61u || v9 > 0x7Au )
break;
v10 = v9 - 97 + 10;
}
else
{
v10 = v9 - 65 + 10;
}
}
else
{
v10 = v9 - 48;
}
if ( v10 >= a4 )
break;
LODWORD(v16) = 0xFFFFFFFF % a4;
HIDWORD(v16) = 0xFFFFFFFF / a4;
if ( __PAIR64__(v15, v10) <= v16 )
v15 = v15 * a4 + v10;
else
v11 = 1;
++v14;
}
if ( v14 == v13 )
{
LABEL_37:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v14;
if ( v11 )
{
*a6 = 34;
return 0xFFFFFFFFLL;
}
else if ( v17 )
{
return -(long long)v15;
}
else
{
return v15;
}
}
}
|
my_strntoul_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_00143849:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x60]
MOV byte ptr [RBP + -0x66],AL
JNC 0x00143878
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x66],AL
LAB_00143878:
MOV AL,byte ptr [RBP + -0x66]
TEST AL,0x1
JNZ 0x00143881
JMP 0x00143891
LAB_00143881:
JMP 0x00143883
LAB_00143883:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00143849
LAB_00143891:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x60]
JNZ 0x001438a0
JMP 0x00143a4c
LAB_001438a0:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x001438c1
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001438eb
LAB_001438c1:
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x001438e2
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001438e9
LAB_001438e2:
MOV dword ptr [RBP + -0x3c],0x0
LAB_001438e9:
JMP 0x001438eb
LAB_001438eb:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x44],EDX
MOV dword ptr [RBP + -0x64],0x0
MOV dword ptr [RBP + -0x48],0x0
LAB_0014391b:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x001439ec
MOV RAX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x65],AL
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x30
JL 0x00143950
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x39
JG 0x00143950
MOVZX EAX,byte ptr [RBP + -0x65]
SUB EAX,0x30
MOV byte ptr [RBP + -0x65],AL
JMP 0x00143998
LAB_00143950:
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x41
JL 0x00143971
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x5a
JG 0x00143971
MOVZX EAX,byte ptr [RBP + -0x65]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x65],AL
JMP 0x00143996
LAB_00143971:
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x61
JL 0x00143992
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,0x7a
JG 0x00143992
MOVZX EAX,byte ptr [RBP + -0x65]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x65],AL
JMP 0x00143994
LAB_00143992:
JMP 0x001439ec
LAB_00143994:
JMP 0x00143996
LAB_00143996:
JMP 0x00143998
LAB_00143998:
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001439a3
JMP 0x001439ec
LAB_001439a3:
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JA 0x001439bc
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x001439c5
MOVZX EAX,byte ptr [RBP + -0x65]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x001439c5
LAB_001439bc:
MOV dword ptr [RBP + -0x64],0x1
JMP 0x001439d9
LAB_001439c5:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
MOVZX EAX,byte ptr [RBP + -0x65]
ADD EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
LAB_001439d9:
JMP 0x001439db
LAB_001439db:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0014391b
LAB_001439ec:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x001439f8
JMP 0x00143a4c
LAB_001439f8:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00143a0a
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00143a0a:
CMP dword ptr [RBP + -0x64],0x0
JZ 0x00143a25
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00143a70
LAB_00143a25:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00143a3b
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00143a42
LAB_00143a3b:
MOV EAX,dword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x70],RAX
LAB_00143a42:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00143a70
LAB_00143a4c:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00143a68
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00143a68:
MOV qword ptr [RBP + -0x8],0x0
LAB_00143a70:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,int8 *param_5,
int4 *param_6)
{
bool bVar1;
byte *pbVar2;
uint uVar3;
byte *pbVar4;
bool bVar5;
ulong local_78;
byte local_6d;
byte *local_58;
uint local_50;
*param_6 = 0;
pbVar4 = param_2 + param_3;
local_58 = param_2;
while( true ) {
bVar5 = false;
if (local_58 < pbVar4) {
bVar5 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_58) & 8) != 0;
}
if (!bVar5) break;
local_58 = local_58 + 1;
}
if (local_58 != pbVar4) {
if (*local_58 == 0x2d) {
bVar5 = true;
local_58 = local_58 + 1;
}
else {
if (*local_58 == 0x2b) {
local_58 = local_58 + 1;
}
bVar5 = false;
}
pbVar2 = local_58;
uVar3 = (uint)(0xffffffff / (ulong)param_4);
bVar1 = false;
local_50 = 0;
for (; local_58 != pbVar4; local_58 = local_58 + 1) {
local_6d = *local_58;
if ((local_6d < 0x30) || (0x39 < local_6d)) {
if ((local_6d < 0x41) || (0x5a < local_6d)) {
if ((local_6d < 0x61) || (0x7a < local_6d)) break;
local_6d = local_6d + 0xa9;
}
else {
local_6d = local_6d - 0x37;
}
}
else {
local_6d = local_6d - 0x30;
}
if ((int)param_4 <= (int)(uint)local_6d) break;
if ((uVar3 < local_50) ||
((local_50 == uVar3 && ((uint)(0xffffffff % (ulong)param_4) < (uint)local_6d)))) {
bVar1 = true;
}
else {
local_50 = (uint)local_6d + param_4 * local_50;
}
}
if (local_58 != pbVar2) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_58;
}
if (bVar1) {
*param_6 = 0x22;
return 0xffffffff;
}
if (bVar5) {
local_78 = -(ulong)local_50;
}
else {
local_78 = (ulong)local_50;
}
return local_78;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
|
|
17,563
|
uf_endspace
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill(end - spaces, spaces, ' ');
}
|
O0
|
c
|
uf_endspace:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x4e28b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x270e7d(%rip), %rcx # 0x2bf100
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0x4e29e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x4cda0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0x4e2c0
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x4e313
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0x4e2f3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
xorl %eax, %eax
subq %r8, %rax
addq %rax, %rcx
callq 0x4d930
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x2a2b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
uf_endspace:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_4E28B
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_4E29E
loc_4E28B:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_28], eax
loc_4E29E:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_4E2C0
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_4E313
loc_4E2C0:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_4E2F3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
xor eax, eax
sub rax, r8
add rcx, rax
call decode_bytes
loc_4E2F3:
mov rdi, [rbp+var_20]
mov eax, [rbp+var_24]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rdi, rax
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
loc_4E313:
add rsp, 30h
pop rbp
retn
|
long long uf_endspace(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
unsigned int v4; // eax
int v5; // ecx
long long result; // rax
unsigned int bits; // [rsp+8h] [rbp-28h]
if ( a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v4 = *a2;
v5 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v5;
bits = mask[*(unsigned int *)(a1 + 36)] & (v4 >> v5);
}
if ( &a3[bits] <= a4 )
{
if ( &a3[bits] != a4 )
decode_bytes(a1, (long long)a2, a3, &a4[-bits]);
return memset(&a4[-bits], 32LL, bits);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
|
uf_endspace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x0014e28b
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x3bf100]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0014e29e
LAB_0014e28b:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x0014cda0
MOV dword ptr [RBP + -0x28],EAX
LAB_0014e29e:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0014e2c0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x0014e313
LAB_0014e2c0:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0014e2f3
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
XOR EAX,EAX
SUB RAX,R8
ADD RCX,RAX
CALL 0x0014d930
LAB_0014e2f3:
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x0012a2b0
LAB_0014e313:
ADD RSP,0x30
POP RBP
RET
|
void uf_endspace(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
if (param_4 < param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
if (param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 - local_30);
}
memset((void *)(param_4 - local_30),0x20,(ulong)local_30);
}
return;
}
|
|
17,564
|
mi_update_static_record
|
eloqsql/storage/myisam/mi_statrec.c
|
int _mi_update_static_record(MI_INFO *info, my_off_t pos, const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
}
|
O3
|
c
|
mi_update_static_record:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movl $0x1, 0x300(%rdi)
movq (%rdi), %r9
movq 0x140(%r9), %rax
movl $0x4, %r8d
movq %rdx, %rsi
movq %rax, %rdx
callq *0x2e8(%r9)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
popq %rbp
retq
|
_mi_update_static_record:
push rbp
mov rbp, rsp
mov rcx, rsi
mov dword ptr [rdi+300h], 1
mov r9, [rdi]
mov rax, [r9+140h]
mov r8d, 4
mov rsi, rdx
mov rdx, rax
call qword ptr [r9+2E8h]
xor ecx, ecx
test rax, rax
setnz cl
mov eax, ecx
pop rbp
retn
|
_BOOL8 mi_update_static_record(_DWORD *a1, long long a2, long long a3)
{
a1[192] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
a3,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
a2,
4LL) != 0;
}
|
_mi_update_static_record:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV dword ptr [RDI + 0x300],0x1
MOV R9,qword ptr [RDI]
MOV RAX,qword ptr [R9 + 0x140]
MOV R8D,0x4
MOV RSI,RDX
MOV RDX,RAX
CALL qword ptr [R9 + 0x2e8]
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
MOV EAX,ECX
POP RBP
RET
|
bool _mi_update_static_record(long *param_1,int8 param_2,int8 param_3)
{
long lVar1;
*(int4 *)(param_1 + 0x60) = 1;
lVar1 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4);
return lVar1 != 0;
}
|
|
17,565
|
my_strxfrm_pad_desc_and_reverse_nopad
|
eloqsql/strings/ctype-simple.c
|
size_t
my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
memset(frmend, 0x00, fill_length);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
memset(frmend, 0x00, fill_length);
frmend= strend;
}
return frmend - str;
}
|
O3
|
c
|
my_strxfrm_pad_desc_and_reverse_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movl 0x10(%rbp), %ecx
testl %r8d, %r8d
sete %al
cmpq %r15, %rdx
setae %sil
testb $0x40, %r12b
sete %dl
orb %al, %dl
orb %sil, %dl
jne 0xb4f75
movl %r8d, %r13d
movl %r15d, %eax
imull 0x98(%rdi), %r13d
subl %r14d, %eax
cmpl %eax, %r13d
cmovael %eax, %r13d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x292b0
movl 0x10(%rbp), %ecx
addq %r13, %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0xb67b6
testb %r12b, %r12b
jns 0xb4fa0
cmpq %r15, %r14
jae 0xb4fa0
movq %r15, %rdx
subq %r14, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x292b0
movq %r15, %r14
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strxfrm_pad_desc_and_reverse_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, r9d
mov r15, rcx
mov r14, rdx
mov rbx, rsi
mov ecx, [rbp+arg_0]
test r8d, r8d
setz al
cmp rdx, r15
setnb sil
test r12b, 40h
setz dl
or dl, al
or dl, sil
jnz short loc_B4F75
mov r13d, r8d
mov eax, r15d
imul r13d, [rdi+98h]
sub eax, r14d
cmp r13d, eax
cmovnb r13d, eax
mov rdi, r14
xor esi, esi
mov rdx, r13
call _memset
mov ecx, [rbp+arg_0]
add r14, r13
loc_B4F75:
mov rdi, rbx
mov rsi, r14
mov edx, r12d
call my_strxfrm_desc_and_reverse
test r12b, r12b
jns short loc_B4FA0
cmp r14, r15
jnb short loc_B4FA0
mov rdx, r15
sub rdx, r14
mov rdi, r14
xor esi, esi
call _memset
mov r14, r15
loc_B4FA0:
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strxfrm_pad_desc_and_reverse_nopad(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned long long v9; // r14
long long v10; // rcx
long long v11; // r13
v9 = a3;
v10 = a7;
if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 )
{
v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5);
if ( (unsigned int)v11 >= (int)a4 - (int)a3 )
v11 = (unsigned int)(a4 - a3);
memset(a3, 0LL, v11);
v10 = a7;
v9 += v11;
}
my_strxfrm_desc_and_reverse(a2, v9, a6, v10);
if ( (a6 & 0x80u) != 0 && v9 < a4 )
{
memset(v9, 0LL, a4 - v9);
v9 = a4;
}
return v9 - a2;
}
|
my_strxfrm_pad_desc_and_reverse_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,R9D
MOV R15,RCX
MOV R14,RDX
MOV RBX,RSI
MOV ECX,dword ptr [RBP + 0x10]
TEST R8D,R8D
SETZ AL
CMP RDX,R15
SETNC SIL
TEST R12B,0x40
SETZ DL
OR DL,AL
OR DL,SIL
JNZ 0x001b4f75
MOV R13D,R8D
MOV EAX,R15D
IMUL R13D,dword ptr [RDI + 0x98]
SUB EAX,R14D
CMP R13D,EAX
CMOVNC R13D,EAX
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R13
CALL 0x001292b0
MOV ECX,dword ptr [RBP + 0x10]
ADD R14,R13
LAB_001b4f75:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R12D
CALL 0x001b67b6
TEST R12B,R12B
JNS 0x001b4fa0
CMP R14,R15
JNC 0x001b4fa0
MOV RDX,R15
SUB RDX,R14
MOV RDI,R14
XOR ESI,ESI
CALL 0x001292b0
MOV R14,R15
LAB_001b4fa0:
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse_nopad
(long param_1,long param_2,void *param_3,void *param_4,int param_5,uint param_6,
int4 param_7)
{
uint uVar1;
uint uVar2;
if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) {
uVar2 = param_5 * *(int *)(param_1 + 0x98);
uVar1 = (int)param_4 - (int)param_3;
if (uVar1 <= uVar2) {
uVar2 = uVar1;
}
memset(param_3,0,(ulong)uVar2);
param_3 = (void *)((long)param_3 + (ulong)uVar2);
}
my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7);
if (((char)param_6 < '\0') && (param_3 < param_4)) {
memset(param_3,0,(long)param_4 - (long)param_3);
param_3 = param_4;
}
return (long)param_3 - param_2;
}
|
|
17,566
|
my_rw_wrlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
}
|
O3
|
c
|
my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x291e0
movl 0x8c(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbx)
cmpl $0x0, 0x88(%rbx)
je 0xa7240
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29400
cmpl $0x0, 0x88(%rbx)
jne 0xa7224
movl 0x8c(%rbx), %eax
decl %eax
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x8c(%rbx)
movq %rbx, %rdi
callq 0x291b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_wrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+8Ch]
lea ecx, [rax+1]
mov [rbx+8Ch], ecx
cmp dword ptr [rbx+88h], 0
jz short loc_A7240
lea r14, [rbx+58h]
loc_A7224:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
cmp dword ptr [rbx+88h], 0
jnz short loc_A7224
mov eax, [rbx+8Ch]
dec eax
loc_A7240:
mov dword ptr [rbx+88h], 0FFFFFFFFh
mov [rbx+8Ch], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_wrlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 140);
*(_DWORD *)(a1 + 140) = v1 + 1;
if ( *(_DWORD *)(a1 + 136) )
{
do
pthread_cond_wait(a1 + 88, a1);
while ( *(_DWORD *)(a1 + 136) );
v1 = *(_DWORD *)(a1 + 140) - 1;
}
*(_DWORD *)(a1 + 136) = -1;
*(_DWORD *)(a1 + 140) = v1;
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x001291e0
MOV EAX,dword ptr [RBX + 0x8c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8c],ECX
CMP dword ptr [RBX + 0x88],0x0
JZ 0x001a7240
LEA R14,[RBX + 0x58]
LAB_001a7224:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129400
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x001a7224
MOV EAX,dword ptr [RBX + 0x8c]
DEC EAX
LAB_001a7240:
MOV dword ptr [RBX + 0x88],0xffffffff
MOV dword ptr [RBX + 0x8c],EAX
MOV RDI,RBX
CALL 0x001291b0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
iVar1 = *(int *)((long)param_1 + 0x8c);
*(int *)((long)param_1 + 0x8c) = iVar1 + 1;
if (*(int *)((long)param_1 + 0x88) != 0) {
do {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
} while (*(int *)((long)param_1 + 0x88) != 0);
iVar1 = *(int *)((long)param_1 + 0x8c) + -1;
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = iVar1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
17,567
|
unifex::_manual_event_loop::context::enqueue(unifex::_manual_event_loop::task_base*)
|
aimrt_mujoco_sim/_deps/libunifex-src/source/manual_event_loop.cpp
|
void context::enqueue(task_base* task) {
std::unique_lock lock{mutex_};
if (head_ == nullptr) {
head_ = task;
} else {
tail_->next_ = task;
}
tail_ = task;
task->next_ = nullptr;
cv_.notify_one();
}
|
O0
|
cpp
|
unifex::_manual_event_loop::context::enqueue(unifex::_manual_event_loop::task_base*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rsi
movq %rsi, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x151190
movq (%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x1510bb
movq (%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x58(%rax)
jmp 0x1510cb
movq (%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x60(%rax), %rax
movq %rcx, (%rax)
movq (%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rdi)
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
addq $0x28, %rdi
callq 0x902c0
leaq 0x8(%rsp), %rdi
callq 0x1512a0
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN6unifex18_manual_event_loop7context7enqueueEPNS0_9task_baseE:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rsi, [rsp+28h+var_8]
mov [rsp+28h+var_28], rsi
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexEC2ERS0_; std::unique_lock<std::mutex>::unique_lock(std::mutex&)
mov rax, [rsp+28h+var_28]
cmp qword ptr [rax+58h], 0
jnz short loc_1510BB
mov rax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_10]
mov [rax+58h], rcx
jmp short loc_1510CB
loc_1510BB:
mov rax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_10]
mov rax, [rax+60h]
mov [rax], rcx
loc_1510CB:
mov rdi, [rsp+28h+var_28]
mov rax, [rsp+28h+var_10]
mov [rdi+60h], rax
mov rax, [rsp+28h+var_10]
mov qword ptr [rax], 0
add rdi, 28h ; '('; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 28h
retn
|
long long unifex::_manual_event_loop::context::enqueue(
unifex::_manual_event_loop::context *this,
unifex::_manual_event_loop::task_base *a2)
{
_BYTE v3[16]; // [rsp+8h] [rbp-20h] BYREF
unifex::_manual_event_loop::task_base *v4; // [rsp+18h] [rbp-10h]
unifex::_manual_event_loop::context *v5; // [rsp+20h] [rbp-8h]
v5 = this;
v4 = a2;
std::unique_lock<std::mutex>::unique_lock(v3);
if ( *((_QWORD *)this + 11) )
**((_QWORD **)this + 12) = v4;
else
*((_QWORD *)this + 11) = v4;
*((_QWORD *)this + 12) = v4;
*(_QWORD *)v4 = 0LL;
std::condition_variable::notify_one((unifex::_manual_event_loop::context *)((char *)this + 40));
return std::unique_lock<std::mutex>::~unique_lock(v3);
}
| |||
17,568
|
unifex::_manual_event_loop::context::enqueue(unifex::_manual_event_loop::task_base*)
|
aimrt_mujoco_sim/_deps/libunifex-src/source/manual_event_loop.cpp
|
void context::enqueue(task_base* task) {
std::unique_lock lock{mutex_};
if (head_ == nullptr) {
head_ = task;
} else {
tail_->next_ = task;
}
tail_ = task;
task->next_ = nullptr;
cv_.notify_one();
}
|
O3
|
cpp
|
unifex::_manual_event_loop::context::enqueue(unifex::_manual_event_loop::task_base*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
movq %rdi, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x72168
movb $0x1, 0x8(%rbx)
cmpq $0x0, 0x58(%r14)
je 0x72110
movq 0x60(%r14), %rax
jmp 0x72114
leaq 0x58(%r14), %rax
movq %r15, (%rax)
movq %r15, 0x60(%r14)
movq $0x0, (%r15)
addq $0x28, %r14
movq %r14, %rdi
callq 0x2c820
movq %rbx, %rdi
callq 0x721a4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZN6unifex18_manual_event_loop7context7enqueueEPNS0_9task_baseE:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, rsi
mov r14, rdi
mov rbx, rsp
mov [rbx], rdi
mov byte ptr [rbx+8], 0
mov rdi, rbx
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [rbx+8], 1
cmp qword ptr [r14+58h], 0
jz short loc_72110
mov rax, [r14+60h]
jmp short loc_72114
loc_72110:
lea rax, [r14+58h]
loc_72114:
mov [rax], r15
mov [r14+60h], r15
mov qword ptr [r15], 0
add r14, 28h ; '('
mov rdi, r14; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
mov rdi, rbx
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long unifex::_manual_event_loop::context::enqueue(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rax
_QWORD *v4; // [rsp+0h] [rbp-28h] BYREF
char v5; // [rsp+8h] [rbp-20h]
v4 = a1;
v5 = 0;
std::unique_lock<std::mutex>::lock(&v4);
v5 = 1;
if ( a1[11] )
v2 = (_QWORD *)a1[12];
else
v2 = a1 + 11;
*v2 = a2;
a1[12] = a2;
*a2 = 0LL;
std::condition_variable::notify_one((std::condition_variable *)(a1 + 5));
return std::unique_lock<std::mutex>::~unique_lock(&v4);
}
|
enqueue:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,RSI
MOV R14,RDI
MOV RBX,RSP
MOV qword ptr [RBX],RDI
MOV byte ptr [RBX + 0x8],0x0
MOV RDI,RBX
CALL 0x00172168
MOV byte ptr [RBX + 0x8],0x1
CMP qword ptr [R14 + 0x58],0x0
JZ 0x00172110
MOV RAX,qword ptr [R14 + 0x60]
JMP 0x00172114
LAB_00172110:
LEA RAX,[R14 + 0x58]
LAB_00172114:
MOV qword ptr [RAX],R15
MOV qword ptr [R14 + 0x60],R15
MOV qword ptr [R15],0x0
ADD R14,0x28
MOV RDI,R14
CALL 0x0012c820
MOV RDI,RBX
CALL 0x001721a4
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* unifex::_manual_event_loop::context::enqueue(unifex::_manual_event_loop::task_base*) */
void __thiscall unifex::_manual_event_loop::context::enqueue(context *this,task_base *param_1)
{
context *pcVar1;
context *local_28;
int1 local_20;
local_20 = 0;
local_28 = this;
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_28);
local_20 = 1;
if (*(long *)(this + 0x58) == 0) {
pcVar1 = this + 0x58;
}
else {
pcVar1 = *(context **)(this + 0x60);
}
*(task_base **)pcVar1 = param_1;
*(task_base **)(this + 0x60) = param_1;
*(int8 *)param_1 = 0;
std::condition_variable::notify_one();
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_28);
return;
}
|
|
17,569
|
js_reflect_setPrototypeOf
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_reflect_setPrototypeOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int ret;
ret = JS_SetPrototypeInternal(ctx, argv[0], argv[1], FALSE);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
}
|
O1
|
c
|
js_reflect_setPrototypeOf:
pushq %rax
movq (%r8), %rsi
movq 0x8(%r8), %rdx
movq 0x10(%r8), %rcx
movq 0x18(%r8), %r8
xorl %r9d, %r9d
callq 0x22731
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x1f, %eax
leaq (%rax,%rax,4), %rdx
incq %rdx
movq %rcx, %rax
popq %rcx
retq
|
js_reflect_setPrototypeOf:
push rax
mov rsi, [r8]
mov rdx, [r8+8]
mov rcx, [r8+10h]
mov r8, [r8+18h]
xor r9d, r9d
call JS_SetPrototypeInternal
xor ecx, ecx
test eax, eax
setnle cl
shr eax, 1Fh
lea rdx, [rax+rax*4]
inc rdx
mov rax, rcx
pop rcx
retn
|
_BOOL8 js_reflect_setPrototypeOf(
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)
{
return (int)JS_SetPrototypeInternal(
a1,
*(_QWORD *)a13,
*(_QWORD *)(a13 + 8),
*(_DWORD **)(a13 + 16),
*(_QWORD *)(a13 + 24),
0LL,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9) > 0;
}
|
js_reflect_setPrototypeOf:
PUSH RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
MOV RCX,qword ptr [R8 + 0x10]
MOV R8,qword ptr [R8 + 0x18]
XOR R9D,R9D
CALL 0x00122731
XOR ECX,ECX
TEST EAX,EAX
SETG CL
SHR EAX,0x1f
LEA RDX,[RAX + RAX*0x4]
INC RDX
MOV RAX,RCX
POP RCX
RET
|
bool js_reflect_setPrototypeOf(int8 param_1)
{
int iVar1;
int8 *in_R8;
iVar1 = JS_SetPrototypeInternal(param_1,*in_R8,in_R8[1],in_R8[2],in_R8[3],0);
return 0 < iVar1;
}
|
|
17,570
|
ma_pack_get_block_info
|
eloqsql/storage/maria/ma_packrec.c
|
uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff,
MARIA_BLOCK_INFO *info,
uchar **rec_buff_p, size_t *rec_buff_size_p,
File file, my_off_t filepos)
{
uchar *header= info->header;
uint head_length,UNINIT_VAR(ref_length);
MARIA_SHARE *share= maria->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
if (file >= 0)
{
ref_length=share->pack.ref_length;
/*
We can't use my_pread() here because _ma_read_rnd_pack_record assumes
position is ok
*/
mysql_file_seek(file,filepos,MY_SEEK_SET,MYF(0));
if (mysql_file_read(file, header,ref_length,MYF(MY_NABP)))
return BLOCK_FATAL_ERROR;
DBUG_DUMP("header", header, ref_length);
}
head_length= read_pack_length((uint) share->pack.version, header,
&info->rec_len);
if (share->base.blobs)
{
head_length+= read_pack_length((uint) share->pack.version,
header + head_length, &info->blob_len);
/*
Ensure that the record buffer is big enough for the compressed
record plus all expanded blobs. [We do not have an extra buffer
for the resulting blobs. Sigh.]
*/
if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p,
info->rec_len + info->blob_len +
share->base.extra_rec_buff_size, flag))
return BLOCK_FATAL_ERROR; /* not enough memory */
bit_buff->blob_pos= *rec_buff_p + info->rec_len;
bit_buff->blob_end= bit_buff->blob_pos + info->blob_len;
maria->blob_length=info->blob_len;
}
info->filepos=filepos+head_length;
if (file >= 0)
{
info->offset=MY_MIN(info->rec_len, ref_length - head_length);
memcpy(*rec_buff_p, header + head_length, info->offset);
}
return 0;
}
|
O3
|
c
|
ma_pack_get_block_info:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %r15d
movq %rcx, -0x40(%rbp)
movq %rdx, %rbx
movq %rsi, -0x50(%rbp)
movq %rdi, -0x58(%rbp)
movq (%rdi), %r12
xorl %ecx, %ecx
cmpb $0x0, 0x7d9(%r12)
setne %sil
testl %r9d, %r9d
js 0x64e28
movb %sil, -0x29(%rbp)
movq %r8, -0x38(%rbp)
movl 0x598(%r12), %r13d
leaq 0x349c7a(%rip), %r14 # 0x3aea18
movq (%r14), %rax
leaq -0xa0(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x64f9a
movl %r15d, %edi
movq 0x10(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc056c
movq (%r14), %rax
leaq -0xa0(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
movq %r13, -0x48(%rbp)
jne 0x64fae
movl $0x4, %ecx
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xbff8c
movq %rax, %r13
movl $0x20, %r14d
testq %r13, %r13
movq -0x38(%rbp), %r8
movl $0x0, %ecx
movb -0x29(%rbp), %sil
jne 0x64f88
jmp 0x64e2c
movq %rax, -0x48(%rbp)
movzbl (%rbx), %eax
cmpq $0xfd, %rax
ja 0x64e3f
movl $0x1, %r13d
jmp 0x64e7c
cmpl $0xfe, %eax
jne 0x64e52
movzwl 0x1(%rbx), %eax
movl $0x3, %r13d
jmp 0x64e7c
cmpb $0x1, 0x59c(%r12)
jne 0x64e73
movzwl 0x1(%rbx), %edx
movzbl 0x3(%rbx), %eax
shll $0x10, %eax
orq %rdx, %rax
movl $0x4, %r13d
jmp 0x64e7c
movl 0x1(%rbx), %eax
movl $0x5, %r13d
movq %rax, 0x18(%rbx)
cmpl $0x0, 0x3f0(%r12)
je 0x64f4d
movb %sil, %cl
shll $0x10, %ecx
orq $0x10, %rcx
movl %r13d, %edx
movzbl (%rbx,%rdx), %edi
cmpq $0xfd, %rdi
ja 0x64eb2
movl $0x1, -0x38(%rbp)
jmp 0x64ef7
cmpl $0xfe, %edi
jne 0x64ec8
movzwl 0x1(%rbx,%rdx), %edi
movl $0x3, -0x38(%rbp)
jmp 0x64ef7
cmpb $0x1, 0x59c(%r12)
jne 0x64eec
movzwl 0x1(%rbx,%rdx), %esi
movzbl 0x3(%rbx,%rdx), %edi
shll $0x10, %edi
orq %rsi, %rdi
movl $0x4, -0x38(%rbp)
jmp 0x64ef7
movl 0x1(%rbx,%rdx), %edi
movl $0x5, -0x38(%rbp)
movq %rdi, 0x30(%rbx)
addq %rdi, %rax
movl 0x424(%r12), %edx
addq %rax, %rdx
movq -0x40(%rbp), %rdi
movq %r8, %rsi
callq 0x5a583
movl $0x20, %r14d
testb %al, %al
jne 0x64f88
movq -0x40(%rbp), %rax
movq (%rax), %rax
addq 0x18(%rbx), %rax
movq -0x50(%rbp), %rcx
movq %rax, 0x18(%rcx)
addq 0x30(%rbx), %rax
addl -0x38(%rbp), %r13d
movq %rax, 0x20(%rcx)
movq 0x30(%rbx), %rax
movq -0x58(%rbp), %rcx
movq %rax, 0x458(%rcx)
movl %r13d, %eax
movq 0x10(%rbp), %rcx
addq %rax, %rcx
xorl %r14d, %r14d
movq %rcx, 0x38(%rbx)
testl %r15d, %r15d
js 0x64f88
movq 0x18(%rbx), %rdx
movq -0x48(%rbp), %rcx
subl %eax, %ecx
cmpq %rcx, %rdx
cmovael %ecx, %edx
movl %edx, 0x54(%rbx)
movq -0x40(%rbp), %rcx
movq (%rcx), %rdi
addq %rax, %rbx
movq %rbx, %rsi
callq 0x2a0b0
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
movl %r15d, %esi
movq 0x10(%rbp), %rdx
callq 0x2e462
jmp 0x64dcf
movq %r14, %rcx
movq %rax, %r14
movq (%rcx), %rax
leaq 0x96a65(%rip), %rdx # 0xfba23
movq %r14, %rdi
movq %r13, %rsi
movl $0x596, %ecx # imm = 0x596
callq *0x210(%rax)
movl $0x4, %ecx
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xbff8c
movq %r13, %rcx
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
cmoveq %rcx, %rsi
leaq 0x349a20(%rip), %rax # 0x3aea18
movq (%rax), %rax
movq %r14, %rdi
callq *0x218(%rax)
jmp 0x64e0a
|
_ma_pack_get_block_info:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15d, r9d
mov [rbp+var_40], rcx
mov rbx, rdx
mov [rbp+var_50], rsi
mov [rbp+var_58], rdi
mov r12, [rdi]
xor ecx, ecx
cmp byte ptr [r12+7D9h], 0
setnz sil
test r9d, r9d
js loc_64E28
mov [rbp+var_29], sil
mov [rbp+var_38], r8
mov r13d, [r12+598h]
lea r14, PSI_server
mov rax, [r14]
lea rdi, [rbp+var_A0]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_64F9A
mov edi, r15d
mov rsi, [rbp+arg_0]
xor edx, edx
xor ecx, ecx
call my_seek
loc_64DCF:
mov rax, [r14]
lea rdi, [rbp+var_A0]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
mov [rbp+var_48], r13
jnz loc_64FAE
mov ecx, 4
mov edi, r15d
mov rsi, rbx
mov rdx, r13
call my_read
mov r13, rax
loc_64E0A:
mov r14d, 20h ; ' '
test r13, r13
mov r8, [rbp+var_38]
mov ecx, 0
mov sil, [rbp+var_29]
jnz loc_64F88
jmp short loc_64E2C
loc_64E28:
mov [rbp+var_48], rax
loc_64E2C:
movzx eax, byte ptr [rbx]
cmp rax, 0FDh
ja short loc_64E3F
mov r13d, 1
jmp short loc_64E7C
loc_64E3F:
cmp eax, 0FEh
jnz short loc_64E52
movzx eax, word ptr [rbx+1]
mov r13d, 3
jmp short loc_64E7C
loc_64E52:
cmp byte ptr [r12+59Ch], 1
jnz short loc_64E73
movzx edx, word ptr [rbx+1]
movzx eax, byte ptr [rbx+3]
shl eax, 10h
or rax, rdx
mov r13d, 4
jmp short loc_64E7C
loc_64E73:
mov eax, [rbx+1]
mov r13d, 5
loc_64E7C:
mov [rbx+18h], rax
cmp dword ptr [r12+3F0h], 0
jz loc_64F4D
mov cl, sil
shl ecx, 10h
or rcx, 10h
mov edx, r13d
movzx edi, byte ptr [rbx+rdx]
cmp rdi, 0FDh
ja short loc_64EB2
mov dword ptr [rbp+var_38], 1
jmp short loc_64EF7
loc_64EB2:
cmp edi, 0FEh
jnz short loc_64EC8
movzx edi, word ptr [rbx+rdx+1]
mov dword ptr [rbp+var_38], 3
jmp short loc_64EF7
loc_64EC8:
cmp byte ptr [r12+59Ch], 1
jnz short loc_64EEC
movzx esi, word ptr [rbx+rdx+1]
movzx edi, byte ptr [rbx+rdx+3]
shl edi, 10h
or rdi, rsi
mov dword ptr [rbp+var_38], 4
jmp short loc_64EF7
loc_64EEC:
mov edi, [rbx+rdx+1]
mov dword ptr [rbp+var_38], 5
loc_64EF7:
mov [rbx+30h], rdi
add rax, rdi
mov edx, [r12+424h]
add rdx, rax
mov rdi, [rbp+var_40]
mov rsi, r8
call _ma_alloc_buffer
mov r14d, 20h ; ' '
test al, al
jnz short loc_64F88
mov rax, [rbp+var_40]
mov rax, [rax]
add rax, [rbx+18h]
mov rcx, [rbp+var_50]
mov [rcx+18h], rax
add rax, [rbx+30h]
add r13d, dword ptr [rbp+var_38]
mov [rcx+20h], rax
mov rax, [rbx+30h]
mov rcx, [rbp+var_58]
mov [rcx+458h], rax
loc_64F4D:
mov eax, r13d
mov rcx, [rbp+arg_0]
add rcx, rax
xor r14d, r14d
mov [rbx+38h], rcx
test r15d, r15d
js short loc_64F88
mov rdx, [rbx+18h]
mov rcx, [rbp+var_48]
sub ecx, eax
cmp rdx, rcx
cmovnb edx, ecx
mov [rbx+54h], edx
mov rcx, [rbp+var_40]
mov rdi, [rcx]
add rbx, rax
mov rsi, rbx
call _memcpy
loc_64F88:
mov eax, r14d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_64F9A:
mov rdi, rax
mov esi, r15d
mov rdx, [rbp+arg_0]
call _ma_pack_get_block_info_cold_1
jmp loc_64DCF
loc_64FAE:
mov rcx, r14
mov r14, rax
mov rax, [rcx]
lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov rsi, r13
mov ecx, 596h
call qword ptr [rax+210h]
mov ecx, 4
mov edi, r15d
mov rsi, rbx
mov rdx, r13
call my_read
mov rcx, r13
mov r13, rax
xor esi, esi
test rax, rax
cmovz rsi, rcx
lea rax, PSI_server
mov rax, [rax]
mov rdi, r14
call qword ptr [rax+218h]
jmp loc_64E0A
|
long long ma_pack_get_block_info(
long long *a1,
long long a2,
unsigned __int8 *a3,
long long *a4,
unsigned long long *a5,
unsigned int a6,
long long a7)
{
long long v7; // rax
long long v10; // r12
int v11; // ecx
bool v12; // si
long long v13; // r13
long long v14; // rax
long long v15; // rax
long long v16; // r13
unsigned int v17; // r14d
unsigned long long v18; // rax
unsigned int v19; // r13d
long long v20; // rcx
unsigned long long v21; // rdi
long long v22; // rax
long long v23; // rcx
unsigned long long v24; // rdx
unsigned long long v25; // rcx
long long v27; // r14
long long v28; // rax
long long v29; // rcx
long long v30; // rsi
_BYTE v31[72]; // [rsp+0h] [rbp-A0h] BYREF
long long *v32; // [rsp+48h] [rbp-58h]
long long v33; // [rsp+50h] [rbp-50h]
long long v34; // [rsp+58h] [rbp-48h]
long long *v35; // [rsp+60h] [rbp-40h]
unsigned long long *v36; // [rsp+68h] [rbp-38h]
bool v37; // [rsp+77h] [rbp-29h]
v35 = a4;
v33 = a2;
v32 = a1;
v10 = *a1;
v11 = 0;
v12 = *(_BYTE *)(*a1 + 2009) != 0;
if ( (a6 & 0x80000000) != 0 )
{
v34 = v7;
}
else
{
v37 = *(_BYTE *)(*a1 + 2009) != 0;
v36 = a5;
v13 = *(unsigned int *)(v10 + 1432);
v14 = ((long long ( *)(_BYTE *, _QWORD, long long, _QWORD))PSI_server[43])(v31, a6, 8LL, 0LL);
if ( v14 )
ma_pack_get_block_info_cold_1(v14, a6, a7);
else
my_seek(a6, a7, 0LL, 0LL);
v15 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, a6, 6LL);
v34 = v13;
if ( v15 )
{
v27 = v15;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v15,
v13,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",
1430LL);
v28 = my_read(a6, a3, v13, 4LL);
v29 = v13;
v16 = v28;
v30 = 0LL;
if ( !v28 )
v30 = v29;
((void ( *)(long long, long long))PSI_server[67])(v27, v30);
}
else
{
v16 = my_read(a6, a3, v13, 4LL);
}
v17 = 32;
a5 = v36;
v11 = 0;
v12 = v37;
if ( v16 )
return v17;
}
v18 = *a3;
if ( v18 > 0xFD )
{
if ( (_DWORD)v18 == 254 )
{
v18 = *(unsigned __int16 *)(a3 + 1);
v19 = 3;
}
else if ( *(_BYTE *)(v10 + 1436) == 1 )
{
v18 = *(unsigned __int16 *)(a3 + 1) | (unsigned long long)(a3[3] << 16);
v19 = 4;
}
else
{
v18 = *(unsigned int *)(a3 + 1);
v19 = 5;
}
}
else
{
v19 = 1;
}
*((_QWORD *)a3 + 3) = v18;
if ( *(_DWORD *)(v10 + 1008) )
{
LOBYTE(v11) = v12;
v20 = (unsigned int)(v11 << 16) | 0x10LL;
v21 = a3[v19];
if ( v21 > 0xFD )
{
if ( (_DWORD)v21 == 254 )
{
v21 = *(unsigned __int16 *)&a3[v19 + 1];
LODWORD(v36) = 3;
}
else if ( *(_BYTE *)(v10 + 1436) == 1 )
{
v21 = *(unsigned __int16 *)&a3[v19 + 1] | (unsigned long long)(a3[v19 + 3] << 16);
LODWORD(v36) = 4;
}
else
{
v21 = *(unsigned int *)&a3[v19 + 1];
LODWORD(v36) = 5;
}
}
else
{
LODWORD(v36) = 1;
}
*((_QWORD *)a3 + 6) = v21;
v17 = 32;
if ( (unsigned __int8)ma_alloc_buffer(v35, a5, v21 + v18 + *(unsigned int *)(v10 + 1060), v20) )
return v17;
v22 = *((_QWORD *)a3 + 3) + *v35;
v23 = v33;
*(_QWORD *)(v33 + 24) = v22;
v19 += (unsigned int)v36;
*(_QWORD *)(v23 + 32) = *((_QWORD *)a3 + 6) + v22;
v32[139] = *((_QWORD *)a3 + 6);
}
v17 = 0;
*((_QWORD *)a3 + 7) = v19 + a7;
if ( (a6 & 0x80000000) == 0 )
{
v24 = *((_QWORD *)a3 + 3);
v25 = (unsigned int)v34 - v19;
if ( v24 >= v25 )
v24 = (unsigned int)v25;
*((_DWORD *)a3 + 21) = v24;
memcpy(*v35, &a3[v19], v24);
}
return v17;
}
|
_ma_pack_get_block_info:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15D,R9D
MOV qword ptr [RBP + -0x40],RCX
MOV RBX,RDX
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x58],RDI
MOV R12,qword ptr [RDI]
XOR ECX,ECX
CMP byte ptr [R12 + 0x7d9],0x0
SETNZ SIL
TEST R9D,R9D
JS 0x00164e28
MOV byte ptr [RBP + -0x29],SIL
MOV qword ptr [RBP + -0x38],R8
MOV R13D,dword ptr [R12 + 0x598]
LEA R14,[0x4aea18]
MOV RAX,qword ptr [R14]
LEA RDI,[RBP + -0xa0]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00164f9a
MOV EDI,R15D
MOV RSI,qword ptr [RBP + 0x10]
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001c056c
LAB_00164dcf:
MOV RAX,qword ptr [R14]
LEA RDI,[RBP + -0xa0]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
MOV qword ptr [RBP + -0x48],R13
JNZ 0x00164fae
MOV ECX,0x4
MOV EDI,R15D
MOV RSI,RBX
MOV RDX,R13
CALL 0x001bff8c
MOV R13,RAX
LAB_00164e0a:
MOV R14D,0x20
TEST R13,R13
MOV R8,qword ptr [RBP + -0x38]
MOV ECX,0x0
MOV SIL,byte ptr [RBP + -0x29]
JNZ 0x00164f88
JMP 0x00164e2c
LAB_00164e28:
MOV qword ptr [RBP + -0x48],RAX
LAB_00164e2c:
MOVZX EAX,byte ptr [RBX]
CMP RAX,0xfd
JA 0x00164e3f
MOV R13D,0x1
JMP 0x00164e7c
LAB_00164e3f:
CMP EAX,0xfe
JNZ 0x00164e52
MOVZX EAX,word ptr [RBX + 0x1]
MOV R13D,0x3
JMP 0x00164e7c
LAB_00164e52:
CMP byte ptr [R12 + 0x59c],0x1
JNZ 0x00164e73
MOVZX EDX,word ptr [RBX + 0x1]
MOVZX EAX,byte ptr [RBX + 0x3]
SHL EAX,0x10
OR RAX,RDX
MOV R13D,0x4
JMP 0x00164e7c
LAB_00164e73:
MOV EAX,dword ptr [RBX + 0x1]
MOV R13D,0x5
LAB_00164e7c:
MOV qword ptr [RBX + 0x18],RAX
CMP dword ptr [R12 + 0x3f0],0x0
JZ 0x00164f4d
MOV CL,SIL
SHL ECX,0x10
OR RCX,0x10
MOV EDX,R13D
MOVZX EDI,byte ptr [RBX + RDX*0x1]
CMP RDI,0xfd
JA 0x00164eb2
MOV dword ptr [RBP + -0x38],0x1
JMP 0x00164ef7
LAB_00164eb2:
CMP EDI,0xfe
JNZ 0x00164ec8
MOVZX EDI,word ptr [RBX + RDX*0x1 + 0x1]
MOV dword ptr [RBP + -0x38],0x3
JMP 0x00164ef7
LAB_00164ec8:
CMP byte ptr [R12 + 0x59c],0x1
JNZ 0x00164eec
MOVZX ESI,word ptr [RBX + RDX*0x1 + 0x1]
MOVZX EDI,byte ptr [RBX + RDX*0x1 + 0x3]
SHL EDI,0x10
OR RDI,RSI
MOV dword ptr [RBP + -0x38],0x4
JMP 0x00164ef7
LAB_00164eec:
MOV EDI,dword ptr [RBX + RDX*0x1 + 0x1]
MOV dword ptr [RBP + -0x38],0x5
LAB_00164ef7:
MOV qword ptr [RBX + 0x30],RDI
ADD RAX,RDI
MOV EDX,dword ptr [R12 + 0x424]
ADD RDX,RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R8
CALL 0x0015a583
MOV R14D,0x20
TEST AL,AL
JNZ 0x00164f88
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
ADD RAX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RCX + 0x18],RAX
ADD RAX,qword ptr [RBX + 0x30]
ADD R13D,dword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x20],RAX
MOV RAX,qword ptr [RBX + 0x30]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RCX + 0x458],RAX
LAB_00164f4d:
MOV EAX,R13D
MOV RCX,qword ptr [RBP + 0x10]
ADD RCX,RAX
XOR R14D,R14D
MOV qword ptr [RBX + 0x38],RCX
TEST R15D,R15D
JS 0x00164f88
MOV RDX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RBP + -0x48]
SUB ECX,EAX
CMP RDX,RCX
CMOVNC EDX,ECX
MOV dword ptr [RBX + 0x54],EDX
MOV RCX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RCX]
ADD RBX,RAX
MOV RSI,RBX
CALL 0x0012a0b0
LAB_00164f88:
MOV EAX,R14D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00164f9a:
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,qword ptr [RBP + 0x10]
CALL 0x0012e462
JMP 0x00164dcf
LAB_00164fae:
MOV RCX,R14
MOV R14,RAX
MOV RAX,qword ptr [RCX]
LEA RDX,[0x1fba23]
MOV RDI,R14
MOV RSI,R13
MOV ECX,0x596
CALL qword ptr [RAX + 0x210]
MOV ECX,0x4
MOV EDI,R15D
MOV RSI,RBX
MOV RDX,R13
CALL 0x001bff8c
MOV RCX,R13
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVZ RSI,RCX
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
MOV RDI,R14
CALL qword ptr [RAX + 0x218]
JMP 0x00164e0a
|
int8
_ma_pack_get_block_info
(long *param_1,long param_2,byte *param_3,long *param_4,int8 param_5,int param_6,
long param_7)
{
long lVar1;
char cVar2;
ulong in_RAX;
long lVar3;
long lVar4;
ulong uVar5;
uint uVar6;
size_t __n;
ulong uVar7;
ulong uVar8;
byte bVar9;
int1 local_a8 [72];
long *local_60;
long local_58;
ulong local_50;
long *local_48;
int8 local_40;
byte local_31;
lVar1 = *param_1;
bVar9 = *(char *)(lVar1 + 0x7d9) != '\0';
local_60 = param_1;
local_58 = param_2;
local_50 = in_RAX;
local_48 = param_4;
if (-1 < param_6) {
uVar5 = (ulong)*(uint *)(lVar1 + 0x598);
local_40 = param_5;
local_31 = bVar9;
lVar3 = (**(code **)(PSI_server + 0x158))(local_a8,param_6,8,0);
if (lVar3 == 0) {
my_seek(param_6,param_7,0,0);
}
else {
_ma_pack_get_block_info_cold_1(lVar3,param_6,param_7);
}
lVar3 = (**(code **)(PSI_server + 0x158))(local_a8,param_6,6);
local_50 = uVar5;
if (lVar3 == 0) {
lVar4 = my_read(param_6,param_3,uVar5,4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,uVar5,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",
0x596);
lVar4 = my_read(param_6,param_3,uVar5,4);
uVar8 = 0;
if (lVar4 == 0) {
uVar8 = uVar5;
}
(**(code **)(PSI_server + 0x218))(lVar3,uVar8);
}
param_5 = local_40;
bVar9 = local_31;
if (lVar4 != 0) {
return 0x20;
}
}
uVar5 = (ulong)*param_3;
if (uVar5 < 0xfe) {
uVar8 = 1;
}
else if (*param_3 == 0xfe) {
uVar5 = (ulong)*(ushort *)(param_3 + 1);
uVar8 = 3;
}
else if (*(char *)(lVar1 + 0x59c) == '\x01') {
uVar5 = (ulong)*(uint3 *)(param_3 + 1);
uVar8 = 4;
}
else {
uVar5 = (ulong)*(uint *)(param_3 + 1);
uVar8 = 5;
}
*(ulong *)(param_3 + 0x18) = uVar5;
if (*(int *)(lVar1 + 0x3f0) != 0) {
uVar7 = (ulong)param_3[uVar8];
if (uVar7 < 0xfe) {
local_40 = CONCAT44(local_40._4_4_,1);
}
else if (param_3[uVar8] == 0xfe) {
uVar7 = (ulong)*(ushort *)(param_3 + uVar8 + 1);
local_40 = CONCAT44(local_40._4_4_,3);
}
else if (*(char *)(lVar1 + 0x59c) == '\x01') {
uVar7 = (ulong)CONCAT12(param_3[uVar8 + 3],*(int2 *)(param_3 + uVar8 + 1));
local_40 = CONCAT44(local_40._4_4_,4);
}
else {
uVar7 = (ulong)*(uint *)(param_3 + uVar8 + 1);
local_40 = CONCAT44(local_40._4_4_,5);
}
*(ulong *)(param_3 + 0x30) = uVar7;
cVar2 = _ma_alloc_buffer(local_48,param_5,(ulong)*(uint *)(lVar1 + 0x424) + uVar5 + uVar7,
(ulong)bVar9 << 0x10 | 0x10);
if (cVar2 != '\0') {
return 0x20;
}
lVar1 = *local_48;
lVar3 = *(long *)(param_3 + 0x18);
*(long *)(local_58 + 0x18) = lVar1 + lVar3;
uVar8 = (ulong)(uint)((int)uVar8 + (int)local_40);
*(long *)(local_58 + 0x20) = lVar1 + lVar3 + *(long *)(param_3 + 0x30);
local_60[0x8b] = *(long *)(param_3 + 0x30);
}
*(ulong *)(param_3 + 0x38) = param_7 + uVar8;
if (-1 < param_6) {
uVar6 = (int)local_50 - (int)uVar8;
__n = *(ulong *)(param_3 + 0x18) & 0xffffffff;
if ((ulong)uVar6 <= *(ulong *)(param_3 + 0x18)) {
__n = (size_t)uVar6;
}
*(int *)(param_3 + 0x54) = (int)__n;
memcpy((void *)*local_48,param_3 + uVar8,__n);
}
return 0;
}
|
|
17,571
|
ma_bitmap_reset_cache
|
eloqsql/storage/maria/ma_bitmap.c
|
void _ma_bitmap_reset_cache(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
if (bitmap->map) /* If using bitmap */
{
/* Forget changes in current bitmap page */
bitmap->changed= 0;
/*
We can't read a page yet, as in some case we don't have an active
page cache yet.
Pretend we have a dummy, full and not changed bitmap page in memory.
We set bitmap->page to a value so that if we use it in
move_to_next_bitmap() it will point to page 0.
(This can only happen if writing to a bitmap page fails)
*/
bitmap->page= ((pgcache_page_no_t) 0) - bitmap->pages_covered;
bitmap->used_size= bitmap->total_size= bitmap->max_total_size;
bitmap->full_head_size= bitmap->full_tail_size= bitmap->max_total_size;
bfill(bitmap->map, share->block_size, 255);
#ifndef DBUG_OFF
memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size);
#endif
/* Start scanning for free space from start of file */
share->state.first_bitmap_with_space = 0;
}
}
|
O3
|
c
|
ma_bitmap_reset_cache:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa18(%rdi), %rdi
testq %rdi, %rdi
je 0x526b4
movb $0x0, 0xa30(%rbx)
xorl %eax, %eax
subq 0xb48(%rbx), %rax
movq %rax, 0xa20(%rbx)
movl 0xb3c(%rbx), %eax
movl %eax, 0xb38(%rbx)
movl %eax, 0xa34(%rbx)
movl %eax, 0xa3c(%rbx)
movl %eax, 0xa38(%rbx)
movl 0x7bc(%rbx), %edx
movl $0xff, %esi
callq 0x292a0
movq $0x0, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
_ma_bitmap_reset_cache:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+0A18h]
test rdi, rdi
jz short loc_526B4
mov byte ptr [rbx+0A30h], 0
xor eax, eax
sub rax, [rbx+0B48h]
mov [rbx+0A20h], rax
mov eax, [rbx+0B3Ch]
mov [rbx+0B38h], eax
mov [rbx+0A34h], eax
mov [rbx+0A3Ch], eax
mov [rbx+0A38h], eax
mov edx, [rbx+7BCh]
mov esi, 0FFh
call _memset
mov qword ptr [rbx+0D0h], 0
loc_526B4:
add rsp, 8
pop rbx
pop rbp
retn
|
long long ma_bitmap_reset_cache(long long a1)
{
long long v2; // rdi
int v3; // eax
long long result; // rax
v2 = *(_QWORD *)(a1 + 2584);
if ( v2 )
{
*(_BYTE *)(a1 + 2608) = 0;
*(_QWORD *)(a1 + 2592) = -*(_QWORD *)(a1 + 2888);
v3 = *(_DWORD *)(a1 + 2876);
*(_DWORD *)(a1 + 2872) = v3;
*(_DWORD *)(a1 + 2612) = v3;
*(_DWORD *)(a1 + 2620) = v3;
*(_DWORD *)(a1 + 2616) = v3;
result = memset(v2, 255LL, *(unsigned int *)(a1 + 1980));
*(_QWORD *)(a1 + 208) = 0LL;
}
return result;
}
|
_ma_bitmap_reset_cache:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xa18]
TEST RDI,RDI
JZ 0x001526b4
MOV byte ptr [RBX + 0xa30],0x0
XOR EAX,EAX
SUB RAX,qword ptr [RBX + 0xb48]
MOV qword ptr [RBX + 0xa20],RAX
MOV EAX,dword ptr [RBX + 0xb3c]
MOV dword ptr [RBX + 0xb38],EAX
MOV dword ptr [RBX + 0xa34],EAX
MOV dword ptr [RBX + 0xa3c],EAX
MOV dword ptr [RBX + 0xa38],EAX
MOV EDX,dword ptr [RBX + 0x7bc]
MOV ESI,0xff
CALL 0x001292a0
MOV qword ptr [RBX + 0xd0],0x0
LAB_001526b4:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void _ma_bitmap_reset_cache(long param_1)
{
int4 uVar1;
if (*(void **)(param_1 + 0xa18) != (void *)0x0) {
*(int1 *)(param_1 + 0xa30) = 0;
*(long *)(param_1 + 0xa20) = -*(long *)(param_1 + 0xb48);
uVar1 = *(int4 *)(param_1 + 0xb3c);
*(int4 *)(param_1 + 0xb38) = uVar1;
*(int4 *)(param_1 + 0xa34) = uVar1;
*(int4 *)(param_1 + 0xa3c) = uVar1;
*(int4 *)(param_1 + 0xa38) = uVar1;
memset(*(void **)(param_1 + 0xa18),0xff,(ulong)*(uint *)(param_1 + 0x7bc));
*(int8 *)(param_1 + 0xd0) = 0;
}
return;
}
|
|
17,572
|
my_mutex_end
|
eloqsql/mysys/thr_mutex.c
|
void my_mutex_end()
{
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
#endif
}
|
O0
|
c
|
my_mutex_end:
pushq %rbp
movq %rsp, %rbp
leaq 0xb8a835(%rip), %rdi # 0xc8a7d0
callq 0x2a1f0
leaq 0xb8a82d(%rip), %rdi # 0xc8a7d4
callq 0x2a1f0
popq %rbp
retq
nop
|
my_mutex_end:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_destroy
lea rdi, my_errorcheck_mutexattr
call _pthread_mutexattr_destroy
pop rbp
retn
|
long long my_mutex_end()
{
pthread_mutexattr_destroy(&my_fast_mutexattr);
return pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
}
|
my_mutex_end:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0xd8a7d0]
CALL 0x0012a1f0
LEA RDI,[0xd8a7d4]
CALL 0x0012a1f0
POP RBP
RET
|
void my_mutex_end(void)
{
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
return;
}
|
|
17,573
|
js_os_chdir
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_chdir(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *target;
int err;
target = JS_ToCString(ctx, argv[0]);
if (!target)
return JS_EXCEPTION;
err = js_get_errno(chdir(target));
JS_FreeCString(ctx, target);
return JS_NewInt32(ctx, err);
}
|
O1
|
c
|
js_os_chdir:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r15d, %r15d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x18a1e
movq %rax, %r14
movq %rax, %rdi
callq 0xe250
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x18a0c
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x202c9
movl %ebp, %r15d
xorl %edx, %edx
jmp 0x18a23
movl $0x6, %edx
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
js_os_chdir:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r15d, r15d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_18A1E
mov r14, rax
mov rdi, rax
call _chdir
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_18A0C
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_18A0C:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r15d, ebp
xor edx, edx
jmp short loc_18A23
loc_18A1E:
mov edx, 6
loc_18A23:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long js_os_chdir(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long v9; // rdi
unsigned int v10; // ebp
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v7 )
{
v8 = v7;
v9 = v7;
v10 = chdir(v7);
if ( v10 == -1 )
v10 = -*(_DWORD *)__errno_location(v9);
JS_FreeCString(a1, v8);
return v10;
}
return v6;
}
|
js_os_chdir:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR R15D,R15D
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x00118a1e
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e250
MOV EBP,EAX
CMP EAX,-0x1
JNZ 0x00118a0c
CALL 0x0010e0b0
XOR EBP,EBP
SUB EBP,dword ptr [RAX]
LAB_00118a0c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001202c9
MOV R15D,EBP
XOR EDX,EDX
JMP 0x00118a23
LAB_00118a1e:
MOV EDX,0x6
LAB_00118a23:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int js_os_chdir(int8 param_1)
{
int iVar1;
char *__path;
int *piVar2;
int8 *in_R8;
iVar1 = 0;
__path = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__path != (char *)0x0) {
iVar1 = chdir(__path);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
JS_FreeCString(param_1,__path);
}
return iVar1;
}
|
|
17,574
|
os_timer_set
|
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/os_posix.c
|
void
os_timer_set (p_timer_t *timer, uint32_t ticks)
{
os_timer_t *new_timer = (os_timer_t *)(*timer);
if (!new_timer) return;
os_timer_reset(timer); // Ensure the timer is not already in the list
new_timer->expire = get_current_time_ms() + ticks;
//new_timer->callback = fp;
//new_timer->callback_param = parm;
new_timer->is_set = true;
pthread_mutex_lock(&os_timer_manager.mutex);
// Insert the timer into the sorted linked list
os_timer_t **current = &os_timer_manager.head;
while (*current && (*current)->expire <= new_timer->expire) {
current = &(*current)->next;
}
new_timer->next = *current;
*current = new_timer;
pthread_cond_signal(&os_timer_manager.cond);
pthread_mutex_unlock(&os_timer_manager.mutex);
}
|
O3
|
c
|
os_timer_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %r15
testq %r15, %r15
je 0x15a7d
movl %esi, %ebx
callq 0x1591c
leaq -0x28(%rbp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x6140
imulq $0x3e8, (%r14), %rax # imm = 0x3E8
movq %rax, %xmm0
punpckldq 0x1c18b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1c193(%rip), %xmm0 # 0x31b60
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
cvtsi2sdq 0x8(%r14), %xmm2
divsd 0x1c18d(%rip), %xmm2 # 0x31b70
addsd %xmm0, %xmm1
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1c179(%rip), %xmm2 # 0x31b78
cvttsd2si %xmm2, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movl %ebx, %eax
addq %rdx, %rax
movq %rax, (%r15)
movl $0x1, 0x18(%r15)
leaq 0x2af47(%rip), %rdi # 0x40968
callq 0x65a0
leaq 0x2af33(%rip), %rax # 0x40960
movq 0x2af2c(%rip), %rcx # 0x40960
testq %rcx, %rcx
je 0x15a54
movq (%r15), %rdx
cmpq %rdx, (%rcx)
ja 0x15a5e
movq %rcx, %rax
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0x15a58
cmpq %rdx, (%rcx)
jbe 0x15a41
jmp 0x15a5a
xorl %ecx, %ecx
jmp 0x15a5e
xorl %ecx, %ecx
addq $0x20, %rax
movq %rcx, 0x20(%r15)
movq %r15, (%rax)
leaq 0x2af24(%rip), %rdi # 0x40990
callq 0x6310
leaq 0x2aef0(%rip), %rdi # 0x40968
callq 0x63a0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
os_timer_set:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov r15, [rdi]
test r15, r15
jz loc_15A7D
mov ebx, esi
call os_timer_reset
lea r14, [rbp+var_28]
xor edi, edi
mov rsi, r14
call _clock_gettime
imul rax, [r14], 3E8h
movq xmm0, rax
punpckldq xmm0, cs:xmmword_31B50
subpd xmm0, cs:xmmword_31B60
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
cvtsi2sd xmm2, qword ptr [r14+8]
divsd xmm2, cs:qword_31B70
addsd xmm1, xmm0
addsd xmm2, xmm1
cvttsd2si rax, xmm2
mov rcx, rax
sar rcx, 3Fh
subsd xmm2, cs:qword_31B78
cvttsd2si rdx, xmm2
and rdx, rcx
or rdx, rax
mov eax, ebx
add rax, rdx
mov [r15], rax
mov dword ptr [r15+18h], 1
lea rdi, unk_40968
call _pthread_mutex_lock
lea rax, os_timer_manager
mov rcx, cs:os_timer_manager
test rcx, rcx
jz short loc_15A54
mov rdx, [r15]
cmp [rcx], rdx
ja short loc_15A5E
loc_15A41:
mov rax, rcx
mov rcx, [rcx+20h]
test rcx, rcx
jz short loc_15A58
cmp [rcx], rdx
jbe short loc_15A41
jmp short loc_15A5A
loc_15A54:
xor ecx, ecx
jmp short loc_15A5E
loc_15A58:
xor ecx, ecx
loc_15A5A:
add rax, 20h ; ' '
loc_15A5E:
mov [r15+20h], rcx
mov [rax], r15
lea rdi, unk_40990
call _pthread_cond_signal
lea rdi, unk_40968
call _pthread_mutex_unlock
loc_15A7D:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
void os_timer_set(long long *a1, unsigned int a2)
{
long long v2; // r15
__m128d v3; // xmm0
long long *v4; // rax
_QWORD *v5; // rcx
_QWORD *v6; // rax
long long v7; // [rsp+8h] [rbp-28h] BYREF
int v8; // [rsp+10h] [rbp-20h]
v2 = *a1;
if ( *a1 )
{
os_timer_reset(a1);
clock_gettime(0LL, &v7);
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32((__m128i)(unsigned long long)(1000 * v7), (__m128i)xmmword_31B50),
(__m128d)xmmword_31B60);
*(_QWORD *)v2 = (unsigned int)(int)((double)v8 / *(double *)&qword_31B70
+ _mm_unpackhi_pd(v3, v3).m128d_f64[0]
+ v3.m128d_f64[0])
+ (unsigned long long)a2;
*(_DWORD *)(v2 + 24) = 1;
pthread_mutex_lock(&unk_40968);
v4 = &os_timer_manager;
v5 = (_QWORD *)os_timer_manager;
if ( os_timer_manager )
{
if ( *(_QWORD *)os_timer_manager <= *(_QWORD *)v2 )
{
while ( 1 )
{
v6 = v5;
v5 = (_QWORD *)v5[4];
if ( !v5 )
break;
if ( *v5 > *(_QWORD *)v2 )
goto LABEL_9;
}
v5 = 0LL;
LABEL_9:
v4 = v6 + 4;
}
}
else
{
v5 = 0LL;
}
*(_QWORD *)(v2 + 32) = v5;
*v4 = v2;
pthread_cond_signal(&unk_40990);
pthread_mutex_unlock(&unk_40968);
}
}
|
os_timer_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R15,qword ptr [RDI]
TEST R15,R15
JZ 0x00115a7d
MOV EBX,ESI
CALL 0x0011591c
LEA R14,[RBP + -0x28]
XOR EDI,EDI
MOV RSI,R14
CALL 0x00106140
IMUL RAX,qword ptr [R14],0x3e8
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x00131b50]
SUBPD XMM0,xmmword ptr [0x00131b60]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
CVTSI2SD XMM2,qword ptr [R14 + 0x8]
DIVSD XMM2,qword ptr [0x00131b70]
ADDSD XMM1,XMM0
ADDSD XMM2,XMM1
CVTTSD2SI RAX,XMM2
MOV RCX,RAX
SAR RCX,0x3f
SUBSD XMM2,qword ptr [0x00131b78]
CVTTSD2SI RDX,XMM2
AND RDX,RCX
OR RDX,RAX
MOV EAX,EBX
ADD RAX,RDX
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0x18],0x1
LEA RDI,[0x140968]
CALL 0x001065a0
LEA RAX,[0x140960]
MOV RCX,qword ptr [0x00140960]
TEST RCX,RCX
JZ 0x00115a54
MOV RDX,qword ptr [R15]
CMP qword ptr [RCX],RDX
JA 0x00115a5e
LAB_00115a41:
MOV RAX,RCX
MOV RCX,qword ptr [RCX + 0x20]
TEST RCX,RCX
JZ 0x00115a58
CMP qword ptr [RCX],RDX
JBE 0x00115a41
JMP 0x00115a5a
LAB_00115a54:
XOR ECX,ECX
JMP 0x00115a5e
LAB_00115a58:
XOR ECX,ECX
LAB_00115a5a:
ADD RAX,0x20
LAB_00115a5e:
MOV qword ptr [R15 + 0x20],RCX
MOV qword ptr [RAX],R15
LEA RDI,[0x140990]
CALL 0x00106310
LEA RDI,[0x140968]
CALL 0x001063a0
LAB_00115a7d:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void os_timer_set(long *param_1,ulong param_2)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong *puVar4;
ulong *puVar5;
int1 auVar6 [16];
double dVar7;
timespec local_30;
puVar1 = (ulong *)*param_1;
if (puVar1 != (ulong *)0x0) {
os_timer_reset();
clock_gettime(0,&local_30);
lVar2 = local_30.tv_sec * 1000;
auVar6._8_4_ = (int)((ulong)lVar2 >> 0x20);
auVar6._0_8_ = lVar2;
auVar6._12_4_ = uRam0000000000131b54;
dVar7 = (double)local_30.tv_nsec / _DAT_00131b70 +
(auVar6._8_8_ - dRam0000000000131b68) +
((double)CONCAT44(_DAT_00131b50,(int)lVar2) - _DAT_00131b60);
uVar3 = (ulong)dVar7;
*puVar1 = (param_2 & 0xffffffff) + ((long)(dVar7 - _DAT_00131b78) & (long)uVar3 >> 0x3f | uVar3)
;
*(int4 *)(puVar1 + 3) = 1;
pthread_mutex_lock((pthread_mutex_t *)&DAT_00140968);
puVar4 = (ulong *)&os_timer_manager;
if (os_timer_manager == (ulong *)0x0) {
puVar5 = (ulong *)0x0;
}
else {
puVar5 = os_timer_manager;
if (*os_timer_manager <= *puVar1) {
do {
puVar4 = puVar5;
puVar5 = (ulong *)puVar4[4];
if (puVar5 == (ulong *)0x0) {
puVar5 = (ulong *)0x0;
break;
}
} while (*puVar5 <= *puVar1);
puVar4 = puVar4 + 4;
}
}
puVar1[4] = (ulong)puVar5;
*puVar4 = (ulong)puVar1;
pthread_cond_signal((pthread_cond_t *)&DAT_00140990);
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00140968);
}
return;
}
|
|
17,575
|
delete_finrec_weakref
|
bluesky950520[P]quickjs/quickjs.c
|
static void delete_finrec_weakref(JSRuntime *rt, JSFinRecEntry *fre)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(fre->target);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY && wr->u.fin_rec_entry == fre)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
}
|
O1
|
c
|
delete_finrec_weakref:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x20(%rsi), %xmm0
movl 0x28(%rsi), %eax
movsd %xmm0, (%rsp)
cmpl $-0x8, %eax
je 0x83754
cmpl $-0x1, %eax
jne 0x837a8
movq (%rsp), %rax
addq $0x28, %rax
jmp 0x83765
movq (%rsp), %rax
addq $0x10, %rax
jmp 0x83765
addq $0x8, %r14
movq %r14, %rax
movq (%rax), %r14
cmpl $0x2, (%r14)
jne 0x8375e
cmpq %rsi, 0x10(%r14)
jne 0x8375e
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
callq 0xe090
|
delete_finrec_weakref:
push r14
push rbx
push rax
mov rbx, rdi
movsd xmm0, qword ptr [rsi+20h]
mov eax, [rsi+28h]
movsd [rsp+18h+var_18], xmm0
cmp eax, 0FFFFFFF8h
jz short loc_83754
cmp eax, 0FFFFFFFFh
jnz short loc_837A8
mov rax, [rsp+18h+var_18]
add rax, 28h ; '('
jmp short loc_83765
loc_83754:
mov rax, [rsp+18h+var_18]
add rax, 10h
jmp short loc_83765
loc_8375E:
add r14, 8
mov rax, r14
loc_83765:
mov r14, [rax]
cmp dword ptr [r14], 2
jnz short loc_8375E
cmp [r14+10h], rsi
jnz short loc_8375E
mov rcx, [r14+8]
mov [rax], rcx
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_837A8:
call _abort
|
long long delete_finrec_weakref(long long a1, long long a2)
{
int v2; // eax
_QWORD *v3; // rax
_DWORD *v4; // r14
long long v5; // rax
long long ( *v6)(_QWORD, _DWORD *); // rcx
long long v8; // [rsp+0h] [rbp-18h]
v2 = *(_DWORD *)(a2 + 40);
v8 = *(_QWORD *)(a2 + 32);
if ( v2 == -8 )
{
v3 = (_QWORD *)(v8 + 16);
}
else
{
if ( v2 != -1 )
abort((const char *)a1);
v3 = (_QWORD *)(v8 + 40);
}
while ( 1 )
{
v4 = (_DWORD *)*v3;
if ( *(_DWORD *)*v3 == 2 && *((_QWORD *)v4 + 2) == a2 )
break;
v3 = v4 + 2;
}
*v3 = *((_QWORD *)v4 + 1);
--*(_QWORD *)(a1 + 40);
v5 = (*(long long ( **)(_DWORD *))(a1 + 32))(v4);
v6 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v5 - 8;
return v6(*(_QWORD *)(a1 + 64), v4);
}
|
delete_finrec_weakref:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVSD XMM0,qword ptr [RSI + 0x20]
MOV EAX,dword ptr [RSI + 0x28]
MOVSD qword ptr [RSP],XMM0
CMP EAX,-0x8
JZ 0x00183754
CMP EAX,-0x1
JNZ 0x001837a8
MOV RAX,qword ptr [RSP]
ADD RAX,0x28
JMP 0x00183765
LAB_00183754:
MOV RAX,qword ptr [RSP]
ADD RAX,0x10
JMP 0x00183765
LAB_0018375e:
ADD R14,0x8
MOV RAX,R14
LAB_00183765:
MOV R14,qword ptr [RAX]
CMP dword ptr [R14],0x2
JNZ 0x0018375e
CMP qword ptr [R14 + 0x10],RSI
JNZ 0x0018375e
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX],RCX
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_001837a8:
CALL 0x0010e090
|
void delete_finrec_weakref(long param_1,long param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
if (*(int *)(param_2 + 0x28) == -8) {
piVar2 = (int *)(*(long *)(param_2 + 0x20) + 0x10);
}
else {
if (*(int *)(param_2 + 0x28) != -1) {
/* WARNING: Subroutine does not return */
abort();
}
piVar2 = (int *)(*(long *)(param_2 + 0x20) + 0x28);
}
while ((piVar1 = *(int **)piVar2, *piVar1 != 2 || (*(long *)(piVar1 + 4) != param_2))) {
piVar2 = piVar1 + 2;
}
*(int8 *)piVar2 = *(int8 *)(piVar1 + 2);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(piVar1);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x001837a6. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),piVar1,lVar3,*(code **)(param_1 + 0x10));
return;
}
|
|
17,576
|
delete_finrec_weakref
|
bluesky950520[P]quickjs/quickjs.c
|
static void delete_finrec_weakref(JSRuntime *rt, JSFinRecEntry *fre)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(fre->target);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY && wr->u.fin_rec_entry == fre)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
}
|
O3
|
c
|
delete_finrec_weakref:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movl 0x28(%rsi), %edx
movl $0x28, %ecx
cmpl $-0x1, %edx
je 0x86142
cmpl $-0x8, %edx
jne 0x86191
movl $0x10, %ecx
addq %rcx, %rax
movq (%rax), %r14
cmpl $0x2, (%r14)
jne 0x86154
cmpq %rsi, 0x10(%r14)
je 0x8615d
addq $0x8, %r14
movq %r14, %rax
jmp 0x86145
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
callq 0xe090
|
delete_finrec_weakref:
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rsi+20h]
mov edx, [rsi+28h]
mov ecx, 28h ; '('
cmp edx, 0FFFFFFFFh
jz short loc_86142
cmp edx, 0FFFFFFF8h
jnz short loc_86191
mov ecx, 10h
loc_86142:
add rax, rcx
loc_86145:
mov r14, [rax]
cmp dword ptr [r14], 2
jnz short loc_86154
cmp [r14+10h], rsi
jz short loc_8615D
loc_86154:
add r14, 8
mov rax, r14
jmp short loc_86145
loc_8615D:
mov rcx, [r14+8]
mov [rax], rcx
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_86191:
call _abort
|
long long delete_finrec_weakref(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rcx
_QWORD *i; // rax
_DWORD *v5; // r14
long long v6; // rax
long long ( *v7)(_QWORD, _DWORD *); // rcx
v2 = *(unsigned int *)(a2 + 40);
v3 = 40LL;
if ( (_DWORD)v2 != -1 )
{
if ( (_DWORD)v2 != -8 )
abort((const char *)a1, a2, v2, 40LL);
v3 = 16LL;
}
for ( i = (_QWORD *)(v3 + *(_QWORD *)(a2 + 32)); ; i = v5 + 2 )
{
v5 = (_DWORD *)*i;
if ( *(_DWORD *)*i == 2 && *((_QWORD *)v5 + 2) == a2 )
break;
}
*i = *((_QWORD *)v5 + 1);
--*(_QWORD *)(a1 + 40);
v6 = (*(long long ( **)(_DWORD *))(a1 + 32))(v5);
v7 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8;
return v7(*(_QWORD *)(a1 + 64), v5);
}
|
delete_finrec_weakref:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x20]
MOV EDX,dword ptr [RSI + 0x28]
MOV ECX,0x28
CMP EDX,-0x1
JZ 0x00186142
CMP EDX,-0x8
JNZ 0x00186191
MOV ECX,0x10
LAB_00186142:
ADD RAX,RCX
LAB_00186145:
MOV R14,qword ptr [RAX]
CMP dword ptr [R14],0x2
JNZ 0x00186154
CMP qword ptr [R14 + 0x10],RSI
JZ 0x0018615d
LAB_00186154:
ADD R14,0x8
MOV RAX,R14
JMP 0x00186145
LAB_0018615d:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX],RCX
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_00186191:
CALL 0x0010e090
|
void delete_finrec_weakref(long param_1,long param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
lVar3 = 0x28;
if (*(int *)(param_2 + 0x28) != -1) {
if (*(int *)(param_2 + 0x28) != -8) {
/* WARNING: Subroutine does not return */
abort();
}
lVar3 = 0x10;
}
piVar2 = (int *)(*(long *)(param_2 + 0x20) + lVar3);
while ((piVar1 = *(int **)piVar2, *piVar1 != 2 || (*(long *)(piVar1 + 4) != param_2))) {
piVar2 = piVar1 + 2;
}
*(int8 *)piVar2 = *(int8 *)(piVar1 + 2);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(piVar1);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x0018618f. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),piVar1,lVar3,*(code **)(param_1 + 0x10));
return;
}
|
|
17,577
|
js_build_rest
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_build_rest(JSContext *ctx, int first, int argc, JSValue *argv)
{
JSValue val;
int i, ret;
val = JS_NewArray(ctx);
if (JS_IsException(val))
return val;
for (i = first; i < argc; i++) {
ret = JS_DefinePropertyValueUint32(ctx, val, i - first,
js_dup(argv[i]),
JS_PROP_C_W_E);
if (ret < 0) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
}
return val;
}
|
O0
|
c
|
js_build_rest:
subq $0x78, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movl %edx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
callq 0x29260
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x6398b
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x63a5f
movl 0x5c(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x58(%rsp), %eax
jge 0x63a4b
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %eax
subl 0x5c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x20410
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %ecx
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movl $0x7, (%rsp)
callq 0x360b0
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jge 0x63a39
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x63a5f
jmp 0x63a3b
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x63993
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nop
|
js_build_rest:
sub rsp, 78h
mov [rsp+78h+var_18], rdi
mov [rsp+78h+var_1C], esi
mov [rsp+78h+var_20], edx
mov [rsp+78h+var_28], rcx
mov rdi, [rsp+78h+var_18]
call JS_NewArray
mov [rsp+78h+var_50], rax
mov [rsp+78h+var_48], rdx
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_38], rax
mov rax, [rsp+78h+var_48]
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_6398B
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_8], rax
jmp loc_63A5F
loc_6398B:
mov eax, [rsp+78h+var_1C]
mov [rsp+78h+var_3C], eax
loc_63993:
mov eax, [rsp+78h+var_3C]
cmp eax, [rsp+78h+var_20]
jge loc_63A4B
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_70], rax
mov eax, [rsp+78h+var_3C]
sub eax, [rsp+78h+var_1C]
mov [rsp+78h+var_64], eax
mov rax, [rsp+78h+var_28]
movsxd rcx, [rsp+78h+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rdi, [rsp+78h+var_70]
mov ecx, [rsp+78h+var_64]
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], rdx
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
mov r8, [rsp+78h+var_60]
mov r9, [rsp+78h+var_58]
mov [rsp+78h+var_78], 7
call JS_DefinePropertyValueUint32
mov [rsp+78h+var_40], eax
cmp [rsp+78h+var_40], 0
jge short loc_63A39
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
call JS_FreeValue
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp short loc_63A5F
loc_63A39:
jmp short $+2
loc_63A3B:
mov eax, [rsp+78h+var_3C]
add eax, 1
mov [rsp+78h+var_3C], eax
jmp loc_63993
loc_63A4B:
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_8], rax
loc_63A5F:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
long long js_build_rest(
long long a1,
int a2,
int a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
double v14; // xmm4_8
double v15; // xmm5_8
_DWORD *v17; // [rsp+18h] [rbp-60h]
long long v18; // [rsp+28h] [rbp-50h]
int i; // [rsp+3Ch] [rbp-3Ch]
long long v20; // [rsp+48h] [rbp-30h]
long long v23; // [rsp+68h] [rbp-10h]
v18 = JS_NewArray(a1);
v20 = v12;
if ( JS_IsException_1(v18, v12) )
return v18;
for ( i = a2; i < a3; ++i )
{
v17 = js_dup(*(_DWORD **)(16LL * i + a4), *(_QWORD *)(16LL * i + a4 + 8));
if ( (int)JS_DefinePropertyValueUint32(a1, v18, v20, i - a2, v17, v13, a5, a6, a7, a8, v14, v15, a11, a12, 7) < 0 )
{
JS_FreeValue(a1, v18, v20);
LODWORD(v23) = 0;
return v23;
}
}
return v18;
}
|
js_build_rest:
SUB RSP,0x78
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ESI
MOV dword ptr [RSP + 0x58],EDX
MOV qword ptr [RSP + 0x50],RCX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00129260
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0016398b
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00163a5f
LAB_0016398b:
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x3c],EAX
LAB_00163993:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x58]
JGE 0x00163a4b
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x3c]
SUB EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00120410
MOV RDI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x14]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
MOV dword ptr [RSP],0x7
CALL 0x001360b0
MOV dword ptr [RSP + 0x38],EAX
CMP dword ptr [RSP + 0x38],0x0
JGE 0x00163a39
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001229d0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00163a5f
LAB_00163a39:
JMP 0x00163a3b
LAB_00163a3b:
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x00163993
LAB_00163a4b:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x70],RAX
LAB_00163a5f:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16] js_build_rest(int8 param_1,int param_2,int param_3,long param_4)
{
int4 uVar1;
int iVar2;
int8 *puVar4;
int1 auVar5 [16];
int local_3c;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
uVar1 = uStack_c;
auVar5 = JS_NewArray(param_1);
local_8 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar2 = JS_IsException(uVar3,local_8);
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
local_3c = param_2;
if (iVar2 == 0) {
for (; local_3c < param_3; local_3c = local_3c + 1) {
puVar4 = (int8 *)(param_4 + (long)local_3c * 0x10);
auVar5 = js_dup(*puVar4,puVar4[1]);
iVar2 = JS_DefinePropertyValueUint32
(param_1,uVar3,local_8,local_3c - param_2,auVar5._0_8_,auVar5._8_8_,7);
if (iVar2 < 0) {
JS_FreeValue(param_1,uVar3,local_8);
local_10 = 0;
local_8 = 6;
uStack_c = uVar1;
break;
}
}
}
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
|
|
17,578
|
add_compiled_collation
|
eloqsql/mysys/charset.c
|
void add_compiled_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
}
|
O3
|
c
|
add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
movl (%rdi), %eax
leaq 0x33cae3(%rip), %rcx # 0x367920
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x340ad4(%rip), %rdi # 0x36b920
popq %rbp
jmp 0x2c802
|
add_compiled_collation:
push rbp
mov rbp, rsp
mov rsi, rdi
mov eax, [rdi]
lea rcx, all_charsets
mov [rcx+rax*8], rdi
or byte ptr [rdi+0Dh], 2
lea rdi, charset_name_hash
pop rbp
jmp my_hash_insert
|
long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
*((_BYTE *)a1 + 13) |= 2u;
return my_hash_insert(&charset_name_hash, a1);
}
|
add_compiled_collation:
PUSH RBP
MOV RBP,RSP
MOV RSI,RDI
MOV EAX,dword ptr [RDI]
LEA RCX,[0x467920]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x46b920]
POP RBP
JMP 0x0012c802
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
*(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2;
my_hash_insert(charset_name_hash,param_1);
return;
}
|
|
17,579
|
translog_relative_LSN_encode
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_relative_LSN_encode(struct st_translog_parts *parts,
LSN base_lsn,
uint lsns, uchar *compressed_LSNs)
{
LEX_CUSTRING *part;
uint lsns_len= lsns * LSN_STORE_SIZE;
uchar buffer_src[MAX_NUMBER_OF_LSNS_PER_RECORD * LSN_STORE_SIZE];
uchar *buffer= buffer_src;
const uchar *cbuffer;
DBUG_ENTER("translog_relative_LSN_encode");
DBUG_ASSERT(parts->current != 0);
part= parts->parts + parts->current;
/* collect all LSN(s) in one chunk if it (they) is (are) divided */
if (part->length < lsns_len)
{
size_t copied= part->length;
LEX_CUSTRING *next_part;
DBUG_PRINT("info", ("Using buffer:%p", compressed_LSNs));
memcpy(buffer, part->str, part->length);
next_part= parts->parts + parts->current + 1;
do
{
DBUG_ASSERT(next_part < parts->parts + parts->elements);
if ((next_part->length + copied) < lsns_len)
{
memcpy(buffer + copied, next_part->str,
next_part->length);
copied+= next_part->length;
next_part->length= 0; next_part->str= 0;
/* delete_dynamic_element(&parts->parts, parts->current + 1); */
next_part++;
parts->current++;
part= parts->parts + parts->current;
}
else
{
size_t len= lsns_len - copied;
memcpy(buffer + copied, next_part->str, len);
copied= lsns_len;
next_part->str+= len;
next_part->length-= len;
}
} while (copied < lsns_len);
cbuffer= buffer;
}
else
{
cbuffer= part->str;
part->str+= lsns_len;
part->length-= lsns_len;
parts->current--;
part= parts->parts + parts->current;
}
{
/* Compress */
LSN ref;
int economy;
const uchar *src_ptr;
uchar *dst_ptr= compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE);
/*
We write the result in backward direction with no special sense or
tricks both directions are equal in complicity
*/
for (src_ptr= cbuffer + lsns_len - LSN_STORE_SIZE;
src_ptr >= (const uchar*)cbuffer;
src_ptr-= LSN_STORE_SIZE)
{
ref= lsn_korr(src_ptr);
dst_ptr= translog_put_LSN_diff(base_lsn, ref, dst_ptr);
}
part->length= (size_t)((compressed_LSNs +
(MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE)) -
dst_ptr);
economy= lsns_len - (uint)part->length;
parts->record_length-= economy;
DBUG_PRINT("info", ("new length of LSNs: %lu economy: %d",
(ulong)part->length, economy));
parts->total_record_length-= economy;
part->str= dst_ptr;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_relative_LSN_encode:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leal (,%rdx,8), %edi
subl %edx, %edi
movq 0x10(%rbx), %rax
movl 0x8(%rbx), %edx
shlq $0x4, %rdx
leaq (%rax,%rdx), %r15
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %r13
movq %r13, %rax
subq %rdi, %rax
movq %rdi, -0x48(%rbp)
jae 0x6e555
movq %r14, -0x58(%rbp)
movq %rcx, -0x60(%rbp)
leaq -0x3e(%rbp), %r12
movl $0xe, %ecx
movq %r12, %rdi
movq %r13, %rdx
callq 0x2a400
movq -0x48(%rbp), %rdi
movq %r15, %rcx
addq $0x18, %r15
movq 0x18(%rcx), %r14
leaq (%r14,%r13), %rax
cmpq %rdi, %rax
movq %rbx, -0x68(%rbp)
jae 0x6e578
movq %r13, %rbx
leaq -0x3e(,%r13), %rdi
addq %rbp, %rdi
movq -0x8(%r15), %rsi
movq %r14, %rdx
callq 0x2a0a0
movq -0x48(%rbp), %rdi
movq %r14, %r13
addq %rbx, %r13
movq -0x68(%rbp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, -0x8(%r15)
movl 0x8(%rbx), %eax
incl %eax
movl %eax, 0x8(%rbx)
cmpq %rdi, %r13
jae 0x6e5c9
movq 0x10(%r15), %r14
addq $0x10, %r15
leaq (%r14,%r13), %rcx
cmpq %rdi, %rcx
jb 0x6e4ef
movl %eax, %eax
shlq $0x4, %rax
addq 0x10(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq -0x8(%r15), %rax
jmp 0x6e580
leaq (%rsi,%rdi), %rdx
movq %rdx, (%r15)
movq %rax, 0x8(%r15)
movl 0x8(%rbx), %r15d
decl %r15d
movl %r15d, 0x8(%rbx)
shlq $0x4, %r15
addq 0x10(%rbx), %r15
movq %rsi, %r12
jmp 0x6e5dc
movq %rcx, -0x50(%rbp)
leaq 0x10(%rcx), %rax
movq %rax, -0x70(%rbp)
movq %rdi, %rbx
subq %r13, %rbx
leaq -0x3e(,%r13), %rdi
addq %rbp, %rdi
movq (%rax), %r13
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2a0a0
movq -0x48(%rbp), %rdi
addq %rbx, %r13
movq -0x70(%rbp), %rax
movq %r13, (%rax)
subq %rbx, %r14
movq %r14, (%r15)
movq -0x68(%rbp), %rbx
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %r14
movq -0x50(%rbp), %r15
jmp 0x6e5dc
movl %eax, %r15d
shlq $0x4, %r15
addq 0x10(%rbx), %r15
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %r14
addq $0x12, %rcx
leaq (%r12,%rdi), %r11
addq $-0x7, %r11
movq %rcx, %rax
cmpq %r12, %r11
jb 0x6e6d7
movq %rcx, %rax
movzbl (%r11), %esi
movzbl 0x1(%r11), %edi
movzbl 0x2(%r11), %r8d
movq %r8, %rdx
shlq $0x30, %rdx
movq %rdi, %r9
shlq $0x28, %r9
movq %rsi, %r10
shlq $0x20, %r10
orq %r9, %r10
orq %rdx, %r10
movl 0x3(%r11), %r9d
orq %r9, %r10
movq %r14, %rdx
subq %r10, %rdx
cmpq $0x3fff, %rdx # imm = 0x3FFF
ja 0x6e647
rolw $0x8, %dx
movw %dx, -0x2(%rax)
addq $-0x2, %rax
jmp 0x6e6ca
cmpq $0x3fffff, %rdx # imm = 0x3FFFFF
ja 0x6e667
movl %edx, %esi
shrl $0x10, %esi
orb $0x40, %sil
movb %sil, -0x3(%rax)
movw %dx, -0x2(%rax)
addq $-0x3, %rax
jmp 0x6e6ca
cmpq $0x3fffffff, %rdx # imm = 0x3FFFFFFF
ja 0x6e68f
movl %edx, %esi
shrl $0x18, %esi
orb $-0x80, %sil
movb %sil, -0x4(%rax)
movb %dl, -0x3(%rax)
movb %dh, -0x2(%rax)
shrl $0x10, %edx
movb %dl, -0x1(%rax)
addq $-0x4, %rax
jmp 0x6e6ca
movq %rdx, %r10
shrq $0x26, %r10
jne 0x6e6b0
movq %rdx, %rsi
shrq $0x20, %rsi
orb $-0x40, %sil
movb %sil, -0x5(%rax)
movl %edx, -0x4(%rax)
addq $-0x5, %rax
jmp 0x6e6ca
movw $0x100, -0x9(%rax) # imm = 0x100
movb %sil, -0x7(%rax)
movb %dil, -0x6(%rax)
movb %r8b, -0x5(%rax)
movl %r9d, -0x4(%rax)
addq $-0x9, %rax
addq $-0x7, %r11
cmpq %r12, %r11
jae 0x6e5f7
subq %rax, %rcx
movq %rcx, 0x8(%r15)
subl -0x48(%rbp), %ecx
movq (%rbx), %xmm0
movd %ecx, %xmm1
pshufd $0x50, %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1]
paddd %xmm0, %xmm1
movq %xmm1, (%rbx)
movq %rax, (%r15)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x6e717
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a240
|
translog_relative_LSN_encode:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea edi, ds:0[rdx*8]
sub edi, edx
mov rax, [rbx+10h]
mov edx, [rbx+8]
shl rdx, 4
lea r15, [rax+rdx]
mov rsi, [rax+rdx]
mov r13, [rax+rdx+8]
mov rax, r13
sub rax, rdi
mov [rbp+var_48], rdi
jnb loc_6E555
mov [rbp+var_58], r14
mov [rbp+var_60], rcx
lea r12, [rbp+var_3E]
mov ecx, 0Eh
mov rdi, r12
mov rdx, r13
call ___memcpy_chk
mov rdi, [rbp+var_48]
mov rcx, r15
add r15, 18h
mov r14, [rcx+18h]
lea rax, [r14+r13]
cmp rax, rdi
mov [rbp+var_68], rbx
jnb loc_6E578
loc_6E4EF:
mov rbx, r13
lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13]
add rdi, rbp
mov rsi, [r15-8]
mov rdx, r14
call _memcpy
mov rdi, [rbp+var_48]
mov r13, r14
add r13, rbx
mov rbx, [rbp+var_68]
xorps xmm0, xmm0
movups xmmword ptr [r15-8], xmm0
mov eax, [rbx+8]
inc eax
mov [rbx+8], eax
cmp r13, rdi
jnb loc_6E5C9
mov r14, [r15+10h]
add r15, 10h
lea rcx, [r14+r13]
cmp rcx, rdi
jb short loc_6E4EF
mov eax, eax
shl rax, 4
add rax, [rbx+10h]
mov [rbp+var_50], rax
lea rax, [r15-8]
jmp short loc_6E580
loc_6E555:
lea rdx, [rsi+rdi]
mov [r15], rdx
mov [r15+8], rax
mov r15d, [rbx+8]
dec r15d
mov [rbx+8], r15d
shl r15, 4
add r15, [rbx+10h]
mov r12, rsi
jmp short loc_6E5DC
loc_6E578:
mov [rbp+var_50], rcx
lea rax, [rcx+10h]
loc_6E580:
mov [rbp+var_70], rax
mov rbx, rdi
sub rbx, r13
lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13]
add rdi, rbp
mov r13, [rax]
mov rsi, r13
mov rdx, rbx
call _memcpy
mov rdi, [rbp+var_48]
add r13, rbx
mov rax, [rbp+var_70]
mov [rax], r13
sub r14, rbx
mov [r15], r14
mov rbx, [rbp+var_68]
mov rcx, [rbp+var_60]
mov r14, [rbp+var_58]
mov r15, [rbp+var_50]
jmp short loc_6E5DC
loc_6E5C9:
mov r15d, eax
shl r15, 4
add r15, [rbx+10h]
mov rcx, [rbp+var_60]
mov r14, [rbp+var_58]
loc_6E5DC:
add rcx, 12h
lea r11, [r12+rdi]
add r11, 0FFFFFFFFFFFFFFF9h
mov rax, rcx
cmp r11, r12
jb loc_6E6D7
mov rax, rcx
loc_6E5F7:
movzx esi, byte ptr [r11]
movzx edi, byte ptr [r11+1]
movzx r8d, byte ptr [r11+2]
mov rdx, r8
shl rdx, 30h
mov r9, rdi
shl r9, 28h
mov r10, rsi
shl r10, 20h
or r10, r9
or r10, rdx
mov r9d, [r11+3]
or r10, r9
mov rdx, r14
sub rdx, r10
cmp rdx, 3FFFh
ja short loc_6E647
rol dx, 8
mov [rax-2], dx
add rax, 0FFFFFFFFFFFFFFFEh
jmp loc_6E6CA
loc_6E647:
cmp rdx, offset unk_3FFFFF
ja short loc_6E667
mov esi, edx
shr esi, 10h
or sil, 40h
mov [rax-3], sil
mov [rax-2], dx
add rax, 0FFFFFFFFFFFFFFFDh
jmp short loc_6E6CA
loc_6E667:
cmp rdx, 3FFFFFFFh
ja short loc_6E68F
mov esi, edx
shr esi, 18h
or sil, 80h
mov [rax-4], sil
mov [rax-3], dl
mov [rax-2], dh
shr edx, 10h
mov [rax-1], dl
add rax, 0FFFFFFFFFFFFFFFCh
jmp short loc_6E6CA
loc_6E68F:
mov r10, rdx
shr r10, 26h
jnz short loc_6E6B0
mov rsi, rdx
shr rsi, 20h
or sil, 0C0h
mov [rax-5], sil
mov [rax-4], edx
add rax, 0FFFFFFFFFFFFFFFBh
jmp short loc_6E6CA
loc_6E6B0:
mov word ptr [rax-9], 100h
mov [rax-7], sil
mov [rax-6], dil
mov [rax-5], r8b
mov [rax-4], r9d
add rax, 0FFFFFFFFFFFFFFF7h
loc_6E6CA:
add r11, 0FFFFFFFFFFFFFFF9h
cmp r11, r12
jnb loc_6E5F7
loc_6E6D7:
sub rcx, rax
mov [r15+8], rcx
sub ecx, dword ptr [rbp+var_48]
movq xmm0, qword ptr [rbx]
movd xmm1, ecx
pshufd xmm1, xmm1, 50h ; 'P'
paddd xmm1, xmm0
movq qword ptr [rbx], xmm1
mov [r15], rax
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_6E717
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6E717:
call ___stack_chk_fail
|
unsigned long long translog_relative_LSN_encode(__m128i *a1, long long a2, int a3, long long a4)
{
unsigned long long v6; // rdi
_QWORD *v7; // r15
unsigned __int8 *v8; // rsi
unsigned long long v9; // r13
unsigned __int8 *v10; // r12
_QWORD *v11; // rcx
_QWORD *v12; // r15
long long v13; // r14
unsigned int v14; // eax
_QWORD *v15; // rax
long long v16; // r15
_QWORD *v17; // r15
unsigned long long v18; // rbx
char *v19; // rdi
long long v20; // r13
long long v21; // rcx
unsigned __int8 *v22; // r11
long long v23; // rax
char v24; // si
unsigned __int8 v25; // di
unsigned __int8 v26; // r8
long long v27; // r9
unsigned long long v28; // rdx
long long v29; // rcx
_QWORD *v31; // [rsp+0h] [rbp-70h]
__m128i *v32; // [rsp+8h] [rbp-68h]
long long v33; // [rsp+10h] [rbp-60h]
long long v34; // [rsp+18h] [rbp-58h]
long long v35; // [rsp+20h] [rbp-50h]
unsigned long long v36; // [rsp+28h] [rbp-48h]
_BYTE v37[14]; // [rsp+32h] [rbp-3Eh] BYREF
unsigned long long v38; // [rsp+40h] [rbp-30h]
long long savedregs; // [rsp+70h] [rbp+0h] BYREF
v38 = __readfsqword(0x28u);
v6 = (unsigned int)(7 * a3);
v7 = (_QWORD *)(a1[1].m128i_i64[0] + 16LL * a1->m128i_u32[2]);
v8 = (unsigned __int8 *)*v7;
v9 = v7[1];
v36 = v6;
if ( v9 >= v6 )
{
*v7 = &v8[v6];
v7[1] = v9 - v6;
v16 = (unsigned int)(a1->m128i_i32[2] - 1);
a1->m128i_i32[2] = v16;
v17 = (_QWORD *)(a1[1].m128i_i64[0] + 16 * v16);
v10 = v8;
}
else
{
v34 = a2;
v33 = a4;
v10 = v37;
__memcpy_chk(v37, v8, v9, 14LL);
v6 = v36;
v11 = v7;
v12 = v7 + 3;
v13 = v11[3];
v32 = a1;
if ( v13 + v9 >= v36 )
{
v35 = (long long)v11;
v15 = v11 + 2;
LABEL_8:
v31 = v15;
v18 = v6 - v9;
v19 = (char *)&savedregs + v9 - 62;
v20 = *v15;
memcpy(v19, *v15, v18);
v6 = v36;
*v31 = v18 + v20;
*v12 = v13 - v18;
a1 = v32;
a4 = v33;
a2 = v34;
v17 = (_QWORD *)v35;
}
else
{
while ( 1 )
{
memcpy((char *)&savedregs + v9 - 62, *(v12 - 1), v13);
v6 = v36;
v9 += v13;
a1 = v32;
*(_OWORD *)(v12 - 1) = 0LL;
v14 = v32->m128i_i32[2] + 1;
v32->m128i_i32[2] = v14;
if ( v9 >= v6 )
break;
v13 = v12[2];
v12 += 2;
if ( v13 + v9 >= v6 )
{
v35 = v32[1].m128i_i64[0] + 16LL * v14;
v15 = v12 - 1;
goto LABEL_8;
}
}
v17 = (_QWORD *)(v32[1].m128i_i64[0] + 16LL * v14);
a4 = v33;
a2 = v34;
}
}
v21 = a4 + 18;
v22 = &v10[v6 - 7];
v23 = v21;
if ( v22 >= v10 )
{
v23 = v21;
do
{
v24 = *v22;
v25 = v22[1];
v26 = v22[2];
v27 = *(unsigned int *)(v22 + 3);
v28 = a2 - (v27 | ((unsigned long long)v26 << 48) | ((unsigned long long)v25 << 40) | ((unsigned long long)*v22 << 32));
if ( v28 > 0x3FFF )
{
if ( v28 > (unsigned long long)&unk_3FFFFF )
{
if ( v28 > 0x3FFFFFFF )
{
if ( v28 >> 38 )
{
*(_WORD *)(v23 - 9) = 256;
*(_BYTE *)(v23 - 7) = v24;
*(_BYTE *)(v23 - 6) = v25;
*(_BYTE *)(v23 - 5) = v26;
*(_DWORD *)(v23 - 4) = v27;
v23 -= 9LL;
}
else
{
*(_BYTE *)(v23 - 5) = BYTE4(v28) | 0xC0;
*(_DWORD *)(v23 - 4) = v28;
v23 -= 5LL;
}
}
else
{
*(_BYTE *)(v23 - 4) = ((unsigned int)(a2 - v27) >> 24) | 0x80;
*(_WORD *)(v23 - 3) = v28;
*(_BYTE *)(v23 - 1) = BYTE2(v28);
v23 -= 4LL;
}
}
else
{
*(_BYTE *)(v23 - 3) = ((unsigned int)(a2 - v27) >> 16) | 0x40;
*(_WORD *)(v23 - 2) = v28;
v23 -= 3LL;
}
}
else
{
*(_WORD *)(v23 - 2) = __ROL2__(a2 - v27, 8);
v23 -= 2LL;
}
v22 -= 7;
}
while ( v22 >= v10 );
}
v29 = v21 - v23;
v17[1] = v29;
a1->m128i_i64[0] = _mm_add_epi32(_mm_shuffle_epi32(_mm_cvtsi32_si128((int)v29 - (int)v36), 80), _mm_loadl_epi64(a1)).m128i_u64[0];
*v17 = v23;
return __readfsqword(0x28u);
}
|
translog_relative_LSN_encode:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA EDI,[RDX*0x8]
SUB EDI,EDX
MOV RAX,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x8]
SHL RDX,0x4
LEA R15,[RAX + RDX*0x1]
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV R13,qword ptr [RAX + RDX*0x1 + 0x8]
MOV RAX,R13
SUB RAX,RDI
MOV qword ptr [RBP + -0x48],RDI
JNC 0x0016e555
MOV qword ptr [RBP + -0x58],R14
MOV qword ptr [RBP + -0x60],RCX
LEA R12,[RBP + -0x3e]
MOV ECX,0xe
MOV RDI,R12
MOV RDX,R13
CALL 0x0012a400
MOV RDI,qword ptr [RBP + -0x48]
MOV RCX,R15
ADD R15,0x18
MOV R14,qword ptr [RCX + 0x18]
LEA RAX,[R14 + R13*0x1]
CMP RAX,RDI
MOV qword ptr [RBP + -0x68],RBX
JNC 0x0016e578
LAB_0016e4ef:
MOV RBX,R13
LEA RDI,[-0x3e + R13*0x1]
ADD RDI,RBP
MOV RSI,qword ptr [R15 + -0x8]
MOV RDX,R14
CALL 0x0012a0a0
MOV RDI,qword ptr [RBP + -0x48]
MOV R13,R14
ADD R13,RBX
MOV RBX,qword ptr [RBP + -0x68]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + -0x8],XMM0
MOV EAX,dword ptr [RBX + 0x8]
INC EAX
MOV dword ptr [RBX + 0x8],EAX
CMP R13,RDI
JNC 0x0016e5c9
MOV R14,qword ptr [R15 + 0x10]
ADD R15,0x10
LEA RCX,[R14 + R13*0x1]
CMP RCX,RDI
JC 0x0016e4ef
MOV EAX,EAX
SHL RAX,0x4
ADD RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RBP + -0x50],RAX
LEA RAX,[R15 + -0x8]
JMP 0x0016e580
LAB_0016e555:
LEA RDX,[RSI + RDI*0x1]
MOV qword ptr [R15],RDX
MOV qword ptr [R15 + 0x8],RAX
MOV R15D,dword ptr [RBX + 0x8]
DEC R15D
MOV dword ptr [RBX + 0x8],R15D
SHL R15,0x4
ADD R15,qword ptr [RBX + 0x10]
MOV R12,RSI
JMP 0x0016e5dc
LAB_0016e578:
MOV qword ptr [RBP + -0x50],RCX
LEA RAX,[RCX + 0x10]
LAB_0016e580:
MOV qword ptr [RBP + -0x70],RAX
MOV RBX,RDI
SUB RBX,R13
LEA RDI,[-0x3e + R13*0x1]
ADD RDI,RBP
MOV R13,qword ptr [RAX]
MOV RSI,R13
MOV RDX,RBX
CALL 0x0012a0a0
MOV RDI,qword ptr [RBP + -0x48]
ADD R13,RBX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX],R13
SUB R14,RBX
MOV qword ptr [R15],R14
MOV RBX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
MOV R14,qword ptr [RBP + -0x58]
MOV R15,qword ptr [RBP + -0x50]
JMP 0x0016e5dc
LAB_0016e5c9:
MOV R15D,EAX
SHL R15,0x4
ADD R15,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBP + -0x60]
MOV R14,qword ptr [RBP + -0x58]
LAB_0016e5dc:
ADD RCX,0x12
LEA R11,[R12 + RDI*0x1]
ADD R11,-0x7
MOV RAX,RCX
CMP R11,R12
JC 0x0016e6d7
MOV RAX,RCX
LAB_0016e5f7:
MOVZX ESI,byte ptr [R11]
MOVZX EDI,byte ptr [R11 + 0x1]
MOVZX R8D,byte ptr [R11 + 0x2]
MOV RDX,R8
SHL RDX,0x30
MOV R9,RDI
SHL R9,0x28
MOV R10,RSI
SHL R10,0x20
OR R10,R9
OR R10,RDX
MOV R9D,dword ptr [R11 + 0x3]
OR R10,R9
MOV RDX,R14
SUB RDX,R10
CMP RDX,0x3fff
JA 0x0016e647
ROL DX,0x8
MOV word ptr [RAX + -0x2],DX
ADD RAX,-0x2
JMP 0x0016e6ca
LAB_0016e647:
CMP RDX,0x3fffff
JA 0x0016e667
MOV ESI,EDX
SHR ESI,0x10
OR SIL,0x40
MOV byte ptr [RAX + -0x3],SIL
MOV word ptr [RAX + -0x2],DX
ADD RAX,-0x3
JMP 0x0016e6ca
LAB_0016e667:
CMP RDX,0x3fffffff
JA 0x0016e68f
MOV ESI,EDX
SHR ESI,0x18
OR SIL,0x80
MOV byte ptr [RAX + -0x4],SIL
MOV byte ptr [RAX + -0x3],DL
MOV byte ptr [RAX + -0x2],DH
SHR EDX,0x10
MOV byte ptr [RAX + -0x1],DL
ADD RAX,-0x4
JMP 0x0016e6ca
LAB_0016e68f:
MOV R10,RDX
SHR R10,0x26
JNZ 0x0016e6b0
MOV RSI,RDX
SHR RSI,0x20
OR SIL,0xc0
MOV byte ptr [RAX + -0x5],SIL
MOV dword ptr [RAX + -0x4],EDX
ADD RAX,-0x5
JMP 0x0016e6ca
LAB_0016e6b0:
MOV word ptr [RAX + -0x9],0x100
MOV byte ptr [RAX + -0x7],SIL
MOV byte ptr [RAX + -0x6],DIL
MOV byte ptr [RAX + -0x5],R8B
MOV dword ptr [RAX + -0x4],R9D
ADD RAX,-0x9
LAB_0016e6ca:
ADD R11,-0x7
CMP R11,R12
JNC 0x0016e5f7
LAB_0016e6d7:
SUB RCX,RAX
MOV qword ptr [R15 + 0x8],RCX
SUB ECX,dword ptr [RBP + -0x48]
MOVQ XMM0,qword ptr [RBX]
MOVD XMM1,ECX
PSHUFD XMM1,XMM1,0x50
PADDD XMM1,XMM0
MOVQ qword ptr [RBX],XMM1
MOV qword ptr [R15],RAX
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0016e717
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016e717:
CALL 0x0012a240
|
void translog_relative_LSN_encode(int8 *param_1,long param_2,int param_3,long param_4)
{
byte bVar1;
byte bVar2;
byte bVar3;
void *__src;
byte bVar4;
uint uVar5;
long *plVar6;
long lVar7;
int iVar8;
ushort uVar9;
long lVar10;
size_t __n;
ulong uVar11;
byte *pbVar12;
byte *pbVar13;
ulong uVar14;
size_t __n_00;
long *plVar15;
long in_FS_OFFSET;
long *local_58;
byte local_46 [14];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar11 = (ulong)(uint)(param_3 * 7);
lVar7 = param_1[2];
lVar10 = (ulong)*(uint *)(param_1 + 1) * 0x10;
local_58 = (long *)(lVar7 + lVar10);
pbVar13 = *(byte **)(lVar7 + lVar10);
uVar14 = *(ulong *)(lVar7 + 8 + lVar10);
if (uVar14 < uVar11) {
__memcpy_chk(local_46,pbVar13,uVar14,0xe);
plVar15 = local_58 + 3;
__n_00 = local_58[3];
pbVar13 = local_46;
if (__n_00 + uVar14 < uVar11) {
do {
plVar6 = plVar15;
memcpy(local_46 + uVar14,(void *)plVar6[-1],__n_00);
uVar14 = __n_00 + uVar14;
plVar6[-1] = 0;
*plVar6 = 0;
uVar5 = *(int *)(param_1 + 1) + 1;
*(uint *)(param_1 + 1) = uVar5;
if (uVar11 <= uVar14) {
local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]);
goto LAB_0016e5dc;
}
__n_00 = plVar6[2];
plVar15 = plVar6 + 2;
} while (__n_00 + uVar14 < uVar11);
local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]);
plVar6 = plVar6 + 1;
}
else {
plVar6 = local_58 + 2;
}
__n = uVar11 - uVar14;
__src = (void *)*plVar6;
memcpy(local_46 + uVar14,__src,__n);
*plVar6 = (long)__src + __n;
*plVar15 = __n_00 - __n;
}
else {
*local_58 = (long)(pbVar13 + uVar11);
local_58[1] = uVar14 - uVar11;
iVar8 = *(int *)(param_1 + 1);
*(uint *)(param_1 + 1) = iVar8 - 1U;
local_58 = (long *)((ulong)(iVar8 - 1U) * 0x10 + param_1[2]);
}
LAB_0016e5dc:
lVar7 = param_4 + 0x12;
for (pbVar12 = pbVar13 + (uVar11 - 7); pbVar13 <= pbVar12; pbVar12 = pbVar12 + -7) {
bVar1 = *pbVar12;
bVar2 = pbVar12[1];
bVar3 = pbVar12[2];
uVar5 = *(uint *)(pbVar12 + 3);
uVar14 = param_2 - ((ulong)bVar1 << 0x20 | (ulong)bVar2 << 0x28 | (ulong)bVar3 << 0x30 |
(ulong)uVar5);
uVar9 = (ushort)uVar14;
if (uVar14 < 0x4000) {
*(ushort *)(lVar7 + -2) = uVar9 << 8 | uVar9 >> 8;
lVar7 = lVar7 + -2;
}
else {
bVar4 = (byte)(uVar14 >> 0x10);
if (uVar14 < 0x400000) {
*(byte *)(lVar7 + -3) = bVar4 | 0x40;
*(ushort *)(lVar7 + -2) = uVar9;
lVar7 = lVar7 + -3;
}
else if (uVar14 < 0x40000000) {
*(byte *)(lVar7 + -4) = (byte)(uVar14 >> 0x18) | 0x80;
*(char *)(lVar7 + -3) = (char)uVar14;
*(char *)(lVar7 + -2) = (char)(uVar14 >> 8);
*(byte *)(lVar7 + -1) = bVar4;
lVar7 = lVar7 + -4;
}
else if (uVar14 >> 0x26 == 0) {
*(byte *)(lVar7 + -5) = (byte)(uVar14 >> 0x20) | 0xc0;
*(int *)(lVar7 + -4) = (int)uVar14;
lVar7 = lVar7 + -5;
}
else {
*(int2 *)(lVar7 + -9) = 0x100;
*(byte *)(lVar7 + -7) = bVar1;
*(byte *)(lVar7 + -6) = bVar2;
*(byte *)(lVar7 + -5) = bVar3;
*(uint *)(lVar7 + -4) = uVar5;
lVar7 = lVar7 + -9;
}
}
}
lVar10 = (param_4 + 0x12) - lVar7;
local_58[1] = lVar10;
iVar8 = (int)lVar10 + param_3 * -7;
*param_1 = CONCAT44(iVar8 + (int)((ulong)*param_1 >> 0x20),iVar8 + (int)*param_1);
*local_58 = lVar7;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
17,580
|
init_myisam_psi_keys
|
eloqsql/storage/myisam/mi_static.c
|
void init_myisam_psi_keys()
{
const char* category= "myisam";
int count;
count= array_elements(all_myisam_mutexes);
mysql_mutex_register(category, all_myisam_mutexes, count);
count= array_elements(all_myisam_rwlocks);
mysql_rwlock_register(category, all_myisam_rwlocks, count);
count= array_elements(all_myisam_conds);
mysql_cond_register(category, all_myisam_conds, count);
count= array_elements(all_myisam_files);
mysql_file_register(category, all_myisam_files, count);
count= array_elements(all_myisam_threads);
mysql_thread_register(category, all_myisam_threads, count);
count= array_elements(all_myisam_memory);
mysql_memory_register(category, all_myisam_memory, count);
}
|
O0
|
c
|
init_myisam_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xb63bd(%rip), %rax # 0x1544ac
movq %rax, -0x8(%rbp)
movl $0x3, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x221148(%rip), %rsi # 0x2bf250
callq 0x9e1a0
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x22117e(%rip), %rsi # 0x2bf2a0
callq 0x9e1e0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x221194(%rip), %rsi # 0x2bf2d0
callq 0x9e220
movl $0x4, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x22119a(%rip), %rsi # 0x2bf2f0
callq 0x9e260
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x2211e0(%rip), %rsi # 0x2bf350
callq 0x9e2a0
movl $0x15, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x2211e6(%rip), %rsi # 0x2bf370
callq 0x9e2e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_myisam_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aThrLockMyisam+9; "myisam"
mov [rbp+var_8], rax
mov [rbp+var_C], 3
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_mutexes
call inline_mysql_mutex_register
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_rwlocks
call inline_mysql_rwlock_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_conds
call inline_mysql_cond_register
mov [rbp+var_C], 4
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_files
call inline_mysql_file_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_threads
call inline_mysql_thread_register
mov [rbp+var_C], 15h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_memory
call inline_mysql_memory_register
add rsp, 10h
pop rbp
retn
|
long long init_myisam_psi_keys()
{
inline_mysql_mutex_register("myisam", &all_myisam_mutexes, 3LL);
inline_mysql_rwlock_register("myisam", &all_myisam_rwlocks, 2LL);
inline_mysql_cond_register("myisam", &all_myisam_conds, 1LL);
inline_mysql_file_register("myisam", &all_myisam_files, 4LL);
inline_mysql_thread_register("myisam", &all_myisam_threads, 1LL);
return inline_mysql_memory_register("myisam", &all_myisam_memory, 21LL);
}
|
init_myisam_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x2544ac]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x3
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf250]
CALL 0x0019e1a0
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf2a0]
CALL 0x0019e1e0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf2d0]
CALL 0x0019e220
MOV dword ptr [RBP + -0xc],0x4
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf2f0]
CALL 0x0019e260
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf350]
CALL 0x0019e2a0
MOV dword ptr [RBP + -0xc],0x15
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3bf370]
CALL 0x0019e2e0
ADD RSP,0x10
POP RBP
RET
|
void init_myisam_psi_keys(void)
{
inline_mysql_mutex_register("myisam",all_myisam_mutexes,3);
inline_mysql_rwlock_register("myisam",all_myisam_rwlocks,2);
inline_mysql_cond_register("myisam",all_myisam_conds,1);
inline_mysql_file_register("myisam",all_myisam_files,4);
inline_mysql_thread_register("myisam",all_myisam_threads,1);
inline_mysql_memory_register("myisam",all_myisam_memory,0x15);
return;
}
|
|
17,581
|
LefDefParser::lef_init(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefrReader.cpp
|
void
lef_init(const char *func)
{
if (lefSettings == NULL) {
lefrSettings::reset();
init_call_func = func;
}
if (lefCallbacks == NULL) {
lefrCallbacks::reset();
init_call_func = func;
}
}
|
O3
|
cpp
|
LefDefParser::lef_init(char const*):
pushq %rbx
movq %rdi, %rbx
leaq 0x5f3e5(%rip), %rax # 0x8d5b8
cmpq $0x0, (%rax)
jne 0x2e1e5
callq 0x3cbf4
movq %rbx, 0x5f22b(%rip) # 0x8d410
leaq 0x5f3c4(%rip), %rax # 0x8d5b0
cmpq $0x0, (%rax)
jne 0x2e1fe
callq 0x39724
movq %rbx, 0x5f212(%rip) # 0x8d410
popq %rbx
retq
|
_ZN12LefDefParser8lef_initEPKc:
push rbx
mov rbx, rdi
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
cmp qword ptr [rax], 0
jnz short loc_2E1E5
call _ZN12LefDefParser12lefrSettings5resetEv; LefDefParser::lefrSettings::reset(void)
mov cs:_ZN12LefDefParserL14init_call_funcE, rbx; LefDefParser::init_call_func
loc_2E1E5:
lea rax, _ZN12LefDefParser12lefCallbacksE; LefDefParser::lefCallbacks
cmp qword ptr [rax], 0
jnz short loc_2E1FE
call _ZN12LefDefParser13lefrCallbacks5resetEv; LefDefParser::lefrCallbacks::reset(void)
mov cs:_ZN12LefDefParserL14init_call_funcE, rbx; LefDefParser::init_call_func
loc_2E1FE:
pop rbx
retn
|
char * LefDefParser::lef_init(LefDefParser *this, const char *a2)
{
char *result; // rax
if ( !LefDefParser::lefSettings )
{
LefDefParser::lefrSettings::reset(this);
LefDefParser::init_call_func = (long long)this;
}
result = LefDefParser::lefCallbacks;
if ( !*(_QWORD *)LefDefParser::lefCallbacks )
{
result = (char *)LefDefParser::lefrCallbacks::reset(this);
LefDefParser::init_call_func = (long long)this;
}
return result;
}
|
lef_init:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x18d5b8]
CMP qword ptr [RAX],0x0
JNZ 0x0012e1e5
CALL 0x0013cbf4
MOV qword ptr [0x0018d410],RBX
LAB_0012e1e5:
LEA RAX,[0x18d5b0]
CMP qword ptr [RAX],0x0
JNZ 0x0012e1fe
CALL 0x00139724
MOV qword ptr [0x0018d410],RBX
LAB_0012e1fe:
POP RBX
RET
|
/* LefDefParser::lef_init(char const*) */
void LefDefParser::lef_init(char *param_1)
{
if (lefSettings == 0) {
lefrSettings::reset();
init_call_func = param_1;
}
if (lefCallbacks == 0) {
lefrCallbacks::reset();
init_call_func = param_1;
}
return;
}
|
|
17,582
|
maria_rtree_insert
|
eloqsql/storage/maria/ma_rt_index.c
|
my_bool maria_rtree_insert(MARIA_HA *info, MARIA_KEY *key)
{
int res;
MARIA_SHARE *share= info->s;
my_off_t *root, new_root;
LSN lsn= LSN_IMPOSSIBLE;
DBUG_ENTER("maria_rtree_insert");
if (!key)
DBUG_RETURN(1); /* _ma_sp_make_key failed */
root= &share->state.key_root[key->keyinfo->key_nr];
new_root= *root;
if ((res= (maria_rtree_insert_level(info, key, -1, &new_root) == -1)))
goto err;
if (share->now_transactional)
res= _ma_write_undo_key_insert(info, key, root, new_root, &lsn);
else
{
*root= new_root;
_ma_fast_unlock_key_del(info);
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
err:
DBUG_RETURN(res != 0);
}
|
O0
|
c
|
maria_rtree_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x79fe5
jmp 0x79fdc
movb $0x1, -0x1(%rbp)
jmp 0x7a0a1
movq -0x28(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0xa5(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
leaq -0x38(%rbp), %rcx
callq 0x793d0
cmpl $-0x1, %eax
sete %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x1c(%rbp)
testb $0x1, %al
jne 0x7a042
jmp 0x7a044
jmp 0x7a090
movq -0x28(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x7a06f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq -0x40(%rbp), %r8
callq 0x696a0
movl %eax, -0x1c(%rbp)
jmp 0x7a083
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x7a0b0
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7a0e0
jmp 0x7a092
cmpl $0x0, -0x1c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_rtree_insert:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov [rbp+var_40], 0
cmp [rbp+var_18], 0
jnz short loc_79FE5
jmp short $+2
loc_79FDC:
mov [rbp+var_1], 1
jmp loc_7A0A1
loc_79FE5:
mov rax, [rbp+var_28]
mov rax, [rax+118h]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
movzx ecx, byte ptr [rcx+0A5h]
shl rcx, 3
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, 0FFFFFFFFh
lea rcx, [rbp+var_38]
call maria_rtree_insert_level
cmp eax, 0FFFFFFFFh
setz al
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_1C], ecx
test al, 1
jnz short loc_7A042
jmp short loc_7A044
loc_7A042:
jmp short loc_7A090
loc_7A044:
mov rax, [rbp+var_28]
cmp byte ptr [rax+7E7h], 0
jz short loc_7A06F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_38]
lea r8, [rbp+var_40]
call _ma_write_undo_key_insert
mov [rbp+var_1C], eax
jmp short loc_7A083
loc_7A06F:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rdi, [rbp+var_10]
call _ma_fast_unlock_key_del_2
loc_7A083:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
call _ma_unpin_all_pages_and_finalize_row_3
loc_7A090:
jmp short $+2
loc_7A092:
cmp [rbp+var_1C], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_7A0A1:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
bool maria_rtree_insert(long long *a1, float **a2)
{
bool v2; // al
long long v4; // [rsp+0h] [rbp-40h] BYREF
long long v5; // [rsp+8h] [rbp-38h] BYREF
long long *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
int v8; // [rsp+24h] [rbp-1Ch]
float **v9; // [rsp+28h] [rbp-18h]
long long *v10; // [rsp+30h] [rbp-10h]
v10 = a1;
v9 = a2;
v7 = *a1;
v4 = 0LL;
if ( !a2 )
return 1;
v6 = (long long *)(8LL * *((unsigned __int8 *)v9[1] + 165) + *(_QWORD *)(v7 + 280));
v5 = *v6;
v2 = (unsigned int)maria_rtree_insert_level(v10, (long long)v9, 0xFFFFFFFF, &v5) == -1;
v8 = v2;
if ( !v2 )
{
if ( *(_BYTE *)(v7 + 2023) )
{
v8 = ma_write_undo_key_insert(v10, v9, (long long)v6, v5, (long long)&v4);
}
else
{
*v6 = v5;
ma_fast_unlock_key_del_2(v10);
}
ma_unpin_all_pages_and_finalize_row_3(v10, v4);
}
return v8 != 0;
}
|
maria_rtree_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x0
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00179fe5
JMP 0x00179fdc
LAB_00179fdc:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017a0a1
LAB_00179fe5:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0xffffffff
LEA RCX,[RBP + -0x38]
CALL 0x001793d0
CMP EAX,-0x1
SETZ AL
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x1c],ECX
TEST AL,0x1
JNZ 0x0017a042
JMP 0x0017a044
LAB_0017a042:
JMP 0x0017a090
LAB_0017a044:
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x0017a06f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
LEA R8,[RBP + -0x40]
CALL 0x001696a0
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0017a083
LAB_0017a06f:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0017a0b0
LAB_0017a083:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x0017a0e0
LAB_0017a090:
JMP 0x0017a092
LAB_0017a092:
CMP dword ptr [RBP + -0x1c],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_0017a0a1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int8 maria_rtree_insert(long *param_1,long param_2)
{
int iVar1;
int8 local_48;
int8 local_40;
int8 *local_38;
long local_30;
uint local_24;
long local_20;
long *local_18;
bool local_9;
local_30 = *param_1;
local_48 = 0;
if (param_2 == 0) {
local_9 = true;
}
else {
local_38 = (int8 *)
(*(long *)(local_30 + 0x118) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8);
local_40 = *local_38;
local_20 = param_2;
local_18 = param_1;
iVar1 = maria_rtree_insert_level(param_1,param_2,0xffffffff,&local_40);
local_24 = (uint)(iVar1 == -1);
if (iVar1 != -1) {
if (*(char *)(local_30 + 0x7e7) == '\0') {
*local_38 = local_40;
_ma_fast_unlock_key_del(local_18);
}
else {
local_24 = _ma_write_undo_key_insert(local_18,local_20,local_38,local_40,&local_48);
}
_ma_unpin_all_pages_and_finalize_row(local_18,local_48);
}
local_9 = local_24 != 0;
local_30 = 0;
}
return CONCAT71((int7)((ulong)local_30 >> 8),local_9);
}
|
|
17,583
|
ma_check_index_cond
|
eloqsql/storage/maria/ma_key.c
|
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
uchar *record)
{
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
_ma_print_error(info, HA_ERR_CRASHED, 0);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
return res;
}
|
O0
|
c
|
ma_check_index_cond:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x6f8(%rax)
je 0x424d4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq 0x41de0
cmpl $0x0, %eax
je 0x42496
movq -0x8(%rbp), %rdi
movl $0x7e, %esi
xorl %edx, %edx
callq 0x36fe0
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xf7b30
movl $0x7e, (%rax)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x424d2
movq -0x8(%rbp), %rax
movq 0x6f8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x700(%rcx), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x2, %eax
jne 0x424d0
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xf7b30
movl $0x89, (%rax)
jmp 0x424d2
jmp 0x424d4
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
ma_check_index_cond:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 1
mov rax, [rbp+var_8]
cmp qword ptr [rax+6F8h], 0
jz loc_424D4
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_18]
xor edx, edx
call _ma_put_key_in_record
cmp eax, 0
jz short loc_42496
mov rdi, [rbp+var_8]
mov esi, 7Eh ; '~'
xor edx, edx
call _ma_print_error
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_1C], 0FFFFFFFFh
jmp short loc_424D2
loc_42496:
mov rax, [rbp+var_8]
mov rax, [rax+6F8h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+700h]
call rax
mov [rbp+var_1C], eax
cmp eax, 2
jnz short loc_424D0
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 89h
loc_424D0:
jmp short $+2
loc_424D2:
jmp short $+2
loc_424D4:
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
|
long long ma_check_index_cond(long long a1, unsigned int a2, long long a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // r9d
long long v6; // rdi
unsigned int v8; // [rsp+4h] [rbp-1Ch]
v8 = 1;
if ( *(_QWORD *)(a1 + 1784) )
{
if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) )
{
ma_print_error((_DWORD *)a1, 126, 0, v3, v4, v5);
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var(a1, (_BYTE *)&dword_7C + 2) = 126;
return (unsigned int)-1;
}
else
{
v6 = *(_QWORD *)(a1 + 1792);
v8 = (*(long long ( **)(long long))(a1 + 1784))(v6);
if ( v8 == 2 )
{
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var(v6, (const char *)a2) = 137;
}
}
}
return v8;
}
|
ma_check_index_cond:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x6f8],0x0
JZ 0x001424d4
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x00141de0
CMP EAX,0x0
JZ 0x00142496
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x7e
XOR EDX,EDX
CALL 0x00136fe0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001f7b30
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x1c],0xffffffff
JMP 0x001424d2
LAB_00142496:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x6f8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x700]
CALL RAX
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x2
JNZ 0x001424d0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001f7b30
MOV dword ptr [RAX],0x89
LAB_001424d0:
JMP 0x001424d2
LAB_001424d2:
JMP 0x001424d4
LAB_001424d4:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int ma_check_index_cond(long param_1,int4 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int4 local_24;
local_24 = 1;
if (*(long *)(param_1 + 0x6f8) != 0) {
iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 == 0) {
local_24 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700));
if (local_24 == 2) {
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x89;
}
}
else {
_ma_print_error(param_1,0x7e,0);
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_24 = -1;
}
}
return local_24;
}
|
|
17,584
|
translog_wait_for_buffer_free
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_wait_for_buffer_free(struct st_translog_buffer *buffer)
{
TRANSLOG_ADDRESS offset= buffer->offset;
TRANSLOG_FILE *file= buffer->file;
uint8 ver= buffer->ver;
DBUG_ENTER("translog_wait_for_buffer_free");
DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u "
"is closing %u File: %d size: %lu",
(uint) buffer->buffer_no, buffer,
(uint) buffer->copy_to_buffer_in_progress,
(uint) buffer->is_closing_buffer,
(buffer->file ? buffer->file->handler.file : -1),
(ulong) buffer->size));
translog_wait_for_writers(buffer);
if (offset != buffer->offset || file != buffer->file || ver != buffer->ver)
DBUG_VOID_RETURN; /* the buffer if already freed */
while (buffer->file != NULL)
{
DBUG_PRINT("info", ("wait for writers... buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex);
DBUG_PRINT("info", ("wait for writers done. buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
}
DBUG_ASSERT(buffer->copy_to_buffer_in_progress == 0);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_wait_for_buffer_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x100010(%rdi), %r12
movq 0x100038(%rdi), %r14
movb 0x1000d9(%rdi), %r15b
callq 0x3b45c
cmpq 0x100010(%rbx), %r12
jne 0x3c3b3
cmpq 0x100038(%rbx), %r14
jne 0x3c3b3
cmpb 0x1000d9(%rbx), %r15b
setne %al
testq %r14, %r14
sete %cl
orb %al, %cl
je 0x3c3bc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x100040(%rbx), %r14
leaq 0x100090(%rbx), %r15
leaq 0xa4c87(%rip), %r12 # 0xe1058
cmpq $0x0, 0x100070(%rbx)
jne 0x3c3f2
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a460
cmpq $0x0, 0x100038(%rbx)
jne 0x3c3d1
jmp 0x3c3b3
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x832, %ecx # imm = 0x832
callq 0x30914
jmp 0x3c3e6
|
translog_wait_for_buffer_free:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov r12, ds:qword_100010[rdi]
mov r14, ds:qword_100038[rdi]
mov r15b, ds:byte_1000D9[rdi]
call translog_wait_for_writers
cmp r12, ds:qword_100010[rbx]
jnz short loc_3C3B3
cmp r14, ds:qword_100038[rbx]
jnz short loc_3C3B3
cmp r15b, ds:byte_1000D9[rbx]
setnz al
test r14, r14
setz cl
or cl, al
jz short loc_3C3BC
loc_3C3B3:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3C3BC:
lea r14, unk_100040[rbx]
lea r15, unk_100090[rbx]
lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
loc_3C3D1:
cmp ds:qword_100070[rbx], 0
jnz short loc_3C3F2
mov rdi, r14
mov rsi, r15
call _pthread_cond_wait
loc_3C3E6:
cmp ds:qword_100038[rbx], 0
jnz short loc_3C3D1
jmp short loc_3C3B3
loc_3C3F2:
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov ecx, 832h
call psi_cond_wait
jmp short loc_3C3E6
|
unsigned __int8 translog_wait_for_buffer_free(long long a1)
{
long long v1; // r12
long long v2; // r14
char v3; // r15
unsigned __int8 result; // al
v1 = *(long long *)((char *)&qword_100010 + a1);
v2 = *(long long *)((char *)&qword_100038 + a1);
v3 = byte_1000D9[a1];
result = translog_wait_for_writers(a1);
if ( v1 == *(long long *)((char *)&qword_100010 + a1) && v2 == *(long long *)((char *)&qword_100038 + a1) )
{
result = v3 != byte_1000D9[a1];
if ( !(result | (v2 == 0)) )
{
do
{
if ( *(long long *)((char *)&qword_100070 + a1) )
result = psi_cond_wait(
(long long)&unk_100040 + a1,
(long long)&unk_100090 + a1,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x832u);
else
result = pthread_cond_wait((char *)&unk_100040 + a1, (char *)&unk_100090 + a1);
}
while ( *(long long *)((char *)&qword_100038 + a1) );
}
}
return result;
}
|
translog_wait_for_buffer_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x100010]
MOV R14,qword ptr [RDI + 0x100038]
MOV R15B,byte ptr [RDI + 0x1000d9]
CALL 0x0013b45c
CMP R12,qword ptr [RBX + 0x100010]
JNZ 0x0013c3b3
CMP R14,qword ptr [RBX + 0x100038]
JNZ 0x0013c3b3
CMP R15B,byte ptr [RBX + 0x1000d9]
SETNZ AL
TEST R14,R14
SETZ CL
OR CL,AL
JZ 0x0013c3bc
LAB_0013c3b3:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013c3bc:
LEA R14,[RBX + 0x100040]
LEA R15,[RBX + 0x100090]
LEA R12,[0x1e1058]
LAB_0013c3d1:
CMP qword ptr [RBX + 0x100070],0x0
JNZ 0x0013c3f2
MOV RDI,R14
MOV RSI,R15
CALL 0x0012a460
LAB_0013c3e6:
CMP qword ptr [RBX + 0x100038],0x0
JNZ 0x0013c3d1
JMP 0x0013c3b3
LAB_0013c3f2:
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
MOV ECX,0x832
CALL 0x00130914
JMP 0x0013c3e6
|
void translog_wait_for_buffer_free(long param_1)
{
pthread_cond_t *__cond;
pthread_mutex_t *__mutex;
char cVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1);
translog_wait_for_writers();
if (((lVar2 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7)) &&
(lVar3 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f))) &&
(lVar3 != 0 && cVar1 == *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1)))
{
__cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1);
do {
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) {
pthread_cond_wait(__cond,__mutex);
}
else {
psi_cond_wait(__cond,__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x832
);
}
} while (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0);
}
return;
}
|
|
17,585
|
insert_dynamic
|
eloqsql/mysys/array.c
|
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element)
{
void *buffer;
if (array->elements == array->max_element)
{ /* Call only when necessary */
if (!(buffer=alloc_dynamic(array)))
return TRUE;
}
else
{
buffer=array->buffer+(array->elements * array->size_of_element);
array->elements++;
}
memcpy(buffer,element,(size_t) array->size_of_element);
return FALSE;
}
|
O3
|
c
|
insert_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %ecx
cmpl 0xc(%rdi), %ecx
jne 0x948d5
movq %r14, %rdi
callq 0x948fc
testq %rax, %rax
je 0x948f8
movq %rax, %rdi
movl 0x14(%r14), %eax
jmp 0x948e7
movl 0x14(%r14), %eax
movl %eax, %edi
imull %ecx, %edi
addq (%r14), %rdi
incl %ecx
movl %ecx, 0x8(%r14)
movl %eax, %edx
movq %rbx, %rsi
callq 0x29090
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
jmp 0x948f3
|
insert_dynamic:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov ecx, [rdi+8]
cmp ecx, [rdi+0Ch]
jnz short loc_948D5
mov rdi, r14
call alloc_dynamic
test rax, rax
jz short loc_948F8
mov rdi, rax
mov eax, [r14+14h]
jmp short loc_948E7
loc_948D5:
mov eax, [r14+14h]
mov edi, eax
imul edi, ecx
add rdi, [r14]
inc ecx
mov [r14+8], ecx
loc_948E7:
mov edx, eax
mov rsi, rbx
call _memcpy
xor eax, eax
loc_948F3:
pop rbx
pop r14
pop rbp
retn
loc_948F8:
mov al, 1
jmp short loc_948F3
|
long long insert_dynamic(long long a1, long long a2)
{
int v3; // ecx
long long v4; // rax
long long v5; // rdi
unsigned int v6; // eax
v3 = *(_DWORD *)(a1 + 8);
if ( v3 != *(_DWORD *)(a1 + 12) )
{
v6 = *(_DWORD *)(a1 + 20);
v5 = *(_QWORD *)a1 + v3 * v6;
*(_DWORD *)(a1 + 8) = v3 + 1;
goto LABEL_5;
}
v4 = alloc_dynamic(a1);
if ( v4 )
{
v5 = v4;
v6 = *(_DWORD *)(a1 + 20);
LABEL_5:
memcpy(v5, a2, v6);
return 0LL;
}
return 1LL;
}
|
insert_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ECX,dword ptr [RDI + 0x8]
CMP ECX,dword ptr [RDI + 0xc]
JNZ 0x001948d5
MOV RDI,R14
CALL 0x001948fc
TEST RAX,RAX
JZ 0x001948f8
MOV RDI,RAX
MOV EAX,dword ptr [R14 + 0x14]
JMP 0x001948e7
LAB_001948d5:
MOV EAX,dword ptr [R14 + 0x14]
MOV EDI,EAX
IMUL EDI,ECX
ADD RDI,qword ptr [R14]
INC ECX
MOV dword ptr [R14 + 0x8],ECX
LAB_001948e7:
MOV EDX,EAX
MOV RSI,RBX
CALL 0x00129090
XOR EAX,EAX
LAB_001948f3:
POP RBX
POP R14
POP RBP
RET
LAB_001948f8:
MOV AL,0x1
JMP 0x001948f3
|
int8 insert_dynamic(long *param_1,void *param_2)
{
int iVar1;
uint uVar2;
void *__dest;
iVar1 = (int)param_1[1];
if (iVar1 == *(int *)((long)param_1 + 0xc)) {
__dest = (void *)alloc_dynamic(param_1);
if (__dest == (void *)0x0) {
return 1;
}
uVar2 = *(uint *)((long)param_1 + 0x14);
}
else {
uVar2 = *(uint *)((long)param_1 + 0x14);
__dest = (void *)((ulong)(uVar2 * iVar1) + *param_1);
*(int *)(param_1 + 1) = iVar1 + 1;
}
memcpy(__dest,param_2,(ulong)uVar2);
return 0;
}
|
|
17,586
|
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& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) const
|
llama.cpp/common/json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xb00b9
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xb00a3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f60
testl %eax, %eax
je 0xb0098
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xb0079
jmp 0xb009b
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xb0117
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21630
movq %rax, %rbx
movq %r14, %rdi
callq 0x8a8b0
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x6cbdd(%rip), %rsi # 0x11ccb8
leaq 0x20(%rsp), %rdi
callq 0x7fe2d
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0xbc1b8
xorl %ebp, %ebp
leaq 0xb2f2a(%rip), %rsi # 0x163030
leaq -0x3998d(%rip), %rdx # 0x76780
movq %rbx, %rdi
callq 0x21a50
jmp 0xb0190
movl $0x20, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x21660
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x289fc
leaq 0x6cb82(%rip), %rsi # 0x11ccce
leaq 0x6cb81(%rip), %rcx # 0x11ccd4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7feb5
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xd1230
xorl %ebp, %ebp
leaq 0xb2e2f(%rip), %rsi # 0x162fb0
leaq -0x39a08(%rip), %rdx # 0x76780
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb01ae
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb01f9
movq 0x10(%rsp), %rsi
jmp 0xb01f1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb0203
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xb0203
jmp 0xb0200
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb01f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xb0203
jmp 0xb020b
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f00
movq %r14, %rdi
callq 0x21af0
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_B00B9
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_B00A3
loc_B0079:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_B0098
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_B0079
jmp short loc_B009B
loc_B0098:
mov rax, rbx
loc_B009B:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_B00A3:
cmp rax, rbx
jz short loc_B0117
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_B00B9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_B0190
loc_B0117:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_B0190:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B01AE
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B01AE:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_B01F9
mov rsi, [rsp+68h+var_58]
jmp short loc_B01F1
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_B0203
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B0203
jmp short loc_B0200
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B01F9
mov rsi, [rsp+68h+var_38]
loc_B01F1:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B01F9:
test bpl, bpl
jnz short loc_B0203
jmp short loc_B020B
loc_B0200:
mov r14, rax
loc_B0203:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B020B:
mov rdi, r14
call __Unwind_Resume
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001b00b9
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001b00a3
LAB_001b0079:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00121f60
TEST EAX,EAX
JZ 0x001b0098
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001b0079
JMP 0x001b009b
LAB_001b0098:
MOV RAX,RBX
LAB_001b009b:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001b00a3:
CMP RAX,RBX
JZ 0x001b0117
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001b00b9:
MOV EDI,0x20
CALL 0x00121630
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018a8b0
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001b00d4:
LEA RSI,[0x21ccb8]
LEA RDI,[RSP + 0x20]
CALL 0x0017fe2d
MOV BPL,0x1
LAB_001b00e8:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001bc1b8
XOR EBP,EBP
LEA RSI,[0x263030]
LEA RDX,[0x176780]
MOV RDI,RBX
CALL 0x00121a50
LAB_001b0117:
MOV EDI,0x20
CALL 0x00121630
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00121660
LEA RDX,[RAX + R15*0x1]
LAB_001b013a:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001289fc
LAB_001b0145:
LEA RSI,[0x21ccce]
LEA RCX,[0x21ccd4]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017feb5
MOV BPL,0x1
LAB_001b0163:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001d1230
XOR EBP,EBP
LEA RSI,[0x262fb0]
LEA RDX,[0x176780]
MOV RDI,RBX
CALL 0x00121a50
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001b00d4 to 001b00e4 has its CatchHandler @ 001b0200 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001b00e8 to 001b0114 has its CatchHandler @ 001b01db */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001b013a to 001b0144 has its CatchHandler @ 001b01d9 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001b0145 to 001b015f has its CatchHandler @ 001b01be */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001b0163 to 001b018f has its CatchHandler @ 001b0190 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
17,587
|
my_collation_get_by_name
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *
my_collation_get_by_name(MY_CHARSET_LOADER *loader,
const char *name, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_collation_number(name,flags);
my_charset_loader_init_mysys(loader);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file);
}
return cs;
}
|
O3
|
c
|
my_collation_get_by_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x345517(%rip), %rdi # 0x36d9f0
leaq -0x7e1(%rip), %rsi # 0x27cff
callq 0x242b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27c53
movb $0x0, (%r15)
leaq -0xfc9(%rip), %rcx # 0x27532
movq %rcx, 0x80(%r15)
leaq -0xfc8(%rip), %rcx # 0x27541
movq %rcx, 0x88(%r15)
leaq -0xfbb(%rip), %rcx # 0x2755c
movq %rcx, 0x90(%r15)
leaq 0x2dd5(%rip), %rcx # 0x2b2fa
movq %rcx, 0x98(%r15)
leaq 0x2c62f5(%rip), %rcx # 0x2ee828
movq (%rcx), %rcx
movq %rcx, 0xa0(%r15)
leaq -0xfca(%rip), %rcx # 0x2757a
movq %rcx, 0xa8(%r15)
testl %eax, %eax
je 0x28561
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x2818e
movq %rax, %r15
jmp 0x28564
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x285ae
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x27abf
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movl $0x4, %esi
movl $0x1c, %edi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2a6c3
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x285ce
movq %r15, %rax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24330
|
my_collation_get_by_name:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 218h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
mov rsi, r14
call get_collation_number
mov byte ptr [r15], 0
lea rcx, my_once_alloc_c
mov [r15+80h], rcx
lea rcx, my_malloc_c
mov [r15+88h], rcx
lea rcx, my_realloc_c
mov [r15+90h], rcx
lea rcx, my_free
mov [r15+98h], rcx
lea rcx, my_charset_error_reporter
mov rcx, [rcx]
mov [r15+0A0h], rcx
lea rcx, add_collation
mov [r15+0A8h], rcx
test eax, eax
jz short loc_28561
mov rdi, r15
mov esi, eax
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_28564
loc_28561:
xor r15d, r15d
loc_28564:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_285AE
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov esi, 4
mov edi, 1Ch
mov rdx, rbx
mov rcx, r14
xor eax, eax
call my_error
loc_285AE:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_285CE
mov rax, r15
add rsp, 218h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_285CE:
call ___stack_chk_fail
|
long long my_collation_get_by_name(long long a1, long long a2, long long a3)
{
unsigned int collation_number; // eax
long long internal_charset; // r15
int v6; // r8d
int v7; // r9d
char v9[528]; // [rsp+0h] [rbp-230h] BYREF
unsigned long long v10; // [rsp+210h] [rbp-20h]
v10 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number = get_collation_number(a2, a3);
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 128) = my_once_alloc_c;
*(_QWORD *)(a1 + 136) = my_malloc_c;
*(_QWORD *)(a1 + 144) = my_realloc_c;
*(_QWORD *)(a1 + 152) = my_free;
*(_QWORD *)(a1 + 160) = my_charset_error_reporter;
*(_QWORD *)(a1 + 168) = add_collation;
if ( collation_number )
internal_charset = get_internal_charset(a1, collation_number, a3);
else
internal_charset = 0LL;
if ( internal_charset == 0 && (a3 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v9), "Index.xml");
my_error(28, 4, a2, (unsigned int)v9, v6, v7, v9[0]);
}
return internal_charset;
}
|
my_collation_get_by_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x218
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[0x46d9f0]
LEA RSI,[0x127cff]
CALL 0x001242b0
MOV RDI,RBX
MOV RSI,R14
CALL 0x00127c53
MOV byte ptr [R15],0x0
LEA RCX,[0x127532]
MOV qword ptr [R15 + 0x80],RCX
LEA RCX,[0x127541]
MOV qword ptr [R15 + 0x88],RCX
LEA RCX,[0x12755c]
MOV qword ptr [R15 + 0x90],RCX
LEA RCX,[0x12b2fa]
MOV qword ptr [R15 + 0x98],RCX
LEA RCX,[0x3ee828]
MOV RCX,qword ptr [RCX]
MOV qword ptr [R15 + 0xa0],RCX
LEA RCX,[0x12757a]
MOV qword ptr [R15 + 0xa8],RCX
TEST EAX,EAX
JZ 0x00128561
MOV RDI,R15
MOV ESI,EAX
MOV RDX,R14
CALL 0x0012818e
MOV R15,RAX
JMP 0x00128564
LAB_00128561:
XOR R15D,R15D
LAB_00128564:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x001285ae
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x00127abf
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV ESI,0x4
MOV EDI,0x1c
MOV RDX,RBX
MOV RCX,R14
XOR EAX,EAX
CALL 0x0012a6c3
LAB_001285ae:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001285ce
MOV RAX,R15
ADD RSP,0x218
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001285ce:
CALL 0x00124330
|
long my_collation_get_by_name(int1 *param_1,int8 param_2,ulong param_3)
{
int iVar1;
long lVar2;
int8 *puVar3;
long in_FS_OFFSET;
int1 local_238 [528];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_collation_number(param_2,param_3);
*param_1 = 0;
*(code **)(param_1 + 0x80) = my_once_alloc_c;
*(code **)(param_1 + 0x88) = my_malloc_c;
*(code **)(param_1 + 0x90) = my_realloc_c;
*(code **)(param_1 + 0x98) = my_free;
*(int **)(param_1 + 0xa0) = my_charset_error_reporter;
*(code **)(param_1 + 0xa8) = add_collation;
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = get_internal_charset(param_1,iVar1,param_3);
}
if ((param_3 & 0x10) != 0 && lVar2 == 0) {
puVar3 = (int8 *)get_charsets_dir(local_238);
*puVar3 = 0x6d782e7865646e49;
*(int2 *)(puVar3 + 1) = 0x6c;
my_error(0x1c,4,param_2,local_238);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
17,588
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*)
|
ng-log[P]ng-log/src/signalhandler.cc
|
void DumpStackFrameInfo(const char* prefix, void* pc) {
// Get the symbol name.
const char* symbol = "(unknown)";
#if defined(HAVE_SYMBOLIZE)
char symbolized[1024]; // Big enough for a sane symbol.
// Symbolizes the previous address of pc because pc may be in the
// next function.
if (Symbolize(reinterpret_cast<char*>(pc) - 1, symbolized,
sizeof(symbolized))) {
symbol = symbolized;
}
#else
# pragma message( \
"Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
#endif // defined(HAVE_SYMBOLIZE)
char buf[1024]; // Big enough for stack frame info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString(prefix);
formatter.AppendString("@ ");
const int width = 2 * sizeof(void*) + 2; // + 2 for "0x".
formatter.AppendHexWithPadding(reinterpret_cast<uintptr_t>(pc), width);
formatter.AppendString(" ");
formatter.AppendString(symbol);
formatter.AppendString("\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*):
pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp # imm = 0x850
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x789e(%rip), %rax # 0x6fc28
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $-0x1, %rdi
leaq -0x420(%rbp), %rsi
movl $0x400, %edx # imm = 0x400
xorl %ecx, %ecx
callq 0x692a0
testb $0x1, %al
jne 0x683af
jmp 0x683ba
leaq -0x420(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x820(%rbp), %rsi
leaq -0x838(%rbp), %rdi
movl $0x400, %edx # imm = 0x400
callq 0x68800
movq -0x8(%rbp), %rsi
leaq -0x838(%rbp), %rdi
callq 0x68840
leaq -0x838(%rbp), %rdi
leaq 0x8f1e(%rip), %rsi # 0x7130e
callq 0x68840
movl $0x12, -0x83c(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x838(%rbp), %rdi
movl $0x12, %edx
callq 0x689d0
leaq -0x838(%rbp), %rdi
leaq 0x8e9c(%rip), %rsi # 0x712be
callq 0x68840
movq -0x18(%rbp), %rsi
leaq -0x838(%rbp), %rdi
callq 0x68840
leaq -0x838(%rbp), %rdi
leaq 0x7d8f(%rip), %rsi # 0x701d4
callq 0x68840
movq 0x3387f(%rip), %rax # 0x9bcd0
movq %rax, -0x848(%rbp)
leaq -0x820(%rbp), %rax
movq %rax, -0x850(%rbp)
leaq -0x838(%rbp), %rdi
callq 0x689b0
movq -0x850(%rbp), %rdi
movq %rax, %rsi
movq -0x848(%rbp), %rax
callq *%rax
addq $0x850, %rsp # imm = 0x850
popq %rbp
retq
nop
|
_ZN5nglog12_GLOBAL__N_118DumpStackFrameInfoEPKcPv:
push rbp
mov rbp, rsp
sub rsp, 850h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, aUnknown; "(unknown)"
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
add rdi, 0FFFFFFFFFFFFFFFFh
lea rsi, [rbp+var_420]
mov edx, 400h
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, 1
jnz short loc_683AF
jmp short loc_683BA
loc_683AF:
lea rax, [rbp+var_420]
mov [rbp+var_18], rax
loc_683BA:
lea rsi, [rbp+var_820]; char *
lea rdi, [rbp+var_838]; this
mov edx, 400h; unsigned __int64
call _ZN5nglog12_GLOBAL__N_116MinimalFormatterC2EPcm; nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(char *,ulong)
mov rsi, [rbp+var_8]; char *
lea rdi, [rbp+var_838]; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_838]; this
lea rsi, asc_7130E; "@ "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov [rbp+var_83C], 12h
mov rsi, [rbp+var_10]; unsigned __int64
lea rdi, [rbp+var_838]; this
mov edx, 12h; int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter20AppendHexWithPaddingEmi; nglog::`anonymous namespace'::MinimalFormatter::AppendHexWithPadding(ulong,int)
lea rdi, [rbp+var_838]; this
lea rsi, asc_712BB+3; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rsi, [rbp+var_18]; char *
lea rdi, [rbp+var_838]; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_838]; this
lea rsi, asc_701D3+1; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rax, cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::g_failure_writer
mov [rbp+var_848], rax
lea rax, [rbp+var_820]
mov [rbp+var_850], rax
lea rdi, [rbp+var_838]; this
call _ZNK5nglog12_GLOBAL__N_116MinimalFormatter17num_bytes_writtenEv; nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written(void)
mov rdi, [rbp+var_850]
mov rsi, rax
mov rax, [rbp+var_848]
call rax
add rsp, 850h
pop rbp
retn
|
long long nglog::`anonymous namespace'::DumpStackFrameInfo(
nglog::_anonymous_namespace_ *this,
const char *a2,
void *a3)
{
long long v3; // rax
long long ( *v5)(nglog::_anonymous_namespace_ *__hidden, const char *, unsigned long long); // [rsp+8h] [rbp-848h]
char v6[24]; // [rsp+18h] [rbp-838h] BYREF
char v7[1024]; // [rsp+30h] [rbp-820h] BYREF
_BYTE v8[1032]; // [rsp+430h] [rbp-420h] BYREF
char *v9; // [rsp+838h] [rbp-18h]
unsigned long long v10; // [rsp+840h] [rbp-10h]
char *v11; // [rsp+848h] [rbp-8h]
v11 = (char *)this;
v10 = (unsigned long long)a2;
v9 = "(unknown)";
if ( (nglog::tools::Symbolize(a2 - 1, v8, 1024LL, 0LL) & 1) != 0 )
v9 = v8;
nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v7,
0x400uLL);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v11);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
"@ ");
nglog::`anonymous namespace'::MinimalFormatter::AppendHexWithPadding(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v10,
18);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
" ");
nglog::`anonymous namespace'::MinimalFormatter::AppendString((nglog::_anonymous_namespace_::MinimalFormatter *)v6, v9);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
"\n");
v5 = nglog::`anonymous namespace'::g_failure_writer;
v3 = nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written((nglog::_anonymous_namespace_::MinimalFormatter *)v6);
return ((long long ( *)(char *, long long))v5)(v7, v3);
}
|
DumpStackFrameInfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x850
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x16fc28]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,-0x1
LEA RSI,[RBP + -0x420]
MOV EDX,0x400
XOR ECX,ECX
CALL 0x001692a0
TEST AL,0x1
JNZ 0x001683af
JMP 0x001683ba
LAB_001683af:
LEA RAX,[RBP + -0x420]
MOV qword ptr [RBP + -0x18],RAX
LAB_001683ba:
LEA RSI,[RBP + -0x820]
LEA RDI,[RBP + -0x838]
MOV EDX,0x400
CALL 0x00168800
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x838]
CALL 0x00168840
LEA RDI,[RBP + -0x838]
LEA RSI,[0x17130e]
CALL 0x00168840
MOV dword ptr [RBP + -0x83c],0x12
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x838]
MOV EDX,0x12
CALL 0x001689d0
LEA RDI,[RBP + -0x838]
LEA RSI,[0x1712be]
CALL 0x00168840
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x838]
CALL 0x00168840
LEA RDI,[RBP + -0x838]
LEA RSI,[0x1701d4]
CALL 0x00168840
MOV RAX,qword ptr [0x0019bcd0]
MOV qword ptr [RBP + -0x848],RAX
LEA RAX,[RBP + -0x820]
MOV qword ptr [RBP + -0x850],RAX
LEA RDI,[RBP + -0x838]
CALL 0x001689b0
MOV RDI,qword ptr [RBP + -0x850]
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x848]
CALL RAX
ADD RSP,0x850
POP RBP
RET
|
/* nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) */
void nglog::(anonymous_namespace)::DumpStackFrameInfo(char *param_1,void *param_2)
{
int *puVar1;
ulong uVar2;
int8 uVar3;
MinimalFormatter local_840 [24];
char local_828 [1024];
char local_428 [1032];
char *local_20;
void *local_18;
char *local_10;
local_20 = "(unknown)";
local_18 = param_2;
local_10 = param_1;
uVar2 = tools::Symbolize((long)param_2 + -1,local_428,0x400,0);
if ((uVar2 & 1) != 0) {
local_20 = local_428;
}
MinimalFormatter::MinimalFormatter(local_840,local_828,0x400);
MinimalFormatter::AppendString(local_840,local_10);
MinimalFormatter::AppendString(local_840,"@ ");
MinimalFormatter::AppendHexWithPadding(local_840,(ulong)local_18,0x12);
MinimalFormatter::AppendString(local_840," ");
MinimalFormatter::AppendString(local_840,local_20);
MinimalFormatter::AppendString(local_840,"\n");
puVar1 = g_failure_writer;
uVar3 = MinimalFormatter::num_bytes_written(local_840);
(*(code *)puVar1)(local_828,uVar3);
return;
}
|
|
17,589
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*)
|
ng-log[P]ng-log/src/signalhandler.cc
|
void DumpStackFrameInfo(const char* prefix, void* pc) {
// Get the symbol name.
const char* symbol = "(unknown)";
#if defined(HAVE_SYMBOLIZE)
char symbolized[1024]; // Big enough for a sane symbol.
// Symbolizes the previous address of pc because pc may be in the
// next function.
if (Symbolize(reinterpret_cast<char*>(pc) - 1, symbolized,
sizeof(symbolized))) {
symbol = symbolized;
}
#else
# pragma message( \
"Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
#endif // defined(HAVE_SYMBOLIZE)
char buf[1024]; // Big enough for stack frame info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString(prefix);
formatter.AppendString("@ ");
const int width = 2 * sizeof(void*) + 2; // + 2 for "0x".
formatter.AppendHexWithPadding(reinterpret_cast<uintptr_t>(pc), width);
formatter.AppendString(" ");
formatter.AppendString(symbol);
formatter.AppendString("\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
|
O2
|
cpp
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x820, %rsp # imm = 0x820
movq %rsi, %r14
movq %rdi, %r15
leaq -0x1(%rsi), %rdi
leaq 0x420(%rsp), %rbx
movl $0x400, %edx # imm = 0x400
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x29b40
movl %eax, %ebp
leaq 0x20(%rsp), %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movq %rax, 0x8(%r12)
leaq 0x420(%rsp), %rax
movq %rax, 0x10(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x29722
leaq 0x5afd(%rip), %rsi # 0x2f15e
movq %r12, %rdi
callq 0x29722
movq 0x8(%r12), %r15
leaq 0x5bee(%rip), %rsi # 0x2f263
movq %r12, %rdi
callq 0x29722
pushq $0x10
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2974a
movq 0x8(%r12), %rdx
leaq 0x12(%r15), %r12
cmpq %r12, %rdx
jae 0x296c3
movq %r12, %r14
subq %rdx, %r14
subq %r15, %rdx
je 0x296b0
leaq (%r15,%r14), %rdi
movq %r15, %rsi
callq 0x8b80
pushq $0x20
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x83b0
movq %r12, 0x10(%rsp)
leaq 0x43be(%rip), %r14 # 0x2da88
testb %bpl, %bpl
cmovneq %rbx, %r14
leaq 0x5a36(%rip), %rsi # 0x2f10e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x29722
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29722
leaq 0x4931(%rip), %rsi # 0x2e028
movq %rbx, %rdi
callq 0x29722
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq *0x193ef(%rip) # 0x42b00
addq $0x820, %rsp # imm = 0x820
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN5nglog12_GLOBAL__N_118DumpStackFrameInfoEPKcPv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 820h
mov r14, rsi
mov r15, rdi
lea rdi, [rsi-1]
lea rbx, [rsp+848h+var_428]
mov edx, 400h
mov rsi, rbx
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
mov ebp, eax
lea rax, [rsp+848h+var_828]
lea r12, [rsp+848h+var_840]
mov [r12], rax
mov [r12+8], rax
lea rax, [rsp+848h+var_428]
mov [r12+10h], rax
mov rdi, r12; this
mov rsi, r15; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rsi, asc_2F15E; "@ "
mov rdi, r12; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov r15, [r12+8]
lea rsi, a0x_0+1; char *
mov rdi, r12; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
push 10h
pop rdx; unsigned int
mov rdi, r12; this
mov rsi, r14; unsigned __int64
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
mov rdx, [r12+8]
lea r12, [r15+12h]
cmp rdx, r12
jnb short loc_296C3
mov r14, r12
sub r14, rdx
sub rdx, r15
jz short loc_296B0
lea rdi, [r15+r14]
mov rsi, r15
call _memmove
loc_296B0:
push 20h ; ' '
pop rsi
mov rdi, r15
mov rdx, r14
call _memset
mov [rsp+848h+var_838], r12
loc_296C3:
lea r14, aUnknown; "(unknown)"
test bpl, bpl
cmovnz r14, rbx
lea rsi, asc_2F10B+3; char *
lea rbx, [rsp+848h+var_840]
mov rdi, rbx; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, rbx; this
mov rsi, r14; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rsi, asc_2E027+1; char *
mov rdi, rbx; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rsi, [rbx+8]
sub rsi, [rbx]; char *
lea rdi, [rsp+848h+var_828]; this
call cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::WriteToStderr(char const*,ulong)
add rsp, 820h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long nglog::`anonymous namespace'::DumpStackFrameInfo(
nglog::_anonymous_namespace_ *this,
const char *a2,
void *a3)
{
char v3; // bp
char *v4; // r15
long long v5; // r14
char *v6; // r14
unsigned long long v7; // rdx
char *v9; // [rsp+8h] [rbp-840h] BYREF
char *v10; // [rsp+10h] [rbp-838h]
char *v11; // [rsp+18h] [rbp-830h]
char v12[1024]; // [rsp+20h] [rbp-828h] BYREF
char v13[1064]; // [rsp+420h] [rbp-428h] BYREF
v3 = nglog::tools::Symbolize(a2 - 1, v13, 1024LL, 0LL);
v9 = v12;
v10 = v12;
v11 = v13;
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
(const char *)this);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
"@ ");
v4 = v10;
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
"0x");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
(unsigned long long)a2,
0x10u);
if ( v10 < v4 + 18 )
{
v5 = v4 + 18 - v10;
if ( v10 != v4 )
memmove(&v4[v5], v4, v10 - v4);
memset(v4, 32LL, v5);
v10 = v4 + 18;
}
v6 = "(unknown)";
if ( v3 )
v6 = v13;
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
" ");
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
v6);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v9,
"\n");
return nglog::`anonymous namespace'::g_failure_writer(
(nglog::_anonymous_namespace_ *)v12,
(const char *)(v10 - v9),
v7);
}
|
DumpStackFrameInfo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x820
MOV R14,RSI
MOV R15,RDI
LEA RDI,[RSI + -0x1]
LEA RBX,[RSP + 0x420]
MOV EDX,0x400
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00129b40
MOV EBP,EAX
LEA RAX,[RSP + 0x20]
LEA R12,[RSP + 0x8]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[RSP + 0x420]
MOV qword ptr [R12 + 0x10],RAX
MOV RDI,R12
MOV RSI,R15
CALL 0x00129722
LEA RSI,[0x12f15e]
MOV RDI,R12
CALL 0x00129722
MOV R15,qword ptr [R12 + 0x8]
LEA RSI,[0x12f263]
MOV RDI,R12
CALL 0x00129722
PUSH 0x10
POP RDX
MOV RDI,R12
MOV RSI,R14
CALL 0x0012974a
MOV RDX,qword ptr [R12 + 0x8]
LEA R12,[R15 + 0x12]
CMP RDX,R12
JNC 0x001296c3
MOV R14,R12
SUB R14,RDX
SUB RDX,R15
JZ 0x001296b0
LEA RDI,[R15 + R14*0x1]
MOV RSI,R15
CALL 0x00108b80
LAB_001296b0:
PUSH 0x20
POP RSI
MOV RDI,R15
MOV RDX,R14
CALL 0x001083b0
MOV qword ptr [RSP + 0x10],R12
LAB_001296c3:
LEA R14,[0x12da88]
TEST BPL,BPL
CMOVNZ R14,RBX
LEA RSI,[0x12f10e]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00129722
MOV RDI,RBX
MOV RSI,R14
CALL 0x00129722
LEA RSI,[0x12e028]
MOV RDI,RBX
CALL 0x00129722
MOV RSI,qword ptr [RBX + 0x8]
SUB RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x20]
CALL qword ptr [0x00142b00]
ADD RSP,0x820
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) */
void nglog::(anonymous_namespace)::DumpStackFrameInfo(char *param_1,void *param_2)
{
int1 *puVar1;
int1 *__src;
char cVar2;
size_t __n;
char *pcVar3;
int1 *local_840;
int1 *local_838;
char *local_830;
int1 local_828 [1024];
char local_428 [1024];
cVar2 = tools::Symbolize((long)param_2 + -1,local_428,0x400,0);
local_840 = local_828;
local_830 = local_428;
local_838 = local_840;
MinimalFormatter::AppendString((MinimalFormatter *)&local_840,param_1);
MinimalFormatter::AppendString((MinimalFormatter *)&local_840,"@ ");
__src = local_838;
MinimalFormatter::AppendString((MinimalFormatter *)&local_840,"0x");
MinimalFormatter::AppendUint64((MinimalFormatter *)&local_840,(ulong)param_2,0x10);
puVar1 = __src + 0x12;
if (local_838 < puVar1) {
__n = (long)puVar1 - (long)local_838;
if ((long)local_838 - (long)__src != 0) {
memmove(__src + __n,__src,(long)local_838 - (long)__src);
}
memset(__src,0x20,__n);
local_838 = puVar1;
}
pcVar3 = "(unknown)";
if (cVar2 != '\0') {
pcVar3 = local_428;
}
MinimalFormatter::AppendString((MinimalFormatter *)&local_840," ");
MinimalFormatter::AppendString((MinimalFormatter *)&local_840,pcVar3);
MinimalFormatter::AppendString((MinimalFormatter *)&local_840,"\n");
(*(code *)g_failure_writer)(local_828,(long)local_838 - (long)local_840);
return;
}
|
|
17,590
|
bfdec_rem
|
bluesky950520[P]quickjs/libbf.c
|
int bfdec_rem(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec,
bf_flags_t flags, int rnd_mode)
{
bfdec_t q_s, *q = &q_s;
int ret;
bfdec_init(r->ctx, q);
ret = bfdec_divrem(q, r, a, b, prec, flags, rnd_mode);
bfdec_delete(q);
return ret;
}
|
O1
|
c
|
bfdec_rem:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %r8d, %eax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
movq (%rdi), %rdi
leaq 0x10(%rsp), %r14
movq %rdi, (%r14)
movl $0x0, 0x8(%r14)
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rdi, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movl %r9d, (%rsp)
movq %r14, %rdi
movl %eax, %r9d
callq 0x936ac
movl %eax, %ebx
movq (%r14), %rax
testq %rax, %rax
je 0x93c4a
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x93c4a
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
|
bfdec_rem:
push r14
push rbx
sub rsp, 38h
mov eax, r8d
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, [rdi]
lea r14, [rsp+48h+var_38]
mov [r14], rdi
mov dword ptr [r14+8], 0
mov rdi, 8000000000000000h
mov [r14+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [r14+18h], xmm0
mov [rsp+48h+var_48], r9d
mov rdi, r14
mov r9d, eax
call bfdec_divrem
mov ebx, eax
mov rax, [r14]
test rax, rax
jz short loc_93C4A
mov rsi, [rsp+48h+var_18]
test rsi, rsi
jz short loc_93C4A
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_93C4A:
mov eax, ebx
add rsp, 38h
pop rbx
pop r14
retn
|
long long bfdec_rem(__int128 *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6)
{
unsigned int v6; // ebx
__int128 v8; // [rsp+10h] [rbp-38h] BYREF
unsigned long long v9; // [rsp+20h] [rbp-28h]
__int128 v10; // [rsp+28h] [rbp-20h]
*(_QWORD *)&v8 = *(_QWORD *)a1;
DWORD2(v8) = 0;
v9 = 0x8000000000000000LL;
v10 = 0LL;
v6 = bfdec_divrem(&v8, a1, a2, a3, a4, a5, a6);
if ( (_QWORD)v8 && *((_QWORD *)&v10 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v8 + 8))(*(_QWORD *)v8, *((_QWORD *)&v10 + 1), 0LL);
return v6;
}
|
bfdec_rem:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EAX,R8D
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV RSI,RDI
MOV RDI,qword ptr [RDI]
LEA R14,[RSP + 0x10]
MOV qword ptr [R14],RDI
MOV dword ptr [R14 + 0x8],0x0
MOV RDI,-0x8000000000000000
MOV qword ptr [R14 + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x18],XMM0
MOV dword ptr [RSP],R9D
MOV RDI,R14
MOV R9D,EAX
CALL 0x001936ac
MOV EBX,EAX
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x00193c4a
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x00193c4a
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00193c4a:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
int4
bfdec_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5,int4 param_6)
{
int4 uVar1;
int8 *local_38;
int4 local_30;
int8 local_28;
int8 local_20;
long lStack_18;
local_38 = (int8 *)*param_1;
local_30 = 0;
local_28 = 0x8000000000000000;
local_20 = 0;
lStack_18 = 0;
uVar1 = bfdec_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6);
if ((local_38 != (int8 *)0x0) && (lStack_18 != 0)) {
(*(code *)local_38[1])(*local_38,lStack_18,0);
}
return uVar1;
}
|
|
17,591
|
bfdec_rem
|
bluesky950520[P]quickjs/libbf.c
|
int bfdec_rem(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec,
bf_flags_t flags, int rnd_mode)
{
bfdec_t q_s, *q = &q_s;
int ret;
bfdec_init(r->ctx, q);
ret = bfdec_divrem(q, r, a, b, prec, flags, rnd_mode);
bfdec_delete(q);
return ret;
}
|
O2
|
c
|
bfdec_rem:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %r8d, %eax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
movq (%rdi), %rdi
leaq 0x10(%rsp), %rbx
movq %rdi, (%rbx)
andl $0x0, 0x8(%rbx)
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rdi, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl %r9d, (%rsp)
movq %rbx, %rdi
movl %eax, %r9d
callq 0x7b56b
movl %eax, %ebp
movq %rbx, %rdi
callq 0x7500e
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
bfdec_rem:
push rbp
push rbx
sub rsp, 38h
mov eax, r8d
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, [rdi]
lea rbx, [rsp+48h+var_38]
mov [rbx], rdi
and dword ptr [rbx+8], 0
mov rdi, 8000000000000000h
mov [rbx+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [rbx+18h], xmm0
mov [rsp+48h+var_48], r9d
mov rdi, rbx
mov r9d, eax
call bfdec_divrem
mov ebp, eax
mov rdi, rbx
call bf_delete_0
mov eax, ebp
add rsp, 38h
pop rbx
pop rbp
retn
|
long long bfdec_rem(long long *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6)
{
unsigned int v6; // ebp
long long v8; // [rsp+10h] [rbp-38h] BYREF
int v9; // [rsp+18h] [rbp-30h]
unsigned long long v10; // [rsp+20h] [rbp-28h]
__int128 v11; // [rsp+28h] [rbp-20h]
v8 = *a1;
v9 = 0;
v10 = 0x8000000000000000LL;
v11 = 0LL;
v6 = bfdec_divrem((long long)&v8, (long long)a1, a2, a3, a4, a5, a6);
bf_delete_0(&v8);
return v6;
}
|
bfdec_rem:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV EAX,R8D
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV RSI,RDI
MOV RDI,qword ptr [RDI]
LEA RBX,[RSP + 0x10]
MOV qword ptr [RBX],RDI
AND dword ptr [RBX + 0x8],0x0
MOV RDI,-0x8000000000000000
MOV qword ptr [RBX + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x18],XMM0
MOV dword ptr [RSP],R9D
MOV RDI,RBX
MOV R9D,EAX
CALL 0x0017b56b
MOV EBP,EAX
MOV RDI,RBX
CALL 0x0017500e
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP RBP
RET
|
int4
bfdec_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5,int4 param_6)
{
int4 uVar1;
int8 local_38;
int4 local_30;
int8 local_28;
int8 local_20;
int8 uStack_18;
local_38 = *param_1;
local_30 = 0;
local_28 = 0x8000000000000000;
local_20 = 0;
uStack_18 = 0;
uVar1 = bfdec_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6);
bf_delete(&local_38);
return uVar1;
}
|
|
17,592
|
translog_mark_file_unfinished
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_mark_file_unfinished(uint32 file)
{
int place, i;
struct st_file_counter fc, *fc_ptr;
DBUG_ENTER("translog_mark_file_unfinished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
fc.file= file; fc.counter= 1;
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
if (log_descriptor.unfinished_files.elements == 0)
{
insert_dynamic(&log_descriptor.unfinished_files, (uchar*) &fc);
DBUG_PRINT("info", ("The first element inserted"));
goto end;
}
for (place= log_descriptor.unfinished_files.elements - 1;
place >= 0;
place--)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
place, struct st_file_counter *);
if (fc_ptr->file <= file)
break;
}
if (place >= 0 && fc_ptr->file == file)
{
fc_ptr->counter++;
DBUG_PRINT("info", ("counter increased"));
goto end;
}
if (place == (int)log_descriptor.unfinished_files.elements)
{
insert_dynamic(&log_descriptor.unfinished_files, (uchar*) &fc);
DBUG_PRINT("info", ("The last element inserted"));
goto end;
}
/* shift and assign new element */
insert_dynamic(&log_descriptor.unfinished_files,
(uchar*)
dynamic_element(&log_descriptor.unfinished_files,
log_descriptor.unfinished_files.elements- 1,
struct st_file_counter *));
for(i= log_descriptor.unfinished_files.elements - 1; i > place; i--)
{
/* we do not use set_dynamic() to avoid unneeded checks */
memcpy(dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *),
dynamic_element(&log_descriptor.unfinished_files,
i + 1, struct st_file_counter *),
sizeof(struct st_file_counter));
}
memcpy(dynamic_element(&log_descriptor.unfinished_files,
place + 1, struct st_file_counter *),
&fc, sizeof(struct st_file_counter));
end:
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_mark_file_unfinished:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
jmp 0x3b98d
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x10(%rbp)
leaq 0x43f2cf(%rip), %rdi # 0x47ac70
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0x117441(%rip), %rsi # 0x152df0
movl $0x548, %edx # imm = 0x548
callq 0x2f570
cmpl $0x0, 0xc40108(%rip) # 0xc7bac8
jne 0x3b9e0
leaq 0x43f2a7(%rip), %rdi # 0x47ac70
addq $0x800e50, %rdi # imm = 0x800E50
leaq -0x14(%rbp), %rsi
callq 0xdc070
jmp 0x3b9db
jmp 0x3baf6
movl 0xc400e2(%rip), %eax # 0xc7bac8
subl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x3ba22
movq 0xc400c7(%rip), %rax # 0xc7bac0
movslq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
ja 0x3ba15
jmp 0x3ba22
jmp 0x3ba17
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3b9ec
cmpl $0x0, -0x8(%rbp)
jl 0x3ba47
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x3ba47
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x3ba42
jmp 0x3baf6
movl -0x8(%rbp), %eax
cmpl 0xc40078(%rip), %eax # 0xc7bac8
jne 0x3ba70
leaq 0x43f217(%rip), %rdi # 0x47ac70
addq $0x800e50, %rdi # imm = 0x800E50
leaq -0x14(%rbp), %rsi
callq 0xdc070
jmp 0x3ba6b
jmp 0x3baf6
movq 0xc40049(%rip), %rsi # 0xc7bac0
movl 0xc4004b(%rip), %eax # 0xc7bac8
subl $0x1, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rsi
leaq 0x43f1e0(%rip), %rdi # 0x47ac70
addq $0x800e50, %rdi # imm = 0x800E50
callq 0xdc070
movl 0xc40026(%rip), %eax # 0xc7bac8
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jle 0x3bade
movq 0xc40009(%rip), %rax # 0xc7bac0
movslq -0xc(%rbp), %rcx
movq 0xc3fffe(%rip), %rdx # 0xc7bac0
movl -0xc(%rbp), %esi
addl $0x1, %esi
movslq %esi, %rsi
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3baa8
movq 0xc3ffdb(%rip), %rax # 0xc7bac0
movl -0x8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq -0x14(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
leaq 0x43f173(%rip), %rdi # 0x47ac70
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x2f5e0
jmp 0x3bb0b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_mark_file_unfinished:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
jmp short $+2
loc_3B98D:
mov eax, [rbp+var_4]
mov dword ptr [rbp+var_14], eax
mov dword ptr [rbp+var_14+4], 1
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 548h
call inline_mysql_mutex_lock
cmp cs:dword_C7BAC8, 0
jnz short loc_3B9E0
lea rdi, log_descriptor
add rdi, 800E50h
lea rsi, [rbp+var_14]
call insert_dynamic
jmp short $+2
loc_3B9DB:
jmp loc_3BAF6
loc_3B9E0:
mov eax, cs:dword_C7BAC8
sub eax, 1
mov [rbp+var_8], eax
loc_3B9EC:
cmp [rbp+var_8], 0
jl short loc_3BA22
mov rax, cs:qword_C7BAC0
movsxd rcx, [rbp+var_8]
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax]
cmp eax, [rbp+var_4]
ja short loc_3BA15
jmp short loc_3BA22
loc_3BA15:
jmp short $+2
loc_3BA17:
mov eax, [rbp+var_8]
add eax, 0FFFFFFFFh
mov [rbp+var_8], eax
jmp short loc_3B9EC
loc_3BA22:
cmp [rbp+var_8], 0
jl short loc_3BA47
mov rax, [rbp+var_20]
mov eax, [rax]
cmp eax, [rbp+var_4]
jnz short loc_3BA47
mov rax, [rbp+var_20]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
jmp short $+2
loc_3BA42:
jmp loc_3BAF6
loc_3BA47:
mov eax, [rbp+var_8]
cmp eax, cs:dword_C7BAC8
jnz short loc_3BA70
lea rdi, log_descriptor
add rdi, 800E50h
lea rsi, [rbp+var_14]
call insert_dynamic
jmp short $+2
loc_3BA6B:
jmp loc_3BAF6
loc_3BA70:
mov rsi, cs:qword_C7BAC0
mov eax, cs:dword_C7BAC8
sub eax, 1
mov eax, eax
shl rax, 3
add rsi, rax
lea rdi, log_descriptor
add rdi, 800E50h
call insert_dynamic
mov eax, cs:dword_C7BAC8
sub eax, 1
mov [rbp+var_C], eax
loc_3BAA8:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_8]
jle short loc_3BADE
mov rax, cs:qword_C7BAC0
movsxd rcx, [rbp+var_C]
mov rdx, cs:qword_C7BAC0
mov esi, [rbp+var_C]
add esi, 1
movsxd rsi, esi
mov rdx, [rdx+rsi*8]
mov [rax+rcx*8], rdx
mov eax, [rbp+var_C]
add eax, 0FFFFFFFFh
mov [rbp+var_C], eax
jmp short loc_3BAA8
loc_3BADE:
mov rax, cs:qword_C7BAC0
mov ecx, [rbp+var_8]
add ecx, 1
movsxd rcx, ecx
mov rdx, [rbp+var_14]
mov [rax+rcx*8], rdx
loc_3BAF6:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock
jmp short $+2
loc_3BB0B:
add rsp, 20h
pop rbp
retn
|
long long translog_mark_file_unfinished(unsigned int a1)
{
unsigned int *v2; // [rsp+0h] [rbp-20h]
long long v3; // [rsp+Ch] [rbp-14h] BYREF
int j; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
unsigned int v6; // [rsp+1Ch] [rbp-4h]
v6 = a1;
v3 = a1 | 0x100000000LL;
inline_mysql_mutex_lock(
(long long)&log_descriptor[1049025],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x548u);
if ( !dword_C7BAC8 )
goto LABEL_2;
for ( i = dword_C7BAC8 - 1; i >= 0; --i )
{
v2 = (unsigned int *)(8LL * i + qword_C7BAC0);
if ( *v2 <= v6 )
break;
}
if ( i >= 0 && *v2 == v6 )
{
++v2[1];
return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]);
}
if ( i == dword_C7BAC8 )
{
LABEL_2:
insert_dynamic(&log_descriptor[1049034], &v3);
}
else
{
insert_dynamic(&log_descriptor[1049034], 8LL * (unsigned int)(dword_C7BAC8 - 1) + qword_C7BAC0);
for ( j = dword_C7BAC8 - 1; j > i; --j )
*(_QWORD *)(qword_C7BAC0 + 8LL * j) = *(_QWORD *)(qword_C7BAC0 + 8LL * (j + 1));
*(_QWORD *)(qword_C7BAC0 + 8LL * (i + 1)) = v3;
}
return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]);
}
|
translog_mark_file_unfinished:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
JMP 0x0013b98d
LAB_0013b98d:
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x14],EAX
MOV dword ptr [RBP + -0x10],0x1
LEA RDI,[0x57ac70]
ADD RDI,0x800e08
LEA RSI,[0x252df0]
MOV EDX,0x548
CALL 0x0012f570
CMP dword ptr [0x00d7bac8],0x0
JNZ 0x0013b9e0
LEA RDI,[0x57ac70]
ADD RDI,0x800e50
LEA RSI,[RBP + -0x14]
CALL 0x001dc070
JMP 0x0013b9db
LAB_0013b9db:
JMP 0x0013baf6
LAB_0013b9e0:
MOV EAX,dword ptr [0x00d7bac8]
SUB EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
LAB_0013b9ec:
CMP dword ptr [RBP + -0x8],0x0
JL 0x0013ba22
MOV RAX,qword ptr [0x00d7bac0]
MOVSXD RCX,dword ptr [RBP + -0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JA 0x0013ba15
JMP 0x0013ba22
LAB_0013ba15:
JMP 0x0013ba17
LAB_0013ba17:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x0013b9ec
LAB_0013ba22:
CMP dword ptr [RBP + -0x8],0x0
JL 0x0013ba47
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x0013ba47
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
JMP 0x0013ba42
LAB_0013ba42:
JMP 0x0013baf6
LAB_0013ba47:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x00d7bac8]
JNZ 0x0013ba70
LEA RDI,[0x57ac70]
ADD RDI,0x800e50
LEA RSI,[RBP + -0x14]
CALL 0x001dc070
JMP 0x0013ba6b
LAB_0013ba6b:
JMP 0x0013baf6
LAB_0013ba70:
MOV RSI,qword ptr [0x00d7bac0]
MOV EAX,dword ptr [0x00d7bac8]
SUB EAX,0x1
MOV EAX,EAX
SHL RAX,0x3
ADD RSI,RAX
LEA RDI,[0x57ac70]
ADD RDI,0x800e50
CALL 0x001dc070
MOV EAX,dword ptr [0x00d7bac8]
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
LAB_0013baa8:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x8]
JLE 0x0013bade
MOV RAX,qword ptr [0x00d7bac0]
MOVSXD RCX,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [0x00d7bac0]
MOV ESI,dword ptr [RBP + -0xc]
ADD ESI,0x1
MOVSXD RSI,ESI
MOV RDX,qword ptr [RDX + RSI*0x8]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0013baa8
LAB_0013bade:
MOV RAX,qword ptr [0x00d7bac0]
MOV ECX,dword ptr [RBP + -0x8]
ADD ECX,0x1
MOVSXD RCX,ECX
MOV RDX,qword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_0013baf6:
LEA RDI,[0x57ac70]
ADD RDI,0x800e08
CALL 0x0012f5e0
JMP 0x0013bb0b
LAB_0013bb0b:
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_mark_file_unfinished(uint param_1)
{
int iVar1;
uint *local_28;
uint local_1c;
int4 uStack_18;
int local_14;
int local_10;
uint local_c;
uStack_18 = 1;
local_1c = param_1;
local_c = param_1;
inline_mysql_mutex_lock
(&DAT_00d7ba78,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x548);
iVar1 = _DAT_00d7bac8;
if (_DAT_00d7bac8 == 0) {
insert_dynamic(&DAT_00d7bac0,&local_1c);
}
else {
do {
local_10 = iVar1 + -1;
if (local_10 < 0) break;
local_28 = (uint *)(_DAT_00d7bac0 + (long)local_10 * 8);
iVar1 = local_10;
} while (local_c < *local_28);
if ((local_10 < 0) || (*local_28 != local_c)) {
if (local_10 == _DAT_00d7bac8) {
insert_dynamic(&DAT_00d7bac0,&local_1c);
}
else {
insert_dynamic(&DAT_00d7bac0,_DAT_00d7bac0 + (ulong)(_DAT_00d7bac8 - 1) * 8);
iVar1 = _DAT_00d7bac8;
while (local_14 = iVar1 + -1, local_10 < local_14) {
*(int8 *)(_DAT_00d7bac0 + (long)local_14 * 8) =
*(int8 *)(_DAT_00d7bac0 + (long)iVar1 * 8);
iVar1 = local_14;
}
*(ulong *)(_DAT_00d7bac0 + (long)(local_10 + 1) * 8) = CONCAT44(uStack_18,local_1c);
}
}
else {
local_28[1] = local_28[1] + 1;
}
}
inline_mysql_mutex_unlock(&DAT_00d7ba78);
return;
}
|
|
17,593
|
common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/arg.cpp
|
static void common_params_handle_model_default(
std::string & model,
const std::string & model_url,
std::string & hf_repo,
std::string & hf_file,
const std::string & hf_token,
const std::string & model_default) {
if (!hf_repo.empty()) {
// short-hand to avoid specifying --hf-file -> default it to --model
if (hf_file.empty()) {
if (model.empty()) {
auto auto_detected = common_get_hf_file(hf_repo, hf_token);
if (auto_detected.first.empty() || auto_detected.second.empty()) {
exit(1); // built without CURL, error message already printed
}
hf_repo = auto_detected.first;
hf_file = auto_detected.second;
} else {
hf_file = model;
}
}
// make sure model path is present (for caching purposes)
if (model.empty()) {
// this is to avoid different repo having same file name, or same file name in different subdirs
std::string filename = hf_repo + "_" + hf_file;
// to make sure we don't have any slashes in the filename
string_replace_all(filename, "/", "_");
model = fs_get_cache_file(filename);
}
} else if (!model_url.empty()) {
if (model.empty()) {
auto f = string_split<std::string>(model_url, '#').front();
f = string_split<std::string>(f, '?').front();
model = fs_get_cache_file(string_split<std::string>(f, '/').back());
}
} else if (model.empty()) {
model = model_default;
}
}
|
O0
|
cpp
|
common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x1d8, %rsp # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movq %rdx, 0x1c0(%rsp)
movq %rcx, 0x1b8(%rsp)
movq %r8, 0x1b0(%rsp)
movq %r9, 0x1a8(%rsp)
movq 0x1c0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x89580
movq 0x1b8(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x89282
jmp 0x89361
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x89298
jmp 0x8934a
movq 0x1c0(%rsp), %rsi
movq 0x1b0(%rsp), %rdx
leaq 0x168(%rsp), %rdi
callq 0xf7800
leaq 0x168(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x892dd
leaq 0x168(%rsp), %rdi
addq $0x20, %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x892dd
jmp 0x892e7
movl $0x1, %edi
callq 0x5ac20
movq 0x1c0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x5b410
jmp 0x892fe
leaq 0x188(%rsp), %rsi
movq 0x1b8(%rsp), %rdi
callq 0x5b410
jmp 0x89315
leaq 0x168(%rsp), %rdi
callq 0x9abf0
jmp 0x8935f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x9abf0
jmp 0x89750
movq 0x1d0(%rsp), %rsi
movq 0x1b8(%rsp), %rdi
callq 0x5b410
jmp 0x89361
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x89377
jmp 0x8957b
movq 0x1c0(%rsp), %rsi
leaq 0x18df5e(%rip), %rdx # 0x2172e4
leaq 0x118(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x91a70
movq 0x18(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
leaq 0x138(%rsp), %rdi
callq 0x9ac20
jmp 0x893b4
leaq 0x118(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5b0d0
movq 0x10(%rsp), %rdx
leaq 0x1932c9(%rip), %rsi # 0x21c6a8
leaq 0xf8(%rsp), %rdi
callq 0x64e60
jmp 0x893ee
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5b0d0
movq 0x8(%rsp), %rdx
leaq 0x18ded8(%rip), %rsi # 0x2172e4
leaq 0xd0(%rsp), %rdi
callq 0x64e60
jmp 0x8941b
leaq 0x138(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0xf3a40
jmp 0x8943a
leaq 0xd0(%rsp), %rdi
callq 0x5b558
leaq 0xcf(%rsp), %rdi
callq 0x5b530
leaq 0xf8(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
callq 0x5b530
leaq 0xa8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xf5b10
jmp 0x89485
movq 0x1d0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a950
leaq 0xa8(%rsp), %rdi
callq 0x5b558
leaq 0x138(%rsp), %rdi
callq 0x5b558
jmp 0x8957b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x5b558
jmp 0x89750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x89546
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x8952c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5b558
leaq 0xcf(%rsp), %rdi
callq 0x5b530
leaq 0xf8(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
callq 0x5b530
jmp 0x89569
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x5b558
jmp 0x89750
jmp 0x89748
movq 0x1c8(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x8971c
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x895ab
jmp 0x8971a
movq 0x1c8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x23, %edx
callq 0x89760
movq (%rsp), %rdi
callq 0x9ac70
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
callq 0x5a210
jmp 0x895e1
leaq 0x70(%rsp), %rdi
callq 0x64f70
leaq 0x58(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x3f, %edx
callq 0x89760
jmp 0x89604
leaq 0x58(%rsp), %rdi
callq 0x9ac70
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
callq 0x5b410
jmp 0x89620
leaq 0x58(%rsp), %rdi
callq 0x64f70
leaq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x2f, %edx
callq 0x89760
jmp 0x89643
leaq 0x20(%rsp), %rdi
callq 0x9aca0
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0xf5b10
jmp 0x8965c
movq 0x1d0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5a950
leaq 0x38(%rsp), %rdi
callq 0x5b558
leaq 0x20(%rsp), %rdi
callq 0x64f70
leaq 0x88(%rsp), %rdi
callq 0x5b558
jmp 0x8971a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x64f70
jmp 0x89750
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x8970b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x64f70
jmp 0x8970b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x64f70
leaq 0x88(%rsp), %rdi
callq 0x5b558
jmp 0x89750
jmp 0x89746
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x8972f
jmp 0x89744
movq 0x1a8(%rsp), %rsi
movq 0x1d0(%rsp), %rdi
callq 0x5b410
jmp 0x89746
jmp 0x89748
addq $0x1d8, %rsp # imm = 0x1D8
retq
movq 0x160(%rsp), %rdi
callq 0x5abc0
nopl (%rax)
|
_ZL34common_params_handle_model_defaultRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S5_S5_S7_S7_:
sub rsp, 1D8h
mov [rsp+1D8h+var_8], rdi
mov [rsp+1D8h+var_10], rsi
mov qword ptr [rsp+1D8h+var_18], rdx
mov [rsp+1D8h+var_20], rcx
mov [rsp+1D8h+var_28], r8
mov [rsp+1D8h+var_30], r9
mov rdi, qword ptr [rsp+1D8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_89580
mov rdi, [rsp+1D8h+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_89282
jmp loc_89361
loc_89282:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_89298
jmp loc_8934A
loc_89298:
mov rsi, qword ptr [rsp+1D8h+var_18]; int
mov rdx, [rsp+1D8h+var_28]; void *
lea rdi, [rsp+1D8h+var_70]; int
call _Z18common_get_hf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; common_get_hf_file(std::string const&,std::string const&)
lea rdi, [rsp+1D8h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_892DD
lea rdi, [rsp+1D8h+var_70]
add rdi, 20h ; ' '
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_892DD
jmp short loc_892E7
loc_892DD:
mov edi, 1
call _exit
loc_892E7:
mov rdi, qword ptr [rsp+1D8h+var_18]
lea rsi, [rsp+1D8h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_892FE:
lea rsi, [rsp+1D8h+var_50]
mov rdi, [rsp+1D8h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_89315:
lea rdi, [rsp+1D8h+var_70]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp short loc_8935F
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_160]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp loc_89750
loc_8934A:
mov rsi, [rsp+1D8h+var_8]
mov rdi, [rsp+1D8h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_8935F:
jmp short $+2
loc_89361:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_89377
jmp loc_8957B
loc_89377:
mov rsi, qword ptr [rsp+1D8h+var_18]; int
lea rdx, aCall911+8; int
lea rdi, [rsp+1D8h+var_C0]; int
mov [rsp+1D8h+var_1C0], rdi; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rsi, [rsp+1D8h+var_1C0]
mov rdx, [rsp+1D8h+var_20]
lea rdi, [rsp+1D8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_893B4:
lea rdi, [rsp+1D8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_E1]
mov qword ptr [rsp+1D8h+var_1C8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+1D8h+var_1C8]
lea rsi, asc_21C6A7+1; "/"
lea rdi, [rsp+1D8h+var_E1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_893EE:
lea rdi, [rsp+1D8h+var_109]
mov qword ptr [rsp+1D8h+var_1D0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+1D8h+var_1D0]
lea rsi, aCall911+8; "_"
lea rdi, [rsp+1D8h+var_109+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8941B:
lea rdi, [rsp+1D8h+var_A0]
lea rsi, [rsp+1D8h+var_E1+1]
lea rdx, [rsp+1D8h+var_109+1]
call _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_; string_replace_all(std::string &,std::string const&,std::string const&)
jmp short $+2
loc_8943A:
lea rdi, [rsp+1D8h+var_109+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_109]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+1D8h+var_E1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+1D8h+var_130]; int
lea rsi, [rsp+1D8h+var_A0]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
jmp short $+2
loc_89485:
mov rdi, [rsp+1D8h+var_8]
lea rsi, [rsp+1D8h+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+1D8h+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_8957B
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_89750
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_89546
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_8952C
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_8952C:
lea rdi, [rsp+arg_C7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_89546:
lea rdi, [rsp+arg_EF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_89569
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
loc_89569:
lea rdi, [rsp+arg_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_89750
loc_8957B:
jmp loc_89748
loc_89580:
mov rdi, [rsp+1D8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_8971C
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_895AB
jmp loc_8971A
loc_895AB:
mov rsi, [rsp+1D8h+var_10]
lea rdi, [rsp+1D8h+var_168]
mov qword ptr [rsp+1D8h+var_1D8], rdi; int
mov edx, 23h ; '#'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rdi, qword ptr [rsp+1D8h+var_1D8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_150]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_895E1:
lea rdi, [rsp+1D8h+var_168]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_180]
lea rsi, [rsp+1D8h+var_150]
mov edx, 3Fh ; '?'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
jmp short $+2
loc_89604:
lea rdi, [rsp+1D8h+var_180]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_150]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_89620:
lea rdi, [rsp+1D8h+var_180]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_1B8]
lea rsi, [rsp+1D8h+var_150]
mov edx, 2Fh ; '/'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
jmp short $+2
loc_89643:
lea rdi, [rsp+1D8h+var_1B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_1A0]; int
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
jmp short $+2
loc_8965C:
mov rdi, [rsp+1D8h+var_8]
lea rsi, [rsp+1D8h+var_1A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+1D8h+var_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_1B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_150]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_8971A
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_89750
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_8970B
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_50]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_8970B
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_8970B:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_89750
loc_8971A:
jmp short loc_89746
loc_8971C:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8972F
jmp short loc_89744
loc_8972F:
mov rsi, [rsp+1D8h+var_30]
mov rdi, [rsp+1D8h+var_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_89744:
jmp short $+2
loc_89746:
jmp short $+2
loc_89748:
add rsp, 1D8h
retn
loc_89750:
mov rdi, [rsp+arg_158]
call __Unwind_Resume
|
void common_params_handle_model_default(
long long a1,
long long a2,
long long a3,
long long a4,
void *a5,
long long a6)
{
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // rax
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v23; // [rsp+0h] [rbp-1D8h]
int v24; // [rsp+0h] [rbp-1D8h]
int v25; // [rsp+0h] [rbp-1D8h]
int v26[2]; // [rsp+0h] [rbp-1D8h]
int v27; // [rsp+0h] [rbp-1D8h]
int v28; // [rsp+0h] [rbp-1D8h]
void *v29; // [rsp+8h] [rbp-1D0h]
int v30; // [rsp+8h] [rbp-1D0h]
int v31; // [rsp+10h] [rbp-1C8h]
int v32; // [rsp+10h] [rbp-1C8h]
int v33; // [rsp+18h] [rbp-1C0h]
long long v34; // [rsp+18h] [rbp-1C0h]
int v35; // [rsp+18h] [rbp-1C0h]
long long v36; // [rsp+20h] [rbp-1B8h] BYREF
char v37; // [rsp+28h] [rbp-1B0h]
int v38; // [rsp+30h] [rbp-1A8h]
int v39; // [rsp+38h] [rbp-1A0h] BYREF
int v40; // [rsp+40h] [rbp-198h]
int v41; // [rsp+48h] [rbp-190h]
long long v42; // [rsp+50h] [rbp-188h]
long long v43; // [rsp+58h] [rbp-180h] BYREF
char v44; // [rsp+60h] [rbp-178h]
long long v45[3]; // [rsp+70h] [rbp-168h] BYREF
_BYTE v46[32]; // [rsp+88h] [rbp-150h] BYREF
int v47[9]; // [rsp+A8h] [rbp-130h] BYREF
char v48; // [rsp+CFh] [rbp-109h] BYREF
_BYTE v49[39]; // [rsp+D0h] [rbp-108h] BYREF
char v50; // [rsp+F7h] [rbp-E1h] BYREF
_BYTE v51[32]; // [rsp+F8h] [rbp-E0h] BYREF
long long v52[4]; // [rsp+118h] [rbp-C0h] BYREF
_BYTE v53[48]; // [rsp+138h] [rbp-A0h] BYREF
int v54[8]; // [rsp+168h] [rbp-70h] BYREF
_BYTE v55[32]; // [rsp+188h] [rbp-50h] BYREF
long long v56; // [rsp+1A8h] [rbp-30h]
void *v57; // [rsp+1B0h] [rbp-28h]
long long v58; // [rsp+1B8h] [rbp-20h]
int v59[2]; // [rsp+1C0h] [rbp-18h]
long long v60; // [rsp+1C8h] [rbp-10h]
long long v61; // [rsp+1D0h] [rbp-8h]
v61 = a1;
v60 = a2;
*(_QWORD *)v59 = a3;
v58 = a4;
v57 = a5;
v56 = a6;
if ( (std::string::empty(a3) & 1) != 0 )
{
if ( (std::string::empty(v60) & 1) != 0 )
{
if ( (std::string::empty(v61) & 1) != 0 )
std::string::operator=(v61, v56);
}
else if ( (std::string::empty(v61) & 1) != 0 )
{
string_split<std::string>((unsigned int)v45, v60, 35, v12, v13, v14, (unsigned int)v45);
v15 = std::vector<std::string>::front(*(_QWORD *)v26);
std::string::basic_string(v46, v15);
std::vector<std::string>::~vector(v45);
string_split<std::string>((unsigned int)&v43, (unsigned int)v46, 63, v16, v17, v18, v26[0]);
v19 = std::vector<std::string>::front(&v43);
std::string::operator=(v46, v19);
std::vector<std::string>::~vector(&v43);
string_split<std::string>((unsigned int)&v36, (unsigned int)v46, 47, v20, v21, v22, v27);
std::vector<std::string>::back(&v36);
fs_get_cache_file((int)&v39, v28, (int)v29, v31, v33, v36, v37, v38, v39, v40, v41, v42, v43, v44);
std::string::operator=(v61, &v39);
std::string::~string(&v39);
std::vector<std::string>::~vector(&v36);
std::string::~string(v46);
}
}
else
{
if ( (std::string::empty(v58) & 1) != 0 )
{
if ( (std::string::empty(v61) & 1) != 0 )
{
common_get_hf_file((int)v54, v59[0], v57);
if ( (std::string::empty(v54) & 1) != 0 || (std::string::empty(v55) & 1) != 0 )
exit(1LL);
std::string::operator=(*(_QWORD *)v59, v54);
std::string::operator=(v58, v55);
std::pair<std::string,std::string>::~pair(v54);
}
else
{
std::string::operator=(v58, v61);
}
}
if ( (std::string::empty(v61) & 1) != 0 )
{
std::operator+<char>((int)v52, v59[0], (int)"_", v6, v7, v8, v23, v29, v31, (long long)v52);
std::operator+<char>(v53, v34, v58);
std::string::~string(v52);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v51, (long long)"/", (long long)&v50);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v49, (long long)"_", (long long)&v48);
string_replace_all(
(unsigned int)v53,
(unsigned int)v51,
(unsigned int)v49,
v9,
v10,
v11,
v24,
(unsigned int)&v48,
(unsigned int)&v50,
v34,
v36,
v37);
std::string::~string(v49);
std::allocator<char>::~allocator(&v48);
std::string::~string(v51);
std::allocator<char>::~allocator(&v50);
fs_get_cache_file((int)v47, v25, v30, v32, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44);
std::string::operator=(v61, v47);
std::string::~string(v47);
std::string::~string(v53);
}
}
}
|
common_params_handle_model_default:
SUB RSP,0x1d8
MOV qword ptr [RSP + 0x1d0],RDI
MOV qword ptr [RSP + 0x1c8],RSI
MOV qword ptr [RSP + 0x1c0],RDX
MOV qword ptr [RSP + 0x1b8],RCX
MOV qword ptr [RSP + 0x1b0],R8
MOV qword ptr [RSP + 0x1a8],R9
MOV RDI,qword ptr [RSP + 0x1c0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00189580
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00189282
JMP 0x00189361
LAB_00189282:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00189298
JMP 0x0018934a
LAB_00189298:
MOV RSI,qword ptr [RSP + 0x1c0]
MOV RDX,qword ptr [RSP + 0x1b0]
LEA RDI,[RSP + 0x168]
CALL 0x001f7800
LEA RDI,[RSP + 0x168]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x001892dd
LEA RDI,[RSP + 0x168]
ADD RDI,0x20
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x001892dd
JMP 0x001892e7
LAB_001892dd:
MOV EDI,0x1
CALL 0x0015ac20
LAB_001892e7:
MOV RDI,qword ptr [RSP + 0x1c0]
LAB_001892ef:
LEA RSI,[RSP + 0x168]
CALL 0x0015b410
JMP 0x001892fe
LAB_001892fe:
LEA RSI,[RSP + 0x188]
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015b410
LAB_00189313:
JMP 0x00189315
LAB_00189315:
LEA RDI,[RSP + 0x168]
CALL 0x0019abf0
JMP 0x0018935f
LAB_0018934a:
MOV RSI,qword ptr [RSP + 0x1d0]
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015b410
LAB_0018935f:
JMP 0x00189361
LAB_00189361:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00189377
JMP 0x0018957b
LAB_00189377:
MOV RSI,qword ptr [RSP + 0x1c0]
LEA RDX,[0x3172e4]
LEA RDI,[RSP + 0x118]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00191a70
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x1b8]
LAB_001893a5:
LEA RDI,[RSP + 0x138]
CALL 0x0019ac20
JMP 0x001893b4
LAB_001893b4:
LEA RDI,[RSP + 0x118]
CALL 0x0015b558
LEA RDI,[RSP + 0xf7]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x10]
LAB_001893d8:
LEA RSI,[0x31c6a8]
LEA RDI,[RSP + 0xf8]
CALL 0x00164e60
JMP 0x001893ee
LAB_001893ee:
LEA RDI,[RSP + 0xcf]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x8]
LAB_00189405:
LEA RSI,[0x3172e4]
LEA RDI,[RSP + 0xd0]
CALL 0x00164e60
JMP 0x0018941b
LAB_0018941b:
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0xf8]
LEA RDX,[RSP + 0xd0]
CALL 0x001f3a40
JMP 0x0018943a
LAB_0018943a:
LEA RDI,[RSP + 0xd0]
CALL 0x0015b558
LEA RDI,[RSP + 0xcf]
CALL 0x0015b530
LEA RDI,[RSP + 0xf8]
CALL 0x0015b558
LEA RDI,[RSP + 0xf7]
CALL 0x0015b530
LAB_0018946e:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x138]
CALL 0x001f5b10
LAB_00189483:
JMP 0x00189485
LAB_00189485:
MOV RDI,qword ptr [RSP + 0x1d0]
LEA RSI,[RSP + 0xa8]
CALL 0x0015a950
LEA RDI,[RSP + 0xa8]
CALL 0x0015b558
LEA RDI,[RSP + 0x138]
CALL 0x0015b558
JMP 0x0018957b
LAB_0018957b:
JMP 0x00189748
LAB_00189580:
MOV RDI,qword ptr [RSP + 0x1c8]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x0018971c
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x001895ab
JMP 0x0018971a
LAB_001895ab:
MOV RSI,qword ptr [RSP + 0x1c8]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RSP],RDI
MOV EDX,0x23
CALL 0x00189760
MOV RDI,qword ptr [RSP]
CALL 0x0019ac70
MOV RSI,RAX
LAB_001895d2:
LEA RDI,[RSP + 0x88]
CALL 0x0015a210
JMP 0x001895e1
LAB_001895e1:
LEA RDI,[RSP + 0x70]
CALL 0x00164f70
LAB_001895eb:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x88]
MOV EDX,0x3f
CALL 0x00189760
JMP 0x00189604
LAB_00189604:
LEA RDI,[RSP + 0x58]
CALL 0x0019ac70
MOV RSI,RAX
LAB_00189611:
LEA RDI,[RSP + 0x88]
CALL 0x0015b410
JMP 0x00189620
LAB_00189620:
LEA RDI,[RSP + 0x58]
CALL 0x00164f70
LAB_0018962a:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x88]
MOV EDX,0x2f
CALL 0x00189760
JMP 0x00189643
LAB_00189643:
LEA RDI,[RSP + 0x20]
CALL 0x0019aca0
MOV RSI,RAX
LAB_00189650:
LEA RDI,[RSP + 0x38]
CALL 0x001f5b10
LAB_0018965a:
JMP 0x0018965c
LAB_0018965c:
MOV RDI,qword ptr [RSP + 0x1d0]
LEA RSI,[RSP + 0x38]
CALL 0x0015a950
LEA RDI,[RSP + 0x38]
CALL 0x0015b558
LEA RDI,[RSP + 0x20]
CALL 0x00164f70
LEA RDI,[RSP + 0x88]
CALL 0x0015b558
JMP 0x0018971a
LAB_0018971a:
JMP 0x00189746
LAB_0018971c:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x0018972f
JMP 0x00189744
LAB_0018972f:
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015b410
LAB_00189744:
JMP 0x00189746
LAB_00189746:
JMP 0x00189748
LAB_00189748:
ADD RSP,0x1d8
RET
|
/* common_params_handle_model_default(std::__cxx11::string&, std::__cxx11::string const&,
std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string
const&) */
void common_params_handle_model_default
(string *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
string *param_6)
{
string *psVar1;
byte bVar2;
string local_1b8 [24];
string local_1a0 [32];
string local_180 [24];
string local_168 [24];
string local_150 [32];
string local_130 [39];
allocator local_109;
string local_108 [39];
allocator local_e1;
string local_e0 [32];
string local_c0 [32];
string local_a0 [48];
string local_70 [32];
string local_50 [32];
string *local_30;
string *local_28;
string *local_20;
string *local_18;
string *local_10;
string *local_8;
local_30 = param_6;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
std::__cxx11::string::operator=(local_20,local_8);
}
else {
common_get_hf_file(local_70,local_18);
bVar2 = std::__cxx11::string::empty();
if (((bVar2 & 1) != 0) || (bVar2 = std::__cxx11::string::empty(), (bVar2 & 1) != 0)) {
/* WARNING: Subroutine does not return */
exit(1);
}
/* try { // try from 001892ef to 00189312 has its CatchHandler @ 00189324 */
std::__cxx11::string::operator=(local_18,local_70);
std::__cxx11::string::operator=(local_20,local_50);
std::pair<std::__cxx11::string,std::__cxx11::string>::~pair
((pair<std::__cxx11::string,std::__cxx11::string> *)local_70);
}
}
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
std::operator+(local_c0,(char *)local_18);
/* try { // try from 001893a5 to 001893b1 has its CatchHandler @ 001894b9 */
std::operator+(local_a0,local_c0);
std::__cxx11::string::~string(local_c0);
std::allocator<char>::allocator();
/* try { // try from 001893d8 to 001893eb has its CatchHandler @ 001894df */
std::__cxx11::string::string<std::allocator<char>>(local_e0,"/",&local_e1);
std::allocator<char>::allocator();
/* try { // try from 00189405 to 00189418 has its CatchHandler @ 001894f5 */
std::__cxx11::string::string<std::allocator<char>>(local_108,"_",&local_109);
/* try { // try from 0018941b to 00189437 has its CatchHandler @ 0018950b */
string_replace_all(local_a0,local_e0,local_108);
std::__cxx11::string::~string(local_108);
std::allocator<char>::~allocator((allocator<char> *)&local_109);
std::__cxx11::string::~string(local_e0);
std::allocator<char>::~allocator((allocator<char> *)&local_e1);
/* try { // try from 0018946e to 00189482 has its CatchHandler @ 00189555 */
fs_get_cache_file(local_130);
std::__cxx11::string::operator=(local_8,local_130);
std::__cxx11::string::~string(local_130);
std::__cxx11::string::~string(local_a0);
}
}
else {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
string_split<std::__cxx11::string>(local_168,(char)local_10);
psVar1 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_168);
/* try { // try from 001895d2 to 001895de has its CatchHandler @ 00189694 */
std::__cxx11::string::string(local_150,psVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_168);
/* try { // try from 001895eb to 00189601 has its CatchHandler @ 001896b7 */
string_split<std::__cxx11::string>(local_180,(char)local_150);
psVar1 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_180);
/* try { // try from 00189611 to 0018961d has its CatchHandler @ 001896cd */
std::__cxx11::string::operator=(local_150,psVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_180);
/* try { // try from 0018962a to 00189640 has its CatchHandler @ 001896b7 */
string_split<std::__cxx11::string>(local_1b8,(char)local_150);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_1b8);
/* try { // try from 00189650 to 00189659 has its CatchHandler @ 001896ed */
fs_get_cache_file(local_1a0);
std::__cxx11::string::operator=(local_8,local_1a0);
std::__cxx11::string::~string(local_1a0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_1b8);
std::__cxx11::string::~string(local_150);
}
}
else {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
std::__cxx11::string::operator=(local_8,local_30);
}
}
}
return;
}
|
|
17,594
|
my_service_thread_sleep
|
eloqsql/storage/maria/ma_servicethread.c
|
my_bool my_service_thread_sleep(MA_SERVICE_THREAD_CONTROL *control,
ulonglong sleep_time)
{
struct timespec abstime;
my_bool res= FALSE;
DBUG_ENTER("my_service_thread_sleep");
DBUG_PRINT("init", ("control %p", control));
mysql_mutex_lock(control->LOCK_control);
if (control->killed)
{
mysql_mutex_unlock(control->LOCK_control);
DBUG_RETURN(TRUE);
}
#if 0 /* good for testing, to do a lot of checkpoints, finds a lot of bugs */
mysql_mutex_unlock(&control->LOCK_control);
my_sleep(100000); /* a tenth of a second */
mysql_mutex_lock(&control->LOCK_control);
#else
/* To have a killable sleep, we use timedwait like our SQL GET_LOCK() */
DBUG_PRINT("info", ("sleeping %llu nano seconds", sleep_time));
if (sleep_time)
{
set_timespec_nsec(abstime, sleep_time);
mysql_cond_timedwait(control->COND_control,
control->LOCK_control, &abstime);
}
#endif
if (control->killed)
res= TRUE;
mysql_mutex_unlock(control->LOCK_control);
DBUG_RETURN(res);
}
|
O3
|
c
|
my_service_thread_sleep:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
cmpq $0x0, 0x40(%rdi)
jne 0x506c8
callq 0x29220
cmpb $0x0, 0x8(%rbx)
je 0x50649
movq 0x10(%rbx), %rbx
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x506de
movq %rbx, %rdi
callq 0x291e0
movb $0x1, %r14b
jmp 0x506bc
testq %r14, %r14
je 0x5069f
callq 0x9e154
imulq $0x3e8, %rax, %rcx # imm = 0x3E8
addq %r14, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, -0x20(%rbp)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdi
cmpq $0x0, 0x30(%rdi)
jne 0x50705
leaq -0x20(%rbp), %rdx
callq 0x29680
cmpb $0x0, 0x8(%rbx)
setne %r14b
movq 0x10(%rbx), %rbx
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x506f3
movq %rbx, %rdi
callq 0x291e0
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x89f58(%rip), %rsi # 0xda627
movl $0x63, %edx
callq 0x2eb8f
jmp 0x50625
leaq 0x33592b(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5063c
leaq 0x335916(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x506b4
leaq 0x89f1b(%rip), %rcx # 0xda627
leaq -0x20(%rbp), %rdx
movl $0x74, %r8d
callq 0x2ef10
jmp 0x5069f
nopl (%rax)
|
my_service_thread_sleep:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+10h]
cmp qword ptr [rdi+40h], 0
jnz loc_506C8
call _pthread_mutex_lock
loc_50625:
cmp byte ptr [rbx+8], 0
jz short loc_50649
mov rbx, [rbx+10h]
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_506DE
loc_5063C:
mov rdi, rbx
call _pthread_mutex_unlock
mov r14b, 1
jmp short loc_506BC
loc_50649:
test r14, r14
jz short loc_5069F
call my_hrtime
imul rcx, rax, 3E8h
add rcx, r14
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov [rbp+var_20], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_18], rcx
mov rsi, [rbx+10h]
mov rdi, [rbx+18h]
cmp qword ptr [rdi+30h], 0
jnz short loc_50705
lea rdx, [rbp+var_20]
call _pthread_cond_timedwait
loc_5069F:
cmp byte ptr [rbx+8], 0
setnz r14b
mov rbx, [rbx+10h]
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_506F3
loc_506B4:
mov rdi, rbx
call _pthread_mutex_unlock
loc_506BC:
mov eax, r14d
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_506C8:
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 63h ; 'c'
call psi_mutex_lock
jmp loc_50625
loc_506DE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5063C
loc_506F3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_506B4
loc_50705:
lea rcx, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, [rbp+var_20]
mov r8d, 74h ; 't'
call psi_cond_timedwait
jmp short loc_5069F
|
long long my_service_thread_sleep(long long a1, const char *a2)
{
const char *v2; // r14
long long v4; // rdi
long long v5; // rbx
const char *v6; // rcx
long long v7; // rsi
long long v8; // rdi
long long v9; // rbx
_QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF
v2 = a2;
v4 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v4 + 64) )
{
a2 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c";
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x63u);
}
else
{
pthread_mutex_lock(v4);
}
if ( *(_BYTE *)(a1 + 8) )
{
v5 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v5 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v5);
LOBYTE(v2) = 1;
}
else
{
if ( v2 )
{
v6 = &v2[1000 * my_hrtime(v4, a2)];
v11[0] = (unsigned long long)v6 / 0x3B9ACA00;
v11[1] = (unsigned long long)v6 % 0x3B9ACA00;
v7 = *(_QWORD *)(a1 + 16);
v8 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v8 + 48) )
psi_cond_timedwait(
v8,
v7,
(long long)v11,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",
0x74u);
else
pthread_cond_timedwait(v8, v7, v11);
}
LOBYTE(v2) = *(_BYTE *)(a1 + 8) != 0;
v9 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v9 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v9);
}
return (unsigned int)v2;
}
|
my_service_thread_sleep:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x001506c8
CALL 0x00129220
LAB_00150625:
CMP byte ptr [RBX + 0x8],0x0
JZ 0x00150649
MOV RBX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001506de
LAB_0015063c:
MOV RDI,RBX
CALL 0x001291e0
MOV R14B,0x1
JMP 0x001506bc
LAB_00150649:
TEST R14,R14
JZ 0x0015069f
CALL 0x0019e154
IMUL RCX,RAX,0x3e8
ADD RCX,R14
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV qword ptr [RBP + -0x20],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x18],RCX
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RBX + 0x18]
CMP qword ptr [RDI + 0x30],0x0
JNZ 0x00150705
LEA RDX,[RBP + -0x20]
CALL 0x00129680
LAB_0015069f:
CMP byte ptr [RBX + 0x8],0x0
SETNZ R14B
MOV RBX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001506f3
LAB_001506b4:
MOV RDI,RBX
CALL 0x001291e0
LAB_001506bc:
MOV EAX,R14D
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_001506c8:
LEA RSI,[0x1da627]
MOV EDX,0x63
CALL 0x0012eb8f
JMP 0x00150625
LAB_001506de:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015063c
LAB_001506f3:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001506b4
LAB_00150705:
LEA RCX,[0x1da627]
LEA RDX,[RBP + -0x20]
MOV R8D,0x74
CALL 0x0012ef10
JMP 0x0015069f
|
ulong my_service_thread_sleep(long param_1,long param_2)
{
pthread_mutex_t *ppVar1;
pthread_cond_t *__cond;
long lVar2;
int7 uVar4;
ulong uVar3;
timespec local_28;
ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10);
if (*(long *)((long)ppVar1 + 0x40) == 0) {
pthread_mutex_lock(ppVar1);
}
else {
psi_mutex_lock(ppVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",99);
}
uVar4 = (int7)((ulong)param_2 >> 8);
if (*(char *)(param_1 + 8) == '\0') {
if (param_2 != 0) {
lVar2 = my_hrtime();
local_28.tv_nsec = lVar2 * 1000 + param_2;
local_28.tv_sec = (ulong)local_28.tv_nsec / 1000000000;
local_28.tv_nsec = (ulong)local_28.tv_nsec % 1000000000;
__cond = *(pthread_cond_t **)(param_1 + 0x18);
if (__cond[1].__align == 0) {
pthread_cond_timedwait(__cond,*(pthread_mutex_t **)(param_1 + 0x10),&local_28);
}
else {
psi_cond_timedwait(__cond,*(pthread_mutex_t **)(param_1 + 0x10),&local_28,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c"
,0x74);
}
}
uVar3 = CONCAT71(uVar4,*(char *)(param_1 + 8) != '\0');
ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10);
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
}
else {
ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10);
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
uVar3 = CONCAT71(uVar4,1);
}
return uVar3 & 0xffffffff;
}
|
|
17,595
|
PtrToSegment
|
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
|
segment_t *PtrToSegment(void *ptr) {
if (!ptr) {
HEAP_LOG("Cannot convert NULL pointer to segment\n");
return NULL;
}
// Calculate segment address based on alignment and metadata size
uintptr_t addr = (uintptr_t) ptr;
addr &= ~(ALIGNMENT - 1); // Round down to alignment boundary
addr -= sizeof(segment_t);
segment_t *s = (segment_t *) addr;
// Verify segment is valid
if (debug_mode && s->magic != SEGMENT_MAGIC) {
HEAP_LOG("CRITICAL: Invalid magic number in segment at %p (ptr=%p)\n", s, ptr);
return NULL;
}
HEAP_LOG("User pointer %p converted to segment %p\n", ptr, s);
return s;
}
|
O3
|
c
|
PtrToSegment:
testq %rdi, %rdi
je 0x1fc1
movq %rdi, %rax
andq $-0x10, %rax
addq $-0x30, %rax
leaq 0x410413d(%rip), %rcx # 0x41060f0
cmpl $0x0, (%rcx)
je 0x1fc3
cmpl $0xcafebafe, 0x28(%rax) # imm = 0xCAFEBAFE
je 0x1fc3
xorl %eax, %eax
retq
|
PtrToSegment:
test rdi, rdi
jz short loc_1FC1
mov rax, rdi
and rax, 0FFFFFFFFFFFFFFF0h
add rax, 0FFFFFFFFFFFFFFD0h
lea rcx, debug_mode
cmp dword ptr [rcx], 0
jz short locret_1FC3
cmp dword ptr [rax+28h], 0CAFEBAFEh
jz short locret_1FC3
loc_1FC1:
xor eax, eax
locret_1FC3:
retn
|
unsigned long long PtrToSegment(long long a1)
{
unsigned long long result; // rax
if ( !a1 )
return 0LL;
result = (a1 & 0xFFFFFFFFFFFFFFF0LL) - 48;
if ( debug_mode )
{
if ( *(_DWORD *)((char *)&qword_28 + (a1 & 0xFFFFFFFFFFFFFFF0LL) - 48) != -889275650 )
return 0LL;
}
return result;
}
|
PtrToSegment:
TEST RDI,RDI
JZ 0x00101fc1
MOV RAX,RDI
AND RAX,-0x10
ADD RAX,-0x30
LEA RCX,[0x42060f0]
CMP dword ptr [RCX],0x0
JZ 0x00101fc3
CMP dword ptr [RAX + 0x28],0xcafebafe
JZ 0x00101fc3
LAB_00101fc1:
XOR EAX,EAX
LAB_00101fc3:
RET
|
long PtrToSegment(ulong param_1)
{
long lVar1;
if (param_1 != 0) {
lVar1 = (param_1 & 0xfffffffffffffff0) - 0x30;
if (debug_mode == 0) {
return lVar1;
}
if (*(int *)((param_1 & 0xfffffffffffffff0) - 8) == -0x35014502) {
return lVar1;
}
}
return 0;
}
|
|
17,596
|
fmt::v10::detail::bigint::operator<<=(int)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
auto operator<<=(int shift) -> bigint& {
FMT_ASSERT(shift >= 0, "");
exp_ += shift / bigit_bits;
shift %= bigit_bits;
if (shift == 0) return *this;
bigit carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
bigit c = bigits_[i] >> (bigit_bits - shift);
bigits_[i] = (bigits_[i] << shift) + carry;
carry = c;
}
if (carry != 0) bigits_.push_back(carry);
return *this;
}
|
O0
|
c
|
fmt::v10::detail::bigint::operator<<=(int):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x34(%rsp)
setge %al
andb $0x1, %al
movb %al, 0x33(%rsp)
leaq 0x33(%rsp), %rdi
leaq 0x7b773(%rip), %rsi # 0x155fb4
callq 0x889b0
movl 0x34(%rsp), %eax
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq 0x8(%rsp), %rax
addl 0xa0(%rax), %ecx
movl %ecx, 0xa0(%rax)
movl 0x34(%rsp), %eax
movl $0x20, %ecx
cltd
idivl %ecx
movl %edx, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0xda88b
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xda943
movq 0x8(%rsp), %rdi
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
callq 0xdb3a0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0xda923
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xdb510
movq 0x8(%rsp), %rdi
movl (%rax), %eax
movl $0x20, %ecx
subl 0x34(%rsp), %ecx
shrl %cl, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rsi
callq 0xdb510
movq 0x8(%rsp), %rdi
movl (%rax), %eax
movl 0x34(%rsp), %ecx
shll %cl, %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rsi
callq 0xdb510
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movl 0x14(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xda8ab
cmpl $0x0, 0x2c(%rsp)
je 0xda939
movq 0x8(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0xdb600
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
|
_ZN3fmt3v106detail6bigintlSEi:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_40], rax
cmp [rsp+48h+var_14], 0
setnl al
and al, 1
mov [rsp+48h+var_15], al
lea rdi, [rsp+48h+var_15]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
mov eax, [rsp+48h+var_14]
mov ecx, 20h ; ' '
cdq
idiv ecx
mov ecx, eax
mov rax, [rsp+48h+var_40]
add ecx, [rax+0A0h]
mov [rax+0A0h], ecx
mov eax, [rsp+48h+var_14]
mov ecx, 20h ; ' '
cdq
idiv ecx
mov [rsp+48h+var_14], edx
cmp [rsp+48h+var_14], 0
jnz short loc_DA88B
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
jmp loc_DA943
loc_DA88B:
mov rdi, [rsp+48h+var_40]
mov [rsp+48h+var_1C], 0
mov [rsp+48h+var_28], 0
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+48h+var_30], rax
loc_DA8AB:
mov rax, [rsp+48h+var_28]
cmp rax, [rsp+48h+var_30]
jnb short loc_DA923
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rdi, [rsp+48h+var_40]
mov eax, [rax]
mov ecx, 20h ; ' '
sub ecx, [rsp+48h+var_14]
shr eax, cl
mov [rsp+48h+var_34], eax
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rdi, [rsp+48h+var_40]
mov eax, [rax]
mov ecx, [rsp+48h+var_14]
shl eax, cl
add eax, [rsp+48h+var_1C]
mov [rsp+48h+var_44], eax
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+48h+var_44]
mov [rax], ecx
mov eax, [rsp+48h+var_34]
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_28]
add rax, 1
mov [rsp+48h+var_28], rax
jmp short loc_DA8AB
loc_DA923:
cmp [rsp+48h+var_1C], 0
jz short loc_DA939
mov rdi, [rsp+48h+var_40]
lea rsi, [rsp+48h+var_1C]
call _ZN3fmt3v106detail6bufferIjE9push_backERKj; fmt::v10::detail::buffer<uint>::push_back(uint const&)
loc_DA939:
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
loc_DA943:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long fmt::v10::detail::bigint::operator<<=(long long a1, int a2)
{
int v3; // [rsp+4h] [rbp-44h]
int v4; // [rsp+14h] [rbp-34h]
unsigned long long v5; // [rsp+18h] [rbp-30h]
unsigned long long v6; // [rsp+20h] [rbp-28h]
int v7; // [rsp+2Ch] [rbp-1Ch] BYREF
bool v8; // [rsp+33h] [rbp-15h]
int v9; // [rsp+34h] [rbp-14h]
long long v10; // [rsp+38h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a2 >= 0;
fmt::v10::detail::ignore_unused<bool,char [1]>();
*(_DWORD *)(a1 + 160) += a2 / 32;
v9 %= 32;
if ( !v9 )
return a1;
v7 = 0;
v6 = 0LL;
v5 = fmt::v10::detail::buffer<unsigned int>::size(a1, "");
while ( v6 < v5 )
{
v4 = *(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v6) >> (32 - v9);
v3 = v7 + (*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v6) << v9);
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v6) = v3;
v7 = v4;
++v6;
}
if ( v7 )
fmt::v10::detail::buffer<unsigned int>::push_back(a1, &v7);
return a1;
}
|
operator<<=:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x34],0x0
SETGE AL
AND AL,0x1
MOV byte ptr [RSP + 0x33],AL
LEA RDI,[RSP + 0x33]
LEA RSI,[0x255fb4]
CALL 0x001889b0
MOV EAX,dword ptr [RSP + 0x34]
MOV ECX,0x20
CDQ
IDIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
ADD ECX,dword ptr [RAX + 0xa0]
MOV dword ptr [RAX + 0xa0],ECX
MOV EAX,dword ptr [RSP + 0x34]
MOV ECX,0x20
CDQ
IDIV ECX
MOV dword ptr [RSP + 0x34],EDX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001da88b
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001da943
LAB_001da88b:
MOV RDI,qword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x2c],0x0
MOV qword ptr [RSP + 0x20],0x0
CALL 0x001db3a0
MOV qword ptr [RSP + 0x18],RAX
LAB_001da8ab:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JNC 0x001da923
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001db510
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,0x20
SUB ECX,dword ptr [RSP + 0x34]
SHR EAX,CL
MOV dword ptr [RSP + 0x14],EAX
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001db510
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RSP + 0x34]
SHL EAX,CL
ADD EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001db510
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001da8ab
LAB_001da923:
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x001da939
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x2c]
CALL 0x001db600
LAB_001da939:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
LAB_001da943:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
/* fmt::v10::detail::bigint::TEMPNAMEPLACEHOLDERVALUE(int) */
bigint * __thiscall fmt::v10::detail::bigint::operator<<=(bigint *this,int param_1)
{
uint uVar1;
char cVar2;
uint uVar3;
ulong uVar4;
uint *puVar5;
ulong local_28;
uint local_1c;
bool local_15;
int local_14;
bigint *local_10;
local_15 = -1 < param_1;
local_14 = param_1;
local_10 = this;
ignore_unused<bool,char[1]>(&local_15,"");
*(int *)(this + 0xa0) = local_14 / 0x20 + *(int *)(this + 0xa0);
local_14 = local_14 % 0x20;
if (local_14 != 0) {
local_1c = 0;
local_28 = 0;
uVar4 = buffer<unsigned_int>::size((buffer<unsigned_int> *)this);
for (; local_28 < uVar4; local_28 = local_28 + 1) {
puVar5 = buffer<unsigned_int>::operator[]<unsigned_long>
((buffer<unsigned_int> *)this,local_28);
uVar1 = *puVar5;
cVar2 = (char)local_14;
puVar5 = buffer<unsigned_int>::operator[]<unsigned_long>
((buffer<unsigned_int> *)this,local_28);
uVar3 = (*puVar5 << ((byte)local_14 & 0x1f)) + local_1c;
puVar5 = buffer<unsigned_int>::operator[]<unsigned_long>
((buffer<unsigned_int> *)this,local_28);
*puVar5 = uVar3;
local_1c = uVar1 >> (0x20U - cVar2 & 0x1f);
}
if (local_1c != 0) {
buffer<unsigned_int>::push_back((buffer<unsigned_int> *)this,&local_1c);
}
}
return this;
}
|
|
17,597
|
pcre2_jit_stack_assign_8
|
eloqsql/build_O3/extra/pcre2/src/pcre2/src/pcre2_jit_misc.c
|
PCRE2_CALL_CONVENTION
pcre2_jit_stack_assign(pcre2_match_context *mcontext, pcre2_jit_callback callback,
void *callback_data)
{
#ifndef SUPPORT_JIT
(void)mcontext;
(void)callback;
(void)callback_data;
#else /* SUPPORT_JIT */
if (mcontext == NULL) return;
mcontext->jit_callback = callback;
mcontext->jit_callback_data = callback_data;
#endif /* SUPPORT_JIT */
}
|
O3
|
c
|
pcre2_jit_stack_assign_8:
pushq %rbp
movq %rsp, %rbp
popq %rbp
retq
|
pcre2_jit_stack_assign_8:
push rbp
mov rbp, rsp
pop rbp
retn
|
void pcre2_jit_stack_assign_8()
{
;
}
|
pcre2_jit_stack_assign_8:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void pcre2_jit_stack_assign_8(void)
{
return;
}
|
|
17,598
|
ma_crypt_post_write_hook
|
eloqsql/storage/maria/ma_crypt.c
|
static void ma_crypt_post_write_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
maria_page_write_failure(res, args);
}
|
O3
|
c
|
ma_crypt_post_write_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x675e2
movq (%rbx), %rdi
movq %rax, (%rbx)
movq $0x0, 0x18(%rbx)
callq 0xa00ca
movl %r14d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3e26a
|
ma_crypt_post_write_hook:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14d, edi
mov rax, [rsi+18h]
test rax, rax
jz short loc_675E2
mov rdi, [rbx]
mov [rbx], rax
mov qword ptr [rbx+18h], 0
call my_free
loc_675E2:
mov edi, r14d
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp maria_page_write_failure
|
long long ma_crypt_post_write_hook(int a1, long long *a2)
{
long long v3; // rax
long long v4; // rdi
v3 = a2[3];
if ( v3 )
{
v4 = *a2;
*a2 = v3;
a2[3] = 0LL;
my_free(v4);
}
return maria_page_write_failure(a1, (long long)a2);
}
|
ma_crypt_post_write_hook:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14D,EDI
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JZ 0x001675e2
MOV RDI,qword ptr [RBX]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x18],0x0
CALL 0x001a00ca
LAB_001675e2:
MOV EDI,R14D
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0013e26a
|
void ma_crypt_post_write_hook(int4 param_1,long *param_2)
{
long lVar1;
if (param_2[3] != 0) {
lVar1 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar1);
}
maria_page_write_failure(param_1,param_2);
return;
}
|
|
17,599
|
js_reflect_deleteProperty
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_reflect_deleteProperty(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj;
JSAtom atom;
int ret;
obj = argv[0];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, argv[1]);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_DeleteProperty(ctx, obj, atom, 0);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
}
|
O1
|
c
|
js_reflect_deleteProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%r8), %r12
cmpl $-0x1, %r12d
jne 0x128a8
movq (%r8), %r13
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq %r15, %rdi
callq 0x24093
pushq $0x6
popq %r14
testl %eax, %eax
je 0x128d4
movl %eax, %ebp
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x26d3b
movl %eax, %r12d
movq %r15, %rdi
movl %ebp, %esi
callq 0x207d8
testl %r12d, %r12d
js 0x128bf
setne %al
movzbl %al, %ebx
pushq $0x1
jmp 0x128bd
leaq 0x8c776(%rip), %rsi # 0x9f025
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
pushq $0x6
popq %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x128bf
|
js_reflect_deleteProperty:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r12, [r8+8]
cmp r12d, 0FFFFFFFFh
jnz short loc_128A8
mov r13, [r8]
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov rdi, r15
call JS_ValueToAtom
push 6
pop r14
test eax, eax
jz short loc_128D4
mov ebp, eax
xor ebx, ebx
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov ecx, eax
xor r8d, r8d
call JS_DeleteProperty
mov r12d, eax
mov rdi, r15
mov esi, ebp
call JS_FreeAtom
test r12d, r12d
js short loc_128BF
setnz al
movzx ebx, al
push 1
jmp short loc_128BD
loc_128A8:
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
push 6
loc_128BD:
pop r14
loc_128BF:
mov rax, rbx
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_128D4:
xor ebx, ebx
jmp short loc_128BF
|
_BOOL8 js_reflect_deleteProperty(long long a1, long long a2, int a3, int a4, long long *a5, int a6)
{
long long v6; // r12
long long v7; // r13
unsigned int v8; // eax
unsigned int v9; // ebp
long long v10; // rbx
int v11; // r12d
v6 = a5[1];
if ( (_DWORD)v6 == -1 )
{
v7 = *a5;
v8 = JS_ValueToAtom(a1, a5[2], a5[3]);
if ( v8 )
{
v9 = v8;
v10 = 0LL;
v11 = JS_DeleteProperty(a1, v7, v6, v8, 0LL);
JS_FreeAtom(a1, v9);
if ( v11 >= 0 )
return v11 != 0;
}
else
{
return 0LL;
}
}
else
{
v10 = 0LL;
JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6);
}
return v10;
}
|
js_reflect_deleteProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R12,qword ptr [R8 + 0x8]
CMP R12D,-0x1
JNZ 0x001128a8
MOV R13,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x10]
MOV RDX,qword ptr [R8 + 0x18]
MOV RDI,R15
CALL 0x00124093
PUSH 0x6
POP R14
TEST EAX,EAX
JZ 0x001128d4
MOV EBP,EAX
XOR EBX,EBX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV ECX,EAX
XOR R8D,R8D
CALL 0x00126d3b
MOV R12D,EAX
MOV RDI,R15
MOV ESI,EBP
CALL 0x001207d8
TEST R12D,R12D
JS 0x001128bf
SETNZ AL
MOVZX EBX,AL
PUSH 0x1
JMP 0x001128bd
LAB_001128a8:
LEA RSI,[0x19f025]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
PUSH 0x6
LAB_001128bd:
POP R14
LAB_001128bf:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001128d4:
XOR EBX,EBX
JMP 0x001128bf
|
bool js_reflect_deleteProperty(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int iVar4;
int8 *in_R8;
bool bVar5;
uVar1 = in_R8[1];
if ((int)uVar1 == -1) {
uVar2 = *in_R8;
iVar3 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]);
if (iVar3 == 0) {
return false;
}
iVar4 = JS_DeleteProperty(param_1,uVar2,uVar1,iVar3,0);
JS_FreeAtom(param_1,iVar3);
bVar5 = iVar4 != 0;
if (iVar4 < 0) {
return false;
}
}
else {
bVar5 = false;
JS_ThrowTypeError(param_1,"not an object");
}
return bVar5;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.