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
|
---|---|---|---|---|---|---|---|---|---|---|---|
4,100 | facebook::yoga::StyleValuePool_auto_at_init_Test::TestBody() | yoga-mod/tests/StyleValuePoolTest.cpp | TEST(StyleValuePool, auto_at_init) {
StyleValuePool pool;
auto handle = StyleValueHandle::ofAuto();
EXPECT_TRUE(handle.isAuto());
EXPECT_EQ(pool.getLength(handle), StyleLength::ofAuto());
} | O3 | cpp | facebook::yoga::StyleValuePool_auto_at_init_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x50(%rbp), %rdi
movw $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi)
movups %xmm0, 0x18(%rdi)
movl $0x4, %esi
callq 0x7977e
leaq -0x18(%rbp), %rcx
movl %eax, (%rcx)
shrq $0x20, %rax
movb %al, 0x4(%rcx)
leaq -0x10(%rbp), %r8
movb $0x3, 0x4(%r8)
movl $0x7fc00000, (%r8) # imm = 0x7FC00000
leaq 0x320a4d(%rip), %rsi # 0x39a66c
leaq 0x320aaa(%rip), %rdx # 0x39a6d0
leaq -0x28(%rbp), %rdi
callq 0x7bb1f
cmpb $0x0, -0x28(%rbp)
jne 0x79c92
leaq -0x18(%rbp), %rdi
callq 0x37f68a
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x79c4c
movq (%rax), %r8
jmp 0x79c53
leaq 0x32f757(%rip), %r8 # 0x3a93aa
leaq 0x3209a3(%rip), %rdx # 0x39a5fd
leaq -0x10(%rbp), %rdi
movl $0x1, %esi
movl $0x1c, %ecx
callq 0x37cfa4
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x37bc92
leaq -0x10(%rbp), %rdi
callq 0x37d01c
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0x79c92
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x20(%rbp), %rsi
testq %rsi, %rsi
je 0x79ca4
leaq -0x20(%rbp), %rdi
callq 0x6fd1c
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
je 0x79cb6
leaq -0x30(%rbp), %rdi
callq 0x7777e
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x10(%rbp), %rdi
callq 0x37d01c
jmp 0x79cce
movq %rax, %rbx
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0x79ce2
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x79ce2
movq %rax, %rbx
movq -0x20(%rbp), %rsi
testq %rsi, %rsi
je 0x79cfb
leaq -0x20(%rbp), %rdi
callq 0x6fd1c
jmp 0x79cfb
jmp 0x79cf8
movq %rax, %rbx
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
je 0x79d0d
leaq -0x30(%rbp), %rdi
callq 0x7777e
movq %rbx, %rdi
callq 0x32840
nop
| _ZN8facebook4yoga32StyleValuePool_auto_at_init_Test8TestBodyEv:
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
lea rdi, [rbp+var_50]
mov word ptr [rdi], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+4], xmm0
movups xmmword ptr [rdi+18h], xmm0
mov esi, 4
call _ZNK8facebook4yoga14StyleValuePool9getLengthENS0_16StyleValueHandleE; facebook::yoga::StyleValuePool::getLength(facebook::yoga::StyleValueHandle)
lea rcx, [rbp+var_18]
mov [rcx], eax
shr rax, 20h
mov [rcx+4], al
lea r8, [rbp+var_10]
mov byte ptr [r8+4], 3
mov dword ptr [r8], 7FC00000h
lea rsi, aPoolGetlengthH; "pool.getLength(handle)"
lea rdx, aStylelengthOfa; "StyleLength::ofAuto()"
lea rdi, [rbp+var_28]; this
call _ZN7testing8internal11CmpHelperEQIN8facebook4yoga11StyleLengthES4_EENS_15AssertionResultEPKcS7_RKT_RKT0_; testing::internal::CmpHelperEQ<facebook::yoga::StyleLength,facebook::yoga::StyleLength>(char const*,char const*,facebook::yoga::StyleLength const&,facebook::yoga::StyleLength const&)
cmp [rbp+var_28], 0
jnz short loc_79C92
lea rdi, [rbp+var_18]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rbp+var_20]
test rax, rax
jz short loc_79C4C
mov r8, [rax]
jmp short loc_79C53
loc_79C4C:
lea r8, aSFromSSMsTotal+1Ah; ""
loc_79C53:
lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/yoga-m"...
lea rdi, [rbp+var_10]
mov esi, 1
mov ecx, 1Ch
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
lea rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
lea rdi, [rbp+var_10]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rbp+var_18]
test rdi, rdi
jz short loc_79C92
mov rax, [rdi]
call qword ptr [rax+8]
loc_79C92:
mov rsi, [rbp+var_20]
test rsi, rsi
jz short loc_79CA4
lea rdi, [rbp+var_20]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_79CA4:
mov rsi, [rbp+var_30]
test rsi, rsi
jz short loc_79CB6
lea rdi, [rbp+var_30]
call _ZNKSt14default_deleteIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEEclEPS4_; std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()(facebook::yoga::SmallValueBuffer<4ul>::Overflow*)
loc_79CB6:
add rsp, 48h
pop rbx
pop rbp
retn
mov rbx, rax
lea rdi, [rbp+var_10]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
jmp short loc_79CCE
mov rbx, rax
loc_79CCE:
mov rdi, [rbp+var_18]
test rdi, rdi
jz short loc_79CE2
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_79CE2
mov rbx, rax
loc_79CE2:
mov rsi, [rbp+var_20]
test rsi, rsi
jz short loc_79CFB
lea rdi, [rbp+var_20]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_79CFB
jmp short $+2
loc_79CF8:
mov rbx, rax
loc_79CFB:
mov rsi, [rbp+var_30]
test rsi, rsi
jz short loc_79D0D
lea rdi, [rbp+var_30]
call _ZNKSt14default_deleteIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEEclEPS4_; std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()(facebook::yoga::SmallValueBuffer<4ul>::Overflow*)
loc_79D0D:
mov rdi, rbx
call __Unwind_Resume
| void facebook::yoga::StyleValuePool_auto_at_init_Test::TestBody(
facebook::yoga::StyleValuePool_auto_at_init_Test *this)
{
long long Length; // rax
char *v2; // r8
double v3; // xmm0_8
_WORD v4[2]; // [rsp+0h] [rbp-50h] BYREF
__int128 v5; // [rsp+4h] [rbp-4Ch]
__int128 v6; // [rsp+18h] [rbp-38h] BYREF
_BYTE v7[8]; // [rsp+28h] [rbp-28h] BYREF
_QWORD *v8; // [rsp+30h] [rbp-20h] BYREF
long long v9; // [rsp+38h] [rbp-18h] BYREF
int v10; // [rsp+40h] [rbp-10h] BYREF
char v11; // [rsp+44h] [rbp-Ch]
v4[0] = 0;
v5 = 0LL;
v6 = 0LL;
Length = facebook::yoga::StyleValuePool::getLength((long long)v4, 4u, (__m128i)0LL);
LODWORD(v9) = Length;
BYTE4(v9) = BYTE4(Length);
v11 = 3;
v10 = 2143289344;
testing::internal::CmpHelperEQ<facebook::yoga::StyleLength,facebook::yoga::StyleLength>((testing *)v7);
if ( !v7[0] )
{
testing::Message::Message((testing::Message *)&v9);
v2 = v8 ? (char *)*v8 : "";
testing::internal::AssertHelper::AssertHelper(
&v10,
1LL,
"/workspace/llm4binary/github2025/yoga-mod/tests/StyleValuePoolTest.cpp",
28LL,
v2);
v3 = testing::internal::AssertHelper::operator=(&v10, &v9);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)&v10);
if ( v9 )
(*(void ( **)(long long, double))(*(_QWORD *)v9 + 8LL))(v9, v3);
}
if ( v8 )
std::default_delete<std::string>::operator()((long long)&v8, (long long)v8);
if ( *((_QWORD *)&v6 + 1) )
std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()(
(long long)&v6 + 8,
*((long long *)&v6 + 1));
}
| TestBody:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
LEA RDI,[RBP + -0x50]
MOV word ptr [RDI],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x4],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
LAB_00179bf1:
MOV ESI,0x4
CALL 0x0017977e
LEA RCX,[RBP + -0x18]
MOV dword ptr [RCX],EAX
SHR RAX,0x20
MOV byte ptr [RCX + 0x4],AL
LEA R8,[RBP + -0x10]
MOV byte ptr [R8 + 0x4],0x3
MOV dword ptr [R8],0x7fc00000
LAB_00179c18:
LEA RSI,[0x49a66c]
LEA RDX,[0x49a6d0]
LEA RDI,[RBP + -0x28]
CALL 0x0017bb1f
CMP byte ptr [RBP + -0x28],0x0
JNZ 0x00179c92
LAB_00179c35:
LEA RDI,[RBP + -0x18]
CALL 0x0047f68a
MOV RAX,qword ptr [RBP + -0x20]
TEST RAX,RAX
JZ 0x00179c4c
MOV R8,qword ptr [RAX]
JMP 0x00179c53
LAB_00179c4c:
LEA R8,[0x4a93aa]
LAB_00179c53:
LEA RDX,[0x49a5fd]
LEA RDI,[RBP + -0x10]
MOV ESI,0x1
MOV ECX,0x1c
CALL 0x0047cfa4
LAB_00179c6d:
LEA RDI,[RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x0047bc92
LAB_00179c7a:
LEA RDI,[RBP + -0x10]
CALL 0x0047d01c
MOV RDI,qword ptr [RBP + -0x18]
TEST RDI,RDI
JZ 0x00179c92
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00179c92:
MOV RSI,qword ptr [RBP + -0x20]
TEST RSI,RSI
JZ 0x00179ca4
LEA RDI,[RBP + -0x20]
CALL 0x0016fd1c
LAB_00179ca4:
MOV RSI,qword ptr [RBP + -0x30]
TEST RSI,RSI
JZ 0x00179cb6
LEA RDI,[RBP + -0x30]
CALL 0x0017777e
LAB_00179cb6:
ADD RSP,0x48
POP RBX
POP RBP
RET
|
/* facebook::yoga::StyleValuePool_auto_at_init_Test::TestBody() */
void facebook::yoga::StyleValuePool_auto_at_init_Test::TestBody(void)
{
int8 uVar1;
char *pcVar2;
int2 local_58 [2];
int8 local_54;
int8 uStack_4c;
int8 local_40;
Overflow *pOStack_38;
internal local_30 [8];
string *local_28;
int4 local_20;
int4 uStack_1c;
int4 local_18;
int1 local_14;
local_58[0] = 0;
local_54 = 0;
uStack_4c = 0;
local_40 = 0;
pOStack_38 = (Overflow *)0x0;
/* try { // try from 00179bf1 to 00179bfa has its CatchHandler @ 00179cf8 */
uVar1 = StyleValuePool::getLength((StyleValuePool *)local_58,4);
local_20 = (int4)uVar1;
uStack_1c = CONCAT31(uStack_1c._1_3_,(char)((ulong)uVar1 >> 0x20));
local_14 = 3;
local_18 = 0x7fc00000;
/* try { // try from 00179c18 to 00179c2e has its CatchHandler @ 00179cf6 */
testing::internal::CmpHelperEQ<facebook::yoga::StyleLength,facebook::yoga::StyleLength>
(local_30,"pool.getLength(handle)","StyleLength::ofAuto()",(StyleLength *)&local_20,
(StyleLength *)&local_18);
if (local_30[0] == (internal)0x0) {
/* try { // try from 00179c35 to 00179c3d has its CatchHandler @ 00179cdf */
testing::Message::Message((Message *)&local_20);
if (local_28 == (string *)0x0) {
pcVar2 = "";
}
else {
pcVar2 = *(char **)local_28;
}
/* try { // try from 00179c53 to 00179c6c has its CatchHandler @ 00179ccb */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)&local_18,1,
"/workspace/llm4binary/github2025/yoga-mod/tests/StyleValuePoolTest.cpp",0x1c,pcVar2)
;
/* try { // try from 00179c6d to 00179c79 has its CatchHandler @ 00179cbd */
testing::internal::AssertHelper::operator=((AssertHelper *)&local_18,(Message *)&local_20);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)&local_18);
if ((long *)CONCAT44(uStack_1c,local_20) != (long *)0x0) {
(**(code **)(*(long *)CONCAT44(uStack_1c,local_20) + 8))();
}
}
if (local_28 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_28,local_28);
}
if (pOStack_38 != (Overflow *)0x0) {
std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()
((default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow> *)&pOStack_38,
pOStack_38);
}
return;
}
|
|
4,101 | int YAML::RegEx::Match<YAML::StringCharSource>(YAML::StringCharSource const&) const | aimrt_mujoco_sim/_deps/yaml-cpp-src/src/regeximpl.h | inline bool RegEx::IsValidSource<StringCharSource>(
const StringCharSource& source) const {
switch (m_op) {
case REGEX_MATCH:
case REGEX_RANGE:
return source;
default:
return true;
}
} | O3 | c | int YAML::RegEx::Match<YAML::StringCharSource>(YAML::StringCharSource const&) const:
movl (%rdi), %r8d
leal -0x3(%r8), %eax
cmpl $-0x2, %eax
setb %al
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rcx
cmpq %rdx, %rcx
setb %r9b
orb %al, %r9b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x1, %r9b
jne 0x6a1f0
cmpl $0x6, %r8d
ja 0x6a1f0
movl %r8d, %eax
leaq 0xfaa7c(%rip), %r8 # 0x164c5c
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
xorl %eax, %eax
cmpq %rdx, %rcx
sbbl %eax, %eax
retq
jmp 0x6a41e
movq (%rsi), %rax
movb (%rax,%rcx), %al
cmpb %al, 0x4(%rdi)
setg %cl
cmpb %al, 0x5(%rdi)
setl %al
orb %cl, %al
movzbl %al, %eax
negl %eax
orl $0x1, %eax
retq
jmp 0x6a3d6
movq (%rsi), %rax
movb (%rax,%rcx), %al
xorl %ecx, %ecx
cmpb 0x4(%rdi), %al
sete %cl
leal -0x1(,%rcx,2), %eax
retq
jmp 0x6a484
jmp 0x6a4aa
| _ZNK4YAML5RegEx5MatchINS_16StringCharSourceEEEiRKT_:
mov r8d, [rdi]
lea eax, [r8-3]
cmp eax, 0FFFFFFFEh
setb al
mov rdx, [rsi+8]
mov rcx, [rsi+10h]
cmp rcx, rdx
setb r9b
or r9b, al
mov eax, 0FFFFFFFFh
cmp r9b, 1
jnz short def_6A1E7; jumptable 000000000006A1E7 default case
cmp r8d, 6; switch 7 cases
ja short def_6A1E7; jumptable 000000000006A1E7 default case
mov eax, r8d
lea r8, jpt_6A1E7
movsxd rax, ds:(jpt_6A1E7 - 164C5Ch)[r8+rax*4]
add rax, r8
jmp rax; switch jump
loc_6A1E9:
xor eax, eax; jumptable 000000000006A1E7 case 0
cmp rcx, rdx
sbb eax, eax
def_6A1E7:
retn; jumptable 000000000006A1E7 default case
loc_6A1F1:
jmp _ZNK4YAML5RegEx10MatchOpAndINS_16StringCharSourceEEEiRKT_; jumptable 000000000006A1E7 case 4
loc_6A1F6:
mov rax, [rsi]; jumptable 000000000006A1E7 case 2
mov al, [rax+rcx]
cmp [rdi+4], al
setnle cl
cmp [rdi+5], al
setl al
or al, cl
movzx eax, al
neg eax
or eax, 1
retn
loc_6A213:
jmp _ZNK4YAML5RegEx9MatchOpOrINS_16StringCharSourceEEEiRKT_; jumptable 000000000006A1E7 case 3
loc_6A218:
mov rax, [rsi]; jumptable 000000000006A1E7 case 1
mov al, [rax+rcx]
xor ecx, ecx
cmp al, [rdi+4]
setz cl
lea eax, ds:0FFFFFFFFFFFFFFFFh[rcx*2]
retn
loc_6A22E:
jmp _ZNK4YAML5RegEx10MatchOpNotINS_16StringCharSourceEEEiRKT_; jumptable 000000000006A1E7 case 5
loc_6A233:
jmp _ZNK4YAML5RegEx10MatchOpSeqINS_16StringCharSourceEEEiRKT_; jumptable 000000000006A1E7 case 6
| long long YAML::RegEx::Match<YAML::StringCharSource>(unsigned int *a1, _QWORD *a2)
{
unsigned int v2; // r8d
unsigned long long v3; // rdx
unsigned long long v4; // rcx
long long result; // rax
v2 = *a1;
v3 = a2[1];
v4 = a2[2];
result = 0xFFFFFFFFLL;
if ( *a1 - 3 < 0xFFFFFFFE || v4 < v3 )
{
result = v2;
switch ( v2 )
{
case 0u:
result = (unsigned int)-(v4 < v3);
break;
case 1u:
result = 2 * (unsigned int)(*(_BYTE *)(*a2 + v4) == *((_BYTE *)a1 + 4)) - 1;
break;
case 2u:
result = *((_BYTE *)a1 + 4) > *(_BYTE *)(*a2 + v4) || *((_BYTE *)a1 + 5) < *(_BYTE *)(*a2 + v4) ? -1 : 1;
break;
case 3u:
result = YAML::RegEx::MatchOpOr<YAML::StringCharSource>();
break;
case 4u:
result = YAML::RegEx::MatchOpAnd<YAML::StringCharSource>();
break;
case 5u:
result = YAML::RegEx::MatchOpNot<YAML::StringCharSource>();
break;
case 6u:
result = YAML::RegEx::MatchOpSeq<YAML::StringCharSource>(a1, a2);
break;
default:
return result;
}
}
return result;
}
| Match<YAML::StringCharSource>:
MOV R8D,dword ptr [RDI]
LEA EAX,[R8 + -0x3]
CMP EAX,-0x2
SETC AL
MOV RDX,qword ptr [RSI + 0x8]
MOV RCX,qword ptr [RSI + 0x10]
CMP RCX,RDX
SETC R9B
OR R9B,AL
MOV EAX,0xffffffff
CMP R9B,0x1
JNZ 0x0016a1f0
CMP R8D,0x6
JA 0x0016a1f0
MOV EAX,R8D
LEA R8,[0x264c5c]
MOVSXD RAX,dword ptr [R8 + RAX*0x4]
ADD RAX,R8
switchD:
JMP RAX
caseD_0:
XOR EAX,EAX
CMP RCX,RDX
SBB EAX,EAX
default:
RET
caseD_4:
JMP 0x0016a41e
caseD_2:
MOV RAX,qword ptr [RSI]
MOV AL,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI + 0x4],AL
SETG CL
CMP byte ptr [RDI + 0x5],AL
SETL AL
OR AL,CL
MOVZX EAX,AL
NEG EAX
OR EAX,0x1
RET
caseD_3:
JMP 0x0016a3d6
caseD_1:
MOV RAX,qword ptr [RSI]
MOV AL,byte ptr [RAX + RCX*0x1]
XOR ECX,ECX
CMP AL,byte ptr [RDI + 0x4]
SETZ CL
LEA EAX,[-0x1 + RCX*0x2]
RET
caseD_5:
JMP 0x0016a484
caseD_6:
JMP 0x0016a4aa
|
/* int YAML::RegEx::Match<YAML::StringCharSource>(YAML::StringCharSource const&) const */
int __thiscall YAML::RegEx::Match<YAML::StringCharSource>(RegEx *this,StringCharSource *param_1)
{
ulong uVar1;
int iVar2;
uVar1 = *(ulong *)(param_1 + 0x10);
iVar2 = -1;
if (uVar1 < *(ulong *)(param_1 + 8) || *(int *)this - 3U < 0xfffffffe) {
switch(*(int *)this) {
case 0:
iVar2 = -(uint)(uVar1 < *(ulong *)(param_1 + 8));
break;
case 1:
return (uint)(*(RegEx *)(*(long *)param_1 + uVar1) == this[4]) * 2 + -1;
case 2:
return -(uint)((char)this[5] < *(char *)(*(long *)param_1 + uVar1) ||
*(char *)(*(long *)param_1 + uVar1) < (char)this[4]) | 1;
case 3:
iVar2 = MatchOpOr<YAML::StringCharSource>((StringCharSource *)this);
return iVar2;
case 4:
iVar2 = MatchOpAnd<YAML::StringCharSource>((StringCharSource *)this);
return iVar2;
case 5:
iVar2 = MatchOpNot<YAML::StringCharSource>((StringCharSource *)this);
return iVar2;
case 6:
iVar2 = MatchOpSeq<YAML::StringCharSource>(this,param_1);
return iVar2;
}
}
return iVar2;
}
|
|
4,102 | aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(std::basic_string_view<char, std::char_traits<char>>, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>&&)>&&) | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/rpc/rpc_manager.cc | void RpcManager::RegisterClientFilter(std::string_view name, FrameworkAsyncRpcFilter&& filter) {
AIMRT_CHECK_ERROR_THROW(
state_.load() == State::kPreInit,
"Method can only be called when state is 'PreInit'.");
client_filter_manager_.RegisterFilter(name, std::move(filter));
} | O0 | cpp | aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(std::basic_string_view<char, std::char_traits<char>>, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>&&)>&&):
subq $0x178, %rsp # imm = 0x178
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq %rdi, 0xc8(%rsp)
movq %rcx, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
addq $0x48, %rdi
movl $0x5, %esi
callq 0x2948c0
cmpl $0x0, %eax
je 0x28f819
jmp 0x28f582
leaq 0x34ea61(%rip), %rax # 0x5ddfea
movq %rax, 0x90(%rsp)
movq $0x32, 0x98(%rsp)
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %rax
leaq 0xa0(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq %rdx, 0x120(%rsp)
movq %rcx, 0x110(%rsp)
movq %rax, 0x118(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x128(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x130(%rsp)
movq 0x130(%rsp), %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x100(%rsp)
movq %rax, 0x108(%rsp)
callq 0x1e2570
movq 0x48(%rsp), %rdi
movq %rax, 0xe0(%rsp)
movq %rdx, 0xe8(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x150(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x150(%rsp), %rcx
movq 0x148(%rsp), %rax
movq %rax, 0x170(%rsp)
movq 0x170(%rsp), %rax
movq %rcx, 0x168(%rsp)
movq $0x0, 0x160(%rsp)
movq %rax, 0x158(%rsp)
movq 0x168(%rsp), %rax
movq 0x160(%rsp), %rcx
movq %rcx, (%rax)
movq 0x158(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0xf0(%rsp), %rcx
movq 0xf8(%rsp), %r8
callq 0x1a94c0
movq 0x58(%rsp), %rdi
callq 0x293f50
movq %rax, 0x50(%rsp)
jmp 0x28f6e0
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x207540
movl %eax, 0x44(%rsp)
jmp 0x28f700
movl 0x44(%rsp), %ecx
movl $0x4, %eax
cmpl %ecx, %eax
jb 0x28f7b1
movq 0x4b2d00(%rip), %rax # 0x742418
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x70(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1ddc60
movq 0x10(%rsp), %rdi
movl %eax, 0x2c(%rsp)
callq 0x1ddca0
movq %rax, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x18b4c0
movq 0x18(%rsp), %rdi
movq %rax, 0x38(%rsp)
callq 0x1a5f60
movq 0x20(%rsp), %rdi
movl 0x2c(%rsp), %edx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r9
movq %rax, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x354da1(%rip), %r8 # 0x5e4531
movl $0x4, %esi
callq 0x207550
jmp 0x28f79c
jmp 0x28f7b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x28f80a
movl $0x28, %edi
callq 0x192f50
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xa0(%rsp), %rsi
callq 0x1ddce0
jmp 0x28f7d5
movq 0x8(%rsp), %rdi
leaq 0x4b0d2f(%rip), %rsi # 0x740510
leaq -0xb1ab8(%rip), %rdx # 0x1ddd30
callq 0x198050
jmp 0x28f86d
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x19ea50
leaq 0xa0(%rsp), %rdi
callq 0x1a7610
jmp 0x28f860
jmp 0x28f81b
movq 0x58(%rsp), %rdi
addq $0xb8, %rdi
movq 0xd0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xc0(%rsp), %rcx
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x295610
addq $0x178, %rsp # imm = 0x178
retq
movq 0x80(%rsp), %rdi
callq 0x198ce0
nopl (%rax)
| _ZN5aimrt7runtime4core3rpc10RpcManager20RegisterClientFilterESt17basic_string_viewIcSt11char_traitsIcEEOSt8functionIFvRKSt10shared_ptrINS2_13InvokeWrapperEEOS8_IFvSD_EEEE:
sub rsp, 178h
mov [rsp+178h+var_A8], rsi
mov [rsp+178h+var_A0], rdx
mov [rsp+178h+var_B0], rdi
mov qword ptr [rsp+178h+var_B8], rcx
mov rax, [rsp+178h+var_B0]
mov [rsp+178h+var_120], rax
mov rdi, [rsp+178h+var_120]
add rdi, 48h ; 'H'
mov esi, 5
call _ZNKSt6atomicIN5aimrt7runtime4core3rpc10RpcManager5StateEE4loadESt12memory_order; std::atomic<aimrt::runtime::core::rpc::RpcManager::State>::load(std::memory_order)
cmp eax, 0
jz loc_28F819
jmp short $+2
loc_28F582:
lea rax, aMethodCanOnlyB_0; "Method can only be called when state is"...
mov [rsp+178h+var_E8], rax
mov [rsp+178h+var_E0], 32h ; '2'
mov rcx, [rsp+178h+var_E8]
mov rax, [rsp+178h+var_E0]
lea rdx, [rsp+178h+var_D8]
mov [rsp+178h+var_130], rdx
mov [rsp+178h+var_58], rdx
mov [rsp+178h+var_68], rcx
mov [rsp+178h+var_60], rax
lea rax, [rsp+178h+var_68]
mov [rsp+178h+var_50], rax
mov rax, [rsp+178h+var_50]
movups xmm0, xmmword ptr [rax]
movaps [rsp+178h+var_48], xmm0
mov rcx, qword ptr [rsp+178h+var_48]
mov rax, qword ptr [rsp+178h+var_48+8]
mov [rsp+178h+var_78], rcx
mov [rsp+178h+var_70], rax
call _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRS9_
mov rdi, [rsp+178h+var_130]
mov [rsp+178h+var_98], rax
mov [rsp+178h+var_90], rdx
lea rax, [rsp+178h+var_88]
mov [rsp+178h+var_28], rax
lea rax, [rsp+178h+var_98]
mov [rsp+178h+var_30], rax
mov rcx, [rsp+178h+var_28]
mov rax, [rsp+178h+var_30]
mov [rsp+178h+var_8], rax
mov rax, [rsp+178h+var_8]
mov [rsp+178h+var_10], rcx
mov [rsp+178h+var_18], 0
mov [rsp+178h+var_20], rax
mov rax, [rsp+178h+var_10]
mov rcx, [rsp+178h+var_18]
mov [rax], rcx
mov rcx, [rsp+178h+var_20]
mov [rax+8], rcx
mov rsi, [rsp+178h+var_78]
mov rdx, [rsp+178h+var_70]
mov rcx, [rsp+178h+var_88]
mov r8, [rsp+178h+var_80]
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov rdi, [rsp+178h+var_120]; this
call _ZNK5aimrt7runtime4core3rpc10RpcManager9GetLoggerEv; aimrt::runtime::core::rpc::RpcManager::GetLogger(void)
mov [rsp+178h+var_128], rax
jmp short $+2
loc_28F6E0:
mov rax, [rsp+178h+var_128]
mov [rsp+178h+var_F0], rax
mov rdi, [rsp+178h+var_F0]; this
call _ZNK5aimrt6common4util13LoggerWrapper11GetLogLevelEv; aimrt::common::util::LoggerWrapper::GetLogLevel(void)
mov [rsp+178h+var_134], eax
jmp short $+2
loc_28F700:
mov ecx, [rsp+178h+var_134]
mov eax, 4
cmp eax, ecx
jb loc_28F7B1
mov rax, cs:off_742418
mov [rsp+178h+var_108], rax
mov rax, [rsp+178h+var_F0]
mov [rsp+178h+var_158], rax
lea rdi, [rsp+178h+var_108]; this
mov [rsp+178h+var_168], rdi
call _ZNKSt15source_location4lineEv; std::source_location::line(void)
mov rdi, [rsp+178h+var_168]; this
mov [rsp+178h+var_14C], eax
call _ZNKSt15source_location9file_nameEv; std::source_location::file_name(void)
mov [rsp+178h+var_148], rax
lea rdi, [rsp+178h+var_D8]
mov [rsp+178h+var_160], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+178h+var_160]
mov [rsp+178h+var_140], rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+178h+var_158]; this
mov edx, [rsp+178h+var_14C]; unsigned int
mov rcx, [rsp+178h+var_148]; char *
mov r9, [rsp+178h+var_140]; char *
mov rsi, rax
mov rax, rsp
mov [rax], rsi
lea r8, aRegisterclient; "RegisterClientFilter"
mov esi, 4; unsigned int
call _ZNK5aimrt6common4util13LoggerWrapper3LogEjjPKcS4_S4_m; aimrt::common::util::LoggerWrapper::Log(uint,uint,char const*,char const*,char const*,ulong)
jmp short $+2
loc_28F79C:
jmp short loc_28F7B1
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_28F80A
loc_28F7B1:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov rdi, rax
mov rax, rdi
mov [rsp+178h+var_170], rax
lea rsi, [rsp+178h+var_D8]
call _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_
jmp short $+2
loc_28F7D5:
mov rdi, [rsp+178h+var_170]; void *
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_28F86D
mov rdi, [rsp+arg_0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
call ___cxa_free_exception
loc_28F80A:
lea rdi, [rsp+arg_98]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_28F860
loc_28F819:
jmp short $+2
loc_28F81B:
mov rdi, [rsp+178h+var_120]
add rdi, 0B8h; int
mov rax, [rsp+178h+var_A8]
mov qword ptr [rsp+178h+var_118], rax
mov rax, [rsp+178h+var_A0]
mov qword ptr [rsp+178h+var_110], rax
mov rcx, qword ptr [rsp+178h+var_B8]; int
mov rsi, qword ptr [rsp+178h+var_118]; int
mov rdx, qword ptr [rsp+178h+var_110]; int
call _ZN5aimrt7runtime4core3rpc30FrameworkAsyncRpcFilterManager14RegisterFilterESt17basic_string_viewIcSt11char_traitsIcEEOSt8functionIFvRKSt10shared_ptrINS2_13InvokeWrapperEEOS8_IFvSD_EEEE; aimrt::runtime::core::rpc::FrameworkAsyncRpcFilterManager::RegisterFilter(std::string_view,std::function<void ()(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&,std::function&&<void ()(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>)> &&)
add rsp, 178h
retn
loc_28F860:
mov rdi, [rsp+arg_78]
call __Unwind_Resume
loc_28F86D:
nop dword ptr [rax]
| long long aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(
aimrt::runtime::core::rpc::RpcManager *a1,
long long a2,
long long a3,
long long a4)
{
int v4; // r8d
int v5; // r9d
long long v6; // rdx
unsigned long long v7; // rax
void *v9; // [rsp+0h] [rbp-178h]
int v10; // [rsp+8h] [rbp-170h]
std::exception *exception; // [rsp+8h] [rbp-170h]
int v12; // [rsp+10h] [rbp-168h]
__int16 v13; // [rsp+18h] [rbp-160h]
aimrt::common::util::LoggerWrapper *v14; // [rsp+20h] [rbp-158h]
aimrt::common::util::LoggerWrapper *v15; // [rsp+20h] [rbp-158h]
int v16; // [rsp+28h] [rbp-150h]
unsigned int v17; // [rsp+2Ch] [rbp-14Ch]
int v18; // [rsp+30h] [rbp-148h]
const char *v19; // [rsp+30h] [rbp-148h]
char v20; // [rsp+38h] [rbp-140h]
char *v21; // [rsp+38h] [rbp-140h]
_QWORD v22[3]; // [rsp+70h] [rbp-108h] BYREF
aimrt::common::util::LoggerWrapper *Logger; // [rsp+88h] [rbp-F0h]
const char *v24; // [rsp+90h] [rbp-E8h]
long long v25; // [rsp+98h] [rbp-E0h]
_BYTE v26[32]; // [rsp+A0h] [rbp-D8h] BYREF
int v27[2]; // [rsp+C0h] [rbp-B8h]
aimrt::runtime::core::rpc::RpcManager *v28; // [rsp+C8h] [rbp-B0h]
long long v29; // [rsp+D0h] [rbp-A8h]
long long v30; // [rsp+D8h] [rbp-A0h]
_QWORD v31[2]; // [rsp+E0h] [rbp-98h] BYREF
_QWORD v32[2]; // [rsp+F0h] [rbp-88h] BYREF
__int128 v33; // [rsp+100h] [rbp-78h]
__int128 v34; // [rsp+110h] [rbp-68h] BYREF
_BYTE *v35; // [rsp+120h] [rbp-58h]
__int128 *v36; // [rsp+128h] [rbp-50h]
__int128 v37; // [rsp+130h] [rbp-48h]
_QWORD *v38; // [rsp+148h] [rbp-30h]
_QWORD *v39; // [rsp+150h] [rbp-28h]
_QWORD *v40; // [rsp+158h] [rbp-20h]
long long v41; // [rsp+160h] [rbp-18h]
_QWORD *v42; // [rsp+168h] [rbp-10h]
_QWORD *v43; // [rsp+170h] [rbp-8h]
v29 = a2;
v30 = a3;
v28 = a1;
*(_QWORD *)v27 = a4;
if ( (unsigned int)std::atomic<aimrt::runtime::core::rpc::RpcManager::State>::load((char *)a1 + 72, 5LL) )
{
v24 = "Method can only be called when state is 'PreInit'.";
v25 = 50LL;
v35 = v26;
*(_QWORD *)&v34 = "Method can only be called when state is 'PreInit'.";
*((_QWORD *)&v34 + 1) = 50LL;
v36 = &v34;
v37 = v34;
v33 = v34;
v31[0] = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>();
v31[1] = v6;
v39 = v32;
v38 = v31;
v43 = v31;
v42 = v32;
v41 = 0LL;
v40 = v31;
v32[0] = 0LL;
v32[1] = v31;
fmt::v10::vformat[abi:cxx11]((long long)v26, v33, *((long long *)&v33 + 1), 0LL, (long long)v31);
Logger = (aimrt::common::util::LoggerWrapper *)aimrt::runtime::core::rpc::RpcManager::GetLogger(a1);
if ( (unsigned int)aimrt::common::util::LoggerWrapper::GetLogLevel(Logger) <= 4 )
{
v22[0] = off_742400;
v15 = Logger;
v17 = std::source_location::line((std::source_location *)v22);
v19 = std::source_location::file_name((std::source_location *)v22);
v21 = (char *)std::string::c_str(v26);
v7 = std::string::size(v26);
aimrt::common::util::LoggerWrapper::Log(v15, 4, v17, v19, "RegisterClientFilter", v21, v7);
}
exception = (std::exception *)__cxa_allocate_exception(0x28uLL);
ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_(
exception,
(long long)v26);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
return aimrt::runtime::core::rpc::FrameworkAsyncRpcFilterManager::RegisterFilter(
(int)a1 + 184,
v29,
v30,
v27[0],
v4,
v5,
v9,
v10,
v12,
v13,
(long long)v14,
v16,
v18,
v20);
}
| |||
4,103 | aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(std::basic_string_view<char, std::char_traits<char>>, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>&&)>&&) | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/rpc/rpc_manager.cc | void RpcManager::RegisterClientFilter(std::string_view name, FrameworkAsyncRpcFilter&& filter) {
AIMRT_CHECK_ERROR_THROW(
state_.load() == State::kPreInit,
"Method can only be called when state is 'PreInit'.");
client_filter_manager_.RegisterFilter(name, std::move(filter));
} | O3 | cpp | aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(std::basic_string_view<char, std::char_traits<char>>, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&, std::function<void (std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>&&)>&&):
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl 0x48(%rdi), %eax
testl %eax, %eax
jne 0xda58d
addq $0xb8, %rbx
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
jmp 0xdc8b8
leaq 0x11643d(%rip), %rsi # 0x1f09d1
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %r8
movl $0x32, %edx
xorl %ecx, %ecx
callq 0x9b9c8
movq 0x50(%rbx), %rbx
cmpq $0x0, 0x10(%rbx)
jne 0xda5ba
callq 0x80b20
movq %rbx, %rdi
callq *0x18(%rbx)
cmpl $0x4, %eax
ja 0xda5f7
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
addq $0x20, %rbx
movq %rax, (%rsp)
leaq 0x11a941(%rip), %rcx # 0x1f4f1f
leaq 0x11aadb(%rip), %r8 # 0x1f50c0
movq %rbx, %rdi
movl $0x4, %esi
movl $0x155, %edx # imm = 0x155
callq 0x83aa0
movl $0x28, %edi
callq 0x80f20
leaq 0x1bc920(%rip), %rcx # 0x296f28
movq %rcx, (%rax)
leaq 0x18(%rax), %rdx
movq %rdx, 0x8(%rax)
leaq 0x20(%rsp), %rcx
movq -0x10(%rcx), %rsi
cmpq %rcx, %rsi
jne 0xda629
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0xda636
movq %rsi, 0x8(%rax)
movq 0x20(%rsp), %rdx
movq %rdx, 0x18(%rax)
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax)
movq %rcx, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x1bc7e7(%rip), %rsi # 0x296e40
leaq -0x3fafe(%rip), %rdx # 0x9ab62
movq %rax, %rdi
callq 0x83970
jmp 0xda66a
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda688
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82190
movq %rbx, %rdi
callq 0x83b70
| _ZN5aimrt7runtime4core3rpc10RpcManager20RegisterClientFilterESt17basic_string_viewIcSt11char_traitsIcEEOSt8functionIFvRKSt10shared_ptrINS2_13InvokeWrapperEEOS8_IFvSD_EEEE:
push rbx
sub rsp, 40h
mov rbx, rdi
mov eax, [rdi+48h]
test eax, eax
jnz short loc_DA58D
add rbx, 0B8h
mov rdi, rbx
add rsp, 40h
pop rbx
jmp _ZN5aimrt7runtime4core3rpc30FrameworkAsyncRpcFilterManager14RegisterFilterESt17basic_string_viewIcSt11char_traitsIcEEOSt8functionIFvRKSt10shared_ptrINS2_13InvokeWrapperEEOS8_IFvSD_EEEE; aimrt::runtime::core::rpc::FrameworkAsyncRpcFilterManager::RegisterFilter(std::string_view,std::function<void ()(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&,std::function&&<void ()(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>)> &&)
loc_DA58D:
lea rsi, aMethodCanOnlyB_0; "Method can only be called when state is"...
lea rdi, [rsp+48h+var_38]; int
lea r8, [rsp+48h+var_18]; int
mov edx, 32h ; '2'; int
xor ecx, ecx; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov rbx, [rbx+50h]
cmp qword ptr [rbx+10h], 0
jnz short loc_DA5BA
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_DA5BA:
mov rdi, rbx
call qword ptr [rbx+18h]
cmp eax, 4
ja short loc_DA5F7
mov r9, qword ptr [rsp+48h+var_38]
mov rax, [rsp+48h+var_30]
add rbx, 20h ; ' '
mov [rsp+48h+var_48], rax
lea rcx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"...
lea r8, aRegisterclient; "RegisterClientFilter"
mov rdi, rbx
mov esi, 4
mov edx, 155h
call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong)
loc_DA5F7:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
lea rcx, off_296F28
mov [rax], rcx
lea rdx, [rax+18h]
mov [rax+8], rdx
lea rcx, [rsp+48h+var_28]
mov rsi, [rcx-10h]
cmp rsi, rcx
jnz short loc_DA629
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
jmp short loc_DA636
loc_DA629:
mov [rax+8], rsi
mov rdx, [rsp+48h+var_28]
mov [rax+18h], rdx
loc_DA636:
mov rdx, [rsp+48h+var_30]
mov [rax+10h], rdx
mov qword ptr [rsp+48h+var_38], rcx
mov [rsp+48h+var_30], 0
mov byte ptr [rsp+48h+var_28], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, rax; void *
call ___cxa_throw
jmp short $+2
loc_DA66A:
mov rbx, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DA688
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA688:
mov rdi, rbx
call __Unwind_Resume
| long long aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(long long a1)
{
long long v2; // rbx
char *exception; // rax
int v4[2]; // [rsp+10h] [rbp-38h] BYREF
long long v5; // [rsp+18h] [rbp-30h]
__int128 v6; // [rsp+20h] [rbp-28h] BYREF
int v7[6]; // [rsp+30h] [rbp-18h] BYREF
if ( *(_DWORD *)(a1 + 72) )
{
fmt::v10::vformat[abi:cxx11](v4, "Method can only be called when state is 'PreInit'.", 50LL, 0LL, (long long)v7);
v2 = *(_QWORD *)(a1 + 80);
if ( !*(_QWORD *)(v2 + 16) )
std::__throw_bad_function_call();
if ( (*(unsigned int ( **)(long long))(v2 + 24))(v2) <= 4 )
std::function<void ()(unsigned int,unsigned int,char const*,char const*,char const*,unsigned long)>::operator()(
v2 + 32,
4,
341,
(unsigned int)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/rpc/rpc_manager.cc",
(unsigned int)"RegisterClientFilter",
v4[0],
v5);
exception = (char *)__cxa_allocate_exception(0x28uLL);
*(_QWORD *)exception = off_296F28;
*((_QWORD *)exception + 1) = exception + 24;
if ( *(__int128 **)v4 == &v6 )
{
*(_OWORD *)(exception + 24) = v6;
}
else
{
*((_QWORD *)exception + 1) = *(_QWORD *)v4;
*((_QWORD *)exception + 3) = v6;
}
*((_QWORD *)exception + 2) = v5;
*(_QWORD *)v4 = &v6;
v5 = 0LL;
LOBYTE(v6) = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
return aimrt::runtime::core::rpc::FrameworkAsyncRpcFilterManager::RegisterFilter(a1 + 184);
}
| RegisterClientFilter:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x48]
TEST EAX,EAX
JNZ 0x001da58d
ADD RBX,0xb8
MOV RDI,RBX
ADD RSP,0x40
POP RBX
JMP 0x001dc8b8
LAB_001da58d:
LEA RSI,[0x2f09d1]
LEA RDI,[RSP + 0x10]
LEA R8,[RSP + 0x30]
MOV EDX,0x32
XOR ECX,ECX
CALL 0x0019b9c8
MOV RBX,qword ptr [RBX + 0x50]
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001da5ba
LAB_001da5b5:
CALL 0x00180b20
LAB_001da5ba:
MOV RDI,RBX
CALL qword ptr [RBX + 0x18]
CMP EAX,0x4
JA 0x001da5f7
MOV R9,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
ADD RBX,0x20
LAB_001da5d3:
MOV qword ptr [RSP],RAX
LEA RCX,[0x2f4f1f]
LEA R8,[0x2f50c0]
MOV RDI,RBX
MOV ESI,0x4
MOV EDX,0x155
CALL 0x00183aa0
LAB_001da5f7:
MOV EDI,0x28
CALL 0x00180f20
LEA RCX,[0x396f28]
MOV qword ptr [RAX],RCX
LEA RDX,[RAX + 0x18]
MOV qword ptr [RAX + 0x8],RDX
LEA RCX,[RSP + 0x20]
MOV RSI,qword ptr [RCX + -0x10]
CMP RSI,RCX
JNZ 0x001da629
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
JMP 0x001da636
LAB_001da629:
MOV qword ptr [RAX + 0x8],RSI
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RDX
LAB_001da636:
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x20],0x0
LAB_001da652:
LEA RSI,[0x396e40]
LEA RDX,[0x19ab62]
MOV RDI,RAX
CALL 0x00183970
|
/* aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(std::basic_string_view<char,
std::char_traits<char> >, std::function<void
(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&, std::function<void
(std::shared_ptr<aimrt::runtime::core::rpc::InvokeWrapper> const&)>&&)>&&) */
void aimrt::runtime::core::rpc::RpcManager::RegisterClientFilter(long param_1)
{
long lVar1;
uint uVar2;
int8 *puVar3;
uint *local_38;
int8 local_30;
uint local_28;
int4 uStack_24;
int4 uStack_20;
int4 uStack_1c;
int1 local_18 [16];
if (*(int *)(param_1 + 0x48) == 0) {
FrameworkAsyncRpcFilterManager::RegisterFilter(param_1 + 0xb8);
return;
}
fmt::v10::vformat_abi_cxx11_
(&local_38,"Method can only be called when state is \'PreInit\'.",0x32,0,local_18);
lVar1 = *(long *)(param_1 + 0x50);
if (*(long *)(lVar1 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 001da5b5 to 001da5bf has its CatchHandler @ 001da66a */
std::__throw_bad_function_call();
}
uVar2 = (**(code **)(lVar1 + 0x18))(lVar1);
if (uVar2 < 5) {
/* try { // try from 001da5d3 to 001da5f6 has its CatchHandler @ 001da668 */
std::function<void(unsigned_int,unsigned_int,char_const*,char_const*,char_const*,unsigned_long)>
::operator()((int)lVar1 + 0x20,4,(char *)0x155,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/rpc/rpc_manager.cc"
,"RegisterClientFilter",(ulong)local_38);
}
puVar3 = (int8 *)__cxa_allocate_exception(0x28);
*puVar3 = &PTR__AimRTException_00396f28;
puVar3[1] = puVar3 + 3;
if (local_38 == &local_28) {
*(uint *)(puVar3 + 3) = local_28;
*(int4 *)((long)puVar3 + 0x1c) = uStack_24;
*(int4 *)(puVar3 + 4) = uStack_20;
*(int4 *)((long)puVar3 + 0x24) = uStack_1c;
}
else {
puVar3[1] = local_38;
puVar3[3] = CONCAT44(uStack_24,local_28);
}
puVar3[2] = local_30;
local_30 = 0;
local_28 = local_28 & 0xffffff00;
local_38 = &local_28;
/* try { // try from 001da652 to 001da667 has its CatchHandler @ 001da66a */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar3,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
|
|
4,104 | mysql_stmt_next_result | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
int rc= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!mysql_stmt_more_results(stmt))
return(-1);
if (stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE)
madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA);
stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE;
if (mysql_next_result(stmt->mysql))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate,
stmt->mysql->net.last_error);
return(1);
}
if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
stmt->mysql->status= MYSQL_STATUS_STMT_RESULT;
if (stmt->mysql->field_count)
rc= madb_alloc_stmt_fields(stmt);
else
{
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
stmt->upsert_status.last_insert_id= stmt->mysql->insert_id;
stmt->upsert_status.server_status= stmt->mysql->server_status;
stmt->upsert_status.warning_count= stmt->mysql->warning_count;
}
stmt->field_count= stmt->mysql->field_count;
stmt->result.rows= 0;
return(rc);
} | O0 | c | mysql_stmt_next_result:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x5e4ef
jmp 0x5e480
movq -0x10(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1eb530(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1eb516(%rip), %rax # 0x2499e0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5e7ea
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jae 0x5e5e7
jmp 0x5e4ff
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1eb4a9(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x1eb487(%rip), %rax # 0x2499e0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x38140
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
jmp 0x5e578
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1eb438(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1eb41e(%rip), %rax # 0x2499e0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5e7ea
movq -0x10(%rbp), %rdi
callq 0x5de20
cmpb $0x0, %al
jne 0x5e600
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e7ea
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jbe 0x5e622
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jae 0x5e622
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x5b8e0
movq -0x10(%rbp), %rax
movl $0x3, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x4eeb0
cmpl $0x0, %eax
je 0x5e71a
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x5e6cb
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x28(%rbp)
jmp 0x5e6f1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1eb2f7(%rip), %rax # 0x2499e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5e7ea
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, 0x488(%rax)
jne 0x5e73d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x8, 0x488(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x37c(%rax)
je 0x5e75c
movq -0x10(%rbp), %rdi
callq 0x5e800
movl %eax, -0x14(%rbp)
jmp 0x5e7c0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x338(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf8(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x340(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x100(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf4(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x388(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x37c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_stmt_next_result:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jnz short loc_5E4EF
jmp short $+2
loc_5E480:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_5E7EA
loc_5E4EF:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jnb loc_5E5E7
jmp short $+2
loc_5E4FF:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7DEh
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_5E578:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_5E7EA
loc_5E5E7:
mov rdi, [rbp+var_10]
call mysql_stmt_more_results
cmp al, 0
jnz short loc_5E600
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_5E7EA
loc_5E600:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jbe short loc_5E622
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnb short loc_5E622
mov rdi, [rbp+var_10]
mov esi, 0Bh
call madb_reset_stmt
loc_5E622:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 3
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call mysql_next_result
cmp eax, 0
jz loc_5E71A
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+108h], ecx
mov rdi, [rbp+var_10]
add rdi, 30Dh
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_10]
add rax, 10Ch
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_5E6CB
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_28], rax
jmp short loc_5E6F1
loc_5E6CB:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
loc_5E6F1:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_5E7EA
loc_5E71A:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+488h], 1
jnz short loc_5E73D
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 8
loc_5E73D:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+37Ch], 0
jz short loc_5E75C
mov rdi, [rbp+var_10]
call madb_alloc_stmt_fields
mov [rbp+var_14], eax
jmp short loc_5E7C0
loc_5E75C:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+338h]
mov rax, [rbp+var_10]
mov [rax+0F8h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+340h]
mov rax, [rbp+var_10]
mov [rax+100h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+380h]
mov rax, [rbp+var_10]
mov [rax+0F4h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+388h]
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
loc_5E7C0:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+37Ch]
mov rax, [rbp+var_10]
mov [rax+60h], ecx
mov rax, [rbp+var_10]
mov qword ptr [rax+0C8h], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_5E7EA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_stmt_next_result(long long a1)
{
char *v1; // rax
unsigned int v3; // [rsp+1Ch] [rbp-14h]
v3 = 0;
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(a1 + 80) >= 2u )
{
if ( mysql_stmt_more_results(a1) )
{
if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u )
madb_reset_stmt(a1, 11);
*(_DWORD *)(a1 + 80) = 3;
if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) )
{
*(_DWORD *)(a1 + 80) = 6;
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v1, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 )
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8;
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) )
{
v3 = madb_alloc_stmt_fields(a1);
}
else
{
*(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL);
}
*(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL);
*(_QWORD *)(a1 + 200) = 0LL;
return v3;
}
}
else
{
return (unsigned int)-1;
}
}
else
{
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
| mysql_stmt_next_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0015e4ef
JMP 0x0015e480
LAB_0015e480:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015e7ea
LAB_0015e4ef:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JNC 0x0015e5e7
JMP 0x0015e4ff
LAB_0015e4ff:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7de
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x0015e578
LAB_0015e578:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015e7ea
LAB_0015e5e7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015de20
CMP AL,0x0
JNZ 0x0015e600
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015e7ea
LAB_0015e600:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JBE 0x0015e622
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNC 0x0015e622
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xb
CALL 0x0015b8e0
LAB_0015e622:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x3
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0014eeb0
CMP EAX,0x0
JZ 0x0015e71a
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x0015e6cb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015e6f1
LAB_0015e6cb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x3499e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_0015e6f1:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015e7ea
LAB_0015e71a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x488],0x1
JNZ 0x0015e73d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x8
LAB_0015e73d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x37c],0x0
JZ 0x0015e75c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015e800
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0015e7c0
LAB_0015e75c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x338]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xf8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x340]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x388]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
LAB_0015e7c0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x37c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0015e7ea:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_next_result(long param_1)
{
char cVar1;
int iVar2;
char *local_30;
int4 local_1c;
int4 local_c;
local_1c = 0;
if (*(long *)(param_1 + 0x38) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00349a48,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else if (*(uint *)(param_1 + 0x50) < 2) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_00349a50,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00349a50,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else {
cVar1 = mysql_stmt_more_results(param_1);
if (cVar1 == '\0') {
local_c = 0xffffffff;
}
else {
if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) {
madb_reset_stmt(param_1,0xb);
}
*(int4 *)(param_1 + 0x50) = 3;
iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38));
if (iVar2 == 0) {
if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8;
}
if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) {
*(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388);
}
else {
local_1c = madb_alloc_stmt_fields(param_1);
}
*(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c);
*(int8 *)(param_1 + 200) = 0;
local_c = local_1c;
}
else {
*(int4 *)(param_1 + 0x50) = 6;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_30,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
}
}
return local_c;
}
|
|
4,105 | 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>::type_name() const | monkey531[P]llama/common/json.hpp | JSON_HEDLEY_RETURNS_NON_NULL
const char* type_name() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
return "null";
case value_t::object:
return "object";
case value_t::array:
return "array";
case value_t::string:
return "string";
case value_t::boolean:
return "boolean";
case value_t::binary:
return "binary";
case value_t::discarded:
return "discarded";
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
default:
return "number";
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const:
movzbl (%rdi), %eax
cmpq $0x9, %rax
ja 0x6004e
leaq 0x90cce(%rip), %rcx # 0xf0d14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x8fdbf(%rip), %rax # 0xefe14
retq
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv:
movzx eax, byte ptr [rdi]
cmp rax, 9
ja short loc_6004E
lea rcx, unk_F0D14
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_6004E:
lea rax, aNumber; "number"
retn
| const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(
unsigned __int8 *a1)
{
unsigned long long v1; // rax
v1 = *a1;
if ( v1 > 9 )
return "number";
else
return (char *)dword_F0D14 + dword_F0D14[v1];
}
| type_name:
MOVZX EAX,byte ptr [RDI]
CMP RAX,0x9
JA 0x0016004e
LEA RCX,[0x1f0d14]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_0016004e:
LEA RAX,[0x1efe14]
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>::type_name() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(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)
{
if ((ulong)(byte)*this < 10) {
return &DAT_001f0d14 + *(int *)(&DAT_001f0d14 + (ulong)(byte)*this * 4);
}
return "number";
}
|
|
4,106 | my_timer_init_resolution | eloqsql/mysys/my_rdtsc.c | static ulonglong my_timer_init_resolution(ulonglong (*this_timer)(void),
ulonglong overhead_times_2)
{
ulonglong time1, time2;
ulonglong best_jump;
int i, jumps, divisible_by_1000, divisible_by_1000000;
divisible_by_1000= divisible_by_1000000= 0;
best_jump= 1000000;
for (i= jumps= 0; jumps < 3 && i < MY_TIMER_ITERATIONS * 10; ++i)
{
time1= this_timer();
time2= this_timer();
time2-= time1;
if (time2)
{
++jumps;
if (!(time2 % 1000))
{
++divisible_by_1000;
if (!(time2 % 1000000))
++divisible_by_1000000;
}
if (best_jump > time2)
best_jump= time2;
/* For milliseconds, one jump is enough. */
if (overhead_times_2 == 0)
break;
}
}
if (jumps == 3)
{
if (jumps == divisible_by_1000000)
return 1000000;
if (jumps == divisible_by_1000)
return 1000;
}
if (best_jump > overhead_times_2)
return best_jump;
return 1;
} | O0 | c | my_timer_init_resolution:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movq $0xf4240, -0x30(%rbp) # imm = 0xF4240
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
xorl %eax, %eax
cmpl $0x3, -0x38(%rbp)
movb %al, -0x41(%rbp)
jge 0x629cc
cmpl $0x989680, -0x34(%rbp) # imm = 0x989680
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x629d8
jmp 0x62a6e
callq *-0x10(%rbp)
movq %rax, -0x20(%rbp)
callq *-0x10(%rbp)
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x62a5e
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x62a41
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movl $0xf4240, %ecx # imm = 0xF4240
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x62a3f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x62a41
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x62a53
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x62a5c
jmp 0x62a6e
jmp 0x62a5e
jmp 0x62a60
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x629b4
cmpl $0x3, -0x38(%rbp)
jne 0x62a9a
movl -0x38(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x62a86
movq $0xf4240, -0x8(%rbp) # imm = 0xF4240
jmp 0x62ab6
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0x62a98
movq $0x3e8, -0x8(%rbp) # imm = 0x3E8
jmp 0x62ab6
jmp 0x62a9a
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x62aae
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x62ab6
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
| my_timer_init_resolution:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_40], 0
mov [rbp+var_3C], 0
mov [rbp+var_30], offset unk_F4240
mov [rbp+var_38], 0
mov [rbp+var_34], 0
loc_629B4:
xor eax, eax
cmp [rbp+var_38], 3
mov [rbp+var_41], al
jge short loc_629CC
cmp [rbp+var_34], 989680h
setl al
mov [rbp+var_41], al
loc_629CC:
mov al, [rbp+var_41]
test al, 1
jnz short loc_629D8
jmp loc_62A6E
loc_629D8:
call [rbp+var_10]
mov [rbp+var_20], rax
call [rbp+var_10]
mov [rbp+var_28], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
sub rax, rcx
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_62A5E
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
mov rax, [rbp+var_28]
mov ecx, 3E8h
xor edx, edx
div rcx
cmp rdx, 0
jnz short loc_62A41
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
mov rax, [rbp+var_28]
mov ecx, offset unk_F4240
xor edx, edx
div rcx
cmp rdx, 0
jnz short loc_62A3F
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
loc_62A3F:
jmp short $+2
loc_62A41:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_28]
jbe short loc_62A53
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_62A53:
cmp [rbp+var_18], 0
jnz short loc_62A5C
jmp short loc_62A6E
loc_62A5C:
jmp short $+2
loc_62A5E:
jmp short $+2
loc_62A60:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_629B4
loc_62A6E:
cmp [rbp+var_38], 3
jnz short loc_62A9A
mov eax, [rbp+var_38]
cmp eax, [rbp+var_40]
jnz short loc_62A86
mov [rbp+var_8], offset unk_F4240
jmp short loc_62AB6
loc_62A86:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_3C]
jnz short loc_62A98
mov [rbp+var_8], 3E8h
jmp short loc_62AB6
loc_62A98:
jmp short $+2
loc_62A9A:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
jbe short loc_62AAE
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_62AB6
loc_62AAE:
mov [rbp+var_8], 1
loc_62AB6:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| void * my_timer_init_resolution(long long (*a1)(void), unsigned long long a2)
{
bool v3; // [rsp+Fh] [rbp-41h]
int v4; // [rsp+10h] [rbp-40h]
int v5; // [rsp+14h] [rbp-3Ch]
int v6; // [rsp+18h] [rbp-38h]
int i; // [rsp+1Ch] [rbp-34h]
void *v8; // [rsp+20h] [rbp-30h]
unsigned long long v9; // [rsp+28h] [rbp-28h]
long long v10; // [rsp+30h] [rbp-20h]
v4 = 0;
v5 = 0;
v8 = &unk_F4240;
v6 = 0;
for ( i = 0; ; ++i )
{
v3 = 0;
if ( v6 < 3 )
v3 = i < 10000000;
if ( !v3 )
break;
v10 = a1();
v9 = a1() - v10;
if ( v9 )
{
++v6;
if ( !(v9 % 0x3E8) )
{
++v5;
if ( !(v9 % (unsigned long long)&unk_F4240) )
++v4;
}
if ( (unsigned long long)v8 > v9 )
v8 = (void *)v9;
if ( !a2 )
break;
}
}
if ( v6 == 3 )
{
if ( v4 == 3 )
return &unk_F4240;
if ( v5 == 3 )
return &stru_3E8;
}
if ( (unsigned long long)v8 <= a2 )
return &dword_0 + 1;
else
return v8;
}
| my_timer_init_resolution:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x3c],0x0
MOV qword ptr [RBP + -0x30],0xf4240
MOV dword ptr [RBP + -0x38],0x0
MOV dword ptr [RBP + -0x34],0x0
LAB_001629b4:
XOR EAX,EAX
CMP dword ptr [RBP + -0x38],0x3
MOV byte ptr [RBP + -0x41],AL
JGE 0x001629cc
CMP dword ptr [RBP + -0x34],0x989680
SETL AL
MOV byte ptr [RBP + -0x41],AL
LAB_001629cc:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001629d8
JMP 0x00162a6e
LAB_001629d8:
CALL qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
CALL qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00162a5e
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
CMP RDX,0x0
JNZ 0x00162a41
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,0xf4240
XOR EDX,EDX
DIV RCX
CMP RDX,0x0
JNZ 0x00162a3f
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
LAB_00162a3f:
JMP 0x00162a41
LAB_00162a41:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00162a53
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_00162a53:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00162a5c
JMP 0x00162a6e
LAB_00162a5c:
JMP 0x00162a5e
LAB_00162a5e:
JMP 0x00162a60
LAB_00162a60:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001629b4
LAB_00162a6e:
CMP dword ptr [RBP + -0x38],0x3
JNZ 0x00162a9a
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x00162a86
MOV qword ptr [RBP + -0x8],0xf4240
JMP 0x00162ab6
LAB_00162a86:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x3c]
JNZ 0x00162a98
MOV qword ptr [RBP + -0x8],0x3e8
JMP 0x00162ab6
LAB_00162a98:
JMP 0x00162a9a
LAB_00162a9a:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00162aae
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00162ab6
LAB_00162aae:
MOV qword ptr [RBP + -0x8],0x1
LAB_00162ab6:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
ulong my_timer_init_resolution(code *param_1,ulong param_2)
{
long lVar1;
long lVar2;
ulong uVar3;
int local_48;
int local_44;
int local_40;
int local_3c;
ulong local_38;
ulong local_10;
local_48 = 0;
local_44 = 0;
local_38 = 1000000;
local_40 = 0;
for (local_3c = 0; local_40 < 3 && local_3c < 10000000; local_3c = local_3c + 1) {
lVar1 = (*param_1)();
lVar2 = (*param_1)();
uVar3 = lVar2 - lVar1;
if (uVar3 != 0) {
local_40 = local_40 + 1;
if ((uVar3 % 1000 == 0) && (local_44 = local_44 + 1, uVar3 % 1000000 == 0)) {
local_48 = local_48 + 1;
}
if (uVar3 < local_38) {
local_38 = uVar3;
}
if (param_2 == 0) break;
}
}
if (local_40 == 3) {
if (local_48 == 3) {
return 1000000;
}
if (local_44 == 3) {
return 1000;
}
}
if (param_2 < local_38) {
local_10 = local_38;
}
else {
local_10 = 1;
}
return local_10;
}
|
|
4,107 | my_init_mysys_psi_keys | eloqsql/mysys/my_init.c | void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
} | O0 | c | my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x6322c(%rip), %rax # 0x15e70b
movq %rax, -0x8(%rbp)
movl $0x13, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf788(%rip), %rsi # 0x2cac80
callq 0xfb590
movl $0x7, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf93e(%rip), %rsi # 0x2cae50
callq 0xfb5d0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf9d4(%rip), %rsi # 0x2caf00
callq 0xfb610
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf9da(%rip), %rsi # 0x2caf20
callq 0xfb650
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf9e0(%rip), %rsi # 0x2caf40
callq 0xfb690
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cf6f6(%rip), %rsi # 0x2cac70
callq 0xfb6d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aMysys; "mysys"
mov [rbp+var_8], rax
mov [rbp+var_C], 13h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_mutexes
call inline_mysql_mutex_register_0
mov [rbp+var_C], 7
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_conds
call inline_mysql_cond_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_rwlocks
call inline_mysql_rwlock_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_threads
call inline_mysql_thread_register_0
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_files
call inline_mysql_file_register_0
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_stages
call inline_mysql_stage_register
add rsp, 10h
pop rbp
retn
| long long my_init_mysys_psi_keys()
{
inline_mysql_mutex_register_0("mysys", &all_mysys_mutexes, 19LL);
inline_mysql_cond_register_0("mysys", &all_mysys_conds, 7LL);
inline_mysql_rwlock_register_0("mysys", &all_mysys_rwlocks, 1LL);
inline_mysql_thread_register_0("mysys", &all_mysys_threads, 1LL);
inline_mysql_file_register_0("mysys", &all_mysys_files, 2LL);
return inline_mysql_stage_register("mysys", &all_mysys_stages, 1LL);
}
| my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x25e70b]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x13
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3cac80]
CALL 0x001fb590
MOV dword ptr [RBP + -0xc],0x7
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3cae50]
CALL 0x001fb5d0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3caf00]
CALL 0x001fb610
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3caf20]
CALL 0x001fb650
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3caf40]
CALL 0x001fb690
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3cac70]
CALL 0x001fb6d0
ADD RSP,0x10
POP RBP
RET
|
void my_init_mysys_psi_keys(void)
{
inline_mysql_mutex_register("mysys",all_mysys_mutexes,0x13);
inline_mysql_cond_register("mysys",all_mysys_conds,7);
inline_mysql_rwlock_register("mysys",all_mysys_rwlocks,1);
inline_mysql_thread_register("mysys",all_mysys_threads,1);
inline_mysql_file_register("mysys",all_mysys_files,2);
inline_mysql_stage_register("mysys",&all_mysys_stages,1);
return;
}
|
|
4,108 | js_object_seal | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_seal(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int freeze_flag)
{
JSValue obj = argv[0];
JSObject *p;
JSPropertyEnum *props;
uint32_t len, i;
int flags, desc_flags, res;
if (!JS_IsObject(obj))
return js_dup(obj);
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_MODULE_NS) {
return JS_ThrowTypeError(ctx, "cannot %s module namespace",
freeze_flag ? "freeze" : "seal");
}
res = JS_PreventExtensions(ctx, obj);
if (res < 0)
return JS_EXCEPTION;
if (!res) {
return JS_ThrowTypeError(ctx, "proxy preventExtensions handler returned false");
}
flags = JS_GPN_STRING_MASK | JS_GPN_SYMBOL_MASK;
if (JS_GetOwnPropertyNamesInternal(ctx, &props, &len, p, flags))
return JS_EXCEPTION;
for(i = 0; i < len; i++) {
JSPropertyDescriptor desc;
JSAtom prop = props[i].atom;
desc_flags = JS_PROP_THROW | JS_PROP_HAS_CONFIGURABLE;
if (freeze_flag) {
res = JS_GetOwnPropertyInternal(ctx, &desc, p, prop);
if (res < 0)
goto exception;
if (res) {
if (desc.flags & JS_PROP_WRITABLE)
desc_flags |= JS_PROP_HAS_WRITABLE;
js_free_desc(ctx, &desc);
}
}
if (JS_DefineProperty(ctx, obj, prop, JS_UNDEFINED,
JS_UNDEFINED, JS_UNDEFINED, desc_flags) < 0)
goto exception;
}
js_free_prop_enum(ctx, props, len);
return js_dup(obj);
exception:
js_free_prop_enum(ctx, props, len);
return JS_EXCEPTION;
} | O1 | c | js_object_seal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq (%r8), %xmm0
movq %xmm0, 0x50(%rsp)
movq 0x8(%r8), %r14
cmpl $-0x1, %r14d
jne 0x37354
movl %r9d, %ebp
movq %rdi, %r15
movq 0x50(%rsp), %r12
cmpw $0xb, 0x6(%r12)
jne 0x37399
testl %ebp, %ebp
leaq 0x68eaf(%rip), %rax # 0xa01db
leaq 0x68ea1(%rip), %rdx # 0xa01d4
cmoveq %rax, %rdx
leaq 0x68e7b(%rip), %rsi # 0xa01b9
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %r14d
xorl %ecx, %ecx
jmp 0x3737f
movq %xmm0, %rbx
movq %xmm0, 0x80(%rsp)
cmpl $-0x9, %r14d
jb 0x37372
movq 0x80(%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%rsp), %xmm0
movq %xmm0, 0x58(%rsp)
movq %xmm0, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xf69d
testl %eax, %eax
js 0x373dd
je 0x373e1
leaq 0x48(%rsp), %rsi
leaq 0x3c(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rcx
movl $0x3, %r8d
callq 0x229a9
testl %eax, %eax
je 0x373fe
xorl %ebx, %ebx
jmp 0x373f4
leaq 0x68df8(%rip), %rsi # 0xa01e0
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x21953
xorl %ecx, %ecx
movl $0x6, %r14d
jmp 0x3737f
movl 0x3c(%rsp), %eax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x374ee
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %r13d, %r13d
movq 0x40(%rsp), %rax
movl 0x4(%rax,%r13,8), %ecx
movl $0x4100, %esi # imm = 0x4100
testl %ebp, %ebp
je 0x37486
movq %r15, %rdi
leaq 0x80(%rsp), %rsi
movq %r12, %rdx
movl %ecx, 0x2c(%rsp)
callq 0x22fc5
testl %eax, %eax
js 0x374d7
movl 0x2c(%rsp), %ecx
movl $0x4100, %esi # imm = 0x4100
je 0x37486
movl 0x80(%rsp), %eax
andl $0x2, %eax
orl $0x41, %eax
shll $0x8, %eax
movl %eax, 0x38(%rsp)
movq %r15, %rdi
leaq 0x80(%rsp), %rsi
callq 0x3ccaf
movl 0x38(%rsp), %esi
movl 0x2c(%rsp), %ecx
xorl %eax, %eax
movl %eax, 0x70(%rsp)
movl $0x3, %edx
movq %rdx, 0x78(%rsp)
movl %eax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movdqu 0x70(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movl %esi, 0x20(%rsp)
movl $0x3, %r9d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x248a5
sarl $0x1f, %eax
andl $0x5, %eax
jmp 0x374dc
movl $0x5, %eax
testl %eax, %eax
jne 0x37514
incq %r13
cmpq %r13, 0x30(%rsp)
jne 0x3741d
movq 0x48(%rsp), %rsi
movq %r15, %rdi
movq 0x30(%rsp), %rdx
callq 0x23265
movq 0x58(%rsp), %xmm0
movq %xmm0, 0x80(%rsp)
jmp 0x37368
cmpl $0x5, %eax
jne 0x37530
movq %r15, %rdi
movq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x23265
jmp 0x373dd
xorl %ebx, %ebx
xorl %ecx, %ecx
jmp 0x3737f
| js_object_seal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
movq xmm0, qword ptr [r8]
movq [rsp+0E8h+var_98], xmm0
mov r14, [r8+8]
cmp r14d, 0FFFFFFFFh
jnz short loc_37354
mov ebp, r9d
mov r15, rdi
mov r12, [rsp+0E8h+var_98]
cmp word ptr [r12+6], 0Bh
jnz short loc_37399
test ebp, ebp
lea rax, aSeal; "seal"
lea rdx, aFreeze; "freeze"
cmovz rdx, rax
lea rsi, aCannotSModuleN; "cannot %s module namespace"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
xor ecx, ecx
jmp short loc_3737F
loc_37354:
movq rbx, xmm0
movq [rsp+0E8h+var_68], xmm0
cmp r14d, 0FFFFFFF7h
jb short loc_37372
loc_37368:
mov rax, [rsp+0E8h+var_68]
inc dword ptr [rax]
loc_37372:
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
loc_3737F:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_37399:
movq xmm0, [rsp+0E8h+var_98]
movq [rsp+0E8h+var_90], xmm0
movq rbx, xmm0
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_PreventExtensions
test eax, eax
js short loc_373DD
jz short loc_373E1
lea rsi, [rsp+0E8h+var_A0]
lea rdx, [rsp+0E8h+var_AC]
mov rdi, r15
mov rcx, r12
mov r8d, 3
call JS_GetOwnPropertyNamesInternal
test eax, eax
jz short loc_373FE
loc_373DD:
xor ebx, ebx
jmp short loc_373F4
loc_373E1:
lea rsi, aProxyPreventex; "proxy preventExtensions handler returne"...
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_373F4:
xor ecx, ecx
mov r14d, 6
jmp short loc_3737F
loc_373FE:
mov eax, [rsp+0E8h+var_AC]
mov [rsp+0E8h+var_B8], rax
test rax, rax
jz loc_374EE
mov rax, [rsp+0E8h+var_A0]
mov [rsp+0E8h+var_A8], rax
xor r13d, r13d
loc_3741D:
mov rax, [rsp+0E8h+var_A8]
mov ecx, [rax+r13*8+4]
mov esi, 4100h
test ebp, ebp
jz short loc_37486
mov rdi, r15
lea rsi, [rsp+0E8h+var_68]
mov rdx, r12
mov [rsp+0E8h+var_BC], ecx
call JS_GetOwnPropertyInternal
test eax, eax
js loc_374D7
mov ecx, [rsp+0E8h+var_BC]
mov esi, 4100h
jz short loc_37486
mov eax, dword ptr [rsp+0E8h+var_68]
and eax, 2
or eax, 41h
shl eax, 8
mov [rsp+0E8h+var_B0], eax
mov rdi, r15
lea rsi, [rsp+0E8h+var_68]
call js_free_desc
mov esi, [rsp+0E8h+var_B0]
mov ecx, [rsp+0E8h+var_BC]
loc_37486:
xor eax, eax
mov dword ptr [rsp+0E8h+var_78], eax
mov edx, 3
mov qword ptr [rsp+0E8h+var_78+8], rdx
mov dword ptr [rsp+0E8h+var_88], eax
mov qword ptr [rsp+0E8h+var_88+8], rdx
movups xmm0, [rsp+0E8h+var_88]
movups [rsp+0E8h+var_D8], xmm0
movdqu xmm0, [rsp+0E8h+var_78]
movdqu [rsp+0E8h+var_E8], xmm0
mov [rsp+0E8h+var_C8], esi
mov r9d, 3
mov rdi, r15
mov rsi, rbx
mov rdx, r14
xor r8d, r8d
call JS_DefineProperty
sar eax, 1Fh
and eax, 5
jmp short loc_374DC
loc_374D7:
mov eax, 5
loc_374DC:
test eax, eax
jnz short loc_37514
inc r13
cmp [rsp+0E8h+var_B8], r13
jnz loc_3741D
loc_374EE:
mov rsi, [rsp+0E8h+var_A0]
mov rdi, r15
mov rdx, [rsp+0E8h+var_B8]
call js_free_prop_enum
movq xmm0, [rsp+0E8h+var_90]
movq [rsp+0E8h+var_68], xmm0
jmp loc_37368
loc_37514:
cmp eax, 5
jnz short loc_37530
mov rdi, r15
mov rsi, [rsp+0E8h+var_A8]
mov rdx, [rsp+0E8h+var_B8]
call js_free_prop_enum
jmp loc_373DD
loc_37530:
xor ebx, ebx
xor ecx, ecx
jmp loc_3737F
| unsigned long long js_object_seal(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
const __m128i *a13,
long long a14)
{
__m128 v14; // xmm0
long long v15; // r14
int v16; // ebp
long long v17; // r12
const char *v18; // rdx
unsigned long long v19; // rbx
unsigned long long v20; // rcx
__m128 v22; // xmm0
int v23; // eax
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
__m128 v30; // xmm4
__m128 v31; // xmm5
long long v32; // r13
long long v33; // rcx
unsigned int v34; // esi
int OwnPropertyInternal; // eax
__m128 v36; // xmm0
int v37; // eax
char v38; // [rsp+0h] [rbp-E8h]
unsigned int v39; // [rsp+2Ch] [rbp-BCh]
long long v40; // [rsp+30h] [rbp-B8h]
unsigned int v41; // [rsp+38h] [rbp-B0h]
unsigned int v42; // [rsp+3Ch] [rbp-ACh] BYREF
long long v43; // [rsp+40h] [rbp-A8h]
long long v44; // [rsp+48h] [rbp-A0h] BYREF
__m128i v45; // [rsp+50h] [rbp-98h] BYREF
_DWORD *v46; // [rsp+60h] [rbp-88h]
long long v47; // [rsp+68h] [rbp-80h]
__m128i v48; // [rsp+70h] [rbp-78h] BYREF
long long v49[13]; // [rsp+80h] [rbp-68h] BYREF
v14 = (__m128)_mm_loadl_epi64(a13);
v45.m128i_i64[0] = v14.m128_u64[0];
v15 = a13->m128i_i64[1];
if ( (_DWORD)v15 != -1 )
{
v19 = v14.m128_u64[0];
v49[0] = v14.m128_u64[0];
if ( (unsigned int)v15 < 0xFFFFFFF7 )
{
LABEL_8:
v20 = v19 & 0xFFFFFFFF00000000LL;
return v20 | (unsigned int)v19;
}
LABEL_7:
++*(_DWORD *)v49[0];
goto LABEL_8;
}
v16 = a14;
v17 = v45.m128i_i64[0];
if ( *(_WORD *)(v45.m128i_i64[0] + 6) == 11 )
{
v18 = "freeze";
if ( !(_DWORD)a14 )
v18 = "seal";
LODWORD(v19) = 0;
JS_ThrowTypeError(
a1,
(long long)"cannot %s module namespace",
(long long)v18,
a12,
(long long)a13,
a14,
v14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v38);
v20 = 0LL;
return v20 | (unsigned int)v19;
}
v22 = (__m128)_mm_loadl_epi64(&v45);
v45.m128i_i64[1] = v22.m128_u64[0];
v19 = v22.m128_u64[0];
v23 = JS_PreventExtensions(a1, v22.m128_i64[0], -1);
if ( v23 < 0 )
goto LABEL_13;
if ( !v23 )
{
LODWORD(v19) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy preventExtensions handler returned false",
v24,
v25,
v26,
v27,
v22,
a3,
a4,
a5,
v28,
v29,
a8,
a9,
v38);
goto LABEL_15;
}
if ( (unsigned int)JS_GetOwnPropertyNamesInternal(a1, &v44, &v42, v17, 3) )
goto LABEL_13;
v40 = v42;
if ( !v42 )
{
LABEL_26:
js_free_prop_enum(a1, v44, v40);
v49[0] = v45.m128i_i64[1];
goto LABEL_7;
}
v43 = v44;
v32 = 0LL;
while ( 1 )
{
v33 = *(unsigned int *)(v43 + 8 * v32 + 4);
v34 = 16640;
if ( !v16 )
goto LABEL_22;
v39 = *(_DWORD *)(v43 + 8 * v32 + 4);
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v49, v17, v33);
if ( OwnPropertyInternal >= 0 )
{
v33 = v39;
v34 = 16640;
if ( OwnPropertyInternal )
{
v41 = (v49[0] & 2 | 0x41) << 8;
js_free_desc(a1);
v34 = v41;
v33 = v39;
}
LABEL_22:
v48.m128i_i32[0] = 0;
v48.m128i_i64[1] = 3LL;
LODWORD(v46) = 0;
v47 = 3LL;
v36 = (__m128)_mm_loadu_si128(&v48);
v37 = ((int)JS_DefineProperty(
a1,
v19,
v15,
v33,
0LL,
3LL,
v36,
a3,
a4,
a5,
v30,
v31,
a8,
a9,
v36.m128_u64[0],
v36.m128_i64[1],
v46,
3LL,
v34) >> 31) & 5;
goto LABEL_24;
}
v37 = 5;
LABEL_24:
if ( v37 )
break;
if ( v40 == ++v32 )
goto LABEL_26;
}
if ( v37 == 5 )
{
js_free_prop_enum(a1, v43, v40);
LABEL_13:
LODWORD(v19) = 0;
LABEL_15:
v20 = 0LL;
}
else
{
LODWORD(v19) = 0;
v20 = 0LL;
}
return v20 | (unsigned int)v19;
}
| js_object_seal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOVQ XMM0,qword ptr [R8]
MOVQ qword ptr [RSP + 0x50],XMM0
MOV R14,qword ptr [R8 + 0x8]
CMP R14D,-0x1
JNZ 0x00137354
MOV EBP,R9D
MOV R15,RDI
MOV R12,qword ptr [RSP + 0x50]
CMP word ptr [R12 + 0x6],0xb
JNZ 0x00137399
TEST EBP,EBP
LEA RAX,[0x1a01db]
LEA RDX,[0x1a01d4]
CMOVZ RDX,RAX
LEA RSI,[0x1a01b9]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00121953
MOV R14D,0x6
XOR ECX,ECX
JMP 0x0013737f
LAB_00137354:
MOVQ RBX,XMM0
MOVQ qword ptr [RSP + 0x80],XMM0
CMP R14D,-0x9
JC 0x00137372
LAB_00137368:
MOV RAX,qword ptr [RSP + 0x80]
INC dword ptr [RAX]
LAB_00137372:
MOV RCX,-0x100000000
AND RCX,RBX
LAB_0013737f:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00137399:
MOVQ XMM0,qword ptr [RSP + 0x50]
MOVQ qword ptr [RSP + 0x58],XMM0
MOVQ RBX,XMM0
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0010f69d
TEST EAX,EAX
JS 0x001373dd
JZ 0x001373e1
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x3c]
MOV RDI,R15
MOV RCX,R12
MOV R8D,0x3
CALL 0x001229a9
TEST EAX,EAX
JZ 0x001373fe
LAB_001373dd:
XOR EBX,EBX
JMP 0x001373f4
LAB_001373e1:
LEA RSI,[0x1a01e0]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00121953
LAB_001373f4:
XOR ECX,ECX
MOV R14D,0x6
JMP 0x0013737f
LAB_001373fe:
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x001374ee
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x40],RAX
XOR R13D,R13D
LAB_0013741d:
MOV RAX,qword ptr [RSP + 0x40]
MOV ECX,dword ptr [RAX + R13*0x8 + 0x4]
MOV ESI,0x4100
TEST EBP,EBP
JZ 0x00137486
MOV RDI,R15
LEA RSI,[RSP + 0x80]
MOV RDX,R12
MOV dword ptr [RSP + 0x2c],ECX
CALL 0x00122fc5
TEST EAX,EAX
JS 0x001374d7
MOV ECX,dword ptr [RSP + 0x2c]
MOV ESI,0x4100
JZ 0x00137486
MOV EAX,dword ptr [RSP + 0x80]
AND EAX,0x2
OR EAX,0x41
SHL EAX,0x8
MOV dword ptr [RSP + 0x38],EAX
MOV RDI,R15
LEA RSI,[RSP + 0x80]
CALL 0x0013ccaf
MOV ESI,dword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x2c]
LAB_00137486:
XOR EAX,EAX
MOV dword ptr [RSP + 0x70],EAX
MOV EDX,0x3
MOV qword ptr [RSP + 0x78],RDX
MOV dword ptr [RSP + 0x60],EAX
MOV qword ptr [RSP + 0x68],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVDQU XMM0,xmmword ptr [RSP + 0x70]
MOVDQU xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],ESI
MOV R9D,0x3
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
XOR R8D,R8D
CALL 0x001248a5
SAR EAX,0x1f
AND EAX,0x5
JMP 0x001374dc
LAB_001374d7:
MOV EAX,0x5
LAB_001374dc:
TEST EAX,EAX
JNZ 0x00137514
INC R13
CMP qword ptr [RSP + 0x30],R13
JNZ 0x0013741d
LAB_001374ee:
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,R15
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00123265
MOVQ XMM0,qword ptr [RSP + 0x58]
MOVQ qword ptr [RSP + 0x80],XMM0
JMP 0x00137368
LAB_00137514:
CMP EAX,0x5
JNZ 0x00137530
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00123265
JMP 0x001373dd
LAB_00137530:
XOR EBX,EBX
XOR ECX,ECX
JMP 0x0013737f
|
int1 [16] js_object_seal(int8 param_1)
{
int4 uVar1;
int iVar2;
int iVar3;
uint uVar4;
ulong uVar5;
char *pcVar6;
int8 extraout_RDX;
int *piVar7;
ulong *in_R8;
int in_R9D;
ulong uVar8;
ulong uVar9;
int1 auVar10 [16];
uint local_ac;
long local_a8;
long local_a0;
int *local_98;
int *local_90;
int4 local_88;
uint uStack_84;
int8 uStack_80;
int4 local_78;
uint uStack_74;
int8 uStack_70;
int *local_68 [7];
piVar7 = (int *)*in_R8;
uVar9 = in_R8[1];
if ((uint)uVar9 == 0xffffffff) {
local_98 = piVar7;
if (*(short *)((long)piVar7 + 6) == 0xb) {
pcVar6 = "freeze";
if (in_R9D == 0) {
pcVar6 = "seal";
}
JS_ThrowTypeError(param_1,"cannot %s module namespace",pcVar6);
uVar9 = 6;
uVar5 = 0;
piVar7 = (int *)0x0;
goto LAB_0013737f;
}
local_90 = piVar7;
iVar2 = JS_PreventExtensions(param_1,piVar7,uVar9);
if (-1 < iVar2) {
if (iVar2 == 0) {
JS_ThrowTypeError(param_1,"proxy preventExtensions handler returned false");
}
else {
iVar2 = JS_GetOwnPropertyNamesInternal(param_1,&local_a0,&local_ac,piVar7,3);
if (iVar2 == 0) {
uVar5 = (ulong)local_ac;
if (uVar5 != 0) {
local_a8 = local_a0;
uVar8 = 0;
do {
uVar1 = *(int4 *)(local_a8 + 4 + uVar8 * 8);
iVar2 = 0x4100;
if (in_R9D == 0) {
LAB_00137486:
local_78 = 0;
uStack_70 = 3;
local_88 = 0;
uStack_80 = 3;
iVar2 = JS_DefineProperty(param_1,piVar7,uVar9,uVar1,0,3,(ulong)uStack_74 << 0x20,3,
(ulong)uStack_84 << 0x20,3,iVar2);
uVar4 = iVar2 >> 0x1f & 5;
}
else {
iVar3 = JS_GetOwnPropertyInternal(param_1,local_68,piVar7);
if (-1 < iVar3) {
iVar2 = 0x4100;
if (iVar3 != 0) {
iVar2 = ((uint)local_68[0] & 2 | 0x41) << 8;
js_free_desc(param_1,local_68,extraout_RDX,uVar1);
}
goto LAB_00137486;
}
uVar4 = 5;
}
if (uVar4 != 0) {
if (uVar4 != 5) {
piVar7 = (int *)0x0;
uVar5 = 0;
goto LAB_0013737f;
}
js_free_prop_enum(param_1,local_a8,uVar5);
goto LAB_001373f4;
}
uVar8 = uVar8 + 1;
} while (uVar5 != uVar8);
}
js_free_prop_enum(param_1,local_a0,uVar5);
local_68[0] = local_90;
goto LAB_00137368;
}
}
}
LAB_001373f4:
piVar7 = (int *)0x0;
uVar5 = 0;
uVar9 = 6;
}
else {
local_68[0] = piVar7;
if (0xfffffff6 < (uint)uVar9) {
LAB_00137368:
*local_68[0] = *local_68[0] + 1;
}
uVar5 = (ulong)piVar7 & 0xffffffff00000000;
}
LAB_0013737f:
auVar10._0_8_ = (ulong)piVar7 & 0xffffffff | uVar5;
auVar10._8_8_ = uVar9;
return auVar10;
}
|
|
4,109 | get_dynamic | eloqsql/mysys/array.c | void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx)
{
if (idx >= array->elements)
{
DBUG_PRINT("warning",("To big array idx: %d, array size is %d",
idx,array->elements));
bzero(element,array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0xdad99
jmp 0xdad81
jmp 0xdad83
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
jmp 0xdadc2
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x2a090
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_DAD99
jmp short $+2
loc_DAD81:
jmp short $+2
loc_DAD83:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_DADC2
loc_DAD99:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_DADC2:
add rsp, 20h
pop rbp
retn
| long long get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x001dad99
JMP 0x001dad81
LAB_001dad81:
JMP 0x001dad83
LAB_001dad83:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
JMP 0x001dadc2
LAB_001dad99:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x0012a090
LAB_001dadc2:
ADD RSP,0x20
POP RBP
RET
|
void get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
|
|
4,110 | google::protobuf::compiler::php::(anonymous namespace)::NeedsUnwrapping(google::protobuf::FileDescriptor const*, google::protobuf::compiler::php::Options const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc | static bool NeedsUnwrapping(const FileDescriptor* file,
const Options& options) {
bool has_aggregate_metadata_prefix = false;
if (options.aggregate_metadata_prefixes.empty()) {
has_aggregate_metadata_prefix = true;
} else {
for (const auto& prefix : options.aggregate_metadata_prefixes) {
if (HasPrefixString(file->package(), prefix)) {
has_aggregate_metadata_prefix = true;
break;
}
}
}
return has_aggregate_metadata_prefix;
} | O0 | cpp | google::protobuf::compiler::php::(anonymous namespace)::NeedsUnwrapping(google::protobuf::FileDescriptor const*, google::protobuf::compiler::php::Options const&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movb $0x0, 0x47(%rsp)
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
callq 0x38af0
testb $0x1, %al
jne 0x96a17
jmp 0x96a21
movb $0x1, 0x47(%rsp)
jmp 0x96aca
movq 0x48(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0xa3790
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x38560
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xa37c0
testb $0x1, %al
jne 0x96a62
jmp 0x96ac8
leaq 0x30(%rsp), %rdi
callq 0xa37e0
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
callq 0x58260
movq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x28ad0
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x28ad0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x38d20
testb $0x1, %al
jne 0x96ab3
jmp 0x96aba
movb $0x1, 0x47(%rsp)
jmp 0x96ac8
jmp 0x96abc
leaq 0x30(%rsp), %rdi
callq 0xa3810
jmp 0x96a4d
jmp 0x96aca
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler3php12_GLOBAL__N_115NeedsUnwrappingEPKNS0_14FileDescriptorERKNS2_7OptionsE:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_11], 0
mov rdi, [rsp+58h+var_10]
add rdi, 8
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5emptyEv; std::set<std::string>::empty(void)
test al, 1
jnz short loc_96A17
jmp short loc_96A21
loc_96A17:
mov [rsp+58h+var_11], 1
jmp loc_96ACA
loc_96A21:
mov rax, [rsp+58h+var_10]
add rax, 8
mov [rsp+58h+var_20], rax
mov rdi, [rsp+58h+var_20]
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5beginEv; std::set<std::string>::begin(void)
mov [rsp+58h+var_28], rax
mov rdi, [rsp+58h+var_20]
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void)
mov [rsp+58h+var_30], rax
loc_96A4D:
lea rdi, [rsp+58h+var_28]
lea rsi, [rsp+58h+var_30]
call _ZStneRKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES8_; std::operator!=(std::_Rb_tree_const_iterator<std::string> const&,std::_Rb_tree_const_iterator<std::string> const&)
test al, 1
jnz short loc_96A62
jmp short loc_96AC8
loc_96A62:
lea rdi, [rsp+58h+var_28]
call _ZNKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; std::_Rb_tree_const_iterator<std::string>::operator*(void)
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_8]
call _ZNK6google8protobuf14FileDescriptor7packageB5cxx11Ev; google::protobuf::FileDescriptor::package(void)
mov rsi, rax
lea rdi, [rsp+58h+var_48]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
mov rsi, [rsp+58h+var_38]
mov rdi, rsp
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
mov rdi, [rsp+58h+var_48]
mov rsi, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_58]
mov rcx, [rsp+58h+var_50]
call _ZN6google8protobuf15HasPrefixStringENS0_20stringpiece_internal11StringPieceES2_; google::protobuf::HasPrefixString(google::protobuf::stringpiece_internal::StringPiece,google::protobuf::stringpiece_internal::StringPiece)
test al, 1
jnz short loc_96AB3
jmp short loc_96ABA
loc_96AB3:
mov [rsp+58h+var_11], 1
jmp short loc_96AC8
loc_96ABA:
jmp short $+2
loc_96ABC:
lea rdi, [rsp+58h+var_28]
call _ZNSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; std::_Rb_tree_const_iterator<std::string>::operator++(void)
jmp short loc_96A4D
loc_96AC8:
jmp short $+2
loc_96ACA:
mov al, [rsp+58h+var_11]
and al, 1
add rsp, 58h
retn
| char google::protobuf::compiler::php::`anonymous namespace'::NeedsUnwrapping(
google::protobuf::compiler::php::_anonymous_namespace_ *this,
const google::protobuf::FileDescriptor *a2,
const google::protobuf::compiler::php::Options *a3)
{
unsigned long long v3; // rax
long long v5[2]; // [rsp+0h] [rbp-58h] BYREF
long long v6[2]; // [rsp+10h] [rbp-48h] BYREF
unsigned long long v7; // [rsp+20h] [rbp-38h]
long long v8; // [rsp+28h] [rbp-30h] BYREF
_QWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
char v10; // [rsp+47h] [rbp-11h]
const google::protobuf::FileDescriptor *v11; // [rsp+48h] [rbp-10h]
google::protobuf::compiler::php::_anonymous_namespace_ *v12; // [rsp+50h] [rbp-8h]
v12 = this;
v11 = a2;
v10 = 0;
if ( (std::set<std::string>::empty((long long)a2 + 8) & 1) != 0 )
{
v10 = 1;
}
else
{
v9[1] = (char *)v11 + 8;
v9[0] = std::set<std::string>::begin((char *)v11 + 8);
v8 = std::set<std::string>::end((long long)v11 + 8);
while ( (std::operator!=(v9, &v8) & 1) != 0 )
{
v7 = std::_Rb_tree_const_iterator<std::string>::operator*(v9);
v3 = google::protobuf::FileDescriptor::package[abi:cxx11]((long long)v12);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v6, v3);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v5, v7);
if ( google::protobuf::HasPrefixString(v6[0], v6[1], v5[0], v5[1]) )
{
v10 = 1;
return v10 & 1;
}
std::_Rb_tree_const_iterator<std::string>::operator++(v9);
}
}
return v10 & 1;
}
| NeedsUnwrapping:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV byte ptr [RSP + 0x47],0x0
MOV RDI,qword ptr [RSP + 0x48]
ADD RDI,0x8
CALL 0x00138af0
TEST AL,0x1
JNZ 0x00196a17
JMP 0x00196a21
LAB_00196a17:
MOV byte ptr [RSP + 0x47],0x1
JMP 0x00196aca
LAB_00196a21:
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x8
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001a3790
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00138560
MOV qword ptr [RSP + 0x28],RAX
LAB_00196a4d:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x28]
CALL 0x001a37c0
TEST AL,0x1
JNZ 0x00196a62
JMP 0x00196ac8
LAB_00196a62:
LEA RDI,[RSP + 0x30]
CALL 0x001a37e0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00158260
MOV RSI,RAX
LEA RDI,[RSP + 0x10]
CALL 0x00128ad0
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,RSP
CALL 0x00128ad0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
CALL 0x00138d20
TEST AL,0x1
JNZ 0x00196ab3
JMP 0x00196aba
LAB_00196ab3:
MOV byte ptr [RSP + 0x47],0x1
JMP 0x00196ac8
LAB_00196aba:
JMP 0x00196abc
LAB_00196abc:
LEA RDI,[RSP + 0x30]
CALL 0x001a3810
JMP 0x00196a4d
LAB_00196ac8:
JMP 0x00196aca
LAB_00196aca:
MOV AL,byte ptr [RSP + 0x47]
AND AL,0x1
ADD RSP,0x58
RET
|
/* google::protobuf::compiler::php::(anonymous
namespace)::NeedsUnwrapping(google::protobuf::FileDescriptor const*,
google::protobuf::compiler::php::Options const&) */
ulong google::protobuf::compiler::php::(anonymous_namespace)::NeedsUnwrapping
(FileDescriptor *param_1,Options *param_2)
{
ulong uVar1;
string *psVar2;
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
string *local_38;
int8 local_30;
int8 local_28;
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*local_20;
int1 local_11;
Options *local_10;
FileDescriptor *local_8;
local_11 = 0;
local_10 = param_2;
local_8 = param_1;
uVar1 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::empty((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(param_2 + 8));
if ((uVar1 & 1) == 0) {
local_20 = (set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(local_10 + 8);
local_28 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::begin(local_20);
local_30 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::end(local_20);
while (uVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_28,
(_Rb_tree_const_iterator *)&local_30), (uVar1 & 1) != 0) {
local_38 = (string *)
std::_Rb_tree_const_iterator<std::__cxx11::string>::operator*
((_Rb_tree_const_iterator<std::__cxx11::string> *)&local_28);
psVar2 = (string *)FileDescriptor::package_abi_cxx11_(local_8);
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_48,psVar2);
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_58,local_38);
uVar1 = HasPrefixString(local_48,local_40,local_58,local_50);
if ((uVar1 & 1) != 0) {
local_11 = 1;
break;
}
std::_Rb_tree_const_iterator<std::__cxx11::string>::operator++
((_Rb_tree_const_iterator<std::__cxx11::string> *)&local_28);
}
}
else {
local_11 = 1;
}
return CONCAT71((int7)(uVar1 >> 8),local_11) & 0xffffffffffffff01;
}
|
|
4,111 | my_wc_to_printable_8bit | eloqsql/strings/ctype.c | int
my_wc_to_printable_8bit(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end)
{
/*
Special case: swe7 does not have the backslash character.
Use dot instead of backslash for escaping.
*/
uint bs= cs->tab_to_uni && cs->tab_to_uni['\\'] != '\\' ? '.' : '\\';
DBUG_ASSERT(cs->mbminlen == 1);
/*
Additionally, if the original swe7 string contains backslashes,
replace them to dots, so this error message:
Invalid swe7 character string: '\xEF\xBC\xB4'
is displayed as:
Invalid swe7 character string: '.xEF.xBC.xB4'
which is more readable than what would happen without '\'-to-dot mapping:
Invalid swe7 character string: '.005CxEF.005CxBC.005CxB4'
*/
if (bs == '.' && wc == '\\')
wc= '.';
return my_wc_to_printable_ex(cs, wc, str, end, bs, 1, 1);
} | O0 | c | my_wc_to_printable_8bit:
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 -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x68(%rcx)
movb %al, -0x25(%rbp)
je 0x6c7e0
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movzwl 0xb8(%rax), %eax
cmpl $0x5c, %eax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %dl
movl $0x5c, %eax
movl $0x2e, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0x6c7f8
cmpl $0x2e, -0x24(%rbp)
jne 0x6c80d
cmpq $0x5c, -0x10(%rbp)
jne 0x6c80d
movq $0x2e, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movl $0x1, %r9d
movl $0x1, (%rsp)
callq 0x6c470
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_wc_to_printable_8bit:
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 rcx, [rbp+var_8]
xor eax, eax
cmp qword ptr [rcx+68h], 0
mov [rbp+var_25], al
jz short loc_6C7E0
mov rax, [rbp+var_8]
mov rax, [rax+68h]
movzx eax, word ptr [rax+0B8h]
cmp eax, 5Ch ; '\'
setnz al
mov [rbp+var_25], al
loc_6C7E0:
mov dl, [rbp+var_25]
mov eax, 5Ch ; '\'
mov ecx, 2Eh ; '.'
test dl, 1
cmovnz eax, ecx
mov [rbp+var_24], eax
jmp short $+2
loc_6C7F8:
cmp [rbp+var_24], 2Eh ; '.'
jnz short loc_6C80D
cmp [rbp+var_10], 5Ch ; '\'
jnz short loc_6C80D
mov [rbp+var_10], 2Eh ; '.'
loc_6C80D:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8d, [rbp+var_24]
mov r9d, 1
mov [rsp+30h+var_30], 1
call my_wc_to_printable_ex
add rsp, 30h
pop rbp
retn
| long long my_wc_to_printable_8bit(long long a1, long long a2, long long a3, unsigned long long a4)
{
unsigned int v4; // eax
bool v6; // [rsp+Bh] [rbp-25h]
long long v7; // [rsp+20h] [rbp-10h]
v7 = a2;
v6 = 0;
if ( *(_QWORD *)(a1 + 104) )
v6 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 184LL) != 92;
v4 = 92;
if ( v6 )
v4 = 46;
if ( v4 == 46 && a2 == 92 )
v7 = 46LL;
return my_wc_to_printable_ex(a1, v7, a3, a4, v4, 1u, 1u);
}
| my_wc_to_printable_8bit:
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 RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP qword ptr [RCX + 0x68],0x0
MOV byte ptr [RBP + -0x25],AL
JZ 0x0016c7e0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOVZX EAX,word ptr [RAX + 0xb8]
CMP EAX,0x5c
SETNZ AL
MOV byte ptr [RBP + -0x25],AL
LAB_0016c7e0:
MOV DL,byte ptr [RBP + -0x25]
MOV EAX,0x5c
MOV ECX,0x2e
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0016c7f8
LAB_0016c7f8:
CMP dword ptr [RBP + -0x24],0x2e
JNZ 0x0016c80d
CMP qword ptr [RBP + -0x10],0x5c
JNZ 0x0016c80d
MOV qword ptr [RBP + -0x10],0x2e
LAB_0016c80d:
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 R8D,dword ptr [RBP + -0x24]
MOV R9D,0x1
MOV dword ptr [RSP],0x1
CALL 0x0016c470
ADD RSP,0x30
POP RBP
RET
|
void my_wc_to_printable_8bit(long param_1,long param_2,int8 param_3,int8 param_4)
{
int iVar1;
bool bVar2;
int8 local_18;
bVar2 = false;
if (*(long *)(param_1 + 0x68) != 0) {
bVar2 = *(short *)(*(long *)(param_1 + 0x68) + 0xb8) != 0x5c;
}
iVar1 = 0x5c;
if (bVar2) {
iVar1 = 0x2e;
}
local_18 = param_2;
if ((iVar1 == 0x2e) && (param_2 == 0x5c)) {
local_18 = 0x2e;
}
my_wc_to_printable_ex(param_1,local_18,param_3,param_4,iVar1,1,1);
return;
}
|
|
4,112 | ma_write_static_record | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _ma_rec_pos(info->s, temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos, MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O0 | c | ma_write_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0xc8(%rax)
je 0x74673
movq -0x20(%rbp), %rax
cmpb $0x0, 0x681(%rax)
jne 0x74673
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movl 0x3e0(%rcx), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0xc8(%rcx), %rcx
addq $0x1, %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x745dd
jmp 0x748a1
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x6c5f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xc8(%rax)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x30(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x7466e
jmp 0x748a1
jmp 0x7489b
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x368(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq (%rdx), %rdx
subq 0x3a0(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x746b4
callq 0xf7440
movl $0x87, (%rax)
movb $0x2, -0x11(%rbp)
jmp 0x748a5
movq -0x20(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7476d
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x398(%rax), %rdx
callq 0x748d0
cmpl $0x0, %eax
je 0x746f6
jmp 0x748a1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x398(%rcx), %rax
je 0x74768
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x398(%rcx), %rax
movl %eax, -0x34(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
leaq -0x10(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, %edx
callq 0x748d0
cmpl $0x0, %eax
je 0x74766
jmp 0x748a1
jmp 0x74768
jmp 0x74864
movq -0x20(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x7c8(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0x747c6
jmp 0x748a1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x398(%rcx), %rax
je 0x74862
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x398(%rcx), %rax
movl %eax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl -0x38(%rbp), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
addq 0x398(%r8), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x7c8(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0x74860
jmp 0x748a1
jmp 0x74862
jmp 0x74864
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0xc0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc0(%rax)
movb $0x0, -0x11(%rbp)
jmp 0x748a5
movb $0x1, -0x11(%rbp)
movb -0x11(%rbp), %al
movb %al, -0x39(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x748c6
movb -0x39(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| _ma_write_static_record:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh
jz loc_74673
mov rax, [rbp+var_20]
cmp byte ptr [rax+681h], 0
jnz loc_74673
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+0C8h]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov ecx, [rcx+3E0h]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+0C8h]
add rcx, 1
mov r8d, 4
call rax
cmp rax, 0
jz short loc_745DD
jmp loc_748A1
loc_745DD:
mov rax, [rbp+var_20]
mov rdi, [rax]
lea rsi, [rbp+var_10]
call _ma_rec_pos
mov rcx, rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rax+0C8h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rcx, [rax+8]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_30]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_7466E
jmp loc_748A1
loc_7466E:
jmp loc_7489B
loc_74673:
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rax, [rax+28h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+368h]
mov rdx, [rbp+var_20]
mov rdx, [rdx]
sub rcx, [rdx+3A0h]
cmp rax, rcx
jbe short loc_746B4
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_11], 2
jmp loc_748A5
loc_746B4:
mov rax, [rbp+var_20]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz loc_7476D
mov rdi, [rbp+var_20]
add rdi, 4B8h
mov rsi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+398h]
call my_b_write_0
cmp eax, 0
jz short loc_746F6
jmp loc_748A1
loc_746F6:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+398h]
jz short loc_74768
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+398h]
mov [rbp+var_34], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
add rdi, 4B8h
lea rsi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
call my_b_write_0
cmp eax, 0
jz short loc_74766
jmp loc_748A1
loc_74766:
jmp short $+2
loc_74768:
jmp loc_74864
loc_7476D:
mov rax, [rbp+var_20]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+7C8h]
call rax
cmp rax, 0
jz short loc_747C6
jmp loc_748A1
loc_747C6:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+398h]
jz short loc_74862
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+398h]
mov [rbp+var_38], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_38]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov ecx, [rbp+var_38]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
add rcx, [r8+398h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+7C8h]
call rax
cmp rax, 0
jz short loc_74860
jmp short loc_748A1
loc_74860:
jmp short $+2
loc_74862:
jmp short $+2
loc_74864:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+3A0h]
mov rax, [rbp+var_20]
mov rax, [rax+20h]
add rcx, [rax+28h]
mov [rax+28h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+0C0h]
add rcx, 1
mov [rax+0C0h], rcx
loc_7489B:
mov [rbp+var_11], 0
jmp short loc_748A5
loc_748A1:
mov [rbp+var_11], 1
loc_748A5:
mov al, [rbp+var_11]
mov [rbp+var_39], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_748C6
mov al, [rbp+var_39]
add rsp, 40h
pop rbp
retn
loc_748C6:
call ___stack_chk_fail
| char ma_write_static_record(_DWORD *a1, const char *a2)
{
long long v2; // rdx
unsigned int v4; // [rsp+8h] [rbp-38h]
unsigned int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+30h] [rbp-10h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
if ( *(_QWORD *)(*(_QWORD *)a1 + 200LL) != -1LL && !*((_BYTE *)a1 + 1665) )
{
v6 = *(_QWORD *)(*(_QWORD *)a1 + 200LL);
a1[358] = 1;
if ( !(*(long long ( **)(_DWORD *, unsigned int *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
&v8,
*(unsigned int *)(*(_QWORD *)a1 + 992LL),
*(_QWORD *)(*(_QWORD *)a1 + 200LL) + 1LL,
4LL) )
{
*(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v8, v2);
--*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL);
*(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
v6,
4LL) )
return 0;
}
return 1;
}
if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= *(_QWORD *)(*(_QWORD *)a1 + 872LL)
- *(_QWORD *)(*(_QWORD *)a1 + 928LL) )
{
if ( (a1[391] & 0x10) != 0 )
{
if ( (unsigned int)my_b_write_0(a1 + 302, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL)) )
return 1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) )
{
v5 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL);
memset(&v8, 0LL, v5);
if ( (unsigned int)my_b_write_0(a1 + 302, &v8, v5) )
return 1;
}
}
else
{
a1[358] = 1;
if ( (*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 1992LL)) )
{
return 1;
}
if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) )
{
v4 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL);
memset(&v8, 0LL, v4);
if ( (*(long long ( **)(_DWORD *, unsigned int *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))(
a1,
&v8,
v4,
*(_QWORD *)(*(_QWORD *)a1 + 920LL) + *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 1992LL)) )
{
return 1;
}
}
}
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL);
++*(_QWORD *)(*(_QWORD *)a1 + 192LL);
return 0;
}
*(_DWORD *)my_thread_var(a1, a2) = 135;
return 2;
}
| _ma_write_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0xc8],-0x1
JZ 0x00174673
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x681],0x0
JNZ 0x00174673
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x3e0]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0xc8]
ADD RCX,0x1
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001745dd
JMP 0x001748a1
LAB_001745dd:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x10]
CALL 0x0016c5f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xc8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x0017466e
JMP 0x001748a1
LAB_0017466e:
JMP 0x0017489b
LAB_00174673:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x368]
MOV RDX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RDX]
SUB RCX,qword ptr [RDX + 0x3a0]
CMP RAX,RCX
JBE 0x001746b4
CALL 0x001f7440
MOV dword ptr [RAX],0x87
MOV byte ptr [RBP + -0x11],0x2
JMP 0x001748a5
LAB_001746b4:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0017476d
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x398]
CALL 0x001748d0
CMP EAX,0x0
JZ 0x001746f6
JMP 0x001748a1
LAB_001746f6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x398]
JZ 0x00174768
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x398]
MOV dword ptr [RBP + -0x34],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
LEA RSI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
CALL 0x001748d0
CMP EAX,0x0
JZ 0x00174766
JMP 0x001748a1
LAB_00174766:
JMP 0x00174768
LAB_00174768:
JMP 0x00174864
LAB_0017476d:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x7c8]
CALL RAX
CMP RAX,0x0
JZ 0x001747c6
JMP 0x001748a1
LAB_001747c6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x398]
JZ 0x00174862
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x398]
MOV dword ptr [RBP + -0x38],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
ADD RCX,qword ptr [R8 + 0x398]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x7c8]
CALL RAX
CMP RAX,0x0
JZ 0x00174860
JMP 0x001748a1
LAB_00174860:
JMP 0x00174862
LAB_00174862:
JMP 0x00174864
LAB_00174864:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
ADD RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0xc0]
ADD RCX,0x1
MOV qword ptr [RAX + 0xc0],RCX
LAB_0017489b:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x001748a5
LAB_001748a1:
MOV byte ptr [RBP + -0x11],0x1
LAB_001748a5:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001748c6
MOV AL,byte ptr [RBP + -0x39]
ADD RSP,0x40
POP RBP
RET
LAB_001748c6:
CALL 0x0012a270
|
int8 _ma_write_static_record(long *param_1,int8 param_2)
{
int8 uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
long in_FS_OFFSET;
int1 local_19;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
if ((ulong)(*(long *)(*param_1 + 0x368) - *(long *)(*param_1 + 0x3a0)) <
*(ulong *)(param_1[4] + 0x28)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x87;
local_19 = 2;
goto LAB_001748a5;
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) {
*(int4 *)(param_1 + 0xb3) = 1;
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),
*(int8 *)(param_1[4] + 0x28),*(int8 *)(*param_1 + 0x7c8));
if (lVar4 == 0) {
if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398);
memset(local_18,0,(ulong)uVar3);
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,local_18,uVar3,
*(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x398),
*(int8 *)(*param_1 + 0x7c8));
if (lVar4 != 0) goto LAB_001748a1;
}
goto LAB_00174864;
}
}
else {
iVar2 = my_b_write(param_1 + 0x97,param_2,*(int8 *)(*param_1 + 0x398));
if (iVar2 == 0) {
if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398);
memset(local_18,0,(ulong)uVar3);
iVar2 = my_b_write(param_1 + 0x97,local_18,uVar3);
if (iVar2 != 0) goto LAB_001748a1;
}
LAB_00174864:
*(long *)(param_1[4] + 0x28) = *(long *)(*param_1 + 0x3a0) + *(long *)(param_1[4] + 0x28);
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
goto LAB_0017489b;
}
}
}
else {
uVar1 = *(int8 *)(*param_1 + 200);
*(int4 *)(param_1 + 0xb3) = 1;
lVar4 = (**(code **)(*param_1 + 0x6e0))
(param_1,local_18,*(int4 *)(*param_1 + 0x3e0),
*(long *)(*param_1 + 200) + 1,4);
if (lVar4 == 0) {
uVar5 = _ma_rec_pos(*param_1,local_18);
*(int8 *)(*param_1 + 200) = uVar5;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0);
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),uVar1,4);
if (lVar4 == 0) {
LAB_0017489b:
local_19 = 0;
goto LAB_001748a5;
}
}
}
LAB_001748a1:
local_19 = 1;
LAB_001748a5:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_19);
}
|
|
4,113 | ma_write_static_record | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _ma_rec_pos(info->s, temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos, MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O3 | c | ma_write_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0xc8(%rax), %r15
cmpq $-0x1, %r15
je 0x5c2d5
cmpb $0x0, 0x681(%rbx)
je 0x5c3a8
movq 0x20(%rbx), %rcx
movq 0x368(%rax), %rdx
subq 0x3a0(%rax), %rdx
cmpq %rdx, 0x28(%rcx)
jbe 0x5c300
callq 0xa2a4e
movl $0x87, (%rax)
movb $0x2, %r14b
jmp 0x5c51d
testb $0x10, 0x61c(%rbx)
jne 0x5c43a
movl $0x1, 0x598(%rbx)
movq 0x398(%rax), %rdx
movq 0x28(%rcx), %rcx
movq 0x7c8(%rax), %r8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x6e8(%rax)
movb $0x1, %r14b
testq %rax, %rax
jne 0x5c51d
movq (%rbx), %r13
movq 0x398(%r13), %rax
movq 0x3a0(%r13), %r15
cmpq %rax, %r15
je 0x5c4fe
subl %eax, %r15d
leaq -0x38(%rbp), %r12
movl $0x8, %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x297f0
movq 0x20(%rbx), %rax
movq 0x398(%r13), %rcx
addq 0x28(%rax), %rcx
movq 0x7c8(%r13), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x6e8(%r13)
testq %rax, %rax
jne 0x5c51d
jmp 0x5c4fe
movl $0x1, 0x598(%rbx)
movl 0x3e0(%rax), %edx
movq 0xc8(%rax), %rcx
incq %rcx
leaq -0x38(%rbp), %rsi
movl $0x4, %r8d
movq %rbx, %rdi
callq *0x6e0(%rax)
testq %rax, %rax
jne 0x5c432
movq (%rbx), %rdi
leaq -0x38(%rbp), %rsi
callq 0x58085
movq (%rbx), %rcx
movq %rax, 0xc8(%rcx)
movq 0x20(%rbx), %rax
decq 0x8(%rax)
movq (%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x3a0(%rax), %rax
subq %rax, 0x10(%rcx)
movq (%rbx), %rax
movq 0x398(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x6e8(%rax)
testq %rax, %rax
je 0x5c51a
movb $0x1, %r14b
jmp 0x5c51d
leaq 0x4b8(%rbx), %r15
movq 0x398(%rax), %r12
movq 0x4f8(%rbx), %rdi
leaq (%rdi,%r12), %rax
cmpq 0x500(%rbx), %rax
jbe 0x5c477
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9674f
movb $0x1, %r14b
testl %eax, %eax
jne 0x5c51d
jmp 0x5c48e
testq %r12, %r12
je 0x5c48e
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, 0x4f8(%rbx)
movq (%rbx), %rcx
movq 0x398(%rcx), %rax
movq 0x3a0(%rcx), %r14
cmpq %rax, %r14
je 0x5c4fe
subl %eax, %r14d
leaq -0x38(%rbp), %rdi
movl $0x8, %ecx
xorl %esi, %esi
movq %r14, %rdx
callq 0x297f0
movq 0x4f8(%rbx), %rdi
leaq (%rdi,%r14), %rax
cmpq 0x500(%rbx), %rax
jbe 0x5c4e6
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x9674f
movb $0x1, %r14b
testl %eax, %eax
jne 0x5c51d
jmp 0x5c4fe
testq %r14, %r14
je 0x5c4fe
leaq -0x38(%rbp), %rsi
movq %r14, %rdx
callq 0x29080
addq %r14, 0x4f8(%rbx)
movq (%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x3a0(%rax), %rax
addq %rax, 0x28(%rcx)
movq (%rbx), %rax
incq 0xc0(%rax)
xorl %r14d, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5c53e
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_write_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r15, [rax+0C8h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_5C2D5
cmp byte ptr [rbx+681h], 0
jz loc_5C3A8
loc_5C2D5:
mov rcx, [rbx+20h]
mov rdx, [rax+368h]
sub rdx, [rax+3A0h]
cmp [rcx+28h], rdx
jbe short loc_5C300
call _my_thread_var
mov dword ptr [rax], 87h
mov r14b, 2
jmp loc_5C51D
loc_5C300:
test byte ptr [rbx+61Ch], 10h
jnz loc_5C43A
mov dword ptr [rbx+598h], 1
mov rdx, [rax+398h]
mov rcx, [rcx+28h]
mov r8, [rax+7C8h]
mov rdi, rbx
mov rsi, r14
call qword ptr [rax+6E8h]
mov r14b, 1
test rax, rax
jnz loc_5C51D
mov r13, [rbx]
mov rax, [r13+398h]
mov r15, [r13+3A0h]
cmp r15, rax
jz loc_5C4FE
sub r15d, eax
lea r12, [rbp+var_38]
mov ecx, 8
mov rdi, r12
xor esi, esi
mov rdx, r15
call ___memset_chk
mov rax, [rbx+20h]
mov rcx, [r13+398h]
add rcx, [rax+28h]
mov r8, [r13+7C8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call qword ptr [r13+6E8h]
test rax, rax
jnz loc_5C51D
jmp loc_5C4FE
loc_5C3A8:
mov dword ptr [rbx+598h], 1
mov edx, [rax+3E0h]
mov rcx, [rax+0C8h]
inc rcx
lea rsi, [rbp+var_38]
mov r8d, 4
mov rdi, rbx
call qword ptr [rax+6E0h]
test rax, rax
jnz short loc_5C432
mov rdi, [rbx]
lea rsi, [rbp+var_38]
call _ma_rec_pos
mov rcx, [rbx]
mov [rcx+0C8h], rax
mov rax, [rbx+20h]
dec qword ptr [rax+8]
mov rax, [rbx]
mov rcx, [rbx+20h]
mov rax, [rax+3A0h]
sub [rcx+10h], rax
mov rax, [rbx]
mov rdx, [rax+398h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+6E8h]
test rax, rax
jz loc_5C51A
loc_5C432:
mov r14b, 1
jmp loc_5C51D
loc_5C43A:
lea r15, [rbx+4B8h]
mov r12, [rax+398h]
mov rdi, [rbx+4F8h]
lea rax, [rdi+r12]
cmp rax, [rbx+500h]
jbe short loc_5C477
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _my_b_write
mov r14b, 1
test eax, eax
jnz loc_5C51D
jmp short loc_5C48E
loc_5C477:
test r12, r12
jz short loc_5C48E
mov rsi, r14
mov rdx, r12
call _memcpy
add [rbx+4F8h], r12
loc_5C48E:
mov rcx, [rbx]
mov rax, [rcx+398h]
mov r14, [rcx+3A0h]
cmp r14, rax
jz short loc_5C4FE
sub r14d, eax
lea rdi, [rbp+var_38]
mov ecx, 8
xor esi, esi
mov rdx, r14
call ___memset_chk
mov rdi, [rbx+4F8h]
lea rax, [rdi+r14]
cmp rax, [rbx+500h]
jbe short loc_5C4E6
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r14
call _my_b_write
mov r14b, 1
test eax, eax
jnz short loc_5C51D
jmp short loc_5C4FE
loc_5C4E6:
test r14, r14
jz short loc_5C4FE
lea rsi, [rbp+var_38]
mov rdx, r14
call _memcpy
add [rbx+4F8h], r14
loc_5C4FE:
mov rax, [rbx]
mov rcx, [rbx+20h]
mov rax, [rax+3A0h]
add [rcx+28h], rax
mov rax, [rbx]
inc qword ptr [rax+0C0h]
loc_5C51A:
xor r14d, r14d
loc_5C51D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5C53E
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5C53E:
call ___stack_chk_fail
| long long ma_write_static_record(_DWORD *a1, const char *a2)
{
long long v2; // r14
long long v4; // rax
long long v5; // r15
long long v6; // rcx
long long v7; // r13
long long v8; // rax
long long v9; // r15
long long v10; // r15
long long v11; // rdx
long long v12; // r12
long long v13; // rdi
long long v14; // rax
long long v15; // r14
long long v16; // rdi
int v17; // eax
__int16 v19; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v20; // [rsp+10h] [rbp-30h]
LODWORD(v2) = (_DWORD)a2;
v20 = __readfsqword(0x28u);
v4 = *(_QWORD *)a1;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 200LL);
if ( v5 != -1 && !*((_BYTE *)a1 + 1665) )
{
a1[358] = 1;
if ( (*(long long ( **)(_DWORD *, __int16 *, _QWORD, long long, long long))(v4 + 1760))(
a1,
&v19,
*(unsigned int *)(v4 + 992),
*(_QWORD *)(v4 + 200) + 1LL,
4LL)
|| (*(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v19, v11),
--*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL),
*(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL),
(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
v5,
4LL)) )
{
LOBYTE(v2) = 1;
return (unsigned int)v2;
}
LABEL_25:
LODWORD(v2) = 0;
return (unsigned int)v2;
}
v6 = *((_QWORD *)a1 + 4);
if ( *(_QWORD *)(v6 + 40) > *(_QWORD *)(v4 + 872) - *(_QWORD *)(v4 + 928) )
{
*(_DWORD *)my_thread_var(a1, a2) = 135;
LOBYTE(v2) = 2;
return (unsigned int)v2;
}
if ( (a1[391] & 0x10) != 0 )
{
v12 = *(_QWORD *)(v4 + 920);
v13 = *((_QWORD *)a1 + 159);
if ( (unsigned long long)(v13 + v12) <= *((_QWORD *)a1 + 160) )
{
if ( v12 )
{
memcpy(v13, a2, v12);
*((_QWORD *)a1 + 159) += v12;
}
}
else
{
LOBYTE(v2) = 1;
if ( (unsigned int)my_b_write(a1 + 302, a2, v12) )
return (unsigned int)v2;
}
v14 = *(_QWORD *)(*(_QWORD *)a1 + 920LL);
v15 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( v15 != v14 )
{
v2 = (unsigned int)(v15 - v14);
__memset_chk(&v19, 0LL, v2, 8LL);
v16 = *((_QWORD *)a1 + 159);
if ( (unsigned long long)(v16 + v2) <= *((_QWORD *)a1 + 160) )
{
if ( v2 )
{
memcpy(v16, &v19, v2);
*((_QWORD *)a1 + 159) += v2;
}
}
else
{
v17 = my_b_write(a1 + 302, &v19, v2);
LOBYTE(v2) = 1;
if ( v17 )
return (unsigned int)v2;
}
}
goto LABEL_24;
}
a1[358] = 1;
LOBYTE(v2) = 1;
if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(v4 + 1768))(
a1,
a2,
*(_QWORD *)(v4 + 920),
*(_QWORD *)(v6 + 40),
*(_QWORD *)(v4 + 1992)) )
{
v7 = *(_QWORD *)a1;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 920LL);
v9 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( v9 == v8
|| (v10 = (unsigned int)(v9 - v8),
__memset_chk(&v19, 0LL, v10, 8LL),
!(*(long long ( **)(_DWORD *, __int16 *, long long, _QWORD, _QWORD))(v7 + 1768))(
a1,
&v19,
v10,
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) + *(_QWORD *)(v7 + 920),
*(_QWORD *)(v7 + 1992))) )
{
LABEL_24:
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL);
++*(_QWORD *)(*(_QWORD *)a1 + 192LL);
goto LABEL_25;
}
}
return (unsigned int)v2;
}
| _ma_write_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0xc8]
CMP R15,-0x1
JZ 0x0015c2d5
CMP byte ptr [RBX + 0x681],0x0
JZ 0x0015c3a8
LAB_0015c2d5:
MOV RCX,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RAX + 0x368]
SUB RDX,qword ptr [RAX + 0x3a0]
CMP qword ptr [RCX + 0x28],RDX
JBE 0x0015c300
CALL 0x001a2a4e
MOV dword ptr [RAX],0x87
MOV R14B,0x2
JMP 0x0015c51d
LAB_0015c300:
TEST byte ptr [RBX + 0x61c],0x10
JNZ 0x0015c43a
MOV dword ptr [RBX + 0x598],0x1
MOV RDX,qword ptr [RAX + 0x398]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RAX + 0x7c8]
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RAX + 0x6e8]
MOV R14B,0x1
TEST RAX,RAX
JNZ 0x0015c51d
MOV R13,qword ptr [RBX]
MOV RAX,qword ptr [R13 + 0x398]
MOV R15,qword ptr [R13 + 0x3a0]
CMP R15,RAX
JZ 0x0015c4fe
SUB R15D,EAX
LEA R12,[RBP + -0x38]
MOV ECX,0x8
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R15
CALL 0x001297f0
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [R13 + 0x398]
ADD RCX,qword ptr [RAX + 0x28]
MOV R8,qword ptr [R13 + 0x7c8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [R13 + 0x6e8]
TEST RAX,RAX
JNZ 0x0015c51d
JMP 0x0015c4fe
LAB_0015c3a8:
MOV dword ptr [RBX + 0x598],0x1
MOV EDX,dword ptr [RAX + 0x3e0]
MOV RCX,qword ptr [RAX + 0xc8]
INC RCX
LEA RSI,[RBP + -0x38]
MOV R8D,0x4
MOV RDI,RBX
CALL qword ptr [RAX + 0x6e0]
TEST RAX,RAX
JNZ 0x0015c432
MOV RDI,qword ptr [RBX]
LEA RSI,[RBP + -0x38]
CALL 0x00158085
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0xc8],RAX
MOV RAX,qword ptr [RBX + 0x20]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x3a0]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x398]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x6e8]
TEST RAX,RAX
JZ 0x0015c51a
LAB_0015c432:
MOV R14B,0x1
JMP 0x0015c51d
LAB_0015c43a:
LEA R15,[RBX + 0x4b8]
MOV R12,qword ptr [RAX + 0x398]
MOV RDI,qword ptr [RBX + 0x4f8]
LEA RAX,[RDI + R12*0x1]
CMP RAX,qword ptr [RBX + 0x500]
JBE 0x0015c477
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0019674f
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0015c51d
JMP 0x0015c48e
LAB_0015c477:
TEST R12,R12
JZ 0x0015c48e
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
ADD qword ptr [RBX + 0x4f8],R12
LAB_0015c48e:
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RCX + 0x398]
MOV R14,qword ptr [RCX + 0x3a0]
CMP R14,RAX
JZ 0x0015c4fe
SUB R14D,EAX
LEA RDI,[RBP + -0x38]
MOV ECX,0x8
XOR ESI,ESI
MOV RDX,R14
CALL 0x001297f0
MOV RDI,qword ptr [RBX + 0x4f8]
LEA RAX,[RDI + R14*0x1]
CMP RAX,qword ptr [RBX + 0x500]
JBE 0x0015c4e6
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R14
CALL 0x0019674f
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0015c51d
JMP 0x0015c4fe
LAB_0015c4e6:
TEST R14,R14
JZ 0x0015c4fe
LEA RSI,[RBP + -0x38]
MOV RDX,R14
CALL 0x00129080
ADD qword ptr [RBX + 0x4f8],R14
LAB_0015c4fe:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x3a0]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0xc0]
LAB_0015c51a:
XOR R14D,R14D
LAB_0015c51d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015c53e
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015c53e:
CALL 0x00129270
|
ulong _ma_write_static_record(long *param_1,void *param_2)
{
long lVar1;
size_t __n;
int4 *puVar2;
long lVar3;
int8 uVar4;
uint uVar5;
int7 uVar7;
ulong uVar6;
int iVar8;
long in_FS_OFFSET;
int1 local_40 [8];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = *param_1;
lVar1 = *(long *)(lVar3 + 200);
uVar7 = (int7)((ulong)param_2 >> 8);
if ((lVar1 == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
if ((ulong)(*(long *)(lVar3 + 0x368) - *(long *)(lVar3 + 0x3a0)) < *(ulong *)(param_1[4] + 0x28)
) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
uVar6 = CONCAT71(uVar7,2);
goto LAB_0015c51d;
}
if ((*(byte *)((long)param_1 + 0x61c) & 0x10) == 0) {
*(int4 *)(param_1 + 0xb3) = 1;
lVar3 = (**(code **)(lVar3 + 0x6e8))
(param_1,param_2,*(int8 *)(lVar3 + 0x398),
*(int8 *)(param_1[4] + 0x28),*(int8 *)(lVar3 + 0x7c8));
uVar6 = CONCAT71(uVar7,1);
if (lVar3 != 0) goto LAB_0015c51d;
lVar3 = *param_1;
if (*(long *)(lVar3 + 0x3a0) != *(long *)(lVar3 + 0x398)) {
iVar8 = (int)*(long *)(lVar3 + 0x3a0) - (int)*(long *)(lVar3 + 0x398);
__memset_chk(local_40,0,iVar8,8);
lVar3 = (**(code **)(lVar3 + 0x6e8))
(param_1,local_40,iVar8,
*(long *)(lVar3 + 0x398) + *(long *)(param_1[4] + 0x28),
*(int8 *)(lVar3 + 0x7c8));
if (lVar3 != 0) goto LAB_0015c51d;
}
}
else {
__n = *(size_t *)(lVar3 + 0x398);
if ((ulong)param_1[0xa0] < param_1[0x9f] + __n) {
iVar8 = _my_b_write(param_1 + 0x97,param_2,__n);
uVar6 = CONCAT71(uVar7,1);
if (iVar8 != 0) goto LAB_0015c51d;
}
else if (__n != 0) {
memcpy((void *)param_1[0x9f],param_2,__n);
param_1[0x9f] = param_1[0x9f] + __n;
}
lVar3 = *(long *)(*param_1 + 0x398);
lVar1 = *(long *)(*param_1 + 0x3a0);
if (lVar1 != lVar3) {
uVar5 = (int)lVar1 - (int)lVar3;
uVar6 = (ulong)uVar5;
__memset_chk(local_40,0,uVar6,8);
if ((ulong)param_1[0xa0] < param_1[0x9f] + uVar6) {
iVar8 = _my_b_write(param_1 + 0x97,local_40,uVar6);
uVar6 = CONCAT71((uint7)(uint3)(uVar5 >> 8),1);
if (iVar8 != 0) goto LAB_0015c51d;
}
else if (uVar6 != 0) {
memcpy((void *)param_1[0x9f],local_40,uVar6);
param_1[0x9f] = param_1[0x9f] + uVar6;
}
}
}
*(long *)(param_1[4] + 0x28) = *(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x3a0);
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
LAB_0015c51a:
uVar6 = 0;
}
else {
*(int4 *)(param_1 + 0xb3) = 1;
lVar3 = (**(code **)(lVar3 + 0x6e0))
(param_1,local_40,*(int4 *)(lVar3 + 0x3e0),*(long *)(lVar3 + 200) + 1,4)
;
if (lVar3 == 0) {
uVar4 = _ma_rec_pos(*param_1,local_40);
*(int8 *)(*param_1 + 200) = uVar4;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0);
lVar3 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),lVar1,4);
if (lVar3 == 0) goto LAB_0015c51a;
}
uVar6 = CONCAT71(uVar7,1);
}
LAB_0015c51d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6 & 0xffffffff;
}
|
|
4,114 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O0 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x2766b(%rip), %rax # 0x77da4
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x92e0
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x37646(%rip), %rsi # 0x87da0
callq 0x1d690
movq 0x37602(%rip), %rax # 0x87d68
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5082d
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1d8e0
movb %al, -0x5e(%rbp)
jmp 0x50787
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x50790
jmp 0x507cc
testb $0x1, -0x19(%rbp)
jne 0x507c0
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movb $0x1, -0x19(%rbp)
jmp 0x507c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1d6c0
jmp 0x50998
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x20(%rax)
jmp 0x5081a
testb $0x1, -0x19(%rbp)
jne 0x50818
movq -0x30(%rbp), %rdi
callq 0x92b0
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0x94f0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x505a0
movb %al, -0x5f(%rbp)
jmp 0x50801
movb -0x5f(%rbp), %al
testb $0x1, %al
jne 0x5080a
jmp 0x50818
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movb $0x1, -0x19(%rbp)
jmp 0x5081a
jmp 0x5081c
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x5076a
testb $0x1, -0x19(%rbp)
jne 0x5090a
movl $0x30, %edi
callq 0xb9a0
movq %rax, -0x70(%rbp)
jmp 0x50847
movq -0x70(%rbp), %rdi
callq 0x50e50
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x9a30
jmp 0x50867
movl -0xc(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x20(%rax)
movq 0x374f0(%rip), %rcx # 0x87d68
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rax
movq %rax, 0x374dd(%rip) # 0x87d68
leaq 0x374de(%rip), %rax # 0x87d70
movq %rax, -0x50(%rbp)
movq 0x374d3(%rip), %rax # 0x87d70
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x50908
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
callq 0x505a0
movb %al, -0x71(%rbp)
jmp 0x508c6
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x508cf
jmp 0x508ef
movq -0x48(%rbp), %rcx
addq $0x20, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
jmp 0x508fb
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x508a1
jmp 0x5090a
leaq -0x28(%rbp), %rdi
callq 0x1d6c0
movl $0x1, -0x5c(%rbp)
cmpq $0x0, 0x37456(%rip) # 0x87d78
jne 0x50946
movl -0x5c(%rbp), %ecx
leaq 0x3744a(%rip), %rdi # 0x87d78
leaq 0x2746f(%rip), %rsi # 0x77da4
leaq 0x29f7(%rip), %rdx # 0x53333
callq 0x509b0
movb %al, -0x72(%rbp)
jmp 0x50958
movq 0x3742b(%rip), %rax # 0x87d78
movl (%rax), %eax
cmpl -0x5c(%rbp), %eax
setge %al
movb %al, -0x72(%rbp)
movb -0x72(%rbp), %al
andb $0x1, %al
movb %al, -0x5d(%rbp)
testb $0x1, -0x5d(%rbp)
je 0x5098a
movq -0x8(%rbp), %r8
movl -0xc(%rbp), %r9d
xorl %edi, %edi
leaq 0x29bc(%rip), %rsi # 0x53333
movl $0xc5, %edx
leaq 0x29fa(%rip), %rcx # 0x5337d
movb $0x0, %al
callq 0x4c080
jmp 0x5098c
movl -0x10(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9d40
nopw %cs:(%rax,%rax)
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov eax, [rax]
mov [rbp+var_10], eax
mov rdi, [rbp+var_8]
call _strlen
mov [rbp+var_18], rax
mov [rbp+var_19], 0
lea rdi, [rbp+var_28]
lea rsi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbp+var_30], rax
loc_5076A:
cmp [rbp+var_30], 0
jz loc_5082D
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_5E], al
jmp short $+2
loc_50787:
mov al, [rbp+var_5E]
test al, 1
jnz short loc_50790
jmp short loc_507CC
loc_50790:
test [rbp+var_19], 1
jnz short loc_507C0
mov rax, [rbp+var_30]
mov eax, [rax+20h]
mov [rbp+var_10], eax
mov [rbp+var_19], 1
jmp short loc_507C0
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_50998
loc_507C0:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_30]
mov [rax+20h], ecx
jmp short loc_5081A
loc_507CC:
test [rbp+var_19], 1
jnz short loc_50818
mov rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_68]; this
mov rsi, rax; char *
mov rdx, [rbp+var_8]; unsigned __int64
mov rcx, [rbp+var_18]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_5F], al
jmp short $+2
loc_50801:
mov al, [rbp+var_5F]
test al, 1
jnz short loc_5080A
jmp short loc_50818
loc_5080A:
mov rax, [rbp+var_30]
mov eax, [rax+20h]
mov [rbp+var_10], eax
mov [rbp+var_19], 1
loc_50818:
jmp short $+2
loc_5081A:
jmp short $+2
loc_5081C:
mov rax, [rbp+var_30]
mov rax, [rax+28h]
mov [rbp+var_30], rax
jmp loc_5076A
loc_5082D:
test [rbp+var_19], 1
jnz loc_5090A
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov [rbp+var_70], rax
jmp short $+2
loc_50847:
mov rdi, [rbp+var_70]; this
call _ZN5nglog11VModuleInfoC2Ev; nglog::VModuleInfo::VModuleInfo(void)
mov rax, [rbp+var_70]
mov [rbp+var_48], rax
mov rsi, [rbp+var_8]
mov rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_50867:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_48]
mov [rax+20h], ecx
mov rcx, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov rax, [rbp+var_48]
mov [rax+28h], rcx
mov rax, [rbp+var_48]
mov cs:_ZN5nglogL12vmodule_listE, rax; nglog::vmodule_list
lea rax, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [rbp+var_50], rax
mov rax, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [rbp+var_58], rax
loc_508A1:
cmp [rbp+var_58], 0
jz short loc_50908
mov rdi, [rbp+var_8]; this
mov rsi, [rbp+var_18]; char *
mov rax, [rbp+var_58]
mov rdx, [rax+8]; unsigned __int64
mov rcx, [rax+10h]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_71], al
jmp short $+2
loc_508C6:
mov al, [rbp+var_71]
test al, 1
jnz short loc_508CF
jmp short loc_508EF
loc_508CF:
mov rcx, [rbp+var_48]
add rcx, 20h ; ' '
mov rax, [rbp+var_58]
mov [rax], rcx
mov rax, [rbp+var_58]
mov rcx, [rax+18h]
mov rax, [rbp+var_50]
mov [rax], rcx
jmp short loc_508FB
loc_508EF:
mov rax, [rbp+var_58]
add rax, 18h
mov [rbp+var_50], rax
loc_508FB:
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_58], rax
jmp short loc_508A1
loc_50908:
jmp short $+2
loc_5090A:
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov [rbp+var_5C], 1
cmp cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__, 0; nglog::SetVLOGLevel(char const*,int)::vlocal__
jnz short loc_50946
mov ecx, [rbp+var_5C]
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
mov [rbp+var_72], al
jmp short loc_50958
loc_50946:
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
mov eax, [rax]
cmp eax, [rbp+var_5C]
setnl al
mov [rbp+var_72], al
loc_50958:
mov al, [rbp+var_72]
and al, 1
mov [rbp+var_5D], al
test [rbp+var_5D], 1
jz short loc_5098A
mov r8, [rbp+var_8]
mov r9d, [rbp+var_C]
xor edi, edi
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0C5h
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
mov al, 0
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_5098A:
jmp short $+2
loc_5098C:
mov eax, [rbp+var_10]
add rsp, 80h
pop rbp
retn
loc_50998:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long nglog::SetVLOGLevel(nglog *this, const char *a2)
{
const char *v2; // rax
unsigned long long v3; // r8
unsigned long long v4; // r8
char v6; // [rsp+Eh] [rbp-72h]
nglog::VModuleInfo *v7; // [rsp+10h] [rbp-70h]
nglog::tools *v8; // [rsp+18h] [rbp-68h]
long long j; // [rsp+28h] [rbp-58h]
long long *v10; // [rsp+30h] [rbp-50h]
long long i; // [rsp+50h] [rbp-30h]
std::mutex *v12; // [rsp+58h] [rbp-28h] BYREF
char v13; // [rsp+67h] [rbp-19h]
char *v14; // [rsp+68h] [rbp-18h]
unsigned int v15; // [rsp+70h] [rbp-10h]
int v16; // [rsp+74h] [rbp-Ch]
nglog::tools *v17; // [rsp+78h] [rbp-8h]
v17 = this;
v16 = (int)a2;
v15 = fLI::FLAGS_v;
v14 = (char *)strlen(this);
v13 = 0;
std::lock_guard<std::mutex>::lock_guard(&v12, (std::mutex *)&nglog::vmodule_mutex);
for ( i = nglog::vmodule_list; i; i = *(_QWORD *)(i + 40) )
{
if ( std::operator==<char>(i, (long long)v17) )
{
if ( (v13 & 1) == 0 )
{
v15 = *(_DWORD *)(i + 32);
v13 = 1;
}
*(_DWORD *)(i + 32) = v16;
}
else if ( (v13 & 1) == 0 )
{
v8 = (nglog::tools *)std::string::c_str(i);
v2 = (const char *)std::string::size(i);
if ( (nglog::tools::SafeFNMatch_(v8, v2, (long long)v17, v14, v3) & 1) != 0 )
{
v15 = *(_DWORD *)(i + 32);
v13 = 1;
}
}
}
if ( (v13 & 1) == 0 )
{
v7 = (nglog::VModuleInfo *)operator new(48LL);
nglog::VModuleInfo::VModuleInfo(v7);
std::string::operator=(v7, v17);
*((_DWORD *)v7 + 8) = v16;
*((_QWORD *)v7 + 5) = nglog::vmodule_list;
nglog::vmodule_list = (long long)v7;
v10 = &nglog::cached_site_list;
for ( j = nglog::cached_site_list; j; j = *v10 )
{
if ( (nglog::tools::SafeFNMatch_(v17, v14, *(_QWORD *)(j + 8), *(const char **)(j + 16), v4) & 1) != 0 )
{
*(_QWORD *)j = (char *)v7 + 32;
*v10 = *(_QWORD *)(j + 24);
}
else
{
v10 = (long long *)(j + 24);
}
}
}
std::lock_guard<std::mutex>::~lock_guard(&v12);
if ( nglog::SetVLOGLevel(char const*,int)::vlocal__ )
v6 = *(_DWORD *)nglog::SetVLOGLevel(char const*,int)::vlocal__ >= 1;
else
v6 = nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL);
if ( (v6 & 1) != 0 )
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(unsigned long long *)"Set VLOG level for \"%s\" to %d",
(const char *)v17,
v16);
return v15;
}
| SetVLOGLevel:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LEA RAX,[0x177da4]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001092e0
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x19],0x0
LEA RDI,[RBP + -0x28]
LEA RSI,[0x187da0]
CALL 0x0011d690
MOV RAX,qword ptr [0x00187d68]
MOV qword ptr [RBP + -0x30],RAX
LAB_0015076a:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0015082d
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x8]
LAB_0015077d:
CALL 0x0011d8e0
MOV byte ptr [RBP + -0x5e],AL
JMP 0x00150787
LAB_00150787:
MOV AL,byte ptr [RBP + -0x5e]
TEST AL,0x1
JNZ 0x00150790
JMP 0x001507cc
LAB_00150790:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x001507c0
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x10],EAX
MOV byte ptr [RBP + -0x19],0x1
JMP 0x001507c0
LAB_001507c0:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x20],ECX
JMP 0x0015081a
LAB_001507cc:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x00150818
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001092b0
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001094f0
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x18]
CALL 0x001505a0
MOV byte ptr [RBP + -0x5f],AL
JMP 0x00150801
LAB_00150801:
MOV AL,byte ptr [RBP + -0x5f]
TEST AL,0x1
JNZ 0x0015080a
JMP 0x00150818
LAB_0015080a:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x10],EAX
MOV byte ptr [RBP + -0x19],0x1
LAB_00150818:
JMP 0x0015081a
LAB_0015081a:
JMP 0x0015081c
LAB_0015081c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0015076a
LAB_0015082d:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0015090a
MOV EDI,0x30
CALL 0x0010b9a0
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00150847
LAB_00150847:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x00150e50
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00109a30
JMP 0x00150867
LAB_00150867:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [0x00187d68]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [0x00187d68],RAX
LEA RAX,[0x187d70]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [0x00187d70]
MOV qword ptr [RBP + -0x58],RAX
LAB_001508a1:
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00150908
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
CALL 0x001505a0
LAB_001508c1:
MOV byte ptr [RBP + -0x71],AL
JMP 0x001508c6
LAB_001508c6:
MOV AL,byte ptr [RBP + -0x71]
TEST AL,0x1
JNZ 0x001508cf
JMP 0x001508ef
LAB_001508cf:
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,0x20
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],RCX
JMP 0x001508fb
LAB_001508ef:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x18
MOV qword ptr [RBP + -0x50],RAX
LAB_001508fb:
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001508a1
LAB_00150908:
JMP 0x0015090a
LAB_0015090a:
LEA RDI,[RBP + -0x28]
CALL 0x0011d6c0
MOV dword ptr [RBP + -0x5c],0x1
CMP qword ptr [0x00187d78],0x0
JNZ 0x00150946
MOV ECX,dword ptr [RBP + -0x5c]
LEA RDI,[0x187d78]
LEA RSI,[0x177da4]
LEA RDX,[0x153333]
CALL 0x001509b0
MOV byte ptr [RBP + -0x72],AL
JMP 0x00150958
LAB_00150946:
MOV RAX,qword ptr [0x00187d78]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x5c]
SETGE AL
MOV byte ptr [RBP + -0x72],AL
LAB_00150958:
MOV AL,byte ptr [RBP + -0x72]
AND AL,0x1
MOV byte ptr [RBP + -0x5d],AL
TEST byte ptr [RBP + -0x5d],0x1
JZ 0x0015098a
MOV R8,qword ptr [RBP + -0x8]
MOV R9D,dword ptr [RBP + -0xc]
XOR EDI,EDI
LEA RSI,[0x153333]
MOV EDX,0xc5
LEA RCX,[0x15337d]
MOV AL,0x0
CALL 0x0014c080
LAB_0015098a:
JMP 0x0015098c
LAB_0015098c:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x80
POP RBP
RET
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
byte bVar2;
char *pcVar3;
ulong uVar4;
VModuleInfo *this;
byte local_7a;
int8 *local_60;
int8 *local_58;
VModuleInfo *local_38;
lock_guard<std::mutex> local_30 [15];
byte local_21;
size_t local_20;
int4 local_18;
int local_14;
char *local_10;
local_18 = fLI::FLAGS_v;
local_14 = param_2;
local_10 = param_1;
local_20 = strlen(param_1);
local_21 = 0;
std::lock_guard<std::mutex>::lock_guard(local_30,(mutex *)vmodule_mutex);
for (local_38 = vmodule_list; local_38 != (VModuleInfo *)0x0;
local_38 = *(VModuleInfo **)(local_38 + 0x28)) {
/* try { // try from 0015077d to 001508c0 has its CatchHandler @ 001507a6 */
bVar1 = std::operator==((string *)local_38,local_10);
if (bVar1) {
if ((local_21 & 1) == 0) {
local_18 = *(int4 *)(local_38 + 0x20);
local_21 = 1;
}
*(int *)(local_38 + 0x20) = local_14;
}
else if ((local_21 & 1) == 0) {
pcVar3 = (char *)std::__cxx11::string::c_str();
uVar4 = std::__cxx11::string::size();
bVar2 = tools::SafeFNMatch_(pcVar3,uVar4,local_10,local_20);
if ((bVar2 & 1) != 0) {
local_18 = *(int4 *)(local_38 + 0x20);
local_21 = 1;
}
}
}
if ((local_21 & 1) == 0) {
this = (VModuleInfo *)operator_new(0x30);
VModuleInfo::VModuleInfo(this);
std::__cxx11::string::operator=((string *)this,local_10);
*(int *)(this + 0x20) = local_14;
*(VModuleInfo **)(this + 0x28) = vmodule_list;
local_58 = &cached_site_list;
local_60 = cached_site_list;
vmodule_list = this;
while (local_60 != (int8 *)0x0) {
bVar2 = tools::SafeFNMatch_(local_10,local_20,(char *)local_60[1],local_60[2]);
if ((bVar2 & 1) == 0) {
local_58 = local_60 + 3;
}
else {
*local_60 = this + 0x20;
*local_58 = local_60[3];
}
local_60 = (int8 *)*local_58;
}
}
std::lock_guard<std::mutex>::~lock_guard(local_30);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
local_7a = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
}
else {
local_7a = 0 < *SetVLOGLevel(char_const*,int)::vlocal__;
}
if ((local_7a & 1) != 0) {
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",local_10,local_14);
}
return local_18;
}
|
|
4,115 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O3 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xf813(%rip), %rax # 0x31b8c
movl (%rax), %ebp
callq 0x71f0
movq %rax, %r15
leaq 0x1f7f6(%rip), %rdi # 0x41b80
callq 0x7840
testl %eax, %eax
jne 0x22523
movq 0x1f7aa(%rip), %r12 # 0x41b48
testq %r12, %r12
je 0x22404
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0x7100
testl %eax, %eax
je 0x223dd
testb $0x1, %r13b
jne 0x223f0
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x222b0
testb %al, %al
je 0x223f0
movl 0x20(%r12), %ebp
movb $0x1, %r13b
jmp 0x223f0
testb $0x1, %r13b
jne 0x223eb
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x223a6
testb $0x1, %r13b
jne 0x224ae
movl $0x30, %edi
callq 0x8eb0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x71f0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x78b0
movl %ebx, 0x20(%r12)
movq 0x1f6fa(%rip), %rax # 0x41b48
movq %rax, 0x28(%r12)
movq %r12, 0x1f6ee(%rip) # 0x41b48
movq 0x1f6ef(%rip), %r13 # 0x41b50
testq %r13, %r13
je 0x224ae
movl %ebp, 0x4(%rsp)
addq $0x20, %r12
leaq 0x1f6db(%rip), %rbp # 0x41b50
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x222b0
testb %al, %al
je 0x2249a
movq %r12, (%r13)
movq 0x18(%r13), %r13
movq %r13, (%rbp)
jmp 0x224a5
movq %r13, %rbp
movq 0x18(%r13), %r13
addq $0x18, %rbp
testq %r13, %r13
jne 0x22475
movl 0x4(%rsp), %ebp
leaq 0x1f6cb(%rip), %rdi # 0x41b80
callq 0x73e0
movq 0x1f697(%rip), %rax # 0x41b58
testq %rax, %rax
je 0x224fe
cmpl $0x0, (%rax)
jle 0x224ed
leaq 0x2d57(%rip), %rsi # 0x25229
leaq 0x2d9a(%rip), %rcx # 0x25273
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x20128
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f653(%rip), %rdi # 0x41b58
leaq 0xf680(%rip), %rsi # 0x31b8c
leaq 0x2d16(%rip), %rdx # 0x25229
movl $0x1, %ecx
callq 0x22541
testb %al, %al
jne 0x224cb
jmp 0x224ed
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x1f64c(%rip), %rdi # 0x41b80
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_22523
mov r12, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
test r12, r12
jz short loc_22404
xor r13d, r13d
loc_223A6:
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_223DD
test r13b, 1
jnz short loc_223F0
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_223F0
mov ebp, [r12+20h]
mov r13b, 1
jmp short loc_223F0
loc_223DD:
test r13b, 1
jnz short loc_223EB
mov ebp, [r12+20h]
mov r13b, 1
loc_223EB:
mov [r12+20h], ebx
loc_223F0:
mov r12, [r12+28h]
test r12, r12
jnz short loc_223A6
test r13b, 1
jnz loc_224AE
loc_22404:
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
mov qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
mov r13, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
test r13, r13
jz short loc_224AE
mov [rsp+38h+var_34], ebp
add r12, 20h ; ' '
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_22475:
mov rdx, [r13+8]; unsigned __int64
mov rcx, [r13+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2249A
mov [r13+0], r12
mov r13, [r13+18h]
mov [rbp+0], r13
jmp short loc_224A5
loc_2249A:
mov rbp, r13
mov r13, [r13+18h]
add rbp, 18h
loc_224A5:
test r13, r13
jnz short loc_22475
mov ebp, [rsp+38h+var_34]
loc_224AE:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz short loc_224FE
cmp dword ptr [rax], 0
jle short loc_224ED
loc_224CB:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_224ED:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_224FE:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
test al, al
jnz short loc_224CB
jmp short loc_224ED
loc_22523:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetVLOGLevel(
nglog *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned int v11; // ebp
const char *v12; // r15
int v13; // eax
long long v14; // r12
char v15; // r13
unsigned long long v16; // r8
long long v17; // r12
long long v18; // rax
unsigned long long v19; // r8
long long v20; // r13
long long v21; // r12
long long *v22; // rbp
long long v23; // rbp
__m128 v24; // xmm4
__m128 v25; // xmm5
char v27; // [rsp-4h] [rbp-38h]
unsigned int v28; // [rsp+0h] [rbp-34h]
v27 = v10;
v11 = fLI::FLAGS_v;
v12 = (const char *)strlen(this);
v13 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v13 )
std::__throw_system_error(v13);
v14 = nglog::vmodule_list;
if ( !nglog::vmodule_list )
goto LABEL_13;
v15 = 0;
do
{
if ( !(unsigned int)std::string::compare(v14, this) )
{
if ( (v15 & 1) == 0 )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
*(_DWORD *)(v14 + 32) = (_DWORD)a2;
}
else if ( (v15 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v14, *(const char **)(v14 + 8), (long long)this, v12, v16) )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
v14 = *(_QWORD *)(v14 + 40);
}
while ( v14 );
if ( (v15 & 1) == 0 )
{
LABEL_13:
v17 = operator new(48LL);
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
v18 = strlen(this);
std::string::_M_replace(v17, 0LL, 0LL, this, v18);
*(_DWORD *)(v17 + 32) = (_DWORD)a2;
*(_QWORD *)(v17 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v17;
v20 = nglog::cached_site_list;
if ( nglog::cached_site_list )
{
v28 = v11;
v21 = v17 + 32;
v22 = &nglog::cached_site_list;
do
{
if ( nglog::tools::SafeFNMatch_(this, v12, *(_QWORD *)(v20 + 8), *(const char **)(v20 + 16), v19) )
{
*(_QWORD *)v20 = v21;
v20 = *(_QWORD *)(v20 + 24);
*v22 = v20;
}
else
{
v23 = v20;
v20 = *(_QWORD *)(v20 + 24);
v22 = (long long *)(v23 + 24);
}
}
while ( v20 );
v11 = v28;
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( !nglog::SetVLOGLevel(char const*,int)::vlocal__ )
{
if ( !(unsigned __int8)nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL) )
return v11;
goto LABEL_22;
}
if ( *(int *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0 )
LABEL_22:
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(long long)"Set VLOG level for \"%s\" to %d",
(long long)this,
(unsigned int)a2,
a3,
a4,
a5,
a6,
v24,
v25,
a9,
a10,
v27);
return v11;
}
| SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x131b8c]
MOV EBP,dword ptr [RAX]
CALL 0x001071f0
MOV R15,RAX
LEA RDI,[0x141b80]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00122523
MOV R12,qword ptr [0x00141b48]
TEST R12,R12
JZ 0x00122404
XOR R13D,R13D
LAB_001223a6:
MOV RDI,R12
MOV RSI,R14
CALL 0x00107100
TEST EAX,EAX
JZ 0x001223dd
TEST R13B,0x1
JNZ 0x001223f0
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x001222b0
TEST AL,AL
JZ 0x001223f0
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
JMP 0x001223f0
LAB_001223dd:
TEST R13B,0x1
JNZ 0x001223eb
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_001223eb:
MOV dword ptr [R12 + 0x20],EBX
LAB_001223f0:
MOV R12,qword ptr [R12 + 0x28]
TEST R12,R12
JNZ 0x001223a6
TEST R13B,0x1
JNZ 0x001224ae
LAB_00122404:
MOV EDI,0x30
CALL 0x00108eb0
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x001071f0
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x001078b0
LAB_00122442:
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x00141b48]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x00141b48],R12
MOV R13,qword ptr [0x00141b50]
TEST R13,R13
JZ 0x001224ae
MOV dword ptr [RSP + 0x4],EBP
ADD R12,0x20
LEA RBP,[0x141b50]
LAB_00122475:
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x001222b0
TEST AL,AL
JZ 0x0012249a
MOV qword ptr [R13],R12
MOV R13,qword ptr [R13 + 0x18]
MOV qword ptr [RBP],R13
JMP 0x001224a5
LAB_0012249a:
MOV RBP,R13
MOV R13,qword ptr [R13 + 0x18]
ADD RBP,0x18
LAB_001224a5:
TEST R13,R13
JNZ 0x00122475
MOV EBP,dword ptr [RSP + 0x4]
LAB_001224ae:
LEA RDI,[0x141b80]
CALL 0x001073e0
MOV RAX,qword ptr [0x00141b58]
TEST RAX,RAX
JZ 0x001224fe
CMP dword ptr [RAX],0x0
JLE 0x001224ed
LAB_001224cb:
LEA RSI,[0x125229]
LEA RCX,[0x125273]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x00120128
LAB_001224ed:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001224fe:
LEA RDI,[0x141b58]
LEA RSI,[0x131b8c]
LEA RDX,[0x125229]
MOV ECX,0x1
CALL 0x00122541
TEST AL,AL
JNZ 0x001224cb
JMP 0x001224ed
LAB_00122523:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
char cVar2;
int iVar3;
size_t sVar4;
long *plVar5;
int4 uVar6;
int8 *puVar7;
int8 *puVar8;
int8 *puVar9;
uVar6 = fLI::FLAGS_v;
sVar4 = strlen(param_1);
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (vmodule_list != (long *)0x0) {
bVar1 = false;
plVar5 = vmodule_list;
do {
iVar3 = std::__cxx11::string::compare((char *)plVar5);
if (iVar3 == 0) {
if (!bVar1) {
uVar6 = (int4)plVar5[4];
bVar1 = true;
}
*(int *)(plVar5 + 4) = param_2;
}
else if ((!bVar1) &&
(cVar2 = tools::SafeFNMatch_((char *)*plVar5,plVar5[1],param_1,sVar4), cVar2 != '\0'))
{
uVar6 = (int4)plVar5[4];
bVar1 = true;
}
plVar5 = (long *)plVar5[5];
} while (plVar5 != (long *)0x0);
if (bVar1) goto LAB_001224ae;
}
/* try { // try from 00122404 to 00122441 has its CatchHandler @ 0012252a */
plVar5 = (long *)operator_new(0x30);
*plVar5 = (long)(plVar5 + 2);
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
strlen(param_1);
std::__cxx11::string::_M_replace((ulong)plVar5,0,(char *)0x0,(ulong)param_1);
*(int *)(plVar5 + 4) = param_2;
plVar5[5] = (long)vmodule_list;
vmodule_list = plVar5;
if (cached_site_list != (int8 *)0x0) {
puVar7 = &cached_site_list;
puVar8 = cached_site_list;
do {
cVar2 = tools::SafeFNMatch_(param_1,sVar4,(char *)puVar8[1],puVar8[2]);
if (cVar2 == '\0') {
puVar9 = (int8 *)puVar8[3];
puVar7 = puVar8 + 3;
}
else {
*puVar8 = plVar5 + 4;
puVar9 = (int8 *)puVar8[3];
*puVar7 = puVar9;
}
puVar8 = puVar9;
} while (puVar9 != (int8 *)0x0);
}
LAB_001224ae:
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar2 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
if (cVar2 == '\0') {
return uVar6;
}
}
else if (*SetVLOGLevel(char_const*,int)::vlocal__ < 1) {
return uVar6;
}
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
return uVar6;
}
|
|
4,116 | evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned char>, std::allocator<unsigned char>>&, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/eof.cpp | bool append_data_section(bytes& container, bytes_view aux_data)
{
const auto header = read_valid_eof1_header(container);
// Assert we don't need to trim off the bytes beyond the declared data section first.
assert(container.size() <= header.data_offset + header.data_size);
const auto new_data_size = container.size() - header.data_offset + aux_data.size();
if (new_data_size > std::numeric_limits<uint16_t>::max())
return false;
// Check that appended data size is greater or equal of what header declaration expects.
if (new_data_size < header.data_size)
return false;
// Appending aux_data to the end, assuming data section is always the last one.
container.append(aux_data);
// Update data size
const auto data_size_pos = header.data_size_position();
container[data_size_pos] = static_cast<uint8_t>(new_data_size >> 8);
container[data_size_pos + 1] = static_cast<uint8_t>(new_data_size);
return true;
} | O2 | cpp | evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned char>, std::allocator<unsigned char>>&, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq (%rdi), %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3dbfa
movq 0x8(%r12), %rbx
movl 0x44(%r15), %ecx
movzwl 0x40(%r15), %eax
leal (%rcx,%rax), %edx
cmpq %rdx, %rbx
ja 0x3df61
subq %rcx, %rbx
addq %r14, %rbx
cmpq $0x10000, %rbx # imm = 0x10000
setb %cl
cmpq %rax, %rbx
setae %bpl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x3df45
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x3ff2a
movq 0x68(%rsp), %rax
xorl %ecx, %ecx
subq 0x60(%rsp), %rax
leaq 0x3(%rax), %rax
cmovneq %rax, %rcx
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
addq %rcx, %rax
movq (%r12), %rcx
movb %bh, 0xa(%rcx,%rax)
movq (%r12), %rcx
movb %bl, 0xb(%rcx,%rax)
leaq 0x18(%rsp), %rdi
callq 0x2fdec
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d723(%rip), %rdi # 0x7b68b
leaq 0x3d634(%rip), %rsi # 0x7b5a3
leaq 0x3d74f(%rip), %rcx # 0x7b6c5
movl $0x38a, %edx # imm = 0x38A
callq 0x22110
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2fdec
movq %rbx, %rdi
callq 0x22330
| _ZN6evmone19append_data_sectionERNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEESt17basic_string_viewIhS4_E:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 90h
mov r14, rsi
mov r12, rdi
mov [rsp+0B8h+var_B0], rsi
mov [rsp+0B8h+var_A8], rdx
mov rdx, [rdi]
lea r15, [rsp+0B8h+var_A0]
mov rdi, r15
call _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::read_valid_eof1_header(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rbx, [r12+8]
mov ecx, [r15+44h]
movzx eax, word ptr [r15+40h]
lea edx, [rcx+rax]
cmp rbx, rdx
ja short loc_3DF61
sub rbx, rcx
add rbx, r14
cmp rbx, 10000h
setb cl
cmp rbx, rax
setnb bpl
and bpl, cl
cmp bpl, 1
jnz short loc_3DF45
lea rsi, [rsp+0B8h+var_B0]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE6appendISt17basic_string_viewIhS3_EEENSt9enable_ifIXsr6__and_ISt14is_convertibleIRKT_S8_ESt6__not_ISA_IPSC_PKS5_EESF_ISA_ISD_PKhEEEE5valueERS5_E4typeESD_
mov rax, [rsp+0B8h+var_50]
xor ecx, ecx
sub rax, [rsp+0B8h+var_58]
lea rax, [rax+3]
cmovnz rcx, rax
mov rax, [rsp+0B8h+var_88]
sub rax, [rsp+0B8h+var_90]
add rax, rcx
mov rcx, [r12]
mov [rcx+rax+0Ah], bh
mov rcx, [r12]
mov [rcx+rax+0Bh], bl
loc_3DF45:
lea rdi, [rsp+0B8h+var_A0]; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
mov eax, ebp
add rsp, 90h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3DF61:
lea rdi, aContainerSizeH; "container.size() <= header.data_offset "...
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolEvmoneAppe; "bool evmone::append_data_section(bytes "...
mov edx, 38Ah
call ___assert_fail
mov rbx, rax
lea rdi, [rsp+0B8h+var_A0]; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
mov rdi, rbx
call __Unwind_Resume
| long long evmone::append_data_section(long long *a1, int *a2, long long a3)
{
unsigned int v3; // ebp
unsigned long long v4; // rbx
unsigned long long v5; // rbx
long long v6; // rcx
long long v7; // rax
_QWORD v9[2]; // [rsp+8h] [rbp-B0h] BYREF
_BYTE v10[16]; // [rsp+18h] [rbp-A0h] BYREF
long long v11; // [rsp+28h] [rbp-90h]
long long v12; // [rsp+30h] [rbp-88h]
unsigned __int16 v13; // [rsp+58h] [rbp-60h]
unsigned int v14; // [rsp+5Ch] [rbp-5Ch]
long long v15; // [rsp+60h] [rbp-58h]
long long v16; // [rsp+68h] [rbp-50h]
v9[0] = a2;
v9[1] = a3;
evmone::read_valid_eof1_header((evmone::EOF1Header *)v10, a2, *a1);
v4 = a1[1];
if ( v4 > v14 + v13 )
__assert_fail(
"container.size() <= header.data_offset + header.data_size",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/eof.cpp",
906LL,
"bool evmone::append_data_section(bytes &, bytes_view)");
v5 = (unsigned long long)a2 + v4 - v14;
LOBYTE(v3) = v5 < 0x10000 && v5 >= v13;
if ( (_BYTE)v3 == 1 )
{
std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::append<std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>>(
a1,
v9);
v6 = 0LL;
if ( v16 != v15 )
v6 = v16 - v15 + 3;
v7 = v6 + v12 - v11;
*(_BYTE *)(*a1 + v7 + 10) = BYTE1(v5);
*(_BYTE *)(*a1 + v7 + 11) = v5;
}
evmone::EOF1Header::~EOF1Header((evmone::EOF1Header *)v10);
return v3;
}
| append_data_section:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x90
MOV R14,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RDI]
LEA R15,[RSP + 0x18]
MOV RDI,R15
CALL 0x0013dbfa
MOV RBX,qword ptr [R12 + 0x8]
MOV ECX,dword ptr [R15 + 0x44]
MOVZX EAX,word ptr [R15 + 0x40]
LEA EDX,[RCX + RAX*0x1]
CMP RBX,RDX
JA 0x0013df61
SUB RBX,RCX
ADD RBX,R14
CMP RBX,0x10000
SETC CL
CMP RBX,RAX
SETNC BPL
AND BPL,CL
CMP BPL,0x1
JNZ 0x0013df45
LAB_0013df07:
LEA RSI,[RSP + 0x8]
MOV RDI,R12
CALL 0x0013ff2a
LAB_0013df14:
MOV RAX,qword ptr [RSP + 0x68]
XOR ECX,ECX
SUB RAX,qword ptr [RSP + 0x60]
LEA RAX,[RAX + 0x3]
CMOVNZ RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
SUB RAX,qword ptr [RSP + 0x28]
ADD RAX,RCX
MOV RCX,qword ptr [R12]
MOV byte ptr [RCX + RAX*0x1 + 0xa],BH
MOV RCX,qword ptr [R12]
MOV byte ptr [RCX + RAX*0x1 + 0xb],BL
LAB_0013df45:
LEA RDI,[RSP + 0x18]
CALL 0x0012fdec
MOV EAX,EBP
ADD RSP,0x90
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013df61:
LEA RDI,[0x17b68b]
LEA RSI,[0x17b5a3]
LEA RCX,[0x17b6c5]
MOV EDX,0x38a
CALL 0x00122110
|
/* evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned
char>, std::allocator<unsigned char> >&, std::basic_string_view<unsigned char,
evmc::byte_traits<unsigned char> >) */
ulong __thiscall evmone::append_data_section(evmone *this,long param_1,int8 param_3)
{
long lVar1;
ulong uVar2;
int8 unaff_RBP;
long local_b0;
int8 local_a8;
EOF1Header local_a0 [16];
long local_90;
long local_88;
ushort local_60;
uint local_5c;
long local_58;
long local_50;
local_b0 = param_1;
local_a8 = param_3;
read_valid_eof1_header(local_a0,param_1,*(int8 *)this);
if (*(ulong *)(this + 8) <= (ulong)(local_5c + local_60)) {
uVar2 = (*(ulong *)(this + 8) - (ulong)local_5c) + param_1;
if (local_60 <= uVar2 && uVar2 < 0x10000) {
/* try { // try from 0013df07 to 0013df13 has its CatchHandler @ 0013df80 */
std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>::
append<std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>>
((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)this,(basic_string_view *)&local_b0);
lVar1 = 0;
if (local_50 - local_58 != 0) {
lVar1 = (local_50 - local_58) + 3;
}
lVar1 = (local_88 - local_90) + lVar1;
*(char *)(*(long *)this + 10 + lVar1) = (char)(uVar2 >> 8);
*(char *)(*(long *)this + 0xb + lVar1) = (char)uVar2;
}
EOF1Header::~EOF1Header(local_a0);
return CONCAT71((int7)((ulong)unaff_RBP >> 8),local_60 <= uVar2 && uVar2 < 0x10000) & 0xffffffff
;
}
/* WARNING: Subroutine does not return */
__assert_fail("container.size() <= header.data_offset + header.data_size",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x38a,"bool evmone::append_data_section(bytes &, bytes_view)");
}
|
|
4,117 | my_strntod_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O3 | c | my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rcx, -0x150(%rbp)
movq %rsi, %rcx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
movq %r8, -0x148(%rbp)
movl $0x0, (%r8)
movl $0xff, %r13d
cmpq %r13, %rdx
cmovbq %rdx, %r13
addq %rsi, %r13
leaq -0x140(%rbp), %rsi
movq %rcx, -0x138(%rbp)
movq %rcx, %rdx
movq %r13, %rcx
callq *%rbx
leaq -0x130(%rbp), %r12
testl %eax, %eax
jle 0xc3f45
movq -0x138(%rbp), %r14
movq -0x140(%rbp), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x64, %rdx
ja 0xc3f45
movl %eax, %eax
addq %rax, %r14
movb %cl, (%r12)
incq %r12
movq %r15, %rdi
leaq -0x140(%rbp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq *%rbx
testl %eax, %eax
jg 0xc3f12
movq -0x150(%rbp), %rbx
movq %r12, (%rbx)
leaq -0x130(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq -0x148(%rbp), %rdx
callq 0xd3ac0
movl 0x98(%r15), %eax
movq (%rbx), %rcx
subq %r14, %rcx
imulq %rax, %rcx
movq -0x138(%rbp), %rax
addq %rcx, %rax
movq %rax, (%rbx)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xc3fa7
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov [rbp+var_150], rcx
mov rcx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
mov [rbp+var_148], r8
mov dword ptr [r8], 0
mov r13d, 0FFh
cmp rdx, r13
cmovb r13, rdx
add r13, rsi
lea rsi, [rbp+var_140]
mov [rbp+var_138], rcx
mov rdx, rcx
mov rcx, r13
call rbx
lea r12, [rbp+var_130]
test eax, eax
jle short loc_C3F45
mov r14, [rbp+var_138]
loc_C3F12:
mov rcx, [rbp+var_140]
lea rdx, [rcx-1]
cmp rdx, 64h ; 'd'
ja short loc_C3F45
mov eax, eax
add r14, rax
mov [r12], cl
inc r12
mov rdi, r15
lea rsi, [rbp+var_140]
mov rdx, r14
mov rcx, r13
call rbx
test eax, eax
jg short loc_C3F12
loc_C3F45:
mov rbx, [rbp+var_150]
mov [rbx], r12
lea r14, [rbp+var_130]
mov rdi, r14
mov rsi, rbx
mov rdx, [rbp+var_148]
call my_strtod
mov eax, [r15+98h]
mov rcx, [rbx]
sub rcx, r14
imul rcx, rax
mov rax, [rbp+var_138]
add rax, rcx
mov [rbx], rax
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_C3FA7
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C3FA7:
call ___stack_chk_fail
| unsigned long long my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
long long ( *v5)(long long, long long *, long long, long long); // rbx
long long v6; // r13
long long v7; // r13
int v8; // eax
_BYTE *v9; // r12
long long v10; // r14
long long v14; // [rsp+10h] [rbp-140h] BYREF
long long v15; // [rsp+18h] [rbp-138h]
_BYTE v16[256]; // [rsp+20h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+120h] [rbp-30h]
v17 = __readfsqword(0x28u);
v5 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
v6 = 255LL;
if ( a3 < 0xFF )
v6 = a3;
v7 = a2 + v6;
v15 = a2;
v8 = v5(a1, &v14, a2, v7);
v9 = v16;
if ( v8 > 0 )
{
v10 = v15;
do
{
if ( (unsigned long long)(v14 - 1) > 0x64 )
break;
v10 += (unsigned int)v8;
*v9++ = v14;
v8 = v5(a1, &v14, v10, v7);
}
while ( v8 > 0 );
}
*a4 = v9;
my_strtod(v16, a4, a5);
*a4 = *(unsigned int *)(a1 + 152) * (*a4 - (_QWORD)v16) + v15;
return __readfsqword(0x28u);
}
| my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x150],RCX
MOV RCX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x148],R8
MOV dword ptr [R8],0x0
MOV R13D,0xff
CMP RDX,R13
CMOVC R13,RDX
ADD R13,RSI
LEA RSI,[RBP + -0x140]
MOV qword ptr [RBP + -0x138],RCX
MOV RDX,RCX
MOV RCX,R13
CALL RBX
LEA R12,[RBP + -0x130]
TEST EAX,EAX
JLE 0x001c3f45
MOV R14,qword ptr [RBP + -0x138]
LAB_001c3f12:
MOV RCX,qword ptr [RBP + -0x140]
LEA RDX,[RCX + -0x1]
CMP RDX,0x64
JA 0x001c3f45
MOV EAX,EAX
ADD R14,RAX
MOV byte ptr [R12],CL
INC R12
MOV RDI,R15
LEA RSI,[RBP + -0x140]
MOV RDX,R14
MOV RCX,R13
CALL RBX
TEST EAX,EAX
JG 0x001c3f12
LAB_001c3f45:
MOV RBX,qword ptr [RBP + -0x150]
MOV qword ptr [RBX],R12
LEA R14,[RBP + -0x130]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x148]
CALL 0x001d3ac0
MOV EAX,dword ptr [R15 + 0x98]
MOV RCX,qword ptr [RBX]
SUB RCX,R14
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x138]
ADD RAX,RCX
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001c3fa7
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c3fa7:
CALL 0x00129270
|
void my_strntod_mb2_or_mb4
(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
uint uVar2;
int1 *puVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
long local_148;
long local_140;
int1 local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
uVar4 = 0xff;
if (param_3 < 0xff) {
uVar4 = param_3;
}
local_140 = param_2;
uVar2 = (*pcVar1)(param_1,&local_148,param_2,uVar4 + param_2);
puVar3 = local_138;
lVar5 = local_140;
while ((0 < (int)uVar2 && (local_148 - 1U < 0x65))) {
lVar5 = lVar5 + (ulong)uVar2;
*puVar3 = (char)local_148;
puVar3 = puVar3 + 1;
uVar2 = (*pcVar1)(param_1,&local_148,lVar5,uVar4 + param_2);
}
*param_4 = (long)puVar3;
my_strtod(local_138,param_4,param_5);
*param_4 = local_140 + (*param_4 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,118 | testing::internal::ShouldUseColor(bool) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | bool ShouldUseColor(bool stdout_is_tty) {
std::string c = GTEST_FLAG_GET(color);
const char* const gtest_color = c.c_str();
if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
// On Windows the TERM variable is usually not set, but the
// console there does support colors.
return stdout_is_tty;
#else
// On non-Windows platforms, we rely on the TERM variable.
const char* const term = posix::GetEnv("TERM");
const bool term_supports_color =
term != nullptr && (String::CStringEquals(term, "xterm") ||
String::CStringEquals(term, "xterm-color") ||
String::CStringEquals(term, "xterm-kitty") ||
String::CStringEquals(term, "alacritty") ||
String::CStringEquals(term, "screen") ||
String::CStringEquals(term, "tmux") ||
String::CStringEquals(term, "rxvt-unicode") ||
String::CStringEquals(term, "linux") ||
String::CStringEquals(term, "cygwin") ||
String::EndsWithCaseInsensitive(term, "-256color"));
return stdout_is_tty && term_supports_color;
#endif // GTEST_OS_WINDOWS
}
return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
String::CStringEquals(gtest_color, "1");
// We take "yes", "true", "t", and "1" as meaning "yes". If the
// value is neither one of these nor "auto", we treat it as "no" to
// be conservative.
} | O1 | cpp | testing::internal::ShouldUseColor(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %edi, %ebx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x375ed(%rip), %rsi # 0x59688
movq 0x375ee(%rip), %rdx # 0x59690
addq %rsi, %rdx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x39594
movq (%r14), %r14
testq %r14, %r14
je 0x22161
leaq 0x2057d(%rip), %rsi # 0x42642
movq %r14, %rdi
callq 0x8550
testl %eax, %eax
je 0x22168
testq %r14, %r14
je 0x22161
sete %bl
leaq 0x21094(%rip), %rsi # 0x4317c
movq %r14, %rdi
callq 0x8550
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x222e2
testq %r14, %r14
sete %bl
leaq 0x1e26c(%rip), %rsi # 0x40378
movq %r14, %rdi
callq 0x8550
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x222e2
testq %r14, %r14
sete %bl
leaq 0x2150d(%rip), %rsi # 0x4363d
movq %r14, %rdi
callq 0x8550
testl %eax, %eax
sete %bpl
orb %bpl, %bl
jne 0x222e2
leaq 0x20155(%rip), %rsi # 0x422a3
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
sete %bpl
jmp 0x222e2
xorl %ebp, %ebp
jmp 0x222e2
leaq 0x20fb0(%rip), %rdi # 0x4311f
callq 0x8660
testq %rax, %rax
je 0x222a1
movq %rax, %r14
leaq 0x20f9d(%rip), %rsi # 0x43124
movq %rax, %rdi
callq 0x87a0
movb $0x1, %bpl
testl %eax, %eax
je 0x2229d
leaq 0x20f89(%rip), %rsi # 0x4312a
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f7e(%rip), %rsi # 0x43136
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f73(%rip), %rsi # 0x43142
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f66(%rip), %rsi # 0x4314c
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f56(%rip), %rsi # 0x43153
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f44(%rip), %rsi # 0x43158
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f3e(%rip), %rsi # 0x43165
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x20f31(%rip), %rsi # 0x4316b
movq %r14, %rdi
callq 0x87a0
testl %eax, %eax
je 0x2229d
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x8200
movq %r14, %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x39504
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20ef9(%rip), %rsi # 0x43172
leaq 0x20efb(%rip), %rdx # 0x4317b
leaq 0x40(%rsp), %rdi
callq 0x39504
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x14f84
movl %eax, %ebp
movb $0x1, %al
jmp 0x222a5
xorl %eax, %eax
jmp 0x222a5
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
je 0x222df
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x222c4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x222df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
andb %bl, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x222f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x84e0
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x22326
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x22326
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2233d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7testing8internal14ShouldUseColorEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 60h
mov ebx, edi
lea r15, [rsp+88h+var_58]
mov [r15-10h], r15
mov rsi, cs:_ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color
mov rdx, cs:qword_59690
add rdx, rsi
lea r14, [rsp+88h+var_68]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov r14, [r14]
test r14, r14
jz loc_22161
lea rsi, aAuto; "auto"
mov rdi, r14
call _strcasecmp
test eax, eax
jz loc_22168
test r14, r14
jz loc_22161
setz bl
lea rsi, aYes; "yes"
mov rdi, r14
call _strcasecmp
test eax, eax
setz bpl
or bl, bpl
jnz loc_222E2
test r14, r14
setz bl
lea rsi, aTrue; "true"
mov rdi, r14
call _strcasecmp
test eax, eax
setz bpl
or bl, bpl
jnz loc_222E2
test r14, r14
setz bl
lea rsi, aT+1; "t"
mov rdi, r14
call _strcasecmp
test eax, eax
setz bpl
or bl, bpl
jnz loc_222E2
lea rsi, aFcntlPipeFd1FS+22h; "1"
mov rdi, r14
call _strcmp
test eax, eax
setz bpl
jmp loc_222E2
loc_22161:
xor ebp, ebp
jmp loc_222E2
loc_22168:
lea rdi, aTerm; "TERM"
call _getenv
test rax, rax
jz loc_222A1
mov r14, rax
lea rsi, aXterm; "xterm"
mov rdi, rax
call _strcmp
mov bpl, 1
test eax, eax
jz loc_2229D
lea rsi, aXtermColor; "xterm-color"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_2229D
lea rsi, aXtermKitty; "xterm-kitty"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_2229D
lea rsi, aAlacritty; "alacritty"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_2229D
lea rsi, aScreen; "screen"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_2229D
lea rsi, aTmux; "tmux"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_2229D
lea rsi, aRxvtUnicode; "rxvt-unicode"
mov rdi, r14
call _strcmp
test eax, eax
jz short loc_2229D
lea rsi, aLinux; "linux"
mov rdi, r14
call _strcmp
test eax, eax
jz short loc_2229D
lea rsi, aCygwin; "cygwin"
mov rdi, r14
call _strcmp
test eax, eax
jz short loc_2229D
lea r12, [rsp+88h+var_78]
mov [r12-10h], r12
mov rdi, r14
call _strlen
mov rdx, r14
add rdx, rax
mov rdi, rsp
mov rsi, r14
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 rax, [rsp+88h+var_38]
mov [rax-10h], rax
lea rsi, a256color; "-256color"
lea rdx, a256color+9; ""
lea rdi, [rsp+88h+var_48]
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)
mov rdi, rsp
lea rsi, [rsp+88h+var_48]
call _ZN7testing8internal6String23EndsWithCaseInsensitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; testing::internal::String::EndsWithCaseInsensitive(std::string const&,std::string const&)
mov ebp, eax
mov al, 1
jmp short loc_222A5
loc_2229D:
xor eax, eax
jmp short loc_222A5
loc_222A1:
xor eax, eax
xor ebp, ebp
loc_222A5:
test al, al
jz short loc_222DF
lea rax, [rsp+88h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_222C4
mov rsi, [rsp+88h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_222C4:
lea rax, [rsp+88h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_222DF
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_222DF:
and bpl, bl
loc_222E2:
mov rdi, [rsp+88h+var_68]; void *
cmp rdi, r15
jz short loc_222F9
mov rsi, [rsp+88h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_222F9:
mov eax, ebp
add rsp, 60h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_22326
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_22326
mov rbx, rax
loc_22326:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_2233D
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2233D:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::ShouldUseColor(testing::internal *this)
{
unsigned int v1; // ebp
void *v2; // r14
long long v3; // rax
long long v4; // r14
long long v5; // rax
unsigned int v6; // eax
char v7; // al
__int128 v9; // [rsp+0h] [rbp-88h] BYREF
_QWORD v10[2]; // [rsp+10h] [rbp-78h] BYREF
void *v11; // [rsp+20h] [rbp-68h] BYREF
_QWORD v12[2]; // [rsp+30h] [rbp-58h] BYREF
void *v13[2]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v14[7]; // [rsp+50h] [rbp-38h] BYREF
v11 = v12;
std::string::_M_construct<char *>(
&v11,
testing::FLAGS_gtest_color[abi:cxx11],
testing::FLAGS_gtest_color[abi:cxx11] + qword_59690);
v2 = v11;
if ( !v11 )
goto LABEL_8;
if ( (unsigned int)strcasecmp(v11) )
{
if ( v2 )
{
LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0;
if ( !((unsigned __int8)v1 | (v2 == 0LL)) )
{
LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0;
if ( !((unsigned __int8)v1 | (v2 == 0LL)) )
{
LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0;
if ( !((unsigned __int8)v1 | (v2 == 0LL)) )
LOBYTE(v1) = (unsigned int)strcmp(v2, "1") == 0;
}
}
goto LABEL_28;
}
LABEL_8:
v1 = 0;
goto LABEL_28;
}
v3 = getenv("TERM");
if ( v3 )
{
v4 = v3;
LOBYTE(v1) = 1;
if ( !(unsigned int)strcmp(v3, "xterm")
|| !(unsigned int)strcmp(v4, "xterm-color")
|| !(unsigned int)strcmp(v4, "xterm-kitty")
|| !(unsigned int)strcmp(v4, "alacritty")
|| !(unsigned int)strcmp(v4, "screen")
|| !(unsigned int)strcmp(v4, "tmux")
|| !(unsigned int)strcmp(v4, "rxvt-unicode")
|| !(unsigned int)strcmp(v4, "linux")
|| !(unsigned int)strcmp(v4, "cygwin") )
{
v7 = 0;
}
else
{
*(_QWORD *)&v9 = v10;
v5 = strlen(v4);
std::string::_M_construct<char const*>(&v9, v4, v5 + v4);
v13[0] = v14;
std::string::_M_construct<char const*>(v13, "-256color", "");
LOBYTE(v6) = testing::internal::String::EndsWithCaseInsensitive(&v9, (long long)v13);
v1 = v6;
v7 = 1;
}
}
else
{
v7 = 0;
v1 = 0;
}
if ( v7 )
{
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
if ( (_QWORD *)v9 != v10 )
operator delete((void *)v9, v10[0] + 1LL);
}
LOBYTE(v1) = (unsigned __int8)this & v1;
LABEL_28:
if ( v11 != v12 )
operator delete(v11, v12[0] + 1LL);
return v1;
}
| ShouldUseColor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV EBX,EDI
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [0x00159688]
MOV RDX,qword ptr [0x00159690]
ADD RDX,RSI
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x00139594
MOV R14,qword ptr [R14]
TEST R14,R14
JZ 0x00122161
LEA RSI,[0x142642]
MOV RDI,R14
CALL 0x00108550
TEST EAX,EAX
JZ 0x00122168
TEST R14,R14
JZ 0x00122161
SETZ BL
LEA RSI,[0x14317c]
MOV RDI,R14
CALL 0x00108550
TEST EAX,EAX
SETZ BPL
OR BL,BPL
JNZ 0x001222e2
TEST R14,R14
SETZ BL
LEA RSI,[0x140378]
MOV RDI,R14
CALL 0x00108550
TEST EAX,EAX
SETZ BPL
OR BL,BPL
JNZ 0x001222e2
TEST R14,R14
SETZ BL
LEA RSI,[0x14363d]
MOV RDI,R14
CALL 0x00108550
TEST EAX,EAX
SETZ BPL
OR BL,BPL
JNZ 0x001222e2
LEA RSI,[0x1422a3]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
SETZ BPL
JMP 0x001222e2
LAB_00122161:
XOR EBP,EBP
JMP 0x001222e2
LAB_00122168:
LEA RDI,[0x14311f]
CALL 0x00108660
TEST RAX,RAX
JZ 0x001222a1
MOV R14,RAX
LEA RSI,[0x143124]
MOV RDI,RAX
CALL 0x001087a0
MOV BPL,0x1
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x14312a]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x143136]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x143142]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x14314c]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x143153]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x143158]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x143165]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA RSI,[0x14316b]
MOV RDI,R14
CALL 0x001087a0
TEST EAX,EAX
JZ 0x0012229d
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R14
CALL 0x00108200
MOV RDX,R14
ADD RDX,RAX
LAB_0012225e:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00139504
LEA RAX,[RSP + 0x50]
MOV qword ptr [RAX + -0x10],RAX
LAB_00122272:
LEA RSI,[0x143172]
LEA RDX,[0x14317b]
LEA RDI,[RSP + 0x40]
CALL 0x00139504
LAB_0012228a:
MOV RDI,RSP
LEA RSI,[RSP + 0x40]
CALL 0x00114f84
MOV EBP,EAX
MOV AL,0x1
JMP 0x001222a5
LAB_0012229d:
XOR EAX,EAX
JMP 0x001222a5
LAB_001222a1:
XOR EAX,EAX
XOR EBP,EBP
LAB_001222a5:
TEST AL,AL
JZ 0x001222df
LEA RAX,[RSP + 0x50]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001222c4
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001084e0
LAB_001222c4:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001222df
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_001222df:
AND BPL,BL
LAB_001222e2:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x001222f9
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001084e0
LAB_001222f9:
MOV EAX,EBP
ADD RSP,0x60
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::ShouldUseColor(bool) */
ulong testing::internal::ShouldUseColor(bool param_1)
{
bool bVar1;
long *__s1;
int iVar2;
uint uVar3;
char *__s1_00;
size_t sVar4;
int8 unaff_RBP;
int7 uVar6;
ulong uVar5;
long *local_88 [2];
long local_78 [2];
long *local_68 [2];
long local_58 [2];
long *local_48 [2];
long local_38 [2];
local_68[0] = local_58;
std::__cxx11::string::_M_construct<char*>
(local_68,FLAGS_gtest_color_abi_cxx11_,DAT_00159690 + FLAGS_gtest_color_abi_cxx11_);
__s1 = local_68[0];
if (local_68[0] != (long *)0x0) {
iVar2 = strcasecmp((char *)local_68[0],"auto");
uVar6 = (int7)((ulong)unaff_RBP >> 8);
if (iVar2 == 0) {
__s1_00 = getenv("TERM");
if (__s1_00 == (char *)0x0) {
bVar1 = false;
uVar5 = 0;
}
else {
iVar2 = strcmp(__s1_00,"xterm");
uVar5 = CONCAT71(uVar6,1);
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"xterm-color");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"xterm-kitty");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"alacritty");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"screen");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"tmux");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"rxvt-unicode");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"linux");
if (iVar2 != 0) {
iVar2 = strcmp(__s1_00,"cygwin");
if (iVar2 != 0) {
local_88[0] = local_78;
sVar4 = strlen(__s1_00);
/* try { // try from 0012225e to 00122268 has its CatchHandler @ 00122323 */
std::__cxx11::string::_M_construct<char_const*>
(local_88,__s1_00,__s1_00 + sVar4);
local_48[0] = local_38;
/* try { // try from 00122272 to 00122289 has its CatchHandler @ 00122308 */
std::__cxx11::string::_M_construct<char_const*>(local_48,"-256color","");
uVar3 = String::EndsWithCaseInsensitive
((string *)local_88,(string *)local_48);
uVar5 = (ulong)uVar3;
bVar1 = true;
goto LAB_001222a5;
}
}
}
}
}
}
}
}
}
bVar1 = false;
}
LAB_001222a5:
if (bVar1) {
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
}
uVar5 = CONCAT71((int7)(uVar5 >> 8),(byte)uVar5 & param_1);
goto LAB_001222e2;
}
if (__s1 != (long *)0x0) {
iVar2 = strcasecmp((char *)__s1,"yes");
uVar5 = CONCAT71(uVar6,iVar2 == 0);
if (__s1 != (long *)0x0 && iVar2 != 0) {
iVar2 = strcasecmp((char *)__s1,"true");
uVar5 = CONCAT71(uVar6,iVar2 == 0);
if (__s1 != (long *)0x0 && iVar2 != 0) {
iVar2 = strcasecmp((char *)__s1,"t");
uVar5 = CONCAT71(uVar6,iVar2 == 0);
if (__s1 != (long *)0x0 && iVar2 != 0) {
iVar2 = strcmp((char *)__s1,"1");
uVar5 = CONCAT71(uVar6,iVar2 == 0);
}
}
}
goto LAB_001222e2;
}
}
uVar5 = 0;
LAB_001222e2:
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
return uVar5 & 0xffffffff;
}
|
|
4,119 | testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&) | seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest.cc | void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
const std::string counts =
FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
ColoredPrintf(GTestColor::kGreen, "[----------] ");
printf("%s from %s", counts.c_str(), test_case.name());
if (test_case.type_param() == nullptr) {
printf("\n");
} else {
printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param());
}
fflush(stdout);
} | O2 | cpp | testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&):
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x1832e
leaq 0x15a4c(%rip), %rdx # 0x324f5
leaq 0x15e58(%rip), %rcx # 0x32908
movq %rsp, %rdi
movl %eax, %esi
callq 0x1cb41
leaq 0x16a9b(%rip), %rsi # 0x3355c
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x1c4b9
movq (%rsp), %rsi
movq 0x8(%rbx), %rdx
leaq 0x16a90(%rip), %rdi # 0x3356a
xorl %eax, %eax
callq 0x9070
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x1cb09
movq (%rax), %rdx
testq %rdx, %rdx
je 0x1cb09
leaq 0x16a7c(%rip), %rdi # 0x33575
leaq 0x14602(%rip), %rsi # 0x31102
xorl %eax, %eax
callq 0x9070
jmp 0x1cb11
pushq $0xa
popq %rdi
callq 0x97f0
movq 0x30478(%rip), %rax # 0x4cf90
movq (%rax), %rdi
callq 0x9620
movq %rsp, %rdi
callq 0x9af8
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9af8
movq %rbx, %rdi
callq 0x99d0
| _ZN7testing8internal27PrettyUnitTestResultPrinter15OnTestCaseStartERKNS_9TestSuiteE:
push rbx
sub rsp, 20h
mov rbx, rsi
mov rdi, rsi; this
call _ZNK7testing9TestSuite17test_to_run_countEv; testing::TestSuite::test_to_run_count(void)
lea rdx, aDeathtestPasse+36h; "test"
lea rcx, aAlsoRunDisable+12h; "tests"
mov rdi, rsp
mov esi, eax
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
lea rsi, asc_3355C; "[----------] "
push 2
pop rdi
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rsi, [rsp+28h+var_28]
mov rdx, [rbx+8]
lea rdi, aSFromS; "%s from %s"
xor eax, eax
call _printf
mov rax, [rbx+28h]
test rax, rax
jz short loc_1CB09
mov rdx, [rax]
test rdx, rdx
jz short loc_1CB09
lea rdi, aWhereSS; ", where %s = %s\n"
lea rsi, _ZN7testing8internalL15kTypeParamLabelE; "TypeParam"
xor eax, eax
call _printf
jmp short loc_1CB11
loc_1CB09:
push 0Ah
pop rdi
call _putchar
loc_1CB11:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 20h
pop rbx
retn
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| void testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(
testing::internal::PrettyUnitTestResultPrinter *this,
const char ***a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
int v10; // eax
int v11; // r8d
int v12; // r9d
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
const char **v19; // rax
const char *v20; // [rsp+0h] [rbp-28h] BYREF
int v21; // [rsp+8h] [rbp-20h]
int v22; // [rsp+10h] [rbp-18h]
int v23; // [rsp+18h] [rbp-10h]
char v24; // [rsp+20h] [rbp-8h]
v10 = testing::TestSuite::test_to_run_count((testing::TestSuite *)a2);
testing::FormatCountableNoun[abi:cxx11](
(unsigned int)&v20,
v10,
(unsigned int)"test",
(unsigned int)"tests",
v11,
v12,
(char)v20,
v21,
v22,
v23,
v24);
testing::internal::ColoredPrintf(
2,
(long long)"[----------] ",
v13,
v14,
v15,
v16,
a3,
a4,
a5,
a6,
v17,
v18,
a9,
a10,
(char)v20);
printf("%s from %s", v20, (const char *)a2[1]);
v19 = a2[5];
if ( v19 && *v19 )
printf(", where %s = %s\n", "TypeParam", *v19);
else
putchar(10LL);
fflush(stdout);
std::string::~string(&v20);
}
| OnTestCaseStart:
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV RDI,RSI
CALL 0x0011832e
LEA RDX,[0x1324f5]
LEA RCX,[0x132908]
MOV RDI,RSP
MOV ESI,EAX
CALL 0x0011cb41
LAB_0011caba:
LEA RSI,[0x13355c]
PUSH 0x2
POP RDI
XOR EAX,EAX
CALL 0x0011c4b9
LAB_0011cacb:
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RBX + 0x8]
LEA RDI,[0x13356a]
XOR EAX,EAX
CALL 0x00109070
MOV RAX,qword ptr [RBX + 0x28]
TEST RAX,RAX
JZ 0x0011cb09
MOV RDX,qword ptr [RAX]
TEST RDX,RDX
JZ 0x0011cb09
LEA RDI,[0x133575]
LEA RSI,[0x131102]
XOR EAX,EAX
CALL 0x00109070
JMP 0x0011cb11
LAB_0011cb09:
PUSH 0xa
POP RDI
CALL 0x001097f0
LAB_0011cb11:
MOV RAX,qword ptr [0x0014cf90]
MOV RDI,qword ptr [RAX]
CALL 0x00109620
MOV RDI,RSP
CALL 0x00109af8
ADD RSP,0x20
POP RBX
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&) */
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart
(PrettyUnitTestResultPrinter *this,TestSuite *param_1)
{
uint uVar1;
int8 local_28 [4];
uVar1 = TestSuite::test_to_run_count(param_1);
FormatCountableNoun_abi_cxx11_((int)local_28,(char *)(ulong)uVar1,"test");
/* try { // try from 0011caba to 0011caca has its CatchHandler @ 0011cb2e */
ColoredPrintf(2,"[----------] ");
printf("%s from %s",local_28[0],*(int8 *)(param_1 + 8));
if ((*(long **)(param_1 + 0x28) == (long *)0x0) || (**(long **)(param_1 + 0x28) == 0)) {
putchar(10);
}
else {
printf(", where %s = %s\n","TypeParam");
}
fflush(*(FILE **)PTR_stdout_0014cf90);
std::__cxx11::string::~string((string *)local_28);
return;
}
|
|
4,120 | destroyContextGLX | untodesu[P]riteg/build_O0/_deps/glfw-src/src/glx_context.c | static void destroyContextGLX(_GLFWwindow* window)
{
if (window->context.glx.window)
{
glXDestroyWindow(_glfw.x11.display, window->context.glx.window);
window->context.glx.window = None;
}
if (window->context.glx.handle)
{
glXDestroyContext(_glfw.x11.display, window->context.glx.handle);
window->context.glx.handle = NULL;
}
} | O0 | c | destroyContextGLX:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x278(%rax)
je 0x38262
leaq 0xa8a37(%rip), %rax # 0xe0c68
movq 0x207e8(%rax), %rax
leaq 0xa8a29(%rip), %rcx # 0xe0c68
movq 0x1fec0(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x278(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x278(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x270(%rax)
je 0x382a8
leaq 0xa89f1(%rip), %rax # 0xe0c68
movq 0x207b0(%rax), %rax
leaq 0xa89e3(%rip), %rcx # 0xe0c68
movq 0x1fec0(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x270(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x270(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
| destroyContextGLX:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+278h], 0
jz short loc_38262
lea rax, _glfw
mov rax, qword ptr ds:loc_207E8[rax]
lea rcx, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rcx]
mov rcx, [rbp+var_8]
mov rsi, [rcx+278h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+278h], 0
loc_38262:
mov rax, [rbp+var_8]
cmp qword ptr [rax+270h], 0
jz short loc_382A8
lea rax, _glfw
mov rax, [rax+207B0h]
lea rcx, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rcx]
mov rcx, [rbp+var_8]
mov rsi, [rcx+270h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+270h], 0
loc_382A8:
add rsp, 10h
pop rbp
retn
| long long destroyContextGLX(long long a1)
{
long long result; // rax
if ( *(_QWORD *)(a1 + 632) )
{
(*(void ( **)(_QWORD, _QWORD))((char *)&loc_207E8 + (_QWORD)glfw))(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
*(_QWORD *)(a1 + 632));
*(_QWORD *)(a1 + 632) = 0LL;
}
result = a1;
if ( *(_QWORD *)(a1 + 624) )
{
(*(void ( **)(_QWORD, _QWORD))&glfw[33260])(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
*(_QWORD *)(a1 + 624));
result = a1;
*(_QWORD *)(a1 + 624) = 0LL;
}
return result;
}
| destroyContextGLX:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x278],0x0
JZ 0x00138262
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x207e8]
LEA RCX,[0x1e0c68]
MOV RDI,qword ptr [RCX + 0x1fec0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x278]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x278],0x0
LAB_00138262:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x270],0x0
JZ 0x001382a8
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x207b0]
LEA RCX,[0x1e0c68]
MOV RDI,qword ptr [RCX + 0x1fec0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x270]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x270],0x0
LAB_001382a8:
ADD RSP,0x10
POP RBP
RET
|
void destroyContextGLX(long param_1)
{
if (*(long *)(param_1 + 0x278) != 0) {
(*DAT_00201450)(DAT_00200b28,*(int8 *)(param_1 + 0x278));
*(int8 *)(param_1 + 0x278) = 0;
}
if (*(long *)(param_1 + 0x270) != 0) {
(*DAT_00201418)(DAT_00200b28,*(int8 *)(param_1 + 0x270));
*(int8 *)(param_1 + 0x270) = 0;
}
return;
}
|
|
4,121 | glfwGetRequiredInstanceExtensions | untodesu[P]riteg/build_O2/_deps/glfw-src/src/vulkan.c | GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count)
{
assert(count != NULL);
*count = 0;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))
return NULL;
if (!_glfw.vk.extensions[0])
return NULL;
*count = 2;
return (const char**) _glfw.vk.extensions;
} | O2 | c | glfwGetRequiredInstanceExtensions:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x18c2f
movq %rdi, %r14
andl $0x0, (%rdi)
leaq 0x82a65(%rip), %r15 # 0x9b648
cmpl $0x0, (%r15)
je 0x18c16
pushq $0x2
popq %rdi
callq 0x18874
xorl %ebx, %ebx
testl %eax, %eax
je 0x18c26
cmpq $0x0, 0x1fe80(%r15)
je 0x18c26
movl $0x2, (%r14)
movl $0x1fe80, %ebx # imm = 0x1FE80
addq 0x813ac(%rip), %rbx # 0x99fc0
jmp 0x18c26
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x1547b
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x59541(%rip), %rdi # 0x72177
leaq 0x5a23d(%rip), %rsi # 0x72e7a
leaq 0x5a294(%rip), %rcx # 0x72ed8
movl $0xe3, %edx
callq 0xb510
| glfwGetRequiredInstanceExtensions:
push r15
push r14
push rbx
test rdi, rdi
jz short loc_18C2F
mov r14, rdi
and dword ptr [rdi], 0
lea r15, _glfw
cmp dword ptr [r15], 0
jz short loc_18C16
push 2
pop rdi
call _glfwInitVulkan
xor ebx, ebx
test eax, eax
jz short loc_18C26
cmp qword ptr ds:loc_1FE80[r15], 0
jz short loc_18C26
mov dword ptr [r14], 2
mov ebx, offset loc_1FE80
add rbx, cs:_glfw_ptr
jmp short loc_18C26
loc_18C16:
xor ebx, ebx
mov edi, 10001h
xor esi, esi
xor eax, eax
call _glfwInputError
loc_18C26:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_18C2F:
lea rdi, aCountNull; "count != NULL"
lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstCharGlfwg_3; "const char **glfwGetRequiredInstanceExt"...
mov edx, 0E3h
call ___assert_fail
| char * glfwGetRequiredInstanceExtensions(_DWORD *a1)
{
long long v1; // rbx
if ( !a1 )
__assert_fail(
"count != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O2/_deps/glfw-src/src/vulkan.c",
227LL,
"const char **glfwGetRequiredInstanceExtensions(uint32_t *)");
*a1 = 0;
if ( glfw[0] )
{
v1 = 0LL;
if ( (unsigned int)glfwInitVulkan(2) && *(_QWORD *)((char *)&loc_1FE80 + (_QWORD)glfw) )
{
*a1 = 2;
return (char *)glfw + (_QWORD)&loc_1FE80;
}
}
else
{
v1 = 0LL;
glfwInputError(0x10001u, 0LL);
}
return (char *)v1;
}
| glfwGetRequiredInstanceExtensions:
PUSH R15
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x00118c2f
MOV R14,RDI
AND dword ptr [RDI],0x0
LEA R15,[0x19b648]
CMP dword ptr [R15],0x0
JZ 0x00118c16
PUSH 0x2
POP RDI
CALL 0x00118874
XOR EBX,EBX
TEST EAX,EAX
JZ 0x00118c26
CMP qword ptr [R15 + 0x1fe80],0x0
JZ 0x00118c26
MOV dword ptr [R14],0x2
MOV EBX,0x1fe80
ADD RBX,qword ptr [0x00199fc0]
JMP 0x00118c26
LAB_00118c16:
XOR EBX,EBX
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
CALL 0x0011547b
LAB_00118c26:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_00118c2f:
LEA RDI,[0x172177]
LEA RSI,[0x172e7a]
LEA RCX,[0x172ed8]
MOV EDX,0xe3
CALL 0x0010b510
|
int * glfwGetRequiredInstanceExtensions(int4 *param_1)
{
int iVar1;
int *puVar2;
if (param_1 != (int4 *)0x0) {
*param_1 = 0;
if (_glfw == 0) {
puVar2 = (int *)0x0;
_glfwInputError(0x10001,0);
}
else {
iVar1 = _glfwInitVulkan(2);
puVar2 = (int *)0x0;
if ((iVar1 != 0) && (DAT_001bb4c8 != 0)) {
*param_1 = 2;
puVar2 = PTR__glfw_00199fc0 + 0x1fe80;
}
}
return puVar2;
}
/* WARNING: Subroutine does not return */
__assert_fail("count != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O2/_deps/glfw-src/src/vulkan.c"
,0xe3,"const char **glfwGetRequiredInstanceExtensions(uint32_t *)");
}
|
|
4,122 | mi_ck_real_write_btree | eloqsql/storage/myisam/mi_write.c | int _mi_ck_real_write_btree(MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *key, uint key_length, my_off_t *root, uint comp_flag)
{
int error;
DBUG_ENTER("_mi_ck_real_write_btree");
/* key_length parameter is used only if comp_flag is SEARCH_FIND */
if (*root == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length,
*root, (uchar *) 0, (uchar*) 0,
(my_off_t) 0, 1)) > 0)
error=_mi_enlarge_root(info,keyinfo,key,root);
DBUG_RETURN(error);
} | O0 | c | mi_ck_real_write_btree:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
je 0xc5824
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movq -0x28(%rbp), %rax
movq (%rax), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
callq 0xc5850
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jle 0xc583c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xc5f30
movl %eax, -0x30(%rbp)
jmp 0xc583e
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _mi_ck_real_write_btree:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_C5824
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov rax, [rbp+var_28]
mov r9, [rax]
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
mov [rsp+60h+var_50], 0
mov [rsp+60h+var_48], 1
call w_search_0
mov [rbp+var_30], eax
cmp eax, 0
jle short loc_C583C
loc_C5824:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
call _mi_enlarge_root
mov [rbp+var_30], eax
loc_C583C:
jmp short $+2
loc_C583E:
mov eax, [rbp+var_30]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 60h
pop rbp
retn
| long long mi_ck_real_write_btree(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int a6)
{
int v7; // [rsp+30h] [rbp-30h]
if ( *a5 == -1LL )
return (unsigned int)mi_enlarge_root(a1, a2, a3, a5);
v7 = w_search_0(a1, a2, a6, a3, a4, *a5, 0LL, 0LL, 0LL, 1);
if ( v7 > 0 )
return (unsigned int)mi_enlarge_root(a1, a2, a3, a5);
return (unsigned int)v7;
}
| _mi_ck_real_write_btree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],-0x1
JZ 0x001c5824
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RAX]
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],0x1
CALL 0x001c5850
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JLE 0x001c583c
LAB_001c5824:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x001c5f30
MOV dword ptr [RBP + -0x30],EAX
LAB_001c583c:
JMP 0x001c583e
LAB_001c583e:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x60
POP RBP
RET
|
int _mi_ck_real_write_btree
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
long *param_5,int4 param_6)
{
int iVar1;
if ((*param_5 != -1) &&
(iVar1 = w_search(param_1,param_2,param_6,param_3,param_4,*param_5,0,0,0,1), iVar1 < 1)) {
return iVar1;
}
iVar1 = _mi_enlarge_root(param_1,param_2,param_3,param_5);
return iVar1;
}
|
|
4,123 | OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(OpenSubdiv::v3_6_0::Far::PatchDescriptor, OpenSubdiv::v3_6_0::Far::PatchDescriptor, int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp | void
PatchTable::allocateFVarPatchChannelValues(
PatchDescriptor regDesc, PatchDescriptor irregDesc,
int numPatches, int channel) {
FVarPatchChannel & c = getFVarPatchChannel(channel);
c.regDesc = regDesc;
c.irregDesc = irregDesc;
c.stride = std::max(regDesc.GetNumControlVertices(),
irregDesc.GetNumControlVertices());
c.patchValues.resize(numPatches * c.stride);
c.patchParam.resize(numPatches);
} | O0 | cpp | OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(OpenSubdiv::v3_6_0::Far::PatchDescriptor, OpenSubdiv::v3_6_0::Far::PatchDescriptor, int, int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0xd5680
movq -0x40(%rbp), %rsi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x4, %rdi
callq 0xcb2e0
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0xcb2e0
movq -0x40(%rbp), %rdi
callq 0xd7430
movq -0x38(%rbp), %rdi
movw %ax, -0x2a(%rbp)
callq 0xd7430
movw %ax, -0x2c(%rbp)
leaq -0x2a(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xd6990
movswl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rcx
imull 0xc(%rcx), %eax
movslq %eax, %rsi
callq 0xc9aa0
movq -0x28(%rbp), %rdi
addq $0x28, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xca220
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Far10PatchTable30allocateFVarPatchChannelValuesENS1_15PatchDescriptorES3_ii:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_40], rsi
mov [rbp+var_38], rdx
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 rdi, [rbp+var_8]; this
mov esi, [rbp+var_20]; int
call __ZN10OpenSubdiv6v3_6_03Far10PatchTable19getFVarPatchChannelEi; OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)
mov rsi, [rbp+var_40]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
add rdi, 4
call __ZN10OpenSubdiv6v3_6_03Far15PatchDescriptoraSERKS2_; OpenSubdiv::v3_6_0::Far::PatchDescriptor::operator=(OpenSubdiv::v3_6_0::Far::PatchDescriptor const&)
mov rsi, [rbp+var_38]
mov rdi, [rbp+var_28]
add rdi, 8
call __ZN10OpenSubdiv6v3_6_03Far15PatchDescriptoraSERKS2_; OpenSubdiv::v3_6_0::Far::PatchDescriptor::operator=(OpenSubdiv::v3_6_0::Far::PatchDescriptor const&)
mov rdi, [rbp+var_40]; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
mov rdi, [rbp+var_38]; this
mov [rbp+var_2A], ax
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
mov [rbp+var_2C], ax
lea rdi, [rbp+var_2A]
lea rsi, [rbp+var_2C]
call __ZSt3maxIsERKT_S2_S2_; std::max<short>(short const&,short const&)
movsx ecx, word ptr [rax]
mov rax, [rbp+var_28]
mov [rax+0Ch], ecx
mov rdi, [rbp+var_28]
add rdi, 10h
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_28]
imul eax, [rcx+0Ch]
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rdi, [rbp+var_28]
add rdi, 28h ; '('
movsxd rsi, [rbp+var_1C]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchParamESaIS3_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize(ulong)
add rsp, 40h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(
OpenSubdiv::v3_6_0::Far::PatchTable *a1,
OpenSubdiv::v3_6_0::Far::PatchDescriptor *a2,
OpenSubdiv::v3_6_0::Far::PatchDescriptor *a3,
int a4,
int a5)
{
__int16 *v5; // rax
__int16 v8; // [rsp+14h] [rbp-2Ch] BYREF
__int16 NumControlVertices; // [rsp+16h] [rbp-2Ah] BYREF
long long FVarPatchChannel; // [rsp+18h] [rbp-28h]
int v11; // [rsp+20h] [rbp-20h]
int v12; // [rsp+24h] [rbp-1Ch]
OpenSubdiv::v3_6_0::Far::PatchDescriptor *v13; // [rsp+28h] [rbp-18h]
OpenSubdiv::v3_6_0::Far::PatchDescriptor *v14; // [rsp+30h] [rbp-10h]
OpenSubdiv::v3_6_0::Far::PatchTable *v15; // [rsp+38h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
FVarPatchChannel = OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(a1, a5);
OpenSubdiv::v3_6_0::Far::PatchDescriptor::operator=(FVarPatchChannel + 4);
OpenSubdiv::v3_6_0::Far::PatchDescriptor::operator=(FVarPatchChannel + 8);
NumControlVertices = OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(a2);
v8 = OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(a3);
v5 = (__int16 *)std::max<short>(&NumControlVertices, &v8);
*(_DWORD *)(FVarPatchChannel + 12) = *v5;
std::vector<int>::resize(FVarPatchChannel + 16, *(_DWORD *)(FVarPatchChannel + 12) * v12);
return std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize(FVarPatchChannel + 40, v12);
}
| |||
4,124 | OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(OpenSubdiv::v3_6_0::Far::PatchDescriptor, OpenSubdiv::v3_6_0::Far::PatchDescriptor, int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp | void
PatchTable::allocateFVarPatchChannelValues(
PatchDescriptor regDesc, PatchDescriptor irregDesc,
int numPatches, int channel) {
FVarPatchChannel & c = getFVarPatchChannel(channel);
c.regDesc = regDesc;
c.irregDesc = irregDesc;
c.stride = std::max(regDesc.GetNumControlVertices(),
irregDesc.GetNumControlVertices());
c.patchValues.resize(numPatches * c.stride);
c.patchParam.resize(numPatches);
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(OpenSubdiv::v3_6_0::Far::PatchDescriptor, OpenSubdiv::v3_6_0::Far::PatchDescriptor, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movl %r8d, %esi
callq 0x55240
movq %rax, %r14
movl (%r12), %eax
movl %eax, 0x4(%r14)
movl (%r15), %eax
movl %eax, 0x8(%r14)
movq %r12, %rdi
callq 0x55c10
movl %eax, %ebp
movq %r15, %rdi
callq 0x55c10
cmpw %ax, %bp
cmovgl %ebp, %eax
cwtl
movl %eax, 0xc(%r14)
leaq 0x10(%r14), %rdi
imull %ebx, %eax
movslq %eax, %rsi
callq 0x514b0
addq $0x28, %r14
movslq %ebx, %rsi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x51720
nop
| _ZN10OpenSubdiv6v3_6_03Far10PatchTable30allocateFVarPatchChannelValuesENS1_15PatchDescriptorES3_ii:
push rbp
push r15
push r14
push r12
push rbx
mov ebx, ecx
mov r15, rdx
mov r12, rsi
mov esi, r8d; int
call __ZN10OpenSubdiv6v3_6_03Far10PatchTable19getFVarPatchChannelEi; OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)
mov r14, rax
mov eax, [r12]
mov [r14+4], eax
mov eax, [r15]
mov [r14+8], eax
mov rdi, r12; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
mov ebp, eax
mov rdi, r15; this
call __ZNK10OpenSubdiv6v3_6_03Far15PatchDescriptor21GetNumControlVerticesEv; OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(void)
cmp bp, ax
cmovg eax, ebp
cwde
mov [r14+0Ch], eax
lea rdi, [r14+10h]
imul eax, ebx
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
add r14, 28h ; '('
movsxd rsi, ebx
mov rdi, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchParamESaIS3_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize(ulong)
| long long OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(
OpenSubdiv::v3_6_0::Far::PatchTable *a1,
OpenSubdiv::v3_6_0::Far::PatchDescriptor *a2,
OpenSubdiv::v3_6_0::Far::PatchDescriptor *a3,
int a4,
int a5)
{
_DWORD *FVarPatchChannel; // r14
__int16 NumControlVertices; // bp
__int16 v9; // ax
FVarPatchChannel = (_DWORD *)OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(a1, a5);
FVarPatchChannel[1] = *(_DWORD *)a2;
FVarPatchChannel[2] = *(_DWORD *)a3;
NumControlVertices = OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(a2);
v9 = OpenSubdiv::v3_6_0::Far::PatchDescriptor::GetNumControlVertices(a3);
if ( NumControlVertices > v9 )
v9 = NumControlVertices;
FVarPatchChannel[3] = v9;
std::vector<int>::resize(FVarPatchChannel + 4, a4 * v9);
return std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize(FVarPatchChannel + 10, a4);
}
| allocateFVarPatchChannelValues:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBX,ECX
MOV R15,RDX
MOV R12,RSI
MOV ESI,R8D
CALL 0x00155240
MOV R14,RAX
MOV EAX,dword ptr [R12]
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R15]
MOV dword ptr [R14 + 0x8],EAX
MOV RDI,R12
CALL 0x00155c10
MOV EBP,EAX
MOV RDI,R15
CALL 0x00155c10
CMP BP,AX
CMOVG EAX,EBP
CWDE
MOV dword ptr [R14 + 0xc],EAX
LEA RDI,[R14 + 0x10]
IMUL EAX,EBX
MOVSXD RSI,EAX
CALL 0x001514b0
ADD R14,0x28
MOVSXD RSI,EBX
MOV RDI,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00151720
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues(OpenSubdiv::v3_6_0::Far::PatchDescriptor,
OpenSubdiv::v3_6_0::Far::PatchDescriptor, int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchTable::allocateFVarPatchChannelValues
(PatchTable *this,PatchDescriptor *param_2,PatchDescriptor *param_3,int param_4,
int param_5)
{
short sVar1;
short sVar2;
long lVar3;
lVar3 = getFVarPatchChannel(this,param_5);
*(int4 *)(lVar3 + 4) = *(int4 *)param_2;
*(int4 *)(lVar3 + 8) = *(int4 *)param_3;
sVar1 = PatchDescriptor::GetNumControlVertices(param_2);
sVar2 = PatchDescriptor::GetNumControlVertices(param_3);
if (sVar2 < sVar1) {
sVar2 = sVar1;
}
*(int *)(lVar3 + 0xc) = (int)sVar2;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(lVar3 + 0x10),(long)(sVar2 * param_4));
std::
vector<OpenSubdiv::v3_6_0::Far::PatchParam,std::allocator<OpenSubdiv::v3_6_0::Far::PatchParam>>::
resize((vector<OpenSubdiv::v3_6_0::Far::PatchParam,std::allocator<OpenSubdiv::v3_6_0::Far::PatchParam>>
*)(lVar3 + 0x28),(long)param_4);
return;
}
|
|
4,125 | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) | ng-log[P]ng-log/src/logging.cc | LogMessage::LogMessage(const char* file, int line,
const internal::CheckOpString& result)
: allocated_(nullptr) {
Init(file, line, NGLOG_FATAL, &LogMessage::SendToLog);
stream() << "Check failed: " << (*result.str_) << " ";
} | O2 | cpp | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
andq $0x0, (%rdi)
addq $0x10, %rdi
callq 0xe70c
leaq 0x4c(%rip), %r8 # 0xbabc
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0xb56e
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%r15), %rdi
leaq 0x14e2f(%rip), %rsi # 0x208c2
callq 0x8590
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x84d0
leaq 0x16514(%rip), %rsi # 0x21fbe
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8590
| _ZN5nglog10LogMessageC2EPKciRKNS_8internal13CheckOpStringE:
push rbp; Alternative name is 'nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)'
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov ebp, edx
mov r14, rsi
mov r15, rdi
and qword ptr [rdi], 0
add rdi, 10h; this
call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
lea r8, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
push 3
pop rcx
mov rdi, r15
mov rsi, r14
mov edx, ebp
xor r9d, r9d
call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov edi, 7538h
add rdi, [r15+8]
lea rsi, aCheckFailed; "Check failed: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [rbx]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, asc_21FBB+3; " "
mov rdi, rax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
| long long nglog::LogMessage::LogMessage(_QWORD *a1, nglog::tools *a2, int a3, _QWORD *a4)
{
long long v6; // rax
long long v7; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init((long long)a1, a2, a3, 3u, (long long)nglog::LogMessage::SendToLog, 0LL);
v6 = std::operator<<<std::char_traits<char>>(a1[1] + 30008LL, "Check failed: ");
v7 = std::operator<<<char>(v6, *a4);
return std::operator<<<std::char_traits<char>>(v7, " ");
}
| LogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
AND qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x0010e70c
LEA R8,[0x10babc]
PUSH 0x3
POP RCX
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
XOR R9D,R9D
CALL 0x0010b56e
MOV EDI,0x7538
ADD RDI,qword ptr [R15 + 0x8]
LEA RSI,[0x1208c2]
CALL 0x00108590
MOV RSI,qword ptr [RBX]
MOV RDI,RAX
CALL 0x001084d0
LEA RSI,[0x121fbe]
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00108590
|
/* nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) */
void __thiscall
nglog::LogMessage::LogMessage(LogMessage *this,char *param_1,int param_2,CheckOpString *param_3)
{
ostream *poVar1;
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
Init(this,param_1,param_2,3,SendToLog,0);
poVar1 = std::operator<<((ostream *)(*(long *)(this + 8) + 0x7538),"Check failed: ");
poVar1 = std::operator<<(poVar1,*(string **)param_3);
std::operator<<(poVar1," ");
return;
}
|
|
4,126 | keys_free | eloqsql/storage/myisam/mi_write.c | static int keys_free(void* key_arg, TREE_FREE mode, void *param_arg)
{
/*
Probably I can use info->lastkey here, but I'm not sure,
and to be safe I'd better use local lastkey.
*/
bulk_insert_param *param= (bulk_insert_param*)param_arg;
uchar lastkey[HA_MAX_KEY_BUFF], *key= (uchar*)key_arg;
uint keylen;
MI_KEYDEF *keyinfo;
switch (mode) {
case free_init:
if (param->info->s->concurrent_insert)
{
mysql_rwlock_wrlock(¶m->info->s->key_root_lock[param->keynr]);
param->info->s->keyinfo[param->keynr].version++;
}
return 0;
case free_free:
keyinfo=param->info->s->keyinfo+param->keynr;
keylen=_mi_keylength(keyinfo, key);
memcpy(lastkey, key, keylen);
_mi_ck_write_btree(param->info, param->keynr, lastkey,
keylen - param->info->s->rec_reflength);
return 0;
case free_end:
if (param->info->s->concurrent_insert)
mysql_rwlock_unlock(¶m->info->s->key_root_lock[param->keynr]);
return 0;
}
return 0;
} | O3 | c | keys_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4c0, %rsp # imm = 0x4C0
movq %rdx, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
cmpl $0x2, %esi
je 0x8a89b
cmpl $0x1, %esi
je 0x8a843
testl %esi, %esi
jne 0x8a8d4
movq (%rbx), %rax
movq (%rax), %rax
cmpb $0x0, 0x384(%rax)
je 0x8a8d4
movq 0x4c8(%rax), %rax
movl 0x8(%rbx), %ecx
imulq $0x98, %rcx, %rcx
leaq (%rax,%rcx), %rdi
cmpq $0x0, 0x90(%rax,%rcx)
jne 0x8a907
callq 0xa5371
movq (%rbx), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl 0x8(%rbx), %ecx
imulq $0x70, %rcx, %rcx
incl 0x1c(%rax,%rcx)
jmp 0x8a8d4
movq %rdi, %r14
movq (%rbx), %rax
movq (%rax), %rax
movl 0x8(%rbx), %ecx
imulq $0x70, %rcx, %rdi
addq 0x218(%rax), %rdi
movq %r14, %rsi
callq 0x86b58
movl %eax, %r15d
movl %eax, %edx
leaq -0x4e0(%rbp), %r12
movl $0x4b8, %ecx # imm = 0x4B8
movq %r12, %rdi
movq %r14, %rsi
callq 0x29420
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movq (%rdi), %rax
subl 0x338(%rax), %r15d
movq %r12, %rdx
movl %r15d, %ecx
callq 0x891eb
jmp 0x8a8d4
movq (%rbx), %rax
movq (%rax), %rax
cmpb $0x0, 0x384(%rax)
je 0x8a8d4
movq 0x4c8(%rax), %rax
movl 0x8(%rbx), %ecx
imulq $0x98, %rcx, %rcx
leaq (%rax,%rcx), %rbx
movq 0x90(%rax,%rcx), %rdi
testq %rdi, %rdi
jne 0x8a8f5
movq %rbx, %rdi
callq 0xa5412
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x8a91d
xorl %eax, %eax
addq $0x4c0, %rsp # imm = 0x4C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2fd7c4(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x8a8cc
leaq 0x5276c(%rip), %rsi # 0xdd07a
movl $0x3b4, %edx # imm = 0x3B4
callq 0x2ed7b
jmp 0x8a826
callq 0x29270
| keys_free_0:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 4C0h
mov rbx, rdx
mov rax, fs:28h
mov [rbp+var_28], rax
cmp esi, 2
jz loc_8A89B
cmp esi, 1
jz short loc_8A843
test esi, esi
jnz loc_8A8D4
mov rax, [rbx]
mov rax, [rax]
cmp byte ptr [rax+384h], 0
jz loc_8A8D4
mov rax, [rax+4C8h]
mov ecx, [rbx+8]
imul rcx, 98h
lea rdi, [rax+rcx]
cmp qword ptr [rax+rcx+90h], 0
jnz loc_8A907
call my_rw_wrlock
loc_8A826:
mov rax, [rbx]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbx+8]
imul rcx, 70h ; 'p'
inc dword ptr [rax+rcx+1Ch]
jmp loc_8A8D4
loc_8A843:
mov r14, rdi
mov rax, [rbx]
mov rax, [rax]
mov ecx, [rbx+8]
imul rdi, rcx, 70h ; 'p'
add rdi, [rax+218h]
mov rsi, r14
call _mi_keylength
mov r15d, eax
mov edx, eax
lea r12, [rbp+var_4E0]
mov ecx, 4B8h
mov rdi, r12
mov rsi, r14
call ___memcpy_chk
mov rdi, [rbx]
mov esi, [rbx+8]
mov rax, [rdi]
sub r15d, [rax+338h]
mov rdx, r12
mov ecx, r15d
call _mi_ck_write_btree
jmp short loc_8A8D4
loc_8A89B:
mov rax, [rbx]
mov rax, [rax]
cmp byte ptr [rax+384h], 0
jz short loc_8A8D4
mov rax, [rax+4C8h]
mov ecx, [rbx+8]
imul rcx, 98h
lea rbx, [rax+rcx]
mov rdi, [rax+rcx+90h]
test rdi, rdi
jnz short loc_8A8F5
loc_8A8CC:
mov rdi, rbx
call my_rw_unlock
loc_8A8D4:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_8A91D
xor eax, eax
add rsp, 4C0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8A8F5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_8A8CC
loc_8A907:
lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3B4h
call psi_rwlock_wrlock
jmp loc_8A826
loc_8A91D:
call ___stack_chk_fail
| long long keys_free_0(unsigned __int8 *a1, int a2, unsigned int *a3)
{
long long v4; // rax
long long v5; // rdi
unsigned int v6; // r15d
long long v7; // rax
long long v8; // rbx
unsigned __int8 v10[1208]; // [rsp+0h] [rbp-4E0h] BYREF
unsigned long long v11; // [rsp+4B8h] [rbp-28h]
v11 = __readfsqword(0x28u);
switch ( a2 )
{
case 2:
v7 = **(_QWORD **)a3;
if ( *(_BYTE *)(v7 + 900) )
{
v8 = *(_QWORD *)(v7 + 1224) + 152LL * a3[2];
if ( *(_QWORD *)(v8 + 144) )
PSI_server[45]();
my_rw_unlock(v8);
}
break;
case 1:
v6 = mi_keylength(*(_QWORD *)(**(_QWORD **)a3 + 536LL) + 112LL * a3[2], a1);
__memcpy_chk(v10, a1, v6, 1208LL);
mi_ck_write_btree(*(long long **)a3, a3[2], v10, v6 - *(_DWORD *)(**(_QWORD **)a3 + 824LL));
break;
case 0:
v4 = **(_QWORD **)a3;
if ( *(_BYTE *)(v4 + 900) )
{
v5 = *(_QWORD *)(v4 + 1224) + 152LL * a3[2];
if ( *(_QWORD *)(v5 + 144) )
psi_rwlock_wrlock(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c", 0x3B4u);
else
my_rw_wrlock(v5);
++*(_DWORD *)(*(_QWORD *)(**(_QWORD **)a3 + 536LL) + 112LL * a3[2] + 28);
}
break;
}
return 0LL;
}
| keys_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x4c0
MOV RBX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CMP ESI,0x2
JZ 0x0018a89b
CMP ESI,0x1
JZ 0x0018a843
TEST ESI,ESI
JNZ 0x0018a8d4
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x0018a8d4
MOV RAX,qword ptr [RAX + 0x4c8]
MOV ECX,dword ptr [RBX + 0x8]
IMUL RCX,RCX,0x98
LEA RDI,[RAX + RCX*0x1]
CMP qword ptr [RAX + RCX*0x1 + 0x90],0x0
JNZ 0x0018a907
CALL 0x001a5371
LAB_0018a826:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBX + 0x8]
IMUL RCX,RCX,0x70
INC dword ptr [RAX + RCX*0x1 + 0x1c]
JMP 0x0018a8d4
LAB_0018a843:
MOV R14,RDI
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBX + 0x8]
IMUL RDI,RCX,0x70
ADD RDI,qword ptr [RAX + 0x218]
MOV RSI,R14
CALL 0x00186b58
MOV R15D,EAX
MOV EDX,EAX
LEA R12,[RBP + -0x4e0]
MOV ECX,0x4b8
MOV RDI,R12
MOV RSI,R14
CALL 0x00129420
MOV RDI,qword ptr [RBX]
MOV ESI,dword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDI]
SUB R15D,dword ptr [RAX + 0x338]
MOV RDX,R12
MOV ECX,R15D
CALL 0x001891eb
JMP 0x0018a8d4
LAB_0018a89b:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x0018a8d4
MOV RAX,qword ptr [RAX + 0x4c8]
MOV ECX,dword ptr [RBX + 0x8]
IMUL RCX,RCX,0x98
LEA RBX,[RAX + RCX*0x1]
MOV RDI,qword ptr [RAX + RCX*0x1 + 0x90]
TEST RDI,RDI
JNZ 0x0018a8f5
LAB_0018a8cc:
MOV RDI,RBX
CALL 0x001a5412
LAB_0018a8d4:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0018a91d
XOR EAX,EAX
ADD RSP,0x4c0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018a8f5:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0018a8cc
LAB_0018a907:
LEA RSI,[0x1dd07a]
MOV EDX,0x3b4
CALL 0x0012ed7b
JMP 0x0018a826
LAB_0018a91d:
CALL 0x00129270
|
int8 keys_free(int8 param_1,int param_2,int8 *param_3)
{
int *piVar1;
uint uVar2;
long lVar3;
int iVar4;
long in_FS_OFFSET;
int1 local_4e8 [1208];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 == 2) {
if (*(char *)(*(long *)*param_3 + 900) != '\0') {
lVar3 = *(long *)(*(long *)*param_3 + 0x4c8);
uVar2 = *(uint *)(param_3 + 1);
if (*(long *)(lVar3 + 0x90 + (ulong)uVar2 * 0x98) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar3 + (ulong)uVar2 * 0x98);
}
}
else if (param_2 == 1) {
iVar4 = _mi_keylength((ulong)*(uint *)(param_3 + 1) * 0x70 +
*(long *)(*(long *)*param_3 + 0x218),param_1);
__memcpy_chk(local_4e8,param_1,iVar4,0x4b8);
_mi_ck_write_btree((long *)*param_3,*(int4 *)(param_3 + 1),local_4e8,
iVar4 - *(int *)(*(long *)*param_3 + 0x338));
}
else if ((param_2 == 0) && (*(char *)(*(long *)*param_3 + 900) != '\0')) {
lVar3 = *(long *)(*(long *)*param_3 + 0x4c8);
if (*(long *)(lVar3 + 0x90 + (ulong)*(uint *)(param_3 + 1) * 0x98) == 0) {
my_rw_wrlock();
}
else {
psi_rwlock_wrlock(lVar3 + (ulong)*(uint *)(param_3 + 1) * 0x98,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c",0x3b4);
}
piVar1 = (int *)(*(long *)(*(long *)*param_3 + 0x218) + 0x1c +
(ulong)*(uint *)(param_3 + 1) * 0x70);
*piVar1 = *piVar1 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,127 | check_rules | eloqsql/strings/ctype-uca.c | static int
check_rules(MY_CHARSET_LOADER *loader,
const MY_COLL_RULES *rules,
const MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
const MY_COLL_RULE *r, *rlast;
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (r->curr[0] > dst->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Shift character out of range: u%04X", (uint) r->curr[0]);
return TRUE;
}
else if (r->base[0] > src->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Reset character out of range: u%04X", (uint) r->base[0]);
return TRUE;
}
}
return FALSE;
} | O0 | c | check_rules:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xa13b8
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xa1368
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x30ecf(%rip), %rdx # 0xd2227
movb $0x0, %al
callq 0xc7b80
movl $0x1, -0x4(%rbp)
jmp 0xa13bf
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xa13a1
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x30eba(%rip), %rdx # 0xd224b
movb $0x0, %al
callq 0xc7b80
movl $0x1, -0x4(%rbp)
jmp 0xa13bf
jmp 0xa13a3
jmp 0xa13a5
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0xa131f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| check_rules:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_A131F:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_A13B8
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_A1368
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov ecx, eax
mov esi, 80h
lea rdx, aShiftCharacter; "Shift character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_A13BF
loc_A1368:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jbe short loc_A13A1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov esi, 80h
lea rdx, aResetCharacter; "Reset character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_A13BF
loc_A13A1:
jmp short $+2
loc_A13A3:
jmp short $+2
loc_A13A5:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_A131F
loc_A13B8:
mov [rbp+var_4], 0
loc_A13BF:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long check_rules(int a1, long long a2, _QWORD *a3, _QWORD *a4, int a5, int a6)
{
_QWORD *i; // [rsp+10h] [rbp-30h]
for ( i = *(_QWORD **)(a2 + 32); (unsigned long long)i < 160LL * *(_QWORD *)(a2 + 16) + *(_QWORD *)(a2 + 32); i += 20 )
{
if ( i[10] > *a3 )
{
my_snprintf(a1, 128, (unsigned int)"Shift character out of range: u%04X", i[10], a5, a6);
return 1;
}
if ( *i > *a4 )
{
my_snprintf(a1, 128, (unsigned int)"Reset character out of range: u%04X", *i, a5, a6);
return 1;
}
}
return 0;
}
| check_rules:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001a131f:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001a13b8
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x001a1368
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x1d2227]
MOV AL,0x0
CALL 0x001c7b80
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a13bf
LAB_001a1368:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JBE 0x001a13a1
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x1d224b]
MOV AL,0x0
CALL 0x001c7b80
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a13bf
LAB_001a13a1:
JMP 0x001a13a3
LAB_001a13a3:
JMP 0x001a13a5
LAB_001a13a5:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001a131f
LAB_001a13b8:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a13bf:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 check_rules(int8 param_1,long param_2,ulong *param_3,ulong *param_4)
{
ulong *local_38;
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if ((ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0) <= local_38) {
return 0;
}
if (*param_3 < local_38[10]) break;
if (*param_4 < *local_38) {
my_snprintf(param_1,0x80,"Reset character out of range: u%04X",*local_38 & 0xffffffff);
return 1;
}
local_38 = local_38 + 0x14;
}
my_snprintf(param_1,0x80,"Shift character out of range: u%04X",local_38[10] & 0xffffffff);
return 1;
}
|
|
4,128 | translog_check_sector_protection | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_check_sector_protection(uchar *page, TRANSLOG_FILE *file)
{
uint i, offset;
uchar *table= page + page_overhead[page[TRANSLOG_PAGE_FLAGS]] -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
uint8 current= table[0];
DBUG_ENTER("translog_check_sector_protection");
for (i= 1, offset= DISK_DRIVE_SECTOR_SIZE;
i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
i++, offset+= DISK_DRIVE_SECTOR_SIZE)
{
/*
TODO: add chunk counting for "suspecting" sectors (difference is
more than 1-2), if difference more then present chunks then it is
the problem.
*/
uint8 test= page[offset];
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x%x",
i, offset, (ulong) current,
(uint) uint2korr(page + offset), (uint) table[i],
(uint) table[i + 1]));
/*
3 is minimal possible record length. So we can have "distance"
between 2 sectors value more then DISK_DRIVE_SECTOR_SIZE / 3
only if it is old value, i.e. the sector was not written.
*/
if (((test < current) &&
((uint)(0xFFL - current + test) > DISK_DRIVE_SECTOR_SIZE / 3)) ||
((test >= current) &&
((uint)(test - current) > DISK_DRIVE_SECTOR_SIZE / 3)))
{
if (translog_recover_page_up_to_sector(page, offset))
DBUG_RETURN(1);
file->was_recovered= 1;
DBUG_RETURN(0);
}
/* Restore value on the page */
page[offset]= table[i];
current= test;
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x",
i, offset, (ulong) current,
(uint) page[offset], (uint) table[i]));
}
DBUG_RETURN(0);
} | O0 | c | translog_check_sector_protection:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
movl %ecx, %edx
leaq 0xc2160b(%rip), %rcx # 0xc7a2b0
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x200, -0x20(%rbp) # imm = 0x200
cmpl $0x10, -0x1c(%rbp)
jae 0x58d88
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x2a(%rbp)
jmp 0x58ce3
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jge 0x58d0b
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
movl $0xff, %eax
subq %rcx, %rax
movzbl -0x2a(%rbp), %ecx
addq %rcx, %rax
cmpl $0xaa, %eax
ja 0x58d28
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jl 0x58d51
movzbl -0x2a(%rbp), %eax
movzbl -0x29(%rbp), %ecx
subl %ecx, %eax
cmpl $0xaa, %eax
jbe 0x58d51
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
movzwl %ax, %esi
callq 0x58da0
cmpb $0x0, %al
je 0x58d43
jmp 0x58d3d
movb $0x1, -0x1(%rbp)
jmp 0x58d8e
movq -0x18(%rbp), %rax
movb $0x1, 0x50(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x58d8e
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movb %dl, (%rax,%rcx)
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
jmp 0x58d6d
jmp 0x58d6f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x200, %eax # imm = 0x200
movl %eax, -0x20(%rbp)
jmp 0x58cca
jmp 0x58d8a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_check_sector_protection:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+6]
mov edx, ecx
lea rcx, page_overhead
mov ecx, [rcx+rdx*4]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_29], al
mov [rbp+var_1C], 1
mov [rbp+var_20], 200h
loc_58CCA:
cmp [rbp+var_1C], 10h
jnb loc_58D88
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov al, [rax+rcx]
mov [rbp+var_2A], al
jmp short $+2
loc_58CE3:
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jge short loc_58D0B
movzx eax, [rbp+var_29]
mov ecx, eax
mov eax, 0FFh
sub rax, rcx
movzx ecx, [rbp+var_2A]
add rax, rcx
cmp eax, 0AAh
ja short loc_58D28
loc_58D0B:
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jl short loc_58D51
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_29]
sub eax, ecx
cmp eax, 0AAh
jbe short loc_58D51
loc_58D28:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_20]
movzx esi, ax
call translog_recover_page_up_to_sector
cmp al, 0
jz short loc_58D43
jmp short $+2
loc_58D3D:
mov [rbp+var_1], 1
jmp short loc_58D8E
loc_58D43:
mov rax, [rbp+var_18]
mov byte ptr [rax+50h], 1
mov [rbp+var_1], 0
jmp short loc_58D8E
loc_58D51:
mov rax, [rbp+var_28]
mov ecx, [rbp+var_1C]
mov dl, [rax+rcx]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov [rax+rcx], dl
mov al, [rbp+var_2A]
mov [rbp+var_29], al
jmp short $+2
loc_58D6D:
jmp short $+2
loc_58D6F:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
mov eax, [rbp+var_20]
add eax, 200h
mov [rbp+var_20], eax
jmp loc_58CCA
loc_58D88:
jmp short $+2
loc_58D8A:
mov [rbp+var_1], 0
loc_58D8E:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char translog_check_sector_protection(long long a1, long long a2)
{
unsigned __int8 v3; // [rsp+6h] [rbp-2Ah]
unsigned __int8 v4; // [rsp+7h] [rbp-29h]
unsigned __int8 *v5; // [rsp+8h] [rbp-28h]
unsigned int i; // [rsp+10h] [rbp-20h]
unsigned int v7; // [rsp+14h] [rbp-1Ch]
v5 = (unsigned __int8 *)((unsigned int)page_overhead[*(unsigned __int8 *)(a1 + 6)] + a1 - 16);
v4 = *v5;
v7 = 1;
for ( i = 512; ; i += 512 )
{
if ( v7 >= 0x10 )
return 0;
v3 = *(_BYTE *)(a1 + i);
if ( v3 < (int)v4 && v3 + 255 - (unsigned int)v4 > 0xAA )
break;
if ( v3 >= (int)v4 && v3 - (unsigned int)v4 > 0xAA )
break;
*(_BYTE *)(a1 + i) = v5[v7];
v4 = v3;
++v7;
}
if ( (unsigned __int8)translog_recover_page_up_to_sector(a1, (unsigned __int16)i) )
return 1;
*(_BYTE *)(a2 + 80) = 1;
return 0;
}
| translog_check_sector_protection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x6]
MOV EDX,ECX
LEA RCX,[0xd7a2b0]
MOV ECX,dword ptr [RCX + RDX*0x4]
ADD RAX,RCX
ADD RAX,-0x10
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x29],AL
MOV dword ptr [RBP + -0x1c],0x1
MOV dword ptr [RBP + -0x20],0x200
LAB_00158cca:
CMP dword ptr [RBP + -0x1c],0x10
JNC 0x00158d88
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x2a],AL
JMP 0x00158ce3
LAB_00158ce3:
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JGE 0x00158d0b
MOVZX EAX,byte ptr [RBP + -0x29]
MOV ECX,EAX
MOV EAX,0xff
SUB RAX,RCX
MOVZX ECX,byte ptr [RBP + -0x2a]
ADD RAX,RCX
CMP EAX,0xaa
JA 0x00158d28
LAB_00158d0b:
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JL 0x00158d51
MOVZX EAX,byte ptr [RBP + -0x2a]
MOVZX ECX,byte ptr [RBP + -0x29]
SUB EAX,ECX
CMP EAX,0xaa
JBE 0x00158d51
LAB_00158d28:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x20]
MOVZX ESI,AX
CALL 0x00158da0
CMP AL,0x0
JZ 0x00158d43
JMP 0x00158d3d
LAB_00158d3d:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00158d8e
LAB_00158d43:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x50],0x1
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00158d8e
LAB_00158d51:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x1c]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],DL
MOV AL,byte ptr [RBP + -0x2a]
MOV byte ptr [RBP + -0x29],AL
JMP 0x00158d6d
LAB_00158d6d:
JMP 0x00158d6f
LAB_00158d6f:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x200
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00158cca
LAB_00158d88:
JMP 0x00158d8a
LAB_00158d8a:
MOV byte ptr [RBP + -0x1],0x0
LAB_00158d8e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 translog_check_sector_protection(long param_1,long param_2)
{
byte bVar1;
char cVar2;
byte *pbVar3;
byte local_31;
uint local_28;
uint local_24;
pbVar3 = (byte *)(param_1 + (ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) +
-0x10);
local_24 = 1;
local_28 = 0x200;
local_31 = *pbVar3;
while( true ) {
if (0xf < local_24) {
return 0;
}
bVar1 = *(byte *)(param_1 + (ulong)local_28);
if (((bVar1 < local_31) && (0xaa < (0xff - (uint)local_31) + (uint)bVar1)) ||
((local_31 <= bVar1 && (0xaa < (uint)bVar1 - (uint)local_31)))) break;
*(byte *)(param_1 + (ulong)local_28) = pbVar3[local_24];
local_24 = local_24 + 1;
local_28 = local_28 + 0x200;
local_31 = bVar1;
}
cVar2 = translog_recover_page_up_to_sector(param_1,local_28 & 0xffff);
if (cVar2 != '\0') {
return 1;
}
*(int1 *)(param_2 + 0x50) = 1;
return 0;
}
|
|
4,129 | mi_enlarge_root | eloqsql/storage/myisam/mi_write.c | int _mi_enlarge_root(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
my_off_t *root)
{
uint t_length,nod_flag;
MI_KEY_PARAM s_temp;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_enlarge_root");
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
_mi_kpointer(info,info->buff+2,*root); /* if nod */
t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar*) 0,
(uchar*) 0, (uchar*) 0, key,&s_temp);
mi_putint(info->buff,t_length+2+nod_flag,nod_flag);
(*keyinfo->store_key)(keyinfo,info->buff+2+nod_flag,&s_temp);
info->buff_used=info->page_changed=1; /* info->buff is used */
if ((*root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR ||
_mi_write_keypage(info,keyinfo,*root,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
DBUG_RETURN(0);
} | O0 | c | mi_enlarge_root:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
je 0xcdf52
movq -0x78(%rbp), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x84(%rbp)
jmp 0xcdf5c
xorl %eax, %eax
movl %eax, -0x84(%rbp)
jmp 0xcdf5c
movl -0x84(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rsi
addq $0x2, %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
callq 0xc7f10
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x30(%rbp), %esi
movq -0x20(%rbp), %r9
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x70(%rbp), %r10
movq %r8, %rdx
movq %r8, %rcx
movq %r10, (%rsp)
callq *%rax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %edx
xorl %eax, %eax
movl $0x8000, %ecx # imm = 0x8000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
addl -0x30(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x7a(%rbp)
movzwl -0x7a(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movb %cl, 0x1(%rax)
movl -0x80(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x100(%rcx), %rsi
addq $0x2, %rsi
movl -0x30(%rbp), %ecx
addq %rcx, %rsi
leaq -0x70(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x33d(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x3, %edx
callq 0xc5de0
movq -0x28(%rbp), %rcx
movq %rax, (%rcx)
cmpq $-0x1, %rax
je 0xce085
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x100(%rax), %r8
movl $0x3, %ecx
callq 0xc5ab0
cmpl $0x0, %eax
je 0xce090
jmp 0xce087
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce099
jmp 0xce092
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_enlarge_root:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_78], rax
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_CDF52
mov rax, [rbp+var_78]
mov eax, [rax+17Ch]
mov [rbp+var_84], eax
jmp short loc_CDF5C
loc_CDF52:
xor eax, eax
mov [rbp+var_84], eax
jmp short $+2
loc_CDF5C:
mov eax, [rbp+var_84]
mov [rbp+var_30], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+100h]
add rsi, 2
mov rax, [rbp+var_28]
mov rdx, [rax]
call _mi_kpointer
mov rax, [rbp+var_18]
mov rax, [rax+50h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_30]
mov r9, [rbp+var_20]
xor ecx, ecx
mov r8d, ecx
lea r10, [rbp+var_70]
mov rdx, r8
mov rcx, r8
mov [rsp+90h+var_90], r10
call rax
mov [rbp+var_2C], eax
mov edx, [rbp+var_30]
xor eax, eax
mov ecx, 8000h
cmp edx, 0
cmovnz eax, ecx
mov ecx, [rbp+var_2C]
add ecx, 2
add ecx, [rbp+var_30]
movzx ecx, cx
add eax, ecx
mov [rbp+var_7A], ax
movzx eax, [rbp+var_7A]
mov [rbp+var_80], eax
mov eax, [rbp+var_80]
mov cl, al
mov rax, [rbp+var_10]
mov rax, [rax+100h]
mov [rax+1], cl
mov eax, [rbp+var_80]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov rax, [rax+100h]
mov [rax], cl
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov rdi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rsi, [rcx+100h]
add rsi, 2
mov ecx, [rbp+var_30]
add rsi, rcx
lea rdx, [rbp+var_70]
call rax
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, 3
call _mi_new
mov rcx, [rbp+var_28]
mov [rcx], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_CE085
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_28]
mov rdx, [rax]
mov rax, [rbp+var_10]
mov r8, [rax+100h]
mov ecx, 3
call _mi_write_keypage
cmp eax, 0
jz short loc_CE090
loc_CE085:
jmp short $+2
loc_CE087:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_CE099
loc_CE090:
jmp short $+2
loc_CE092:
mov [rbp+var_4], 0
loc_CE099:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
| long long mi_enlarge_root(_QWORD *a1, long long a2, long long a3, unsigned long long *a4)
{
__int16 v4; // ax
long long v5; // rax
unsigned int v7; // [rsp+Ch] [rbp-84h]
__int16 v8; // [rsp+16h] [rbp-7Ah]
_BYTE v9[64]; // [rsp+20h] [rbp-70h] BYREF
unsigned int v10; // [rsp+60h] [rbp-30h]
int v11; // [rsp+64h] [rbp-2Ch]
unsigned long long *v12; // [rsp+68h] [rbp-28h]
long long v13; // [rsp+70h] [rbp-20h]
long long v14; // [rsp+78h] [rbp-18h]
_QWORD *v15; // [rsp+80h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
if ( *a4 == -1LL )
v7 = 0;
else
v7 = *(_DWORD *)(*a1 + 380LL);
v10 = v7;
mi_kpointer((long long)v15, (_BYTE *)(v15[32] + 2LL), *v12);
v11 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, long long, _BYTE *))(v14 + 80))(
v14,
v7,
0LL,
0LL,
0LL,
v13,
v9);
v4 = 0;
if ( v10 )
v4 = 0x8000;
v8 = v10 + v11 + 2 + v4;
*(_BYTE *)(v15[32] + 1LL) = v10 + v11 + 2 + v4;
*(_BYTE *)v15[32] = HIBYTE(v8);
(*(void ( **)(long long, long long, _BYTE *))(v14 + 88))(v14, v10 + v15[32] + 2LL, v9);
*((_BYTE *)v15 + 828) = 1;
*((_BYTE *)v15 + 829) = 1;
v5 = mi_new(v15, v14, 3);
*v12 = v5;
if ( v5 == -1 || (unsigned int)mi_write_keypage(v15, v14, *v12, 3, (unsigned __int16 *)v15[32]) )
return (unsigned int)-1;
else
return 0;
}
| _mi_enlarge_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],-0x1
JZ 0x001cdf52
MOV RAX,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x84],EAX
JMP 0x001cdf5c
LAB_001cdf52:
XOR EAX,EAX
MOV dword ptr [RBP + -0x84],EAX
JMP 0x001cdf5c
LAB_001cdf5c:
MOV EAX,dword ptr [RBP + -0x84]
MOV dword ptr [RBP + -0x30],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x100]
ADD RSI,0x2
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
CALL 0x001c7f10
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x20]
XOR ECX,ECX
MOV R8D,ECX
LEA R10,[RBP + -0x70]
MOV RDX,R8
MOV RCX,R8
MOV qword ptr [RSP],R10
CALL RAX
MOV dword ptr [RBP + -0x2c],EAX
MOV EDX,dword ptr [RBP + -0x30]
XOR EAX,EAX
MOV ECX,0x8000
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV ECX,dword ptr [RBP + -0x2c]
ADD ECX,0x2
ADD ECX,dword ptr [RBP + -0x30]
MOVZX ECX,CX
ADD EAX,ECX
MOV word ptr [RBP + -0x7a],AX
MOVZX EAX,word ptr [RBP + -0x7a]
MOV dword ptr [RBP + -0x80],EAX
MOV EAX,dword ptr [RBP + -0x80]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x80]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x100]
ADD RSI,0x2
MOV ECX,dword ptr [RBP + -0x30]
ADD RSI,RCX
LEA RDX,[RBP + -0x70]
CALL RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x3
CALL 0x001c5de0
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX],RAX
CMP RAX,-0x1
JZ 0x001ce085
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x100]
MOV ECX,0x3
CALL 0x001c5ab0
CMP EAX,0x0
JZ 0x001ce090
LAB_001ce085:
JMP 0x001ce087
LAB_001ce087:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001ce099
LAB_001ce090:
JMP 0x001ce092
LAB_001ce092:
MOV dword ptr [RBP + -0x4],0x0
LAB_001ce099:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4 _mi_enlarge_root(long *param_1,long param_2,int8 param_3,long *param_4)
{
short sVar1;
int iVar2;
long lVar3;
uint local_8c;
int1 local_78 [64];
uint local_38;
int4 local_34;
long *local_30;
int8 local_28;
long local_20;
long *local_18;
if (*param_4 == -1) {
local_8c = 0;
}
else {
local_8c = *(uint *)(*param_1 + 0x17c);
}
local_38 = local_8c;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
_mi_kpointer(param_1,param_1[0x20] + 2,*param_4);
local_34 = (**(code **)(local_20 + 0x50))(local_20,local_38,0,0,0,local_28,local_78);
sVar1 = 0;
if (local_38 != 0) {
sVar1 = -0x8000;
}
sVar1 = sVar1 + (short)local_34 + 2 + (short)local_38;
*(char *)(local_18[0x20] + 1) = (char)sVar1;
*(char *)local_18[0x20] = (char)((ushort)sVar1 >> 8);
(**(code **)(local_20 + 0x58))(local_20,local_18[0x20] + 2 + (ulong)local_38,local_78);
*(int1 *)((long)local_18 + 0x33c) = 1;
*(int1 *)((long)local_18 + 0x33d) = 1;
lVar3 = _mi_new(local_18,local_20,3);
*local_30 = lVar3;
if ((lVar3 != -1) &&
(iVar2 = _mi_write_keypage(local_18,local_20,*local_30,3,local_18[0x20]), iVar2 == 0)) {
return 0;
}
return 0xffffffff;
}
|
|
4,130 | void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long) | monkey531[P]llama/common/json.hpp | void int_to_string( string_type& target, std::size_t value )
{
// For ADL
using std::to_string;
target = to_string(value);
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
cmpq $0xa, %r14
jb 0x48a95
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0x48a8e
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x48a93
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x48a95
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x48a58
addl $-0x3, %esi
jmp 0x48a95
addl $-0x2, %esi
jmp 0x48a95
decl %esi
movl %esi, %esi
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x197d0
movq (%r15), %rdi
movl 0x8(%r15), %esi
movq %r14, %rdx
callq 0x35f5d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19840
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x48adf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov esi, 1
cmp r14, 0Ah
jb short loc_48A95
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r14
loc_48A58:
cmp rcx, 63h ; 'c'
jbe short loc_48A8E
cmp rcx, 3E7h
jbe short loc_48A93
cmp rcx, 2710h
jb short loc_48A95
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_48A58
add esi, 0FFFFFFFDh
jmp short loc_48A95
loc_48A8E:
add esi, 0FFFFFFFEh
jmp short loc_48A95
loc_48A93:
dec esi
loc_48A95:
mov esi, esi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea r15, [rsp+48h+var_40]
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [r15]
mov esi, [r15+8]
mov rdx, r14
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
cmp rdi, r12
jz short loc_48ADF
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_48ADF:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
| void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(long long a1, unsigned long long a2)
{
unsigned int v3; // esi
unsigned long long v4; // rcx
bool v5; // cc
char *v6; // [rsp+8h] [rbp-40h] BYREF
int v7; // [rsp+10h] [rbp-38h]
_QWORD v8[6]; // [rsp+18h] [rbp-30h] BYREF
v3 = 1;
if ( a2 >= 0xA )
{
v3 = 4;
v4 = a2;
while ( 1 )
{
if ( v4 <= 0x63 )
{
v3 -= 2;
goto LABEL_10;
}
if ( v4 <= 0x3E7 )
break;
if ( v4 < 0x2710 )
goto LABEL_10;
v3 += 4;
v5 = v4 <= 0x1869F;
v4 /= 0x2710uLL;
if ( v5 )
{
v3 -= 3;
goto LABEL_10;
}
}
--v3;
}
LABEL_10:
v6 = (char *)v8;
std::string::_M_construct(&v6, v3, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>(v6, v7, a2);
std::string::operator=(a1, &v6);
if ( v6 != (char *)v8 )
operator delete(v6, v8[0] + 1LL);
}
| int_to_string<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x1
CMP R14,0xa
JC 0x00148a95
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R14
LAB_00148a58:
CMP RCX,0x63
JBE 0x00148a8e
CMP RCX,0x3e7
JBE 0x00148a93
CMP RCX,0x2710
JC 0x00148a95
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x00148a58
ADD ESI,-0x3
JMP 0x00148a95
LAB_00148a8e:
ADD ESI,-0x2
JMP 0x00148a95
LAB_00148a93:
DEC ESI
LAB_00148a95:
MOV ESI,ESI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA R15,[RSP + 0x8]
MOV RDI,R15
XOR EDX,EDX
CALL 0x001197d0
MOV RDI,qword ptr [R15]
MOV ESI,dword ptr [R15 + 0x8]
MOV RDX,R14
CALL 0x00135f5d
MOV RDI,RBX
MOV RSI,R15
CALL 0x00119840
MOV RDI,qword ptr [R15]
CMP RDI,R12
JZ 0x00148adf
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196d0
LAB_00148adf:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string
>(std::__cxx11::string&, unsigned long) */
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string>
(string *param_1,ulong param_2)
{
bool bVar1;
char cVar2;
ulong uVar3;
char cVar4;
long *local_40;
uint local_38;
long local_30 [2];
cVar4 = '\x01';
if (9 < param_2) {
uVar3 = param_2;
cVar2 = '\x04';
do {
cVar4 = cVar2;
if (uVar3 < 100) {
cVar4 = cVar4 + -2;
goto LAB_00148a95;
}
if (uVar3 < 1000) {
cVar4 = cVar4 + -1;
goto LAB_00148a95;
}
if (uVar3 < 10000) goto LAB_00148a95;
bVar1 = 99999 < uVar3;
uVar3 = uVar3 / 10000;
cVar2 = cVar4 + '\x04';
} while (bVar1);
cVar4 = cVar4 + '\x01';
}
LAB_00148a95:
local_40 = local_30;
std::__cxx11::string::_M_construct((ulong)&local_40,cVar4);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,param_2);
std::__cxx11::string::operator=(param_1,(string *)&local_40);
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
return;
}
|
|
4,131 | mariadb_get_charset_info | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void mariadb_get_charset_info(MYSQL *mysql, MY_CHARSET_INFO *cs)
{
if (!cs)
return;
cs->number= mysql->charset->nr;
cs->csname= mysql->charset->csname;
cs->name= mysql->charset->name;
cs->state= 0;
cs->comment= NULL;
cs->dir= NULL;
cs->mbminlen= mysql->charset->char_minlen;
cs->mbmaxlen= mysql->charset->char_maxlen;
return;
} | O3 | c | mariadb_get_charset_info:
testq %rsi, %rsi
je 0x6075b
pushq %rbp
movq %rsp, %rbp
movq 0x2f0(%rdi), %rax
movl (%rax), %eax
movl %eax, (%rsi)
movq 0x2f0(%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsi)
movq 0x2f0(%rdi), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsi)
movl $0x0, 0x4(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsi)
movq 0x2f0(%rdi), %rax
movl 0x30(%rax), %eax
movl %eax, 0x28(%rsi)
movq 0x2f0(%rdi), %rax
movl 0x34(%rax), %eax
movl %eax, 0x2c(%rsi)
popq %rbp
retq
| mariadb_get_charset_info:
test rsi, rsi
jz short locret_6075B
push rbp
mov rbp, rsp
mov rax, [rdi+2F0h]
mov eax, [rax]
mov [rsi], eax
mov rax, [rdi+2F0h]
mov rax, [rax+8]
mov [rsi+8], rax
mov rax, [rdi+2F0h]
mov rax, [rax+10h]
mov [rsi+10h], rax
mov dword ptr [rsi+4], 0
xorps xmm0, xmm0
movups xmmword ptr [rsi+18h], xmm0
mov rax, [rdi+2F0h]
mov eax, [rax+30h]
mov [rsi+28h], eax
mov rax, [rdi+2F0h]
mov eax, [rax+34h]
mov [rsi+2Ch], eax
pop rbp
locret_6075B:
retn
| long long mariadb_get_charset_info(long long a1, long long a2)
{
long long result; // rax
if ( a2 )
{
*(_DWORD *)a2 = **(_DWORD **)(a1 + 752);
*(_QWORD *)(a2 + 8) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 8LL);
*(_QWORD *)(a2 + 16) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 16LL);
*(_DWORD *)(a2 + 4) = 0;
*(_OWORD *)(a2 + 24) = 0LL;
*(_DWORD *)(a2 + 40) = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 48LL);
result = *(unsigned int *)(*(_QWORD *)(a1 + 752) + 52LL);
*(_DWORD *)(a2 + 44) = result;
}
return result;
}
| mariadb_get_charset_info:
TEST RSI,RSI
JZ 0x0016075b
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI + 0x2f0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSI],EAX
MOV RAX,qword ptr [RDI + 0x2f0]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSI + 0x8],RAX
MOV RAX,qword ptr [RDI + 0x2f0]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSI + 0x10],RAX
MOV dword ptr [RSI + 0x4],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x18],XMM0
MOV RAX,qword ptr [RDI + 0x2f0]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RSI + 0x28],EAX
MOV RAX,qword ptr [RDI + 0x2f0]
MOV EAX,dword ptr [RAX + 0x34]
MOV dword ptr [RSI + 0x2c],EAX
POP RBP
LAB_0016075b:
RET
|
void mariadb_get_charset_info(long param_1,int4 *param_2)
{
if (param_2 != (int4 *)0x0) {
*param_2 = **(int4 **)(param_1 + 0x2f0);
*(int8 *)(param_2 + 2) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 8);
*(int8 *)(param_2 + 4) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 0x10);
param_2[1] = 0;
*(int8 *)(param_2 + 6) = 0;
*(int8 *)(param_2 + 8) = 0;
param_2[10] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x30);
param_2[0xb] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x34);
}
return;
}
|
|
4,132 | test_if_hard_path | eloqsql/mysys/my_getwd.c | int test_if_hard_path(register const char *dir_name)
{
if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
return (home_dir != NullS && test_if_hard_path(home_dir));
if (dir_name[0] == FN_LIBCHAR)
return (TRUE);
#ifdef FN_DEVCHAR
return (strchr(dir_name,FN_DEVCHAR) != 0);
#else
return FALSE;
#endif
} | O3 | c | test_if_hard_path:
pushq %rbp
movq %rsp, %rbp
leaq 0x38676b(%rip), %rax # 0x3d3ec8
movq (%rax), %rax
movb (%rdi), %cl
cmpb $0x7e, %cl
jne 0x4d779
cmpb $0x2f, 0x1(%rdi)
jne 0x4d779
movq %rax, %rdi
testq %rax, %rax
jne 0x4d760
xorl %eax, %eax
jmp 0x4d781
xorl %eax, %eax
cmpb $0x2f, %cl
sete %al
popq %rbp
retq
| test_if_hard_path:
push rbp
mov rbp, rsp
lea rax, home_dir
mov rax, [rax]
loc_4D760:
mov cl, [rdi]
cmp cl, 7Eh ; '~'
jnz short loc_4D779
cmp byte ptr [rdi+1], 2Fh ; '/'
jnz short loc_4D779
mov rdi, rax
test rax, rax
jnz short loc_4D760
xor eax, eax
jmp short loc_4D781
loc_4D779:
xor eax, eax
cmp cl, 2Fh ; '/'
setz al
loc_4D781:
pop rbp
retn
| _BOOL8 test_if_hard_path(_BYTE *a1)
{
while ( *a1 == 126 && a1[1] == 47 )
{
a1 = (_BYTE *)home_dir;
if ( !home_dir )
return 0LL;
}
return *a1 == 47;
}
| test_if_hard_path:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x4d3ec8]
MOV RAX,qword ptr [RAX]
LAB_0014d760:
MOV CL,byte ptr [RDI]
CMP CL,0x7e
JNZ 0x0014d779
CMP byte ptr [RDI + 0x1],0x2f
JNZ 0x0014d779
MOV RDI,RAX
TEST RAX,RAX
JNZ 0x0014d760
XOR EAX,EAX
JMP 0x0014d781
LAB_0014d779:
XOR EAX,EAX
CMP CL,0x2f
SETZ AL
LAB_0014d781:
POP RBP
RET
|
bool test_if_hard_path(char *param_1)
{
while ((*param_1 == '~' && (param_1[1] == '/'))) {
param_1 = home_dir;
if (home_dir == (char *)0x0) {
return false;
}
}
return *param_1 == '/';
}
|
|
4,133 | my_open_parent_dir_nosymlinks | eloqsql/mysys/my_symlink.c | const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd)
{
char buf[FN_REFLEN + 1];
char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf));
int fd, dfd= -1;
if (*end)
{
errno= ENAMETOOLONG;
return NULL;
}
if (*s != '/') /* not an absolute path */
{
errno= ENOENT;
return NULL;
}
for (;;)
{
if (*e == '/') /* '//' in the path */
{
errno= ENOENT;
goto err;
}
while (*e && *e != '/')
e++;
*e= 0;
if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3))
{
errno= ENOENT;
goto err;
}
if (++e >= end)
{
*pdfd= dfd;
return pathname + (s - buf);
}
fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC);
if (fd < 0)
goto err;
if (dfd >= 0)
close(dfd);
dfd= fd;
s= e;
}
err:
if (dfd >= 0)
close(dfd);
return NULL;
} | O3 | c | my_open_parent_dir_nosymlinks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x240(%rbp), %r15
movl $0x201, %edx # imm = 0x201
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9241c
cmpb $0x0, (%rax)
je 0x5e117
callq 0x28050
movl $0x24, (%rax)
jmp 0x5e1ee
cmpb $0x2f, -0x240(%rbp)
jne 0x5e1c3
movq %rax, %r12
movq %r14, -0x248(%rbp)
movb -0x23f(%rbp), %al
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpb $0x2f, %al
je 0x5e1d3
leaq -0x23f(%rbp), %rcx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %r15, %rsi
incq %rcx
movq %rcx, %r15
testb %al, %al
je 0x5e16c
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x5e16c
movb (%r15), %al
incq %r15
jmp 0x5e158
movb $0x0, -0x1(%r15)
cmpw $0x2e, (%rsi)
je 0x5e1d0
movzwl (%rsi), %eax
xorl $0x2e2e, %eax # imm = 0x2E2E
movzbl 0x2(%rsi), %ecx
orw %ax, %cx
je 0x5e1d0
cmpq %r12, %r15
jae 0x5e214
movl %r14d, %edi
movl $0x2a0000, %edx # imm = 0x2A0000
xorl %eax, %eax
callq 0x28390
testl %eax, %eax
js 0x5e1e1
movl %eax, %r13d
testl %r14d, %r14d
js 0x5e1b4
movl %r14d, %edi
callq 0x28740
movb (%r15), %al
movl %r13d, %r14d
movq %r15, %rcx
cmpb $0x2f, %al
jne 0x5e14f
jmp 0x5e1d3
callq 0x28050
movl $0x2, (%rax)
jmp 0x5e1ee
movl %r14d, %r13d
callq 0x28050
movl $0x2, (%rax)
movl %r13d, %r14d
testl %r14d, %r14d
js 0x5e1ee
movl %r14d, %edi
callq 0x28740
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5e22d
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x248(%rbp), %rax
movl %r14d, (%rax)
leaq -0x240(%rbp), %rax
subq %rax, %rsi
addq %rsi, %rbx
jmp 0x5e1f0
callq 0x28400
nop
| my_open_parent_dir_nosymlinks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_240]
mov edx, 201h
mov rdi, r15
mov rsi, rbx
call strnmov
cmp byte ptr [rax], 0
jz short loc_5E117
call ___errno_location
mov dword ptr [rax], 24h ; '$'
jmp loc_5E1EE
loc_5E117:
cmp [rbp+var_240], 2Fh ; '/'
jnz loc_5E1C3
mov r12, rax
mov [rbp+var_248], r14
mov al, [rbp+var_23F]
mov r13d, 0FFFFFFFFh
cmp al, 2Fh ; '/'
jz loc_5E1D3
lea rcx, [rbp+var_23F]
mov r14d, 0FFFFFFFFh
loc_5E14F:
mov rsi, r15
inc rcx
mov r15, rcx
loc_5E158:
test al, al
jz short loc_5E16C
movzx eax, al
cmp eax, 2Fh ; '/'
jz short loc_5E16C
mov al, [r15]
inc r15
jmp short loc_5E158
loc_5E16C:
mov byte ptr [r15-1], 0
cmp word ptr [rsi], 2Eh ; '.'
jz short loc_5E1D0
movzx eax, word ptr [rsi]
xor eax, 2E2Eh
movzx ecx, byte ptr [rsi+2]
or cx, ax
jz short loc_5E1D0
cmp r15, r12
jnb loc_5E214
mov edi, r14d
mov edx, offset unk_2A0000
xor eax, eax
call _openat64
test eax, eax
js short loc_5E1E1
mov r13d, eax
test r14d, r14d
js short loc_5E1B4
mov edi, r14d
call _close
loc_5E1B4:
mov al, [r15]
mov r14d, r13d
mov rcx, r15
cmp al, 2Fh ; '/'
jnz short loc_5E14F
jmp short loc_5E1D3
loc_5E1C3:
call ___errno_location
mov dword ptr [rax], 2
jmp short loc_5E1EE
loc_5E1D0:
mov r13d, r14d
loc_5E1D3:
call ___errno_location
mov dword ptr [rax], 2
mov r14d, r13d
loc_5E1E1:
test r14d, r14d
js short loc_5E1EE
mov edi, r14d
call _close
loc_5E1EE:
xor ebx, ebx
loc_5E1F0:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5E22D
mov rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5E214:
mov rax, [rbp+var_248]
mov [rax], r14d
lea rax, [rbp+var_240]
sub rsi, rax
add rbx, rsi
jmp short loc_5E1F0
loc_5E22D:
call ___stack_chk_fail
| long long my_open_parent_dir_nosymlinks(long long a1, unsigned int *a2)
{
char *v3; // r15
char *v4; // rdi
char *v5; // rax
char *v6; // r12
char v7; // al
int v8; // r13d
char *v9; // rcx
unsigned int v10; // r14d
char *v11; // rsi
long long v12; // rcx
int v13; // eax
unsigned int *v16; // [rsp+8h] [rbp-248h]
char v17; // [rsp+10h] [rbp-240h] BYREF
char v18; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v19; // [rsp+220h] [rbp-30h]
v19 = __readfsqword(0x28u);
v3 = &v17;
v4 = &v17;
v5 = (char *)strnmov(&v17, a1, 513LL);
if ( *v5 )
{
*(_DWORD *)__errno_location(&v17) = 36;
return 0LL;
}
if ( v17 != 47 )
{
*(_DWORD *)__errno_location(&v17) = 2;
return 0LL;
}
v6 = v5;
v16 = a2;
v7 = v18;
v8 = -1;
if ( v18 == 47 )
{
LABEL_20:
*(_DWORD *)__errno_location(v4) = 2;
v10 = v8;
LABEL_21:
if ( (v10 & 0x80000000) == 0 )
close(v10);
return 0LL;
}
v9 = &v18;
v10 = -1;
while ( 1 )
{
v11 = v3;
v3 = v9 + 1;
while ( v7 && v7 != 47 )
v7 = *v3++;
*(v3 - 1) = 0;
if ( *(_WORD *)v11 == 46 || (v12 = (unsigned __int8)v11[2], LOWORD(v12) = *(_WORD *)v11 ^ 0x2E2E | v12, !(_WORD)v12) )
{
v8 = v10;
goto LABEL_20;
}
if ( v3 >= v6 )
break;
v4 = (char *)v10;
v13 = openat64(v10, v11, &unk_2A0000, v12);
if ( v13 < 0 )
goto LABEL_21;
v8 = v13;
if ( (v10 & 0x80000000) == 0 )
{
v4 = (char *)v10;
close(v10);
}
v7 = *v3;
v10 = v8;
v9 = v3;
if ( *v3 == 47 )
goto LABEL_20;
}
*v16 = v10;
return v11 - &v17 + a1;
}
| my_open_parent_dir_nosymlinks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x240]
MOV EDX,0x201
MOV RDI,R15
MOV RSI,RBX
CALL 0x0019241c
CMP byte ptr [RAX],0x0
JZ 0x0015e117
CALL 0x00128050
MOV dword ptr [RAX],0x24
JMP 0x0015e1ee
LAB_0015e117:
CMP byte ptr [RBP + -0x240],0x2f
JNZ 0x0015e1c3
MOV R12,RAX
MOV qword ptr [RBP + -0x248],R14
MOV AL,byte ptr [RBP + -0x23f]
MOV R13D,0xffffffff
CMP AL,0x2f
JZ 0x0015e1d3
LEA RCX,[RBP + -0x23f]
MOV R14D,0xffffffff
LAB_0015e14f:
MOV RSI,R15
INC RCX
MOV R15,RCX
LAB_0015e158:
TEST AL,AL
JZ 0x0015e16c
MOVZX EAX,AL
CMP EAX,0x2f
JZ 0x0015e16c
MOV AL,byte ptr [R15]
INC R15
JMP 0x0015e158
LAB_0015e16c:
MOV byte ptr [R15 + -0x1],0x0
CMP word ptr [RSI],0x2e
JZ 0x0015e1d0
MOVZX EAX,word ptr [RSI]
XOR EAX,0x2e2e
MOVZX ECX,byte ptr [RSI + 0x2]
OR CX,AX
JZ 0x0015e1d0
CMP R15,R12
JNC 0x0015e214
MOV EDI,R14D
MOV EDX,0x2a0000
XOR EAX,EAX
CALL 0x00128390
TEST EAX,EAX
JS 0x0015e1e1
MOV R13D,EAX
TEST R14D,R14D
JS 0x0015e1b4
MOV EDI,R14D
CALL 0x00128740
LAB_0015e1b4:
MOV AL,byte ptr [R15]
MOV R14D,R13D
MOV RCX,R15
CMP AL,0x2f
JNZ 0x0015e14f
JMP 0x0015e1d3
LAB_0015e1c3:
CALL 0x00128050
MOV dword ptr [RAX],0x2
JMP 0x0015e1ee
LAB_0015e1d0:
MOV R13D,R14D
LAB_0015e1d3:
CALL 0x00128050
MOV dword ptr [RAX],0x2
MOV R14D,R13D
LAB_0015e1e1:
TEST R14D,R14D
JS 0x0015e1ee
MOV EDI,R14D
CALL 0x00128740
LAB_0015e1ee:
XOR EBX,EBX
LAB_0015e1f0:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015e22d
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015e214:
MOV RAX,qword ptr [RBP + -0x248]
MOV dword ptr [RAX],R14D
LEA RAX,[RBP + -0x240]
SUB RSI,RAX
ADD RBX,RSI
JMP 0x0015e1f0
LAB_0015e22d:
CALL 0x00128400
|
long my_open_parent_dir_nosymlinks(long param_1,int *param_2)
{
short *psVar1;
int iVar2;
short *psVar3;
int *piVar4;
long lVar5;
int __fd;
short *psVar6;
short *__file;
long in_FS_OFFSET;
int1 local_248 [2];
int1 local_246 [526];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
psVar3 = (short *)strnmov(local_248,param_1,0x201);
if ((char)*psVar3 == '\0') {
if (local_248[0] == '/') {
__fd = -1;
if (local_248[1] != '/') {
psVar1 = (short *)(local_248 + 1);
__file = (short *)local_248;
__fd = -1;
do {
while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' &&
(local_248[1] != '/'))) {
psVar1 = psVar6;
local_248[1] = *(char *)psVar6;
}
*(char *)psVar1 = '\0';
if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break;
if (psVar3 <= psVar6) {
*param_2 = __fd;
lVar5 = (long)__file + (param_1 - (long)local_248);
goto LAB_0015e1f0;
}
iVar2 = openat64(__fd,(char *)__file,0x2a0000);
if (iVar2 < 0) goto LAB_0015e1e1;
if (-1 < __fd) {
close(__fd);
}
local_248[1] = *(char *)psVar6;
__fd = iVar2;
psVar1 = psVar6;
__file = psVar6;
} while (local_248[1] != '/');
}
piVar4 = __errno_location();
*piVar4 = 2;
LAB_0015e1e1:
if (-1 < __fd) {
close(__fd);
}
}
else {
piVar4 = __errno_location();
*piVar4 = 2;
}
}
else {
piVar4 = __errno_location();
*piVar4 = 0x24;
}
lVar5 = 0;
LAB_0015e1f0:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar5;
}
|
|
4,134 | bitmap_exists_intersection | eloqsql/mysys/my_bitmap.c | my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
uint bitmap_count,
uint start_bit, uint end_bit)
{
uint i, j, start_idx, end_idx;
my_bitmap_map cur_res;
DBUG_ASSERT(bitmap_count);
DBUG_ASSERT(end_bit >= start_bit);
for (j= 0; j < bitmap_count; j++)
DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits);
start_idx= start_bit/8/sizeof(my_bitmap_map);
end_idx= end_bit/8/sizeof(my_bitmap_map);
for (i= start_idx; i < end_idx; i++)
{
cur_res= ~0;
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[i];
if (cur_res)
return TRUE;
}
cur_res= ~last_word_mask(end_bit);
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[end_idx];
return cur_res != 0;
} | O3 | c | bitmap_exists_intersection:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
shrl $0x5, %edx
movl %ecx, %r8d
shrl $0x5, %r8d
cmpl %r8d, %edx
jae 0xbeb37
movl %esi, %r9d
leal (%r8,%rdx), %r10d
subl %edx, %r10d
movb $0x1, %al
testl %esi, %esi
je 0xbebe7
movl $0xffffffff, %r11d # imm = 0xFFFFFFFF
movl $0x1, %ebx
movq -0x8(%rdi,%rbx,8), %r14
movq (%r14), %r14
andl (%r14,%rdx,4), %r11d
je 0xbeb26
leaq 0x1(%rbx), %r14
cmpq %r9, %rbx
movq %r14, %rbx
jb 0xbeb0c
testl %r11d, %r11d
jne 0xbebe7
incq %rdx
cmpq %r10, %rdx
jne 0xbeaf9
movl %ecx, %eax
andl $0x7, %eax
addl $0x8, %ecx
shrl $0x3, %ecx
andl $0x3, %ecx
leaq 0x4fe7c(%rip), %rdx # 0x10e9c8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xfe000000, %r9d # imm = 0xFE000000
movl %eax, %ecx
shll %cl, %r9d
xorl %edx, %edx
xorl %eax, %eax
jmp 0xbeb8d
movl $0xfffffe00, %edx # imm = 0xFFFFFE00
movl %eax, %ecx
shll %cl, %edx
movzwl %dx, %eax
xorl %ecx, %ecx
jmp 0xbeba2
movl $0xfffe0000, %edx # imm = 0xFFFE0000
movl %eax, %ecx
shll %cl, %edx
andl $0xfe0000, %edx # imm = 0xFE0000
xorl %eax, %eax
movl $0xff000000, %r9d # imm = 0xFF000000
xorl %ecx, %ecx
jmp 0xbebad
movl $0xfffffffe, %edx # imm = 0xFFFFFFFE
movl %eax, %ecx
shll %cl, %edx
movzbl %dl, %ecx
movl $0xff00, %eax # imm = 0xFF00
movl $0xff0000, %edx # imm = 0xFF0000
movl $0xff000000, %r9d # imm = 0xFF000000
testl %esi, %esi
je 0xbebe5
orl %r9d, %edx
orl %ecx, %eax
orl %edx, %eax
notl %eax
movl %r8d, %ecx
movl %esi, %edx
movl $0x1, %esi
movq -0x8(%rdi,%rsi,8), %r8
movq (%r8), %r8
andl (%r8,%rcx,4), %eax
je 0xbebde
leaq 0x1(%rsi), %r8
cmpq %rdx, %rsi
movq %r8, %rsi
jb 0xbebc4
testl %eax, %eax
setne %al
jmp 0xbebe7
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
| bitmap_exists_intersection:
push rbp
mov rbp, rsp
push r14
push rbx
shr edx, 5
mov r8d, ecx
shr r8d, 5
cmp edx, r8d
jnb short loc_BEB37
mov r9d, esi
lea r10d, [r8+rdx]
sub r10d, edx
mov al, 1
loc_BEAF9:
test esi, esi
jz loc_BEBE7
mov r11d, 0FFFFFFFFh
mov ebx, 1
loc_BEB0C:
mov r14, [rdi+rbx*8-8]
mov r14, [r14]
and r11d, [r14+rdx*4]
jz short loc_BEB26
lea r14, [rbx+1]
cmp rbx, r9
mov rbx, r14
jb short loc_BEB0C
loc_BEB26:
test r11d, r11d
jnz loc_BEBE7
inc rdx
cmp rdx, r10
jnz short loc_BEAF9
loc_BEB37:
mov eax, ecx
and eax, 7
add ecx, 8
shr ecx, 3
and ecx, 3
lea rdx, jpt_BEB53
movsxd rcx, ds:(jpt_BEB53 - 10E9C8h)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_BEB55:
mov r9d, 0FE000000h; jumptable 00000000000BEB53 case 0
mov ecx, eax
shl r9d, cl
xor edx, edx
xor eax, eax
jmp short loc_BEB8D
loc_BEB66:
mov edx, 0FFFFFE00h; jumptable 00000000000BEB53 case 2
mov ecx, eax
shl edx, cl
movzx eax, dx
xor ecx, ecx
jmp short loc_BEBA2
loc_BEB76:
mov edx, 0FFFE0000h; jumptable 00000000000BEB53 case 3
mov ecx, eax
shl edx, cl
and edx, 0FE0000h
xor eax, eax
mov r9d, 0FF000000h
loc_BEB8D:
xor ecx, ecx
jmp short loc_BEBAD
loc_BEB91:
mov edx, 0FFFFFFFEh; jumptable 00000000000BEB53 case 1
mov ecx, eax
shl edx, cl
movzx ecx, dl
mov eax, 0FF00h
loc_BEBA2:
mov edx, 0FF0000h
mov r9d, 0FF000000h
loc_BEBAD:
test esi, esi
jz short loc_BEBE5
or edx, r9d
or eax, ecx
or eax, edx
not eax
mov ecx, r8d
mov edx, esi
mov esi, 1
loc_BEBC4:
mov r8, [rdi+rsi*8-8]
mov r8, [r8]
and eax, [r8+rcx*4]
jz short loc_BEBDE
lea r8, [rsi+1]
cmp rsi, rdx
mov rsi, r8
jb short loc_BEBC4
loc_BEBDE:
test eax, eax
setnz al
jmp short loc_BEBE7
loc_BEBE5:
mov al, 1
loc_BEBE7:
pop rbx
pop r14
pop rbp
retn
| bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
long long v4; // rdx
unsigned int v5; // r8d
bool result; // al
int v7; // r11d
unsigned long long v8; // rbx
bool v9; // cf
char v10; // al
int v11; // r9d
int v12; // edx
int v13; // eax
int v14; // ecx
int v15; // eax
unsigned long long v16; // rdx
unsigned long long v17; // rsi
v4 = a3 >> 5;
v5 = a4 >> 5;
if ( (unsigned int)v4 >= a4 >> 5 )
{
LABEL_9:
v10 = a4 & 7;
switch ( ((a4 + 8) >> 3) & 3 )
{
case 0u:
v11 = -33554432 << v10;
v12 = 0;
v13 = 0;
goto LABEL_13;
case 1u:
v14 = (unsigned __int8)(-2 << v10);
v13 = 65280;
goto LABEL_15;
case 2u:
v13 = (unsigned __int16)(-512 << v10);
v14 = 0;
LABEL_15:
v12 = 16711680;
v11 = -16777216;
break;
case 3u:
v12 = (-131072 << v10) & 0xFE0000;
v13 = 0;
v11 = -16777216;
LABEL_13:
v14 = 0;
break;
}
if ( a2 )
{
v15 = ~(v11 | v12 | v14 | v13);
v16 = a2;
v17 = 1LL;
do
{
v15 &= *(_DWORD *)(**(_QWORD **)(a1 + 8 * v17 - 8) + 4LL * v5);
if ( !v15 )
break;
v9 = v17++ < v16;
}
while ( v9 );
return v15 != 0;
}
else
{
return 1;
}
}
else
{
result = 1;
while ( a2 )
{
v7 = -1;
v8 = 1LL;
do
{
v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8 * v8 - 8) + 4 * v4);
if ( !v7 )
break;
v9 = v8++ < a2;
}
while ( v9 );
if ( v7 )
break;
if ( ++v4 == v5 )
goto LABEL_9;
}
}
return result;
}
| bitmap_exists_intersection:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SHR EDX,0x5
MOV R8D,ECX
SHR R8D,0x5
CMP EDX,R8D
JNC 0x001beb37
MOV R9D,ESI
LEA R10D,[R8 + RDX*0x1]
SUB R10D,EDX
MOV AL,0x1
LAB_001beaf9:
TEST ESI,ESI
JZ 0x001bebe7
MOV R11D,0xffffffff
MOV EBX,0x1
LAB_001beb0c:
MOV R14,qword ptr [RDI + RBX*0x8 + -0x8]
MOV R14,qword ptr [R14]
AND R11D,dword ptr [R14 + RDX*0x4]
JZ 0x001beb26
LEA R14,[RBX + 0x1]
CMP RBX,R9
MOV RBX,R14
JC 0x001beb0c
LAB_001beb26:
TEST R11D,R11D
JNZ 0x001bebe7
INC RDX
CMP RDX,R10
JNZ 0x001beaf9
LAB_001beb37:
MOV EAX,ECX
AND EAX,0x7
ADD ECX,0x8
SHR ECX,0x3
AND ECX,0x3
LEA RDX,[0x20e9c8]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_0:
MOV R9D,0xfe000000
MOV ECX,EAX
SHL R9D,CL
XOR EDX,EDX
XOR EAX,EAX
JMP 0x001beb8d
caseD_2:
MOV EDX,0xfffffe00
MOV ECX,EAX
SHL EDX,CL
MOVZX EAX,DX
XOR ECX,ECX
JMP 0x001beba2
caseD_3:
MOV EDX,0xfffe0000
MOV ECX,EAX
SHL EDX,CL
AND EDX,0xfe0000
XOR EAX,EAX
MOV R9D,0xff000000
LAB_001beb8d:
XOR ECX,ECX
JMP 0x001bebad
caseD_1:
MOV EDX,0xfffffffe
MOV ECX,EAX
SHL EDX,CL
MOVZX ECX,DL
MOV EAX,0xff00
LAB_001beba2:
MOV EDX,0xff0000
MOV R9D,0xff000000
LAB_001bebad:
TEST ESI,ESI
JZ 0x001bebe5
OR EDX,R9D
OR EAX,ECX
OR EAX,EDX
NOT EAX
MOV ECX,R8D
MOV EDX,ESI
MOV ESI,0x1
LAB_001bebc4:
MOV R8,qword ptr [RDI + RSI*0x8 + -0x8]
MOV R8,qword ptr [R8]
AND EAX,dword ptr [R8 + RCX*0x4]
JZ 0x001bebde
LEA R8,[RSI + 0x1]
CMP RSI,RDX
MOV RSI,R8
JC 0x001bebc4
LAB_001bebde:
TEST EAX,EAX
SETNZ AL
JMP 0x001bebe7
LAB_001bebe5:
MOV AL,0x1
LAB_001bebe7:
POP RBX
POP R14
POP RBP
RET
|
bool bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4)
{
uint uVar1;
byte bVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
bool bVar9;
uVar4 = (ulong)(param_3 >> 5);
uVar6 = param_4 >> 5;
if (param_3 >> 5 < uVar6) {
do {
if (param_2 == 0) {
return true;
}
uVar8 = 0xffffffff;
uVar5 = 1;
do {
uVar8 = uVar8 & *(uint *)(**(long **)(param_1 + -8 + uVar5 * 8) + uVar4 * 4);
if (uVar8 == 0) break;
bVar9 = uVar5 < param_2;
uVar5 = uVar5 + 1;
} while (bVar9);
if (uVar8 != 0) {
return true;
}
uVar4 = uVar4 + 1;
} while (uVar4 != uVar6);
}
bVar2 = (byte)param_4 & 7;
switch(param_4 + 8 >> 3 & 3) {
case 0:
uVar7 = -0x2000000 << bVar2;
uVar8 = 0;
break;
case 1:
uVar3 = -2 << bVar2 & 0xff;
uVar1 = 0xff00;
goto LAB_001beba2;
case 2:
uVar1 = -0x200 << bVar2 & 0xffff;
uVar3 = 0;
LAB_001beba2:
uVar8 = 0xff0000;
uVar7 = 0xff000000;
goto LAB_001bebad;
case 3:
uVar8 = -0x20000 << bVar2 & 0xfe0000;
uVar7 = 0xff000000;
}
uVar1 = 0;
uVar3 = 0;
LAB_001bebad:
if (param_2 == 0) {
bVar9 = true;
}
else {
uVar8 = ~(uVar1 | uVar3 | uVar8 | uVar7);
uVar4 = 1;
do {
uVar8 = uVar8 & *(uint *)(**(long **)(param_1 + -8 + uVar4 * 8) + (ulong)uVar6 * 4);
if (uVar8 == 0) break;
bVar9 = uVar4 < param_2;
uVar4 = uVar4 + 1;
} while (bVar9);
bVar9 = uVar8 != 0;
}
return bVar9;
}
|
|
4,135 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/./minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O0 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movq 0x78(%rsp), %rsi
callq 0xfa350
movq 0x30(%rsp), %rdi
leaq 0x14cd62(%rip), %rax # 0x2532e8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x20, %rdi
movq %rdi, 0x18(%rsp)
movq 0x70(%rsp), %rsi
callq 0xd5e60
movq 0x30(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x20(%rsp)
movq 0x68(%rsp), %rsi
callq 0xd82b0
movq 0x30(%rsp), %rdi
addq $0x48, %rdi
movq %rdi, 0x28(%rsp)
movq 0x60(%rsp), %rsi
callq 0xf76a0
movq 0x30(%rsp), %rdi
addq $0x58, %rdi
movq %rdi, 0x38(%rsp)
callq 0x1066e0
movq $0x0, 0x58(%rsp)
movq 0x30(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x30, %rdi
callq 0xd5030
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x1066c3
movq 0x30(%rsp), %rdi
addq $0x30, %rdi
movq 0x58(%rsp), %rsi
callq 0x1066f0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x503b0
testb $0x1, %al
jne 0x1066ae
movq 0x30(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
addq $0x58, %rdi
movq 0x50(%rsp), %rsi
callq 0x106710
movq %rax, 0x8(%rsp)
jmp 0x10665e
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, (%rax)
jmp 0x1066ae
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x106740
movq 0x28(%rsp), %rdi
callq 0x6e6f0
movq 0x20(%rsp), %rdi
callq 0x79cc0
movq 0x18(%rsp), %rdi
callq 0x79d20
movq 0x30(%rsp), %rdi
callq 0xfa610
jmp 0x1066cb
jmp 0x1066b0
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x1065ec
addq $0x88, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nop
| _ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_20], rcx
mov [rsp+88h+var_28], r8
mov rdi, [rsp+88h+var_8]; this
mov [rsp+88h+var_58], rdi
mov rsi, [rsp+88h+var_10]; minja::Location *
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
mov rdi, [rsp+88h+var_58]
lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode
add rax, 10h
mov [rdi], rax
add rdi, 20h ; ' '
mov [rsp+88h+var_70], rdi
mov rsi, [rsp+88h+var_18]
call _ZNSt10shared_ptrIN5minja12VariableExprEEC2EOS2_; std::shared_ptr<minja::VariableExpr>::shared_ptr(std::shared_ptr<minja::VariableExpr>&&)
mov rdi, [rsp+88h+var_58]
add rdi, 30h ; '0'
mov [rsp+88h+var_68], rdi
mov rsi, [rsp+88h+var_20]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEC2EOSD_; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector(std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>&&)
mov rdi, [rsp+88h+var_58]
add rdi, 48h ; 'H'
mov [rsp+88h+var_60], rdi
mov rsi, [rsp+88h+var_28]
call _ZNSt10shared_ptrIN5minja12TemplateNodeEEC2EOS2_; std::shared_ptr<minja::TemplateNode>::shared_ptr(std::shared_ptr<minja::TemplateNode>&&)
mov rdi, [rsp+88h+var_58]
add rdi, 58h ; 'X'
mov [rsp+88h+var_50], rdi
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEC2Ev; std::unordered_map<std::string,ulong>::unordered_map(void)
mov [rsp+88h+var_30], 0
loc_1065EC:
mov rdi, [rsp+88h+var_58]
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_78], rax
add rdi, 30h ; '0'
call _ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE4sizeEv; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size(void)
mov rcx, rax
mov rax, [rsp+88h+var_78]
cmp rax, rcx
jnb loc_1066C3
mov rdi, [rsp+88h+var_58]
add rdi, 30h ; '0'
mov rsi, [rsp+88h+var_30]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEixEm; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[](ulong)
mov [rsp+88h+var_38], rax
mov rdi, [rsp+88h+var_38]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_1066AE
mov rdi, [rsp+88h+var_58]
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_88], rax
add rdi, 58h ; 'X'
mov rsi, [rsp+88h+var_38]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEixERSB_; std::unordered_map<std::string,ulong>::operator[](std::string const&)
mov [rsp+88h+var_80], rax
jmp short $+2
loc_10665E:
mov rax, [rsp+88h+var_80]
mov rcx, [rsp+88h+var_88]
mov [rax], rcx
jmp short loc_1066AE
mov rdi, [rsp+arg_30]
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEED2Ev; std::unordered_map<std::string,ulong>::~unordered_map()
mov rdi, [rsp+arg_20]
call _ZNSt10shared_ptrIN5minja12TemplateNodeEED2Ev; std::shared_ptr<minja::TemplateNode>::~shared_ptr()
mov rdi, [rsp+arg_18]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector()
mov rdi, [rsp+arg_10]
call _ZNSt10shared_ptrIN5minja12VariableExprEED2Ev; std::shared_ptr<minja::VariableExpr>::~shared_ptr()
mov rdi, [rsp+arg_28]; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
jmp short loc_1066CB
loc_1066AE:
jmp short $+2
loc_1066B0:
mov rax, [rsp+88h+var_30]
add rax, 1
mov [rsp+88h+var_30], rax
jmp loc_1065EC
loc_1066C3:
add rsp, 88h
retn
loc_1066CB:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| unsigned long long minja::MacroNode::MacroNode(
minja::TemplateNode *a1,
const minja::Location *a2,
long long a3,
long long a4,
long long a5)
{
unsigned long long v5; // rcx
unsigned long long result; // rax
long long v7; // [rsp+50h] [rbp-38h]
unsigned long long i; // [rsp+58h] [rbp-30h]
minja::TemplateNode::TemplateNode(a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2;
std::shared_ptr<minja::VariableExpr>::shared_ptr((long long)a1 + 32, a3);
std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector((long long)a1 + 48, a4);
std::shared_ptr<minja::TemplateNode>::shared_ptr((long long)a1 + 72, a5);
std::unordered_map<std::string,unsigned long>::unordered_map();
for ( i = 0LL; ; ++i )
{
v5 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size((_QWORD *)a1 + 6);
result = i;
if ( i >= v5 )
break;
v7 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[]((char *)a1 + 48, i);
if ( (std::string::empty(v7) & 1) == 0 )
*(_QWORD *)std::unordered_map<std::string,unsigned long>::operator[]((char *)a1 + 88, v7) = i;
}
return result;
}
| |||
4,136 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/./minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O2 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
callq 0x55f10
leaq 0x87c36(%rip), %rax # 0xe1478
movq %rax, (%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x28(%rbx)
movups (%r13), %xmm0
andq $0x0, 0x8(%r13)
movups %xmm0, 0x20(%rbx)
andq $0x0, (%r13)
movups (%r12), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x10(%r12), %rax
movq %rax, 0x40(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%r12)
movups %xmm0, (%r12)
andq $0x0, 0x50(%rbx)
movups (%r15), %xmm1
andq $0x0, 0x8(%r15)
movups %xmm1, 0x48(%rbx)
andq $0x0, (%r15)
leaq 0x30(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rbx), %r12
leaq 0x58(%rbx), %r13
leaq 0x88(%rbx), %rax
movq %rax, 0x58(%rbx)
movq $0x1, 0x60(%rbx)
movups %xmm0, 0x68(%rbx)
movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000
movups %xmm0, 0x80(%rbx)
xorl %ebp, %ebp
pushq $0x30
popq %r14
xorl %r15d, %r15d
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r14
cmpq %rax, %r15
jae 0x5990f
cmpq $0x0, 0x8(%rsi,%rbp)
je 0x59906
addq %rbp, %rsi
movq %r13, %rdi
callq 0x59b04
movq %r15, (%rax)
incq %r15
addq $0x30, %rbp
jmp 0x598db
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq %r13, %rdi
callq 0x59f92
movq %r12, %rdi
callq 0x2eeb2
movq 0x8(%rsp), %rdi
callq 0x30168
movq 0x10(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rdi
callq 0x5ae9c
movq %rbp, %rdi
callq 0x20b90
nop
| _ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, off_E1478
mov [rbx], rax
lea rax, [rbx+28h]
mov [rsp+48h+var_38], rax
and qword ptr [rbx+28h], 0
movups xmm0, xmmword ptr [r13+0]
and qword ptr [r13+8], 0
movups xmmword ptr [rbx+20h], xmm0
and qword ptr [r13+0], 0
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rbx+30h], xmm0
mov rax, [r12+10h]
mov [rbx+40h], rax
xorps xmm0, xmm0
and qword ptr [r12+10h], 0
movups xmmword ptr [r12], xmm0
and qword ptr [rbx+50h], 0
movups xmm1, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [rbx+48h], xmm1
and qword ptr [r15], 0
lea rax, [rbx+30h]
mov [rsp+48h+var_40], rax
lea r12, [rbx+50h]
lea r13, [rbx+58h]
lea rax, [rbx+88h]
mov [rbx+58h], rax
mov qword ptr [rbx+60h], 1
movups xmmword ptr [rbx+68h], xmm0
mov dword ptr [rbx+78h], 3F800000h
movups xmmword ptr [rbx+80h], xmm0
xor ebp, ebp
push 30h ; '0'
pop r14
xor r15d, r15d
loc_598DB:
mov rsi, [rbx+30h]
mov rax, [rbx+38h]
sub rax, rsi
cqo
idiv r14
cmp r15, rax
jnb short loc_5990F
cmp qword ptr [rsi+rbp+8], 0
jz short loc_59906
add rsi, rbp
mov rdi, r13
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&)
mov [rax], r15
loc_59906:
inc r15
add rbp, 30h ; '0'
jmp short loc_598DB
loc_5990F:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbp, rax
mov rdi, r13
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+arg_0]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector()
mov rdi, [rsp+arg_8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, rbp
call __Unwind_Resume
| unsigned long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5)
{
int v8; // ecx
int v9; // r8d
int v10; // r9d
__int128 v11; // xmm0
__int128 v12; // xmm1
long long v13; // rbp
unsigned long long i; // r15
long long v15; // rsi
unsigned long long result; // rax
char v17; // [rsp+0h] [rbp-48h]
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &off_E1478;
*(_QWORD *)(a1 + 40) = 0LL;
v11 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v11;
*(_QWORD *)a3 = 0LL;
*(_OWORD *)(a1 + 48) = *(_OWORD *)a4;
*(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16);
*(_QWORD *)(a4 + 16) = 0LL;
*(_OWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v12 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v12;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 136;
*(_QWORD *)(a1 + 96) = 1LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_DWORD *)(a1 + 120) = 1065353216;
*(_OWORD *)(a1 + 128) = 0LL;
v13 = 0LL;
for ( i = 0LL; ; ++i )
{
v15 = *(_QWORD *)(a1 + 48);
result = (*(_QWORD *)(a1 + 56) - v15) / 48;
if ( i >= result )
break;
if ( *(_QWORD *)(v15 + v13 + 8) )
*(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](
(int)a1 + 88,
(int)v13 + (int)v15,
(*(_QWORD *)(a1 + 56) - v15) % 48,
v8,
v9,
v10,
v17) = i;
v13 += 48LL;
}
return result;
}
| |||
4,137 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/./minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O3 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0x7842f
movq (%rsi), %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r15)
jne 0x78426
movb $0x1, %bpl
testq %r14, %r14
je 0x78431
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x186e0
testl %eax, %eax
je 0x78431
addq $0x70, %r15
cmpq %r12, %r15
jne 0x78406
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
mov r15, [rdi+18h]
mov r12, [rdi+20h]
cmp r15, r12
jz short loc_7842F
mov rbx, [rsi]
mov r14, [rsi+8]
loc_78406:
cmp [r15+8], r14
jnz short loc_78426
mov bpl, 1
test r14, r14
jz short loc_78431
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_78431
loc_78426:
add r15, 70h ; 'p'
cmp r15, r12
jnz short loc_78406
loc_7842F:
xor ebp, ebp
loc_78431:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long minja::ArgumentsValue::has_named(long long a1, long long *a2)
{
unsigned int v2; // ebp
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // r14
v3 = *(_QWORD **)(a1 + 24);
v4 = *(_QWORD **)(a1 + 32);
if ( v3 == v4 )
{
return 0;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
if ( v3[1] == v6 )
{
LOBYTE(v2) = 1;
if ( !v6 || !(unsigned int)bcmp(*v3, v5) )
break;
}
v3 += 14;
if ( v3 == v4 )
return 0;
}
}
return v2;
}
| has_named:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RDI + 0x20]
CMP R15,R12
JZ 0x0017842f
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_00178406:
CMP qword ptr [R15 + 0x8],R14
JNZ 0x00178426
MOV BPL,0x1
TEST R14,R14
JZ 0x00178431
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x001186e0
TEST EAX,EAX
JZ 0x00178431
LAB_00178426:
ADD R15,0x70
CMP R15,R12
JNZ 0x00178406
LAB_0017842f:
XOR EBP,EBP
LAB_00178431:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
ulong unaff_RBP;
int8 *puVar3;
puVar3 = *(int8 **)(this + 0x18);
puVar1 = *(int8 **)(this + 0x20);
if (puVar3 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar3[1] == __n) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1);
if (__n == 0) goto LAB_00178431;
iVar2 = bcmp((void *)*puVar3,__s2,__n);
if (iVar2 == 0) goto LAB_00178431;
}
puVar3 = puVar3 + 0xe;
} while (puVar3 != puVar1);
}
unaff_RBP = 0;
LAB_00178431:
return unaff_RBP & 0xffffffff;
}
|
|
4,138 | my_strnncoll_binary | eloqsql/strings/ctype-bin.c | static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
} | O0 | c | my_strnncoll_binary:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x36ee6
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x36eee
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24140
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x36f18
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x36f3e
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x36f2b
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x36f33
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strnncoll_binary:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
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_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_36EE6
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_36EEE
loc_36EE6:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_36EEE:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_36F18
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_36F3E
loc_36F18:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_36F2B
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_36F33
loc_36F2B:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_36F33:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_36F3E:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
| long long my_strnncoll_binary(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
| my_strnncoll_binary:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
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 byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00136ee6
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00136eee
LAB_00136ee6:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_00136eee:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124140
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00136f18
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00136f3e
LAB_00136f18:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x00136f2b
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00136f33
LAB_00136f2b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_00136f33:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_00136f3e:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_binary(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
|
|
4,139 | TinyAutoEncoder::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ggml_backend*) | 7CodeWizard[P]stablediffusion/tae.hpp | bool load_from_file(const std::string& file_path, ggml_backend_t backend) {
LOG_INFO("loading taesd from '%s'", file_path.c_str());
if (!alloc_params_buffer(backend)) {
return false;
}
std::map<std::string, ggml_tensor*> taesd_tensors;
// prepare memory for the weights
{
init_params();
map_by_name(taesd_tensors);
}
std::map<std::string, struct ggml_tensor*> tensors_need_to_load;
std::set<std::string> ignore_tensors;
for (auto& pair : taesd_tensors) {
const std::string& name = pair.first;
if (decode_only && starts_with(name, "encoder")) {
ignore_tensors.insert(name);
continue;
}
tensors_need_to_load.insert(pair);
}
ModelLoader model_loader;
if (!model_loader.init_from_file(file_path)) {
LOG_ERROR("init taesd model loader from file failed: '%s'", file_path.c_str());
return false;
}
bool success = model_loader.load_tensors(tensors_need_to_load, backend, ignore_tensors);
if (!success) {
LOG_ERROR("load tae tensors from model loader failed");
return false;
}
LOG_INFO("taesd model loaded");
return success;
} | O1 | cpp | TinyAutoEncoder::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ggml_backend*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r8
leaq 0x7eaa1(%rip), %rsi # 0xbeb51
leaq 0x7eae8(%rip), %rcx # 0xbeb9f
xorl %ebp, %ebp
movl $0x1, %edi
movl $0x1e2, %edx # imm = 0x1E2
xorl %eax, %eax
callq 0x7a4d6
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3d56a
testb %al, %al
je 0x40361
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
leaq 0x90(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq %r15, %rdi
callq 0x49a44
leaq 0x88(%rsp), %rsi
movq %r15, %rdi
callq 0x49ac8
leaq 0xf0(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0xc0(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0xa0(%rsp), %r12
leaq 0x90(%rsp), %rax
cmpq %rax, %r12
je 0x4021a
movq %rsp, %rbx
leaq 0x20(%r12), %rbp
movb 0x5f8(%r15), %r13b
cmpb $0x1, %r13b
jne 0x401b4
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq 0x7dff6(%rip), %rsi # 0xbe18e
leaq 0x7dff6(%rip), %rdx # 0xbe195
callq 0x2fa9c
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x79ad7
movl %eax, %r14d
jmp 0x401b7
xorl %r14d, %r14d
testb %r13b, %r13b
je 0x401d7
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x401d7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5e0
testb %r14b, %r14b
je 0x401ee
leaq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0x4731c
jmp 0x401fe
leaq 0xe8(%rsp), %rdi
movq %rbp, %rsi
callq 0x474c4
movq %r12, %rdi
callq 0xa3e0
movq %rax, %r12
leaq 0x90(%rsp), %rax
cmpq %rax, %r12
jne 0x40173
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x84bf2(%rip), %rdx # 0xc4e2e
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x2fa9c
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x68b5e
movq 0x28(%rsp), %r15
movl %eax, %ebx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x4027e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xa5e0
testb %bl, %bl
je 0x40301
leaq 0x118(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x475c6
leaq 0x50(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0x118(%rsp), %rcx
movq %r15, %rdx
callq 0x6b4e2
movl %eax, %ebp
leaq 0x118(%rsp), %rdi
callq 0x477ea
movzbl %bpl, %eax
movl %ebp, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
leal 0x1(,%rcx,2), %edi
leal 0x206(,%rax,4), %edx
leaq 0x7e92c(%rip), %rsi # 0xbec10
leaq 0x7e8fb(%rip), %rcx # 0xbebe6
testb %al, %al
cmovneq %rsi, %rcx
leaq 0x7e859(%rip), %rsi # 0xbeb51
xorl %eax, %eax
callq 0x7a4d6
jmp 0x40326
movq (%r12), %r8
xorl %ebp, %ebp
leaq 0x7e843(%rip), %rsi # 0xbeb51
leaq 0x7e8a2(%rip), %rcx # 0xbebb7
movl $0x3, %edi
movl $0x1ff, %edx # imm = 0x1FF
xorl %eax, %eax
callq 0x7a4d6
leaq 0x68(%rsp), %rdi
callq 0x3c8ac
leaq 0x50(%rsp), %rdi
callq 0x3c908
leaq 0xb8(%rsp), %rdi
callq 0x477ea
leaq 0xe8(%rsp), %rdi
callq 0x3c9e2
leaq 0x88(%rsp), %rdi
callq 0x3c9e2
movl %ebp, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x477ea
jmp 0x403aa
jmp 0x403a7
jmp 0x403a7
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x403aa
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x403aa
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3c8ac
leaq 0x50(%rsp), %rdi
callq 0x3c908
jmp 0x403ea
movq %rax, %rbx
jmp 0x40404
jmp 0x403e7
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x403ea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x403ea
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x477ea
leaq 0xe8(%rsp), %rdi
callq 0x3c9e2
leaq 0x88(%rsp), %rdi
callq 0x3c9e2
movq %rbx, %rdi
callq 0xaae0
nop
| _ZN15TinyAutoEncoder14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12ggml_backend:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov r8, [rsi]
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aLoadingTaesdFr; "loading taesd from '%s'"
xor ebp, ebp
mov edi, 1
mov edx, 1E2h
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdi, r15
mov rsi, rbx
xor edx, edx
call _ZN10GGMLModule19alloc_params_bufferEP12ggml_backend9ggml_type; GGMLModule::alloc_params_buffer(ggml_backend *,ggml_type)
test al, al
jz loc_40361
mov [rsp+178h+var_158], r14
mov [rsp+178h+var_150], rbx
lea rcx, [rsp+178h+var_E8]
mov dword ptr [rcx], 0
xor eax, eax
mov [rcx+8], rax
mov [rcx+10h], rcx
mov [rcx+18h], rcx
mov [rcx+20h], rax
mov rdi, r15; this
call _ZN15TinyAutoEncoder11init_paramsEv; TinyAutoEncoder::init_params(void)
lea rsi, [rsp+178h+var_F0]
mov rdi, r15
call _ZN15TinyAutoEncoder11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEE; TinyAutoEncoder::map_by_name(std::map<std::string,ggml_tensor *> &)
lea rax, [rsp+178h+var_88]
xor ecx, ecx
mov [rax], ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
lea rax, [rsp+178h+var_B8]
mov [rax], ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
mov r12, [rsp+178h+var_D8]
lea rax, [rsp+178h+var_E8]
cmp r12, rax
jz loc_4021A
mov rbx, rsp
loc_40173:
lea rbp, [r12+20h]
mov r13b, [r15+5F8h]
cmp r13b, 1
jnz short loc_401B4
lea rax, [rsp+178h+var_168]
mov [rsp+178h+var_178], rax
mov rdi, rbx
lea rsi, aFirstStageMode_16+12h; "encoder"
lea rdx, aFirstStageMode_16+19h; ""
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)
mov rdi, rbp
mov rsi, rbx
call _Z11starts_withRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; starts_with(std::string const&,std::string const&)
mov r14d, eax
jmp short loc_401B7
loc_401B4:
xor r14d, r14d
loc_401B7:
test r13b, r13b
jz short loc_401D7
mov rdi, [rsp+178h+var_178]; void *
lea rax, [rsp+178h+var_168]
cmp rdi, rax
jz short loc_401D7
mov rsi, [rsp+178h+var_168]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_401D7:
test r14b, r14b
jz short loc_401EE
lea rdi, [rsp+178h+var_C0]
mov rsi, rbp
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&)
jmp short loc_401FE
loc_401EE:
lea rdi, [rsp+178h+var_90]
mov rsi, rbp
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE17_M_emplace_uniqueIJRSA_EEES6_ISt17_Rb_tree_iteratorISA_EbEDpOT_; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_M_emplace_unique<std::pair<std::string const,ggml_tensor *>&>(std::pair<std::string const,ggml_tensor *>&)
loc_401FE:
mov rdi, r12
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r12, rax
lea rax, [rsp+178h+var_E8]
cmp r12, rax
jnz loc_40173
loc_4021A:
xorps xmm0, xmm0
movaps [rsp+178h+var_108], xmm0
movaps [rsp+178h+var_118], xmm0
movaps xmmword ptr [rsp+178h+var_128], xmm0
lea r14, [rsp+178h+var_138]
mov [r14-10h], r14
lea rdx, unk_C4E2E
lea rdi, [rsp+178h+var_148]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+178h+var_128]; int
lea rdx, [rsp+178h+var_148]
mov r12, [rsp+178h+var_158]
mov rsi, r12
call _ZN11ModelLoader14init_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_file(std::string const&,std::string const&)
mov r15, [rsp+178h+var_150]
mov ebx, eax
mov rdi, [rsp+178h+var_148]; void *
cmp rdi, r14
jz short loc_4027E
mov rsi, [rsp+178h+var_138]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4027E:
test bl, bl
jz short loc_40301
lea rdi, [rsp+178h+var_60]
lea rsi, [rsp+178h+var_C0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EEC2ERKSB_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_Rb_tree(std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>> const&)
lea rdi, [rsp+178h+var_128]; __int64
lea rsi, [rsp+178h+var_90]
lea rcx, [rsp+178h+var_60]
mov rdx, r15
call _ZN11ModelLoader12load_tensorsERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEEP12ggml_backendSt3setIS6_SA_SaIS6_EE; ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)
mov ebp, eax
lea rdi, [rsp+178h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
movzx eax, bpl
mov ecx, ebp
xor cl, 1
movzx ecx, cl
lea edi, ds:1[rcx*2]
lea edx, ds:206h[rax*4]
lea rsi, aTaesdModelLoad; "taesd model loaded"
lea rcx, aLoadTaeTensors; "load tae tensors from model loader fail"...
test al, al
cmovnz rcx, rsi
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
jmp short loc_40326
loc_40301:
mov r8, [r12]
xor ebp, ebp
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aInitTaesdModel; "init taesd model loader from file faile"...
mov edi, 3
mov edx, 1FFh
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
loc_40326:
lea rdi, [rsp+178h+var_118+8]
call _ZNSt6vectorI13TensorStorageSaIS0_EED2Ev; std::vector<TensorStorage>::~vector()
lea rdi, [rsp+178h+var_128]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_C0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
lea rdi, [rsp+178h+var_90]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
lea rdi, [rsp+178h+var_F0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
loc_40361:
mov eax, ebp
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_110]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
jmp short loc_403AA
jmp short loc_403A7
jmp short loc_403A7
mov rbx, rax
mov rdi, [rsp+arg_28]; void *
cmp rdi, r14
jz short loc_403AA
mov rsi, [rsp+arg_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_403AA
loc_403A7:
mov rbx, rax
loc_403AA:
lea rdi, [rsp+arg_60]
call _ZNSt6vectorI13TensorStorageSaIS0_EED2Ev; std::vector<TensorStorage>::~vector()
lea rdi, [rsp+arg_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_403EA
mov rbx, rax
jmp short loc_40404
jmp short loc_403E7
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_403EA
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_403EA
loc_403E7:
mov rbx, rax
loc_403EA:
lea rdi, [rsp+arg_B0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
lea rdi, [rsp+arg_E0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
loc_40404:
lea rdi, [rsp+arg_80]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long TinyAutoEncoder::load_from_file(
TinyAutoEncoder *this,
_QWORD *a2,
long long a3,
long long a4,
long long a5,
int a6)
{
unsigned int tensors; // ebp
int *i; // r12
char v9; // r13
char v10; // r14
_QWORD *v11; // r12
char v12; // bl
int v13; // r9d
int v14; // r8d
int v15; // r9d
const char *v16; // rcx
void *v18[2]; // [rsp+0h] [rbp-178h] BYREF
_QWORD v19[2]; // [rsp+10h] [rbp-168h] BYREF
_QWORD *v20; // [rsp+20h] [rbp-158h]
long long v21; // [rsp+28h] [rbp-150h]
void *v22; // [rsp+30h] [rbp-148h] BYREF
_QWORD v23[2]; // [rsp+40h] [rbp-138h] BYREF
long long v24[2]; // [rsp+50h] [rbp-128h] BYREF
_OWORD v25[2]; // [rsp+60h] [rbp-118h] BYREF
_BYTE v26[8]; // [rsp+88h] [rbp-F0h] BYREF
int v27; // [rsp+90h] [rbp-E8h] BYREF
long long v28; // [rsp+98h] [rbp-E0h]
int *v29; // [rsp+A0h] [rbp-D8h]
int *v30; // [rsp+A8h] [rbp-D0h]
long long v31; // [rsp+B0h] [rbp-C8h]
_BYTE v32[8]; // [rsp+B8h] [rbp-C0h] BYREF
int v33; // [rsp+C0h] [rbp-B8h] BYREF
long long v34; // [rsp+C8h] [rbp-B0h]
int *v35; // [rsp+D0h] [rbp-A8h]
int *v36; // [rsp+D8h] [rbp-A0h]
long long v37; // [rsp+E0h] [rbp-98h]
_BYTE v38[8]; // [rsp+E8h] [rbp-90h] BYREF
int v39; // [rsp+F0h] [rbp-88h] BYREF
long long v40; // [rsp+F8h] [rbp-80h]
int *v41; // [rsp+100h] [rbp-78h]
int *v42; // [rsp+108h] [rbp-70h]
long long v43; // [rsp+110h] [rbp-68h]
_BYTE v44[96]; // [rsp+118h] [rbp-60h] BYREF
tensors = 0;
log_printf(
1,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
482,
(unsigned int)"loading taesd from '%s'",
*a2,
a6);
if ( GGMLModule::alloc_params_buffer((long long)this, a3, 0) )
{
v20 = a2;
v21 = a3;
v27 = 0;
v28 = 0LL;
v29 = &v27;
v30 = &v27;
v31 = 0LL;
TinyAutoEncoder::init_params(this);
TinyAutoEncoder::map_by_name(this, v26);
v39 = 0;
v40 = 0LL;
v41 = &v39;
v42 = &v39;
v43 = 0LL;
v33 = 0;
v34 = 0LL;
v35 = &v33;
v36 = &v33;
v37 = 0LL;
for ( i = v29; i != &v27; i = (int *)std::_Rb_tree_increment(i) )
{
v9 = *((_BYTE *)this + 1528);
if ( v9 == 1 )
{
v18[0] = v19;
std::string::_M_construct<char const*>(v18, "encoder", (long long)"");
v10 = starts_with(i + 8, v18);
}
else
{
v10 = 0;
}
if ( v9 && v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
if ( v10 )
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(
v32,
i + 8);
else
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_M_emplace_unique<std::pair<std::string const,ggml_tensor *>&>(
v38,
i + 8);
}
memset(v25, 0, sizeof(v25));
*(_OWORD *)v24 = 0LL;
v22 = v23;
std::string::_M_construct<char const*>(&v22, &unk_C4E2E, (long long)&unk_C4E2E);
v11 = v20;
v12 = ModelLoader::init_from_file((int)v24);
if ( v22 != v23 )
operator delete(v22, v23[0] + 1LL);
if ( v12 )
{
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_Rb_tree(
v44,
v32);
tensors = ModelLoader::load_tensors((long long)v24);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(
v44,
v38);
v16 = "load tae tensors from model loader failed";
if ( (_BYTE)tensors )
v16 = "taesd model loaded";
log_printf(
2 * ((unsigned __int8)tensors ^ 1) + 1,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
4 * (unsigned __int8)tensors + 518,
(_DWORD)v16,
v14,
v15);
}
else
{
tensors = 0;
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
511,
(unsigned int)"init taesd model loader from file failed: '%s'",
*v11,
v13);
}
std::vector<TensorStorage>::~vector((_QWORD *)v25 + 1);
std::vector<std::string>::~vector(v24);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(
v32,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp");
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((long long)v38);
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((long long)v26);
}
return tensors;
}
| |||
4,140 | TinyAutoEncoder::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ggml_backend*) | 7CodeWizard[P]stablediffusion/tae.hpp | bool load_from_file(const std::string& file_path, ggml_backend_t backend) {
LOG_INFO("loading taesd from '%s'", file_path.c_str());
if (!alloc_params_buffer(backend)) {
return false;
}
std::map<std::string, ggml_tensor*> taesd_tensors;
// prepare memory for the weights
{
init_params();
map_by_name(taesd_tensors);
}
std::map<std::string, struct ggml_tensor*> tensors_need_to_load;
std::set<std::string> ignore_tensors;
for (auto& pair : taesd_tensors) {
const std::string& name = pair.first;
if (decode_only && starts_with(name, "encoder")) {
ignore_tensors.insert(name);
continue;
}
tensors_need_to_load.insert(pair);
}
ModelLoader model_loader;
if (!model_loader.init_from_file(file_path)) {
LOG_ERROR("init taesd model loader from file failed: '%s'", file_path.c_str());
return false;
}
bool success = model_loader.load_tensors(tensors_need_to_load, backend, ignore_tensors);
if (!success) {
LOG_ERROR("load tae tensors from model loader failed");
return false;
}
LOG_INFO("taesd model loaded");
return success;
} | O2 | cpp | TinyAutoEncoder::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ggml_backend*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r8
leaq 0x72df9(%rip), %rsi # 0x9aa81
leaq 0x72e40(%rip), %rcx # 0x9aacf
xorl %ebp, %ebp
pushq $0x1
popq %rdi
movl $0x1e2, %edx # imm = 0x1E2
xorl %eax, %eax
callq 0x55f59
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x265a6
testb %al, %al
je 0x27ed1
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
leaq 0xe0(%rsp), %r14
andl $0x0, (%r14)
andq $0x0, 0x8(%r14)
movq %r14, 0x10(%r14)
movq %r14, 0x18(%r14)
andq $0x0, 0x20(%r14)
movq %r15, %rdi
callq 0x2ef8a
leaq 0xd8(%rsp), %rsi
movq %r15, %rdi
callq 0x2f008
leaq 0xb0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x80(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq 0xf0(%rsp), %rbp
leaq 0x20(%rsp), %r13
cmpq %r14, %rbp
je 0x27da8
leaq 0x20(%rbp), %r12
cmpb $0x1, 0x5f8(%r15)
jne 0x27d8b
movq %r13, %rdi
leaq 0x72365(%rip), %rsi # 0x9a0be
leaq 0x58(%rsp), %rdx
callq 0x19f24
movq %r12, %rdi
movq %r13, %rsi
callq 0x558c7
movl %eax, %ebx
movq %r13, %rdi
callq 0xac60
testb %bl, %bl
je 0x27d8b
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x2ccd0
jmp 0x27d9b
leaq 0xa8(%rsp), %rdi
movq %r12, %rsi
callq 0x2ceae
movq %rbp, %rdi
callq 0xa3d0
movq %rax, %rbp
jmp 0x27d3c
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x78f7d(%rip), %rsi # 0xa0d3e
leaq 0x58(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x19f24
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x47530
movq 0x18(%rsp), %r14
movl %eax, %ebx
leaq 0x58(%rsp), %rdi
callq 0xac60
testb %bl, %bl
je 0x27e60
leaq 0x108(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2cfbc
leaq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x108(%rsp), %rcx
movq %r14, %rdx
callq 0x4935e
movl %eax, %ebx
leaq 0x108(%rsp), %rdi
callq 0x2d1a4
testb %bl, %bl
je 0x27e84
movb $0x1, %bpl
leaq 0x72c39(%rip), %rsi # 0x9aa81
leaq 0x72cf1(%rip), %rcx # 0x9ab40
pushq $0x1
popq %rdi
movl $0x20a, %edx # imm = 0x20A
xorl %eax, %eax
callq 0x55f59
jmp 0x27ea3
movq (%r15), %r8
xorl %ebp, %ebp
leaq 0x72c15(%rip), %rsi # 0x9aa81
leaq 0x72c74(%rip), %rcx # 0x9aae7
pushq $0x3
popq %rdi
movl $0x1ff, %edx # imm = 0x1FF
xorl %eax, %eax
callq 0x55f59
jmp 0x27ea3
xorl %ebp, %ebp
leaq 0x72bf4(%rip), %rsi # 0x9aa81
leaq 0x72c82(%rip), %rcx # 0x9ab16
pushq $0x3
popq %rdi
movl $0x206, %edx # imm = 0x206
xorl %eax, %eax
callq 0x55f59
leaq 0x20(%rsp), %rdi
callq 0x25cf6
leaq 0x78(%rsp), %rdi
callq 0x2d1a4
leaq 0xa8(%rsp), %rdi
callq 0x25e24
leaq 0xd8(%rsp), %rdi
callq 0x25e24
movl %ebp, %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2d1a4
jmp 0x27f0d
jmp 0x27f0a
jmp 0x27f0a
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xac60
jmp 0x27f0d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x25cf6
jmp 0x27f32
movq %rax, %rbx
jmp 0x27f49
jmp 0x27f2f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xac60
jmp 0x27f32
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2d1a4
leaq 0xa8(%rsp), %rdi
callq 0x25e24
leaq 0xd8(%rsp), %rdi
callq 0x25e24
movq %rbx, %rdi
callq 0xaab0
| _ZN15TinyAutoEncoder14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12ggml_backend:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov r8, [rsi]
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aLoadingTaesdFr; "loading taesd from '%s'"
xor ebp, ebp
push 1
pop rdi
mov edx, 1E2h
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdi, r15
mov rsi, rbx
xor edx, edx
call _ZN10GGMLModule19alloc_params_bufferEP12ggml_backend9ggml_type; GGMLModule::alloc_params_buffer(ggml_backend *,ggml_type)
test al, al
jz loc_27ED1
mov qword ptr [rsp+168h+var_158], r14; int
mov qword ptr [rsp+168h+var_150], rbx; char
lea r14, [rsp+168h+var_88]
and dword ptr [r14], 0
and qword ptr [r14+8], 0
mov [r14+10h], r14
mov [r14+18h], r14
and qword ptr [r14+20h], 0
mov rdi, r15; this
call _ZN15TinyAutoEncoder11init_paramsEv; TinyAutoEncoder::init_params(void)
lea rsi, [rsp+168h+var_90]
mov rdi, r15
call _ZN15TinyAutoEncoder11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEE; TinyAutoEncoder::map_by_name(std::map<std::string,ggml_tensor *> &)
lea rax, [rsp+168h+var_B8]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
lea rax, [rsp+168h+var_E8]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
mov rbp, [rsp+168h+var_78]
lea r13, [rsp+168h+var_148]
loc_27D3C:
cmp rbp, r14
jz short loc_27DA8
lea r12, [rbp+20h]
cmp byte ptr [r15+5F8h], 1
jnz short loc_27D8B
mov rdi, r13
lea rsi, aFirstStageMode_16+12h; "encoder"
lea rdx, [rsp+168h+var_110]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r12
mov rsi, r13
call _Z11starts_withRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; starts_with(std::string const&,std::string const&)
mov ebx, eax
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bl, bl
jz short loc_27D8B
lea rdi, [rsp+168h+var_F0]
mov rsi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&)
jmp short loc_27D9B
loc_27D8B:
lea rdi, [rsp+168h+var_C0]
mov rsi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE17_M_emplace_uniqueIJRSA_EEES6_ISt17_Rb_tree_iteratorISA_EbEDpOT_; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_M_emplace_unique<std::pair<std::string const,ggml_tensor *>&>(std::pair<std::string const,ggml_tensor *>&)
loc_27D9B:
mov rdi, rbp
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov rbp, rax
jmp short loc_27D3C
loc_27DA8:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+168h+var_128], xmm0; int
movaps xmmword ptr [rsp+168h+var_138], xmm0; int
movaps xmmword ptr [rsp+168h+var_148], xmm0; int
lea rsi, unk_A0D3E
lea rdi, [rsp+168h+var_110]
lea rdx, [rsp+168h+var_159]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+168h+var_148]
lea rdx, [rsp+168h+var_110]
mov r15, qword ptr [rsp+168h+var_158]
mov rsi, r15
call _ZN11ModelLoader14init_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_file(std::string const&,std::string const&)
mov r14, qword ptr [rsp+168h+var_150]
mov ebx, eax
lea rdi, [rsp+168h+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bl, bl
jz short loc_27E60
lea rdi, [rsp+168h+var_60]
lea rsi, [rsp+168h+var_F0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EEC2ERKSB_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_Rb_tree(std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>> const&)
lea rdi, [rsp+168h+var_148]; int
lea rsi, [rsp+168h+var_C0]
lea rcx, [rsp+168h+var_60]
mov rdx, r14
call _ZN11ModelLoader12load_tensorsERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEEP12ggml_backendSt3setIS6_SA_SaIS6_EE; ModelLoader::load_tensors(std::map<std::string,ggml_tensor *> &,ggml_backend *,std::set<std::string>)
mov ebx, eax
lea rdi, [rsp+168h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
test bl, bl
jz short loc_27E84
mov bpl, 1
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTaesdModelLoad; "taesd model loaded"
push 1
pop rdi
mov edx, 20Ah
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
jmp short loc_27EA3
loc_27E60:
mov r8, [r15]
xor ebp, ebp
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aInitTaesdModel; "init taesd model loader from file faile"...
push 3
pop rdi
mov edx, 1FFh
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
jmp short loc_27EA3
loc_27E84:
xor ebp, ebp
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aLoadTaeTensors; "load tae tensors from model loader fail"...
push 3
pop rdi
mov edx, 206h
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
loc_27EA3:
lea rdi, [rsp+168h+var_148]; this
call _ZN11ModelLoaderD2Ev; ModelLoader::~ModelLoader()
lea rdi, [rsp+168h+var_F0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
lea rdi, [rsp+168h+var_C0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
lea rdi, [rsp+168h+var_90]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
loc_27ED1:
mov eax, ebp
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_100]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
jmp short loc_27F0D
jmp short loc_27F0A
jmp short loc_27F0A
mov rbx, rax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27F0D
loc_27F0A:
mov rbx, rax
loc_27F0D:
lea rdi, [rsp+arg_18]; this
call _ZN11ModelLoaderD2Ev; ModelLoader::~ModelLoader()
jmp short loc_27F32
mov rbx, rax
jmp short loc_27F49
jmp short loc_27F2F
mov rbx, rax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27F32
loc_27F2F:
mov rbx, rax
loc_27F32:
lea rdi, [rsp+arg_70]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
lea rdi, [rsp+arg_A0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
loc_27F49:
lea rdi, [rsp+arg_D0]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long TinyAutoEncoder::load_from_file(
TinyAutoEncoder *this,
_QWORD *a2,
long long a3,
long long a4,
long long a5,
int a6)
{
int *i; // rbp
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
char v12; // bl
char v13; // bl
int v14; // r9d
char tensors; // bl
int v16; // r8d
int v17; // r9d
int v19; // [rsp+0h] [rbp-168h]
int v20; // [rsp+8h] [rbp-160h]
char v21; // [rsp+18h] [rbp-150h]
int v22[4]; // [rsp+20h] [rbp-148h] BYREF
int v23[4]; // [rsp+30h] [rbp-138h]
int v24[4]; // [rsp+40h] [rbp-128h]
_QWORD v25[4]; // [rsp+58h] [rbp-110h] BYREF
_BYTE v26[8]; // [rsp+78h] [rbp-F0h] BYREF
int v27; // [rsp+80h] [rbp-E8h] BYREF
long long v28; // [rsp+88h] [rbp-E0h]
int *v29; // [rsp+90h] [rbp-D8h]
int *v30; // [rsp+98h] [rbp-D0h]
long long v31; // [rsp+A0h] [rbp-C8h]
_BYTE v32[8]; // [rsp+A8h] [rbp-C0h] BYREF
int v33; // [rsp+B0h] [rbp-B8h] BYREF
long long v34; // [rsp+B8h] [rbp-B0h]
int *v35; // [rsp+C0h] [rbp-A8h]
int *v36; // [rsp+C8h] [rbp-A0h]
long long v37; // [rsp+D0h] [rbp-98h]
_BYTE v38[8]; // [rsp+D8h] [rbp-90h] BYREF
int v39; // [rsp+E0h] [rbp-88h] BYREF
long long v40; // [rsp+E8h] [rbp-80h]
int *v41; // [rsp+F0h] [rbp-78h]
int *v42; // [rsp+F8h] [rbp-70h]
long long v43; // [rsp+100h] [rbp-68h]
_BYTE v44[96]; // [rsp+108h] [rbp-60h] BYREF
LODWORD(i) = 0;
log_printf(
1,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
482,
(unsigned int)"loading taesd from '%s'",
*a2,
a6);
if ( GGMLModule::alloc_params_buffer((long long)this, a3, 0) )
{
v21 = a3;
v39 = 0;
v40 = 0LL;
v41 = &v39;
v42 = &v39;
v43 = 0LL;
TinyAutoEncoder::init_params(this);
TinyAutoEncoder::map_by_name((_DWORD)this, (unsigned int)v38, v8, v9, v10, v11);
v33 = 0;
v34 = 0LL;
v35 = &v33;
v36 = &v33;
v37 = 0LL;
v27 = 0;
v28 = 0LL;
v29 = &v27;
v30 = &v27;
v31 = 0LL;
for ( i = v41; i != &v39; i = (int *)std::_Rb_tree_increment(i) )
{
if ( *((_BYTE *)this + 1528) == 1
&& (std::string::basic_string<std::allocator<char>>(v22, (long long)"encoder"),
v12 = starts_with(i + 8, v22),
std::string::~string(v22),
v12) )
{
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(
v26,
i + 8);
}
else
{
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_M_emplace_unique<std::pair<std::string const,ggml_tensor *>&>(
v32,
i + 8);
}
}
*(_OWORD *)v24 = 0LL;
*(_OWORD *)v23 = 0LL;
*(_OWORD *)v22 = 0LL;
std::string::basic_string<std::allocator<char>>(v25, (long long)&unk_A0D3E);
v13 = ModelLoader::init_from_file(v22, a2, v25);
std::string::~string(v25);
if ( v13 )
{
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_Rb_tree(
v44,
v26);
tensors = ModelLoader::load_tensors(
(int)v22,
v19,
v20,
(int)a2,
v21,
v22[0],
v22[2],
v23[0],
v23[2],
v24[0],
v24[2]);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(
v44,
v32);
if ( tensors )
{
LOBYTE(i) = 1;
log_printf(
1,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
522,
(unsigned int)"taesd model loaded",
v16,
v17);
}
else
{
LODWORD(i) = 0;
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
518,
(unsigned int)"load tae tensors from model loader failed",
v16,
v17);
}
}
else
{
LODWORD(i) = 0;
log_printf(
3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
511,
(unsigned int)"init taesd model loader from file failed: '%s'",
*a2,
v14);
}
ModelLoader::~ModelLoader((ModelLoader *)v22);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(
v26,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp");
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((long long)v32);
std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((long long)v38);
}
return (unsigned int)i;
}
| load_from_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV R8,qword ptr [RSI]
LEA RSI,[0x19aa81]
LEA RCX,[0x19aacf]
XOR EBP,EBP
PUSH 0x1
POP RDI
MOV EDX,0x1e2
XOR EAX,EAX
CALL 0x00155f59
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001265a6
TEST AL,AL
JZ 0x00127ed1
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x18],RBX
LEA R14,[RSP + 0xe0]
AND dword ptr [R14],0x0
AND qword ptr [R14 + 0x8],0x0
MOV qword ptr [R14 + 0x10],R14
MOV qword ptr [R14 + 0x18],R14
AND qword ptr [R14 + 0x20],0x0
LAB_00127cdd:
MOV RDI,R15
CALL 0x0012ef8a
LEA RSI,[RSP + 0xd8]
MOV RDI,R15
CALL 0x0012f008
LEA RAX,[RSP + 0xb0]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
LEA RAX,[RSP + 0x80]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOV RBP,qword ptr [RSP + 0xf0]
LEA R13,[RSP + 0x20]
LAB_00127d3c:
CMP RBP,R14
JZ 0x00127da8
LEA R12,[RBP + 0x20]
CMP byte ptr [R15 + 0x5f8],0x1
JNZ 0x00127d8b
LAB_00127d4f:
MOV RDI,R13
LEA RSI,[0x19a0be]
LEA RDX,[RSP + 0x58]
CALL 0x00119f24
LAB_00127d63:
MOV RDI,R12
MOV RSI,R13
CALL 0x001558c7
MOV EBX,EAX
MOV RDI,R13
CALL 0x0010ac60
TEST BL,BL
JZ 0x00127d8b
LAB_00127d7c:
LEA RDI,[RSP + 0x78]
MOV RSI,R12
CALL 0x0012ccd0
JMP 0x00127d9b
LAB_00127d8b:
LEA RDI,[RSP + 0xa8]
MOV RSI,R12
CALL 0x0012ceae
LAB_00127d9b:
MOV RDI,RBP
CALL 0x0010a3d0
MOV RBP,RAX
JMP 0x00127d3c
LAB_00127da8:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_00127dba:
LEA RSI,[0x1a0d3e]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0xf]
CALL 0x00119f24
LAB_00127dd0:
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x58]
MOV R15,qword ptr [RSP + 0x10]
MOV RSI,R15
CALL 0x00147530
MOV R14,qword ptr [RSP + 0x18]
MOV EBX,EAX
LEA RDI,[RSP + 0x58]
CALL 0x0010ac60
TEST BL,BL
JZ 0x00127e60
LAB_00127dfc:
LEA RDI,[RSP + 0x108]
LEA RSI,[RSP + 0x78]
CALL 0x0012cfbc
LAB_00127e0e:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0xa8]
LEA RCX,[RSP + 0x108]
MOV RDX,R14
CALL 0x0014935e
MOV EBX,EAX
LEA RDI,[RSP + 0x108]
CALL 0x0012d1a4
TEST BL,BL
JZ 0x00127e84
MOV BPL,0x1
LAB_00127e41:
LEA RSI,[0x19aa81]
LEA RCX,[0x19ab40]
PUSH 0x1
POP RDI
MOV EDX,0x20a
XOR EAX,EAX
CALL 0x00155f59
JMP 0x00127ea3
LAB_00127e60:
MOV R8,qword ptr [R15]
XOR EBP,EBP
LAB_00127e65:
LEA RSI,[0x19aa81]
LEA RCX,[0x19aae7]
PUSH 0x3
POP RDI
MOV EDX,0x1ff
XOR EAX,EAX
CALL 0x00155f59
JMP 0x00127ea3
LAB_00127e84:
XOR EBP,EBP
LAB_00127e86:
LEA RSI,[0x19aa81]
LEA RCX,[0x19ab16]
PUSH 0x3
POP RDI
MOV EDX,0x206
XOR EAX,EAX
CALL 0x00155f59
LAB_00127ea3:
LEA RDI,[RSP + 0x20]
CALL 0x00125cf6
LEA RDI,[RSP + 0x78]
CALL 0x0012d1a4
LEA RDI,[RSP + 0xa8]
CALL 0x00125e24
LEA RDI,[RSP + 0xd8]
CALL 0x00125e24
LAB_00127ed1:
MOV EAX,EBP
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* TinyAutoEncoder::load_from_file(std::__cxx11::string const&, ggml_backend*) */
ulong __thiscall
TinyAutoEncoder::load_from_file(TinyAutoEncoder *this,string *param_1,ggml_backend *param_2)
{
string *psVar1;
ggml_backend *pgVar2;
char cVar3;
_Rb_tree_node_base *p_Var4;
ulong uVar5;
allocator local_159;
string *local_158;
ggml_backend *local_150;
int8 local_148;
int8 uStack_140;
int8 local_138;
int8 uStack_130;
int8 local_128;
int8 uStack_120;
allocator local_110 [32];
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_f0 [8];
int4 local_e8 [2];
int8 local_e0;
int4 *local_d8;
int4 *local_d0;
int8 local_c8;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
local_c0 [8];
int4 local_b8 [2];
int8 local_b0;
int4 *local_a8;
int4 *local_a0;
int8 local_98;
map local_90 [8];
int4 local_88 [2];
int8 local_80;
_Rb_tree_node_base *local_78;
_Rb_tree_node_base *local_70;
int8 local_68;
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_60 [48];
uVar5 = 0;
log_printf(1,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",0x1e2
,"loading taesd from \'%s\'",*(int8 *)param_1);
cVar3 = GGMLModule::alloc_params_buffer((GGMLModule *)this,param_2,0);
if (cVar3 != '\0') {
local_88[0] = 0;
local_80 = 0;
local_68 = 0;
local_158 = param_1;
local_150 = param_2;
local_78 = (_Rb_tree_node_base *)local_88;
local_70 = (_Rb_tree_node_base *)local_88;
/* try { // try from 00127cdd to 00127cf4 has its CatchHandler @ 00127f19 */
init_params(this);
map_by_name(this,local_90);
local_a8 = local_b8;
local_b8[0] = 0;
local_b0 = 0;
local_98 = 0;
local_d8 = local_e8;
local_e8[0] = 0;
local_e0 = 0;
local_c8 = 0;
local_d0 = local_d8;
local_a0 = local_a8;
for (p_Var4 = local_78; p_Var4 != (_Rb_tree_node_base *)local_88;
p_Var4 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var4)) {
psVar1 = (string *)(p_Var4 + 0x20);
if (this[0x5f8] == (TinyAutoEncoder)0x1) {
/* try { // try from 00127d4f to 00127d62 has its CatchHandler @ 00127f1e */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_148,"encoder",local_110)
;
/* try { // try from 00127d63 to 00127d6d has its CatchHandler @ 00127f20 */
cVar3 = starts_with(psVar1,(string *)&local_148);
std::__cxx11::string::~string((string *)&local_148);
if (cVar3 == '\0') goto LAB_00127d8b;
/* try { // try from 00127d7c to 00127d9a has its CatchHandler @ 00127f2f */
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::_M_insert_unique<std::__cxx11::string_const&>(local_f0,psVar1);
}
else {
LAB_00127d8b:
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
::_M_emplace_unique<std::pair<std::__cxx11::string_const,ggml_tensor*>&>
(local_c0,(pair *)psVar1);
}
}
local_128 = 0;
uStack_120 = 0;
local_138 = 0;
uStack_130 = 0;
local_148 = 0;
uStack_140 = 0;
/* try { // try from 00127dba to 00127dcf has its CatchHandler @ 00127f0a */
std::__cxx11::string::string<std::allocator<char>>((string *)local_110,"",&local_159);
psVar1 = local_158;
/* try { // try from 00127dd0 to 00127de6 has its CatchHandler @ 00127efb */
cVar3 = ModelLoader::init_from_file((ModelLoader *)&local_148,local_158,(string *)local_110);
pgVar2 = local_150;
std::__cxx11::string::~string((string *)local_110);
if (cVar3 == '\0') {
uVar5 = 0;
/* try { // try from 00127e65 to 00127e81 has its CatchHandler @ 00127ef7 */
log_printf(3,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp",
0x1ff,"init taesd model loader from file failed: \'%s\'",*(int8 *)psVar1);
}
else {
/* try { // try from 00127dfc to 00127e0d has its CatchHandler @ 00127ef9 */
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::_Rb_tree(local_60,(_Rb_tree *)local_f0);
/* try { // try from 00127e0e to 00127e2a has its CatchHandler @ 00127ee5 */
cVar3 = ModelLoader::load_tensors((ModelLoader *)&local_148,local_c0,pgVar2,local_60);
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_60);
if (cVar3 == '\0') {
uVar5 = 0;
/* try { // try from 00127e86 to 00127ea2 has its CatchHandler @ 00127ef9 */
log_printf(3,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp"
,0x206,"load tae tensors from model loader failed");
}
else {
uVar5 = CONCAT71((int7)((ulong)p_Var4 >> 8),1);
/* try { // try from 00127e41 to 00127e5d has its CatchHandler @ 00127ef9 */
log_printf(1,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/tae.hpp"
,0x20a,"taesd model loaded");
}
}
ModelLoader::~ModelLoader((ModelLoader *)&local_148);
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_f0);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
::~_Rb_tree(local_c0);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>
*)local_90);
}
return uVar5 & 0xffffffff;
}
|
|
4,141 | LefDefParser::defwConstraintOperandPath(char const*, char const*, char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwConstraintOperandPath(const char *comp1,
const char *fromPin,
const char *comp2,
const char *toPin)
{
defwFunc = DEFW_FPC_OPER; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_FPC_OPER && defwState != DEFW_FPC_OPER_SUM)
return DEFW_BAD_ORDER; // path can be within SUM
if ((comp1 == 0) || (*comp1 == 0) || (fromPin == 0) || (*fromPin == 0) ||
(comp2 == 0) || (*comp2 == 0) || (toPin == 0) || (*toPin == 0)) // require
return DEFW_BAD_DATA;
if (defwFPC > 0)
fprintf(defwFile, " ,");
if (defwState == DEFW_FPC_OPER_SUM)
defwFPC++;
fprintf(defwFile, " PATH %s %s %s %s", comp1, fromPin, comp2, toPin);
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwConstraintOperandPath(char const*, char const*, char const*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
leaq 0xdde8(%rip), %rax # 0x1e178
movl $0x4a, (%rax)
leaq 0xddcb(%rip), %r13 # 0x1e168
movq (%r13), %rcx
testq %rcx, %rcx
je 0x10458
movq %rdx, %r14
leaq 0xddc0(%rip), %rax # 0x1e174
movl (%rax), %eax
leal -0x4c(%rax), %edx
movl $0x2, %ebp
cmpl $-0x2, %edx
jb 0x1045d
movq %rdi, %r12
movl $0x3, %ebp
testq %rdi, %rdi
je 0x1045d
movq %rsi, %r15
testq %rsi, %rsi
je 0x1045d
cmpb $0x0, (%r12)
je 0x1045d
testq %r14, %r14
je 0x1045d
cmpb $0x0, (%r15)
je 0x1045d
testq %rbx, %rbx
je 0x1045d
cmpb $0x0, (%r14)
je 0x1045d
cmpb $0x0, (%rbx)
je 0x1045d
leaq 0xdd87(%rip), %rbp # 0x1e190
cmpl $0x0, (%rbp)
jle 0x1042e
leaq 0x5c43(%rip), %rdi # 0x16059
movl $0x2, %esi
movl $0x1, %edx
callq 0x1110
leaq 0xdd48(%rip), %rax # 0x1e174
movl (%rax), %eax
cmpl $0x4b, %eax
jne 0x10436
incl (%rbp)
movq (%r13), %rdi
leaq 0x5c1b(%rip), %rsi # 0x1605c
xorl %ebp, %ebp
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x10e0
jmp 0x1045d
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser25defwConstraintOperandPathEPKcS1_S1_S1_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 4Ah ; 'J'
lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [r13+0]
test rcx, rcx
jz loc_10458
mov r14, rdx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov eax, [rax]
lea edx, [rax-4Ch]
mov ebp, 2
cmp edx, 0FFFFFFFEh
jb loc_1045D
mov r12, rdi
mov ebp, 3
test rdi, rdi
jz loc_1045D
mov r15, rsi
test rsi, rsi
jz short loc_1045D
cmp byte ptr [r12], 0
jz short loc_1045D
test r14, r14
jz short loc_1045D
cmp byte ptr [r15], 0
jz short loc_1045D
test rbx, rbx
jz short loc_1045D
cmp byte ptr [r14], 0
jz short loc_1045D
cmp byte ptr [rbx], 0
jz short loc_1045D
lea rbp, _ZN12LefDefParser7defwFPCE; LefDefParser::defwFPC
cmp dword ptr [rbp+0], 0
jle short loc_1042E
lea rdi, asc_16059; " ,"
mov esi, 2
mov edx, 1
call _fwrite
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov eax, [rax]
loc_1042E:
cmp eax, 4Bh ; 'K'
jnz short loc_10436
inc dword ptr [rbp+0]
loc_10436:
mov rdi, [r13+0]
lea rsi, aPathSSSS; " PATH %s %s %s %s"
xor ebp, ebp
mov rdx, r12
mov rcx, r15
mov r8, r14
mov r9, rbx
xor eax, eax
call _fprintf
jmp short loc_1045D
loc_10458:
mov ebp, 1
loc_1045D:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwConstraintOperandPath(
LefDefParser *this,
const char *a2,
const char *a3,
const char *a4,
const char *a5)
{
int v7; // eax
unsigned int v8; // ebp
LefDefParser::defwFunc = 74;
if ( LefDefParser::defwFile )
{
v7 = LefDefParser::defwState;
v8 = 2;
if ( (unsigned int)(LefDefParser::defwState - 76) >= 0xFFFFFFFE )
{
v8 = 3;
if ( this )
{
if ( a2 && *(_BYTE *)this && a3 && *a2 && a4 && *a3 && *a4 )
{
if ( LefDefParser::defwFPC > 0 )
{
fwrite(" ,", 2LL, 1LL, LefDefParser::defwFile);
v7 = LefDefParser::defwState;
}
if ( v7 == 75 )
++LefDefParser::defwFPC;
v8 = 0;
fprintf(LefDefParser::defwFile, " PATH %s %s %s %s", (const char *)this, a2, a3, a4);
}
}
}
}
else
{
return 1;
}
return v8;
}
| defwConstraintOperandPath:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x4a
LEA R13,[0x11e168]
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JZ 0x00110458
MOV R14,RDX
LEA RAX,[0x11e174]
MOV EAX,dword ptr [RAX]
LEA EDX,[RAX + -0x4c]
MOV EBP,0x2
CMP EDX,-0x2
JC 0x0011045d
MOV R12,RDI
MOV EBP,0x3
TEST RDI,RDI
JZ 0x0011045d
MOV R15,RSI
TEST RSI,RSI
JZ 0x0011045d
CMP byte ptr [R12],0x0
JZ 0x0011045d
TEST R14,R14
JZ 0x0011045d
CMP byte ptr [R15],0x0
JZ 0x0011045d
TEST RBX,RBX
JZ 0x0011045d
CMP byte ptr [R14],0x0
JZ 0x0011045d
CMP byte ptr [RBX],0x0
JZ 0x0011045d
LEA RBP,[0x11e190]
CMP dword ptr [RBP],0x0
JLE 0x0011042e
LEA RDI,[0x116059]
MOV ESI,0x2
MOV EDX,0x1
CALL 0x00101110
LEA RAX,[0x11e174]
MOV EAX,dword ptr [RAX]
LAB_0011042e:
CMP EAX,0x4b
JNZ 0x00110436
INC dword ptr [RBP]
LAB_00110436:
MOV RDI,qword ptr [R13]
LEA RSI,[0x11605c]
XOR EBP,EBP
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
MOV R9,RBX
XOR EAX,EAX
CALL 0x001010e0
JMP 0x0011045d
LAB_00110458:
MOV EBP,0x1
LAB_0011045d:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwConstraintOperandPath(char const*, char const*, char const*, char const*) */
int8
LefDefParser::defwConstraintOperandPath(char *param_1,char *param_2,char *param_3,char *param_4)
{
int8 uVar1;
defwFunc = 0x4a;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if ((((((0xfffffffd < defwState - 0x4cU) && (uVar1 = 3, param_1 != (char *)0x0)) &&
(param_2 != (char *)0x0)) && ((*param_1 != '\0' && (param_3 != (char *)0x0)))) &&
((*param_2 != '\0' && ((param_4 != (char *)0x0 && (*param_3 != '\0')))))) &&
(*param_4 != '\0')) {
if (0 < defwFPC) {
fwrite(&DAT_00116059,2,1,defwFile);
}
if (defwState == 0x4b) {
defwFPC = defwFPC + 1;
}
uVar1 = 0;
fprintf(defwFile," PATH %s %s %s %s",param_1,param_2,param_3,param_4);
}
}
return uVar1;
}
|
|
4,142 | set_object_name_computed | bluesky950520[P]quickjs/quickjs.c | static void set_object_name_computed(JSParseState *s)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name_computed);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
fd->byte_code.buf[define_class_pos] = OP_define_class_computed;
fd->last_opcode_pos = -1;
}
} | O1 | c | set_object_name_computed:
movq 0x90(%rdi), %rdi
movslq 0x168(%rdi), %rax
testq %rax, %rax
js 0x6a6fc
movq 0x138(%rdi), %rcx
movb (%rcx,%rax), %cl
jmp 0x6a6fe
xorl %ecx, %ecx
cmpb $-0x3d, %cl
je 0x6a729
movzbl %cl, %ecx
cmpl $0x4d, %ecx
jne 0x6a748
movq %rax, 0x140(%rdi)
movl %eax, 0x168(%rdi)
addq $0x138, %rdi # imm = 0x138
movl $0x4e, %esi
jmp 0x1b4d0
movq 0x138(%rdi), %rcx
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
cltq
movb $0x57, (%rcx,%rax)
movl $0xffffffff, 0x168(%rdi) # imm = 0xFFFFFFFF
retq
| set_object_name_computed:
mov rdi, [rdi+90h]
movsxd rax, dword ptr [rdi+168h]
test rax, rax
js short loc_6A6FC
mov rcx, [rdi+138h]
mov cl, [rcx+rax]
jmp short loc_6A6FE
loc_6A6FC:
xor ecx, ecx
loc_6A6FE:
cmp cl, 0C3h
jz short loc_6A729
movzx ecx, cl
cmp ecx, 4Dh ; 'M'
jnz short locret_6A748
mov [rdi+140h], rax
mov [rdi+168h], eax
add rdi, 138h
mov esi, 4Eh ; 'N'
jmp dbuf_putc
loc_6A729:
mov rcx, [rdi+138h]
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
cdqe
mov byte ptr [rcx+rax], 57h ; 'W'
mov dword ptr [rdi+168h], 0FFFFFFFFh
locret_6A748:
retn
| long long set_object_name_computed(long long a1)
{
long long v1; // rdi
long long result; // rax
char v3; // cl
long long v4; // rcx
v1 = *(_QWORD *)(a1 + 144);
result = *(int *)(v1 + 360);
if ( result < 0 )
v3 = 0;
else
v3 = *(_BYTE *)(*(_QWORD *)(v1 + 312) + result);
if ( v3 == -61 )
{
v4 = *(_QWORD *)(v1 + 312);
result = (int)result - *(_DWORD *)(v4 + result + 1) + 1;
*(_BYTE *)(v4 + (int)result) = 87;
*(_DWORD *)(v1 + 360) = -1;
}
else if ( v3 == 77 )
{
*(_QWORD *)(v1 + 320) = result;
*(_DWORD *)(v1 + 360) = result;
return dbuf_putc((_QWORD *)(v1 + 312), 78);
}
return result;
}
| |||
4,143 | set_object_name_computed | bluesky950520[P]quickjs/quickjs.c | static void set_object_name_computed(JSParseState *s)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name_computed);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
fd->byte_code.buf[define_class_pos] = OP_define_class_computed;
fd->last_opcode_pos = -1;
}
} | O2 | c | set_object_name_computed:
movq 0x90(%rdi), %rax
movslq 0x168(%rax), %rcx
testq %rcx, %rcx
js 0x5a24f
movq 0x138(%rax), %rdx
movzbl (%rdx,%rcx), %esi
cmpl $0xc3, %esi
je 0x5a239
cmpl $0x4d, %esi
jne 0x5a24f
movq %rcx, 0x140(%rax)
orl $-0x1, 0x168(%rax)
pushq $0x4e
popq %rsi
jmp 0x4fa1b
movl 0x1(%rdx,%rcx), %esi
subl %esi, %ecx
incl %ecx
movslq %ecx, %rcx
movb $0x57, (%rdx,%rcx)
orl $-0x1, 0x168(%rax)
retq
| set_object_name_computed:
mov rax, [rdi+90h]
movsxd rcx, dword ptr [rax+168h]
test rcx, rcx
js short locret_5A24F
mov rdx, [rax+138h]
movzx esi, byte ptr [rdx+rcx]
cmp esi, 0C3h
jz short loc_5A239
cmp esi, 4Dh ; 'M'
jnz short locret_5A24F
mov [rax+140h], rcx
or dword ptr [rax+168h], 0FFFFFFFFh
push 4Eh ; 'N'
pop rsi
jmp emit_op
loc_5A239:
mov esi, [rdx+rcx+1]
sub ecx, esi
inc ecx
movsxd rcx, ecx
mov byte ptr [rdx+rcx], 57h ; 'W'
or dword ptr [rax+168h], 0FFFFFFFFh
locret_5A24F:
retn
| long long set_object_name_computed(long long a1)
{
long long result; // rax
long long v2; // rcx
long long v3; // rdx
int v4; // esi
result = *(_QWORD *)(a1 + 144);
v2 = *(int *)(result + 360);
if ( v2 >= 0 )
{
v3 = *(_QWORD *)(result + 312);
v4 = *(unsigned __int8 *)(v3 + v2);
if ( v4 == 195 )
{
*(_BYTE *)(v3 + (int)v2 - *(_DWORD *)(v3 + v2 + 1) + 1) = 87;
*(_DWORD *)(result + 360) = -1;
}
else if ( v4 == 77 )
{
*(_QWORD *)(result + 320) = v2;
*(_DWORD *)(result + 360) = -1;
return emit_op(a1, 78);
}
}
return result;
}
| set_object_name_computed:
MOV RAX,qword ptr [RDI + 0x90]
MOVSXD RCX,dword ptr [RAX + 0x168]
TEST RCX,RCX
JS 0x0015a24f
MOV RDX,qword ptr [RAX + 0x138]
MOVZX ESI,byte ptr [RDX + RCX*0x1]
CMP ESI,0xc3
JZ 0x0015a239
CMP ESI,0x4d
JNZ 0x0015a24f
MOV qword ptr [RAX + 0x140],RCX
OR dword ptr [RAX + 0x168],0xffffffff
PUSH 0x4e
POP RSI
JMP 0x0014fa1b
LAB_0015a239:
MOV ESI,dword ptr [RDX + RCX*0x1 + 0x1]
SUB ECX,ESI
INC ECX
MOVSXD RCX,ECX
MOV byte ptr [RDX + RCX*0x1],0x57
OR dword ptr [RAX + 0x168],0xffffffff
LAB_0015a24f:
RET
|
void set_object_name_computed(long param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar1 = *(long *)(param_1 + 0x90);
lVar3 = (long)*(int *)(lVar1 + 0x168);
if (-1 < lVar3) {
lVar2 = *(long *)(lVar1 + 0x138);
if (*(char *)(lVar2 + lVar3) == -0x3d) {
*(int1 *)(lVar2 + ((*(int *)(lVar1 + 0x168) - *(int *)(lVar2 + 1 + lVar3)) + 1)) = 0x57;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
else if (*(char *)(lVar2 + lVar3) == 'M') {
*(long *)(lVar1 + 0x140) = lVar3;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4e);
return;
}
}
return;
}
|
|
4,144 | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)::TrieNode::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | void insert(const std::string & string) {
auto node = this;
for (char c : string) {
node = &node->children[c];
}
node->is_end_of_string = true;
} | O3 | cpp | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)::TrieNode::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rax
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0xa544c
movq (%rsi), %r15
xorl %r12d, %r12d
leaq 0x7(%rsp), %rbx
movb (%r15,%r12), %cl
movb %cl, 0x7(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa545c
incq %r12
cmpq %r12, %r14
jne 0xa5431
movb $0x1, 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_:
push r15
push r14
push r12
push rbx
push rax
mov rax, rdi
mov r14, [rsi+8]
test r14, r14
jz short loc_A544C
mov r15, [rsi]
xor r12d, r12d
lea rbx, [rsp+28h+var_21]
loc_A5431:
mov cl, [r15+r12]
mov [rsp+28h+var_21], cl
mov rdi, rax
mov rsi, rbx
call _ZNSt3mapIcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeSt4lessIcESaISt4pairIKcSC_EEEixERSG_; std::map<char,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::operator[](char const&)
inc r12
cmp r14, r12
jnz short loc_A5431
loc_A544C:
mov byte ptr [rax+30h], 1
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(
long long a1,
long long *a2)
{
long long v2; // rax
long long result; // rax
long long v4; // r14
long long v5; // r15
long long i; // r12
_BYTE v7[33]; // [rsp+1h] [rbp-21h] BYREF
v7[0] = HIBYTE(v2);
result = a1;
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
for ( i = 0LL; i != v4; ++i )
{
v7[0] = *(_BYTE *)(v5 + i);
result = std::map<char,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::operator[](
result,
v7);
}
}
*(_BYTE *)(result + 48) = 1;
return result;
}
| string_const&):
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,RDI
MOV R14,qword ptr [RSI + 0x8]
TEST R14,R14
JZ 0x001a544c
MOV R15,qword ptr [RSI]
XOR R12D,R12D
LEA RBX,[RSP + 0x7]
LAB_001a5431:
MOV CL,byte ptr [R15 + R12*0x1]
MOV byte ptr [RSP + 0x7],CL
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001a545c
INC R12
CMP R14,R12
JNZ 0x001a5431
LAB_001a544c:
MOV byte ptr [RAX + 0x30],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_not_strings(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&)::TrieNode::insert(std::__cxx11::string const&) */
void SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::
string>>const&)::TrieNode::insert(std::__cxx11::string_const__
(map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
*param_1,long *param_2)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
int8 uStack_28;
lVar1 = param_2[1];
if (lVar1 != 0) {
lVar2 = *param_2;
lVar3 = 0;
uStack_28 = in_RAX;
do {
uStack_28 = CONCAT17(*(int1 *)(lVar2 + lVar3),(int7)uStack_28);
param_1 = (map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
*)std::
map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
::operator[](param_1,(char *)((long)&uStack_28 + 7));
lVar3 = lVar3 + 1;
} while (lVar1 != lVar3);
}
param_1[0x30] =
(map<char,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
)0x1;
return;
}
|
|
4,145 | js_string_memcmp | bluesky950520[P]quickjs/quickjs.c | static int js_string_memcmp(const JSString *p1, const JSString *p2, int len)
{
int res;
if (likely(!p1->is_wide_char)) {
if (likely(!p2->is_wide_char))
res = memcmp(p1->u.str8, p2->u.str8, len);
else
res = -memcmp16_8(p2->u.str16, p1->u.str8, len);
} else {
if (!p2->is_wide_char)
res = memcmp16_8(p1->u.str16, p2->u.str8, len);
else
res = memcmp16(p1->u.str16, p2->u.str16, len);
}
return res;
} | O0 | c | js_string_memcmp:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5d2ab
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5d285
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movslq 0x4(%rsp), %rdx
callq 0xe480
movl %eax, (%rsp)
jmp 0x5d2a9
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d3b0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, (%rsp)
jmp 0x5d300
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
jne 0x5d2e0
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d3b0
movl %eax, (%rsp)
jmp 0x5d2fe
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d420
movl %eax, (%rsp)
jmp 0x5d300
movl (%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| js_string_memcmp:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov [rsp+18h+var_14], edx
mov rax, [rsp+18h+var_8]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5D2AB
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5D285
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
movsxd rdx, [rsp+18h+var_14]
call _memcmp
mov [rsp+18h+var_18], eax
jmp short loc_5D2A9
loc_5D285:
mov rdi, [rsp+18h+var_10]
add rdi, 18h
mov rsi, [rsp+18h+var_8]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16_8
mov ecx, eax
xor eax, eax
sub eax, ecx
mov [rsp+18h+var_18], eax
loc_5D2A9:
jmp short loc_5D300
loc_5D2AB:
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jnz short loc_5D2E0
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16_8
mov [rsp+18h+var_18], eax
jmp short loc_5D2FE
loc_5D2E0:
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16
mov [rsp+18h+var_18], eax
loc_5D2FE:
jmp short $+2
loc_5D300:
mov eax, [rsp+18h+var_18]
add rsp, 18h
retn
| long long js_string_memcmp(long long a1, long long a2, unsigned int a3)
{
if ( (*(_QWORD *)(a1 + 4) & 0x80000000LL) != 0 )
{
if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 )
return (unsigned int)memcmp16(a1 + 24, a2 + 24, a3);
else
return (unsigned int)memcmp16_8(a1 + 24, a2 + 24, a3);
}
else if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 )
{
return (unsigned int)-(int)memcmp16_8(a2 + 24, a1 + 24, a3);
}
else
{
return (unsigned int)memcmp(a1 + 24, a2 + 24, (int)a3);
}
}
| js_string_memcmp:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EDX
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015d2ab
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015d285
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOVSXD RDX,dword ptr [RSP + 0x4]
CALL 0x0010e480
MOV dword ptr [RSP],EAX
JMP 0x0015d2a9
LAB_0015d285:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d3b0
MOV ECX,EAX
XOR EAX,EAX
SUB EAX,ECX
MOV dword ptr [RSP],EAX
LAB_0015d2a9:
JMP 0x0015d300
LAB_0015d2ab:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JNZ 0x0015d2e0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d3b0
MOV dword ptr [RSP],EAX
JMP 0x0015d2fe
LAB_0015d2e0:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d420
MOV dword ptr [RSP],EAX
LAB_0015d2fe:
JMP 0x0015d300
LAB_0015d300:
MOV EAX,dword ptr [RSP]
ADD RSP,0x18
RET
|
int js_string_memcmp(long param_1,long param_2,int param_3)
{
int4 local_18;
if ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0) {
if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) {
local_18 = memcmp((void *)(param_1 + 0x18),(void *)(param_2 + 0x18),(long)param_3);
}
else {
local_18 = memcmp16_8(param_2 + 0x18,param_1 + 0x18,param_3);
local_18 = -local_18;
}
}
else if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) {
local_18 = memcmp16_8(param_1 + 0x18,param_2 + 0x18,param_3);
}
else {
local_18 = memcmp16(param_1 + 0x18,param_2 + 0x18,param_3);
}
return local_18;
}
|
|
4,146 | js_string_memcmp | bluesky950520[P]quickjs/quickjs.c | static int js_string_memcmp(const JSString *p1, const JSString *p2, int len)
{
int res;
if (likely(!p1->is_wide_char)) {
if (likely(!p2->is_wide_char))
res = memcmp(p1->u.str8, p2->u.str8, len);
else
res = -memcmp16_8(p2->u.str16, p1->u.str8, len);
} else {
if (!p2->is_wide_char)
res = memcmp16_8(p1->u.str16, p2->u.str8, len);
else
res = memcmp16(p1->u.str16, p2->u.str16, len);
}
return res;
} | O1 | c | js_string_memcmp:
testb $-0x80, 0x7(%rdi)
movq 0x4(%rsi), %rax
jne 0x3bbb1
testl %eax, %eax
js 0x3bbd7
addq $0x18, %rdi
addq $0x18, %rsi
movslq %edx, %rdx
jmp 0xe480
testl %eax, %eax
js 0x3bbfc
testl %edx, %edx
jle 0x3bc1c
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rdi,%rdx,2), %eax
movzbl 0x18(%rsi,%rdx), %r8d
subl %r8d, %eax
jne 0x3bc1e
incq %rdx
cmpq %rdx, %rcx
jne 0x3bbbd
jmp 0x3bc1c
testl %edx, %edx
jle 0x3bbf7
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rsi,%rdx,2), %eax
movzbl 0x18(%rdi,%rdx), %r8d
subl %r8d, %eax
jne 0x3bbf9
incq %rdx
cmpq %rdx, %rcx
jne 0x3bbdf
xorl %eax, %eax
negl %eax
retq
testl %edx, %edx
jle 0x3bc1c
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rdi,%rdx,2), %eax
movzwl 0x18(%rsi,%rdx,2), %r8d
subl %r8d, %eax
jne 0x3bc1e
incq %rdx
cmpq %rdx, %rcx
jne 0x3bc04
xorl %eax, %eax
retq
| js_string_memcmp:
test byte ptr [rdi+7], 80h
mov rax, [rsi+4]
jnz short loc_3BBB1
test eax, eax
js short loc_3BBD7
add rdi, 18h
add rsi, 18h
movsxd rdx, edx
jmp _memcmp
loc_3BBB1:
test eax, eax
js short loc_3BBFC
test edx, edx
jle short loc_3BC1C
mov ecx, edx
xor edx, edx
loc_3BBBD:
movzx eax, word ptr [rdi+rdx*2+18h]
movzx r8d, byte ptr [rsi+rdx+18h]
sub eax, r8d
jnz short locret_3BC1E
inc rdx
cmp rcx, rdx
jnz short loc_3BBBD
jmp short loc_3BC1C
loc_3BBD7:
test edx, edx
jle short loc_3BBF7
mov ecx, edx
xor edx, edx
loc_3BBDF:
movzx eax, word ptr [rsi+rdx*2+18h]
movzx r8d, byte ptr [rdi+rdx+18h]
sub eax, r8d
jnz short loc_3BBF9
inc rdx
cmp rcx, rdx
jnz short loc_3BBDF
loc_3BBF7:
xor eax, eax
loc_3BBF9:
neg eax
retn
loc_3BBFC:
test edx, edx
jle short loc_3BC1C
mov ecx, edx
xor edx, edx
loc_3BC04:
movzx eax, word ptr [rdi+rdx*2+18h]
movzx r8d, word ptr [rsi+rdx*2+18h]
sub eax, r8d
jnz short locret_3BC1E
inc rdx
cmp rcx, rdx
jnz short loc_3BC04
loc_3BC1C:
xor eax, eax
locret_3BC1E:
retn
| long long js_string_memcmp(long long a1, long long a2, int a3)
{
long long v3; // rax
long long result; // rax
long long v5; // rcx
long long v6; // rdx
long long v7; // rcx
long long v8; // rdx
int v9; // eax
long long v10; // rcx
long long v11; // rdx
v3 = *(_QWORD *)(a2 + 4);
if ( *(char *)(a1 + 7) >= 0 )
{
if ( (int)v3 >= 0 )
return memcmp(a1 + 24, a2 + 24, a3);
if ( a3 <= 0 )
{
LABEL_14:
v9 = 0;
}
else
{
v7 = (unsigned int)a3;
v8 = 0LL;
while ( 1 )
{
v9 = *(unsigned __int16 *)(a2 + 2 * v8 + 24) - *(unsigned __int8 *)(a1 + v8 + 24);
if ( v9 )
break;
if ( v7 == ++v8 )
goto LABEL_14;
}
}
return (unsigned int)-v9;
}
if ( (int)v3 >= 0 )
{
if ( a3 > 0 )
{
v5 = (unsigned int)a3;
v6 = 0LL;
while ( 1 )
{
result = *(unsigned __int16 *)(a1 + 2 * v6 + 24) - (unsigned int)*(unsigned __int8 *)(a2 + v6 + 24);
if ( (_DWORD)result )
break;
if ( v5 == ++v6 )
return 0LL;
}
return result;
}
return 0LL;
}
if ( a3 <= 0 )
return 0LL;
v10 = (unsigned int)a3;
v11 = 0LL;
while ( 1 )
{
result = *(unsigned __int16 *)(a1 + 2 * v11 + 24) - (unsigned int)*(unsigned __int16 *)(a2 + 2 * v11 + 24);
if ( (_DWORD)result )
break;
if ( v10 == ++v11 )
return 0LL;
}
return result;
}
| js_string_memcmp:
TEST byte ptr [RDI + 0x7],0x80
MOV RAX,qword ptr [RSI + 0x4]
JNZ 0x0013bbb1
TEST EAX,EAX
JS 0x0013bbd7
ADD RDI,0x18
ADD RSI,0x18
MOVSXD RDX,EDX
JMP 0x0010e480
LAB_0013bbb1:
TEST EAX,EAX
JS 0x0013bbfc
TEST EDX,EDX
JLE 0x0013bc1c
MOV ECX,EDX
XOR EDX,EDX
LAB_0013bbbd:
MOVZX EAX,word ptr [RDI + RDX*0x2 + 0x18]
MOVZX R8D,byte ptr [RSI + RDX*0x1 + 0x18]
SUB EAX,R8D
JNZ 0x0013bc1e
INC RDX
CMP RCX,RDX
JNZ 0x0013bbbd
JMP 0x0013bc1c
LAB_0013bbd7:
TEST EDX,EDX
JLE 0x0013bbf7
MOV ECX,EDX
XOR EDX,EDX
LAB_0013bbdf:
MOVZX EAX,word ptr [RSI + RDX*0x2 + 0x18]
MOVZX R8D,byte ptr [RDI + RDX*0x1 + 0x18]
SUB EAX,R8D
JNZ 0x0013bbf9
INC RDX
CMP RCX,RDX
JNZ 0x0013bbdf
LAB_0013bbf7:
XOR EAX,EAX
LAB_0013bbf9:
NEG EAX
RET
LAB_0013bbfc:
TEST EDX,EDX
JLE 0x0013bc1c
MOV ECX,EDX
XOR EDX,EDX
LAB_0013bc04:
MOVZX EAX,word ptr [RDI + RDX*0x2 + 0x18]
MOVZX R8D,word ptr [RSI + RDX*0x2 + 0x18]
SUB EAX,R8D
JNZ 0x0013bc1e
INC RDX
CMP RCX,RDX
JNZ 0x0013bc04
LAB_0013bc1c:
XOR EAX,EAX
LAB_0013bc1e:
RET
|
int js_string_memcmp(long param_1,long param_2,uint param_3)
{
int iVar1;
ulong uVar2;
iVar1 = (int)*(int8 *)(param_2 + 4);
if ((*(byte *)(param_1 + 7) & 0x80) != 0) {
if (iVar1 < 0) {
if (0 < (int)param_3) {
uVar2 = 0;
do {
iVar1 = (uint)*(ushort *)(param_1 + 0x18 + uVar2 * 2) -
(uint)*(ushort *)(param_2 + 0x18 + uVar2 * 2);
if (iVar1 != 0) {
return iVar1;
}
uVar2 = uVar2 + 1;
} while (param_3 != uVar2);
}
}
else if (0 < (int)param_3) {
uVar2 = 0;
do {
iVar1 = (uint)*(ushort *)(param_1 + 0x18 + uVar2 * 2) -
(uint)*(byte *)(param_2 + 0x18 + uVar2);
if (iVar1 != 0) {
return iVar1;
}
uVar2 = uVar2 + 1;
} while (param_3 != uVar2);
}
return 0;
}
if (-1 < iVar1) {
iVar1 = memcmp((void *)(param_1 + 0x18),(void *)(param_2 + 0x18),(long)(int)param_3);
return iVar1;
}
if (0 < (int)param_3) {
uVar2 = 0;
do {
iVar1 = (uint)*(ushort *)(param_2 + 0x18 + uVar2 * 2) -
(uint)*(byte *)(param_1 + 0x18 + uVar2);
if (iVar1 != 0) goto LAB_0013bbf9;
uVar2 = uVar2 + 1;
} while (param_3 != uVar2);
}
iVar1 = 0;
LAB_0013bbf9:
return -iVar1;
}
|
|
4,147 | js_typed_array_join | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_join(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int toLocaleString)
{
JSValue sep = JS_UNDEFINED, el;
StringBuffer b_s, *b = &b_s;
JSString *s = NULL;
JSObject *p;
int i, len, oldlen, newlen;
int c;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = oldlen = newlen = p->u.array.count;
c = ','; /* default separator */
if (!toLocaleString && argc > 0 && !JS_IsUndefined(argv[0])) {
sep = JS_ToString(ctx, argv[0]);
if (JS_IsException(sep))
goto exception;
s = JS_VALUE_GET_STRING(sep);
if (s->len == 1 && !s->is_wide_char)
c = s->u.str8[0];
else
c = -1;
// ToString(sep) can detach or resize the arraybuffer as a side effect
newlen = p->u.array.count;
len = min_int(len, newlen);
}
string_buffer_init(ctx, b, 0);
/* XXX: optimize with direct access */
for(i = 0; i < len; i++) {
if (i > 0) {
if (c >= 0) {
if (string_buffer_putc8(b, c))
goto fail;
} else {
if (string_buffer_concat(b, s, 0, s->len))
goto fail;
}
}
el = JS_GetPropertyUint32(ctx, this_val, i);
/* Can return undefined for example if the typed array is detached */
if (!JS_IsNull(el) && !JS_IsUndefined(el)) {
if (JS_IsException(el))
goto fail;
if (toLocaleString) {
el = JS_ToLocaleStringFree(ctx, el);
}
if (string_buffer_concat_value_free(b, el))
goto fail;
}
}
// add extra separators in case RAB was resized by evil .valueOf method
i = max_int(1, newlen);
for(/*empty*/; i < oldlen; i++) {
if (c >= 0) {
if (string_buffer_putc8(b, c))
goto fail;
} else {
if (string_buffer_concat(b, s, 0, s->len))
goto fail;
}
}
JS_FreeValue(ctx, sep);
return string_buffer_end(b);
fail:
string_buffer_free(b);
JS_FreeValue(ctx, sep);
exception:
return JS_EXCEPTION;
} | O0 | c | js_typed_array_join:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movl %r9d, 0xac(%rsp)
movq 0x2c123(%rip), %rax # 0x113b80
movq %rax, 0x98(%rsp)
movq 0x2c11c(%rip), %rax # 0x113b88
movq %rax, 0xa0(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x5ec30
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0xe7acd
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
jmp 0xe7eac
movq 0x50(%rsp), %rdi
callq 0x5ecc0
cmpl $0x0, %eax
je 0xe7afe
movq 0xc0(%rsp), %rdi
callq 0x5edd0
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0xe7eac
movq 0x50(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x40(%rsp)
movl %eax, 0x44(%rsp)
movl %eax, 0x48(%rsp)
movl $0x2c, 0x3c(%rsp)
cmpl $0x0, 0xac(%rsp)
jne 0xe7c1c
cmpl $0x0, 0xbc(%rsp)
jle 0xe7c1c
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x34550
cmpl $0x0, %eax
jne 0xe7c1c
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x30030
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0xe7bb2
jmp 0xe7e95
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cmpl $0x1, %eax
jne 0xe7bf7
movq 0x58(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
jne 0xe7bf7
movq 0x58(%rsp), %rax
movzbl 0x18(%rax), %eax
movl %eax, 0x3c(%rsp)
jmp 0xe7bff
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
movq 0x50(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x40(%rsp)
movl 0x48(%rsp), %edi
movl 0x40(%rsp), %esi
callq 0x56ff0
movl %eax, 0x48(%rsp)
movq 0xc0(%rsp), %rdi
movq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x56930
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x48(%rsp), %eax
jge 0xe7dc1
cmpl $0x0, 0x4c(%rsp)
jle 0xe7c9e
cmpl $0x0, 0x3c(%rsp)
jl 0xe7c6e
movq 0x60(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x8a830
cmpl $0x0, %eax
je 0xe7c6c
jmp 0xe7e6e
jmp 0xe7c9c
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x58(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x75f20
cmpl $0x0, %eax
je 0xe7c9a
jmp 0xe7e6e
jmp 0xe7c9c
jmp 0xe7c9e
movq 0xc0(%rsp), %rdi
movl 0x4c(%rsp), %ecx
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x37750
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x34530
cmpl $0x0, %eax
jne 0xe7daf
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x34550
cmpl $0x0, %eax
jne 0xe7daf
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0xe7d3e
jmp 0xe7e6e
cmpl $0x0, 0xac(%rsp)
je 0xe7d89
movq 0xc0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xd4a80
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x60(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x8a900
cmpl $0x0, %eax
je 0xe7dad
jmp 0xe7e6e
jmp 0xe7daf
jmp 0xe7db1
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0xe7c38
movl 0x40(%rsp), %esi
movl $0x1, %edi
callq 0x63600
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0xe7e35
cmpl $0x0, 0x3c(%rsp)
jl 0xe7dfb
movq 0x60(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x8a830
cmpl $0x0, %eax
je 0xe7df9
jmp 0xe7e6e
jmp 0xe7e26
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x58(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x75f20
cmpl $0x0, %eax
je 0xe7e24
jmp 0xe7e6e
jmp 0xe7e26
jmp 0xe7e28
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0xe7dd3
movq 0xc0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x29f80
movq 0x60(%rsp), %rdi
callq 0x53df0
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0xe7eac
movq 0x60(%rsp), %rdi
callq 0x587a0
movq 0xc0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x29f80
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_typed_array_join:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_28], rdi
mov [rsp+0E8h+var_2C], ecx
mov [rsp+0E8h+var_38], r8
mov [rsp+0E8h+var_3C], r9d
mov rax, cs:qword_113B80
mov [rsp+0E8h+var_50], rax
mov rax, cs:qword_113B88
mov [rsp+0E8h+var_48], rax
lea rax, [rsp+0E8h+var_80]
mov [rsp+0E8h+var_88], rax
mov [rsp+0E8h+var_90], 0
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call get_typed_array
mov [rsp+0E8h+var_98], rax
cmp [rsp+0E8h+var_98], 0
jnz short loc_E7ACD
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
jmp loc_E7EAC
loc_E7ACD:
mov rdi, [rsp+0E8h+var_98]
call typed_array_is_oob
cmp eax, 0
jz short loc_E7AFE
mov rdi, [rsp+0E8h+var_28]
call JS_ThrowTypeErrorArrayBufferOOB
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_E7EAC
loc_E7AFE:
mov rax, [rsp+0E8h+var_98]
mov eax, [rax+40h]
mov [rsp+0E8h+var_A8], eax
mov [rsp+0E8h+var_A4], eax
mov [rsp+0E8h+var_A0], eax
mov [rsp+0E8h+var_AC], 2Ch ; ','
cmp [rsp+0E8h+var_3C], 0
jnz loc_E7C1C
cmp [rsp+0E8h+var_2C], 0
jle loc_E7C1C
mov rax, [rsp+0E8h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUndefined_1
cmp eax, 0
jnz loc_E7C1C
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToString
mov [rsp+0E8h+var_C0], rax
mov [rsp+0E8h+var_B8], rdx
mov rax, [rsp+0E8h+var_C0]
mov [rsp+0E8h+var_50], rax
mov rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_48], rax
mov rdi, [rsp+0E8h+var_50]
mov rsi, [rsp+0E8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_E7BB2
jmp loc_E7E95
loc_E7BB2:
mov rax, [rsp+0E8h+var_50]
mov [rsp+0E8h+var_90], rax
mov rax, [rsp+0E8h+var_90]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cmp eax, 1
jnz short loc_E7BF7
mov rax, [rsp+0E8h+var_90]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jnz short loc_E7BF7
mov rax, [rsp+0E8h+var_90]
movzx eax, byte ptr [rax+18h]
mov [rsp+0E8h+var_AC], eax
jmp short loc_E7BFF
loc_E7BF7:
mov [rsp+0E8h+var_AC], 0FFFFFFFFh
loc_E7BFF:
mov rax, [rsp+0E8h+var_98]
mov eax, [rax+40h]
mov [rsp+0E8h+var_A8], eax
mov edi, [rsp+0E8h+var_A0]
mov esi, [rsp+0E8h+var_A8]
call min_int_1
mov [rsp+0E8h+var_A0], eax
loc_E7C1C:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_88]
xor edx, edx
call string_buffer_init
mov [rsp+0E8h+var_9C], 0
loc_E7C38:
mov eax, [rsp+0E8h+var_9C]
cmp eax, [rsp+0E8h+var_A0]
jge loc_E7DC1
cmp [rsp+0E8h+var_9C], 0
jle short loc_E7C9E
cmp [rsp+0E8h+var_AC], 0
jl short loc_E7C6E
mov rdi, [rsp+0E8h+var_88]
mov esi, [rsp+0E8h+var_AC]
call string_buffer_putc8
cmp eax, 0
jz short loc_E7C6C
jmp loc_E7E6E
loc_E7C6C:
jmp short loc_E7C9C
loc_E7C6E:
mov rdi, [rsp+0E8h+var_88]
mov rsi, [rsp+0E8h+var_90]
mov rax, [rsp+0E8h+var_90]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call string_buffer_concat
cmp eax, 0
jz short loc_E7C9A
jmp loc_E7E6E
loc_E7C9A:
jmp short $+2
loc_E7C9C:
jmp short $+2
loc_E7C9E:
mov rdi, [rsp+0E8h+var_28]
mov ecx, [rsp+0E8h+var_9C]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call JS_GetPropertyUint32
mov [rsp+0E8h+var_D0], rax
mov [rsp+0E8h+var_C8], rdx
mov rax, [rsp+0E8h+var_D0]
mov [rsp+0E8h+var_60], rax
mov rax, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_58], rax
mov rdi, [rsp+0E8h+var_60]
mov rsi, [rsp+0E8h+var_58]
call JS_IsNull_1
cmp eax, 0
jnz loc_E7DAF
mov rdi, [rsp+0E8h+var_60]
mov rsi, [rsp+0E8h+var_58]
call JS_IsUndefined_1
cmp eax, 0
jnz loc_E7DAF
mov rdi, [rsp+0E8h+var_60]
mov rsi, [rsp+0E8h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_E7D3E
jmp loc_E7E6E
loc_E7D3E:
cmp [rsp+0E8h+var_3C], 0
jz short loc_E7D89
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_60]
mov rdx, [rsp+0E8h+var_58]
call JS_ToLocaleStringFree
mov [rsp+0E8h+var_E0], rax
mov [rsp+0E8h+var_D8], rdx
mov rax, [rsp+0E8h+var_E0]
mov [rsp+0E8h+var_60], rax
mov rax, [rsp+0E8h+var_D8]
mov [rsp+0E8h+var_58], rax
loc_E7D89:
mov rdi, [rsp+0E8h+var_88]
mov rsi, [rsp+0E8h+var_60]
mov rdx, [rsp+0E8h+var_58]
call string_buffer_concat_value_free
cmp eax, 0
jz short loc_E7DAD
jmp loc_E7E6E
loc_E7DAD:
jmp short $+2
loc_E7DAF:
jmp short $+2
loc_E7DB1:
mov eax, [rsp+0E8h+var_9C]
add eax, 1
mov [rsp+0E8h+var_9C], eax
jmp loc_E7C38
loc_E7DC1:
mov esi, [rsp+0E8h+var_A8]
mov edi, 1
call max_int_1
mov [rsp+0E8h+var_9C], eax
loc_E7DD3:
mov eax, [rsp+0E8h+var_9C]
cmp eax, [rsp+0E8h+var_A4]
jge short loc_E7E35
cmp [rsp+0E8h+var_AC], 0
jl short loc_E7DFB
mov rdi, [rsp+0E8h+var_88]
mov esi, [rsp+0E8h+var_AC]
call string_buffer_putc8
cmp eax, 0
jz short loc_E7DF9
jmp short loc_E7E6E
loc_E7DF9:
jmp short loc_E7E26
loc_E7DFB:
mov rdi, [rsp+0E8h+var_88]
mov rsi, [rsp+0E8h+var_90]
mov rax, [rsp+0E8h+var_90]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call string_buffer_concat
cmp eax, 0
jz short loc_E7E24
jmp short loc_E7E6E
loc_E7E24:
jmp short $+2
loc_E7E26:
jmp short $+2
loc_E7E28:
mov eax, [rsp+0E8h+var_9C]
add eax, 1
mov [rsp+0E8h+var_9C], eax
jmp short loc_E7DD3
loc_E7E35:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_50]
mov rdx, [rsp+0E8h+var_48]
call JS_FreeValue
mov rdi, [rsp+0E8h+var_88]
call string_buffer_end
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp short loc_E7EAC
loc_E7E6E:
mov rdi, [rsp+0E8h+var_88]
call string_buffer_free
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_50]
mov rdx, [rsp+0E8h+var_48]
call JS_FreeValue
loc_E7E95:
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
loc_E7EAC:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long js_typed_array_join(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
long long v24; // rdx
long long v25; // rdx
long long v26; // rcx
long long v27; // r8
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
long long v31; // rdx
long long v32; // rcx
long long v33; // r8
long long v34; // r9
long long v35; // rdx
long long v36; // rdx
long long v37; // rcx
long long v38; // r8
long long v39; // r9
__m128 v40; // xmm4
__m128 v41; // xmm5
long long v42; // rdx
signed int v44; // [rsp+3Ch] [rbp-ACh]
unsigned int v45; // [rsp+40h] [rbp-A8h]
signed int v46; // [rsp+44h] [rbp-A4h]
signed int v47; // [rsp+48h] [rbp-A0h]
signed int i; // [rsp+4Ch] [rbp-9Ch]
signed int j; // [rsp+4Ch] [rbp-9Ch]
long long typed_array; // [rsp+50h] [rbp-98h]
long long v51; // [rsp+58h] [rbp-90h]
long long v52[4]; // [rsp+68h] [rbp-80h] BYREF
long long PropertyUint32; // [rsp+88h] [rbp-60h]
long long v54; // [rsp+90h] [rbp-58h]
long long v55; // [rsp+98h] [rbp-50h]
long long v56; // [rsp+A0h] [rbp-48h]
int v57; // [rsp+ACh] [rbp-3Ch]
long long *v58; // [rsp+B0h] [rbp-38h]
int v59; // [rsp+BCh] [rbp-2Ch]
long long v60; // [rsp+C0h] [rbp-28h]
long long v61; // [rsp+C8h] [rbp-20h]
long long v62; // [rsp+D0h] [rbp-18h]
long long v63; // [rsp+D8h] [rbp-10h]
long long v64; // [rsp+E0h] [rbp-8h]
v61 = a2;
v62 = a3;
v60 = a1;
v59 = a4;
v58 = (long long *)a5;
v57 = a6;
v55 = 0LL;
v56 = 3LL;
v51 = 0LL;
typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( typed_array )
{
if ( typed_array_is_oob(typed_array) )
{
v63 = JS_ThrowTypeErrorArrayBufferOOB(v60, a7, a8, a9, a10, v18, v19, a13, a14, a2, v14, v15, v16, v17);
v64 = v20;
}
else
{
v45 = *(_DWORD *)(typed_array + 64);
v46 = v45;
v47 = v45;
v44 = 44;
if ( !v57 && v59 > 0 && !JS_IsUndefined_1(*v58, v58[1]) )
{
v55 = JS_ToString(v60, *v58, v58[1], v21, v22, v23);
v56 = v24;
if ( JS_IsException_1(v55, v24) )
{
LABEL_37:
LODWORD(v63) = 0;
v64 = 6LL;
return v63;
}
v51 = v55;
if ( (*(_DWORD *)(v55 + 4) & 0x7FFFFFFF) != 1 || (*(_QWORD *)(v55 + 4) & 0x80000000LL) != 0 )
v44 = -1;
else
v44 = *(unsigned __int8 *)(v55 + 24);
v45 = *(_DWORD *)(typed_array + 64);
v47 = min_int_1(v47, v45);
}
string_buffer_init(v60, (long long)v52, 0);
for ( i = 0; i < v47; ++i )
{
if ( i > 0 )
{
if ( v44 < 0 )
{
if ( (unsigned int)string_buffer_concat((long long)v52, v51, 0, *(_DWORD *)(v51 + 4) & 0x7FFFFFFF) )
goto LABEL_36;
}
else if ( (unsigned int)string_buffer_putc8(
(long long)v52,
v44,
a7,
a8,
a9,
a10,
v29,
v30,
a13,
a14,
v25,
v26,
v27,
v28) )
{
goto LABEL_36;
}
}
PropertyUint32 = JS_GetPropertyUint32(v60, v61, v62, i);
v54 = v31;
if ( !JS_IsNull_1(PropertyUint32, v31) && !JS_IsUndefined_1(PropertyUint32, v54) )
{
if ( JS_IsException_1(PropertyUint32, v54) )
goto LABEL_36;
if ( v57 )
{
PropertyUint32 = JS_ToLocaleStringFree(v60, PropertyUint32, v54);
v54 = v35;
}
if ( (unsigned int)string_buffer_concat_value_free((long long)v52, PropertyUint32, v54, v32, v33, v34) )
{
LABEL_36:
string_buffer_free(v52);
JS_FreeValue(v60, v55, v56);
goto LABEL_37;
}
}
}
for ( j = max_int_1(1u, v45); j < v46; ++j )
{
if ( v44 < 0 )
{
if ( (unsigned int)string_buffer_concat((long long)v52, v51, 0, *(_DWORD *)(v51 + 4) & 0x7FFFFFFF) )
goto LABEL_36;
}
else if ( (unsigned int)string_buffer_putc8(
(long long)v52,
v44,
a7,
a8,
a9,
a10,
v40,
v41,
a13,
a14,
v36,
v37,
v38,
v39) )
{
goto LABEL_36;
}
}
JS_FreeValue(v60, v55, v56);
v63 = string_buffer_end((long long)v52);
v64 = v42;
}
}
else
{
LODWORD(v63) = 0;
v64 = 6LL;
}
return v63;
}
| js_typed_array_join:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc0],RDI
MOV dword ptr [RSP + 0xbc],ECX
MOV qword ptr [RSP + 0xb0],R8
MOV dword ptr [RSP + 0xac],R9D
MOV RAX,qword ptr [0x00213b80]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [0x00213b88]
MOV qword ptr [RSP + 0xa0],RAX
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x58],0x0
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x0015ec30
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x001e7acd
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
JMP 0x001e7eac
LAB_001e7acd:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0015ecc0
CMP EAX,0x0
JZ 0x001e7afe
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0015edd0
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x001e7eac
LAB_001e7afe:
MOV RAX,qword ptr [RSP + 0x50]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RSP + 0x40],EAX
MOV dword ptr [RSP + 0x44],EAX
MOV dword ptr [RSP + 0x48],EAX
MOV dword ptr [RSP + 0x3c],0x2c
CMP dword ptr [RSP + 0xac],0x0
JNZ 0x001e7c1c
CMP dword ptr [RSP + 0xbc],0x0
JLE 0x001e7c1c
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00134550
CMP EAX,0x0
JNZ 0x001e7c1c
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00130030
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001e7bb2
JMP 0x001e7e95
LAB_001e7bb2:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CMP EAX,0x1
JNZ 0x001e7bf7
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JNZ 0x001e7bf7
MOV RAX,qword ptr [RSP + 0x58]
MOVZX EAX,byte ptr [RAX + 0x18]
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x001e7bff
LAB_001e7bf7:
MOV dword ptr [RSP + 0x3c],0xffffffff
LAB_001e7bff:
MOV RAX,qword ptr [RSP + 0x50]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RSP + 0x40],EAX
MOV EDI,dword ptr [RSP + 0x48]
MOV ESI,dword ptr [RSP + 0x40]
CALL 0x00156ff0
MOV dword ptr [RSP + 0x48],EAX
LAB_001e7c1c:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x60]
XOR EDX,EDX
CALL 0x00156930
MOV dword ptr [RSP + 0x4c],0x0
LAB_001e7c38:
MOV EAX,dword ptr [RSP + 0x4c]
CMP EAX,dword ptr [RSP + 0x48]
JGE 0x001e7dc1
CMP dword ptr [RSP + 0x4c],0x0
JLE 0x001e7c9e
CMP dword ptr [RSP + 0x3c],0x0
JL 0x001e7c6e
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x0018a830
CMP EAX,0x0
JZ 0x001e7c6c
JMP 0x001e7e6e
LAB_001e7c6c:
JMP 0x001e7c9c
LAB_001e7c6e:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x00175f20
CMP EAX,0x0
JZ 0x001e7c9a
JMP 0x001e7e6e
LAB_001e7c9a:
JMP 0x001e7c9c
LAB_001e7c9c:
JMP 0x001e7c9e
LAB_001e7c9e:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ECX,dword ptr [RSP + 0x4c]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x00137750
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x00134530
CMP EAX,0x0
JNZ 0x001e7daf
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x00134550
CMP EAX,0x0
JNZ 0x001e7daf
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001e7d3e
JMP 0x001e7e6e
LAB_001e7d3e:
CMP dword ptr [RSP + 0xac],0x0
JZ 0x001e7d89
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x001d4a80
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x90],RAX
LAB_001e7d89:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x0018a900
CMP EAX,0x0
JZ 0x001e7dad
JMP 0x001e7e6e
LAB_001e7dad:
JMP 0x001e7daf
LAB_001e7daf:
JMP 0x001e7db1
LAB_001e7db1:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x001e7c38
LAB_001e7dc1:
MOV ESI,dword ptr [RSP + 0x40]
MOV EDI,0x1
CALL 0x00163600
MOV dword ptr [RSP + 0x4c],EAX
LAB_001e7dd3:
MOV EAX,dword ptr [RSP + 0x4c]
CMP EAX,dword ptr [RSP + 0x44]
JGE 0x001e7e35
CMP dword ptr [RSP + 0x3c],0x0
JL 0x001e7dfb
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x0018a830
CMP EAX,0x0
JZ 0x001e7df9
JMP 0x001e7e6e
LAB_001e7df9:
JMP 0x001e7e26
LAB_001e7dfb:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x00175f20
CMP EAX,0x0
JZ 0x001e7e24
JMP 0x001e7e6e
LAB_001e7e24:
JMP 0x001e7e26
LAB_001e7e26:
JMP 0x001e7e28
LAB_001e7e28:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x001e7dd3
LAB_001e7e35:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00153df0
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x001e7eac
LAB_001e7e6e:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001587a0
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x00129f80
LAB_001e7e95:
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
LAB_001e7eac:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
js_typed_array_join(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5,int param_6)
{
int1 auVar1 [16];
int iVar2;
int iVar3;
long lVar4;
int1 auVar5 [16];
uint local_ac;
int local_a8;
int local_a0;
int local_9c;
long local_90;
int1 local_80 [32];
int1 local_60 [16];
int1 local_50 [16];
int local_3c;
int8 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_50._0_8_ = DAT_00213b80;
local_50._8_8_ = DAT_00213b88;
local_90 = 0;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
lVar4 = get_typed_array(param_1,param_2,param_3);
if (lVar4 == 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001e7eac;
}
iVar2 = typed_array_is_oob(lVar4);
auVar5._8_8_ = local_50._8_8_;
auVar5._0_8_ = local_50._0_8_;
if (iVar2 != 0) {
auVar5 = JS_ThrowTypeErrorArrayBufferOOB(local_28);
local_8 = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
goto LAB_001e7eac;
}
iVar2 = *(int *)(lVar4 + 0x40);
local_ac = 0x2c;
local_a8 = iVar2;
local_a0 = iVar2;
if ((local_3c == 0) && (local_50 = auVar5, 0 < local_2c)) {
iVar3 = JS_IsUndefined(*local_38,local_38[1]);
if (iVar3 == 0) {
local_50 = JS_ToString(local_28,*local_38,local_38[1]);
iVar3 = JS_IsException(local_50._0_8_,local_50._8_8_);
if (iVar3 != 0) goto LAB_001e7e95;
local_90 = local_50._0_8_;
if ((((uint)*(int8 *)(local_50._0_8_ + 4) & 0x7fffffff) == 1) &&
((*(ulong *)(local_50._0_8_ + 4) >> 0x1f & 1) == 0)) {
local_ac = (uint)*(byte *)(local_50._0_8_ + 0x18);
}
else {
local_ac = 0xffffffff;
}
local_a8 = *(int *)(lVar4 + 0x40);
local_a0 = min_int(iVar2,local_a8);
}
}
string_buffer_init(local_28,local_80,0);
for (local_9c = 0; local_9c < local_a0; local_9c = local_9c + 1) {
if (0 < local_9c) {
if ((int)local_ac < 0) {
iVar3 = string_buffer_concat
(local_80,local_90,0,(uint)*(int8 *)(local_90 + 4) & 0x7fffffff);
}
else {
iVar3 = string_buffer_putc8(local_80,local_ac);
}
if (iVar3 != 0) goto LAB_001e7e6e;
}
auVar5 = JS_GetPropertyUint32(local_28,local_20,local_18,local_9c);
local_60 = auVar5;
iVar3 = JS_IsNull(auVar5._0_8_,auVar5._8_8_);
if (iVar3 == 0) {
iVar3 = JS_IsUndefined(local_60._0_8_,local_60._8_8_);
if (iVar3 == 0) {
iVar3 = JS_IsException(local_60._0_8_,local_60._8_8_);
if (iVar3 != 0) goto LAB_001e7e6e;
auVar5 = local_60;
if (local_3c != 0) {
auVar5 = JS_ToLocaleStringFree(local_28,local_60._0_8_,local_60._8_8_);
}
local_60._8_8_ = auVar5._8_8_;
local_60._0_8_ = auVar5._0_8_;
iVar3 = string_buffer_concat_value_free(local_80,local_60._0_8_,local_60._8_8_);
local_60 = auVar5;
if (iVar3 != 0) goto LAB_001e7e6e;
}
}
}
local_9c = max_int(1,local_a8);
while( true ) {
if (iVar2 <= local_9c) break;
if ((int)local_ac < 0) {
iVar3 = string_buffer_concat
(local_80,local_90,0,(uint)*(int8 *)(local_90 + 4) & 0x7fffffff);
}
else {
iVar3 = string_buffer_putc8(local_80,local_ac);
}
if (iVar3 != 0) goto LAB_001e7e6e;
local_9c = local_9c + 1;
}
JS_FreeValue(local_28,local_50._0_8_,local_50._8_8_);
auVar5 = string_buffer_end(local_80);
local_8 = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
goto LAB_001e7eac;
LAB_001e7e6e:
string_buffer_free(local_80);
JS_FreeValue(local_28,local_50._0_8_,local_50._8_8_);
LAB_001e7e95:
local_10 = 0;
local_8 = 6;
LAB_001e7eac:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
4,148 | void fmt::v10::detail::parse_format_string<false, char, void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&, fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type, fmt::v10::detail::locale_ref)::format_handler>(fmt::v10::basic_string_view<char>, void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&, fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type, fmt::v10::detail::locale_ref)::format_handler&&)::writer::operator()(char const*, char const*) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h | FMT_CONSTEXPR void operator()(const Char* from, const Char* to) {
if (from == to) return;
for (;;) {
const Char* p = nullptr;
if (!find<IS_CONSTEXPR>(from, to, Char('}'), p))
return handler_.on_text(from, to);
++p;
if (p == to || *p != '}')
return handler_.on_error("unmatched '}' in format string");
handler_.on_text(from, p);
from = p + 1;
}
} | O0 | c | void fmt::v10::detail::parse_format_string<false, char, void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&, fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type, fmt::v10::detail::locale_ref)::format_handler>(fmt::v10::basic_string_view<char>, void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&, fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type, fmt::v10::detail::locale_ref)::format_handler&&)::writer::operator()(char const*, char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0xa8a0d
jmp 0xa8ab0
jmp 0xa8a0f
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x7d, %edx
leaq 0x8(%rsp), %rcx
callq 0xa8970
testb $0x1, %al
jne 0xa8a4d
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xa7c40
jmp 0xa8ab0
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0xa8a74
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
je 0xa8a87
movq (%rsp), %rax
movq (%rax), %rdi
leaq 0x71472(%rip), %rsi # 0x119ef4
callq 0xa8950
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0xa7c40
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0xa8a0f
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZZN3fmt3v106detail19parse_format_stringILb0EcZNS1_10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS5_EENS1_12vformat_argsIS5_E4typeENS1_10locale_refEE14format_handlerEEvNS8_IT0_EEOT1_EN6writerclEPKcSL_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_28], rax
mov rax, [rsp+28h+var_10]
cmp rax, [rsp+28h+var_18]
jnz short loc_A8A0D
jmp loc_A8AB0
loc_A8A0D:
jmp short $+2
loc_A8A0F:
mov [rsp+28h+var_20], 0
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_18]
mov edx, 7Dh ; '}'
lea rcx, [rsp+28h+var_20]
call _ZN3fmt3v106detail4findILb0EcPKcEEbT1_S5_T0_RS5_; fmt::v10::detail::find<false,char,char const*>(char const*,char const*,char,char const*&)
test al, 1
jnz short loc_A8A4D
mov rax, [rsp+28h+var_28]
mov rdi, [rax]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_18]
call _ZZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refEEN14format_handler7on_textEPKcSF_; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler::on_text(char const*,char const*)
jmp short loc_A8AB0
loc_A8A4D:
mov rax, [rsp+28h+var_20]
add rax, 1
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
cmp rax, [rsp+28h+var_18]
jz short loc_A8A74
mov rax, [rsp+28h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 7Dh ; '}'
jz short loc_A8A87
loc_A8A74:
mov rax, [rsp+28h+var_28]
mov rdi, [rax]; this
lea rsi, aUnmatchedInFor; "unmatched '}' in format string"
call _ZN3fmt3v106detail13error_handler8on_errorEPKc; fmt::v10::detail::error_handler::on_error(char const*)
loc_A8A87:
mov rax, [rsp+28h+var_28]
mov rdi, [rax]
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_20]
call _ZZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refEEN14format_handler7on_textEPKcSF_; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler::on_text(char const*,char const*)
mov rax, [rsp+28h+var_20]
add rax, 1
mov [rsp+28h+var_10], rax
jmp loc_A8A0F
loc_A8AB0:
add rsp, 28h
retn
| long long fmt::v10::detail::parse_format_string<false,char,void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler>(fmt::v10::basic_string_view<char>,void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler &&)::writer::operator()(
fmt::v10::detail::error_handler **a1,
long long a2,
long long a3)
{
long long result; // rax
_BYTE *v4; // [rsp+8h] [rbp-20h] BYREF
_BYTE *v5; // [rsp+10h] [rbp-18h]
_BYTE *v6; // [rsp+18h] [rbp-10h]
fmt::v10::detail::error_handler **v7; // [rsp+20h] [rbp-8h]
v7 = a1;
v6 = (_BYTE *)a2;
v5 = (_BYTE *)a3;
result = a2;
if ( a2 != a3 )
{
while ( 1 )
{
v4 = 0LL;
if ( !fmt::v10::detail::find<false,char,char const*>((long long)v6, (long long)v5, 125, &v4) )
break;
if ( ++v4 == v5 || *v4 != 125 )
fmt::v10::detail::error_handler::on_error(*a1, (fmt::v10::detail *)"unmatched '}' in format string");
fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler::on_text(
(long long)*a1,
(long long)v6,
(long long)v4);
v6 = v4 + 1;
}
return fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler::on_text(
(long long)*a1,
(long long)v6,
(long long)v5);
}
return result;
}
| operator():
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP RAX,qword ptr [RSP + 0x10]
JNZ 0x001a8a0d
JMP 0x001a8ab0
LAB_001a8a0d:
JMP 0x001a8a0f
LAB_001a8a0f:
MOV qword ptr [RSP + 0x8],0x0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,0x7d
LEA RCX,[RSP + 0x8]
CALL 0x001a8970
TEST AL,0x1
JNZ 0x001a8a4d
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x001a7c40
JMP 0x001a8ab0
LAB_001a8a4d:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x10]
JZ 0x001a8a74
MOV RAX,qword ptr [RSP + 0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7d
JZ 0x001a8a87
LAB_001a8a74:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x219ef4]
CALL 0x001a8950
LAB_001a8a87:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x001a7c40
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001a8a0f
LAB_001a8ab0:
ADD RSP,0x28
RET
|
/* fmt::v10::detail::parse_format_string<false, char,
fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&,
fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type,
fmt::v10::detail::locale_ref)::format_handler>(fmt::v10::basic_string_view<char>,
fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&,
fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type,
fmt::v10::detail::locale_ref)::format_handler&&)::writer::TEMPNAMEPLACEHOLDERVALUE(char const*,
char const*) */
void __thiscall
fmt::v10::detail::
parse_format_string<false,char,fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler>(fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)::format_handler&&)
::writer::operator()(writer *this,char *param_1,char *param_2)
{
bool bVar1;
char *local_20;
char *local_18;
char *local_10;
writer *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
if (param_1 != param_2) {
while( true ) {
local_20 = (char *)0x0;
bVar1 = find<false,char,char_const*>(local_10,local_18,'}',&local_20);
if (!bVar1) break;
local_20 = local_20 + 1;
if ((local_20 == local_18) || (*local_20 != '}')) {
error_handler::on_error(*(error_handler **)this,"unmatched \'}\' in format string");
}
vformat_to<char>(fmt::v10::detail::buffer<char>&,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
::format_handler::on_text(*(format_handler **)this,local_10,local_20);
local_10 = local_20 + 1;
}
vformat_to<char>(fmt::v10::detail::buffer<char>&,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
::format_handler::on_text(*(format_handler **)this,local_10,local_18);
}
return;
}
|
|
4,149 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | llama.cpp/common/./json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1d2d3
leaq 0x28(%rdi), %rcx
jmp 0x1d2e0
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x1d2e6
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x1d2f0
decq 0x40(%rdi)
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_1D2D3
lea rcx, [rdi+28h]
jmp short loc_1D2E0
loc_1D2D3:
mov rax, [rdi+30h]
test rax, rax
jz short loc_1D2E6
lea rcx, [rdi+30h]
loc_1D2E0:
dec rax
mov [rcx], rax
loc_1D2E6:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_1D2F0
dec qword ptr [rdi+40h]
locret_1D2F0:
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
--*(_QWORD *)(a1 + 64);
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0011d2d3
LEA RCX,[RDI + 0x28]
JMP 0x0011d2e0
LAB_0011d2d3:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0011d2e6
LEA RCX,[RDI + 0x30]
LAB_0011d2e0:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0011d2e6:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0011d2f0
DEC qword ptr [RDI + 0x40]
LAB_0011d2f0:
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0011d2e6;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0011d2e6:
if (*(int *)(this + 0x14) != -1) {
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
|
|
4,150 | insert_at | eloqsql/mysys/queues.c | static void insert_at(QUEUE *queue, uchar *element, uint idx)
{
uint next_index, offset_to_key= queue->offset_to_key;
uint offset_to_queue_pos= queue->offset_to_queue_pos;
/* max_at_top swaps the comparison if we want to order by desc */
while ((next_index= idx >> 1) > 0 &&
queue->compare(queue->first_cmp_arg,
element + offset_to_key,
queue->root[next_index] + offset_to_key) *
queue->max_at_top < 0)
{
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
} | O0 | c | insert_at:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
shrl %ecx
movl %ecx, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
jbe 0xf746a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %ecx
addq %rcx, %rsi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x18(%rbp), %edx
movq (%rcx,%rdx,8), %rdx
movl -0x1c(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
setl %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xf7473
jmp 0xf74b8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x20(%rbp)
je 0xf74ad
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xf7417
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x20(%rbp)
je 0xf74de
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| insert_at:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov eax, [rax+18h]
mov [rbp+var_1C], eax
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_20], eax
loc_F7417:
mov ecx, [rbp+var_14]
shr ecx, 1
mov [rbp+var_18], ecx
xor eax, eax
cmp ecx, 0
mov [rbp+var_21], al
jbe short loc_F746A
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rsi, [rbp+var_10]
mov ecx, [rbp+var_1C]
add rsi, rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_18]
mov rdx, [rcx+rdx*8]
mov ecx, [rbp+var_1C]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
setl al
mov [rbp+var_21], al
loc_F746A:
mov al, [rbp+var_21]
test al, 1
jnz short loc_F7473
jmp short loc_F74B8
loc_F7473:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_18]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov [rax+rcx*8], rdx
cmp [rbp+var_20], 0
jz short loc_F74AD
mov edx, [rbp+var_14]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_20]
mov [rax+rcx-1], edx
loc_F74AD:
mov eax, [rbp+var_18]
mov [rbp+var_14], eax
jmp loc_F7417
loc_F74B8:
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_14]
mov [rax+rcx*8], rdx
cmp [rbp+var_20], 0
jz short loc_F74DE
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov [rax+rcx-1], edx
loc_F74DE:
add rsp, 30h
pop rbp
retn
| long long insert_at(long long *a1, long long a2, unsigned int a3)
{
long long result; // rax
bool v4; // [rsp+Fh] [rbp-21h]
unsigned int v5; // [rsp+10h] [rbp-20h]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
unsigned int v7; // [rsp+18h] [rbp-18h]
v6 = *((_DWORD *)a1 + 6);
v5 = *((_DWORD *)a1 + 7);
while ( 1 )
{
v7 = a3 >> 1;
v4 = 0;
if ( a3 >> 1 )
v4 = (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, _QWORD))a1[5])(
a1[1],
v6 + a2,
v6 + *(_QWORD *)(*a1 + 8LL * v7))) < 0;
if ( !v4 )
break;
*(_QWORD *)(*a1 + 8LL * a3) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v5 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * a3) + v5 - 1LL) = a3;
a3 >>= 1;
}
result = *a1;
*(_QWORD *)(*a1 + 8LL * a3) = a2;
if ( v5 )
{
result = a2;
*(_DWORD *)(a2 + v5 - 1) = a3;
}
return result;
}
| insert_at:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x20],EAX
LAB_001f7417:
MOV ECX,dword ptr [RBP + -0x14]
SHR ECX,0x1
MOV dword ptr [RBP + -0x18],ECX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x21],AL
JBE 0x001f746a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
SETL AL
MOV byte ptr [RBP + -0x21],AL
LAB_001f746a:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001f7473
JMP 0x001f74b8
LAB_001f7473:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x001f74ad
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_001f74ad:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001f7417
LAB_001f74b8:
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x001f74de
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_001f74de:
ADD RSP,0x30
POP RBP
RET
|
void insert_at(long *param_1,long param_2,uint param_3)
{
uint uVar1;
uint uVar2;
int iVar3;
uint uVar4;
bool bVar5;
uint local_1c;
uVar1 = *(uint *)(param_1 + 3);
uVar2 = *(uint *)((long)param_1 + 0x1c);
uVar4 = param_3;
while( true ) {
local_1c = uVar4;
uVar4 = local_1c >> 1;
bVar5 = false;
if (uVar4 != 0) {
iVar3 = (*(code *)param_1[5])
(param_1[1],param_2 + (ulong)uVar1,
*(long *)(*param_1 + (ulong)uVar4 * 8) + (ulong)uVar1);
bVar5 = iVar3 * *(int *)((long)param_1 + 0x24) < 0;
}
if (!bVar5) break;
*(int8 *)(*param_1 + (ulong)local_1c * 8) = *(int8 *)(*param_1 + (ulong)uVar4 * 8);
if (uVar2 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)local_1c * 8) + -1 + (ulong)uVar2) = local_1c;
}
}
*(long *)(*param_1 + (ulong)local_1c * 8) = param_2;
if (uVar2 != 0) {
*(uint *)(param_2 + -1 + (ulong)uVar2) = local_1c;
}
return;
}
|
|
4,151 | ma_get_length | eloqsql/storage/maria/ma_blockrec.c | static ulong ma_get_length(const uchar **packet)
{
reg1 const uchar *pos= *packet;
if (*pos < 251)
{
(*packet)++;
return (ulong) *pos;
}
if (*pos == 251)
{
(*packet)+= 2;
return (ulong) pos[1];
}
if (*pos == 252)
{
(*packet)+= 3;
return (ulong) uint2korr(pos+1);
}
if (*pos == 253)
{
(*packet)+= 4;
return (ulong) uint3korr(pos+1);
}
DBUG_ASSERT(*pos == 254);
(*packet)+= 5;
return (ulong) uint4korr(pos+1);
} | O0 | c | ma_get_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jge 0x7c7cf
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x7c889
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jne 0x7c7fc
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x2, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x7c889
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfc, %eax
jne 0x7c826
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x3, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzwl 0x1(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x7c889
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfd, %eax
jne 0x7c86c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x7c889
jmp 0x7c86e
jmp 0x7c870
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x5, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl 0x1(%rax), %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| ma_get_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jge short loc_7C7CF
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_8], rax
jmp loc_7C889
loc_7C7CF:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jnz short loc_7C7FC
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 2
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov [rbp+var_8], rax
jmp loc_7C889
loc_7C7FC:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FCh
jnz short loc_7C826
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 3
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+1]
mov [rbp+var_8], rax
jmp short loc_7C889
loc_7C826:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FDh
jnz short loc_7C86C
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_7C889
loc_7C86C:
jmp short $+2
loc_7C86E:
jmp short $+2
loc_7C870:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 5
mov [rax], rcx
mov rax, [rbp+var_18]
mov eax, [rax+1]
mov [rbp+var_8], rax
loc_7C889:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ma_get_length(unsigned __int8 **a1)
{
unsigned __int8 *v2; // [rsp+0h] [rbp-18h]
v2 = *a1;
if ( **a1 >= 0xFBu )
{
switch ( *v2 )
{
case 0xFBu:
*a1 += 2;
return v2[1];
case 0xFCu:
*a1 += 3;
return *(unsigned __int16 *)(v2 + 1);
case 0xFDu:
*a1 += 4;
return (v2[3] << 16) | (unsigned int)*(unsigned __int16 *)(v2 + 1);
default:
*a1 += 5;
return *(unsigned int *)(v2 + 1);
}
}
else
{
++*a1;
return *v2;
}
}
| ma_get_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JGE 0x0017c7cf
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c889
LAB_0017c7cf:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JNZ 0x0017c7fc
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x2
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c889
LAB_0017c7fc:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfc
JNZ 0x0017c826
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x3
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x1]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c889
LAB_0017c826:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfd
JNZ 0x0017c86c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c889
LAB_0017c86c:
JMP 0x0017c86e
LAB_0017c86e:
JMP 0x0017c870
LAB_0017c870:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x5
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x1]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017c889:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
uint ma_get_length(long *param_1)
{
byte *pbVar1;
uint uVar2;
pbVar1 = (byte *)*param_1;
if (*pbVar1 < 0xfb) {
*param_1 = *param_1 + 1;
uVar2 = (uint)*pbVar1;
}
else if (*pbVar1 == 0xfb) {
*param_1 = *param_1 + 2;
uVar2 = (uint)pbVar1[1];
}
else if (*pbVar1 == 0xfc) {
*param_1 = *param_1 + 3;
uVar2 = (uint)*(ushort *)(pbVar1 + 1);
}
else if (*pbVar1 == 0xfd) {
*param_1 = *param_1 + 4;
uVar2 = (uint)*(uint3 *)(pbVar1 + 1);
}
else {
*param_1 = *param_1 + 5;
uVar2 = *(uint *)(pbVar1 + 1);
}
return uVar2;
}
|
|
4,152 | httpdwnld_mem_download_cb | qoraal-tictactoe/build_O0/_deps/qoraal_http-src/src/httpdwnld.c | int32_t
httpdwnld_mem_download_cb (int32_t status, uint8_t * buffer, uint32_t len, uintptr_t parm)
{
HTTPDWNLD_MEM_T * mem = (HTTPDWNLD_MEM_T *) parm ;
int32_t res = EOK ;
int i ;
char* tmp ;
if (status/100 == 2) { // connected an open
return EOK ;
}
if (len) {
mem->dwnld.bytes += len ;
i = 0 ;
while (mem->capacity + i < mem->offset + len) {
i += mem->grow ? mem->grow : 2*1024 ;
}
if (i) {
tmp = HTTP_CLIENT_MALLOC (mem->capacity + i) ;
if (!tmp) {
DBG_MESSAGE_HTTPDWNLD (DBG_MESSAGE_SEVERITY_ERROR,
"HTTP :E: memory failed from heap 0x%x for %d bytes after %d bytes",
mem->heap, i, mem->capacity);
return E_NOMEM ;
}
if (mem->mem) {
memcpy(tmp, mem->mem, mem->offset) ;
HTTP_CLIENT_FREE (mem->mem) ;
}
mem->mem = tmp ;
mem->capacity += i ;
}
if (mem->capacity >= mem->offset + len) {
memcpy (&mem->mem[mem->offset], buffer, len) ;
mem->offset += len ;
} else {
return E_NOMEM ;
}
}
return mem->dwnld.cancel ? E_CANCELED : res ;
} | O0 | c | httpdwnld_mem_download_cb:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x8(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x2, %eax
jne 0x2f931
movl $0x0, -0x4(%rbp)
jmp 0x2fab2
cmpl $0x0, -0x14(%rbp)
je 0x2fa92
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
addl 0x34(%rax), %ecx
movl %ecx, 0x34(%rax)
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl 0x4c(%rax), %eax
addl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
movl 0x44(%rcx), %ecx
addl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jae 0x2f992
movq -0x28(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x2f97d
movq -0x28(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x2f987
movl $0x800, %eax # imm = 0x800
movl %eax, -0x3c(%rbp)
jmp 0x2f987
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x2f94f
cmpl $0x0, -0x30(%rbp)
je 0x2fa43
movq -0x28(%rbp), %rax
movl 0x4c(%rax), %eax
addl -0x30(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movl $0x1, %edi
callq 0x1b9b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2f9f3
movq -0x28(%rbp), %rax
movl 0x40(%rax), %ecx
movl -0x30(%rbp), %r8d
movq -0x28(%rbp), %rax
movl 0x4c(%rax), %r9d
movl $0x2, %edi
xorl %esi, %esi
leaq 0x12432(%rip), %rdx # 0x41e12
movb $0x0, %al
callq 0x1e560
movl $0xfffff700, -0x4(%rbp) # imm = 0xFFFFF700
jmp 0x2fab2
movq -0x28(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2fa2a
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x28(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, %edx
callq 0x6350
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rsi
movl $0x1, %edi
callq 0x1ba20
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
addl 0x4c(%rax), %ecx
movl %ecx, 0x4c(%rax)
movq -0x28(%rbp), %rax
movl 0x4c(%rax), %eax
movq -0x28(%rbp), %rcx
movl 0x44(%rcx), %ecx
addl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jb 0x2fa87
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x44(%rax), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x6350
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
addl 0x44(%rax), %ecx
movl %ecx, 0x44(%rax)
jmp 0x2fa90
movl $0xfffff700, -0x4(%rbp) # imm = 0xFFFFF700
jmp 0x2fab2
jmp 0x2fa92
movq -0x28(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x2faa6
movl $0xfffff6ed, %eax # imm = 0xFFFFF6ED
movl %eax, -0x40(%rbp)
jmp 0x2faac
movl -0x2c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| httpdwnld_mem_download_cb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov [rbp+var_2C], 0
mov eax, [rbp+var_8]
mov ecx, 64h ; 'd'
cdq
idiv ecx
cmp eax, 2
jnz short loc_2F931
mov [rbp+var_4], 0
jmp loc_2FAB2
loc_2F931:
cmp [rbp+var_14], 0
jz loc_2FA92
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
add ecx, [rax+34h]
mov [rax+34h], ecx
mov [rbp+var_30], 0
loc_2F94F:
mov rax, [rbp+var_28]
mov eax, [rax+4Ch]
add eax, [rbp+var_30]
mov rcx, [rbp+var_28]
mov ecx, [rcx+44h]
add ecx, [rbp+var_14]
cmp eax, ecx
jnb short loc_2F992
mov rax, [rbp+var_28]
cmp dword ptr [rax+48h], 0
jz short loc_2F97D
mov rax, [rbp+var_28]
mov eax, [rax+48h]
mov [rbp+var_3C], eax
jmp short loc_2F987
loc_2F97D:
mov eax, 800h
mov [rbp+var_3C], eax
jmp short $+2
loc_2F987:
mov eax, [rbp+var_3C]
add eax, [rbp+var_30]
mov [rbp+var_30], eax
jmp short loc_2F94F
loc_2F992:
cmp [rbp+var_30], 0
jz loc_2FA43
mov rax, [rbp+var_28]
mov eax, [rax+4Ch]
add eax, [rbp+var_30]
mov eax, eax
mov esi, eax
mov edi, 1
call qoraal_malloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_2F9F3
mov rax, [rbp+var_28]
mov ecx, [rax+40h]
mov r8d, [rbp+var_30]
mov rax, [rbp+var_28]
mov r9d, [rax+4Ch]
mov edi, 2
xor esi, esi
lea rdx, aHttpEMemoryFai; "HTTP :E: memory failed from heap 0x%x "...
mov al, 0
call svc_logger_type_log
mov [rbp+var_4], 0FFFFF700h
jmp loc_2FAB2
loc_2F9F3:
mov rax, [rbp+var_28]
cmp qword ptr [rax+50h], 0
jz short loc_2FA2A
mov rdi, [rbp+var_38]
mov rax, [rbp+var_28]
mov rsi, [rax+50h]
mov rax, [rbp+var_28]
mov eax, [rax+44h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_28]
mov rsi, [rax+50h]
mov edi, 1
call qoraal_free
loc_2FA2A:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+50h], rcx
mov ecx, [rbp+var_30]
mov rax, [rbp+var_28]
add ecx, [rax+4Ch]
mov [rax+4Ch], ecx
loc_2FA43:
mov rax, [rbp+var_28]
mov eax, [rax+4Ch]
mov rcx, [rbp+var_28]
mov ecx, [rcx+44h]
add ecx, [rbp+var_14]
cmp eax, ecx
jb short loc_2FA87
mov rax, [rbp+var_28]
mov rdi, [rax+50h]
mov rax, [rbp+var_28]
mov eax, [rax+44h]
add rdi, rax
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
add ecx, [rax+44h]
mov [rax+44h], ecx
jmp short loc_2FA90
loc_2FA87:
mov [rbp+var_4], 0FFFFF700h
jmp short loc_2FAB2
loc_2FA90:
jmp short $+2
loc_2FA92:
mov rax, [rbp+var_28]
cmp dword ptr [rax+38h], 0
jz short loc_2FAA6
mov eax, 0FFFFF6EDh
mov [rbp+var_40], eax
jmp short loc_2FAAC
loc_2FAA6:
mov eax, [rbp+var_2C]
mov [rbp+var_40], eax
loc_2FAAC:
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
loc_2FAB2:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long httpdwnld_mem_download_cb(int a1, long long a2, unsigned int a3, long long a4)
{
int v6; // [rsp+4h] [rbp-3Ch]
long long v7; // [rsp+8h] [rbp-38h]
int i; // [rsp+10h] [rbp-30h]
if ( a1 / 100 == 2 )
{
return 0;
}
else
{
if ( a3 )
{
*(_DWORD *)(a4 + 52) += a3;
for ( i = 0; i + *(_DWORD *)(a4 + 76) < a3 + *(_DWORD *)(a4 + 68); i += v6 )
{
if ( *(_DWORD *)(a4 + 72) )
v6 = *(_DWORD *)(a4 + 72);
else
v6 = 2048;
}
if ( i )
{
v7 = qoraal_malloc(1u, (unsigned int)(i + *(_DWORD *)(a4 + 76)));
if ( !v7 )
{
svc_logger_type_log(
2u,
0,
(long long)"HTTP :E: memory failed from heap 0x%x for %d bytes after %d bytes",
*(_DWORD *)(a4 + 64),
i,
*(_DWORD *)(a4 + 76));
return (unsigned int)-2304;
}
if ( *(_QWORD *)(a4 + 80) )
{
memcpy(v7, *(_QWORD *)(a4 + 80), *(unsigned int *)(a4 + 68));
qoraal_free(1u, *(_QWORD *)(a4 + 80));
}
*(_QWORD *)(a4 + 80) = v7;
*(_DWORD *)(a4 + 76) += i;
}
if ( *(_DWORD *)(a4 + 76) < a3 + *(_DWORD *)(a4 + 68) )
return (unsigned int)-2304;
memcpy(*(unsigned int *)(a4 + 68) + *(_QWORD *)(a4 + 80), a2, a3);
*(_DWORD *)(a4 + 68) += a3;
}
if ( *(_DWORD *)(a4 + 56) )
return (unsigned int)-2323;
else
return 0;
}
}
| httpdwnld_mem_download_cb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x2c],0x0
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,0x64
CDQ
IDIV ECX
CMP EAX,0x2
JNZ 0x0012f931
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0012fab2
LAB_0012f931:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0012fa92
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
ADD ECX,dword ptr [RAX + 0x34]
MOV dword ptr [RAX + 0x34],ECX
MOV dword ptr [RBP + -0x30],0x0
LAB_0012f94f:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4c]
ADD EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x44]
ADD ECX,dword ptr [RBP + -0x14]
CMP EAX,ECX
JNC 0x0012f992
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x48],0x0
JZ 0x0012f97d
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x48]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012f987
LAB_0012f97d:
MOV EAX,0x800
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0012f987
LAB_0012f987:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0012f94f
LAB_0012f992:
CMP dword ptr [RBP + -0x30],0x0
JZ 0x0012fa43
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4c]
ADD EAX,dword ptr [RBP + -0x30]
MOV EAX,EAX
MOV ESI,EAX
MOV EDI,0x1
CALL 0x0011b9b0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0012f9f3
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x40]
MOV R8D,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV R9D,dword ptr [RAX + 0x4c]
MOV EDI,0x2
XOR ESI,ESI
LEA RDX,[0x141e12]
MOV AL,0x0
CALL 0x0011e560
MOV dword ptr [RBP + -0x4],0xfffff700
JMP 0x0012fab2
LAB_0012f9f3:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0012fa2a
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x44]
MOV EDX,EAX
CALL 0x00106350
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x50]
MOV EDI,0x1
CALL 0x0011ba20
LAB_0012fa2a:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x50],RCX
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
ADD ECX,dword ptr [RAX + 0x4c]
MOV dword ptr [RAX + 0x4c],ECX
LAB_0012fa43:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4c]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x44]
ADD ECX,dword ptr [RBP + -0x14]
CMP EAX,ECX
JC 0x0012fa87
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x44]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x00106350
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
ADD ECX,dword ptr [RAX + 0x44]
MOV dword ptr [RAX + 0x44],ECX
JMP 0x0012fa90
LAB_0012fa87:
MOV dword ptr [RBP + -0x4],0xfffff700
JMP 0x0012fab2
LAB_0012fa90:
JMP 0x0012fa92
LAB_0012fa92:
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x38],0x0
JZ 0x0012faa6
MOV EAX,0xfffff6ed
MOV dword ptr [RBP + -0x40],EAX
JMP 0x0012faac
LAB_0012faa6:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x40],EAX
LAB_0012faac:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012fab2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 httpdwnld_mem_download_cb(int param_1,void *param_2,uint param_3,long param_4)
{
void *__dest;
int4 local_48;
int local_44;
int local_38;
int4 local_c;
if (param_1 / 100 == 2) {
local_c = 0;
}
else {
if (param_3 != 0) {
*(uint *)(param_4 + 0x34) = param_3 + *(int *)(param_4 + 0x34);
for (local_38 = 0;
(uint)(*(int *)(param_4 + 0x4c) + local_38) < *(int *)(param_4 + 0x44) + param_3;
local_38 = local_44 + local_38) {
if (*(int *)(param_4 + 0x48) == 0) {
local_44 = 0x800;
}
else {
local_44 = *(int *)(param_4 + 0x48);
}
}
if (local_38 != 0) {
__dest = (void *)qoraal_malloc(1,*(int *)(param_4 + 0x4c) + local_38,
(long)param_1 % 100 & 0xffffffff);
if (__dest == (void *)0x0) {
svc_logger_type_log(2,0,s_HTTP__E__memory_failed_from_heap_00141e12,
*(int4 *)(param_4 + 0x40),local_38,
*(int4 *)(param_4 + 0x4c));
return 0xfffff700;
}
if (*(long *)(param_4 + 0x50) != 0) {
memcpy(__dest,*(void **)(param_4 + 0x50),(ulong)*(uint *)(param_4 + 0x44));
qoraal_free(1,*(int8 *)(param_4 + 0x50));
}
*(void **)(param_4 + 0x50) = __dest;
*(int *)(param_4 + 0x4c) = local_38 + *(int *)(param_4 + 0x4c);
}
if (*(uint *)(param_4 + 0x4c) < *(int *)(param_4 + 0x44) + param_3) {
return 0xfffff700;
}
memcpy((void *)(*(long *)(param_4 + 0x50) + (ulong)*(uint *)(param_4 + 0x44)),param_2,
(ulong)param_3);
*(uint *)(param_4 + 0x44) = param_3 + *(int *)(param_4 + 0x44);
}
if (*(int *)(param_4 + 0x38) == 0) {
local_48 = 0;
}
else {
local_48 = 0xfffff6ed;
}
local_c = local_48;
}
return local_c;
}
|
|
4,153 | CLI::App::parse(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::parse(std::vector<std::string> &&args) {
// Clear if parsed
if(parsed_ > 0)
clear();
// parsed_ is incremented in commands/subcommands,
// but placed here to make sure this is cleared when
// running parse after an error is thrown, even by _validate or _configure.
parsed_ = 1;
_validate();
_configure();
// set the parent as nullptr as this object should be the top now
parent_ = nullptr;
parsed_ = 0;
_parse(std::move(args));
run_callback();
} | O0 | cpp | CLI::App::parse(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x2a4(%rax)
jbe 0x3302a
movq -0x18(%rbp), %rdi
callq 0x33370
movq -0x18(%rbp), %rdi
movl $0x1, 0x2a4(%rdi)
callq 0x33480
movq -0x18(%rbp), %rdi
callq 0x338d0
movq -0x18(%rbp), %rdi
movq $0x0, 0x2c8(%rdi)
movl $0x0, 0x2a4(%rdi)
movq -0x10(%rbp), %rsi
callq 0x339f0
movq -0x18(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x33a70
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN3CLI3App5parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
cmp dword ptr [rax+2A4h], 0
jbe short loc_3302A
mov rdi, [rbp+var_18]; this
call _ZN3CLI3App5clearEv; CLI::App::clear(void)
loc_3302A:
mov rdi, [rbp+var_18]; this
mov dword ptr [rdi+2A4h], 1
call _ZNK3CLI3App9_validateEv; CLI::App::_validate(void)
mov rdi, [rbp+var_18]; this
call _ZN3CLI3App10_configureEv; CLI::App::_configure(void)
mov rdi, [rbp+var_18]
mov qword ptr [rdi+2C8h], 0
mov dword ptr [rdi+2A4h], 0
mov rsi, [rbp+var_10]
call _ZN3CLI3App6_parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse(std::vector<std::string> &&)
mov rdi, [rbp+var_18]; this
xor edx, edx; bool
mov esi, edx; bool
call _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool)
add rsp, 20h
pop rbp
retn
| long long CLI::App::parse(long long a1, long long a2)
{
if ( *(_DWORD *)(a1 + 676) )
CLI::App::clear((CLI::App *)a1);
*(_DWORD *)(a1 + 676) = 1;
CLI::App::_validate((CLI::App *)a1);
CLI::App::_configure((CLI::App *)a1);
*(_QWORD *)(a1 + 712) = 0LL;
*(_DWORD *)(a1 + 676) = 0;
CLI::App::_parse(a1, a2);
return CLI::App::run_callback((CLI::App *)a1, 0, 0);
}
| parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RAX + 0x2a4],0x0
JBE 0x0013302a
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00133370
LAB_0013302a:
MOV RDI,qword ptr [RBP + -0x18]
MOV dword ptr [RDI + 0x2a4],0x1
CALL 0x00133480
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001338d0
MOV RDI,qword ptr [RBP + -0x18]
MOV qword ptr [RDI + 0x2c8],0x0
MOV dword ptr [RDI + 0x2a4],0x0
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001339f0
MOV RDI,qword ptr [RBP + -0x18]
XOR EDX,EDX
MOV ESI,EDX
CALL 0x00133a70
ADD RSP,0x20
POP RBP
RET
|
/* CLI::App::parse(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&) */
void __thiscall CLI::App::parse(App *this,vector *param_1)
{
if (*(int *)(this + 0x2a4) != 0) {
clear(this);
}
*(int4 *)(this + 0x2a4) = 1;
_validate(this);
_configure(this);
*(int8 *)(this + 0x2c8) = 0;
*(int4 *)(this + 0x2a4) = 0;
_parse(this,param_1);
run_callback(this,false,false);
return;
}
|
|
4,154 | ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp | void ScreenInteractive::RunOnceBlocking(Component component) {
ExecuteSignalHandlers();
Task task;
if (task_receiver_->Receive(&task)) {
HandleTask(component, task);
}
RunOnce(component);
} | O3 | cpp | ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>):
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2e730
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rax
movaps %xmm0, -0x30(%rax)
movaps %xmm0, -0x20(%rax)
movaps %xmm0, -0x10(%rax)
movaps %xmm0, (%rax)
movl $0x3, -0x24(%rax)
movl $0x1, -0x20(%rax)
movq %rax, -0x10(%rax)
movb $0x0, 0x10(%rax)
movq 0x70(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0x30c9c
testb %al, %al
je 0x2e6a7
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x2e686
movq 0x2a938(%rip), %rcx # 0x58fb0
cmpb $0x0, (%rcx)
je 0x2e682
incl 0x8(%rax)
jmp 0x2e686
lock
incl 0x8(%rax)
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2e792
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2e6a7
callq 0x14af8
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x2e6d1
movq 0x2a8ed(%rip), %rcx # 0x58fb0
cmpb $0x0, (%rcx)
je 0x2e6cd
incl 0x8(%rax)
jmp 0x2e6d1
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2e7f8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e6eb
callq 0x14af8
leaq 0x20(%rsp), %rdi
callq 0x14cb0
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
jmp 0x2e70f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e71e
callq 0x14af8
jmp 0x2e71e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x14cb0
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui17ScreenInteractive15RunOnceBlockingESt10shared_ptrINS_13ComponentBaseEE:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
call _ZN5ftxui12_GLOBAL__N_121ExecuteSignalHandlersEv; ftxui::`anonymous namespace'::ExecuteSignalHandlers(void)
xorps xmm0, xmm0
lea rax, [rsp+78h+var_28]
movaps xmmword ptr [rax-30h], xmm0
movaps xmmword ptr [rax-20h], xmm0
movaps xmmword ptr [rax-10h], xmm0
movaps xmmword ptr [rax], xmm0
mov dword ptr [rax-24h], 3
mov dword ptr [rax-20h], 1
mov [rax-10h], rax
mov byte ptr [rax+10h], 0
mov rdi, [rbx+70h]
lea rsi, [rsp+78h+var_58]
call _ZN5ftxui12ReceiverImplISt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEEE7ReceiveEPS7_; ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::Receive(std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>*)
test al, al
jz short loc_2E6A7
mov rax, [r14]
mov qword ptr [rsp+78h+var_68], rax; int
mov rax, [r14+8]
mov qword ptr [rsp+78h+var_60], rax; char
test rax, rax
jz short loc_2E686
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2E682
inc dword ptr [rax+8]
jmp short loc_2E686
loc_2E682:
lock inc dword ptr [rax+8]
loc_2E686:
lea rsi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_58]
mov rdi, rbx
call _ZN5ftxui17ScreenInteractive10HandleTaskESt10shared_ptrINS_13ComponentBaseEERSt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEE; ftxui::ScreenInteractive::HandleTask(std::shared_ptr<ftxui::ComponentBase>,std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask> &)
mov rdi, qword ptr [rsp+78h+var_60]
test rdi, rdi
jz short loc_2E6A7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2E6A7:
mov rax, [r14]
mov [rsp+78h+var_78], rax; __int64
mov rax, [r14+8]
mov qword ptr [rsp+78h+var_70], rax; int
test rax, rax
jz short loc_2E6D1
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2E6CD
inc dword ptr [rax+8]
jmp short loc_2E6D1
loc_2E6CD:
lock inc dword ptr [rax+8]
loc_2E6D1:
mov rsi, rsp
mov rdi, rbx; this
call _ZN5ftxui17ScreenInteractive7RunOnceESt10shared_ptrINS_13ComponentBaseEE; ftxui::ScreenInteractive::RunOnce(std::shared_ptr<ftxui::ComponentBase>)
mov rdi, qword ptr [rsp+78h+var_70]
test rdi, rdi
jz short loc_2E6EB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2E6EB:
lea rdi, [rsp+78h+var_58]
call _ZNSt8__detail9__variant16_Variant_storageILb0EJN5ftxui5EventESt8functionIFvvEENS2_13AnimationTaskEEED2Ev; std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage()
add rsp, 68h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_10]
jmp short loc_2E70F
mov rbx, rax
mov rdi, [rsp+arg_0]
loc_2E70F:
test rdi, rdi
jz short loc_2E71E
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_2E71E
mov rbx, rax
loc_2E71E:
lea rdi, [rsp+arg_18]
call _ZNSt8__detail9__variant16_Variant_storageILb0EJN5ftxui5EventESt8functionIFvvEENS2_13AnimationTaskEEED2Ev; std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage()
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::ScreenInteractive::RunOnceBlocking(ftxui::ScreenInteractive *this, long long *a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+0h] [rbp-78h]
volatile signed __int32 *v6; // [rsp+8h] [rbp-70h]
int v7[2]; // [rsp+10h] [rbp-68h] BYREF
char v8[8]; // [rsp+18h] [rbp-60h]
__int128 v9; // [rsp+20h] [rbp-58h] BYREF
__int128 v10; // [rsp+30h] [rbp-48h]
__int128 v11; // [rsp+40h] [rbp-38h]
__int128 v12; // [rsp+50h] [rbp-28h] BYREF
char v13; // [rsp+60h] [rbp-18h]
ftxui::`anonymous namespace'::ExecuteSignalHandlers(this);
v9 = 0LL;
v10 = 0LL;
v11 = 0LL;
v12 = 0LL;
HIDWORD(v9) = 3;
LODWORD(v10) = 1;
*(_QWORD *)&v11 = &v12;
v13 = 0;
if ( (unsigned __int8)ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::Receive(
*((_QWORD *)this + 14),
&v9) )
{
*(_QWORD *)v7 = *a2;
v2 = a2[1];
*(_QWORD *)v8 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v2 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v2 + 8));
}
ftxui::ScreenInteractive::HandleTask((_DWORD)this, (unsigned int)v7, (unsigned int)&v9);
if ( *(_QWORD *)v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*(volatile signed __int32 **)v8);
}
v5 = *a2;
v3 = a2[1];
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
ftxui::ScreenInteractive::RunOnce(this, v5, v3, v7[0], v8[0]);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
return std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage((long long)&v9);
}
| RunOnceBlocking:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
CALL 0x0012e730
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x50]
MOVAPS xmmword ptr [RAX + -0x30],XMM0
MOVAPS xmmword ptr [RAX + -0x20],XMM0
MOVAPS xmmword ptr [RAX + -0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV dword ptr [RAX + -0x24],0x3
MOV dword ptr [RAX + -0x20],0x1
MOV qword ptr [RAX + -0x10],RAX
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBX + 0x70]
LAB_0012e64d:
LEA RSI,[RSP + 0x20]
CALL 0x00130c9c
TEST AL,AL
JZ 0x0012e6a7
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x0012e686
MOV RCX,qword ptr [0x00158fb0]
CMP byte ptr [RCX],0x0
JZ 0x0012e682
INC dword ptr [RAX + 0x8]
JMP 0x0012e686
LAB_0012e682:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012e686:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0012e792
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012e6a7
CALL 0x00114af8
LAB_0012e6a7:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0012e6d1
MOV RCX,qword ptr [0x00158fb0]
CMP byte ptr [RCX],0x0
JZ 0x0012e6cd
INC dword ptr [RAX + 0x8]
JMP 0x0012e6d1
LAB_0012e6cd:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012e6d1:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0012e7f8
LAB_0012e6dc:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012e6eb
CALL 0x00114af8
LAB_0012e6eb:
LEA RDI,[RSP + 0x20]
CALL 0x00114cb0
ADD RSP,0x68
POP RBX
POP R14
RET
|
/* ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>) */
void __thiscall
ftxui::ScreenInteractive::RunOnceBlocking(ScreenInteractive *this,int8 *param_2)
{
char cVar1;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
int8 local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 *local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
int1 local_18;
(anonymous_namespace)::ExecuteSignalHandlers();
local_38 = &local_28;
local_58 = 0;
uStack_40 = 0;
uStack_30 = 0;
local_28 = 0;
uStack_20 = 0;
uStack_50 = 0x300000000;
local_48 = 1;
local_18 = 0;
/* try { // try from 0012e64d to 0012e656 has its CatchHandler @ 0012e71b */
cVar1 = ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>::
Receive(*(ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>
**)(this + 0x70),(variant *)&local_58);
if (cVar1 != '\0') {
local_68 = *param_2;
local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00158fb0 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
/* try { // try from 0012e686 to 0012e697 has its CatchHandler @ 0012e6fd */
HandleTask(this,&local_68,&local_58);
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
local_78 = *param_2;
local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00158fb0 == '\0') {
LOCK();
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
}
}
/* try { // try from 0012e6d1 to 0012e6db has its CatchHandler @ 0012e707 */
RunOnce(this,&local_78);
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
std::__detail::__variant::
_Variant_storage<false,ftxui::Event,std::function<void()>,ftxui::AnimationTask>::~_Variant_storage
((_Variant_storage<false,ftxui::Event,std::function<void()>,ftxui::AnimationTask> *)
&local_58);
return;
}
|
|
4,155 | ftxui::Dimension::Fit(std::shared_ptr<ftxui::Node>&) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/util.cpp | Dimensions Dimension::Fit(Element& e) {
const Dimensions fullsize = Dimension::Full();
Box box;
box.x_min = 0;
box.y_min = 0;
box.x_max = fullsize.dimx;
box.y_max = fullsize.dimy;
Node::Status status;
e->Check(&status);
const int max_iteration = 20;
while (status.need_iteration && status.iteration < max_iteration) {
e->ComputeRequirement();
// Don't give the element more space than it needs:
box.x_max = std::min(box.x_max, e->requirement().min_x);
box.y_max = std::min(box.y_max, e->requirement().min_y);
e->SetBox(box);
status.need_iteration = false;
status.iteration++;
e->Check(&status);
if (!status.need_iteration) {
break;
}
// Increase the size of the box until it fits, but not more than the with of
// the terminal emulator:
box.x_max = std::min(e->requirement().min_x, fullsize.dimx);
box.y_max = std::min(e->requirement().min_y, fullsize.dimy);
}
return {
box.x_max,
box.y_max,
};
} | O2 | cpp | ftxui::Dimension::Fit(std::shared_ptr<ftxui::Node>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movabsq $-0x100000000, %r14 # imm = 0xFFFFFFFF00000000
callq 0x2fdd4
movq %rax, %r13
shrq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %r13, %rbp
leaq 0x8(%rsp), %r15
andl $0x0, (%r15)
andq %r14, %rbp
movb $0x0, 0x4(%r15)
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
movb 0x4(%r15), %al
movl %r13d, %r12d
testb $0x1, %al
je 0x20a82
cmpl $0x14, 0x8(%rsp)
jge 0x20a82
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rdi
movl 0x20(%rdi), %eax
cmpl %r12d, %eax
cmovll %eax, %r12d
movl 0x24(%rdi), %eax
movq %rbp, %r14
shrq $0x20, %r14
cmpl %r14d, %eax
cmovll %eax, %r14d
shlq $0x20, %r14
movl %ebp, %r15d
leaq (%r14,%r15), %rdx
movq %r12, %rsi
shlq $0x20, %rsi
movq (%rdi), %rax
callq *0x18(%rax)
movb $0x0, 0xc(%rsp)
incl 0x8(%rsp)
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
callq *0x28(%rax)
movb 0xc(%rsp), %al
cmpb $0x1, %al
jne 0x20a95
movq (%rbx), %rcx
movl 0x20(%rcx), %r12d
movl 0x24(%rcx), %ebp
cmpl %r13d, %r12d
cmovgel %r13d, %r12d
movq 0x10(%rsp), %rcx
cmpl %ecx, %ebp
cmovgel %ecx, %ebp
shlq $0x20, %rbp
orq %r15, %rbp
jmp 0x209ea
movl %r12d, %r12d
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %rbp
movq %rbp, %r14
orq %r14, %r12
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5ftxui9Dimension3FitERSt10shared_ptrINS_4NodeEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14, 0FFFFFFFF00000000h
call _ZN5ftxui9Dimension4FullEv; ftxui::Dimension::Full(void)
mov r13, rax
shr rax, 20h
mov [rsp+48h+var_38], rax
mov rbp, r13
lea r15, [rsp+48h+var_40]
and dword ptr [r15], 0
and rbp, r14
mov byte ptr [r15+4], 0
mov rdi, [rbx]
mov rax, [rdi]
mov rsi, r15
call qword ptr [rax+28h]
mov al, [r15+4]
mov r12d, r13d
loc_209EA:
test al, 1
jz loc_20A82
cmp [rsp+48h+var_40], 14h
jge loc_20A82
mov rdi, [rbx]
mov rax, [rdi]
call qword ptr [rax+10h]
mov rdi, [rbx]
mov eax, [rdi+20h]
cmp eax, r12d
cmovl r12d, eax
mov eax, [rdi+24h]
mov r14, rbp
shr r14, 20h
cmp eax, r14d
cmovl r14d, eax
shl r14, 20h
mov r15d, ebp
lea rdx, [r14+r15]
mov rsi, r12
shl rsi, 20h
mov rax, [rdi]
call qword ptr [rax+18h]
mov [rsp+48h+var_3C], 0
inc [rsp+48h+var_40]
mov rdi, [rbx]
mov rax, [rdi]
lea rsi, [rsp+48h+var_40]
call qword ptr [rax+28h]
mov al, [rsp+48h+var_3C]
cmp al, 1
jnz short loc_20A95
mov rcx, [rbx]
mov r12d, [rcx+20h]
mov ebp, [rcx+24h]
cmp r12d, r13d
cmovge r12d, r13d
mov rcx, [rsp+48h+var_38]
cmp ebp, ecx
cmovge ebp, ecx
shl rbp, 20h
or rbp, r15
jmp loc_209EA
loc_20A82:
mov r12d, r12d
mov rax, 0FFFFFFFF00000000h
and rbp, rax
mov r14, rbp
loc_20A95:
or r12, r14
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long ftxui::Dimension::Fit(ftxui::Dimension *a1)
{
unsigned long long v2; // r13
unsigned long long v3; // rbp
char v4; // al
long long v5; // r12
_DWORD *v6; // rdi
int v7; // eax
int v8; // eax
unsigned long long v9; // r14
unsigned long long v10; // r14
long long v11; // r15
long long v12; // rbp
int v14; // [rsp+8h] [rbp-40h] BYREF
char v15; // [rsp+Ch] [rbp-3Ch]
unsigned long long v16; // [rsp+10h] [rbp-38h]
v2 = ftxui::Dimension::Full(a1);
v16 = HIDWORD(v2);
v14 = 0;
v3 = v2 & 0xFFFFFFFF00000000LL;
v15 = 0;
(*(void ( **)(_QWORD, int *))(**(_QWORD **)a1 + 40LL))(*(_QWORD *)a1, &v14);
v4 = v15;
v5 = (unsigned int)v2;
while ( (v4 & 1) != 0 && v14 < 20 )
{
(*(void ( **)(_QWORD))(**(_QWORD **)a1 + 16LL))(*(_QWORD *)a1);
v6 = *(_DWORD **)a1;
v7 = *(_DWORD *)(*(_QWORD *)a1 + 32LL);
if ( v7 < (int)v5 )
v5 = (unsigned int)v7;
v8 = v6[9];
v9 = HIDWORD(v3);
if ( v8 < SHIDWORD(v3) )
v9 = (unsigned int)v8;
v10 = v9 << 32;
v11 = (unsigned int)v3;
(*(void ( **)(_DWORD *, long long, unsigned long long))(*(_QWORD *)v6 + 24LL))(
v6,
v5 << 32,
v10 + (unsigned int)v3);
v15 = 0;
++v14;
(*(void ( **)(_QWORD, int *))(**(_QWORD **)a1 + 40LL))(*(_QWORD *)a1, &v14);
v4 = v15;
if ( v15 != 1 )
return v10 | v5;
v5 = *(unsigned int *)(*(_QWORD *)a1 + 32LL);
v12 = *(unsigned int *)(*(_QWORD *)a1 + 36LL);
if ( (int)v5 >= (int)v2 )
v5 = (unsigned int)v2;
if ( (int)v12 >= (int)v16 )
v12 = (unsigned int)v16;
v3 = v11 | (v12 << 32);
}
v5 = (unsigned int)v5;
v10 = v3 & 0xFFFFFFFF00000000LL;
return v10 | v5;
}
| Fit:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R14,-0x100000000
CALL 0x0012fdd4
MOV R13,RAX
SHR RAX,0x20
MOV qword ptr [RSP + 0x10],RAX
MOV RBP,R13
LEA R15,[RSP + 0x8]
AND dword ptr [R15],0x0
AND RBP,R14
MOV byte ptr [R15 + 0x4],0x0
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RSI,R15
CALL qword ptr [RAX + 0x28]
MOV AL,byte ptr [R15 + 0x4]
MOV R12D,R13D
LAB_001209ea:
TEST AL,0x1
JZ 0x00120a82
CMP dword ptr [RSP + 0x8],0x14
JGE 0x00120a82
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBX]
MOV EAX,dword ptr [RDI + 0x20]
CMP EAX,R12D
CMOVL R12D,EAX
MOV EAX,dword ptr [RDI + 0x24]
MOV R14,RBP
SHR R14,0x20
CMP EAX,R14D
CMOVL R14D,EAX
SHL R14,0x20
MOV R15D,EBP
LEA RDX,[R14 + R15*0x1]
MOV RSI,R12
SHL RSI,0x20
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
MOV byte ptr [RSP + 0xc],0x0
INC dword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
LEA RSI,[RSP + 0x8]
CALL qword ptr [RAX + 0x28]
MOV AL,byte ptr [RSP + 0xc]
CMP AL,0x1
JNZ 0x00120a95
MOV RCX,qword ptr [RBX]
MOV R12D,dword ptr [RCX + 0x20]
MOV EBP,dword ptr [RCX + 0x24]
CMP R12D,R13D
CMOVGE R12D,R13D
MOV RCX,qword ptr [RSP + 0x10]
CMP EBP,ECX
CMOVGE EBP,ECX
SHL RBP,0x20
OR RBP,R15
JMP 0x001209ea
LAB_00120a82:
MOV R12D,R12D
MOV RAX,-0x100000000
AND RBP,RAX
MOV R14,RBP
LAB_00120a95:
OR R12,R14
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::Dimension::Fit(std::shared_ptr<ftxui::Node>&) */
ulong ftxui::Dimension::Fit(shared_ptr *param_1)
{
uint uVar1;
uint uVar2;
long *plVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
int local_40;
byte local_3c;
ulong local_38;
uVar4 = Full();
local_38 = uVar4 >> 0x20;
local_40 = 0;
uVar5 = uVar4 & 0xffffffff00000000;
local_3c = 0;
(**(code **)(**(long **)param_1 + 0x28))(*(long **)param_1,&local_40);
uVar6 = uVar4 & 0xffffffff;
while (((local_3c & 1) != 0 && (local_40 < 0x14))) {
(**(code **)(**(long **)param_1 + 0x10))();
plVar3 = *(long **)param_1;
if ((int)*(uint *)(plVar3 + 4) < (int)uVar6) {
uVar6 = (ulong)*(uint *)(plVar3 + 4);
}
uVar7 = uVar5 >> 0x20;
if ((int)*(uint *)((long)plVar3 + 0x24) < (int)(uVar5 >> 0x20)) {
uVar7 = (ulong)*(uint *)((long)plVar3 + 0x24);
}
uVar5 = uVar7 << 0x20;
(**(code **)(*plVar3 + 0x18))(plVar3,uVar6 << 0x20,uVar5);
local_3c = 0;
local_40 = local_40 + 1;
(**(code **)(**(long **)param_1 + 0x28))(*(long **)param_1,&local_40);
if (local_3c != 1) break;
uVar1 = *(uint *)(*(long *)param_1 + 0x20);
uVar2 = *(uint *)(*(long *)param_1 + 0x24);
uVar6 = (ulong)uVar1;
if ((int)uVar4 <= (int)uVar1) {
uVar6 = uVar4 & 0xffffffff;
}
uVar5 = (ulong)uVar2;
if ((int)local_38 <= (int)uVar2) {
uVar5 = local_38 & 0xffffffff;
}
uVar5 = uVar5 << 0x20;
}
return uVar6 | uVar5;
}
|
|
4,156 | mi_find_writepos | eloqsql/storage/myisam/mi_dynrec.c | static int _mi_find_writepos(MI_INFO *info,
ulong reclength, /* record length */
my_off_t *filepos, /* Return file pos */
ulong *length) /* length of block at filepos */
{
MI_BLOCK_INFO block_info;
ulong tmp;
DBUG_ENTER("_mi_find_writepos");
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
/* Deleted blocks exists; Get last used block */
*filepos=info->s->state.dellink;
block_info.second_read=0;
info->rec_cache.seek_not_done=1;
if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) &
BLOCK_DELETED))
{
DBUG_PRINT("error",("Delete link crashed"));
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(-1);
}
info->s->state.dellink=block_info.next_filepos;
info->state->del--;
info->state->empty-= block_info.block_len;
*length= block_info.block_len;
}
else
{
/* No deleted blocks; Allocate a new block */
*filepos=info->state->data_file_length;
if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) <
info->s->base.min_block_length)
tmp= info->s->base.min_block_length;
else
tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) &
(~ (ulong) (MI_DYN_ALIGN_SIZE-1)));
if (info->state->data_file_length >
(info->s->base.max_data_file_length - tmp))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(-1);
}
if (tmp > MI_MAX_BLOCK_LENGTH)
tmp=MI_MAX_BLOCK_LENGTH;
*length= tmp;
info->state->data_file_length+= tmp;
info->s->state.split++;
info->update|=HA_STATE_WRITE_AT_END;
}
DBUG_RETURN(0);
} | O0 | c | mi_find_writepos:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq %rcx, -0x88(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0x58(%rax)
je 0xacbf3
movq -0x70(%rbp), %rax
cmpb $0x0, 0x33a(%rax)
jne 0xacbf3
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x10(%rbp)
movq -0x70(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x70(%rbp), %rax
movl 0x1c0(%rax), %esi
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rdx
leaq -0x60(%rbp), %rdi
callq 0xa9ce0
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xacba6
jmp 0xacb8d
jmp 0xacb8f
callq 0xf6090
movl $0x7f, (%rax)
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xacd1d
movq -0x20(%rbp), %rcx
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x58(%rax)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
jmp 0xacd14
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
addq $0x3, %rax
movq -0x78(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %edx
cmpq $0xffed, %rsi # imm = 0xFFED
cmovael %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x160(%rcx), %rax
jae 0xacc57
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x160(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xacc71
movq -0x90(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
andq $-0x4, %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x70(%rbp), %rcx
movq (%rcx), %rcx
movq 0x110(%rcx), %rcx
subq -0x90(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xaccab
callq 0xf6090
movl $0x87, (%rax)
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xacd1d
cmpq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC
jbe 0xaccc3
movq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
movq -0x90(%rbp), %rcx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq -0x70(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0x1d0(%rax)
jmp 0xacd16
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x94(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xacd47
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _mi_find_writepos:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov [rbp+var_88], rcx
mov rax, [rbp+var_70]
mov rax, [rax]
cmp qword ptr [rax+58h], 0FFFFFFFFFFFFFFFFh
jz loc_ACBF3
mov rax, [rbp+var_70]
cmp byte ptr [rax+33Ah], 0
jnz loc_ACBF3
mov rax, [rbp+var_70]
mov rax, [rax]
mov rcx, [rax+58h]
mov rax, [rbp+var_80]
mov [rax], rcx
mov [rbp+var_10], 0
mov rax, [rbp+var_70]
mov dword ptr [rax+300h], 1
mov rax, [rbp+var_70]
mov esi, [rax+1C0h]
mov rax, [rbp+var_70]
mov rax, [rax]
mov rdx, [rax+58h]
lea rdi, [rbp+var_60]
call _mi_get_block_info
and eax, 4
cmp eax, 0
jnz short loc_ACBA6
jmp short $+2
loc_ACB8D:
jmp short $+2
loc_ACB8F:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov [rbp+var_64], 0FFFFFFFFh
jmp loc_ACD1D
loc_ACBA6:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rax+58h], rcx
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+8]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+8], rcx
mov rdx, [rbp+var_38]
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_88]
mov [rax], rcx
jmp loc_ACD14
loc_ACBF3:
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+28h]
mov rax, [rbp+var_80]
mov [rax], rcx
mov rax, [rbp+var_78]
add rax, 3
mov rsi, [rbp+var_78]
xor ecx, ecx
mov edx, 1
cmp rsi, 0FFEDh
cmovnb ecx, edx
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_90], rax
mov rcx, [rbp+var_70]
mov rcx, [rcx]
cmp rax, [rcx+160h]
jnb short loc_ACC57
mov rax, [rbp+var_70]
mov rax, [rax]
mov rax, [rax+160h]
mov [rbp+var_90], rax
jmp short loc_ACC71
loc_ACC57:
mov rax, [rbp+var_90]
add rax, 4
sub rax, 1
and rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_90], rax
loc_ACC71:
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rax, [rax+28h]
mov rcx, [rbp+var_70]
mov rcx, [rcx]
mov rcx, [rcx+110h]
sub rcx, [rbp+var_90]
cmp rax, rcx
jbe short loc_ACCAB
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_64], 0FFFFFFFFh
jmp short loc_ACD1D
loc_ACCAB:
cmp [rbp+var_90], 0FFFFFCh
jbe short loc_ACCC3
mov [rbp+var_90], 0FFFFFCh
loc_ACCC3:
mov rcx, [rbp+var_90]
mov rax, [rbp+var_88]
mov [rax], rcx
mov rcx, [rbp+var_90]
mov rax, [rbp+var_70]
mov rax, [rax+8]
add rcx, [rax+28h]
mov [rax+28h], rcx
mov rax, [rbp+var_70]
mov rax, [rax]
mov rcx, [rax+50h]
add rcx, 1
mov [rax+50h], rcx
mov rax, [rbp+var_70]
mov ecx, [rax+1D0h]
or ecx, 100h
mov [rax+1D0h], ecx
loc_ACD14:
jmp short $+2
loc_ACD16:
mov [rbp+var_64], 0
loc_ACD1D:
mov eax, [rbp+var_64]
mov [rbp+var_94], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_ACD47
mov eax, [rbp+var_94]
add rsp, 0A0h
pop rbp
retn
loc_ACD47:
call ___stack_chk_fail
| long long mi_find_writepos(_QWORD *a1, const char *a2, _QWORD *a3, unsigned long long *a4)
{
const char *v4; // rsi
unsigned long long v6; // [rsp+10h] [rbp-90h]
unsigned long long v7; // [rsp+10h] [rbp-90h]
char v10[40]; // [rsp+40h] [rbp-60h] BYREF
unsigned long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+80h] [rbp-20h]
int v13; // [rsp+90h] [rbp-10h]
unsigned long long v14; // [rsp+98h] [rbp-8h]
v14 = __readfsqword(0x28u);
if ( *(_QWORD *)(*a1 + 88LL) == -1LL || *((_BYTE *)a1 + 826) )
{
*a3 = *(_QWORD *)(a1[1] + 40LL);
v6 = (unsigned long long)&a2[((unsigned long long)a2 >= 0xFFED) + 3];
if ( v6 >= *(_QWORD *)(*a1 + 352LL) )
v7 = (v6 + 3) & 0xFFFFFFFFFFFFFFFCLL;
else
v7 = *(_QWORD *)(*a1 + 352LL);
if ( *(_QWORD *)(a1[1] + 40LL) > *(_QWORD *)(*a1 + 272LL) - v7 )
{
*(_DWORD *)my_thread_var(a1, a2) = 135;
return (unsigned int)-1;
}
if ( v7 > 0xFFFFFC )
v7 = 16777212LL;
*a4 = v7;
*(_QWORD *)(a1[1] + 40LL) += v7;
++*(_QWORD *)(*a1 + 80LL);
*((_DWORD *)a1 + 116) |= 0x100u;
return 0;
}
*a3 = *(_QWORD *)(*a1 + 88LL);
v13 = 0;
*((_DWORD *)a1 + 192) = 1;
v4 = (const char *)*((unsigned int *)a1 + 112);
if ( (mi_get_block_info(v10, v4, *(_QWORD *)(*a1 + 88LL)) & 4) != 0 )
{
*(_QWORD *)(*a1 + 88LL) = v12;
--*(_QWORD *)(a1[1] + 8LL);
*(_QWORD *)(a1[1] + 16LL) -= v11;
*a4 = v11;
return 0;
}
*(_DWORD *)my_thread_var(v10, v4) = 127;
return (unsigned int)-1;
}
| _mi_find_writepos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV qword ptr [RBP + -0x88],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x58],-0x1
JZ 0x001acbf3
MOV RAX,qword ptr [RBP + -0x70]
CMP byte ptr [RAX + 0x33a],0x0
JNZ 0x001acbf3
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV dword ptr [RAX + 0x300],0x1
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,dword ptr [RAX + 0x1c0]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x58]
LEA RDI,[RBP + -0x60]
CALL 0x001a9ce0
AND EAX,0x4
CMP EAX,0x0
JNZ 0x001acba6
JMP 0x001acb8d
LAB_001acb8d:
JMP 0x001acb8f
LAB_001acb8f:
CALL 0x001f6090
MOV dword ptr [RAX],0x7f
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001acd1d
LAB_001acba6:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
JMP 0x001acd14
LAB_001acbf3:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x3
MOV RSI,qword ptr [RBP + -0x78]
XOR ECX,ECX
MOV EDX,0x1
CMP RSI,0xffed
CMOVNC ECX,EDX
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
MOV RCX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x160]
JNC 0x001acc57
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x160]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001acc71
LAB_001acc57:
MOV RAX,qword ptr [RBP + -0x90]
ADD RAX,0x4
SUB RAX,0x1
AND RAX,-0x4
MOV qword ptr [RBP + -0x90],RAX
LAB_001acc71:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,qword ptr [RBP + -0x90]
CMP RAX,RCX
JBE 0x001accab
CALL 0x001f6090
MOV dword ptr [RAX],0x87
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001acd1d
LAB_001accab:
CMP qword ptr [RBP + -0x90],0xfffffc
JBE 0x001accc3
MOV qword ptr [RBP + -0x90],0xfffffc
LAB_001accc3:
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x1
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x100
MOV dword ptr [RAX + 0x1d0],ECX
LAB_001acd14:
JMP 0x001acd16
LAB_001acd16:
MOV dword ptr [RBP + -0x64],0x0
LAB_001acd1d:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001acd47
MOV EAX,dword ptr [RBP + -0x94]
ADD RSP,0xa0
POP RBP
RET
LAB_001acd47:
CALL 0x0012a270
|
int4 _mi_find_writepos(long *param_1,ulong param_2,int8 *param_3,ulong *param_4)
{
uint uVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_98;
int4 local_6c;
int1 local_68 [40];
ulong local_40;
int8 local_28;
int4 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
*param_3 = *(int8 *)(param_1[1] + 0x28);
uVar3 = param_2 + 3 + (long)(int)(uint)(0xffec < param_2);
if (uVar3 < *(ulong *)(*param_1 + 0x160)) {
local_98 = *(ulong *)(*param_1 + 0x160);
}
else {
local_98 = uVar3 + 3 & 0xfffffffffffffffc;
}
if (*(long *)(*param_1 + 0x110) - local_98 < *(ulong *)(param_1[1] + 0x28)) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
local_6c = 0xffffffff;
goto LAB_001acd1d;
}
if (0xfffffc < local_98) {
local_98 = 0xfffffc;
}
*param_4 = local_98;
*(ulong *)(param_1[1] + 0x28) = local_98 + *(long *)(param_1[1] + 0x28);
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x100;
}
else {
*param_3 = *(int8 *)(*param_1 + 0x58);
local_18 = 0;
*(int4 *)(param_1 + 0x60) = 1;
uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58));
if ((uVar1 & 4) == 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7f;
local_6c = 0xffffffff;
goto LAB_001acd1d;
}
*(int8 *)(*param_1 + 0x58) = local_28;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(ulong *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_40;
*param_4 = local_40;
}
local_6c = 0;
LAB_001acd1d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_6c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,157 | ma_tls_set_error | eloqsql/libmariadb/libmariadb/secure/openssl.c | static void ma_tls_set_error(MYSQL *mysql)
{
ulong ssl_errno= ERR_get_error();
char ssl_error[MAX_SSL_ERR_LEN];
const char *ssl_error_reason;
MARIADB_PVIO *pvio= mysql->net.pvio;
int save_errno= errno;
if (ssl_errno && (ssl_error_reason= ERR_reason_error_string(ssl_errno)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
0, ssl_error_reason);
return;
}
strerror_r(save_errno, ssl_error, MAX_SSL_ERR_LEN);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "TLS/SSL error: %s (%d)",
ssl_error, save_errno);
return;
} | O3 | c | ma_tls_set_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
callq 0x135f0
movq %rax, %r15
movq (%rbx), %r12
callq 0x13060
movl (%rax), %r14d
testq %r15, %r15
je 0x2b488
movq %r15, %rdi
callq 0x13800
testq %rax, %rax
je 0x2b488
movq 0x50(%r12), %r9
leaq 0x22848(%rip), %rcx # 0x4dca0
movq (%rcx), %rdx
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x2b4e1
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %ecx, %ecx
movq %rax, %r8
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%r9
leaq -0x90(%rbp), %r15
movl $0x64, %edx
movl %r14d, %edi
movq %r15, %rsi
callq 0x131e0
leaq 0x227fa(%rip), %rax # 0x4dca0
movq (%rax), %rdx
leaq 0xe3e3(%rip), %rcx # 0x39893
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
movq %r15, %r8
movl %r14d, %r9d
xorl %eax, %eax
callq *0x50(%r12)
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x2b4e1
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_tls_set_error:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 70h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
call _ERR_get_error
mov r15, rax
mov r12, [rbx]
call ___errno_location
mov r14d, [rax]
test r15, r15
jz short loc_2B488
mov rdi, r15
call _ERR_reason_error_string
test rax, rax
jz short loc_2B488
mov r9, [r12+50h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_2B4E1
mov rdi, rbx
mov esi, 7EAh
xor ecx, ecx
mov r8, rax
xor eax, eax
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp r9
loc_2B488:
lea r15, [rbp+var_90]
mov edx, 64h ; 'd'
mov edi, r14d
mov rsi, r15
call ___xpg_strerror_r
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, aTlsSslErrorSD; "TLS/SSL error: %s (%d)"
mov rdi, rbx
mov esi, 7EAh
mov r8, r15
mov r9d, r14d
xor eax, eax
call qword ptr [r12+50h]
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_2B4E1
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2B4E1:
call ___stack_chk_fail
| long long ma_tls_set_error(long long *a1)
{
long long error; // r15
long long v2; // r12
unsigned int v3; // r14d
long long v4; // rax
char v6[104]; // [rsp+0h] [rbp-90h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-28h]
v7 = __readfsqword(0x28u);
error = ERR_get_error();
v2 = *a1;
v3 = *(_DWORD *)__errno_location(a1);
if ( error )
{
v4 = ERR_reason_error_string(error);
if ( v4 )
return (*(long long ( **)(long long *, long long, char *, _QWORD, long long))(v2 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
0LL,
v4);
}
__xpg_strerror_r(v3, v6, 100LL);
(*(void (**)(long long *, long long, char *, const char *, ...))(v2 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
"TLS/SSL error: %s (%d)",
v6,
v3);
return __readfsqword(0x28u);
}
| ma_tls_set_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x001135f0
MOV R15,RAX
MOV R12,qword ptr [RBX]
CALL 0x00113060
MOV R14D,dword ptr [RAX]
TEST R15,R15
JZ 0x0012b488
MOV RDI,R15
CALL 0x00113800
TEST RAX,RAX
JZ 0x0012b488
MOV R9,qword ptr [R12 + 0x50]
LEA RCX,[0x14dca0]
MOV RDX,qword ptr [RCX]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x0012b4e1
MOV RDI,RBX
MOV ESI,0x7ea
XOR ECX,ECX
MOV R8,RAX
XOR EAX,EAX
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP R9
LAB_0012b488:
LEA R15,[RBP + -0x90]
MOV EDX,0x64
MOV EDI,R14D
MOV RSI,R15
CALL 0x001131e0
LEA RAX,[0x14dca0]
MOV RDX,qword ptr [RAX]
LEA RCX,[0x139893]
MOV RDI,RBX
MOV ESI,0x7ea
MOV R8,R15
MOV R9D,R14D
XOR EAX,EAX
CALL qword ptr [R12 + 0x50]
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0012b4e1
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012b4e1:
CALL 0x00113500
|
void ma_tls_set_error(long *param_1)
{
int iVar1;
long lVar2;
code *UNRECOVERED_JUMPTABLE;
ulong e;
int *piVar3;
char *pcVar4;
long in_FS_OFFSET;
int1 local_98 [104];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
e = ERR_get_error();
lVar2 = *param_1;
piVar3 = __errno_location();
iVar1 = *piVar3;
if (e != 0) {
pcVar4 = ERR_reason_error_string(e);
if (pcVar4 != (char *)0x0) {
UNRECOVERED_JUMPTABLE = *(code **)(lVar2 + 0x50);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
/* WARNING: Could not recover jumptable at 0x0012b485. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,0x7ea,SQLSTATE_UNKNOWN,0,pcVar4,UNRECOVERED_JUMPTABLE);
return;
}
goto LAB_0012b4e1;
}
}
__xpg_strerror_r(iVar1,local_98,100);
(**(code **)(lVar2 + 0x50))
(param_1,0x7ea,SQLSTATE_UNKNOWN,"TLS/SSL error: %s (%d)",local_98,iVar1);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
LAB_0012b4e1:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,158 | PFRING_init | xtate/src/stub/stub-pfring.c | int PFRING_init(void) {
#if defined(__linux__)
void *h;
int err = 0;
LOG(LEVEL_DETAIL, "(pfring) initializing subsystem\n");
LOG(LEVEL_DETAIL, "(pfring) looking for 'libpfring.so'\n");
h = dlopen("libpfring.so", RTLD_LAZY);
if (h == NULL) {
LOG(LEVEL_DEBUG, "(pfring) dlopen('libpfring.so'): %s\n",
strerror(errno));
return 0;
} else
LOG(LEVEL_DETAIL, "(pfring) found 'libpfring.so'!\n");
#define LOADSYM(name) \
if ((PFRING.name = dlsym(h, "pfring_" #name)) == 0) { \
LOG(LEVEL_WARN, "(pfring_%s) not found in 'libpfring.so': %s\n", \
#name, strerror(errno)); \
err = 1; \
}
LOADSYM(open);
LOADSYM(close);
LOADSYM(enable_ring);
LOADSYM(send);
LOADSYM(flush);
LOADSYM(recv);
LOADSYM(poll);
LOADSYM(version);
LOADSYM(set_direction);
LOADSYM(set_application_name);
// LOADSYM(get_bound_device);
if (err) {
memset(&PFRING, 0, sizeof(PFRING));
LOG(LEVEL_WARN, "(pfring) failed to load\n");
} else {
LOG(LEVEL_INFO, "(pfring) successfully loaded PF_RING API\n");
if (!PFRING_is_installed()) {
LOG(LEVEL_ERROR, "(pfring) 'pf_ring' driver module not found!!!\n");
} else
LOG(LEVEL_DETAIL, "(pfring) found 'pf_ring' driver module\n");
}
#endif
return 0;
} | O3 | c | PFRING_init:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x2e657(%rip), %rsi # 0x71fa9
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x536da
leaq 0x2e663(%rip), %rsi # 0x71fca
movl $0x3, %edi
xorl %eax, %eax
callq 0x536da
leaq 0x2e675(%rip), %rdi # 0x71fef
movl $0x1, %esi
callq 0x15900
testq %rax, %rax
je 0x43c69
movq %rax, %rbx
leaq 0x2e68a(%rip), %rsi # 0x72021
movl $0x3, %edi
xorl %eax, %eax
callq 0x536da
leaq 0x2e697(%rip), %rsi # 0x72041
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x16075f(%rip) # 0x1a4118
testq %rax, %rax
jne 0x439e9
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e67c(%rip), %rsi # 0x7204d
leaq 0x25c26(%rip), %rdx # 0x695fe
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e68a(%rip), %rsi # 0x7207a
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x160721(%rip) # 0x1a4120
testq %rax, %rax
jne 0x43a2f
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e636(%rip), %rsi # 0x7204d
leaq 0x2b626(%rip), %rdx # 0x6f044
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e651(%rip), %rsi # 0x72087
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x1606e3(%rip) # 0x1a4128
testq %rax, %rax
jne 0x43a75
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e5f0(%rip), %rsi # 0x7204d
leaq 0x2e62a(%rip), %rdx # 0x7208e
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e61e(%rip), %rsi # 0x7209a
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x1606a5(%rip) # 0x1a4130
testq %rax, %rax
jne 0x43abb
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e5aa(%rip), %rsi # 0x7204d
leaq 0x2e5f7(%rip), %rdx # 0x720a1
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e5e4(%rip), %rsi # 0x720a6
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x160667(%rip) # 0x1a4138
testq %rax, %rax
jne 0x43b01
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e564(%rip), %rsi # 0x7204d
leaq 0x2e5bd(%rip), %rdx # 0x720ad
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e5ab(%rip), %rsi # 0x720b3
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x160629(%rip) # 0x1a4140
testq %rax, %rax
jne 0x43b47
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e51e(%rip), %rsi # 0x7204d
leaq 0x28e5b(%rip), %rdx # 0x6c991
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e571(%rip), %rsi # 0x720bf
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x1605eb(%rip) # 0x1a4148
testq %rax, %rax
jne 0x43b8d
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e4d8(%rip), %rsi # 0x7204d
leaq 0x2e54a(%rip), %rdx # 0x720c6
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e537(%rip), %rsi # 0x720cb
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x1605ad(%rip) # 0x1a4150
testq %rax, %rax
jne 0x43bd3
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e492(%rip), %rsi # 0x7204d
leaq 0x3ce05(%rip), %rdx # 0x809c7
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e500(%rip), %rsi # 0x720da
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x16056f(%rip) # 0x1a4158
testq %rax, %rax
jne 0x43c19
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e44c(%rip), %rsi # 0x7204d
leaq 0x2e4d9(%rip), %rdx # 0x720e1
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
leaq 0x2e4cf(%rip), %rsi # 0x720ef
movq %rbx, %rdi
callq 0x151f0
movq %rax, 0x160531(%rip) # 0x1a4160
testq %rax, %rax
je 0x43c8d
testl %ebp, %ebp
jne 0x43cb3
leaq 0x2e4e5(%rip), %rsi # 0x72124
movl $0x1, %edi
xorl %eax, %eax
callq 0x536da
callq 0x43848
testl %eax, %eax
je 0x43cfd
leaq 0x2e51e(%rip), %rsi # 0x7217d
movl $0x3, %edi
jmp 0x43ced
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e380(%rip), %rsi # 0x71ffc
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x536da
jmp 0x43cf4
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x2e3ad(%rip), %rsi # 0x7204d
leaq 0x2e44f(%rip), %rdx # 0x720f6
xorl %edi, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
xorps %xmm0, %xmm0
movups %xmm0, 0x16049b(%rip) # 0x1a4158
movups %xmm0, 0x160484(%rip) # 0x1a4148
movups %xmm0, 0x16046d(%rip) # 0x1a4138
movups %xmm0, 0x160456(%rip) # 0x1a4128
movups %xmm0, 0x16043f(%rip) # 0x1a4118
movq $0x0, 0x160484(%rip) # 0x1a4168
leaq 0x2e420(%rip), %rsi # 0x7210b
xorl %edi, %edi
xorl %eax, %eax
callq 0x536da
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2e44a(%rip), %rsi # 0x7214e
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
jmp 0x43ced
nop
| PFRING_init:
push rbp
push rbx
push rax
lea rsi, aPfringInitiali; "(pfring) initializing subsystem\n"
xor ebp, ebp
mov edi, 3
xor eax, eax
call LOG
lea rsi, aPfringLookingF; "(pfring) looking for 'libpfring.so'\n"
mov edi, 3
xor eax, eax
call LOG
lea rdi, aLibpfringSo; "libpfring.so"
mov esi, 1
call _dlopen
test rax, rax
jz loc_43C69
mov rbx, rax
lea rsi, aPfringFoundLib; "(pfring) found 'libpfring.so'!\n"
mov edi, 3
xor eax, eax
call LOG
lea rsi, aPfringOpen; "pfring_open"
mov rdi, rbx
call _dlsym
mov qword ptr cs:PFRING, rax
test rax, rax
jnz short loc_439E9
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aSendIfPortOpen+0Dh; "open"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_439E9:
lea rsi, aPfringClose; "pfring_close"
mov rdi, rbx
call _dlsym
mov qword ptr cs:PFRING+8, rax
test rax, rax
jnz short loc_43A2F
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aNoClose+3; "close"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43A2F:
lea rsi, aPfringEnableRi; "pfring_enable_ring"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4128, rax
test rax, rax
jnz short loc_43A75
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringEnableRi+7; "enable_ring"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43A75:
lea rsi, aPfringSend; "pfring_send"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4128+8, rax
test rax, rax
jnz short loc_43ABB
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringSend+7; "send"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43ABB:
lea rsi, aPfringFlush; "pfring_flush"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4138, rax
test rax, rax
jnz short loc_43B01
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringFlush+7; "flush"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43B01:
lea rsi, aPfringRecv; "pfring_recv"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4138+8, rax
test rax, rax
jnz short loc_43B47
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aXtateRecv+6; "recv"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43B47:
lea rsi, aPfringPoll; "pfring_poll"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4148, rax
test rax, rax
jnz short loc_43B8D
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringPoll+7; "poll"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43B8D:
lea rsi, aPfringVersion; "pfring_version"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4148+8, rax
test rax, rax
jnz short loc_43BD3
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aXtateVersion+9; "version"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43BD3:
lea rsi, aPfringSetDirec; "pfring_set_direction"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4158, rax
test rax, rax
jnz short loc_43C19
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringSetDirec+7; "set_direction"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
mov ebp, 1
loc_43C19:
lea rsi, aPfringSetAppli; "pfring_set_application_name"
mov rdi, rbx
call _dlsym
mov qword ptr cs:xmmword_1A4158+8, rax
test rax, rax
jz short loc_43C8D
test ebp, ebp
jnz short loc_43CB3
lea rsi, aPfringSuccessf; "(pfring) successfully loaded PF_RING AP"...
mov edi, 1
xor eax, eax
call LOG
call PFRING_is_installed
test eax, eax
jz loc_43CFD
lea rsi, aPfringFoundPfR_0; "(pfring) found 'pf_ring' driver module"...
mov edi, 3
jmp loc_43CED
loc_43C69:
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringDlopenLi; "(pfring) dlopen('libpfring.so'): %s\n"
mov edi, 2
mov rdx, rax
xor eax, eax
call LOG
jmp short loc_43CF4
loc_43C8D:
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aPfringSNotFoun; "(pfring_%s) not found in 'libpfring.so'"...
lea rdx, aPfringSetAppli+7; "set_application_name"
xor edi, edi
mov rcx, rax
xor eax, eax
call LOG
loc_43CB3:
xorps xmm0, xmm0
movups cs:xmmword_1A4158, xmm0
movups cs:xmmword_1A4148, xmm0
movups cs:xmmword_1A4138, xmm0
movups cs:xmmword_1A4128, xmm0
movups cs:PFRING, xmm0
mov cs:qword_1A4168, 0
lea rsi, aPfringFailedTo; "(pfring) failed to load\n"
xor edi, edi
loc_43CED:
xor eax, eax
call LOG
loc_43CF4:
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
loc_43CFD:
lea rsi, aPfringPfRingDr; "(pfring) 'pf_ring' driver module not fo"...
mov edi, 0FFFFFFFFh
jmp short loc_43CED
| long long PFRING_init(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v6; // ebp
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rax
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
long long v16; // rbx
unsigned int *v17; // rax
int v18; // eax
int v19; // r8d
int v20; // r9d
unsigned int *v21; // rax
int v22; // eax
int v23; // r8d
int v24; // r9d
unsigned int *v25; // rax
int v26; // eax
int v27; // r8d
int v28; // r9d
unsigned int *v29; // rax
int v30; // eax
int v31; // r8d
int v32; // r9d
unsigned int *v33; // rax
int v34; // eax
int v35; // r8d
int v36; // r9d
unsigned int *v37; // rax
int v38; // eax
int v39; // r8d
int v40; // r9d
unsigned int *v41; // rax
int v42; // eax
int v43; // r8d
int v44; // r9d
unsigned int *v45; // rax
int v46; // eax
int v47; // r8d
int v48; // r9d
unsigned int *v49; // rax
int v50; // eax
int v51; // r8d
int v52; // r9d
int v53; // edx
int v54; // ecx
int v55; // r8d
int v56; // r9d
const char *v57; // rsi
int v58; // edi
unsigned int *v59; // rax
int v60; // eax
int v61; // ecx
int v62; // r8d
int v63; // r9d
unsigned int *v64; // rax
int v65; // eax
int v66; // r8d
int v67; // r9d
v6 = 0;
LOG(3, (unsigned int)"(pfring) initializing subsystem\n", a3, a4, a5, a6);
LOG(3, (unsigned int)"(pfring) looking for 'libpfring.so'\n", v7, v8, v9, v10);
v11 = dlopen("libpfring.so", 1LL);
if ( v11 )
{
v16 = v11;
LOG(3, (unsigned int)"(pfring) found 'libpfring.so'!\n", v12, v13, v14, v15);
PFRING = (long long ( *)(_QWORD, _QWORD, _QWORD))dlsym(v16, "pfring_open");
if ( !PFRING )
{
v17 = (unsigned int *)__errno_location(v16, "pfring_open");
v18 = strerror(*v17);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"open", v18, v19, v20);
v6 = 1;
}
*(&PFRING + 1) = (long long ( *)(_QWORD, _QWORD, _QWORD))dlsym(v16, "pfring_close");
if ( !*(&PFRING + 1) )
{
v21 = (unsigned int *)__errno_location(v16, "pfring_close");
v22 = strerror(*v21);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"close", v22, v23, v24);
v6 = 1;
}
*(_QWORD *)&xmmword_1A4128 = dlsym(v16, "pfring_enable_ring");
if ( !(_QWORD)xmmword_1A4128 )
{
v25 = (unsigned int *)__errno_location(v16, "pfring_enable_ring");
v26 = strerror(*v25);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"enable_ring", v26, v27, v28);
v6 = 1;
}
*((_QWORD *)&xmmword_1A4128 + 1) = dlsym(v16, "pfring_send");
if ( !*((_QWORD *)&xmmword_1A4128 + 1) )
{
v29 = (unsigned int *)__errno_location(v16, "pfring_send");
v30 = strerror(*v29);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"send", v30, v31, v32);
v6 = 1;
}
*(_QWORD *)&xmmword_1A4138 = dlsym(v16, "pfring_flush");
if ( !(_QWORD)xmmword_1A4138 )
{
v33 = (unsigned int *)__errno_location(v16, "pfring_flush");
v34 = strerror(*v33);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"flush", v34, v35, v36);
v6 = 1;
}
*((_QWORD *)&xmmword_1A4138 + 1) = dlsym(v16, "pfring_recv");
if ( !*((_QWORD *)&xmmword_1A4138 + 1) )
{
v37 = (unsigned int *)__errno_location(v16, "pfring_recv");
v38 = strerror(*v37);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"recv", v38, v39, v40);
v6 = 1;
}
*(_QWORD *)&xmmword_1A4148 = dlsym(v16, "pfring_poll");
if ( !(_QWORD)xmmword_1A4148 )
{
v41 = (unsigned int *)__errno_location(v16, "pfring_poll");
v42 = strerror(*v41);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"poll", v42, v43, v44);
v6 = 1;
}
*((_QWORD *)&xmmword_1A4148 + 1) = dlsym(v16, "pfring_version");
if ( !*((_QWORD *)&xmmword_1A4148 + 1) )
{
v45 = (unsigned int *)__errno_location(v16, "pfring_version");
v46 = strerror(*v45);
LOG(0, (unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n", (unsigned int)"version", v46, v47, v48);
v6 = 1;
}
*(_QWORD *)&xmmword_1A4158 = dlsym(v16, "pfring_set_direction");
if ( !(_QWORD)xmmword_1A4158 )
{
v49 = (unsigned int *)__errno_location(v16, "pfring_set_direction");
v50 = strerror(*v49);
LOG(
0,
(unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n",
(unsigned int)"set_direction",
v50,
v51,
v52);
v6 = 1;
}
*((_QWORD *)&xmmword_1A4158 + 1) = dlsym(v16, "pfring_set_application_name");
if ( *((_QWORD *)&xmmword_1A4158 + 1) )
{
if ( !v6 )
{
LOG(1, (unsigned int)"(pfring) successfully loaded PF_RING API\n", v53, v54, v55, v56);
if ( (unsigned int)PFRING_is_installed(1LL) )
{
v57 = "(pfring) found 'pf_ring' driver module\n";
v58 = 3;
}
else
{
v57 = "(pfring) 'pf_ring' driver module not found!!!\n";
v58 = -1;
}
goto LABEL_27;
}
}
else
{
v64 = (unsigned int *)__errno_location(v16, "pfring_set_application_name");
v65 = strerror(*v64);
LOG(
0,
(unsigned int)"(pfring_%s) not found in 'libpfring.so': %s\n",
(unsigned int)"set_application_name",
v65,
v66,
v67);
}
xmmword_1A4158 = 0LL;
xmmword_1A4148 = 0LL;
xmmword_1A4138 = 0LL;
xmmword_1A4128 = 0LL;
*(_OWORD *)&PFRING = 0LL;
qword_1A4168 = 0LL;
v57 = "(pfring) failed to load\n";
v58 = 0;
LABEL_27:
LOG(v58, (_DWORD)v57, v53, v54, v55, v56);
return 0LL;
}
v59 = (unsigned int *)__errno_location("libpfring.so", (_BYTE *)&dword_0 + 1);
v60 = strerror(*v59);
LOG(2, (unsigned int)"(pfring) dlopen('libpfring.so'): %s\n", v60, v61, v62, v63);
return 0LL;
}
| PFRING_init:
PUSH RBP
PUSH RBX
PUSH RAX
LEA RSI,[0x171fa9]
XOR EBP,EBP
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001536da
LEA RSI,[0x171fca]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001536da
LEA RDI,[0x171fef]
MOV ESI,0x1
CALL 0x00115900
TEST RAX,RAX
JZ 0x00143c69
MOV RBX,RAX
LEA RSI,[0x172021]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001536da
LEA RSI,[0x172041]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4118],RAX
TEST RAX,RAX
JNZ 0x001439e9
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1695fe]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_001439e9:
LEA RSI,[0x17207a]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4120],RAX
TEST RAX,RAX
JNZ 0x00143a2f
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x16f044]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143a2f:
LEA RSI,[0x172087]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4128],RAX
TEST RAX,RAX
JNZ 0x00143a75
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x17208e]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143a75:
LEA RSI,[0x17209a]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4130],RAX
TEST RAX,RAX
JNZ 0x00143abb
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1720a1]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143abb:
LEA RSI,[0x1720a6]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4138],RAX
TEST RAX,RAX
JNZ 0x00143b01
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1720ad]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143b01:
LEA RSI,[0x1720b3]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4140],RAX
TEST RAX,RAX
JNZ 0x00143b47
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x16c991]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143b47:
LEA RSI,[0x1720bf]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4148],RAX
TEST RAX,RAX
JNZ 0x00143b8d
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1720c6]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143b8d:
LEA RSI,[0x1720cb]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4150],RAX
TEST RAX,RAX
JNZ 0x00143bd3
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1809c7]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143bd3:
LEA RSI,[0x1720da]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4158],RAX
TEST RAX,RAX
JNZ 0x00143c19
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1720e1]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_00143c19:
LEA RSI,[0x1720ef]
MOV RDI,RBX
CALL 0x001151f0
MOV qword ptr [0x002a4160],RAX
TEST RAX,RAX
JZ 0x00143c8d
TEST EBP,EBP
JNZ 0x00143cb3
LEA RSI,[0x172124]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x001536da
CALL 0x00143848
TEST EAX,EAX
JZ 0x00143cfd
LEA RSI,[0x17217d]
MOV EDI,0x3
JMP 0x00143ced
LAB_00143c69:
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x171ffc]
MOV EDI,0x2
MOV RDX,RAX
XOR EAX,EAX
CALL 0x001536da
JMP 0x00143cf4
LAB_00143c8d:
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x17204d]
LEA RDX,[0x1720f6]
XOR EDI,EDI
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
LAB_00143cb3:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x002a4158],XMM0
MOVUPS xmmword ptr [0x002a4148],XMM0
MOVUPS xmmword ptr [0x002a4138],XMM0
MOVUPS xmmword ptr [0x002a4128],XMM0
MOVUPS xmmword ptr [0x002a4118],XMM0
MOV qword ptr [0x002a4168],0x0
LEA RSI,[0x17210b]
XOR EDI,EDI
LAB_00143ced:
XOR EAX,EAX
CALL 0x001536da
LAB_00143cf4:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00143cfd:
LEA RSI,[0x17214e]
MOV EDI,0xffffffff
JMP 0x00143ced
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 PFRING_init(void)
{
int iVar1;
long lVar2;
int *piVar3;
char *pcVar4;
int8 uVar5;
bool bVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
bool bVar11;
bool bVar12;
bool bVar13;
bool bVar14;
LOG(3,"(pfring) initializing subsystem\n");
LOG(3,"(pfring) looking for \'libpfring.so\'\n");
lVar2 = dlopen("libpfring.so",1);
if (lVar2 == 0) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(2,"(pfring) dlopen(\'libpfring.so\'): %s\n",pcVar4);
return 0;
}
LOG(3,"(pfring) found \'libpfring.so\'!\n");
PFRING = dlsym(lVar2,"pfring_open");
bVar6 = PFRING == 0;
if (bVar6) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","open",pcVar4);
}
DAT_002a4120 = dlsym(lVar2,"pfring_close");
bVar7 = DAT_002a4120 == 0;
if (bVar7) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","close",pcVar4);
}
DAT_002a4128 = dlsym(lVar2,"pfring_enable_ring");
bVar8 = DAT_002a4128 == 0;
if (bVar8) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","enable_ring",pcVar4);
}
DAT_002a4130 = dlsym(lVar2,"pfring_send");
bVar9 = DAT_002a4130 == 0;
if (bVar9) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","send",pcVar4);
}
DAT_002a4138 = dlsym(lVar2,"pfring_flush");
bVar10 = DAT_002a4138 == 0;
if (bVar10) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","flush",pcVar4);
}
_DAT_002a4140 = dlsym(lVar2,"pfring_recv");
bVar11 = _DAT_002a4140 == 0;
if (bVar11) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","recv",pcVar4);
}
_DAT_002a4148 = dlsym(lVar2,"pfring_poll");
bVar12 = _DAT_002a4148 == 0;
if (bVar12) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","poll",pcVar4);
}
DAT_002a4150 = dlsym(lVar2,"pfring_version");
bVar13 = DAT_002a4150 == 0;
if (bVar13) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","version",pcVar4);
}
DAT_002a4158 = dlsym(lVar2,"pfring_set_direction");
bVar14 = DAT_002a4158 == 0;
if (bVar14) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","set_direction",pcVar4);
}
DAT_002a4160 = dlsym(lVar2,"pfring_set_application_name");
if (DAT_002a4160 == 0) {
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
LOG(0,"(pfring_%s) not found in \'libpfring.so\': %s\n","set_application_name",pcVar4);
}
else if (!bVar14 &&
(!bVar13 &&
(!bVar12 && (!bVar11 && (!bVar10 && (!bVar9 && (!bVar8 && (!bVar7 && !bVar6)))))))) {
LOG(1,"(pfring) successfully loaded PF_RING API\n");
iVar1 = PFRING_is_installed();
if (iVar1 == 0) {
pcVar4 = "(pfring) \'pf_ring\' driver module not found!!!\n";
uVar5 = 0xffffffff;
}
else {
pcVar4 = "(pfring) found \'pf_ring\' driver module\n";
uVar5 = 3;
}
goto LAB_00143ced;
}
DAT_002a4158 = 0;
DAT_002a4160 = 0;
_DAT_002a4148 = 0;
DAT_002a4150 = 0;
DAT_002a4138 = 0;
_DAT_002a4140 = 0;
DAT_002a4128 = 0;
DAT_002a4130 = 0;
PFRING = 0;
DAT_002a4120 = 0;
_DAT_002a4168 = 0;
pcVar4 = "(pfring) failed to load\n";
uVar5 = 0;
LAB_00143ced:
LOG(uVar5,pcVar4);
return 0;
}
|
|
4,159 | clip_model_loader::get_bool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool&, bool) | llama.cpp/examples/llava/clip.cpp | void get_bool(const std::string & key, bool & output, bool required = true) {
const int i = gguf_find_key(ctx_gguf.get(), key.c_str());
if (i < 0) {
if (required) throw std::runtime_error("Key not found: " + key);
return;
}
output = gguf_get_val_bool(ctx_gguf.get(), i);
} | O3 | cpp | clip_model_loader::get_bool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
movq (%rsi), %rsi
callq 0x23840
testl %eax, %eax
js 0x4c310
movq 0x8(%r15), %rdi
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %rax, %rsi
callq 0x23e30
movb %al, (%rbx)
jmp 0x4c315
testb %bpl, %bpl
jne 0x4c320
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x23850
movq %rax, %rbx
leaq 0xece36(%rip), %rsi # 0x13916a
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x2cedf
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x23590
xorl %ebp, %ebp
movq 0x142c66(%rip), %rsi # 0x18efc0
movq 0x142c1f(%rip), %rdx # 0x18ef80
movq %rbx, %rdi
callq 0x23e00
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c387
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x231f0
testb %bpl, %bpl
jne 0x4c391
jmp 0x4c399
movq %rax, %r14
movq %rbx, %rdi
callq 0x24440
movq %r14, %rdi
callq 0x23ee0
nop
| _ZN17clip_model_loader8get_boolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERbb:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, [rdi+8]
mov rsi, [rsi]
call _gguf_find_key
test eax, eax
js short loc_4C310
mov rdi, [r15+8]
and eax, 7FFFFFFFh
mov rsi, rax
call _gguf_get_val_bool
mov [rbx], al
jmp short loc_4C315
loc_4C310:
test bpl, bpl
jnz short loc_4C320
loc_4C315:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4C320:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "Key not found: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4C387
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C387:
test bpl, bpl
jnz short loc_4C391
jmp short loc_4C399
mov r14, rax
loc_4C391:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4C399:
mov rdi, r14
call __Unwind_Resume
| long long clip_model_loader::get_bool(long long a1, _QWORD *a2, _BYTE *a3, char a4)
{
long long result; // rax
void *exception; // rbx
_BYTE v8[16]; // [rsp+8h] [rbp-40h] BYREF
result = gguf_find_key(*(_QWORD *)(a1 + 8), *a2);
if ( (int)result < 0 )
{
if ( a4 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v8, (long long)"Key not found: ", a2);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else
{
result = gguf_get_val_bool(*(_QWORD *)(a1 + 8), result & 0x7FFFFFFF);
*a3 = result;
}
return result;
}
| get_bool:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RSI]
CALL 0x00123840
TEST EAX,EAX
JS 0x0014c310
MOV RDI,qword ptr [R15 + 0x8]
AND EAX,0x7fffffff
MOV RSI,RAX
CALL 0x00123e30
MOV byte ptr [RBX],AL
JMP 0x0014c315
LAB_0014c310:
TEST BPL,BPL
JNZ 0x0014c320
LAB_0014c315:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014c320:
MOV EDI,0x10
CALL 0x00123850
MOV RBX,RAX
LAB_0014c32d:
LEA RSI,[0x23916a]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x0012cedf
MOV BPL,0x1
LAB_0014c344:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00123590
XOR EBP,EBP
MOV RSI,qword ptr [0x0028efc0]
MOV RDX,qword ptr [0x0028ef80]
MOV RDI,RBX
CALL 0x00123e00
|
/* clip_model_loader::get_bool(std::__cxx11::string const&, bool&, bool) */
void __thiscall
clip_model_loader::get_bool(clip_model_loader *this,string *param_1,bool *param_2,bool param_3)
{
bool bVar1;
uint uVar2;
runtime_error *this_00;
string local_40 [32];
uVar2 = gguf_find_key(*(int8 *)(this + 8),*(int8 *)param_1);
if ((int)uVar2 < 0) {
if (param_3) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0014c32d to 0014c340 has its CatchHandler @ 0014c38e */
std::operator+((char *)local_40,(string *)"Key not found: ");
/* try { // try from 0014c344 to 0014c368 has its CatchHandler @ 0014c369 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0028efc0,PTR__runtime_error_0028ef80);
}
}
else {
bVar1 = (bool)gguf_get_val_bool(*(int8 *)(this + 8),uVar2 & 0x7fffffff);
*param_2 = bVar1;
}
return;
}
|
|
4,160 | stbi__resample_row_v_2 | opengl-water/include/stb_image.h | static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
// need to generate two samples vertically for every one in input
int i;
STBI_NOTUSED(hs);
for (i=0; i < w; ++i)
out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);
return out;
} | O3 | c | stbi__resample_row_v_2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
testl %ecx, %ecx
jle 0x4a7c3
movl %ecx, %ecx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
leal (%r8,%r8,2), %r8d
movzbl (%rdx,%rdi), %r9d
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, (%rax,%rdi)
incq %rdi
cmpq %rdi, %rcx
jne 0x4a79e
popq %rbp
retq
| stbi__resample_row_v_2:
push rbp
mov rbp, rsp
mov rax, rdi
test ecx, ecx
jle short loc_4A7C3
mov ecx, ecx
xor edi, edi
loc_4A79E:
movzx r8d, byte ptr [rsi+rdi]
lea r8d, [r8+r8*2]
movzx r9d, byte ptr [rdx+rdi]
add r8d, r9d
add r8d, 2
shr r8d, 2
mov [rax+rdi], r8b
inc rdi
cmp rcx, rdi
jnz short loc_4A79E
loc_4A7C3:
pop rbp
retn
| long long stbi__resample_row_v_2(long long a1, long long a2, long long a3, int a4)
{
long long result; // rax
long long i; // rdi
result = a1;
if ( a4 > 0 )
{
for ( i = 0LL; i != a4; ++i )
*(_BYTE *)(result + i) = (*(unsigned __int8 *)(a3 + i) + 3 * (unsigned int)*(unsigned __int8 *)(a2 + i) + 2) >> 2;
}
return result;
}
| stbi__resample_row_v_2:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
TEST ECX,ECX
JLE 0x0014a7c3
MOV ECX,ECX
XOR EDI,EDI
LAB_0014a79e:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
LEA R8D,[R8 + R8*0x2]
MOVZX R9D,byte ptr [RDX + RDI*0x1]
ADD R8D,R9D
ADD R8D,0x2
SHR R8D,0x2
MOV byte ptr [RAX + RDI*0x1],R8B
INC RDI
CMP RCX,RDI
JNZ 0x0014a79e
LAB_0014a7c3:
POP RBP
RET
|
void stbi__resample_row_v_2(long param_1,long param_2,long param_3,uint param_4)
{
ulong uVar1;
if (0 < (int)param_4) {
uVar1 = 0;
do {
*(char *)(param_1 + uVar1) =
(char)((uint)*(byte *)(param_2 + uVar1) + (uint)*(byte *)(param_2 + uVar1) * 2 +
(uint)*(byte *)(param_3 + uVar1) + 2 >> 2);
uVar1 = uVar1 + 1;
} while (param_4 != uVar1);
}
return;
}
|
|
4,161 | copy_uca_collation | eloqsql/mysys/charset.c | static void
copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from,
CHARSET_INFO *loaded)
{
to->cset= from->cset;
to->coll= from->coll;
/*
Single-level UCA collation have strnxfrm_multiple=8.
In case of a multi-level UCA collation we use strnxfrm_multiply=4.
That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller
to allocate a buffer smaller size for each level, for performance purpose,
and to fit longer VARCHARs to @@max_sort_length.
This makes filesort produce non-precise order for some rare Unicode
characters that produce more than 4 weights (long expansions).
UCA requires 2 bytes per weight multiplied by the number of levels.
In case of a 2-level collation, each character requires 4*2=8 bytes.
Therefore, the longest VARCHAR that fits into the default @@max_sort_length
is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64)
would fit.
Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4,
for the same purpose.
TODO: we could add a new LDML syntax to choose strxfrm_multiply value.
*/
to->strxfrm_multiply= loaded->levels_for_order > 1 ?
4 : from->strxfrm_multiply;
to->min_sort_char= from->min_sort_char;
to->max_sort_char= from->max_sort_char;
to->mbminlen= from->mbminlen;
to->mbmaxlen= from->mbmaxlen;
to->caseup_multiply= from->caseup_multiply;
to->casedn_multiply= from->casedn_multiply;
to->state|= MY_CS_AVAILABLE | MY_CS_LOADED |
MY_CS_STRNXFRM | MY_CS_UNICODE;
} | O3 | c | copy_uca_collation:
pushq %rbp
movq %rsp, %rbp
movq 0xb8(%rsi), %rax
movq %rax, 0xb8(%rdi)
movq 0xc0(%rsi), %rax
movq %rax, 0xc0(%rdi)
movl $0x4, %eax
cmpb $0x1, 0xb2(%rdx)
ja 0x9348f
movl 0x90(%rsi), %eax
movl %eax, 0x90(%rdi)
movq 0xa0(%rsi), %rax
movq %rax, 0xa0(%rdi)
movq 0xa8(%rsi), %rax
movq %rax, 0xa8(%rdi)
movl 0x98(%rsi), %eax
movl %eax, 0x98(%rdi)
movl 0x9c(%rsi), %eax
movl %eax, 0x9c(%rdi)
movb 0x94(%rsi), %al
movb %al, 0x94(%rdi)
movb 0x95(%rsi), %al
movb %al, 0x95(%rdi)
orl $0x2c8, 0xc(%rdi) # imm = 0x2C8
popq %rbp
retq
| copy_uca_collation:
push rbp
mov rbp, rsp
mov rax, [rsi+0B8h]
mov [rdi+0B8h], rax
mov rax, [rsi+0C0h]
mov [rdi+0C0h], rax
mov eax, 4
cmp byte ptr [rdx+0B2h], 1
ja short loc_9348F
mov eax, [rsi+90h]
loc_9348F:
mov [rdi+90h], eax
mov rax, [rsi+0A0h]
mov [rdi+0A0h], rax
mov rax, [rsi+0A8h]
mov [rdi+0A8h], rax
mov eax, [rsi+98h]
mov [rdi+98h], eax
mov eax, [rsi+9Ch]
mov [rdi+9Ch], eax
mov al, [rsi+94h]
mov [rdi+94h], al
mov al, [rsi+95h]
mov [rdi+95h], al
or dword ptr [rdi+0Ch], 2C8h
pop rbp
retn
| char copy_uca_collation(long long a1, long long a2, long long a3)
{
int v3; // eax
char result; // al
*(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184);
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192);
v3 = 4;
if ( *(_BYTE *)(a3 + 178) <= 1u )
v3 = *(_DWORD *)(a2 + 144);
*(_DWORD *)(a1 + 144) = v3;
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160);
*(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168);
*(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152);
*(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156);
*(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148);
result = *(_BYTE *)(a2 + 149);
*(_BYTE *)(a1 + 149) = result;
*(_DWORD *)(a1 + 12) |= 0x2C8u;
return result;
}
| copy_uca_collation:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RSI + 0xb8]
MOV qword ptr [RDI + 0xb8],RAX
MOV RAX,qword ptr [RSI + 0xc0]
MOV qword ptr [RDI + 0xc0],RAX
MOV EAX,0x4
CMP byte ptr [RDX + 0xb2],0x1
JA 0x0019348f
MOV EAX,dword ptr [RSI + 0x90]
LAB_0019348f:
MOV dword ptr [RDI + 0x90],EAX
MOV RAX,qword ptr [RSI + 0xa0]
MOV qword ptr [RDI + 0xa0],RAX
MOV RAX,qword ptr [RSI + 0xa8]
MOV qword ptr [RDI + 0xa8],RAX
MOV EAX,dword ptr [RSI + 0x98]
MOV dword ptr [RDI + 0x98],EAX
MOV EAX,dword ptr [RSI + 0x9c]
MOV dword ptr [RDI + 0x9c],EAX
MOV AL,byte ptr [RSI + 0x94]
MOV byte ptr [RDI + 0x94],AL
MOV AL,byte ptr [RSI + 0x95]
MOV byte ptr [RDI + 0x95],AL
OR dword ptr [RDI + 0xc],0x2c8
POP RBP
RET
|
void copy_uca_collation(long param_1,long param_2,long param_3)
{
int4 uVar1;
*(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8);
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0);
uVar1 = 4;
if (*(byte *)(param_3 + 0xb2) < 2) {
uVar1 = *(int4 *)(param_2 + 0x90);
}
*(int4 *)(param_1 + 0x90) = uVar1;
*(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0);
*(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8);
*(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98);
*(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c);
*(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94);
*(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95);
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8;
return;
}
|
|
4,162 | my_mb_wc_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
return -2;
return 2;
} | O3 | c | my_mb_wc_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb0c04
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xb0be0
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb0c04
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x56, %cl
ja 0xb0c04
movzbl 0x1(%rdx), %ecx
leal 0x1(%rcx), %edx
cmpb $-0x5e, %dl
jae 0xb0c05
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
orl %ecx, %eax
andl $0x7f7f, %eax # imm = 0x7F7F
leal -0x2121(%rax), %ecx
cmpl $0x537, %ecx # imm = 0x537
ja 0xb0c30
movl %ecx, %eax
leaq 0x136e32(%rip), %rcx # 0x1e7a60
jmp 0xb0c5e
leal -0x2721(%rax), %ecx
cmpl $0x24e, %ecx # imm = 0x24E
ja 0xb0c49
movl %ecx, %eax
leaq 0x137889(%rip), %rcx # 0x1e84d0
jmp 0xb0c5e
addl $0xffffcfdf, %eax # imm = 0xFFFFCFDF
cmpl $0x475e, %eax # imm = 0x475E
jae 0xb0c77
movl %eax, %eax
leaq 0x137d12(%rip), %rcx # 0x1e8970
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xb0c83
jmp 0xb0c7e
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B0C04
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_B0BE0
mov [rsi], rdi
mov eax, 1
retn
loc_B0BE0:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_B0C04
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 56h ; 'V'
ja short locret_B0C04
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+1]
cmp dl, 0A2h
jnb short loc_B0C05
locret_B0C04:
retn
loc_B0C05:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
or eax, ecx
and eax, 7F7Fh
lea ecx, [rax-2121h]
cmp ecx, 537h
ja short loc_B0C30
mov eax, ecx
lea rcx, tab_gb2312_uni0
jmp short loc_B0C5E
loc_B0C30:
lea ecx, [rax-2721h]
cmp ecx, 24Eh
ja short loc_B0C49
mov eax, ecx
lea rcx, tab_gb2312_uni1
jmp short loc_B0C5E
loc_B0C49:
add eax, 0FFFFCFDFh
cmp eax, 475Eh
jnb short loc_B0C77
mov eax, eax
lea rcx, tab_gb2312_uni2
loc_B0C5E:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_B0C83
jmp short loc_B0C7E
loc_B0C77:
mov qword ptr [rsi], 0
loc_B0C7E:
mov eax, 0FFFFFFFEh
loc_B0C83:
pop rbp
retn
| long long my_mb_wc_gb2312(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
unsigned __int16 v6; // cx
int v7; // eax
long long v8; // rax
unsigned __int16 *v9; // rcx
long long v10; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x56u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u )
{
v7 = (v6 | (unsigned __int16)((unsigned __int8)v5 << 8)) & 0x7F7F;
if ( (unsigned int)(v7 - 8481) > 0x537 )
{
if ( (unsigned int)(v7 - 10017) > 0x24E )
{
LODWORD(v8) = v7 - 12321;
if ( (unsigned int)v8 >= 0x475E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_gb2312_uni2;
}
else
{
v8 = (unsigned int)(v7 - 10017);
v9 = (unsigned __int16 *)&tab_gb2312_uni1;
}
}
else
{
v8 = (unsigned int)(v7 - 8481);
v9 = (unsigned __int16 *)&tab_gb2312_uni0;
}
v10 = v9[v8];
*a2 = v10;
result = 2LL;
if ( (_WORD)v10 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b0c04
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001b0be0
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001b0be0:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b0c04
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x56
JA 0x001b0c04
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x1]
CMP DL,0xa2
JNC 0x001b0c05
LAB_001b0c04:
RET
LAB_001b0c05:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
OR EAX,ECX
AND EAX,0x7f7f
LEA ECX,[RAX + -0x2121]
CMP ECX,0x537
JA 0x001b0c30
MOV EAX,ECX
LEA RCX,[0x2e7a60]
JMP 0x001b0c5e
LAB_001b0c30:
LEA ECX,[RAX + -0x2721]
CMP ECX,0x24e
JA 0x001b0c49
MOV EAX,ECX
LEA RCX,[0x2e84d0]
JMP 0x001b0c5e
LAB_001b0c49:
ADD EAX,0xffffcfdf
CMP EAX,0x475e
JNC 0x001b0c77
MOV EAX,EAX
LEA RCX,[0x2e8970]
LAB_001b0c5e:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001b0c83
JMP 0x001b0c7e
LAB_001b0c77:
MOV qword ptr [RSI],0x0
LAB_001b0c7e:
MOV EAX,0xfffffffe
LAB_001b0c83:
POP RBP
RET
|
int8 my_mb_wc_gb2312(int8 param_1,ulong *param_2,char *param_3,char *param_4)
{
char cVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
cVar1 = *param_3;
if (-1 < (long)cVar1) {
*param_2 = (long)cVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(cVar1 + 0x5fU) < 0x57) {
if ((byte)(param_3[1] + 1U) < 0xa2) {
return 0;
}
uVar3 = CONCAT11(cVar1,param_3[1]) & 0x7f7f;
if (uVar3 - 0x2121 < 0x538) {
uVar4 = (ulong)(uVar3 - 0x2121);
puVar5 = tab_gb2312_uni0;
}
else if (uVar3 - 0x2721 < 0x24f) {
uVar4 = (ulong)(uVar3 - 0x2721);
puVar5 = tab_gb2312_uni1;
}
else {
if (0x475d < uVar3 - 0x3021) {
*param_2 = 0;
return 0xfffffffe;
}
uVar4 = (ulong)(uVar3 - 0x3021);
puVar5 = tab_gb2312_uni2;
}
uVar2 = *(ushort *)(puVar5 + uVar4 * 2);
*param_2 = (ulong)uVar2;
if (uVar2 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
4,163 | evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/tracing.cpp | std::string get_name(uint8_t opcode)
{
// TODO: Create constexpr tables of names (maybe even per revision).
const auto name = instr::traits[opcode].name;
return (name != nullptr) ? name : "0x" + evmc::hex(opcode);
} | O2 | cpp | evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char):
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl %esi, %eax
shll $0x5, %eax
leaq 0x64686(%rip), %rcx # 0xa9aa0
movq (%rax,%rcx), %rax
testq %rax, %rax
je 0x45433
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x45b32
jmp 0x45485
movzbl %sil, %eax
movl %eax, %ecx
shrl $0x4, %ecx
leaq 0x37531(%rip), %rdx # 0x7c974
movzbl (%rcx,%rdx), %ecx
andl $0xf, %eax
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movzbl (%rax,%rdx), %eax
shll $0x8, %eax
orl %ecx, %eax
movw %ax, (%rsi)
movq $0x2, -0x8(%rsi)
movb $0x0, 0x2(%rsi)
leaq 0x37557(%rip), %rsi # 0x7c9c9
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x45b6d
movq %rsp, %rdi
callq 0x45b22
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x45b22
movq %rbx, %rdi
callq 0x22330
nop
| _ZN6evmone12_GLOBAL__N_18get_nameB5cxx11Eh:
push rbx
sub rsp, 20h
mov rbx, rdi
mov eax, esi
shl eax, 5
lea rcx, _ZN6evmone5instr6traitsE; evmone::instr::traits
mov rax, [rax+rcx]
test rax, rax
jz short loc_45433
mov rdx, rsp
mov rdi, rbx
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short loc_45485
loc_45433:
movzx eax, sil
mov ecx, eax
shr ecx, 4
lea rdx, a0123456789abcd; "0123456789abcdef"
movzx ecx, byte ptr [rcx+rdx]
and eax, 0Fh
lea rsi, [rsp+28h+var_18]
mov [rsi-10h], rsi
movzx eax, byte ptr [rax+rdx]
shl eax, 8
or eax, ecx
mov [rsi], ax
mov qword ptr [rsi-8], 2
mov byte ptr [rsi+2], 0
lea rsi, aReturndata0x+0Fh; "0x"
mov rdx, rsp
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_45485:
mov rax, rbx
add rsp, 20h
pop rbx
retn
mov rbx, rax
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long evmone::`anonymous namespace'::get_name[abi:cxx11](long long a1, int a2)
{
__int16 v2; // cx
_QWORD v4[2]; // [rsp+0h] [rbp-28h] BYREF
__int16 v5; // [rsp+10h] [rbp-18h] BYREF
char v6; // [rsp+12h] [rbp-16h]
if ( *(char **)((char *)&evmone::instr::traits + (unsigned int)(32 * a2)) )
{
std::string::basic_string<std::allocator<char>>(
a1,
*(char **)((char *)&evmone::instr::traits + (unsigned int)(32 * a2)),
v4);
}
else
{
v2 = (unsigned __int8)a0123456789abcd[(unsigned __int8)a2 >> 4];
v4[0] = &v5;
v5 = v2 | ((unsigned __int8)a0123456789abcd[a2 & 0xF] << 8);
v4[1] = 2LL;
v6 = 0;
((void ( *)(long long, char *, _QWORD *))std::operator+<char>)(a1, "0x", v4);
std::string::~string(v4);
}
return a1;
}
| get_name[abi:cxx11]:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV EAX,ESI
SHL EAX,0x5
LEA RCX,[0x1a9aa0]
MOV RAX,qword ptr [RAX + RCX*0x1]
TEST RAX,RAX
JZ 0x00145433
MOV RDX,RSP
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00145b32
JMP 0x00145485
LAB_00145433:
MOVZX EAX,SIL
MOV ECX,EAX
SHR ECX,0x4
LEA RDX,[0x17c974]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
AND EAX,0xf
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI + -0x10],RSI
MOVZX EAX,byte ptr [RAX + RDX*0x1]
SHL EAX,0x8
OR EAX,ECX
MOV word ptr [RSI],AX
MOV qword ptr [RSI + -0x8],0x2
MOV byte ptr [RSI + 0x2],0x0
LAB_0014546b:
LEA RSI,[0x17c9c9]
MOV RDX,RSP
MOV RDI,RBX
CALL 0x00145b6d
LAB_0014547d:
MOV RDI,RSP
CALL 0x00145b22
LAB_00145485:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char) */
_anonymous_namespace_ * __thiscall
evmone::(anonymous_namespace)::get_name_abi_cxx11_(_anonymous_namespace_ *this,uchar param_1)
{
int7 in_register_00000031;
int2 *local_28;
int8 local_20;
int2 local_18;
int1 local_16;
if (*(char **)(instr::traits + (uint)((int)CONCAT71(in_register_00000031,param_1) << 5)) ==
(char *)0x0) {
local_28 = &local_18;
local_18 = CONCAT11("0123456789abcdef"[param_1 & 0xf],"0123456789abcdef"[param_1 >> 4]);
local_20 = 2;
local_16 = 0;
/* try { // try from 0014546b to 0014547c has its CatchHandler @ 0014548e */
std::operator+((char *)this,(string *)0x17c9c9);
std::__cxx11::string::~string((string *)&local_28);
}
else {
std::__cxx11::string::string<std::allocator<char>>
((string *)this,
*(char **)(instr::traits + (uint)((int)CONCAT71(in_register_00000031,param_1) << 5)),
(allocator *)&local_28);
}
return this;
}
|
|
4,164 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++() | llama.cpp/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++():
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x801c0
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x801b0
cmpl $0x1, %eax
jne 0x801b7
movq 0x8(%rbx), %rdi
callq 0x21060
movq %rax, 0x8(%rbx)
jmp 0x801bb
addq $0x10, 0x10(%rbx)
jmp 0x801bb
incq 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x997ab(%rip), %rdi # 0x119972
leaq 0x920c4(%rip), %rdx # 0x112292
leaq 0x9fa33(%rip), %rcx # 0x11fc08
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x20e80
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_801C0
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_801B0
cmp eax, 1
jnz short loc_801B7
mov rdi, [rbx+8]
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov [rbx+8], rax
jmp short loc_801BB
loc_801B0:
add qword ptr [rbx+10h], 10h
jmp short loc_801BB
loc_801B7:
inc qword ptr [rbx+18h]
loc_801BB:
mov rax, rbx
pop rbx
retn
loc_801C0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(
unsigned __int8 **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,
long long a10)
{
int v10; // eax
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
if ( *a1 )
{
v10 = **a1;
if ( v10 == 2 )
{
a1[2] += 16;
}
else if ( v10 == 1 )
{
a1[1] = (unsigned __int8 *)std::_Rb_tree_increment(a1[1]);
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
13248LL,
v12,
v13,
v14,
v15,
a7,
a8,
a9,
a10);
}
}
| operator++:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001801c0
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001801b0
CMP EAX,0x1
JNZ 0x001801b7
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x00121060
MOV qword ptr [RBX + 0x8],RAX
JMP 0x001801bb
LAB_001801b0:
ADD qword ptr [RBX + 0x10],0x10
JMP 0x001801bb
LAB_001801b7:
INC qword ptr [RBX + 0x18]
LAB_001801bb:
MOV RAX,RBX
POP RBX
RET
LAB_001801c0:
LEA RDI,[0x219972]
LEA RDX,[0x212292]
LEA RCX,[0x21fc08]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00120e80
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this)
{
char cVar1;
int8 uVar2;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
uVar2 = std::_Rb_tree_increment(*(_Rb_tree_node_base **)(this + 8));
*(int8 *)(this + 8) = uVar2;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
|
|
4,165 | ma_pvio_tls_compare_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | static my_bool ma_pvio_tls_compare_fp(const char *cert_fp,
unsigned int cert_fp_len,
const char *fp, unsigned int fp_len)
{
char *p= (char *)fp,
*c;
/* check length */
if (cert_fp_len != 20)
return 1;
/* We support two formats:
2 digits hex numbers, separated by colons (length=59)
20 * 2 digits hex numbers without separators (length = 40)
*/
if (fp_len != (strchr(fp, ':') ? 59 : 40))
return 1;
for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++)
{
signed char d1, d2;
if (*p == ':')
p++;
if (p - fp > (int)fp_len -1)
return 1;
if ((d1 = ma_hex2int(*p)) == - 1 ||
(d2 = ma_hex2int(*(p+1))) == -1 ||
(char)(d1 * 16 + d2) != *c)
return 1;
p+= 2;
}
return 0;
} | O0 | c | ma_pvio_tls_compare_fp:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x14, -0x14(%rbp)
je 0x485fd
movb $0x1, -0x1(%rbp)
jmp 0x486fc
movl -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x364c0
movq %rax, %rsi
movl -0x40(%rbp), %eax
movl $0x28, %ecx
movl $0x3b, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
cmpl %ecx, %eax
je 0x48635
movb $0x1, -0x1(%rbp)
jmp 0x486fc
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x486f8
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x4866c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x4868b
movb $0x1, -0x1(%rbp)
jmp 0x486fc
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x48730
movb %al, -0x39(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x486d5
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x48730
movb %al, -0x3a(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x486d5
movsbl -0x39(%rbp), %eax
shll $0x4, %eax
movsbl -0x3a(%rbp), %ecx
addl %ecx, %eax
movsbl %al, %eax
movq -0x38(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x486db
movb $0x1, -0x1(%rbp)
jmp 0x486fc
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4863d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_compare_fp:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
cmp [rbp+var_14], 14h
jz short loc_485FD
mov [rbp+var_1], 1
jmp loc_486FC
loc_485FD:
mov eax, [rbp+var_24]
mov [rbp+var_40], eax
mov rdi, [rbp+var_20]
mov esi, 3Ah ; ':'
call _strchr
mov rsi, rax
mov eax, [rbp+var_40]
mov ecx, 28h ; '('
mov edx, 3Bh ; ';'
cmp rsi, 0
cmovnz ecx, edx
cmp eax, ecx
jz short loc_48635
mov [rbp+var_1], 1
jmp loc_486FC
loc_48635:
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_4863D:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_14]
add rcx, rdx
cmp rax, rcx
jnb loc_486F8
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 3Ah ; ':'
jnz short loc_4866C
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
loc_4866C:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, 1
movsxd rcx, ecx
cmp rax, rcx
jle short loc_4868B
mov [rbp+var_1], 1
jmp short loc_486FC
loc_4868B:
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax]
call ma_hex2int
mov [rbp+var_39], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_486D5
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax+1]
call ma_hex2int
mov [rbp+var_3A], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_486D5
movsx eax, [rbp+var_39]
shl eax, 4
movsx ecx, [rbp+var_3A]
add eax, ecx
movsx eax, al
mov rcx, [rbp+var_38]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_486DB
loc_486D5:
mov [rbp+var_1], 1
jmp short loc_486FC
loc_486DB:
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_4863D
loc_486F8:
mov [rbp+var_1], 0
loc_486FC:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char ma_pvio_tls_compare_fp(char *a1, int a2, char *a3, int a4)
{
long long v4; // rsi
int v5; // ecx
char v7; // [rsp+6h] [rbp-3Ah]
char v8; // [rsp+7h] [rbp-39h]
char *i; // [rsp+8h] [rbp-38h]
char *v10; // [rsp+10h] [rbp-30h]
v10 = a3;
if ( a2 != 20 )
return 1;
v4 = strchr(a3, 58LL);
v5 = 40;
if ( v4 )
v5 = 59;
if ( a4 != v5 )
return 1;
for ( i = a1; i < a1 + 20; ++i )
{
if ( *v10 == 58 )
++v10;
if ( v10 - a3 > a4 - 1 )
return 1;
v8 = ma_hex2int((unsigned int)*v10);
if ( v8 == -1 )
return 1;
v7 = ma_hex2int((unsigned int)v10[1]);
if ( v7 == -1 || (char)(v7 + 16 * v8) != *i )
return 1;
v10 += 2;
}
return 0;
}
| ma_pvio_tls_compare_fp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x14
JZ 0x001485fd
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001486fc
LAB_001485fd:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x3a
CALL 0x001364c0
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x28
MOV EDX,0x3b
CMP RSI,0x0
CMOVNZ ECX,EDX
CMP EAX,ECX
JZ 0x00148635
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001486fc
LAB_00148635:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014863d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x001486f8
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3a
JNZ 0x0014866c
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0014866c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,0x1
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x0014868b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001486fc
LAB_0014868b:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX]
CALL 0x00148730
MOV byte ptr [RBP + -0x39],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x001486d5
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX + 0x1]
CALL 0x00148730
MOV byte ptr [RBP + -0x3a],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x001486d5
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x4
MOVSX ECX,byte ptr [RBP + -0x3a]
ADD EAX,ECX
MOVSX EAX,AL
MOV RCX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x001486db
LAB_001486d5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001486fc
LAB_001486db:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0014863d
LAB_001486f8:
MOV byte ptr [RBP + -0x1],0x0
LAB_001486fc:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 ma_pvio_tls_compare_fp(char *param_1,int param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
char *pcVar3;
int iVar4;
char *local_40;
char *local_38;
int1 local_9;
if (param_2 == 0x14) {
pcVar3 = strchr(param_3,0x3a);
iVar4 = 0x28;
if (pcVar3 != (char *)0x0) {
iVar4 = 0x3b;
}
local_40 = param_1;
local_38 = param_3;
if (param_4 == iVar4) {
for (; local_40 < param_1 + 0x14; local_40 = local_40 + 1) {
if (*local_38 == ':') {
local_38 = local_38 + 1;
}
if ((long)(param_4 + -1) < (long)local_38 - (long)param_3) {
return 1;
}
cVar1 = ma_hex2int((int)*local_38);
if (((cVar1 == -1) || (cVar2 = ma_hex2int((int)local_38[1]), cVar2 == -1)) ||
((char)((char)((int)cVar1 << 4) + cVar2) != *local_40)) {
return 1;
}
local_38 = local_38 + 2;
}
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
4,166 | evmone::instr::core::returndatacopy(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline Result returndatacopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
const auto& mem_index = stack.pop();
const auto& input_index = stack.pop();
const auto& size = stack.pop();
if (!check_memory(gas_left, state.memory, mem_index, size))
return {EVMC_OUT_OF_GAS, gas_left};
auto dst = static_cast<size_t>(mem_index);
auto s = static_cast<size_t>(size);
if (is_eof_container(state.original_code))
{
auto src = state.return_data.size() < input_index ? state.return_data.size() :
static_cast<size_t>(input_index);
auto copy_size = std::min(s, state.return_data.size() - src);
if (const auto cost = copy_cost(s); (gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
if (copy_size > 0)
std::memcpy(&state.memory[dst], &state.return_data[src], copy_size);
if (s - copy_size > 0)
std::memset(&state.memory[dst + copy_size], 0, s - copy_size);
}
else
{
if (state.return_data.size() < input_index)
return {EVMC_INVALID_MEMORY_ACCESS, gas_left};
auto src = static_cast<size_t>(input_index);
if (src + s > state.return_data.size())
return {EVMC_INVALID_MEMORY_ACCESS, gas_left};
if (const auto cost = copy_cost(s); (gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
if (s > 0)
std::memcpy(&state.memory[dst], &state.return_data[src], s);
}
return {EVMC_SUCCESS, gas_left};
} | O2 | cpp | evmone::instr::core::returndatacopy(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
leaq -0x40(%r14), %rcx
leaq 0x8(%rdx), %r12
movq %r12, %rsi
movq %r14, %rdx
callq 0x3b250
testb %al, %al
je 0x3bb0b
leaq -0x20(%r14), %r13
movq -0x40(%r14), %rbx
movq (%r14), %r14
movq 0x68(%r15), %rdi
movq 0x70(%r15), %rsi
callq 0x3dbd3
leaq 0x50(%r15), %rbp
testb %al, %al
je 0x3bb0f
movq (%rbp), %rax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %r13, %rsi
callq 0x3b654
testb %al, %al
cmovneq %rbp, %r13
movq (%r13), %rsi
movq (%rbp), %rbp
subq %rsi, %rbp
cmpq %rbx, %rbp
movq %rbx, %r13
cmovbq %rbp, %r13
leaq 0x1f(%rbx), %rax
shrq $0x5, %rax
imulq $-0x3, %rax, %rdx
addq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rsp)
js 0x3bb80
testq %r13, %r13
je 0x3baed
movq 0x8(%r15), %rdi
addq %r14, %rdi
addq 0x48(%r15), %rsi
movq %r13, %rdx
callq 0x22090
cmpq %rbp, %rbx
jbe 0x3bb6a
addq (%r12), %r14
addq %r13, %r14
subq %r13, %rbx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x221a0
jmp 0x3bb6a
pushq $0x3
jmp 0x3bb37
movq (%rbp), %rax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movq %r13, %rsi
callq 0x3b654
testb %al, %al
jne 0x3bb35
movq (%r13), %rsi
leaq (%rsi,%rbx), %rax
cmpq (%rbp), %rax
jbe 0x3bb3a
pushq $0x9
popq %rax
jmp 0x3bb6c
leaq 0x1f(%rbx), %rax
shrq $0x5, %rax
imulq $-0x3, %rax, %rdx
addq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rsp)
js 0x3bb80
testq %rbx, %rbx
je 0x3bb6a
addq 0x8(%r15), %r14
addq 0x48(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x22090
xorl %eax, %eax
movq 0x8(%rsp), %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x3
popq %rax
jmp 0x3bb71
| _ZN6evmone5instr4core14returndatacopyENS_8StackTopElRNS_14ExecutionStateE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rdi
lea rdi, [rsp+48h+var_40]
mov [rdi], rsi
lea rcx, [r14-40h]
lea r12, [rdx+8]
mov rsi, r12
mov rdx, r14
call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz loc_3BB0B
lea r13, [r14-20h]
mov rbx, [r14-40h]
mov r14, [r14]
mov rdi, [r15+68h]
mov rsi, [r15+70h]
call _ZN6evmone16is_eof_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_eof_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
lea rbp, [r15+50h]
test al, al
jz loc_3BB0F
mov rax, [rbp+0]
lea rdi, [rsp+48h+var_38]
mov [rdi], rax
mov rsi, r13
call _ZN4intxltILj256EmvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,ulong,void>(ulong const&,intx::uint<256u> const&)
test al, al
cmovnz r13, rbp
mov rsi, [r13+0]
mov rbp, [rbp+0]
sub rbp, rsi
cmp rbp, rbx
mov r13, rbx
cmovb r13, rbp
lea rax, [rbx+1Fh]
shr rax, 5
imul rdx, rax, -3
add rdx, [rsp+48h+var_40]
mov [rsp+48h+var_40], rdx
js loc_3BB80
test r13, r13
jz short loc_3BAED
mov rdi, [r15+8]
add rdi, r14
add rsi, [r15+48h]
mov rdx, r13
call _memcpy
loc_3BAED:
cmp rbx, rbp
jbe short loc_3BB6A
add r14, [r12]
add r14, r13
sub rbx, r13
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
jmp short loc_3BB6A
loc_3BB0B:
push 3
jmp short loc_3BB37
loc_3BB0F:
mov rax, [rbp+0]
lea rdi, [rsp+48h+var_38]
mov [rdi], rax
mov rsi, r13
call _ZN4intxltILj256EmvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,ulong,void>(ulong const&,intx::uint<256u> const&)
test al, al
jnz short loc_3BB35
mov rsi, [r13+0]
lea rax, [rsi+rbx]
cmp rax, [rbp+0]
jbe short loc_3BB3A
loc_3BB35:
push 9
loc_3BB37:
pop rax
jmp short loc_3BB6C
loc_3BB3A:
lea rax, [rbx+1Fh]
shr rax, 5
imul rdx, rax, -3
add rdx, [rsp+48h+var_40]
mov [rsp+48h+var_40], rdx
js short loc_3BB80
test rbx, rbx
jz short loc_3BB6A
add r14, [r15+8]
add rsi, [r15+48h]
mov rdi, r14
mov rdx, rbx
call _memcpy
loc_3BB6A:
xor eax, eax
loc_3BB6C:
mov rdx, [rsp+48h+var_40]
loc_3BB71:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3BB80:
push 3
pop rax
jmp short loc_3BB71
| long long evmone::instr::core::returndatacopy(long long *a1, long long a2, _QWORD *a3)
{
_QWORD *v4; // r12
unsigned long long *v5; // r13
unsigned long long v6; // rbx
long long v7; // r14
unsigned long long *v8; // rbp
long long v9; // rcx
unsigned long long v10; // rsi
unsigned long long v11; // rbp
unsigned long long v12; // r13
long long v13; // rcx
unsigned long long v14; // rsi
long long v17; // [rsp+8h] [rbp-40h] BYREF
unsigned long long v18[7]; // [rsp+10h] [rbp-38h] BYREF
v17 = a2;
v4 = a3 + 1;
if ( !evmone::check_memory((long long)&v17, (long long)(a3 + 1), (long long)a1, a1 - 8) )
return 3LL;
v5 = (unsigned long long *)(a1 - 4);
v6 = *(a1 - 8);
v7 = *a1;
v8 = a3 + 10;
if ( !(unsigned __int8)evmone::is_eof_container(a3[13], a3[14]) )
{
v18[0] = *v8;
if ( !intx::operator<<256u,unsigned long,void>(v18, v5) )
{
v14 = *v5;
if ( *v5 + v6 <= *v8 )
{
v17 -= 3 * ((v6 + 31) >> 5);
if ( v17 >= 0 )
{
if ( v6 )
memcpy(a3[1] + v7, a3[9] + v14, v6, v13);
return 0LL;
}
return 3LL;
}
}
return 9LL;
}
v18[0] = *v8;
if ( intx::operator<<256u,unsigned long,void>(v18, v5) )
v5 = a3 + 10;
v10 = *v5;
v11 = *v8 - *v5;
v12 = v6;
if ( v11 < v6 )
v12 = v11;
v17 -= 3 * ((v6 + 31) >> 5);
if ( v17 < 0 )
return 3LL;
if ( v12 )
memcpy(v7 + a3[1], a3[9] + v10, v12, v9);
if ( v6 > v11 )
memset(v12 + *v4 + v7, 0LL, v6 - v12);
return 0LL;
}
| returndatacopy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RDI
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RSI
LEA RCX,[R14 + -0x40]
LEA R12,[RDX + 0x8]
MOV RSI,R12
MOV RDX,R14
CALL 0x0013b250
TEST AL,AL
JZ 0x0013bb0b
LEA R13,[R14 + -0x20]
MOV RBX,qword ptr [R14 + -0x40]
MOV R14,qword ptr [R14]
MOV RDI,qword ptr [R15 + 0x68]
MOV RSI,qword ptr [R15 + 0x70]
CALL 0x0013dbd3
LEA RBP,[R15 + 0x50]
TEST AL,AL
JZ 0x0013bb0f
MOV RAX,qword ptr [RBP]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RAX
MOV RSI,R13
CALL 0x0013b654
TEST AL,AL
CMOVNZ R13,RBP
MOV RSI,qword ptr [R13]
MOV RBP,qword ptr [RBP]
SUB RBP,RSI
CMP RBP,RBX
MOV R13,RBX
CMOVC R13,RBP
LEA RAX,[RBX + 0x1f]
SHR RAX,0x5
IMUL RDX,RAX,-0x3
ADD RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x8],RDX
JS 0x0013bb80
TEST R13,R13
JZ 0x0013baed
MOV RDI,qword ptr [R15 + 0x8]
ADD RDI,R14
ADD RSI,qword ptr [R15 + 0x48]
MOV RDX,R13
CALL 0x00122090
LAB_0013baed:
CMP RBX,RBP
JBE 0x0013bb6a
ADD R14,qword ptr [R12]
ADD R14,R13
SUB RBX,R13
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001221a0
JMP 0x0013bb6a
LAB_0013bb0b:
PUSH 0x3
JMP 0x0013bb37
LAB_0013bb0f:
MOV RAX,qword ptr [RBP]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RAX
MOV RSI,R13
CALL 0x0013b654
TEST AL,AL
JNZ 0x0013bb35
MOV RSI,qword ptr [R13]
LEA RAX,[RSI + RBX*0x1]
CMP RAX,qword ptr [RBP]
JBE 0x0013bb3a
LAB_0013bb35:
PUSH 0x9
LAB_0013bb37:
POP RAX
JMP 0x0013bb6c
LAB_0013bb3a:
LEA RAX,[RBX + 0x1f]
SHR RAX,0x5
IMUL RDX,RAX,-0x3
ADD RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x8],RDX
JS 0x0013bb80
TEST RBX,RBX
JZ 0x0013bb6a
ADD R14,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [R15 + 0x48]
MOV RDI,R14
MOV RDX,RBX
CALL 0x00122090
LAB_0013bb6a:
XOR EAX,EAX
LAB_0013bb6c:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0013bb71:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013bb80:
PUSH 0x3
POP RAX
JMP 0x0013bb71
|
/* evmone::instr::core::returndatacopy(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::returndatacopy(uint *param_1,long param_2,long param_3)
{
uint *puVar1;
ulong __n;
long lVar2;
char cVar3;
bool bVar4;
ulong uVar5;
uint *puVar6;
ulong __n_00;
int1 auVar7 [16];
int8 uStack_50;
long local_40;
ulong local_38;
local_40 = param_2;
cVar3 = check_memory(&local_40,(Memory *)(param_3 + 8),param_1,param_1 + -0x40);
if (cVar3 == '\0') {
uStack_50 = 3;
goto LAB_0013bb71;
}
puVar6 = param_1 + -0x20;
__n = *(ulong *)(param_1 + -0x40);
lVar2 = *(long *)param_1;
cVar3 = is_eof_container(*(evmone **)(param_3 + 0x68),*(int8 *)(param_3 + 0x70));
puVar1 = (uint *)(param_3 + 0x50);
if (cVar3 == '\0') {
local_38 = *(ulong *)puVar1;
bVar4 = intx::operator<(&local_38,puVar6);
if ((bVar4) || (*(ulong *)puVar1 < *(long *)puVar6 + __n)) {
uStack_50 = 9;
goto LAB_0013bb71;
}
local_40 = (__n + 0x1f >> 5) * -3 + local_40;
if (local_40 < 0) goto LAB_0013bb80;
if (__n != 0) {
memcpy((void *)(lVar2 + *(long *)(param_3 + 8)),
(void *)(*(long *)puVar6 + *(long *)(param_3 + 0x48)),__n);
}
}
else {
local_38 = *(ulong *)puVar1;
bVar4 = intx::operator<(&local_38,puVar6);
if (bVar4) {
puVar6 = puVar1;
}
uVar5 = *(long *)puVar1 - *(long *)puVar6;
__n_00 = __n;
if (uVar5 < __n) {
__n_00 = uVar5;
}
local_40 = (__n + 0x1f >> 5) * -3 + local_40;
if (local_40 < 0) {
LAB_0013bb80:
uStack_50 = 3;
goto LAB_0013bb71;
}
if (__n_00 != 0) {
memcpy((void *)(*(long *)(param_3 + 8) + lVar2),
(void *)(*(long *)puVar6 + *(long *)(param_3 + 0x48)),__n_00);
}
if (uVar5 < __n) {
memset((void *)(lVar2 + *(long *)(param_3 + 8) + __n_00),0,__n - __n_00);
}
}
uStack_50 = 0;
LAB_0013bb71:
auVar7._8_8_ = local_40;
auVar7._0_8_ = uStack_50;
return auVar7;
}
|
|
4,167 | list_reverse | eloqsql/mysys/list.c | LIST *list_reverse(LIST *root)
{
LIST *last;
last=root;
while (root)
{
last=root;
root=root->next;
last->next=last->prev;
last->prev=root;
}
return last;
} | O0 | c | list_reverse:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe24d7
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe24a0
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| list_reverse:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
loc_E24A0:
cmp [rbp+var_8], 0
jz short loc_E24D7
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax], rcx
jmp short loc_E24A0
loc_E24D7:
mov rax, [rbp+var_10]
pop rbp
retn
| _QWORD * list_reverse(_QWORD *a1)
{
_QWORD *v2; // [rsp+0h] [rbp-10h]
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = a1;
while ( v3 )
{
v2 = v3;
v3 = (_QWORD *)v3[1];
v2[1] = *v2;
*v2 = v3;
}
return v2;
}
| list_reverse:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_001e24a0:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001e24d7
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
JMP 0x001e24a0
LAB_001e24d7:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int8 * list_reverse(int8 *param_1)
{
int8 *puVar1;
int8 *local_18;
int8 *local_10;
local_18 = param_1;
local_10 = param_1;
while (local_10 != (int8 *)0x0) {
local_18 = local_10;
puVar1 = (int8 *)local_10[1];
local_10[1] = *local_10;
*local_10 = puVar1;
local_10 = puVar1;
}
return local_18;
}
|
|
4,168 | get_charset_by_csname | eloqsql/mysys/charset.c | CHARSET_INFO *
get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags)
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
return my_charset_get_by_name(&loader, cs_name, cs_flags, flags);
} | O3 | c | get_charset_by_csname:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdx, %rcx
movl %esi, %edx
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0xb8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x1249(%rip), %rax # 0x27ace
movq %rax, 0x80(%rdi)
leaq -0x1248(%rip), %rax # 0x27add
movq %rax, 0x88(%rdi)
leaq -0x123b(%rip), %rax # 0x27af8
movq %rax, 0x90(%rdi)
leaq -0x2713(%rip), %rax # 0x2662e
movq %rax, 0x98(%rdi)
leaq 0x2c5ad9(%rip), %rax # 0x2ee828
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x124a(%rip), %rax # 0x27b16
movq %rax, 0xa8(%rdi)
callq 0x28c10
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x28d84
addq $0xc0, %rsp
popq %rbp
retq
callq 0x242e0
| get_charset_by_csname:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rcx, rdx
mov edx, esi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, [rbp+var_B8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
call my_charset_get_by_name
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_28D84
add rsp, 0C0h
pop rbp
retn
loc_28D84:
call ___stack_chk_fail
| long long get_charset_by_csname(long long a1, unsigned int a2, long long a3)
{
_BYTE v4[128]; // [rsp+8h] [rbp-B8h] BYREF
long long ( *v5)(long long); // [rsp+88h] [rbp-38h]
long long ( *v6)(unsigned long long); // [rsp+90h] [rbp-30h]
long long ( *v7)(long long, unsigned long long); // [rsp+98h] [rbp-28h]
long long ( *v8)(long long); // [rsp+A0h] [rbp-20h]
long long ( *v9)(); // [rsp+A8h] [rbp-18h]
long long ( *v10)(unsigned int *); // [rsp+B0h] [rbp-10h]
unsigned long long v11; // [rsp+B8h] [rbp-8h]
v11 = __readfsqword(0x28u);
v4[0] = 0;
v5 = my_once_alloc_c;
v6 = my_malloc_c;
v7 = my_realloc_c;
v8 = my_free;
v9 = my_charset_error_reporter;
v10 = add_collation;
return my_charset_get_by_name((long long)v4, a1, a2, a3);
}
| get_charset_by_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RCX,RDX
MOV EDX,ESI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0xb8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x127ace]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x127add]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x127af8]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12662e]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3ee828]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x127b16]
MOV qword ptr [RDI + 0xa8],RAX
CALL 0x00128c10
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x00128d84
ADD RSP,0xc0
POP RBP
RET
LAB_00128d84:
CALL 0x001242e0
|
void get_charset_by_csname(int8 param_1,int4 param_2,int8 param_3)
{
long in_FS_OFFSET;
int1 local_c0 [128];
code *local_40;
code *local_38;
code *local_30;
code *local_28;
int *local_20;
code *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_c0[0] = 0;
local_40 = my_once_alloc_c;
local_38 = my_malloc_c;
local_30 = my_realloc_c;
local_28 = my_free;
local_20 = my_charset_error_reporter;
local_18 = add_collation;
my_charset_get_by_name(local_c0,param_1,param_2,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,169 | YogaTest_text_stretch_width_Test::TestBody() | yoga-mod/tests/generated/YGIntrinsicSizeTest.cpp | TEST(YogaTest, text_stretch_width) {
GTEST_SKIP();
YGConfigRef config = YGConfigNew();
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 200);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetWidthStretch(root_child0);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
YGNodeInsertChild(root_child0, root_child0_child0, 0);
YGNodeSetContext(root_child0_child0, (void*)"Lorem ipsum dolor sit amet");
YGNodeSetMeasureFunc(root_child0_child0, &facebook::yoga::test::IntrinsicSizeMeasure);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child0_child0));
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0));
ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child0_child0));
YGNodeFreeRecursive(root);
YGConfigFree(config);
} | O0 | cpp | YogaTest_text_stretch_width_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x4e0ec0
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x354d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN32YogaTest_text_stretch_width_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN32YogaTest_text_stretch_width_TestD2Ev; YogaTest_text_stretch_width_Test::~YogaTest_text_stretch_width_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void YogaTest_text_stretch_width_Test::~YogaTest_text_stretch_width_Test(
YogaTest_text_stretch_width_Test *this)
{
YogaTest_text_stretch_width_Test::~YogaTest_text_stretch_width_Test(this);
operator delete(this, 0x10uLL);
}
| TestFactoryImpl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00192fb0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x9679e0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* testing::internal::TestFactoryImpl<YogaTest_flex_direction_row_reverse_pos_left_Test>::TestFactoryImpl()
*/
void __thiscall
testing::internal::TestFactoryImpl<YogaTest_flex_direction_row_reverse_pos_left_Test>::
TestFactoryImpl(TestFactoryImpl<YogaTest_flex_direction_row_reverse_pos_left_Test> *this)
{
TestFactoryBase::TestFactoryBase((TestFactoryBase *)this);
*(int ***)this = &PTR__TestFactoryImpl_009679f0;
return;
}
|
|
4,170 | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&) | untodesu[P]voxelius/game/client/outline.cc | void outline::cube(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color)
{
auto patch_cpos = cpos - camera::position_chunk;
glLineWidth(thickness);
glUniform3fv(program.uniforms[u_worldpos].location, 1, glm::value_ptr(coord::to_fvec3(patch_cpos, fpos)));
glUniform4fv(program.uniforms[u_modulate].location, 1, glm::value_ptr(color));
glUniform3fv(program.uniforms[u_scale].location, 1, glm::value_ptr(size));
glBindBuffer(GL_ARRAY_BUFFER, cube_vbo);
glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr);
glDrawArrays(GL_LINES, 0, 24);
} | O0 | cpp | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x42508d(%rip), %rsi # 0x50d8f8
callq 0x69aa0
movl %edx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x42944c(%rip), %rax # 0x511cd8
movq (%rax), %rax
movss -0x1c(%rbp), %xmm0
callq *%rax
leaq 0x429683(%rip), %rax # 0x511f20
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq 0x425e22(%rip), %rsi # 0x50e6d0
leaq 0x425df3(%rip), %rdi # 0x50e6a8
callq 0x827f0
movl 0x20(%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xe8bc0
movss %xmm1, -0x60(%rbp)
movlpd %xmm0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x54(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq -0x54(%rbp), %rdi
callq 0x82b50
movl -0x94(%rbp), %edi
movq %rax, %rdx
movq -0x90(%rbp), %rax
movl $0x1, %esi
callq *%rax
leaq 0x429641(%rip), %rax # 0x511f50
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq 0x425dc3(%rip), %rsi # 0x50e6e0
leaq 0x425ce4(%rip), %rdi # 0x50e608
addq $0xa0, %rdi
callq 0x827f0
movl 0x20(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x28(%rbp), %rdi
callq 0xe8c40
movl -0x84(%rbp), %edi
movq %rax, %rdx
movq -0x80(%rbp), %rax
movl $0x1, %esi
callq *%rax
leaq 0x4295c3(%rip), %rax # 0x511f20
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq 0x425d7d(%rip), %rsi # 0x50e6e8
leaq 0x425c96(%rip), %rdi # 0x50e608
addq $0xa0, %rdi
callq 0x827f0
movl 0x20(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rdi
callq 0x82b50
movl -0x74(%rbp), %edi
movq %rax, %rdx
movq -0x70(%rbp), %rax
movl $0x1, %esi
callq *%rax
leaq 0x428d7b(%rip), %rax # 0x511720
movq (%rax), %rax
movl 0x425d42(%rip), %esi # 0x50e6f0
movl $0x8892, %edi # imm = 0x8892
callq *%rax
xorl %ecx, %ecx
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x42981d(%rip), %rax # 0x5121f0
movl %ecx, %edi
callq *(%rax)
movl $0x1, %edi
xorl %esi, %esi
movl $0x18, %edx
leaq 0x428f4e(%rip), %rax # 0x511938
callq *(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN7outline4cubeERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEES8_fRKNS1_ILi4EfLS2_0EEE:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
movss [rbp+var_1C], xmm0
mov [rbp+var_28], rcx
mov rdi, [rbp+var_8]
lea rsi, _ZN6camera14position_chunkE; camera::position_chunk
call _ZN3glmmiIiLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_; glm::operator-<int,(glm::qualifier)0>(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,int,(glm::qualifier)0> const&)
mov [rbp+var_40], edx
mov [rbp+var_48], rax
mov eax, [rbp+var_40]
mov [rbp+var_30], eax
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
lea rax, glad_glLineWidth
mov rax, [rax]
movss xmm0, [rbp+var_1C]
call rax
lea rax, glad_glUniform3fv
mov rax, [rax]
mov [rbp+var_90], rax
mov rsi, cs:_ZL10u_worldpos; u_worldpos
lea rdi, qword_50E6A8
call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong)
mov eax, [rax+20h]
mov [rbp+var_94], eax
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_38]
call _ZN5coord8to_fvec3ERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEE; coord::to_fvec3(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,float,(glm::qualifier)0> const&)
movss [rbp+var_60], xmm1
movlpd [rbp+var_68], xmm0
mov rax, [rbp+var_68]
mov [rbp+var_54], rax
mov eax, [rbp+var_60]
mov [rbp+var_4C], eax
lea rdi, [rbp+var_54]
call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi3ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<3,float,(glm::qualifier)0> const&)
mov edi, [rbp+var_94]
mov rdx, rax
mov rax, [rbp+var_90]
mov esi, 1
call rax
lea rax, glad_glUniform4fv
mov rax, [rax]
mov [rbp+var_80], rax
mov rsi, cs:_ZL10u_modulate; u_modulate
lea rdi, _ZL7program; program
add rdi, 0A0h
call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong)
mov eax, [rax+20h]
mov [rbp+var_84], eax
mov rdi, [rbp+var_28]
call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi4ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<4,float,(glm::qualifier)0> const&)
mov edi, [rbp+var_84]
mov rdx, rax
mov rax, [rbp+var_80]
mov esi, 1
call rax
lea rax, glad_glUniform3fv
mov rax, [rax]
mov [rbp+var_70], rax
mov rsi, cs:_ZL7u_scale; u_scale
lea rdi, _ZL7program; program
add rdi, 0A0h
call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong)
mov eax, [rax+20h]
mov [rbp+var_74], eax
mov rdi, [rbp+var_18]
call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi3ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<3,float,(glm::qualifier)0> const&)
mov edi, [rbp+var_74]
mov rdx, rax
mov rax, [rbp+var_70]
mov esi, 1
call rax
lea rax, glad_glBindBuffer
mov rax, [rax]
mov esi, cs:_ZL8cube_vbo; cube_vbo
mov edi, 8892h
call rax
xor ecx, ecx
mov esi, 3
mov edx, 1406h
mov r8d, 0Ch
xor eax, eax
mov r9d, eax
lea rax, glad_glVertexAttribPointer
mov edi, ecx
call qword ptr [rax]
mov edi, 1
xor esi, esi
mov edx, 18h
lea rax, glad_glDrawArrays
call qword ptr [rax]
add rsp, 0A0h
pop rbp
retn
| long long outline::cube(_DWORD *a1, long long a2, long long a3, long long a4, float a5, float a6)
{
long long v6; // rax
int v7; // edx
long long v8; // rax
long long v9; // rax
long long v10; // rax
unsigned int v12; // [rsp+Ch] [rbp-94h]
void ( *v13)(_QWORD, long long, long long); // [rsp+10h] [rbp-90h]
unsigned int v14; // [rsp+1Ch] [rbp-84h]
void ( *v15)(_QWORD, long long, long long); // [rsp+20h] [rbp-80h]
unsigned int v16; // [rsp+2Ch] [rbp-74h]
void ( *v17)(_QWORD, long long, long long); // [rsp+30h] [rbp-70h]
double v18; // [rsp+4Ch] [rbp-54h] BYREF
float v19; // [rsp+54h] [rbp-4Ch]
long long v20; // [rsp+58h] [rbp-48h]
int v21; // [rsp+60h] [rbp-40h]
long long v22; // [rsp+68h] [rbp-38h] BYREF
int v23; // [rsp+70h] [rbp-30h]
long long v24; // [rsp+78h] [rbp-28h]
float v25; // [rsp+84h] [rbp-1Ch]
long long v26; // [rsp+88h] [rbp-18h]
long long v27; // [rsp+90h] [rbp-10h]
_DWORD *v28; // [rsp+98h] [rbp-8h]
v28 = a1;
v27 = a2;
v26 = a3;
v25 = a5;
v24 = a4;
v6 = glm::operator-<int,(glm::qualifier)0>(a1, &camera::position_chunk);
v21 = v7;
v20 = v6;
v23 = v7;
v22 = v6;
glad_glLineWidth(a5);
v13 = (void ( *)(_QWORD, long long, long long))glad_glUniform3fv;
v12 = *(_DWORD *)(std::vector<GL_Uniform>::operator[](qword_50E6A8, u_worldpos) + 32);
v18 = coord::to_fvec3(&v22, a2);
v19 = a6;
v8 = glm::value_ptr<float,(glm::qualifier)0>((long long)&v18);
v13(v12, 1LL, v8);
v15 = (void ( *)(_QWORD, long long, long long))glad_glUniform4fv;
v14 = *(_DWORD *)(std::vector<GL_Uniform>::operator[]((_QWORD *)&program + 20, u_modulate) + 32);
v9 = glm::value_ptr<float,(glm::qualifier)0>(v24);
v15(v14, 1LL, v9);
v17 = (void ( *)(_QWORD, long long, long long))glad_glUniform3fv;
v16 = *(_DWORD *)(std::vector<GL_Uniform>::operator[]((_QWORD *)&program + 20, u_scale) + 32);
v10 = glm::value_ptr<float,(glm::qualifier)0>(v26);
v17(v16, 1LL, v10);
glad_glBindBuffer(34962LL, (unsigned int)cube_vbo);
glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL);
return glad_glDrawArrays(1LL, 0LL, 24LL);
}
| cube:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOVSS dword ptr [RBP + -0x1c],XMM0
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x60d8f8]
CALL 0x00169aa0
MOV dword ptr [RBP + -0x40],EDX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x611cd8]
MOV RAX,qword ptr [RAX]
MOVSS XMM0,dword ptr [RBP + -0x1c]
CALL RAX
LEA RAX,[0x611f20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RSI,qword ptr [0x0060e6d0]
LEA RDI,[0x60e6a8]
CALL 0x001827f0
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x94],EAX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x38]
CALL 0x001e8bc0
MOVSS dword ptr [RBP + -0x60],XMM1
MOVLPD qword ptr [RBP + -0x68],XMM0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x54],RAX
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4c],EAX
LEA RDI,[RBP + -0x54]
CALL 0x00182b50
MOV EDI,dword ptr [RBP + -0x94]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV ESI,0x1
CALL RAX
LEA RAX,[0x611f50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
MOV RSI,qword ptr [0x0060e6e0]
LEA RDI,[0x60e608]
ADD RDI,0xa0
CALL 0x001827f0
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x84],EAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001e8c40
MOV EDI,dword ptr [RBP + -0x84]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ESI,0x1
CALL RAX
LEA RAX,[0x611f20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RAX
MOV RSI,qword ptr [0x0060e6e8]
LEA RDI,[0x60e608]
ADD RDI,0xa0
CALL 0x001827f0
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x74],EAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00182b50
MOV EDI,dword ptr [RBP + -0x74]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,0x1
CALL RAX
LEA RAX,[0x611720]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [0x0060e6f0]
MOV EDI,0x8892
CALL RAX
XOR ECX,ECX
MOV ESI,0x3
MOV EDX,0x1406
MOV R8D,0xc
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x6121f0]
MOV EDI,ECX
CALL qword ptr [RAX]
MOV EDI,0x1
XOR ESI,ESI
MOV EDX,0x18
LEA RAX,[0x611938]
CALL qword ptr [RAX]
ADD RSP,0xa0
POP RBP
RET
|
/* outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0>
const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float,
(glm::qualifier)0> const&) */
void __thiscall
outline::cube(outline *this,vec *param_1,vec *param_2,vec *param_3,float param_4,vec *param_5)
{
int4 uVar1;
code *pcVar2;
long lVar3;
float *pfVar4;
int8 local_5c;
int1 local_50 [12];
vec local_40 [16];
vec *local_30;
float local_24;
vec *local_20;
vec *local_18;
outline *local_10;
local_30 = param_3;
local_24 = param_4;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
local_50 = glm::operator-((vec *)this,(vec *)camera::position_chunk);
local_40._0_12_ = local_50;
(*glad_glLineWidth)(local_24);
pcVar2 = glad_glUniform3fv;
lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[]
((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_worldpos);
uVar1 = *(int4 *)(lVar3 + 0x20);
local_5c = coord::to_fvec3(local_40,local_18);
pfVar4 = glm::value_ptr<float,(glm::qualifier)0>((vec *)&local_5c);
(*pcVar2)(uVar1,1,pfVar4);
pcVar2 = glad_glUniform4fv;
lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[]
((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_modulate);
uVar1 = *(int4 *)(lVar3 + 0x20);
pfVar4 = glm::value_ptr<float,(glm::qualifier)0>(local_30);
(*pcVar2)(uVar1,1,pfVar4);
pcVar2 = glad_glUniform3fv;
lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[]
((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_scale);
uVar1 = *(int4 *)(lVar3 + 0x20);
pfVar4 = glm::value_ptr<float,(glm::qualifier)0>(local_20);
(*pcVar2)(uVar1,1,pfVar4);
(*glad_glBindBuffer)(0x8892,cube_vbo);
(*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0);
(*glad_glDrawArrays)(1,0,0x18);
return;
}
|
|
4,171 | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&) | untodesu[P]voxelius/game/client/outline.cc | void outline::cube(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color)
{
auto patch_cpos = cpos - camera::position_chunk;
glLineWidth(thickness);
glUniform3fv(program.uniforms[u_worldpos].location, 1, glm::value_ptr(coord::to_fvec3(patch_cpos, fpos)));
glUniform4fv(program.uniforms[u_modulate].location, 1, glm::value_ptr(color));
glUniform3fv(program.uniforms[u_scale].location, 1, glm::value_ptr(size));
glBindBuffer(GL_ARRAY_BUFFER, cube_vbo);
glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr);
glDrawArrays(GL_LINES, 0, 24);
} | O1 | cpp | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x204ae5(%rip), %rax # 0x25d6b8
movl (%rdi), %r12d
movl 0x4(%rdi), %r13d
subl (%rax), %r12d
subl 0x4(%rax), %r13d
movl 0x8(%rdi), %ebp
subl 0x8(%rax), %ebp
leaq 0x208eaa(%rip), %rax # 0x261a98
callq *(%rax)
shll $0x4, %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
leaq 0x2090dd(%rip), %r12 # 0x261ce0
movq (%r12), %rax
addss (%r15), %xmm0
shll $0x4, %r13d
cvtsi2ss %r13d, %xmm1
movq 0x205874(%rip), %rcx # 0x25e490
addss 0x4(%r15), %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
shll $0x4, %ebp
xorps %xmm1, %xmm1
cvtsi2ss %ebp, %xmm1
movq 0x205832(%rip), %rdx # 0x25e468
leaq (%rcx,%rcx,4), %rcx
addss 0x8(%r15), %xmm1
movl 0x20(%rdx,%rcx,8), %edi
leaq 0x8(%rsp), %rdx
movlps %xmm0, (%rdx)
movss %xmm1, 0x8(%rdx)
movl $0x1, %esi
callq *%rax
leaq 0x2090b1(%rip), %rax # 0x261d10
movq 0x20583a(%rip), %rcx # 0x25e4a0
movq 0x2057fb(%rip), %rdx # 0x25e468
leaq (%rcx,%rcx,4), %rcx
movl 0x20(%rdx,%rcx,8), %edi
movl $0x1, %esi
movq %r14, %rdx
callq *(%rax)
movq 0x205822(%rip), %rax # 0x25e4a8
movq 0x2057db(%rip), %rcx # 0x25e468
leaq (%rax,%rax,4), %rax
movl 0x20(%rcx,%rax,8), %edi
movl $0x1, %esi
movq %rbx, %rdx
callq *(%r12)
leaq 0x208838(%rip), %rax # 0x2614e0
movl 0x205802(%rip), %esi # 0x25e4b0
movl $0x8892, %edi # imm = 0x8892
callq *(%rax)
leaq 0x2092f4(%rip), %rax # 0x261fb0
xorl %edi, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0xc, %r8d
xorl %r9d, %r9d
callq *(%rax)
leaq 0x208a1c(%rip), %rax # 0x2616f8
movl $0x1, %edi
xorl %esi, %esi
movl $0x18, %edx
callq *(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7outline4cubeERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEES8_fRKNS1_ILi4EfLS2_0EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rcx
mov rbx, rdx
mov r15, rsi
lea rax, _ZN6camera14position_chunkE; camera::position_chunk
mov r12d, [rdi]
mov r13d, [rdi+4]
sub r12d, [rax]
sub r13d, [rax+4]
mov ebp, [rdi+8]
sub ebp, [rax+8]
lea rax, glad_glLineWidth
call qword ptr [rax]
shl r12d, 4
xorps xmm0, xmm0
cvtsi2ss xmm0, r12d
lea r12, glad_glUniform3fv
mov rax, [r12]
addss xmm0, dword ptr [r15]
shl r13d, 4
cvtsi2ss xmm1, r13d
mov rcx, cs:_ZL10u_worldpos; u_worldpos
addss xmm1, dword ptr [r15+4]
unpcklps xmm0, xmm1
shl ebp, 4
xorps xmm1, xmm1
cvtsi2ss xmm1, ebp
mov rdx, qword ptr cs:xmmword_25E468
lea rcx, [rcx+rcx*4]
addss xmm1, dword ptr [r15+8]
mov edi, [rdx+rcx*8+20h]
lea rdx, [rsp+48h+var_40]
movlps qword ptr [rdx], xmm0
movss dword ptr [rdx+8], xmm1
mov esi, 1
call rax
lea rax, glad_glUniform4fv
mov rcx, cs:_ZL10u_modulate; u_modulate
mov rdx, qword ptr cs:xmmword_25E468
lea rcx, [rcx+rcx*4]
mov edi, [rdx+rcx*8+20h]
mov esi, 1
mov rdx, r14
call qword ptr [rax]
mov rax, cs:_ZL7u_scale; u_scale
mov rcx, qword ptr cs:xmmword_25E468
lea rax, [rax+rax*4]
mov edi, [rcx+rax*8+20h]
mov esi, 1
mov rdx, rbx
call qword ptr [r12]
lea rax, glad_glBindBuffer
mov esi, cs:_ZL8cube_vbo; cube_vbo
mov edi, 8892h
call qword ptr [rax]
lea rax, glad_glVertexAttribPointer
xor edi, edi
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 0Ch
xor r9d, r9d
call qword ptr [rax]
lea rax, glad_glDrawArrays
mov edi, 1
xor esi, esi
mov edx, 18h
call qword ptr [rax]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long outline::cube(_DWORD *a1, float *a2, long long a3, long long a4, float a5, __m128 a6)
{
int v8; // r12d
int v9; // r13d
int v10; // ebp
__m128 v11; // xmm0
void ( *v12)(long long, long long); // rax
__m128 v13; // xmm0
float v14; // xmm1_4
long long v15; // rdi
double v17; // [rsp+8h] [rbp-40h] BYREF
float v18; // [rsp+10h] [rbp-38h]
v8 = *a1 - camera::position_chunk;
v9 = a1[1] - HIDWORD(camera::position_chunk);
v10 = a1[2] - *((_DWORD *)&camera::position_chunk + 2);
glad_glLineWidth(a5);
v11 = 0LL;
v12 = (void ( *)(long long, long long))glad_glUniform3fv;
v11.m128_f32[0] = (float)(16 * v8) + *a2;
a6.m128_f32[0] = (float)(16 * v9) + a2[1];
v13 = _mm_unpacklo_ps(v11, a6);
v14 = (float)(16 * v10) + a2[2];
v15 = *(unsigned int *)(xmmword_25E468 + 40 * u_worldpos + 32);
_mm_storel_ps(&v17, v13);
v18 = v14;
v12(v15, 1LL);
glad_glUniform4fv(*(unsigned int *)(xmmword_25E468 + 40 * u_modulate + 32), 1LL, a4);
glad_glUniform3fv(*(unsigned int *)(xmmword_25E468 + 40 * u_scale + 32), 1LL, a3);
glad_glBindBuffer(34962LL, (unsigned int)cube_vbo);
glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL);
return glad_glDrawArrays(1LL, 0LL, 24LL);
}
| cube:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RCX
MOV RBX,RDX
MOV R15,RSI
LEA RAX,[0x35d6b8]
MOV R12D,dword ptr [RDI]
MOV R13D,dword ptr [RDI + 0x4]
SUB R12D,dword ptr [RAX]
SUB R13D,dword ptr [RAX + 0x4]
MOV EBP,dword ptr [RDI + 0x8]
SUB EBP,dword ptr [RAX + 0x8]
LEA RAX,[0x361a98]
CALL qword ptr [RAX]
SHL R12D,0x4
XORPS XMM0,XMM0
CVTSI2SS XMM0,R12D
LEA R12,[0x361ce0]
MOV RAX,qword ptr [R12]
ADDSS XMM0,dword ptr [R15]
SHL R13D,0x4
CVTSI2SS XMM1,R13D
MOV RCX,qword ptr [0x0035e490]
ADDSS XMM1,dword ptr [R15 + 0x4]
UNPCKLPS XMM0,XMM1
SHL EBP,0x4
XORPS XMM1,XMM1
CVTSI2SS XMM1,EBP
MOV RDX,qword ptr [0x0035e468]
LEA RCX,[RCX + RCX*0x4]
ADDSS XMM1,dword ptr [R15 + 0x8]
MOV EDI,dword ptr [RDX + RCX*0x8 + 0x20]
LEA RDX,[RSP + 0x8]
MOVLPS qword ptr [RDX],XMM0
MOVSS dword ptr [RDX + 0x8],XMM1
MOV ESI,0x1
CALL RAX
LEA RAX,[0x361d10]
MOV RCX,qword ptr [0x0035e4a0]
MOV RDX,qword ptr [0x0035e468]
LEA RCX,[RCX + RCX*0x4]
MOV EDI,dword ptr [RDX + RCX*0x8 + 0x20]
MOV ESI,0x1
MOV RDX,R14
CALL qword ptr [RAX]
MOV RAX,qword ptr [0x0035e4a8]
MOV RCX,qword ptr [0x0035e468]
LEA RAX,[RAX + RAX*0x4]
MOV EDI,dword ptr [RCX + RAX*0x8 + 0x20]
MOV ESI,0x1
MOV RDX,RBX
CALL qword ptr [R12]
LEA RAX,[0x3614e0]
MOV ESI,dword ptr [0x0035e4b0]
MOV EDI,0x8892
CALL qword ptr [RAX]
LEA RAX,[0x361fb0]
XOR EDI,EDI
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0xc
XOR R9D,R9D
CALL qword ptr [RAX]
LEA RAX,[0x3616f8]
MOV EDI,0x1
XOR ESI,ESI
MOV EDX,0x18
CALL qword ptr [RAX]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0>
const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float,
(glm::qualifier)0> const&) */
void outline::cube(vec *param_1,vec *param_2,vec *param_3,float param_4,vec *param_5)
{
(*glad_glLineWidth)();
(*glad_glUniform3fv)(*(int4 *)(program._160_8_ + 0x20 + u_worldpos * 0x28),1);
(*glad_glUniform4fv)(*(int4 *)(program._160_8_ + 0x20 + u_modulate * 0x28),1,param_5);
(*glad_glUniform3fv)(*(int4 *)(program._160_8_ + 0x20 + u_scale * 0x28),1,param_3);
(*glad_glBindBuffer)(0x8892,cube_vbo);
(*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0);
(*glad_glDrawArrays)(1,0,0x18);
return;
}
|
|
4,172 | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&) | untodesu[P]voxelius/game/client/outline.cc | void outline::cube(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color)
{
auto patch_cpos = cpos - camera::position_chunk;
glLineWidth(thickness);
glUniform3fv(program.uniforms[u_worldpos].location, 1, glm::value_ptr(coord::to_fvec3(patch_cpos, fpos)));
glUniform4fv(program.uniforms[u_modulate].location, 1, glm::value_ptr(color));
glUniform3fv(program.uniforms[u_scale].location, 1, glm::value_ptr(size));
glBindBuffer(GL_ARRAY_BUFFER, cube_vbo);
glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr);
glDrawArrays(GL_LINES, 0, 24);
} | O2 | cpp | outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movss %xmm0, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
leaq 0x1ffddd(%rip), %rsi # 0x254718
callq 0x37535
leaq 0x28(%rsp), %r12
movq %rax, (%r12)
movl %edx, 0x8(%r12)
leaq 0x2041a3(%rip), %rax # 0x258af8
movss 0xc(%rsp), %xmm0
callq *(%rax)
leaq 0x2043dc(%rip), %rax # 0x258d40
movq (%rax), %rbx
movq 0x200b5a(%rip), %rax # 0x2554c8
imulq $0x28, 0x200b7a(%rip), %rcx # 0x2554f0
movl 0x20(%rax,%rcx), %r13d
movq %r12, %rdi
movq %r15, %rsi
callq 0x54b4b
leaq 0x18(%rsp), %rdx
movlps %xmm0, (%rdx)
movss %xmm1, 0x8(%rdx)
pushq $0x1
popq %rbp
movl %r13d, %edi
movl %ebp, %esi
callq *%rbx
leaq 0x2043cc(%rip), %rax # 0x258d70
movq 0x200b1d(%rip), %rcx # 0x2554c8
imulq $0x28, 0x200b4d(%rip), %rdx # 0x255500
movl 0x20(%rcx,%rdx), %edi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rax)
movq 0x200b03(%rip), %rax # 0x2554c8
imulq $0x28, 0x200b3b(%rip), %rcx # 0x255508
movl 0x20(%rax,%rcx), %edi
movl %ebp, %esi
movq 0x10(%rsp), %rdx
leaq 0x204361(%rip), %rax # 0x258d40
callq *(%rax)
leaq 0x203b58(%rip), %rax # 0x258540
movl 0x200b22(%rip), %esi # 0x255510
movl $0x8892, %edi # imm = 0x8892
callq *(%rax)
leaq 0x204614(%rip), %rax # 0x259010
pushq $0x3
popq %rsi
pushq $0xc
popq %r8
xorl %edi, %edi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
xorl %r9d, %r9d
callq *(%rax)
leaq 0x203d40(%rip), %rax # 0x258758
pushq $0x18
popq %rdx
movl %ebp, %edi
xorl %esi, %esi
callq *(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7outline4cubeERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEES8_fRKNS1_ILi4EfLS2_0EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rcx
movss [rsp+68h+var_5C], xmm0
mov [rsp+68h+var_58], rdx
mov r15, rsi
lea rsi, _ZN6camera14position_chunkE; camera::position_chunk
call _ZN3glmmiIiLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_; glm::operator-<int,(glm::qualifier)0>(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,int,(glm::qualifier)0> const&)
lea r12, [rsp+68h+var_40]
mov [r12], rax
mov [r12+8], edx
lea rax, glad_glLineWidth
movss xmm0, [rsp+68h+var_5C]
call qword ptr [rax]
lea rax, glad_glUniform3fv
mov rbx, [rax]
mov rax, qword ptr cs:xmmword_2554C8
imul rcx, cs:_ZL10u_worldpos, 28h ; '('; u_worldpos
mov r13d, [rax+rcx+20h]
mov rdi, r12
mov rsi, r15
call _ZN5coord8to_fvec3ERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEE; coord::to_fvec3(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,float,(glm::qualifier)0> const&)
lea rdx, [rsp+68h+var_50]
movlps qword ptr [rdx], xmm0
movss dword ptr [rdx+8], xmm1
push 1
pop rbp
mov edi, r13d
mov esi, ebp
call rbx
lea rax, glad_glUniform4fv
mov rcx, qword ptr cs:xmmword_2554C8
imul rdx, cs:_ZL10u_modulate, 28h ; '('; u_modulate
mov edi, [rcx+rdx+20h]
mov esi, ebp
mov rdx, r14
call qword ptr [rax]
mov rax, qword ptr cs:xmmword_2554C8
imul rcx, cs:_ZL7u_scale, 28h ; '('; u_scale
mov edi, [rax+rcx+20h]
mov esi, ebp
mov rdx, [rsp+68h+var_58]
lea rax, glad_glUniform3fv
call qword ptr [rax]
lea rax, glad_glBindBuffer
mov esi, cs:_ZL8cube_vbo; cube_vbo
mov edi, 8892h
call qword ptr [rax]
lea rax, glad_glVertexAttribPointer
push 3
pop rsi
push 0Ch
pop r8
xor edi, edi
mov edx, 1406h
xor ecx, ecx
xor r9d, r9d
call qword ptr [rax]
lea rax, glad_glDrawArrays
push 18h
pop rdx
mov edi, ebp
xor esi, esi
call qword ptr [rax]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long outline::cube(_DWORD *a1, long long a2, long long a3, long long a4, __m128 a5, float a6)
{
int v7; // edx
void ( *v8)(_QWORD, long long); // rbx
unsigned int v9; // r13d
long long v10; // rdx
double v13; // [rsp+18h] [rbp-50h] BYREF
float v14; // [rsp+20h] [rbp-48h]
unsigned long long v15; // [rsp+28h] [rbp-40h] BYREF
int v16; // [rsp+30h] [rbp-38h]
v15 = glm::operator-<int,(glm::qualifier)0>(a1, &camera::position_chunk);
v16 = v7;
a5 = (__m128)a5.m128_u32[0];
glad_glLineWidth(a5.m128_f32[0]);
v8 = (void ( *)(_QWORD, long long))glad_glUniform3fv;
v9 = *(_DWORD *)(xmmword_2554C8 + 40 * u_worldpos + 32);
*(double *)a5.m128_u64 = coord::to_fvec3(&v15, a2);
_mm_storel_ps(&v13, a5);
v14 = a6;
v8(v9, 1LL);
glad_glUniform4fv(*(unsigned int *)(xmmword_2554C8 + 40 * u_modulate + 32), 1LL, a4);
glad_glUniform3fv(*(unsigned int *)(xmmword_2554C8 + 40 * u_scale + 32), 1LL, a3);
glad_glBindBuffer(34962LL, (unsigned int)cube_vbo, v10);
glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL);
return glad_glDrawArrays(1LL, 0LL, 24LL);
}
| cube:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RCX
MOVSS dword ptr [RSP + 0xc],XMM0
MOV qword ptr [RSP + 0x10],RDX
MOV R15,RSI
LEA RSI,[0x354718]
CALL 0x00137535
LEA R12,[RSP + 0x28]
MOV qword ptr [R12],RAX
MOV dword ptr [R12 + 0x8],EDX
LEA RAX,[0x358af8]
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL qword ptr [RAX]
LEA RAX,[0x358d40]
MOV RBX,qword ptr [RAX]
MOV RAX,qword ptr [0x003554c8]
IMUL RCX,qword ptr [0x003554f0],0x28
MOV R13D,dword ptr [RAX + RCX*0x1 + 0x20]
MOV RDI,R12
MOV RSI,R15
CALL 0x00154b4b
LEA RDX,[RSP + 0x18]
MOVLPS qword ptr [RDX],XMM0
MOVSS dword ptr [RDX + 0x8],XMM1
PUSH 0x1
POP RBP
MOV EDI,R13D
MOV ESI,EBP
CALL RBX
LEA RAX,[0x358d70]
MOV RCX,qword ptr [0x003554c8]
IMUL RDX,qword ptr [0x00355500],0x28
MOV EDI,dword ptr [RCX + RDX*0x1 + 0x20]
MOV ESI,EBP
MOV RDX,R14
CALL qword ptr [RAX]
MOV RAX,qword ptr [0x003554c8]
IMUL RCX,qword ptr [0x00355508],0x28
MOV EDI,dword ptr [RAX + RCX*0x1 + 0x20]
MOV ESI,EBP
MOV RDX,qword ptr [RSP + 0x10]
LEA RAX,[0x358d40]
CALL qword ptr [RAX]
LEA RAX,[0x358540]
MOV ESI,dword ptr [0x00355510]
MOV EDI,0x8892
CALL qword ptr [RAX]
LEA RAX,[0x359010]
PUSH 0x3
POP RSI
PUSH 0xc
POP R8
XOR EDI,EDI
MOV EDX,0x1406
XOR ECX,ECX
XOR R9D,R9D
CALL qword ptr [RAX]
LEA RAX,[0x358758]
PUSH 0x18
POP RDX
MOV EDI,EBP
XOR ESI,ESI
CALL qword ptr [RAX]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* outline::cube(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0>
const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float,
(glm::qualifier)0> const&) */
void outline::cube(vec_conflict *param_1,vec_conflict *param_2,vec_conflict *param_3,float param_4,
vec_conflict *param_5)
{
int4 uVar1;
code *pcVar2;
vec_conflict local_40 [16];
local_40._0_12_ = glm::operator-(param_1,(vec_conflict *)camera::position_chunk);
(*glad_glLineWidth)(param_4);
pcVar2 = glad_glUniform3fv;
uVar1 = *(int4 *)(program._160_8_ + 0x20 + u_worldpos * 0x28);
coord::to_fvec3(local_40,param_2);
(*pcVar2)(uVar1,1);
(*glad_glUniform4fv)(*(int4 *)(program._160_8_ + 0x20 + u_modulate * 0x28),1,param_5);
(*glad_glUniform3fv)(*(int4 *)(program._160_8_ + 0x20 + u_scale * 0x28),1,param_3);
(*glad_glBindBuffer)(0x8892,cube_vbo);
(*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0);
(*glad_glDrawArrays)(1,0,0x18);
return;
}
|
|
4,173 | mi_base_info_write | eloqsql/storage/myisam/mi_open.c | uint mi_base_info_write(File file, MI_BASE_INFO *base)
{
uchar buff[MI_BASE_INFO_SIZE], *ptr=buff;
mi_sizestore(ptr,base->keystart); ptr +=8;
mi_sizestore(ptr,base->max_data_file_length); ptr +=8;
mi_sizestore(ptr,base->max_key_file_length); ptr +=8;
mi_rowstore(ptr,base->records); ptr +=8;
mi_rowstore(ptr,base->reloc); ptr +=8;
mi_int4store(ptr,base->mean_row_length); ptr +=4;
mi_int4store(ptr,base->reclength); ptr +=4;
mi_int4store(ptr,base->pack_reclength); ptr +=4;
mi_int4store(ptr,base->min_pack_length); ptr +=4;
mi_int4store(ptr,base->max_pack_length); ptr +=4;
mi_int4store(ptr,base->min_block_length); ptr +=4;
mi_int4store(ptr,base->fields); ptr +=4;
mi_int4store(ptr,base->pack_fields); ptr +=4;
*ptr++=base->rec_reflength;
*ptr++=base->key_reflength;
*ptr++=base->keys;
*ptr++=base->auto_key;
mi_int2store(ptr,base->pack_bits); ptr +=2;
mi_int2store(ptr,base->blobs); ptr +=2;
mi_int2store(ptr,base->max_key_block_length); ptr +=2;
mi_int2store(ptr,base->max_key_length); ptr +=2;
mi_int2store(ptr,base->extra_alloc_bytes); ptr +=2;
*ptr++= base->extra_alloc_procent;
bzero(ptr,13); ptr +=13; /* extra */
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_base_info_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movl %edi, %ebx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq (%rsi), %rax
bswapq %rax
movq %rax, -0x80(%rbp)
movq 0x8(%rsi), %rax
bswapq %rax
movq %rax, -0x78(%rbp)
movq 0x10(%rsi), %rax
bswapq %rax
movq %rax, -0x70(%rbp)
movq 0x20(%rsi), %rax
bswapq %rax
movq %rax, -0x68(%rbp)
movq 0x28(%rsi), %rax
bswapq %rax
movq %rax, -0x60(%rbp)
movl 0x30(%rsi), %eax
bswapl %eax
movl %eax, -0x58(%rbp)
movl 0x38(%rsi), %eax
bswapl %eax
movl %eax, -0x54(%rbp)
movl 0x40(%rsi), %eax
bswapl %eax
movl %eax, -0x50(%rbp)
movl 0x48(%rsi), %eax
bswapl %eax
movl %eax, -0x4c(%rbp)
movl 0x50(%rsi), %eax
bswapl %eax
movl %eax, -0x48(%rbp)
movl 0x58(%rsi), %eax
bswapl %eax
movl %eax, -0x44(%rbp)
movl 0x60(%rsi), %eax
bswapl %eax
movl %eax, -0x40(%rbp)
movl 0x68(%rsi), %eax
bswapl %eax
movl %eax, -0x3c(%rbp)
movdqu 0x70(%rsi), %xmm0
pand 0x5ba7c(%rip), %xmm0 # 0x95040
packuswb %xmm0, %xmm0
packuswb %xmm0, %xmm0
movd %xmm0, -0x38(%rbp)
movzwl 0x84(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x34(%rbp)
movzwl 0x80(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x32(%rbp)
movzwl 0x88(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x30(%rbp)
movzwl 0x8c(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x2e(%rbp)
movzwl 0x90(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
movb 0x94(%rsi), %al
movb %al, -0x2a(%rbp)
xorl %eax, %eax
movq %rax, -0x29(%rbp)
movq %rax, -0x24(%rbp)
leaq 0x2fd292(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xd0(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3968f
leaq -0x80(%rbp), %rsi
movl $0x64, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2a3d1
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x396ac
movb %cl, %al
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x80(%rbp), %rdx
leaq -0x88(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x29481
movq (%r14), %rcx
jmp 0x3966a
callq 0x28430
| mi_base_info_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov ebx, edi
mov rax, fs:28h
mov [rbp+var_18], rax
mov rax, [rsi]
bswap rax
mov [rbp+var_80], rax
mov rax, [rsi+8]
bswap rax
mov [rbp+var_78], rax
mov rax, [rsi+10h]
bswap rax
mov [rbp+var_70], rax
mov rax, [rsi+20h]
bswap rax
mov [rbp+var_68], rax
mov rax, [rsi+28h]
bswap rax
mov [rbp+var_60], rax
mov eax, [rsi+30h]
bswap eax
mov [rbp+var_58], eax
mov eax, [rsi+38h]
bswap eax
mov [rbp+var_54], eax
mov eax, [rsi+40h]
bswap eax
mov [rbp+var_50], eax
mov eax, [rsi+48h]
bswap eax
mov [rbp+var_4C], eax
mov eax, [rsi+50h]
bswap eax
mov [rbp+var_48], eax
mov eax, [rsi+58h]
bswap eax
mov [rbp+var_44], eax
mov eax, [rsi+60h]
bswap eax
mov [rbp+var_40], eax
mov eax, [rsi+68h]
bswap eax
mov [rbp+var_3C], eax
movdqu xmm0, xmmword ptr [rsi+70h]
pand xmm0, cs:xmmword_95040
packuswb xmm0, xmm0
packuswb xmm0, xmm0
movd [rbp+var_38], xmm0
movzx eax, word ptr [rsi+84h]
rol ax, 8
mov [rbp+var_34], ax
movzx eax, word ptr [rsi+80h]
rol ax, 8
mov [rbp+var_32], ax
movzx eax, word ptr [rsi+88h]
rol ax, 8
mov [rbp+var_30], ax
movzx eax, word ptr [rsi+8Ch]
rol ax, 8
mov [rbp+var_2E], ax
movzx eax, word ptr [rsi+90h]
rol ax, 8
mov [rbp+var_2C], ax
mov al, [rsi+94h]
mov [rbp+var_2A], al
xor eax, eax
mov [rbp+var_29], rax
mov [rbp+var_29+5], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_D0]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3968F
lea rsi, [rbp+var_80]
mov edx, 64h ; 'd'
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_3966A:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_396AC
mov al, cl
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_3968F:
lea rdx, [rbp+var_80]
lea r14, [rbp+var_88]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_base_info_write_cold_1
mov rcx, [r14]
jmp short loc_3966A
loc_396AC:
call ___stack_chk_fail
| bool mi_base_info_write(unsigned int a1, const __m128i *a2)
{
__m128i v2; // xmm0
__m128i v3; // xmm0
long long v4; // rax
long long v5; // rcx
_BYTE v8[72]; // [rsp+0h] [rbp-D0h] BYREF
long long v9; // [rsp+48h] [rbp-88h] BYREF
_QWORD v10[5]; // [rsp+50h] [rbp-80h] BYREF
unsigned __int32 v11; // [rsp+78h] [rbp-58h]
unsigned __int32 v12; // [rsp+7Ch] [rbp-54h]
unsigned __int32 v13; // [rsp+80h] [rbp-50h]
unsigned __int32 v14; // [rsp+84h] [rbp-4Ch]
unsigned __int32 v15; // [rsp+88h] [rbp-48h]
unsigned __int32 v16; // [rsp+8Ch] [rbp-44h]
unsigned __int32 v17; // [rsp+90h] [rbp-40h]
unsigned __int32 v18; // [rsp+94h] [rbp-3Ch]
int v19; // [rsp+98h] [rbp-38h]
__int16 v20; // [rsp+9Ch] [rbp-34h]
__int16 v21; // [rsp+9Eh] [rbp-32h]
__int16 v22; // [rsp+A0h] [rbp-30h]
__int16 v23; // [rsp+A2h] [rbp-2Eh]
__int16 v24; // [rsp+A4h] [rbp-2Ch]
__int8 v25; // [rsp+A6h] [rbp-2Ah]
_QWORD v26[5]; // [rsp+A7h] [rbp-29h]
*(_QWORD *)((char *)&v26[2] + 1) = __readfsqword(0x28u);
v10[0] = _byteswap_uint64(a2->m128i_i64[0]);
v10[1] = _byteswap_uint64(a2->m128i_u64[1]);
v10[2] = _byteswap_uint64(a2[1].m128i_u64[0]);
v10[3] = _byteswap_uint64(a2[2].m128i_u64[0]);
v10[4] = _byteswap_uint64(a2[2].m128i_u64[1]);
v11 = _byteswap_ulong(a2[3].m128i_u32[0]);
v12 = _byteswap_ulong(a2[3].m128i_u32[2]);
v13 = _byteswap_ulong(a2[4].m128i_u32[0]);
v14 = _byteswap_ulong(a2[4].m128i_u32[2]);
v15 = _byteswap_ulong(a2[5].m128i_u32[0]);
v16 = _byteswap_ulong(a2[5].m128i_u32[2]);
v17 = _byteswap_ulong(a2[6].m128i_u32[0]);
v18 = _byteswap_ulong(a2[6].m128i_u32[2]);
v2 = _mm_and_si128(_mm_loadu_si128(a2 + 7), (__m128i)xmmword_95040);
v3 = _mm_packus_epi16(v2, v2);
v19 = _mm_cvtsi128_si32(_mm_packus_epi16(v3, v3));
v20 = __ROL2__(a2[8].m128i_i16[2], 8);
v21 = __ROL2__(a2[8].m128i_i16[0], 8);
v22 = __ROL2__(a2[8].m128i_i16[4], 8);
v23 = __ROL2__(a2[8].m128i_i16[6], 8);
v24 = __ROL2__(a2[9].m128i_i16[0], 8);
v25 = a2[9].m128i_i8[4];
v26[0] = 0LL;
*(_QWORD *)((char *)v26 + 5) = 0LL;
v4 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v8, a1, 7LL);
if ( v4 )
{
mi_base_info_write_cold_1(v4, a1, (long long)v10, &v9);
v5 = v9;
}
else
{
v5 = my_write(a1, (long long)v10, 100LL, 4LL);
}
return v5 != 0;
}
| mi_base_info_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV EBX,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RSI]
BSWAP RAX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RSI + 0x8]
BSWAP RAX
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RSI + 0x10]
BSWAP RAX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RSI + 0x20]
BSWAP RAX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RSI + 0x28]
BSWAP RAX
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RSI + 0x30]
BSWAP EAX
MOV dword ptr [RBP + -0x58],EAX
MOV EAX,dword ptr [RSI + 0x38]
BSWAP EAX
MOV dword ptr [RBP + -0x54],EAX
MOV EAX,dword ptr [RSI + 0x40]
BSWAP EAX
MOV dword ptr [RBP + -0x50],EAX
MOV EAX,dword ptr [RSI + 0x48]
BSWAP EAX
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RSI + 0x50]
BSWAP EAX
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RSI + 0x58]
BSWAP EAX
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RSI + 0x60]
BSWAP EAX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RSI + 0x68]
BSWAP EAX
MOV dword ptr [RBP + -0x3c],EAX
MOVDQU XMM0,xmmword ptr [RSI + 0x70]
PAND XMM0,xmmword ptr [0x00195040]
PACKUSWB XMM0,XMM0
PACKUSWB XMM0,XMM0
MOVD dword ptr [RBP + -0x38],XMM0
MOVZX EAX,word ptr [RSI + 0x84]
ROL AX,0x8
MOV word ptr [RBP + -0x34],AX
MOVZX EAX,word ptr [RSI + 0x80]
ROL AX,0x8
MOV word ptr [RBP + -0x32],AX
MOVZX EAX,word ptr [RSI + 0x88]
ROL AX,0x8
MOV word ptr [RBP + -0x30],AX
MOVZX EAX,word ptr [RSI + 0x8c]
ROL AX,0x8
MOV word ptr [RBP + -0x2e],AX
MOVZX EAX,word ptr [RSI + 0x90]
ROL AX,0x8
MOV word ptr [RBP + -0x2c],AX
MOV AL,byte ptr [RSI + 0x94]
MOV byte ptr [RBP + -0x2a],AL
XOR EAX,EAX
MOV qword ptr [RBP + -0x29],RAX
MOV qword ptr [RBP + -0x24],RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xd0]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013968f
LEA RSI,[RBP + -0x80]
MOV EDX,0x64
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012a3d1
MOV RCX,RAX
LAB_0013966a:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x001396ac
MOV AL,CL
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_0013968f:
LEA RDX,[RBP + -0x80]
LEA R14,[RBP + -0x88]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x00129481
MOV RCX,qword ptr [R14]
JMP 0x0013966a
LAB_001396ac:
CALL 0x00128430
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool mi_base_info_write(int4 param_1,ulong *param_2)
{
uint uVar1;
ulong uVar2;
char cVar3;
short sVar7;
short sVar8;
short sVar9;
long lVar10;
long in_FS_OFFSET;
ushort uVar11;
short sVar12;
ushort uVar15;
ushort uVar16;
ushort uVar17;
ushort uVar18;
ushort uVar19;
ushort uVar20;
ushort uVar21;
int1 local_d8 [72];
long local_90;
ulong local_88;
ulong local_80;
ulong local_78;
ulong local_70;
ulong local_68;
uint local_60;
uint local_5c;
uint local_58;
uint local_54;
uint local_50;
uint local_4c;
uint local_48;
uint local_44;
int4 local_40;
ushort local_3c;
ushort local_3a;
ushort local_38;
ushort local_36;
ushort local_34;
int1 local_32;
int5 local_31;
int3 uStack_2c;
int5 uStack_29;
long local_20;
char cVar4;
char cVar5;
char cVar6;
int4 uVar13;
int6 uVar14;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = *param_2;
local_88 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
uVar2 = param_2[1];
local_80 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
uVar2 = param_2[2];
local_78 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
uVar2 = param_2[4];
local_70 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
uVar2 = param_2[5];
local_68 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
uVar1 = (uint)param_2[6];
local_60 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[7];
local_5c = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[8];
local_58 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[9];
local_54 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[10];
local_50 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[0xb];
local_4c = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[0xc];
local_48 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar1 = (uint)param_2[0xd];
local_44 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar11 = (ushort)param_2[0xe] & _DAT_00195040;
uVar15 = *(ushort *)((long)param_2 + 0x72) & _UNK_00195042;
uVar16 = *(ushort *)((long)param_2 + 0x74) & _UNK_00195044;
uVar17 = *(ushort *)((long)param_2 + 0x76) & _UNK_00195046;
uVar18 = (ushort)param_2[0xf] & _UNK_00195048;
uVar19 = *(ushort *)((long)param_2 + 0x7a) & _UNK_0019504a;
uVar20 = *(ushort *)((long)param_2 + 0x7c) & _UNK_0019504c;
uVar21 = *(ushort *)((long)param_2 + 0x7e) & _UNK_0019504e;
cVar3 = (0 < (short)uVar11) * ((short)uVar11 < 0x100) * (char)uVar11 - (0xff < (short)uVar11);
sVar12 = CONCAT11((0 < (short)uVar15) * ((short)uVar15 < 0x100) * (char)uVar15 -
(0xff < (short)uVar15),cVar3);
cVar4 = (0 < (short)uVar16) * ((short)uVar16 < 0x100) * (char)uVar16 - (0xff < (short)uVar16);
uVar13 = CONCAT13((0 < (short)uVar17) * ((short)uVar17 < 0x100) * (char)uVar17 -
(0xff < (short)uVar17),CONCAT12(cVar4,sVar12));
cVar5 = (0 < (short)uVar18) * ((short)uVar18 < 0x100) * (char)uVar18 - (0xff < (short)uVar18);
uVar14 = CONCAT15((0 < (short)uVar19) * ((short)uVar19 < 0x100) * (char)uVar19 -
(0xff < (short)uVar19),CONCAT14(cVar5,uVar13));
cVar6 = (0 < (short)uVar20) * ((short)uVar20 < 0x100) * (char)uVar20 - (0xff < (short)uVar20);
sVar7 = (short)((uint)uVar13 >> 0x10);
sVar8 = (short)((uint6)uVar14 >> 0x20);
sVar9 = (short)(CONCAT17((0 < (short)uVar21) * ((short)uVar21 < 0x100) * (char)uVar21 -
(0xff < (short)uVar21),CONCAT16(cVar6,uVar14)) >> 0x30);
local_40 = CONCAT13((0 < sVar9) * (sVar9 < 0x100) * cVar6 - (0xff < sVar9),
CONCAT12((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8),
CONCAT11((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7),
(0 < sVar12) * (sVar12 < 0x100) * cVar3 - (0xff < sVar12))))
;
local_3c = *(ushort *)((long)param_2 + 0x84) << 8 | *(ushort *)((long)param_2 + 0x84) >> 8;
local_3a = (ushort)param_2[0x10] << 8 | (ushort)param_2[0x10] >> 8;
local_38 = (ushort)param_2[0x11] << 8 | (ushort)param_2[0x11] >> 8;
local_36 = *(ushort *)((long)param_2 + 0x8c) << 8 | *(ushort *)((long)param_2 + 0x8c) >> 8;
local_34 = (ushort)param_2[0x12] << 8 | (ushort)param_2[0x12] >> 8;
local_32 = *(int1 *)((long)param_2 + 0x94);
local_31 = 0;
uStack_2c = 0;
uStack_29 = 0;
lVar10 = (**(code **)(PSI_server + 0x158))(local_d8,param_1,7);
if (lVar10 == 0) {
local_90 = my_write(param_1,&local_88,100,4);
}
else {
mi_base_info_write_cold_1(lVar10,param_1,&local_88,&local_90);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_90 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
4,174 | mi_ft_parse | eloqsql/storage/myisam/ft_update.c | uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const uchar *record,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
FT_SEG_ITERATOR ftsi;
struct st_mysql_ftparser *parser;
DBUG_ENTER("_mi_ft_parse");
_mi_ft_segiterator_init(info, keynr, record, &ftsi);
ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset);
parser= info->s->keyinfo[keynr].parser;
while (_mi_ft_segiterator(&ftsi))
{
if (ftsi.pos)
if (ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param, mem_root))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O0 | c | mi_ft_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0xa2ae0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movq (%rax), %rsi
callq 0xa2520
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xa2ba0
cmpl $0x0, %eax
je 0xa2e20
cmpq $0x0, -0x40(%rbp)
je 0xa2e1e
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xa25d0
cmpl $0x0, %eax
je 0xa2e1c
jmp 0xa2e13
movl $0x1, -0x4(%rbp)
jmp 0xa2e29
jmp 0xa2e1e
jmp 0xa2ddb
jmp 0xa2e22
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_ft_parse:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_28]
lea rcx, [rbp+var_58]
call _mi_ft_segiterator_init
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+28h]
mov rsi, [rax]
call ft_parse_init
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+38h]
mov [rbp+var_60], rax
loc_A2DDB:
lea rdi, [rbp+var_58]
call _mi_ft_segiterator
cmp eax, 0
jz short loc_A2E20
cmp [rbp+var_40], 0
jz short loc_A2E1E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov edx, [rbp+var_54]
mov rcx, [rbp+var_60]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
call ft_parse
cmp eax, 0
jz short loc_A2E1C
jmp short $+2
loc_A2E13:
mov [rbp+var_4], 1
jmp short loc_A2E29
loc_A2E1C:
jmp short $+2
loc_A2E1E:
jmp short loc_A2DDB
loc_A2E20:
jmp short $+2
loc_A2E22:
mov [rbp+var_4], 0
loc_A2E29:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, _QWORD *a5, long long a6)
{
long long v7; // [rsp+0h] [rbp-60h]
_BYTE v8[4]; // [rsp+8h] [rbp-58h] BYREF
int v9; // [rsp+Ch] [rbp-54h]
long long v10; // [rsp+20h] [rbp-40h]
long long v11; // [rsp+28h] [rbp-38h]
_QWORD *v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+38h] [rbp-28h]
unsigned int v14; // [rsp+44h] [rbp-1Ch]
long long v15; // [rsp+48h] [rbp-18h]
_QWORD *v16; // [rsp+50h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
mi_ft_segiterator_init(a2, a3, a4, (long long)v8);
ft_parse_init(v16, **(_QWORD **)(112LL * v14 + *(_QWORD *)(*(_QWORD *)v15 + 536LL) + 40));
v7 = *(_QWORD *)(112LL * v14 + *(_QWORD *)(*(_QWORD *)v15 + 536LL) + 56);
while ( (unsigned int)mi_ft_segiterator((long long)v8) )
{
if ( v10 && (unsigned int)ft_parse((long long)v16, v10, v9, v7, v12, v11) )
return 1;
}
return 0;
}
| _mi_ft_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x58]
CALL 0x001a2ae0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RAX]
CALL 0x001a2520
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x60],RAX
LAB_001a2ddb:
LEA RDI,[RBP + -0x58]
CALL 0x001a2ba0
CMP EAX,0x0
JZ 0x001a2e20
CMP qword ptr [RBP + -0x40],0x0
JZ 0x001a2e1e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x54]
MOV RCX,qword ptr [RBP + -0x60]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
CALL 0x001a25d0
CMP EAX,0x0
JZ 0x001a2e1c
JMP 0x001a2e13
LAB_001a2e13:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a2e29
LAB_001a2e1c:
JMP 0x001a2e1e
LAB_001a2e1e:
JMP 0x001a2ddb
LAB_001a2e20:
JMP 0x001a2e22
LAB_001a2e22:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a2e29:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
_mi_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5,
int8 param_6)
{
int8 uVar1;
int iVar2;
int1 local_60 [4];
int4 local_5c;
long local_48;
int8 local_40;
int8 local_38;
int8 local_30;
uint local_24;
long *local_20;
int8 local_18;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
_mi_ft_segiterator_init(param_2,param_3,param_4,local_60);
ft_parse_init(local_18,**(int8 **)
(*(long *)(*local_20 + 0x218) + (ulong)local_24 * 0x70 + 0x28));
uVar1 = *(int8 *)(*(long *)(*local_20 + 0x218) + (ulong)local_24 * 0x70 + 0x38);
do {
iVar2 = _mi_ft_segiterator(local_60);
if (iVar2 == 0) {
return 0;
}
} while ((local_48 == 0) ||
(iVar2 = ft_parse(local_18,local_48,local_5c,uVar1,local_38,local_40), iVar2 == 0));
return 1;
}
|
|
4,175 | ma_get_static_key | eloqsql/storage/maria/ma_search.c | uint _ma_get_static_key(MARIA_KEY *key, uint page_flag, uint nod_flag,
register uchar **page)
{
register MARIA_KEYDEF *keyinfo= key->keyinfo;
uint key_length= keyinfo->keylength;
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= key_length - key->ref_length;
key->flag= 0;
if (page_flag & KEYPAGE_FLAG_HAS_TRANSID)
{
uchar *end= *page + keyinfo->keylength;
if (key_has_transid(end-1))
{
uint trans_length= transid_packed_length(end);
key->ref_length+= trans_length;
key_length+= trans_length;
key->flag= SEARCH_PAGE_KEY_HAS_TRANSID;
}
}
key_length+= nod_flag;
memcpy(key->data, *page, key_length);
*page+= key_length;
return key_length - nod_flag;
} | O3 | c | ma_get_static_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %eax
movq 0x8(%rdi), %rdx
movzwl 0xaa(%rdx), %r15d
movq (%rdx), %rcx
movl 0x740(%rcx), %ecx
movl %ecx, 0x14(%rdi)
movl %r15d, %esi
subl %ecx, %esi
movl %esi, 0x10(%rdi)
movl $0x0, 0x18(%rdi)
movq (%rbx), %rsi
testb $0x2, %al
je 0x6ee83
movzwl 0xaa(%rdx), %eax
testb $0x1, -0x1(%rsi,%rax)
je 0x6ee83
movzbl (%rsi,%rax), %eax
leal -0xf8(%rax), %edx
cmpl $0xf3, %eax
movl $0x1, %eax
cmovael %edx, %eax
addl %eax, %ecx
movl %ecx, 0x14(%rdi)
addl %eax, %r15d
movl $0x100000, 0x18(%rdi) # imm = 0x100000
movq (%rbx), %rsi
addl %r15d, %r14d
movq (%rdi), %rdi
movq %r14, %rdx
callq 0x2a0a0
addq %r14, (%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_get_static_key:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov r14d, edx
mov eax, esi
mov rdx, [rdi+8]
movzx r15d, word ptr [rdx+0AAh]
mov rcx, [rdx]
mov ecx, [rcx+740h]
mov [rdi+14h], ecx
mov esi, r15d
sub esi, ecx
mov [rdi+10h], esi
mov dword ptr [rdi+18h], 0
mov rsi, [rbx]
test al, 2
jz short loc_6EE83
movzx eax, word ptr [rdx+0AAh]
test byte ptr [rsi+rax-1], 1
jz short loc_6EE83
movzx eax, byte ptr [rsi+rax]
lea edx, [rax-0F8h]
cmp eax, 0F3h
mov eax, 1
cmovnb eax, edx
add ecx, eax
mov [rdi+14h], ecx
add r15d, eax
mov dword ptr [rdi+18h], offset xmmword_100000
mov rsi, [rbx]
loc_6EE83:
add r14d, r15d
mov rdi, [rdi]
mov rdx, r14
call _memcpy
add [rbx], r14
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_get_static_key(long long a1, char a2, int a3, long long *a4)
{
unsigned __int16 *v7; // rdx
unsigned int v8; // r15d
int v9; // ecx
long long v10; // rsi
long long v11; // rax
unsigned int v12; // eax
int v13; // edx
bool v14; // cf
int v15; // eax
long long v16; // r14
v7 = *(unsigned __int16 **)(a1 + 8);
v8 = v7[85];
v9 = *(_DWORD *)(*(_QWORD *)v7 + 1856LL);
*(_DWORD *)(a1 + 20) = v9;
*(_DWORD *)(a1 + 16) = v8 - v9;
*(_DWORD *)(a1 + 24) = 0;
v10 = *a4;
if ( (a2 & 2) != 0 )
{
v11 = v7[85];
if ( (*(_BYTE *)(v10 + v11 - 1) & 1) != 0 )
{
v12 = *(unsigned __int8 *)(v10 + v11);
v13 = v12 - 248;
v14 = v12 < 0xF3;
v15 = 1;
if ( !v14 )
v15 = v13;
*(_DWORD *)(a1 + 20) = v15 + v9;
v8 += v15;
*(_DWORD *)(a1 + 24) = (_DWORD)&xmmword_100000;
v10 = *a4;
}
}
v16 = v8 + a3;
memcpy(*(_QWORD *)a1, v10, v16);
*a4 += v16;
return v8;
}
| _ma_get_static_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14D,EDX
MOV EAX,ESI
MOV RDX,qword ptr [RDI + 0x8]
MOVZX R15D,word ptr [RDX + 0xaa]
MOV RCX,qword ptr [RDX]
MOV ECX,dword ptr [RCX + 0x740]
MOV dword ptr [RDI + 0x14],ECX
MOV ESI,R15D
SUB ESI,ECX
MOV dword ptr [RDI + 0x10],ESI
MOV dword ptr [RDI + 0x18],0x0
MOV RSI,qword ptr [RBX]
TEST AL,0x2
JZ 0x0016ee83
MOVZX EAX,word ptr [RDX + 0xaa]
TEST byte ptr [RSI + RAX*0x1 + -0x1],0x1
JZ 0x0016ee83
MOVZX EAX,byte ptr [RSI + RAX*0x1]
LEA EDX,[RAX + -0xf8]
CMP EAX,0xf3
MOV EAX,0x1
CMOVNC EAX,EDX
ADD ECX,EAX
MOV dword ptr [RDI + 0x14],ECX
ADD R15D,EAX
MOV dword ptr [RDI + 0x18],0x100000
MOV RSI,qword ptr [RBX]
LAB_0016ee83:
ADD R14D,R15D
MOV RDI,qword ptr [RDI]
MOV RDX,R14
CALL 0x0012a0a0
ADD qword ptr [RBX],R14
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint _ma_get_static_key(int8 *param_1,uint param_2,int param_3,long *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
long *plVar4;
int iVar5;
void *__src;
uint uVar6;
plVar4 = (long *)param_1[1];
uVar2 = *(ushort *)((long)plVar4 + 0xaa);
uVar6 = (uint)uVar2;
iVar3 = *(int *)(*plVar4 + 0x740);
*(int *)((long)param_1 + 0x14) = iVar3;
*(uint *)(param_1 + 2) = uVar6 - iVar3;
*(int4 *)(param_1 + 3) = 0;
__src = (void *)*param_4;
if (((param_2 & 2) != 0) &&
((*(byte *)((long)__src + ((ulong)*(ushort *)((long)plVar4 + 0xaa) - 1)) & 1) != 0)) {
bVar1 = *(byte *)((long)__src + (ulong)*(ushort *)((long)plVar4 + 0xaa));
iVar5 = 1;
if (0xf2 < bVar1) {
iVar5 = bVar1 - 0xf8;
}
*(int *)((long)param_1 + 0x14) = iVar3 + iVar5;
uVar6 = (uint)uVar2 + iVar5;
*(int4 *)(param_1 + 3) = 0x100000;
__src = (void *)*param_4;
}
memcpy((void *)*param_1,__src,(ulong)(param_3 + uVar6));
*param_4 = *param_4 + (ulong)(param_3 + uVar6);
return uVar6;
}
|
|
4,176 | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&>(fmt::v10::appender, fmt::v10::format_specs<unsigned int> const&, unsigned long, unsigned long, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs,
size_t size, size_t width, F&& f) -> OutputIt {
static_assert(align == align::left || align == align::right, "");
unsigned spec_width = to_unsigned(specs.width);
size_t padding = spec_width > width ? spec_width - width : 0;
// Shifts are encoded as string literals because static constexpr is not
// supported in constexpr functions.
auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01";
size_t left_padding = padding >> shifts[specs.align];
size_t right_padding = padding - left_padding;
auto it = reserve(out, size + padding * specs.fill.size());
if (left_padding != 0) it = fill(it, left_padding, specs.fill);
it = f(it);
if (right_padding != 0) it = fill(it, right_padding, specs.fill);
return base_iterator(out, it);
} | O0 | c | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&>(fmt::v10::appender, fmt::v10::format_specs<unsigned int> const&, unsigned long, unsigned long, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %edi
callq 0xa5690
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
cmpq 0x90(%rsp), %rax
jbe 0xc293c
movl 0x84(%rsp), %eax
subq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xc2945
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0xc2945
movq 0x10(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x31abaf(%rip), %rax # 0x3dd505
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movw 0x9(%rdx), %dx
andw $0xf, %dx
movzbl %dl, %edx
movsbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rax
subq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rdi
addq $0xb, %rdi
callq 0xa5e60
movq (%rsp), %rsi
movq %rax, %rcx
movq 0x8(%rsp), %rax
imulq %rcx, %rax
addq %rax, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xa0060
movq (%rax), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xc2a20
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0xb, %rdx
movq 0x48(%rsp), %rdi
callq 0xa5e70
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
callq 0xc2ad0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xc2a87
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0xb, %rdx
movq 0x28(%rsp), %rdi
callq 0xa5e70
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xa0360
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_9write_intIS5_cZNS1_9write_intIcS5_oEET0_S8_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refEEUlS5_E2_EESD_SD_ijRKNSC_IS8_EESA_EUlS5_E_EES8_S8_RKNSC_ISA_EEmmOT2_:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_20], rdx
mov [rsp+0B8h+var_28], rcx
mov [rsp+0B8h+var_30], r8
mov rax, [rsp+0B8h+var_18]
mov edi, [rax]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov [rsp+0B8h+var_34], eax
mov eax, [rsp+0B8h+var_34]
cmp rax, [rsp+0B8h+var_28]
jbe short loc_C293C
mov eax, [rsp+0B8h+var_34]
sub rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_A8], rax
jmp short loc_C2945
loc_C293C:
xor eax, eax
mov [rsp+0B8h+var_A8], rax
jmp short $+2
loc_C2945:
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_40], rax
lea rax, byte_3DD505
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_40]
mov rcx, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_18]
mov dx, [rdx+9]
and dx, 0Fh
movzx edx, dl
movsx ecx, byte ptr [rcx+rdx]
mov ecx, ecx
shr rax, cl
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_40]
sub rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_B8], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_18]
add rdi, 0Bh
call _ZNK3fmt3v106detail6fill_tIcE4sizeEv; fmt::v10::detail::fill_t<char>::size(void)
mov rsi, [rsp+0B8h+var_B8]
mov rcx, rax
mov rax, [rsp+0B8h+var_B0]
imul rax, rcx
add rsi, rax
lea rdi, [rsp+0B8h+var_10]
call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong)
mov rax, [rax]
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_50], 0
jz short loc_C2A20
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_70], rax
mov rsi, [rsp+0B8h+var_50]
mov rdx, [rsp+0B8h+var_18]
add rdx, 0Bh
mov rdi, [rsp+0B8h+var_70]
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov [rsp+0B8h+var_68], rax
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_60], rax
loc_C2A20:
mov rdi, [rsp+0B8h+var_30]
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_80], rax
mov rsi, [rsp+0B8h+var_80]
call _ZZN3fmt3v106detail9write_intINS0_8appenderEcZNS1_9write_intIcS3_oEET0_S5_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refEEUlS3_E2_EESA_SA_ijRKNS9_IS5_EES7_ENKUlS3_E_clES3_; fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,uint,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1}::operator()(fmt::v10::appender)
mov [rsp+0B8h+var_78], rax
mov rax, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_58], 0
jz short loc_C2A87
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_90], rax
mov rsi, [rsp+0B8h+var_58]
mov rdx, [rsp+0B8h+var_18]
add rdx, 0Bh
mov rdi, [rsp+0B8h+var_90]
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov [rsp+0B8h+var_88], rax
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_60], rax
loc_C2A87:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rax
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_A0], rax
mov rdi, [rsp+0B8h+var_98]
mov rsi, [rsp+0B8h+var_A0]
call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender)
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,char fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,unsigned int,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1} &>(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
long long a5)
{
unsigned long long v6; // [rsp+10h] [rbp-A8h]
long long v7; // [rsp+58h] [rbp-60h]
long long v8; // [rsp+58h] [rbp-60h]
unsigned long long v9; // [rsp+60h] [rbp-58h]
unsigned long long v10; // [rsp+68h] [rbp-50h]
unsigned int v11; // [rsp+84h] [rbp-34h]
long long v14; // [rsp+A8h] [rbp-10h] BYREF
v14 = a1;
v11 = fmt::v10::detail::to_unsigned<int>(*(_DWORD *)a2);
if ( v11 <= a4 )
v6 = 0LL;
else
v6 = v11 - a4;
v10 = v6 >> byte_3DD505[*(_WORD *)(a2 + 9) & 0xF];
v9 = v6 - v10;
fmt::v10::detail::fill_t<char>::size(a2 + 11);
v7 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v14);
if ( v10 )
v7 = fmt::v10::detail::fill<fmt::v10::appender,char>(v7, v10, a2 + 11);
v8 = fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,unsigned int,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1}::operator()(
a5,
v7);
if ( v9 )
v8 = fmt::v10::detail::fill<fmt::v10::appender,char>(v8, v9, a2 + 11);
return fmt::v10::detail::base_iterator<fmt::v10::appender>(v14, v8);
}
| write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(fmt::v10::appender,int,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4})::{lambda(fmt::v10::appender)#1}&>:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0x98],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x88],R8
MOV RAX,qword ptr [RSP + 0xa0]
MOV EDI,dword ptr [RAX]
CALL 0x001a5690
MOV dword ptr [RSP + 0x84],EAX
MOV EAX,dword ptr [RSP + 0x84]
CMP RAX,qword ptr [RSP + 0x90]
JBE 0x001c293c
MOV EAX,dword ptr [RSP + 0x84]
SUB RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c2945
LAB_001c293c:
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c2945
LAB_001c2945:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x78],RAX
LEA RAX,[0x4dd505]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0xa0]
MOV DX,word ptr [RDX + 0x9]
AND DX,0xf
MOVZX EDX,DL
MOVSX ECX,byte ptr [RCX + RDX*0x1]
MOV ECX,ECX
SHR RAX,CL
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
ADD RDI,0xb
CALL 0x001a5e60
MOV RSI,qword ptr [RSP]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,RCX
ADD RSI,RAX
LEA RDI,[RSP + 0xa8]
CALL 0x001a0060
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x68],0x0
JZ 0x001c2a20
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x48],RAX
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RDX,0xb
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001a5e70
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x58],RAX
LAB_001c2a20:
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001c2ad0
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x60],0x0
JZ 0x001c2a87
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RDX,0xb
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001a5e70
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
LAB_001c2a87:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001a0360
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender,
char, fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::detail::write_int<char,
fmt::v10::appender, unsigned __int128>(fmt::v10::appender,
fmt::v10::detail::write_int_arg<unsigned __int128>, fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(fmt::v10::appender, int, unsigned
int, fmt::v10::format_specs<char> const&, fmt::v10::detail::write_int<char, fmt::v10::appender,
unsigned __int128>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned __int128>,
fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4})::{lambda(fmt::v10::appender)#1}&>(fmt::v10::appender,
fmt::v10::format_specs<char> const&, unsigned long, unsigned long,
fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::detail::write_int<char,
fmt::v10::appender, unsigned __int128>(fmt::v10::appender,
fmt::v10::detail::write_int_arg<unsigned __int128>, fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(fmt::v10::appender, int, unsigned
int, fmt::v10::format_specs<char> const&, fmt::v10::detail::write_int<char, fmt::v10::appender,
unsigned __int128>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned __int128>,
fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4})::{lambda(fmt::v10::appender)#1}&)
*/
int8
fmt::v10::detail::
write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::_lambda(fmt::v10::appender)_4_>(fmt::v10::appender,int,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::_lambda(fmt::v10::appender)_4_)::_lambda(fmt::v10::appender)_1_&>
(int8 param_1,int *param_2,long param_3,ulong param_4,
_lambda_fmt__v10__appender__1_ *param_5)
{
uint uVar1;
ulong uVar2;
long lVar3;
int8 *puVar4;
int8 uVar5;
ulong local_a8;
int8 local_60;
int8 local_10 [2];
local_10[0] = param_1;
uVar1 = to_unsigned<int>(*param_2);
if (param_4 < uVar1) {
local_a8 = uVar1 - param_4;
}
else {
local_a8 = 0;
}
uVar2 = local_a8 >> ((&DAT_004dd505)[(byte)*(int2 *)((long)param_2 + 9) & 0xf] & 0x3f);
lVar3 = fill_t<char>::size((fill_t<char> *)((long)param_2 + 0xb));
puVar4 = (int8 *)
reserve<fmt::v10::appender>((appender *)local_10,param_3 + local_a8 * lVar3);
local_60 = *puVar4;
if (uVar2 != 0) {
local_60 = fill<fmt::v10::appender,char>(local_60,uVar2,(long)param_2 + 0xb);
}
local_60 = write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(fmt::v10::appender,int,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned__int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned__int128>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4})
::{lambda(fmt::v10::appender)#1}::operator()(param_5,local_60);
if (local_a8 - uVar2 != 0) {
local_60 = fill<fmt::v10::appender,char>(local_60,local_a8 - uVar2,(long)param_2 + 0xb);
}
uVar5 = base_iterator<fmt::v10::appender>(local_10[0],local_60);
return uVar5;
}
|
|
4,177 | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&>(fmt::v10::appender, fmt::v10::format_specs<unsigned int> const&, unsigned long, unsigned long, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs,
size_t size, size_t width, F&& f) -> OutputIt {
static_assert(align == align::left || align == align::right, "");
unsigned spec_width = to_unsigned(specs.width);
size_t padding = spec_width > width ? spec_width - width : 0;
// Shifts are encoded as string literals because static constexpr is not
// supported in constexpr functions.
auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01";
size_t left_padding = padding >> shifts[specs.align];
size_t right_padding = padding - left_padding;
auto it = reserve(out, size + padding * specs.fill.size());
if (left_padding != 0) it = fill(it, left_padding, specs.fill);
it = f(it);
if (right_padding != 0) it = fill(it, right_padding, specs.fill);
return base_iterator(out, it);
} | O3 | c | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&>(fmt::v10::appender, fmt::v10::format_specs<unsigned int> const&, unsigned long, unsigned long, char fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<char, fmt::v10::appender, unsigned int>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned int>, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)>(char, int, unsigned int, fmt::v10::format_specs<fmt::v10::appender> const&, unsigned int)::'lambda'(fmt::v10::appender)&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl (%rsi), %eax
xorl %r14d, %r14d
subq %rcx, %rax
cmovaeq %rax, %r14
movzwl 0x9(%rsi), %eax
andl $0xf, %eax
leaq 0x11f86d(%rip), %rcx # 0x161c70
movb (%rax,%rcx), %cl
movq %r14, %r15
shrq %cl, %r15
movq %r8, %r13
movq %rdi, %r12
addq $0xb, %rbx
testq %r15, %r15
je 0x4242c
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x36ef8
movq %rax, %r12
cmpb $0x1, (%r13)
jne 0x42448
movq 0x8(%r13), %rsi
movq 0x10(%r13), %rdx
movq %r12, %rdi
callq 0x42e82
movq %rax, %r12
jmp 0x4245b
movq 0x18(%r13), %rsi
movq 0x20(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x348f8
cmpq %r15, %r14
jne 0x4246d
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
subq %r15, %r14
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x36ef8
| _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov eax, [rsi]
xor r14d, r14d
sub rax, rcx
cmovnb r14, rax
movzx eax, word ptr [rsi+9]
and eax, 0Fh
lea rcx, byte_161C70
mov cl, [rax+rcx]
mov r15, r14
shr r15, cl
mov r13, r8
mov r12, rdi
add rbx, 0Bh
test r15, r15
jz short loc_4242C
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov r12, rax
loc_4242C:
cmp byte ptr [r13+0], 1
jnz short loc_42448
mov rsi, [r13+8]
mov rdx, [r13+10h]
mov rdi, r12
call _ZN3fmt3v106detail20write_escaped_stringIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EE; fmt::v10::detail::write_escaped_string<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>)
mov r12, rax
jmp short loc_4245B
loc_42448:
mov rsi, [r13+18h]
mov rdx, [r13+20h]
add rdx, rsi
mov rdi, r12
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
loc_4245B:
cmp r14, r15
jnz short loc_4246D
mov rax, r12
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4246D:
sub r14, r15
mov rdi, r12
mov rsi, r14
mov rdx, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
| long long fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(
long long a1,
unsigned int *a2,
long long a3,
unsigned long long a4,
long long a5)
{
unsigned long long v5; // rax
unsigned long long v6; // r14
bool v7; // cf
unsigned long long v8; // rax
char v9; // cl
unsigned long long v10; // r15
long long v12; // r12
long long v13; // rbx
v5 = *a2;
v6 = 0LL;
v7 = v5 < a4;
v8 = v5 - a4;
if ( !v7 )
v6 = v8;
v9 = byte_161C70[*(_WORD *)((_BYTE *)a2 + 9) & 0xF];
v10 = v6 >> v9;
v12 = a1;
v13 = (long long)a2 + 11;
if ( v6 >> v9 )
v12 = fmt::v10::detail::fill<fmt::v10::appender,char>(a1, v6 >> v9, v13);
if ( *(_BYTE *)a5 == 1 )
v12 = fmt::v10::detail::write_escaped_string<char,fmt::v10::appender>(
v12,
*(_QWORD *)(a5 + 8),
*(_QWORD *)(a5 + 16));
else
fmt::v10::detail::buffer<char>::append<char>(v12, *(_QWORD *)(a5 + 24), *(_QWORD *)(a5 + 24) + *(_QWORD *)(a5 + 32));
if ( v6 == v10 )
return v12;
else
return fmt::v10::detail::fill<fmt::v10::appender,char>(v12, v6 - v10, v13);
}
| write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::{lambda(fmt::v10::appender)#1}>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV EAX,dword ptr [RSI]
XOR R14D,R14D
SUB RAX,RCX
CMOVNC R14,RAX
MOVZX EAX,word ptr [RSI + 0x9]
AND EAX,0xf
LEA RCX,[0x261c70]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV R15,R14
SHR R15,CL
MOV R13,R8
MOV R12,RDI
ADD RBX,0xb
TEST R15,R15
JZ 0x0014242c
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL 0x00136ef8
MOV R12,RAX
LAB_0014242c:
CMP byte ptr [R13],0x1
JNZ 0x00142448
MOV RSI,qword ptr [R13 + 0x8]
MOV RDX,qword ptr [R13 + 0x10]
MOV RDI,R12
CALL 0x00142e82
MOV R12,RAX
JMP 0x0014245b
LAB_00142448:
MOV RSI,qword ptr [R13 + 0x18]
MOV RDX,qword ptr [R13 + 0x20]
ADD RDX,RSI
MOV RDI,R12
CALL 0x001348f8
LAB_0014245b:
CMP R14,R15
JNZ 0x0014246d
MOV RAX,R12
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014246d:
SUB R14,R15
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00136ef8
|
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender,
char, fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender,
fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char>
const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender, fmt::v10::format_specs<char> const&,
unsigned long, unsigned long, fmt::v10::detail::write<char,
fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>,
fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}&&) */
buffer<char> *
fmt::v10::detail::
write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_>
(buffer<char> *param_1,uint *param_2,int8 param_3,ulong param_4,char *param_5)
{
buffer<char> *pbVar1;
ulong uVar2;
ulong uVar3;
uVar2 = 0;
if (param_4 <= *param_2) {
uVar2 = *param_2 - param_4;
}
uVar3 = uVar2 >> ((&DAT_00261c70)[*(ushort *)((long)param_2 + 9) & 0xf] & 0x3f);
if (uVar3 != 0) {
param_1 = (buffer<char> *)fill<fmt::v10::appender,char>(param_1,uVar3,(long)param_2 + 0xb);
}
if (*param_5 == '\x01') {
param_1 = (buffer<char> *)
write_escaped_string<char,fmt::v10::appender>
((detail *)param_1,*(int8 *)(param_5 + 8),
*(int8 *)(param_5 + 0x10));
}
else {
buffer<char>::append<char>
(param_1,*(char **)(param_5 + 0x18),
*(char **)(param_5 + 0x18) + *(long *)(param_5 + 0x20));
}
if (uVar2 == uVar3) {
return param_1;
}
pbVar1 = (buffer<char> *)fill<fmt::v10::appender,char>(param_1,uVar2 - uVar3,(long)param_2 + 0xb);
return pbVar1;
}
|
|
4,178 | evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline Result mcopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
const auto& dst_u256 = stack.pop();
const auto& src_u256 = stack.pop();
const auto& size_u256 = stack.pop();
if (!check_memory(gas_left, state.memory, std::max(dst_u256, src_u256), size_u256))
return {EVMC_OUT_OF_GAS, gas_left};
const auto dst = static_cast<size_t>(dst_u256);
const auto src = static_cast<size_t>(src_u256);
const auto size = static_cast<size_t>(size_u256);
if (const auto cost = copy_cost(size); (gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
if (size > 0)
std::memmove(&state.memory[dst], &state.memory[src], size);
return {EVMC_SUCCESS, gas_left};
} | O3 | cpp | evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rdi), %rax
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rcx
movq -0x10(%rdi), %rdi
movq -0x8(%r14), %r8
movq %rsi, %r9
xorq %rdi, %r9
movq %rcx, %r10
xorq %r8, %r10
orq %r9, %r10
jne 0x40381
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq -0x20(%r14), %rdi
movq -0x18(%r14), %r8
leaq 0x8(%rdx), %r15
cmpq %rdi, %rsi
sbbq %r8, %rcx
setae %cl
movdqu -0x40(%r14), %xmm0
movdqu -0x30(%r14), %xmm1
por %xmm0, %xmm1
cmovaeq %r14, %rax
ptest %xmm1, %xmm1
je 0x40411
movq -0x30(%r14), %rsi
orq -0x28(%r14), %rsi
movl $0x3, %ebp
orq -0x38(%r14), %rsi
jne 0x40446
movq -0x40(%r14), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
jne 0x40446
movq 0x10(%rax), %rdi
orq 0x18(%rax), %rdi
orq 0x8(%rax), %rdi
jne 0x40446
movzbl %cl, %eax
shll $0x5, %eax
addq $-0x20, %rax
movq (%r14,%rax), %rax
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x40446
addq %rsi, %rax
cmpq 0x10(%rdx), %rax
jbe 0x4040c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3fbe5
movq %rax, %rbx
testq %rbx, %rbx
js 0x40446
movq -0x40(%r14), %rdx
leaq 0x1f(%rdx), %rax
shrq $0x5, %rax
leaq (%rax,%rax,2), %rax
subq %rax, %rbx
js 0x40441
xorl %ebp, %ebp
testq %rdx, %rdx
je 0x40446
movq (%r15), %rsi
movq (%r14), %rdi
addq %rsi, %rdi
addq -0x20(%r14), %rsi
callq 0x21360
jmp 0x40446
movl $0x3, %ebp
movl %ebp, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN6evmone5instr4core5mcopyENS_8StackTopElRNS_14ExecutionStateE:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, [rdi-20h]
mov rsi, [rdi+10h]
mov rcx, [rdi+18h]
mov rdi, [rdi-10h]
mov r8, [r14-8]
mov r9, rsi
xor r9, rdi
mov r10, rcx
xor r10, r8
or r10, r9
jnz short loc_40381
mov rsi, [r14]
mov rcx, [r14+8]
mov rdi, [r14-20h]
mov r8, [r14-18h]
loc_40381:
lea r15, [rdx+8]
cmp rsi, rdi
sbb rcx, r8
setnb cl
movdqu xmm0, xmmword ptr [r14-40h]
movdqu xmm1, xmmword ptr [r14-30h]
por xmm1, xmm0
cmovnb rax, r14
ptest xmm1, xmm1
jz short loc_40411
mov rsi, [r14-30h]
or rsi, [r14-28h]
mov ebp, 3
or rsi, [r14-38h]
jnz loc_40446
mov rsi, [r14-40h]
mov rdi, rsi
shr rdi, 20h
jnz short loc_40446
mov rdi, [rax+10h]
or rdi, [rax+18h]
or rdi, [rax+8]
jnz short loc_40446
movzx eax, cl
shl eax, 5
add rax, 0FFFFFFFFFFFFFFE0h
mov rax, [r14+rax]
mov rcx, rax
shr rcx, 20h; unsigned __int64
jnz short loc_40446
add rax, rsi
cmp rax, [rdx+10h]
jbe short loc_4040C
mov rdi, rbx; this
mov rsi, r15; __int64
mov rdx, rax; evmone::Memory *
call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong)
mov rbx, rax
loc_4040C:
test rbx, rbx
js short loc_40446
loc_40411:
mov rdx, [r14-40h]
lea rax, [rdx+1Fh]
shr rax, 5
lea rax, [rax+rax*2]
sub rbx, rax
js short loc_40441
xor ebp, ebp
test rdx, rdx
jz short loc_40446
mov rsi, [r15]
mov rdi, [r14]
add rdi, rsi
add rsi, [r14-20h]
call _memmove
jmp short loc_40446
loc_40441:
mov ebp, 3
loc_40446:
mov eax, ebp
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long evmone::instr::core::mcopy(const __m128i *a1, char *a2, long long a3)
{
const __m128i *v5; // rax
long long v6; // rsi
long long v7; // rcx
long long v8; // rdi
long long v9; // r8
_QWORD *v10; // r15
bool v11; // cf
bool v12; // cl
__m128i v13; // xmm1
unsigned int v14; // ebp
evmone::Memory *v15; // rax
long long v16; // rdx
v5 = a1 - 2;
v6 = a1[1].m128i_i64[0];
v7 = a1[1].m128i_i64[1];
v8 = a1[-1].m128i_i64[0];
v9 = a1[-1].m128i_i64[1];
if ( !(v8 ^ v6 | v9 ^ v7) )
{
v6 = a1->m128i_i64[0];
v7 = a1->m128i_i64[1];
v8 = a1[-2].m128i_i64[0];
v9 = a1[-2].m128i_i64[1];
}
v10 = (_QWORD *)(a3 + 8);
v11 = __PAIR128__(v7, v6) < __PAIR128__(v9, v8);
v12 = __PAIR128__(v7, v6) >= __PAIR128__(v9, v8);
v13 = _mm_or_si128(_mm_loadu_si128(a1 - 3), _mm_loadu_si128(a1 - 4));
if ( !v11 )
v5 = a1;
if ( _mm_testz_si128(v13, v13) )
goto LABEL_13;
v14 = 3;
if ( !(a1[-4].m128i_i64[1] | a1[-3].m128i_i64[1] | a1[-3].m128i_i64[0])
&& !HIDWORD(a1[-4].m128i_i64[0])
&& !(v5->m128i_i64[1] | v5[1].m128i_i64[1] | v5[1].m128i_i64[0])
&& !HIDWORD(a1[2 * (unsigned int)v12 - 2].m128i_i64[0]) )
{
v15 = (evmone::Memory *)(a1[-4].m128i_i64[0] + a1[2 * (unsigned int)v12 - 2].m128i_i64[0]);
if ( (unsigned long long)v15 > *(_QWORD *)(a3 + 16) )
a2 = evmone::grow_memory((evmone *)a2, (evmone::Memory *)(a3 + 8), v15);
if ( (long long)a2 >= 0 )
{
LABEL_13:
v16 = a1[-4].m128i_i64[0];
if ( (long long)&a2[-3 * ((unsigned long long)(v16 + 31) >> 5)] < 0 )
{
return 3;
}
else
{
v14 = 0;
if ( v16 )
memmove(*v10 + a1->m128i_i64[0]);
}
}
}
return v14;
}
| mcopy:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[RDI + -0x20]
MOV RSI,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
MOV RDI,qword ptr [RDI + -0x10]
MOV R8,qword ptr [R14 + -0x8]
MOV R9,RSI
XOR R9,RDI
MOV R10,RCX
XOR R10,R8
OR R10,R9
JNZ 0x00140381
MOV RSI,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [R14 + -0x20]
MOV R8,qword ptr [R14 + -0x18]
LAB_00140381:
LEA R15,[RDX + 0x8]
CMP RSI,RDI
SBB RCX,R8
SETNC CL
MOVDQU XMM0,xmmword ptr [R14 + -0x40]
MOVDQU XMM1,xmmword ptr [R14 + -0x30]
POR XMM1,XMM0
CMOVNC RAX,R14
PTEST XMM1,XMM1
JZ 0x00140411
MOV RSI,qword ptr [R14 + -0x30]
OR RSI,qword ptr [R14 + -0x28]
MOV EBP,0x3
OR RSI,qword ptr [R14 + -0x38]
JNZ 0x00140446
MOV RSI,qword ptr [R14 + -0x40]
MOV RDI,RSI
SHR RDI,0x20
JNZ 0x00140446
MOV RDI,qword ptr [RAX + 0x10]
OR RDI,qword ptr [RAX + 0x18]
OR RDI,qword ptr [RAX + 0x8]
JNZ 0x00140446
MOVZX EAX,CL
SHL EAX,0x5
ADD RAX,-0x20
MOV RAX,qword ptr [R14 + RAX*0x1]
MOV RCX,RAX
SHR RCX,0x20
JNZ 0x00140446
ADD RAX,RSI
CMP RAX,qword ptr [RDX + 0x10]
JBE 0x0014040c
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x0013fbe5
MOV RBX,RAX
LAB_0014040c:
TEST RBX,RBX
JS 0x00140446
LAB_00140411:
MOV RDX,qword ptr [R14 + -0x40]
LEA RAX,[RDX + 0x1f]
SHR RAX,0x5
LEA RAX,[RAX + RAX*0x2]
SUB RBX,RAX
JS 0x00140441
XOR EBP,EBP
TEST RDX,RDX
JZ 0x00140446
MOV RSI,qword ptr [R15]
MOV RDI,qword ptr [R14]
ADD RDI,RSI
ADD RSI,qword ptr [R14 + -0x20]
CALL 0x00121360
JMP 0x00140446
LAB_00140441:
MOV EBP,0x3
LAB_00140446:
MOV EAX,EBP
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::mcopy(ulong *param_1,long param_2,long param_3)
{
size_t __n;
long lVar1;
bool bVar2;
ulong *puVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
ulong uVar8;
int1 auVar9 [16];
uVar4 = param_1[2];
uVar5 = param_1[3];
uVar7 = param_1[-2];
uVar8 = param_1[-1];
if (uVar5 == uVar8 && uVar4 == uVar7) {
uVar4 = *param_1;
uVar5 = param_1[1];
uVar7 = param_1[-4];
uVar8 = param_1[-3];
}
bVar2 = (ulong)(uVar4 < uVar7) <= uVar5 - uVar8;
puVar3 = param_1 + -4;
if (uVar8 <= uVar5 && bVar2) {
puVar3 = param_1;
}
if (*(int1 (*) [16])(param_1 + -6) != (int1 [16])0x0 ||
*(int1 (*) [16])(param_1 + -8) != (int1 [16])0x0) {
uVar6 = 3;
if (((((param_1[-6] != 0 || param_1[-5] != 0) || param_1[-7] != 0) || (param_1[-8] >> 0x20 != 0)
) || ((puVar3[2] != 0 || puVar3[3] != 0) || puVar3[1] != 0)) ||
(param_1[(ulong)(uVar8 <= uVar5 && bVar2) * 4 + -4] >> 0x20 != 0)) goto LAB_00140446;
uVar4 = param_1[(ulong)(uVar8 <= uVar5 && bVar2) * 4 + -4] + param_1[-8];
if (*(ulong *)(param_3 + 0x10) < uVar4) {
param_2 = grow_memory(param_2,(Memory *)(param_3 + 8),uVar4);
}
if (param_2 < 0) goto LAB_00140446;
}
__n = param_1[-8];
param_2 = param_2 + (__n + 0x1f >> 5) * -3;
if (param_2 < 0) {
uVar6 = 3;
}
else {
uVar6 = 0;
if (__n != 0) {
lVar1 = *(long *)(param_3 + 8);
memmove((void *)(*param_1 + lVar1),(void *)(lVar1 + param_1[-4]),__n);
}
}
LAB_00140446:
auVar9._8_8_ = param_2;
auVar9._0_8_ = uVar6;
return auVar9;
}
|
|
4,179 | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | ArgumentsValue evaluate(const std::shared_ptr<Context> & context) const {
ArgumentsValue vargs;
for (const auto& arg : this->args) {
if (auto un_expr = std::dynamic_pointer_cast<UnaryOpExpr>(arg)) {
if (un_expr->op == UnaryOpExpr::Op::Expansion) {
auto array = un_expr->expr->evaluate(context);
if (!array.is_array()) {
throw std::runtime_error("Expansion operator only supported on arrays");
}
array.for_each([&](Value & value) {
vargs.args.push_back(value);
});
continue;
} else if (un_expr->op == UnaryOpExpr::Op::ExpansionDict) {
auto dict = un_expr->expr->evaluate(context);
if (!dict.is_object()) {
throw std::runtime_error("ExpansionDict operator only supported on objects");
}
dict.for_each([&](const Value & key) {
vargs.kwargs.push_back({key.get<std::string>(), dict.at(key)});
});
continue;
}
}
vargs.args.push_back(arg->evaluate(context));
}
for (const auto& [name, value] : this->kwargs) {
vargs.kwargs.push_back({name, value->evaluate(context)});
}
return vargs;
} | O2 | cpp | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r15
movq %rdi, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq (%rsi), %r13
movq %rsi, 0x20(%rsp)
movq 0x8(%rsi), %r14
leaq 0x78(%rsp), %r12
leaq 0x28(%rsp), %rbx
movq %rdi, 0x8(%rsp)
cmpq %r14, %r13
je 0x6d3c6
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x6e0d6
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6d322
movl 0x30(%rax), %ecx
cmpl $0x4, %ecx
je 0x6d350
cmpl $0x3, %ecx
jne 0x6d322
movq 0x20(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x635ba
cmpq $0x0, 0x88(%rsp)
je 0x6d43b
andq $0x0, 0x30(%rsp)
movq %rbp, 0x28(%rsp)
leaq 0x10a7(%rip), %rax # 0x6e3a8
movq %rax, 0x40(%rsp)
leaq 0x10a1(%rip), %rax # 0x6e3ae
movq %rax, 0x38(%rsp)
movq %r12, %rdi
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x6e12c
jmp 0x6d39e
leaq 0x18(%rsp), %rdi
callq 0x503de
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x635ba
movq %rbp, %rdi
movq %r12, %rsi
callq 0x69522
movq %r12, %rdi
callq 0x6384a
jmp 0x6d3bd
movq 0x20(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x635ba
cmpq $0x0, 0x98(%rsp)
je 0x6d46d
movq %rbp, 0x28(%rsp)
movq %r12, 0x30(%rsp)
leaq 0x1085(%rip), %rax # 0x6e404
movq %rax, 0x40(%rsp)
leaq 0x107f(%rip), %rax # 0x6e40a
movq %rax, 0x38(%rsp)
movq %r12, %rdi
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x6e12c
movq %rbp, %rdi
callq 0x48878
movq %r12, %rdi
callq 0x6384a
leaq 0x18(%rsp), %rdi
callq 0x503de
movq 0x8(%rsp), %rbp
addq $0x10, %r13
jmp 0x6d2a0
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %r14
movq 0x20(%rcx), %rbx
leaq 0x18(%rbp), %r12
leaq 0x28(%rsp), %r13
leaq 0x78(%rsp), %rbp
cmpq %rbx, %r14
je 0x6d424
movq 0x20(%r14), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x635ba
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6e358
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6e51c
movq %rbp, %rdi
callq 0x6e37e
movq %r13, %rdi
callq 0x6384a
addq $0x30, %r14
jmp 0x6d3e1
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x470a0(%rip), %rsi # 0xb44ed
movq %rax, %rdi
callq 0x23310
movq 0x90b94(%rip), %rsi # 0xfdff0
movq 0x90af5(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f20
jmp 0x6d49d
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x4709a(%rip), %rsi # 0xb4519
movq %rax, %rdi
callq 0x23310
movq 0x90b62(%rip), %rsi # 0xfdff0
movq 0x90ac3(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f20
jmp 0x6d4a1
jmp 0x6d4a6
movq %rax, %r14
jmp 0x6d4c9
movq %rax, %r14
movq %r15, %rdi
callq 0x23690
jmp 0x6d4c9
jmp 0x6d4b7
jmp 0x6d4d5
movq 0x8(%rsp), %rbp
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x48878
leaq 0x78(%rsp), %rdi
callq 0x6384a
jmp 0x6d4d8
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x503de
jmp 0x6d51e
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x6384a
jmp 0x6d51e
movq %rax, %r14
jmp 0x6d51e
movq %rax, %r14
jmp 0x6d519
movq %rax, %r14
jmp 0x6d50f
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x6e37e
leaq 0x28(%rsp), %rdi
callq 0x6384a
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x6e0c0
movq %r14, %rdi
callq 0x23fb0
| _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r15, rdx
mov rbp, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov r13, [rsi]
mov [rsp+118h+var_F8], rsi
mov r14, [rsi+8]
lea r12, [rsp+118h+var_A0]
lea rbx, [rsp+118h+var_F0]
mov [rsp+118h+var_110], rdi
loc_6D2A0:
cmp r13, r14
jz loc_6D3C6
lea rdi, [rsp+118h+var_108]
mov rsi, r13
call _ZSt20dynamic_pointer_castIN5minja11UnaryOpExprENS0_10ExpressionEESt10shared_ptrIT_ERKS3_IT0_E; std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(std::shared_ptr const&<minja::Expression>)
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_6D322
mov ecx, [rax+30h]
cmp ecx, 4
jz loc_6D350
cmp ecx, 3
jnz short loc_6D322
mov rsi, [rax+20h]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp [rsp+118h+var_90], 0
jz loc_6D43B
and [rsp+118h+var_E8], 0
mov [rsp+118h+var_F0], rbp
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov [rsp+118h+var_D8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+118h+var_E0], rax
mov rdi, r12
mov rbp, rbx
mov rsi, rbx
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
jmp short loc_6D39E
loc_6D322:
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rsi, [r13+0]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbp
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<minja::Value>::emplace_back<minja::Value>(minja::Value &&)
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6D3BD
loc_6D350:
mov rsi, [rax+20h]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp [rsp+118h+var_80], 0
jz loc_6D46D
mov [rsp+118h+var_F0], rbp
mov [rsp+118h+var_E8], r12
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov [rsp+118h+var_D8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+118h+var_E0], rax
mov rdi, r12
mov rbp, rbx
mov rsi, rbx
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
loc_6D39E:
mov rdi, rbp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rbp, [rsp+118h+var_110]
loc_6D3BD:
add r13, 10h
jmp loc_6D2A0
loc_6D3C6:
mov rcx, [rsp+118h+var_F8]
mov r14, [rcx+18h]
mov rbx, [rcx+20h]
lea r12, [rbp+18h]
lea r13, [rsp+118h+var_F0]
lea rbp, [rsp+118h+var_A0]
loc_6D3E1:
cmp r14, rbx
jz short loc_6D424
mov rsi, [r14+20h]
mov rdi, r13
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbp
mov rsi, r14
mov rdx, r13
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
mov rdi, r12
mov rsi, rbp
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EE12emplace_backIJS9_EEERS9_DpOT_; std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(std::pair<std::string,minja::Value> &&)
mov rdi, rbp; void *
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
mov rdi, r13; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r14, 30h ; '0'
jmp short loc_6D3E1
loc_6D424:
mov rax, [rsp+118h+var_110]
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6D43B:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpansionOpera_0; "Expansion operator only supported on ar"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_6D49D
loc_6D46D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpansiondictO; "ExpansionDict operator only supported o"...
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, r15; void *
call ___cxa_throw
loc_6D49D:
jmp short loc_6D4A1
jmp short loc_6D4A6
loc_6D4A1:
mov r14, rax
jmp short loc_6D4C9
loc_6D4A6:
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6D4C9
jmp short loc_6D4B7
jmp short loc_6D4D5
loc_6D4B7:
mov rbp, [rsp+118h+var_110]
mov r14, rax
lea rdi, [rsp+118h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_6D4C9:
lea rdi, [rsp+118h+var_A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6D4D8
loc_6D4D5:
mov r14, rax
loc_6D4D8:
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6D51E
mov r14, rax
lea rdi, [rsp+118h+var_A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6D51E
mov r14, rax
jmp short loc_6D51E
mov r14, rax
jmp short loc_6D519
mov r14, rax
jmp short loc_6D50F
mov r14, rax
lea rdi, [rsp+118h+var_A0]; void *
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
loc_6D50F:
lea rdi, [rsp+118h+var_F0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6D519:
mov rbp, [rsp+118h+var_110]
loc_6D51E:
mov rdi, rbp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
mov rdi, r14
call __Unwind_Resume
| _OWORD * minja::ArgumentsExpression::evaluate(_OWORD *a1, void (*****a2)(void))
{
long long v2; // rbp
void (****v3)(void); // r13
void (****v4)(void); // r14
int v5; // ecx
void (****v6)(void); // r14
void (****v7)(void); // rbx
std::runtime_error *v9; // r15
std::runtime_error *exception; // r15
long long v11; // [rsp+10h] [rbp-108h] BYREF
long long v12; // [rsp+18h] [rbp-100h] BYREF
void (*****v13)(void); // [rsp+20h] [rbp-F8h]
long long v14; // [rsp+28h] [rbp-F0h] BYREF
_BYTE *v15; // [rsp+30h] [rbp-E8h]
long long ( *v16)(); // [rsp+38h] [rbp-E0h]
long long ( *v17)(); // [rsp+40h] [rbp-D8h]
_BYTE v18[16]; // [rsp+78h] [rbp-A0h] BYREF
long long v19; // [rsp+88h] [rbp-90h]
long long v20; // [rsp+98h] [rbp-80h]
v2 = (long long)a1;
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
v3 = *a2;
v13 = a2;
v4 = a2[1];
while ( v3 != v4 )
{
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(&v11, v3);
if ( !v11 )
goto LABEL_8;
v5 = *(_DWORD *)(v11 + 48);
if ( v5 == 4 )
{
minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32));
if ( !v20 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpansionDict operator only supported on objects");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v14 = v2;
v15 = v18;
v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke;
v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager;
minja::Value::for_each(v18, &v14);
}
else
{
if ( v5 != 3 )
{
LABEL_8:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
minja::Expression::evaluate((long long)v18, *v3);
std::vector<minja::Value>::emplace_back<minja::Value>(v2, (long long)v18);
minja::Value::~Value((minja::Value *)v18);
goto LABEL_12;
}
minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32));
if ( !v19 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expansion operator only supported on arrays");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = 0LL;
v14 = v2;
v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke;
v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager;
minja::Value::for_each(v18, &v14);
}
std::_Function_base::~_Function_base((std::_Function_base *)&v14);
minja::Value::~Value((minja::Value *)v18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
v2 = (long long)a1;
LABEL_12:
v3 += 2;
}
v6 = v13[3];
v7 = v13[4];
while ( v6 != v7 )
{
minja::Expression::evaluate((long long)&v14, v6[4]);
ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_(
v18,
v6,
&v14);
std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(v2 + 24, v18);
std::pair<std::string,minja::Value>::~pair(v18);
minja::Value::~Value((minja::Value *)&v14);
v6 += 6;
}
return a1;
}
| evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RDX
MOV RBP,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP + 0x20],RSI
MOV R14,qword ptr [RSI + 0x8]
LEA R12,[RSP + 0x78]
LEA RBX,[RSP + 0x28]
MOV qword ptr [RSP + 0x8],RDI
LAB_0016d2a0:
CMP R13,R14
JZ 0x0016d3c6
LEA RDI,[RSP + 0x10]
MOV RSI,R13
CALL 0x0016e0d6
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0016d322
MOV ECX,dword ptr [RAX + 0x30]
CMP ECX,0x4
JZ 0x0016d350
CMP ECX,0x3
JNZ 0x0016d322
MOV RSI,qword ptr [RAX + 0x20]
LAB_0016d2d5:
MOV RDI,R12
MOV RDX,R15
CALL 0x001635ba
CMP qword ptr [RSP + 0x88],0x0
JZ 0x0016d43b
AND qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x28],RBP
LEA RAX,[0x16e3a8]
MOV qword ptr [RSP + 0x40],RAX
LEA RAX,[0x16e3ae]
MOV qword ptr [RSP + 0x38],RAX
LAB_0016d312:
MOV RDI,R12
MOV RBP,RBX
MOV RSI,RBX
CALL 0x0016e12c
JMP 0x0016d39e
LAB_0016d322:
LEA RDI,[RSP + 0x18]
CALL 0x001503de
MOV RSI,qword ptr [R13]
LAB_0016d330:
MOV RDI,R12
MOV RDX,R15
CALL 0x001635ba
LAB_0016d33b:
MOV RDI,RBP
MOV RSI,R12
CALL 0x00169522
MOV RDI,R12
CALL 0x0016384a
JMP 0x0016d3bd
LAB_0016d350:
MOV RSI,qword ptr [RAX + 0x20]
LAB_0016d354:
MOV RDI,R12
MOV RDX,R15
CALL 0x001635ba
CMP qword ptr [RSP + 0x98],0x0
JZ 0x0016d46d
MOV qword ptr [RSP + 0x28],RBP
MOV qword ptr [RSP + 0x30],R12
LEA RAX,[0x16e404]
MOV qword ptr [RSP + 0x40],RAX
LEA RAX,[0x16e40a]
MOV qword ptr [RSP + 0x38],RAX
LAB_0016d390:
MOV RDI,R12
MOV RBP,RBX
MOV RSI,RBX
CALL 0x0016e12c
LAB_0016d39e:
MOV RDI,RBP
CALL 0x00148878
MOV RDI,R12
CALL 0x0016384a
LEA RDI,[RSP + 0x18]
CALL 0x001503de
MOV RBP,qword ptr [RSP + 0x8]
LAB_0016d3bd:
ADD R13,0x10
JMP 0x0016d2a0
LAB_0016d3c6:
MOV RCX,qword ptr [RSP + 0x20]
MOV R14,qword ptr [RCX + 0x18]
MOV RBX,qword ptr [RCX + 0x20]
LEA R12,[RBP + 0x18]
LEA R13,[RSP + 0x28]
LEA RBP,[RSP + 0x78]
LAB_0016d3e1:
CMP R14,RBX
JZ 0x0016d424
MOV RSI,qword ptr [R14 + 0x20]
LAB_0016d3ea:
MOV RDI,R13
MOV RDX,R15
CALL 0x001635ba
LAB_0016d3f5:
MOV RDI,RBP
MOV RSI,R14
MOV RDX,R13
CALL 0x0016e358
LAB_0016d403:
MOV RDI,R12
MOV RSI,RBP
CALL 0x0016e51c
LAB_0016d40e:
MOV RDI,RBP
CALL 0x0016e37e
MOV RDI,R13
CALL 0x0016384a
ADD R14,0x30
JMP 0x0016d3e1
LAB_0016d424:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016d43b:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_0016d446:
LEA RSI,[0x1b44ed]
MOV RDI,RAX
CALL 0x00123310
LAB_0016d455:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f20
LAB_0016d46d:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_0016d478:
LEA RSI,[0x1b4519]
MOV RDI,RAX
CALL 0x00123310
LAB_0016d487:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f20
|
/* minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const */
ArgumentsExpression * __thiscall
minja::ArgumentsExpression::evaluate(ArgumentsExpression *this,shared_ptr *param_1)
{
int8 *puVar1;
long lVar2;
runtime_error *prVar3;
int8 *puVar4;
long lVar5;
long local_108;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_100 [8];
shared_ptr *local_f8;
ArgumentsExpression *local_f0;
Expression *local_e8;
code *local_e0;
code *local_d8;
Expression local_a0 [16];
long local_90;
long local_80;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
puVar4 = *(int8 **)param_1;
puVar1 = *(int8 **)(param_1 + 8);
local_f8 = param_1;
do {
if (puVar4 == puVar1) {
lVar2 = *(long *)(local_f8 + 0x20);
for (lVar5 = *(long *)(local_f8 + 0x18); lVar5 != lVar2; lVar5 = lVar5 + 0x30) {
/* try { // try from 0016d3ea to 0016d3f4 has its CatchHandler @ 0016d4f8 */
Expression::evaluate((Expression *)&local_f0,*(shared_ptr **)(lVar5 + 0x20));
/* try { // try from 0016d3f5 to 0016d402 has its CatchHandler @ 0016d4fd */
_ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
((pair<std::__cxx11::string,minja::Value> *)local_a0,lVar5,(Expression *)&local_f0
);
/* try { // try from 0016d403 to 0016d40d has its CatchHandler @ 0016d502 */
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::emplace_back<std::pair<std::__cxx11::string,minja::Value>>
((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)(this + 0x18),(pair<std::__cxx11::string,minja::Value> *)local_a0);
std::pair<std::__cxx11::string,minja::Value>::~pair
((pair<std::__cxx11::string,minja::Value> *)local_a0);
Value::~Value((Value *)&local_f0);
}
return this;
}
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>((shared_ptr *)&local_108);
if (local_108 == 0) {
LAB_0016d322:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100);
/* try { // try from 0016d330 to 0016d33a has its CatchHandler @ 0016d4f3 */
Expression::evaluate(local_a0,(shared_ptr *)*puVar4);
/* try { // try from 0016d33b to 0016d345 has its CatchHandler @ 0016d4e4 */
std::vector<minja::Value,std::allocator<minja::Value>>::emplace_back<minja::Value>
((vector<minja::Value,std::allocator<minja::Value>> *)this,(Value *)local_a0);
Value::~Value((Value *)local_a0);
}
else {
if (*(int *)(local_108 + 0x30) == 4) {
/* try { // try from 0016d354 to 0016d35e has its CatchHandler @ 0016d4b5 */
Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20));
if (local_80 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016d478 to 0016d486 has its CatchHandler @ 0016d49f */
std::runtime_error::runtime_error
(prVar3,"ExpansionDict operator only supported on objects");
/* try { // try from 0016d487 to 0016d49c has its CatchHandler @ 0016d49d */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
local_d8 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}>
::_M_invoke;
local_e0 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}>
::_M_manager;
local_f0 = this;
local_e8 = local_a0;
/* try { // try from 0016d390 to 0016d39d has its CatchHandler @ 0016d4b3 */
Value::for_each((Value *)local_a0,(_Function_base *)&local_f0);
}
else {
if (*(int *)(local_108 + 0x30) != 3) goto LAB_0016d322;
/* try { // try from 0016d2d5 to 0016d2df has its CatchHandler @ 0016d4d5 */
Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20));
if (local_90 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016d446 to 0016d454 has its CatchHandler @ 0016d4a6 */
std::runtime_error::runtime_error(prVar3,"Expansion operator only supported on arrays");
/* try { // try from 0016d455 to 0016d46a has its CatchHandler @ 0016d4a1 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
local_e8 = (Expression *)0x0;
local_d8 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_invoke;
local_e0 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_manager;
local_f0 = this;
/* try { // try from 0016d312 to 0016d31f has its CatchHandler @ 0016d4b7 */
Value::for_each((Value *)local_a0,(_Function_base *)&local_f0);
}
std::_Function_base::~_Function_base((_Function_base *)&local_f0);
Value::~Value((Value *)local_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100);
}
puVar4 = puVar4 + 2;
} while( true );
}
|
|
4,180 | common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_deepseek_r1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
std::string name = function["name"];
auto parameters = function["parameters"];
auto args_rule = builder.add_schema(name + "-args", parameters);
tool_rules.push_back(builder.add_rule(name + "-call",
"\"<|tool▁call▁begin|>function<|tool▁sep|>" + name + "\\n```json\\n\" " + args_rule + " \"```<|tool▁call▁end|>\""));
});
data.grammar_triggers.push_back({"<|tool▁calls▁begin|>", /* .at_start = */ false});
data.preserved_tokens = {
"<|tool▁sep|>",
"<|tool▁call▁end|>",
};
builder.add_rule("root", "\"<|tool▁calls▁begin|>\" (" + string_join(tool_rules, " | ") + ")" + (inputs.parallel_tool_calls ? "*" : "") + " space");
}, grammar_options);
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_DEEPSEEK_R1;
return data;
} | O3 | cpp | common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x20(%rdx), %rdi
leaq 0x26bd9(%rip), %rsi # 0xa9a8c
callq 0x69d23
movb %al, 0x38(%rbx)
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xc926(%rip), %rax # 0x8f7f4
movq %rax, 0x18(%rsi)
leaq 0xcf63(%rip), %rax # 0x8fe3c
movq %rax, 0x10(%rsi)
leaq 0x2da68(%rip), %rdx # 0xb094c
leaq 0x28(%rsp), %rdi
callq 0x97590
leaq 0x18(%rbx), %rdi
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x18800
movq (%r12), %rdi
leaq 0x38(%rsp), %r12
cmpq %r12, %rdi
je 0x82f1a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x82f33
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl 0x10(%r14), %eax
testl %eax, %eax
je 0x82f63
cmpl $0x2, %eax
je 0x82f46
cmpl $0x1, %eax
jne 0x82f53
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x82f63
leaq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2c080
jmp 0x82f71
movb $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0x48(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x66442
leaq 0x58(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2d3d4
movb 0x8(%rbx), %al
leaq 0x58(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x4b8aa
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x82fed
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x48(%rsp), %rdi
callq 0x4b8aa
leaq 0x8(%rsp), %rdi
callq 0x4b8aa
movl $0x5, (%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x8306b
jmp 0x8307b
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x83039
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x83039
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x4b8aa
leaq 0x8(%rsp), %rdi
callq 0x4b8aa
jmp 0x8306b
movq %rax, %r14
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x8306b
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2bdf0
movq %r14, %rdi
callq 0x18bc0
movq %rax, %rdi
callq 0x1d81b
| _ZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputs:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea rdi, [rdx+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
lea rsi, [rsp+88h+var_80]
mov [rsi], r14
mov [rsi+8], rbx
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+88h+var_60]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r12, [rsp+88h+var_60]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea r12, [rsp+88h+var_50]
cmp rdi, r12
jz short loc_82F1A
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_82F1A:
mov rax, [rsp+88h+var_70]
test rax, rax
jz short loc_82F33
lea rdi, [rsp+88h+var_80]
mov rsi, rdi
mov edx, 3
call rax
loc_82F33:
movzx eax, byte ptr [r14+10h]
test eax, eax
jz short loc_82F63
cmp eax, 2
jz short loc_82F46
cmp eax, 1
jnz short loc_82F53
loc_82F46:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_82F63
loc_82F53:
lea rsi, [r14+10h]
lea rdi, [rsp+88h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_82F71
loc_82F63:
mov [rsp+88h+var_80], 0
mov [rsp+88h+var_78], 0
loc_82F71:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+88h+var_40]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+88h+var_88], 1
lea rdi, [rsp+88h+var_60]
lea rcx, [rsp+88h+var_80]
mov rsi, r15
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+88h+var_30]
lea rsi, [rsp+88h+var_60]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+88h+var_30]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r12
jz short loc_82FED
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_82FED:
lea rdi, [rsp+88h+var_40]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 5
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
jmp short loc_8306B
jmp short loc_8307B
mov r14, rax
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r12
jz short loc_83039
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_83039
mov r14, rax
loc_83039:
lea rdi, [rsp+88h+var_40]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_8306B
mov r14, rax
mov rax, [rsp+88h+var_70]
test rax, rax
jz short loc_8306B
lea rdi, [rsp+88h+var_80]
mov rsi, rdi
mov edx, 3
call rax
loc_8306B:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
loc_8307B:
mov rdi, rax
call __clang_call_terminate
| void common_chat_params_init_deepseek_r1(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
int v4; // eax
int v5; // r8d
char v6; // al
long long v7; // rax
void **v8; // [rsp+8h] [rbp-80h] BYREF
const minja::chat_template *v9; // [rsp+10h] [rbp-78h]
long long ( *v10)(); // [rsp+18h] [rbp-70h]
long long ( *v11)(); // [rsp+20h] [rbp-68h]
void *v12[2]; // [rsp+28h] [rbp-60h] BYREF
_QWORD v13[2]; // [rsp+38h] [rbp-50h] BYREF
void **v14[2]; // [rsp+48h] [rbp-40h] BYREF
_OWORD v15[3]; // [rsp+58h] [rbp-30h] BYREF
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v8 = (void **)a3;
v9 = a1;
v11 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v10 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11](v12, &v8, &grammar_options);
std::string::operator=((char *)a1 + 24);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( v10 )
((void ( *)(void ***, void ***, long long))v10)(&v8, &v8, 3LL);
v4 = *(unsigned __int8 *)(a3 + 16);
if ( !*(_BYTE *)(a3 + 16) || (v4 == 2 || v4 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LOBYTE(v8) = 0;
v9 = 0LL;
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)&v8,
a3 + 16);
}
v5 = *(unsigned __int8 *)(a3 + 104);
LOBYTE(v14[0]) = 0;
v14[1] = 0LL;
minja::chat_template::apply((long long)v12, a2, a3, (unsigned __int8 *)&v8, v5, v14, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v15);
v6 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v15[0];
LOBYTE(v15[0]) = v6;
v7 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = *((_QWORD *)&v15[0] + 1);
*((_QWORD *)&v15[0] + 1) = v7;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v15);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v8);
*(_DWORD *)a1 = 5;
}
| common_chat_params_init_deepseek_r1:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA RDI,[RDX + 0x20]
LEA RSI,[0x1a9a8c]
CALL 0x00169d23
MOV byte ptr [RBX + 0x38],AL
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R14
MOV qword ptr [RSI + 0x8],RBX
LEA RAX,[0x18f7f4]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x18fe3c]
MOV qword ptr [RSI + 0x10],RAX
LAB_00182edd:
LEA RDX,[0x1b094c]
LEA RDI,[RSP + 0x28]
CALL 0x00197590
LEA RDI,[RBX + 0x18]
LEA R12,[RSP + 0x28]
MOV RSI,R12
CALL 0x00118800
MOV RDI,qword ptr [R12]
LEA R12,[RSP + 0x38]
CMP RDI,R12
JZ 0x00182f1a
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_00182f1a:
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00182f33
LAB_00182f24:
LEA RDI,[RSP + 0x8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00182f33:
MOVZX EAX,byte ptr [R14 + 0x10]
TEST EAX,EAX
JZ 0x00182f63
CMP EAX,0x2
JZ 0x00182f46
CMP EAX,0x1
JNZ 0x00182f53
LAB_00182f46:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x00182f63
LAB_00182f53:
LEA RSI,[R14 + 0x10]
LEA RDI,[RSP + 0x8]
CALL 0x0012c080
JMP 0x00182f71
LAB_00182f63:
MOV byte ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
LAB_00182f71:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0x48]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_00182f87:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x28]
LEA RCX,[RSP + 0x8]
MOV RSI,R15
MOV RDX,R14
CALL 0x00166442
LAB_00182fa3:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x28]
CALL 0x0012d3d4
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0x58]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0014b8aa
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00182fed
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_00182fed:
LEA RDI,[RSP + 0x48]
CALL 0x0014b8aa
LEA RDI,[RSP + 0x8]
CALL 0x0014b8aa
MOV dword ptr [RBX],0x5
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&) */
void common_chat_params_init_deepseek_r1(chat_template *param_1,common_chat_inputs *param_2)
{
char cVar1;
int8 uVar2;
chat_template cVar3;
ulong in_RDX;
ulong local_80;
chat_template *local_78;
code *local_70;
code *local_68;
long *local_60 [2];
long local_50 [2];
data local_40 [8];
int8 local_38;
chat_template local_30 [8];
int8 local_28;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
cVar3 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar3;
local_68 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_70 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 00182edd to 00182eed has its CatchHandler @ 0018304f */
local_80 = in_RDX;
local_78 = param_1;
build_grammar_abi_cxx11_((function *)local_60,(common_grammar_options *)&local_80);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_70 != (code *)0x0) {
/* try { // try from 00182f24 to 00182f32 has its CatchHandler @ 00183018 */
(*local_70)(&local_80,&local_80,3);
}
cVar1 = *(char *)(in_RDX + 0x10);
if ((cVar1 == '\0') ||
(((cVar1 == '\x02' || (cVar1 == '\x01')) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_80 = local_80 & 0xffffffffffffff00;
local_78 = (chat_template *)0x0;
}
else {
/* try { // try from 00182f53 to 00182f60 has its CatchHandler @ 00183013 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_80,(basic_json *)(in_RDX + 0x10));
}
local_40[0] = (data)0x0;
local_38 = 0;
/* try { // try from 00182f87 to 00182fa2 has its CatchHandler @ 00183036 */
minja::chat_template::apply
((basic_json *)local_60,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_80,
*(bool *)(in_RDX + 0x68));
/* try { // try from 00182fa3 to 00182fb1 has its CatchHandler @ 0018301a */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_30,local_60);
cVar3 = param_1[8];
param_1[8] = local_30[0];
uVar2 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_28;
local_30[0] = cVar3;
local_28 = uVar2;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_30);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_80);
*(int4 *)param_1 = 5;
return;
}
|
|
4,181 | find_found(st_found_set*, unsigned int, int) | eloqsql/client/mysqltest.cc | int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
{
int i;
for (i=0 ; (uint) i < found_sets ; i++)
if (found_set[i].table_offset == table_offset &&
found_set[i].found_offset == found_offset)
return -i-2;
found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset;
found_sets++;
return -i-2; /* return new position */
} | O3 | cpp | find_found(st_found_set*, unsigned int, int):
pushq %rbp
movq %rsp, %rbp
movl 0x3ed8f4(%rip), %ecx # 0x45e344
testq %rcx, %rcx
je 0x70a6a
xorl %eax, %eax
cmpl %esi, (%rdi,%rax,8)
jne 0x70a62
cmpl %edx, 0x4(%rdi,%rax,8)
je 0x70a7c
incq %rax
cmpq %rax, %rcx
jne 0x70a57
movl %esi, (%rdi,%rcx,8)
movl %edx, 0x4(%rdi,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x3ed8ca(%rip) # 0x45e344
jmp 0x70a7e
movl %eax, %ecx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
subl %ecx, %eax
popq %rbp
retq
| _Z10find_foundP12st_found_setji:
push rbp
mov rbp, rsp
mov ecx, cs:_ZL10found_sets; found_sets
test rcx, rcx
jz short loc_70A6A
xor eax, eax
loc_70A57:
cmp [rdi+rax*8], esi
jnz short loc_70A62
cmp [rdi+rax*8+4], edx
jz short loc_70A7C
loc_70A62:
inc rax
cmp rcx, rax
jnz short loc_70A57
loc_70A6A:
mov [rdi+rcx*8], esi
mov [rdi+rcx*8+4], edx
lea eax, [rcx+1]
mov cs:_ZL10found_sets, eax; found_sets
jmp short loc_70A7E
loc_70A7C:
mov ecx, eax
loc_70A7E:
mov eax, 0FFFFFFFEh
sub eax, ecx
pop rbp
retn
| long long find_found(long long a1, int a2, int a3)
{
long long v3; // rcx
long long v4; // rax
v3 = (unsigned int)found_sets;
if ( found_sets )
{
v4 = 0LL;
while ( *(_DWORD *)(a1 + 8 * v4) != a2 || *(_DWORD *)(a1 + 8 * v4 + 4) != a3 )
{
if ( found_sets == ++v4 )
goto LABEL_6;
}
LODWORD(v3) = v4;
}
else
{
LABEL_6:
*(_DWORD *)(a1 + 8LL * (unsigned int)found_sets) = a2;
*(_DWORD *)(a1 + 8 * v3 + 4) = a3;
found_sets = v3 + 1;
}
return (unsigned int)(-2 - v3);
}
| find_found:
PUSH RBP
MOV RBP,RSP
MOV ECX,dword ptr [0x0055e344]
TEST RCX,RCX
JZ 0x00170a6a
XOR EAX,EAX
LAB_00170a57:
CMP dword ptr [RDI + RAX*0x8],ESI
JNZ 0x00170a62
CMP dword ptr [RDI + RAX*0x8 + 0x4],EDX
JZ 0x00170a7c
LAB_00170a62:
INC RAX
CMP RCX,RAX
JNZ 0x00170a57
LAB_00170a6a:
MOV dword ptr [RDI + RCX*0x8],ESI
MOV dword ptr [RDI + RCX*0x8 + 0x4],EDX
LEA EAX,[RCX + 0x1]
MOV dword ptr [0x0055e344],EAX
JMP 0x00170a7e
LAB_00170a7c:
MOV ECX,EAX
LAB_00170a7e:
MOV EAX,0xfffffffe
SUB EAX,ECX
POP RBP
RET
|
/* find_found(st_found_set*, unsigned int, int) */
int find_found(st_found_set *param_1,uint param_2,int param_3)
{
ulong uVar1;
uint uVar2;
ulong uVar3;
uVar3 = (ulong)found_sets;
if (uVar3 != 0) {
uVar1 = 0;
do {
if ((*(uint *)(param_1 + uVar1 * 8) == param_2) &&
(*(int *)(param_1 + uVar1 * 8 + 4) == param_3)) {
uVar2 = (uint)uVar1;
goto LAB_00170a7e;
}
uVar1 = uVar1 + 1;
} while (uVar3 != uVar1);
}
*(uint *)(param_1 + uVar3 * 8) = param_2;
*(int *)(param_1 + uVar3 * 8 + 4) = param_3;
uVar2 = found_sets;
found_sets = found_sets + 1;
LAB_00170a7e:
return -2 - uVar2;
}
|
|
4,182 | ma_block_get_status | eloqsql/storage/maria/ma_state.c | my_bool _ma_block_get_status(void* param, my_bool concurrent_insert)
{
MARIA_HA *info=(MARIA_HA*) param;
DBUG_ENTER("_ma_block_get_status");
DBUG_PRINT("enter", ("concurrent_insert %d", concurrent_insert));
info->row_base_length= info->s->base_length;
info->row_flag= info->s->base.default_row_flag;
DBUG_ASSERT(!concurrent_insert ||
info->lock.type == TL_WRITE_CONCURRENT_INSERT);
if (concurrent_insert || !info->autocommit)
{
info->row_flag|= ROW_FLAG_TRANSID;
info->row_base_length+= TRANSID_SIZE;
}
else
{
DBUG_ASSERT(info->lock.type != TL_WRITE_CONCURRENT_INSERT);
}
DBUG_RETURN(0);
} | O0 | c | ma_block_get_status:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4c0a8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x7c4(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, 0x610(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x418(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x618(%rax)
jmp 0x4c0db
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x4c0f1
movq -0x18(%rbp), %rax
cmpb $0x0, 0x688(%rax)
jne 0x4c11c
movq -0x18(%rbp), %rax
movl 0x618(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x618(%rax)
movq -0x18(%rbp), %rax
movq 0x610(%rax), %rcx
addq $0x6, %rcx
movq %rcx, 0x610(%rax)
jmp 0x4c122
jmp 0x4c11e
jmp 0x4c120
jmp 0x4c122
jmp 0x4c124
jmp 0x4c126
xorl %eax, %eax
popq %rbp
retq
nopw (%rax,%rax)
| _ma_block_get_status:
push rbp
mov rbp, rsp
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_4C0A8:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+7C4h]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+610h], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
mov ecx, [rax+418h]
mov rax, [rbp+var_18]
mov [rax+618h], ecx
jmp short $+2
loc_4C0DB:
movsx eax, [rbp+var_9]
cmp eax, 0
jnz short loc_4C0F1
mov rax, [rbp+var_18]
cmp byte ptr [rax+688h], 0
jnz short loc_4C11C
loc_4C0F1:
mov rax, [rbp+var_18]
mov ecx, [rax+618h]
or ecx, 1
mov [rax+618h], ecx
mov rax, [rbp+var_18]
mov rcx, [rax+610h]
add rcx, 6
mov [rax+610h], rcx
jmp short loc_4C122
loc_4C11C:
jmp short $+2
loc_4C11E:
jmp short $+2
loc_4C120:
jmp short $+2
loc_4C122:
jmp short $+2
loc_4C124:
jmp short $+2
loc_4C126:
xor eax, eax
pop rbp
retn
| long long ma_block_get_status(long long a1, char a2)
{
*(_QWORD *)(a1 + 1552) = *(unsigned int *)(*(_QWORD *)a1 + 1988LL);
*(_DWORD *)(a1 + 1560) = *(_DWORD *)(*(_QWORD *)a1 + 1048LL);
if ( a2 || !*(_BYTE *)(a1 + 1672) )
{
*(_DWORD *)(a1 + 1560) |= 1u;
*(_QWORD *)(a1 + 1552) += 6LL;
}
return 0LL;
}
| _ma_block_get_status:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0014c0a8
LAB_0014c0a8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7c4]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x610],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x418]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x618],ECX
JMP 0x0014c0db
LAB_0014c0db:
MOVSX EAX,byte ptr [RBP + -0x9]
CMP EAX,0x0
JNZ 0x0014c0f1
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x688],0x0
JNZ 0x0014c11c
LAB_0014c0f1:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x618]
OR ECX,0x1
MOV dword ptr [RAX + 0x618],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x610]
ADD RCX,0x6
MOV qword ptr [RAX + 0x610],RCX
JMP 0x0014c122
LAB_0014c11c:
JMP 0x0014c11e
LAB_0014c11e:
JMP 0x0014c120
LAB_0014c120:
JMP 0x0014c122
LAB_0014c122:
JMP 0x0014c124
LAB_0014c124:
JMP 0x0014c126
LAB_0014c126:
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_block_get_status(long *param_1,char param_2)
{
param_1[0xc2] = (ulong)*(uint *)(*param_1 + 0x7c4);
*(int4 *)(param_1 + 0xc3) = *(int4 *)(*param_1 + 0x418);
if ((param_2 != '\0') || ((char)param_1[0xd1] == '\0')) {
*(uint *)(param_1 + 0xc3) = *(uint *)(param_1 + 0xc3) | 1;
param_1[0xc2] = param_1[0xc2] + 6;
}
return 0;
}
|
|
4,183 | transid_store_packed | eloqsql/storage/maria/ma_key.c | uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid)
{
uchar *start;
uint length;
uchar buff[8];
DBUG_ASSERT(trid < (1LL << (MARIA_MAX_PACK_TRANSID_SIZE*8)));
DBUG_ASSERT(trid >= info->s->state.create_trid);
trid= (trid - info->s->state.create_trid) << 1;
/* Mark that key contains transid */
to[-1]|= 1;
if (trid < MARIA_MIN_TRANSID_PACK_OFFSET)
{
to[0]= (uchar) trid;
return 1;
}
start= to;
/* store things in low-byte-first-order in buff */
to= buff;
do
{
*to++= (uchar) trid;
trid= trid>>8;
} while (trid);
length= (uint) (to - buff);
/* Store length prefix */
start[0]= (uchar) (length + MARIA_TRANSID_PACK_OFFSET);
start++;
/* Copy things in high-byte-first order to output buffer */
do
{
*start++= *--to;
} while (to != buff);
return length+1;
} | O3 | c | transid_store_packed:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq (%rdi), %rax
subq 0xe0(%rax), %rdx
addq %rdx, %rdx
orb $0x1, -0x1(%rsi)
cmpq $0xf3, %rdx
jae 0x41db0
movb %dl, (%rsi)
movl $0x1, %eax
jmp 0x41de7
xorl %eax, %eax
movq %rdx, %rcx
movb %dl, -0x10(%rbp,%rax)
shrq $0x8, %rcx
incq %rax
cmpq $0xff, %rdx
movq %rcx, %rdx
ja 0x41db5
leal -0x7(%rax), %ecx
movb %cl, (%rsi)
incq %rsi
movq %rax, %rcx
movb -0x11(%rbp,%rcx), %dl
movb %dl, (%rsi)
incq %rsi
decq %rcx
jne 0x41dd7
incl %eax
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x41dfc
addq $0x10, %rsp
popq %rbp
retq
callq 0x2a240
| transid_store_packed:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
mov rax, [rdi]
sub rdx, [rax+0E0h]
add rdx, rdx
or byte ptr [rsi-1], 1
cmp rdx, 0F3h
jnb short loc_41DB0
mov [rsi], dl
mov eax, 1
jmp short loc_41DE7
loc_41DB0:
xor eax, eax
mov rcx, rdx
loc_41DB5:
mov [rbp+rax+var_10], dl
shr rcx, 8
inc rax
cmp rdx, 0FFh
mov rdx, rcx
ja short loc_41DB5
lea ecx, [rax-7]
mov [rsi], cl
inc rsi
mov rcx, rax
loc_41DD7:
mov dl, [rbp+rcx+var_11]
mov [rsi], dl
inc rsi
dec rcx
jnz short loc_41DD7
inc eax
loc_41DE7:
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_41DFC
add rsp, 10h
pop rbp
retn
loc_41DFC:
call ___stack_chk_fail
| long long transid_store_packed(long long a1, _BYTE *a2, long long a3)
{
unsigned long long v3; // rdx
long long v5; // rax
unsigned long long v6; // rcx
bool v7; // cc
_BYTE *v8; // rsi
long long v9; // rcx
_BYTE v10[9]; // [rsp+1h] [rbp-11h]
unsigned long long v11; // [rsp+Ah] [rbp-8h]
v11 = __readfsqword(0x28u);
v3 = 2 * (a3 - *(_QWORD *)(*(_QWORD *)a1 + 224LL));
*(a2 - 1) |= 1u;
if ( v3 >= 0xF3 )
{
v5 = 0LL;
v6 = v3;
do
{
v10[v5 + 1] = v3;
v6 >>= 8;
++v5;
v7 = v3 <= 0xFF;
v3 = v6;
}
while ( !v7 );
*a2 = v5 - 7;
v8 = a2 + 1;
v9 = v5;
do
*v8++ = v10[v9--];
while ( v9 );
return (unsigned int)(v5 + 1);
}
else
{
*a2 = v3;
return 1LL;
}
}
| transid_store_packed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RDI]
SUB RDX,qword ptr [RAX + 0xe0]
ADD RDX,RDX
OR byte ptr [RSI + -0x1],0x1
CMP RDX,0xf3
JNC 0x00141db0
MOV byte ptr [RSI],DL
MOV EAX,0x1
JMP 0x00141de7
LAB_00141db0:
XOR EAX,EAX
MOV RCX,RDX
LAB_00141db5:
MOV byte ptr [RBP + RAX*0x1 + -0x10],DL
SHR RCX,0x8
INC RAX
CMP RDX,0xff
MOV RDX,RCX
JA 0x00141db5
LEA ECX,[RAX + -0x7]
MOV byte ptr [RSI],CL
INC RSI
MOV RCX,RAX
LAB_00141dd7:
MOV DL,byte ptr [RBP + RCX*0x1 + -0x11]
MOV byte ptr [RSI],DL
INC RSI
DEC RCX
JNZ 0x00141dd7
INC EAX
LAB_00141de7:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x00141dfc
ADD RSP,0x10
POP RBP
RET
LAB_00141dfc:
CALL 0x0012a240
|
int transid_store_packed(long *param_1,char *param_2,long param_3)
{
bool bVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int8 uStack_20;
char local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar5 = (param_3 - *(long *)(*param_1 + 0xe0)) * 2;
param_2[-1] = param_2[-1] | 1;
if (uVar5 < 0xf3) {
*param_2 = (char)uVar5;
iVar2 = 1;
}
else {
lVar3 = 0;
do {
lVar4 = lVar3;
local_18[lVar4] = (char)uVar5;
lVar3 = lVar4 + 1;
bVar1 = 0xff < uVar5;
uVar5 = uVar5 >> 8;
} while (bVar1);
*param_2 = (char)lVar4 + -6;
param_2 = param_2 + 1;
lVar4 = lVar3;
do {
*param_2 = local_18[lVar4 + -1];
param_2 = param_2 + 1;
lVar4 = lVar4 + -1;
} while (lVar4 != 0);
iVar2 = (int)lVar3 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return iVar2;
}
/* WARNING: Subroutine does not return */
uStack_20 = transid_get_packed;
__stack_chk_fail();
}
|
|
4,184 | nglog::LogDestination::AddLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::AddLogSink(LogSink* destination) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
SinkLock l{sink_mutex_};
if (sinks_ == nullptr) sinks_ = std::make_unique<std::vector<LogSink*>>();
sinks_->push_back(destination);
} | O2 | cpp | nglog::LogDestination::AddLogSink(nglog::LogSink*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x21531(%rip), %rdi # 0x31cb8
callq 0x1cce6
movq 0x2151d(%rip), %rdi # 0x31cb0
testq %rdi, %rdi
jne 0x107c5
movq %rsp, %rdi
callq 0x113e4
movq %rsp, %rbx
movq (%rbx), %rsi
andq $0x0, (%rbx)
leaq 0x214ff(%rip), %rdi # 0x31cb0
callq 0x11422
movq %rbx, %rdi
callq 0xffce
movq 0x214eb(%rip), %rdi # 0x31cb0
leaq 0x8(%rsp), %rsi
callq 0x11404
leaq 0x214e2(%rip), %rdi # 0x31cb8
callq 0x87a0
addq $0x10, %rsp
popq %rbx
retq
jmp 0x107e3
movq %rax, %rbx
leaq 0x214cb(%rip), %rdi # 0x31cb8
callq 0x87a0
movq %rbx, %rdi
callq 0x8a40
| _ZN5nglog14LogDestination10AddLogSinkEPNS_7LogSinkE:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void)
mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rdi, rdi
jnz short loc_107C5
mov rdi, rsp
call _ZSt11make_uniqueISt6vectorIPN5nglog7LogSinkESaIS3_EEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::vector<nglog::LogSink *>>()
mov rbx, rsp
mov rsi, [rbx]
and qword ptr [rbx], 0
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*)
mov rdi, rbx; void *
call _ZNSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr()
mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
loc_107C5:
lea rsi, [rsp+18h+var_10]
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE9push_backERKS2_; std::vector<nglog::LogSink *>::push_back(nglog::LogSink * const&)
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
retn
jmp short $+2
loc_107E3:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::AddLogSink(nglog::LogDestination *this, nglog::LogSink *a2)
{
long long v2; // rdi
long long v3; // rsi
long long v5; // [rsp+0h] [rbp-18h] BYREF
nglog::LogDestination *v6; // [rsp+8h] [rbp-10h] BYREF
v6 = this;
std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
v2 = nglog::LogDestination::sinks_;
if ( !nglog::LogDestination::sinks_ )
{
std::make_unique<std::vector<nglog::LogSink *>>(&v5, a2);
v3 = v5;
v5 = 0LL;
std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(
&nglog::LogDestination::sinks_,
v3);
std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr(&v5);
v2 = nglog::LogDestination::sinks_;
}
std::vector<nglog::LogSink *>::push_back(v2, &v6);
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| AddLogSink:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x131cb8]
CALL 0x0011cce6
MOV RDI,qword ptr [0x00131cb0]
TEST RDI,RDI
JNZ 0x001107c5
LAB_00110798:
MOV RDI,RSP
CALL 0x001113e4
MOV RBX,RSP
MOV RSI,qword ptr [RBX]
AND qword ptr [RBX],0x0
LEA RDI,[0x131cb0]
CALL 0x00111422
MOV RDI,RBX
CALL 0x0010ffce
MOV RDI,qword ptr [0x00131cb0]
LAB_001107c5:
LEA RSI,[RSP + 0x8]
CALL 0x00111404
LAB_001107cf:
LEA RDI,[0x131cb8]
CALL 0x001087a0
ADD RSP,0x10
POP RBX
RET
|
/* nglog::LogDestination::AddLogSink(nglog::LogSink*) */
void nglog::LogDestination::AddLogSink(LogSink *param_1)
{
vector *pvVar1;
vector *local_18;
LogSink *local_10;
local_10 = param_1;
std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_);
if (sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) {
/* try { // try from 00110798 to 0011079f has its CatchHandler @ 001107e1 */
std::make_unique<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>();
pvVar1 = local_18;
local_18 = (vector *)0x0;
std::
__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_,pvVar1);
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::~unique_ptr((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&local_18);
}
/* try { // try from 001107c5 to 001107ce has its CatchHandler @ 001107e3 */
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::push_back(sinks_,&local_10);
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
|
|
4,185 | my_strnxfrm_8bit_nopad_bin | eloqsql/strings/ctype-bin.c | static size_t
my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs,
uchar * dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
set_if_smaller(srclen, dstlen);
set_if_smaller(srclen, nweights);
if (dst != src)
memcpy(dst, src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen,
dst + dstlen,(uint)(nweights - srclen),
flags, 0);
} | O0 | c | my_strnxfrm_8bit_nopad_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x37b64
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x37b66
jmp 0x37b68
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x37b7b
movl -0x1c(%rbp), %eax
movq %rax, -0x30(%rbp)
jmp 0x37b7d
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x37b98
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x24220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
subq -0x30(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x437d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strnxfrm_8bit_nopad_bin:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
jbe short loc_37B64
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_37B64:
jmp short $+2
loc_37B66:
jmp short $+2
loc_37B68:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_37B7B
mov eax, [rbp+var_1C]
mov [rbp+var_30], rax
loc_37B7B:
jmp short $+2
loc_37B7D:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jz short loc_37B98
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call _memcpy
loc_37B98:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_30]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov eax, [rbp+var_1C]
sub rax, [rbp+var_30]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+40h+var_40], 0
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 40h
pop rbp
retn
| long long my_strnxfrm_8bit_nopad_bin(
int a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-30h]
int v10; // [rsp+28h] [rbp-18h]
v10 = a3;
v8 = a6;
if ( a6 > a3 )
v8 = a3;
if ( v8 > a4 )
v8 = a4;
if ( a2 != a5 )
memcpy(a2, a5, v8);
return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)v8 + (int)a2, v10 + (int)a2, a4 - (unsigned int)v8, a7, 0);
}
| my_strnxfrm_8bit_nopad_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00137b64
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_00137b64:
JMP 0x00137b66
LAB_00137b66:
JMP 0x00137b68
LAB_00137b68:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x00137b7b
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x30],RAX
LAB_00137b7b:
JMP 0x00137b7d
LAB_00137b7d:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00137b98
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00124220
LAB_00137b98:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
SUB RAX,qword ptr [RBP + -0x30]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001437d0
ADD RSP,0x40
POP RBP
RET
|
void my_strnxfrm_8bit_nopad_bin
(int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,int4 param_7)
{
int8 local_38;
local_38 = param_6;
if (param_3 < param_6) {
local_38 = param_3;
}
if (param_4 < local_38) {
local_38 = (ulong)param_4;
}
if (param_2 != param_5) {
memcpy(param_2,param_5,local_38);
}
my_strxfrm_pad_desc_and_reverse_nopad
(param_1,param_2,(long)param_2 + local_38,(long)param_2 + param_3,
param_4 - (int)local_38,param_7,0);
return;
}
|
|
4,186 | bool 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>::contains<char const (&) [5], 0>(char const (&) [5]) const | monkey531[P]llama/common/./json.hpp | constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
} | O3 | cpp | bool 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>::contains<char const (&) [5], 0>(char const (&) [5]) const:
cmpb $0x1, (%rdi)
jne 0x68a0f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq (%r12), %rbx
cmpq 0x8(%r12), %rbx
je 0x68a12
movq %rsi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x181a0
testl %eax, %eax
je 0x68a02
addq $0x30, %rbx
cmpq 0x8(%r12), %rbx
jne 0x689e8
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
jmp 0x68a15
xorl %eax, %eax
retq
movq %rbx, %rax
cmpq %rbx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_68A0F
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [r12]
cmp rbx, [r12+8]
jz short loc_68A12
mov r15, rsi
loc_689E8:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_68A02
add rbx, 30h ; '0'
cmp rbx, [r12+8]
jnz short loc_689E8
loc_68A02:
mov rax, rbx
mov rcx, [r14+8]
mov rbx, [rcx+8]
jmp short loc_68A15
loc_68A0F:
xor eax, eax
retn
loc_68A12:
mov rax, rbx
loc_68A15:
cmp rax, rbx
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
if ( *v2 == v2[1] )
{
v4 = *v2;
}
else
{
do
{
if ( !(unsigned int)std::string::compare(v3, a2) )
break;
v3 += 48LL;
}
while ( v3 != v2[1] );
v4 = v3;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
return v4 != v3;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x00168a0f
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [R12]
CMP RBX,qword ptr [R12 + 0x8]
JZ 0x00168a12
MOV R15,RSI
LAB_001689e8:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001181a0
TEST EAX,EAX
JZ 0x00168a02
ADD RBX,0x30
CMP RBX,qword ptr [R12 + 0x8]
JNZ 0x001689e8
LAB_00168a02:
MOV RAX,RBX
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
JMP 0x00168a15
LAB_00168a0f:
XOR EAX,EAX
RET
LAB_00168a12:
MOV RAX,RBX
LAB_00168a15:
CMP RAX,RBX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)*plVar1;
pcVar4 = pcVar3;
if (pcVar3 != (char *)plVar1[1]) {
do {
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar3 = pcVar3 + 0x30;
} while (pcVar3 != (char *)plVar1[1]);
pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4);
}
|
|
4,187 | ggml_set_f32_nd | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c | void ggml_set_f32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, float value) {
void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3];
switch (tensor->type) {
case GGML_TYPE_I8:
{
((int8_t *)(data))[0] = value;
} break;
case GGML_TYPE_I16:
{
((int16_t *)(data))[0] = value;
} break;
case GGML_TYPE_I32:
{
((int32_t *)(data))[0] = value;
} break;
case GGML_TYPE_F16:
{
((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value);
} break;
case GGML_TYPE_BF16:
{
((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value);
} break;
case GGML_TYPE_F32:
{
((float *)(data))[0] = value;
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O1 | c | ggml_set_f32_nd:
movslq %esi, %rsi
imulq 0x30(%rdi), %rsi
addq 0xf8(%rdi), %rsi
movslq %edx, %rdx
imulq 0x38(%rdi), %rdx
movslq %ecx, %rax
imulq 0x40(%rdi), %rax
addq %rdx, %rax
addq %rsi, %rax
movslq %r8d, %rcx
imulq 0x48(%rdi), %rcx
movl (%rdi), %edx
leal -0x18(%rdx), %esi
cmpl $0x6, %esi
ja 0xd1a1
leaq 0x3c014(%rip), %rdx # 0x491a4
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
vcvttss2si %xmm0, %edx
movb %dl, (%rax,%rcx)
retq
testl %edx, %edx
je 0xd1e7
cmpl $0x1, %edx
jne 0xd200
vcvtps2ph $0x0, %xmm0, %xmm0
vpextrw $0x0, %xmm0, (%rax,%rcx)
retq
vcvttss2si %xmm0, %edx
movw %dx, (%rax,%rcx)
retq
vcvttss2si %xmm0, %edx
movl %edx, (%rax,%rcx)
retq
vmovd %xmm0, %esi
movl %esi, %edi
andl $0x7fffffff, %edi # imm = 0x7FFFFFFF
movl %esi, %edx
shrl $0x10, %edx
cmpl $0x7f800001, %edi # imm = 0x7F800001
jb 0xd1ed
orl $0x40, %edx
jmp 0xd1fb
vmovss %xmm0, (%rax,%rcx)
retq
andl $0x1, %edx
addl %esi, %edx
addl $0x7fff, %edx # imm = 0x7FFF
shrl $0x10, %edx
movw %dx, (%rax,%rcx)
retq
pushq %rax
leaq 0x3c30a(%rip), %rdi # 0x49512
leaq 0x3c471(%rip), %rdx # 0x49680
movl $0x48f, %esi # imm = 0x48F
xorl %eax, %eax
callq 0xaf40
| ggml_set_f32_nd:
movsxd rsi, esi
imul rsi, [rdi+30h]
add rsi, [rdi+0F8h]
movsxd rdx, edx
imul rdx, [rdi+38h]
movsxd rax, ecx
imul rax, [rdi+40h]
add rax, rdx
add rax, rsi
movsxd rcx, r8d
imul rcx, [rdi+48h]
mov edx, [rdi]
lea esi, [rdx-18h]; switch 7 cases
cmp esi, 6
ja short def_D197; jumptable 000000000000D197 default case
lea rdx, jpt_D197
movsxd rsi, ds:(jpt_D197 - 491A4h)[rdx+rsi*4]
add rsi, rdx
jmp rsi; switch jump
loc_D199:
vcvttss2si edx, xmm0; jumptable 000000000000D197 case 24
mov [rax+rcx], dl
retn
def_D197:
test edx, edx; jumptable 000000000000D197 default case
jz short loc_D1E7
cmp edx, 1
jnz short loc_D200; jumptable 000000000000D197 cases 27-29
vcvtps2ph xmm0, xmm0, 0
vpextrw word ptr [rax+rcx], xmm0, 0
retn
loc_D1B8:
vcvttss2si edx, xmm0; jumptable 000000000000D197 case 25
mov [rax+rcx], dx
retn
loc_D1C1:
vcvttss2si edx, xmm0; jumptable 000000000000D197 case 26
mov [rax+rcx], edx
retn
loc_D1C9:
vmovd esi, xmm0; jumptable 000000000000D197 case 30
mov edi, esi
and edi, 7FFFFFFFh
mov edx, esi
shr edx, 10h
cmp edi, 7F800001h
jb short loc_D1ED
or edx, 40h
jmp short loc_D1FB
loc_D1E7:
vmovss dword ptr [rax+rcx], xmm0
retn
loc_D1ED:
and edx, 1
add edx, esi
add edx, 7FFFh
shr edx, 10h
loc_D1FB:
mov [rax+rcx], dx
retn
loc_D200:
push rax; jumptable 000000000000D197 cases 27-29
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 48Fh
xor eax, eax
call _ggml_abort
| long long ggml_set_f32_nd(int *a1, int a2, int a3, int a4, int a5, __m128 _XMM0)
{
long long result; // rax
int v8; // edx
unsigned int v14; // edx
result = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4;
_RCX = *((_QWORD *)a1 + 9) * a5;
v8 = *a1;
switch ( *a1 )
{
case 24:
__asm { vcvttss2si edx, xmm0; jumptable 000000000000D197 case 24 }
*(_BYTE *)(result + _RCX) = _EDX;
break;
case 25:
__asm { vcvttss2si edx, xmm0; jumptable 000000000000D197 case 25 }
*(_WORD *)(result + _RCX) = _EDX;
break;
case 26:
__asm { vcvttss2si edx, xmm0; jumptable 000000000000D197 case 26 }
*(_DWORD *)(result + _RCX) = _EDX;
break;
case 27:
case 28:
case 29:
goto LABEL_13;
case 30:
__asm { vmovd esi, xmm0; jumptable 000000000000D197 case 30 }
if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 )
v14 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16;
else
LOWORD(v14) = HIWORD(_ESI) | 0x40;
*(_WORD *)(result + _RCX) = v14;
break;
default:
if ( v8 )
{
if ( v8 == 1 )
{
__asm
{
vcvtps2ph xmm0, xmm0, 0
vpextrw word ptr [rax+rcx], xmm0, 0
}
}
else
{
LABEL_13:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c",
1167LL,
"fatal error",
_RCX);
result = ggml_threadpool_free();
}
}
else
{
__asm { vmovss dword ptr [rax+rcx], xmm0 }
}
break;
}
return result;
}
| ggml_set_f32_nd:
MOVSXD RSI,ESI
IMUL RSI,qword ptr [RDI + 0x30]
ADD RSI,qword ptr [RDI + 0xf8]
MOVSXD RDX,EDX
IMUL RDX,qword ptr [RDI + 0x38]
MOVSXD RAX,ECX
IMUL RAX,qword ptr [RDI + 0x40]
ADD RAX,RDX
ADD RAX,RSI
MOVSXD RCX,R8D
IMUL RCX,qword ptr [RDI + 0x48]
MOV EDX,dword ptr [RDI]
LEA ESI,[RDX + -0x18]
CMP ESI,0x6
JA 0x0010d1a1
LEA RDX,[0x1491a4]
MOVSXD RSI,dword ptr [RDX + RSI*0x4]
ADD RSI,RDX
switchD:
JMP RSI
caseD_18:
VCVTTSS2SI EDX,XMM0
MOV byte ptr [RAX + RCX*0x1],DL
RET
default:
TEST EDX,EDX
JZ 0x0010d1e7
CMP EDX,0x1
JNZ 0x0010d200
VCVTPS2PH XMM0,XMM0,0x0
VPEXTRW word ptr [RAX + RCX*0x1],XMM0,0x0
RET
caseD_19:
VCVTTSS2SI EDX,XMM0
MOV word ptr [RAX + RCX*0x1],DX
RET
caseD_1a:
VCVTTSS2SI EDX,XMM0
MOV dword ptr [RAX + RCX*0x1],EDX
RET
caseD_1e:
VMOVD ESI,XMM0
MOV EDI,ESI
AND EDI,0x7fffffff
MOV EDX,ESI
SHR EDX,0x10
CMP EDI,0x7f800001
JC 0x0010d1ed
OR EDX,0x40
JMP 0x0010d1fb
LAB_0010d1e7:
VMOVSS dword ptr [RAX + RCX*0x1],XMM0
RET
LAB_0010d1ed:
AND EDX,0x1
ADD EDX,ESI
ADD EDX,0x7fff
SHR EDX,0x10
LAB_0010d1fb:
MOV word ptr [RAX + RCX*0x1],DX
RET
caseD_1b:
PUSH RAX
LEA RDI,[0x149512]
LEA RDX,[0x149680]
MOV ESI,0x48f
XOR EAX,EAX
CALL 0x0010af40
|
int8 ggml_set_f32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5)
{
int iVar1;
long lVar2;
long lVar3;
ushort uVar4;
float fVar5;
int1 in_XMM0 [16];
int1 auVar7 [16];
int8 uVar6;
lVar2 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) +
(long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e);
lVar3 = (long)param_5 * *(long *)(param_1 + 0x12);
iVar1 = *param_1;
fVar5 = in_XMM0._0_4_;
uVar6 = in_XMM0._0_8_;
switch(iVar1) {
case 0x18:
*(char *)(lVar2 + lVar3) = (char)(int)fVar5;
return uVar6;
case 0x19:
*(short *)(lVar2 + lVar3) = (short)(int)fVar5;
return uVar6;
case 0x1a:
*(int *)(lVar2 + lVar3) = (int)fVar5;
return uVar6;
case 0x1b:
case 0x1c:
case 0x1d:
goto switchD_0010d197_caseD_1b;
case 0x1e:
if ((uint)ABS(fVar5) < 0x7f800001) {
uVar4 = (ushort)(((uint)fVar5 >> 0x10 & 1) + (int)fVar5 + 0x7fff >> 0x10);
}
else {
uVar4 = in_XMM0._2_2_ | 0x40;
}
*(ushort *)(lVar2 + lVar3) = uVar4;
return uVar6;
default:
if (iVar1 == 0) {
*(float *)(lVar2 + lVar3) = fVar5;
return uVar6;
}
if (iVar1 == 1) {
auVar7 = vcvtps2ph_f16c(in_XMM0,0);
vpextrw_avx(auVar7,0);
return auVar7._0_8_;
}
switchD_0010d197_caseD_1b:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c"
,0x48f,"fatal error");
}
}
|
|
4,188 | common_sampler_init(llama_model const*, common_params_sampling const&) | monkey531[P]llama/common/sampling.cpp | struct common_sampler * common_sampler_init(const struct llama_model * model, const struct common_params_sampling & params) {
const llama_vocab * vocab = llama_model_get_vocab(model);
llama_sampler_chain_params lparams = llama_sampler_chain_default_params();
lparams.no_perf = params.no_perf;
std::vector<const char *> trigger_words;
trigger_words.reserve(params.grammar_trigger_words.size());
for (const auto & str : params.grammar_trigger_words) {
trigger_words.push_back(str.word.c_str());
}
struct llama_sampler * grmr;
if (params.grammar.compare(0, 11, "%llguidance") == 0) {
#ifdef LLAMA_USE_LLGUIDANCE
grmr = llama_sampler_init_llg(vocab, "lark", params.grammar.c_str());
#else
GGML_ABORT("llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
#endif // LLAMA_USE_LLGUIDANCE
} else {
grmr = params.grammar_lazy
? llama_sampler_init_grammar_lazy(vocab, params.grammar.c_str(), "root",
trigger_words.data(), trigger_words.size(),
params.grammar_trigger_tokens.data(), params.grammar_trigger_tokens.size())
: llama_sampler_init_grammar(vocab, params.grammar.c_str(), "root");
}
auto * result = new common_sampler {
/* .params = */ params,
/* .grmr = */ grmr,
/* .chain = */ llama_sampler_chain_init(lparams),
/* .prev = */ ring_buffer<llama_token>(std::max(32, params.n_prev)),
/* .cur = */ {},
/* .cur_p = */ {},
};
llama_sampler_chain_add(result->chain,
llama_sampler_init_logit_bias(
llama_vocab_n_tokens(vocab),
params.logit_bias.size(),
params.logit_bias.data()));
if (params.mirostat == 0) {
for (const auto & cnstr : params.samplers) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY:
{
std::vector<const char *> c_breakers;
c_breakers.reserve(params.dry_sequence_breakers.size());
for (const auto & str : params.dry_sequence_breakers) {
c_breakers.push_back(str.c_str());
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dry (vocab, llama_model_n_ctx_train(model), params.dry_multiplier, params.dry_base, params.dry_allowed_length, params.dry_penalty_last_n, c_breakers.data(), c_breakers.size()));
}
break;
case COMMON_SAMPLER_TYPE_TOP_K:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_k (params.top_k));
break;
case COMMON_SAMPLER_TYPE_TOP_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_p (params.top_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_MIN_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_min_p (params.min_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_XTC:
llama_sampler_chain_add(result->chain, llama_sampler_init_xtc (params.xtc_probability, params.xtc_threshold, params.min_keep, params.seed));
break;
case COMMON_SAMPLER_TYPE_TYPICAL_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_typical (params.typ_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_TEMPERATURE:
llama_sampler_chain_add(result->chain, llama_sampler_init_temp_ext (params.temp, params.dynatemp_range, params.dynatemp_exponent));
break;
case COMMON_SAMPLER_TYPE_INFILL:
llama_sampler_chain_add(result->chain, llama_sampler_init_infill (vocab));
break;
case COMMON_SAMPLER_TYPE_PENALTIES:
llama_sampler_chain_add(result->chain, llama_sampler_init_penalties(params.penalty_last_n, params.penalty_repeat, params.penalty_freq, params.penalty_present));
break;
default:
GGML_ASSERT(false && "unknown sampler type");
}
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dist(params.seed));
} else if (params.mirostat == 1) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat(llama_vocab_n_tokens(vocab), params.seed, params.mirostat_tau, params.mirostat_eta, 100));
} else if (params.mirostat == 2) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat_v2(params.seed, params.mirostat_tau, params.mirostat_eta));
} else {
GGML_ASSERT(false && "unknown mirostat version");
}
return result;
} | O1 | cpp | common_sampler_init(llama_model const*, common_params_sampling const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, 0x58(%rsp)
callq 0x1c190
movq %rax, 0x8(%rsp)
callq 0x1bd60
movb 0x61(%rbx), %bpl
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
callq 0xd04f6
movq 0xc0(%rbx), %r15
movq 0xc8(%rbx), %r13
cmpq %r13, %r15
je 0xced87
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r12
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xd0bc0
addq $0x28, %r15
cmpq %r13, %r15
jne 0xced6b
leaq 0x98(%rbx), %rdi
leaq 0x29690(%rip), %rcx # 0xf8425
movl $0xb, %edx
xorl %esi, %esi
callq 0x1bba0
testl %eax, %eax
je 0xcf18f
movq 0x98(%rbx), %rsi
cmpb $0x1, 0xb8(%rbx)
jne 0xcedf6
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xd8(%rbx), %r9
movq 0xe0(%rbx), %rax
subq %r9, %rax
sarq $0x2, %rax
movq %rax, (%rsp)
leaq 0x28c55(%rip), %rdx # 0xf7a3f
movq 0x8(%rsp), %rdi
callq 0x1b740
jmp 0xcee07
leaq 0x28c42(%rip), %rdx # 0xf7a3f
movq 0x8(%rsp), %rdi
callq 0x1b180
movq %rax, %r12
movl $0x1b8, %edi # imm = 0x1B8
callq 0x1b8d0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x54ed2
movq %r12, 0x138(%r14)
movzbl %bpl, %edi
callq 0x1b4e0
movq %rax, 0x140(%r14)
movl 0x4(%rbx), %eax
cmpl $0x21, %eax
movl $0x20, %esi
cmovgel %eax, %esi
movq %rsi, 0x148(%r14)
movq %r14, %rdi
addq $0x168, %rdi # imm = 0x168
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movq $0x0, 0x160(%r14)
leaq 0x10(%rsp), %rdx
callq 0x79e82
xorps %xmm0, %xmm0
movups %xmm0, 0x1a0(%r14)
movups %xmm0, 0x190(%r14)
movups %xmm0, 0x180(%r14)
movq $0x0, 0x1b0(%r14)
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c110
movq 0x120(%rbx), %rdx
movq 0x128(%rbx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
movl %eax, %edi
callq 0x1be90
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9a0
movl 0x54(%rbx), %eax
cmpl $0x2, %eax
je 0xcf117
cmpl $0x1, %eax
je 0xcf0d0
testl %eax, %eax
jne 0xcf1ca
movq 0x80(%rbx), %r15
movq 0x88(%rbx), %rbp
cmpq %rbp, %r15
je 0xcf14d
leaq 0x10(%rsp), %r13
movq %rbp, 0x50(%rsp)
movl (%r15), %eax
decl %eax
cmpl $0x9, %eax
ja 0xcf1a9
leaq 0x29337(%rip), %rcx # 0xf8260
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x70(%rbx), %rsi
subq 0x68(%rbx), %rsi
sarq $0x5, %rsi
movq %r13, %rdi
callq 0xd04f6
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %rbp
cmpq %rbp, %r12
je 0xcf069
movq (%r12), %rax
movq %rax, 0x60(%rsp)
movq %r13, %rdi
leaq 0x60(%rsp), %rsi
callq 0xd0bc0
addq $0x20, %r12
jmp 0xcef5f
movq 0x140(%r14), %r12
movl 0x34(%rbx), %edi
movss 0x38(%rbx), %xmm0
movss 0x3c(%rbx), %xmm1
movss 0x40(%rbx), %xmm2
callq 0x1b700
jmp 0xcf04c
movq 0x140(%r14), %r12
movss 0x24(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b6c0
jmp 0xcf04c
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
movss 0x2c(%rbx), %xmm1
movss 0x30(%rbx), %xmm2
callq 0x1c0d0
jmp 0xcf04c
movq 0x140(%r14), %r12
movss 0x14(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b130
jmp 0xcf04c
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1bd20
jmp 0xcf04c
movq 0x140(%r14), %r12
movss 0x18(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1bc50
jmp 0xcf04c
movq 0x140(%r14), %r12
movl 0x10(%rbx), %edi
callq 0x1b400
jmp 0xcf04c
movq 0x140(%r14), %r12
movss 0x1c(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
movslq 0xc(%rbx), %rdi
movl (%rbx), %esi
callq 0x1b2b0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9a0
addq $0x4, %r15
cmpq %rbp, %r15
jne 0xcef14
jmp 0xcf14d
movq 0x140(%r14), %r12
movq 0x58(%rsp), %rdi
callq 0x1b890
movss 0x44(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movl 0x4c(%rbx), %edx
movl 0x50(%rbx), %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
subq %r8, %r9
sarq $0x3, %r9
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x1bec0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x50(%rsp), %rbp
je 0xcf057
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b900
jmp 0xcf057
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
callq 0x1b550
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9a0
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c110
movl (%rbx), %esi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
movl %eax, %edi
movl $0x64, %edx
callq 0x1c180
jmp 0xcf15b
movq 0x140(%r14), %r15
movss 0x28(%rbx), %xmm0
callq 0x1b550
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b9a0
movq 0x140(%r14), %r12
movl (%rbx), %edi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
callq 0x1bea0
jmp 0xcf15b
movq 0x140(%r14), %r12
movl (%rbx), %edi
callq 0x1bd80
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9a0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcf17d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b900
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2929b(%rip), %rdi # 0xf8431
leaq 0x292e2(%rip), %rdx # 0xf847f
movl $0xa5, %esi
xorl %eax, %eax
callq 0x1bed0
leaq 0x29281(%rip), %rdi # 0xf8431
leaq 0x1a0ea(%rip), %rdx # 0xe92a1
leaq 0x292f9(%rip), %rcx # 0xf84b7
movl $0xe5, %esi
xorl %eax, %eax
callq 0x1bed0
leaq 0x29260(%rip), %rdi # 0xf8431
leaq 0x1a0c9(%rip), %rdx # 0xe92a1
leaq 0x292f8(%rip), %rcx # 0xf84d7
movl $0xf0, %esi
xorl %eax, %eax
callq 0x1bed0
jmp 0xcf22f
jmp 0xcf1ef
movq %rax, %rbx
movq %r14, %rdi
callq 0x22eb8
jmp 0xcf1ff
movq %rax, %rbx
movl $0x1b8, %esi # imm = 0x1B8
movq %r14, %rdi
jmp 0xcf228
jmp 0xcf22f
jmp 0xcf213
jmp 0xcf22f
jmp 0xcf22f
jmp 0xcf22f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcf232
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b900
jmp 0xcf232
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcf249
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b900
movq %rbx, %rdi
callq 0x1bfd0
| _Z19common_sampler_initPK11llama_modelRK22common_params_sampling:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rsi
mov [rsp+98h+var_40], rdi
call _llama_model_get_vocab
mov [rsp+98h+var_90], rax
call _llama_sampler_chain_default_params
mov bpl, [rbx+61h]
xorps xmm0, xmm0
lea rdi, [rsp+98h+var_68]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rbx+0C8h]
sub rax, [rbx+0C0h]
sar rax, 3
mov rsi, 0CCCCCCCCCCCCCCCDh
imul rsi, rax
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r15, [rbx+0C0h]
mov r13, [rbx+0C8h]
cmp r15, r13
jz short loc_CED87
lea r14, [rsp+98h+var_68]
lea r12, [rsp+98h+var_88]
loc_CED6B:
mov rax, [r15]
mov [rsp+98h+var_88], rax
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r15, 28h ; '('
cmp r15, r13
jnz short loc_CED6B
loc_CED87:
lea rdi, [rbx+98h]
lea rcx, aLlguidance; "%llguidance"
mov edx, 0Bh
xor esi, esi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
test eax, eax
jz loc_CF18F
mov rsi, [rbx+98h]
cmp byte ptr [rbx+0B8h], 1
jnz short loc_CEDF6
mov rcx, [rsp+98h+var_68]
mov r8, [rsp+98h+var_60]
sub r8, rcx
sar r8, 3
mov r9, [rbx+0D8h]
mov rax, [rbx+0E0h]
sub rax, r9
sar rax, 2
mov [rsp+98h+var_98], rax
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar_lazy
jmp short loc_CEE07
loc_CEDF6:
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar
loc_CEE07:
mov r12, rax
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov [r14+138h], r12
movzx edi, bpl
call _llama_sampler_chain_init
mov [r14+140h], rax
mov eax, [rbx+4]
cmp eax, 21h ; '!'
mov esi, 20h ; ' '
cmovge esi, eax
mov [r14+148h], rsi
mov rdi, r14
add rdi, 168h
xorps xmm0, xmm0
movups xmmword ptr [r14+150h], xmm0
mov qword ptr [r14+160h], 0
lea rdx, [rsp+98h+var_88]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
xorps xmm0, xmm0
movups xmmword ptr [r14+1A0h], xmm0
movups xmmword ptr [r14+190h], xmm0
movups xmmword ptr [r14+180h], xmm0
mov qword ptr [r14+1B0h], 0
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov rdx, [rbx+120h]
mov rsi, [rbx+128h]
sub rsi, rdx
shr rsi, 3
mov edi, eax
call _llama_sampler_init_logit_bias
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov eax, [rbx+54h]
cmp eax, 2
jz loc_CF117
cmp eax, 1
jz loc_CF0D0
test eax, eax
jnz loc_CF1CA
mov r15, [rbx+80h]
mov rbp, [rbx+88h]
cmp r15, rbp
jz loc_CF14D
lea r13, [rsp+98h+var_88]
mov [rsp+98h+var_48], rbp
loc_CEF14:
mov eax, [r15]
dec eax; switch 10 cases
cmp eax, 9
ja def_CEF30; jumptable 00000000000CEF30 default case, case 5
lea rcx, jpt_CEF30
movsxd rax, ds:(jpt_CEF30 - 0F8260h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CEF32:
xorps xmm0, xmm0; jumptable 00000000000CEF30 case 1
movaps xmmword ptr [rsp+98h+var_88], xmm0
mov [rsp+98h+var_78], 0
mov rsi, [rbx+70h]
sub rsi, [rbx+68h]
sar rsi, 5
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r12, [rbx+68h]
mov rbp, [rbx+70h]
loc_CEF5F:
cmp r12, rbp
jz loc_CF069
mov rax, [r12]
mov [rsp+98h+var_38], rax
mov rdi, r13
lea rsi, [rsp+98h+var_38]
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r12, 20h ; ' '
jmp short loc_CEF5F
loc_CEF84:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 10
mov edi, [rbx+34h]
movss xmm0, dword ptr [rbx+38h]
movss xmm1, dword ptr [rbx+3Ch]
movss xmm2, dword ptr [rbx+40h]
call _llama_sampler_init_penalties
jmp loc_CF04C
loc_CEFA7:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 6
movss xmm0, dword ptr [rbx+24h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_typical
jmp loc_CF04C
loc_CEFC1:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 7
movss xmm0, dword ptr [rbx+28h]
movss xmm1, dword ptr [rbx+2Ch]
movss xmm2, dword ptr [rbx+30h]
call _llama_sampler_init_temp_ext
jmp short loc_CF04C
loc_CEFDE:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 3
movss xmm0, dword ptr [rbx+14h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_top_p
jmp short loc_CF04C
loc_CEFF5:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 9
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_infill
jmp short loc_CF04C
loc_CF008:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 4
movss xmm0, dword ptr [rbx+18h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_min_p
jmp short loc_CF04C
loc_CF01F:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 2
mov edi, [rbx+10h]
call _llama_sampler_init_top_k
jmp short loc_CF04C
loc_CF030:
mov r12, [r14+140h]; jumptable 00000000000CEF30 case 8
movss xmm0, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+20h]
movsxd rdi, dword ptr [rbx+0Ch]
mov esi, [rbx]
call _llama_sampler_init_xtc
loc_CF04C:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
loc_CF057:
add r15, 4
cmp r15, rbp
jnz loc_CEF14
jmp loc_CF14D
loc_CF069:
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_40]
call _llama_model_n_ctx_train
movss xmm0, dword ptr [rbx+44h]
movss xmm1, dword ptr [rbx+48h]
mov edx, [rbx+4Ch]
mov ecx, [rbx+50h]
mov r8, [rsp+98h+var_88]
mov r9, [rsp+98h+var_88+8]
sub r9, r8
sar r9, 3
mov rdi, [rsp+98h+var_90]
mov esi, eax
call _llama_sampler_init_dry
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
mov rbp, [rsp+98h+var_48]
jz short loc_CF057
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF057
loc_CF0D0:
mov r12, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov esi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
mov edi, eax
mov edx, 64h ; 'd'
call _llama_sampler_init_mirostat
jmp short loc_CF15B
loc_CF117:
mov r15, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov edi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
call _llama_sampler_init_mirostat_v2
jmp short loc_CF15B
loc_CF14D:
mov r12, [r14+140h]
mov edi, [rbx]
call _llama_sampler_init_dist
loc_CF15B:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CF17D
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF17D:
mov rax, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CF18F:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aLlguidanceCmak; "llguidance (cmake -DLLAMA_LLGUIDANCE=ON"...
mov esi, 0A5h
xor eax, eax
call _ggml_abort
def_CEF30:
lea rdi, aWorkspaceLlm4b_3; jumptable 00000000000CEF30 default case, case 5
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownSa; "false && \"unknown sampler type\""
mov esi, 0E5h
xor eax, eax
call _ggml_abort
loc_CF1CA:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownMi; "false && \"unknown mirostat version\""
mov esi, 0F0h
xor eax, eax
call _ggml_abort
jmp short loc_CF22F
jmp short $+2
loc_CF1EF:
mov rbx, rax
mov rdi, r14; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
jmp short loc_CF1FF
mov rbx, rax
loc_CF1FF:
mov esi, 1B8h
mov rdi, r14
jmp short loc_CF228
jmp short loc_CF22F
jmp short loc_CF213
jmp short loc_CF22F
jmp short loc_CF22F
jmp short loc_CF22F
loc_CF213:
mov rbx, rax
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
jz short loc_CF232
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
loc_CF228:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF232
loc_CF22F:
mov rbx, rax
loc_CF232:
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CF249
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF249:
mov rdi, rbx
call __Unwind_Resume
| long long common_sampler_init(long long a1, unsigned int *a2)
{
unsigned __int8 v3; // bp
void **v4; // r15
void **i; // r13
long long v6; // rsi
long long inited; // rax
long long v8; // r12
long long v9; // r14
int v10; // eax
unsigned long long v11; // rsi
long long v12; // r12
unsigned int v13; // eax
long long v14; // rsi
unsigned int v15; // eax
_DWORD *v16; // r15
_DWORD *v17; // rbp
long long v18; // rsi
_QWORD *v19; // r12
_QWORD *v20; // rbp
long long v21; // r12
long long v22; // rax
long long v23; // r12
unsigned int v24; // eax
long long v25; // rsi
long long v26; // r12
double v27; // xmm0_8
long long v28; // rax
long long v29; // r12
unsigned int v30; // eax
long long v31; // rax
long long v32; // r15
long long v33; // rsi
long long v35; // rax
long long v36; // rbx
long long vocab; // [rsp+8h] [rbp-90h]
void *v38[2]; // [rsp+10h] [rbp-88h] BYREF
long long v39; // [rsp+20h] [rbp-78h]
__int128 v40; // [rsp+30h] [rbp-68h] BYREF
long long v41; // [rsp+40h] [rbp-58h]
_DWORD *v42; // [rsp+50h] [rbp-48h]
long long v43; // [rsp+58h] [rbp-40h]
_QWORD v44[7]; // [rsp+60h] [rbp-38h] BYREF
v43 = a1;
vocab = llama_model_get_vocab(a1);
llama_sampler_chain_default_params();
v3 = *((_BYTE *)a2 + 97);
v40 = 0LL;
v41 = 0LL;
std::vector<char const*>::reserve(
&v40,
0xCCCCCCCCCCCCCCCDLL * ((long long)(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) >> 3));
v4 = (void **)*((_QWORD *)a2 + 24);
for ( i = (void **)*((_QWORD *)a2 + 25); v4 != i; v4 += 5 )
{
v38[0] = *v4;
std::vector<char const*>::emplace_back<char const*>(&v40, v38);
}
if ( !(unsigned int)std::string::compare(a2 + 38, 0LL, 11LL, "%llguidance") )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
165LL,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
LABEL_38:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
229LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown sampler type\"");
goto LABEL_39;
}
v6 = *((_QWORD *)a2 + 19);
if ( *((_BYTE *)a2 + 184) == 1 )
inited = llama_sampler_init_grammar_lazy(vocab, v6, "root", v40, (long long)(*((_QWORD *)&v40 + 1) - v40) >> 3);
else
inited = llama_sampler_init_grammar(vocab, v6, "root");
v8 = inited;
v9 = operator new(0x1B8uLL);
common_params_sampling::common_params_sampling((common_params_sampling *)v9, (const common_params_sampling *)a2);
*(_QWORD *)(v9 + 312) = v8;
*(_QWORD *)(v9 + 320) = llama_sampler_chain_init(v3);
v10 = a2[1];
v11 = 32LL;
if ( v10 >= 33 )
v11 = (unsigned int)v10;
*(_QWORD *)(v9 + 328) = v11;
*(_OWORD *)(v9 + 336) = 0LL;
*(_QWORD *)(v9 + 352) = 0LL;
std::vector<int>::vector(v9 + 360, v11);
*(_OWORD *)(v9 + 416) = 0LL;
*(_OWORD *)(v9 + 400) = 0LL;
*(_OWORD *)(v9 + 384) = 0LL;
*(_QWORD *)(v9 + 432) = 0LL;
v12 = *(_QWORD *)(v9 + 320);
v13 = llama_vocab_n_tokens(vocab, 0.0);
v14 = llama_sampler_init_logit_bias(v13, (*((_QWORD *)a2 + 37) - *((_QWORD *)a2 + 36)) >> 3);
llama_sampler_chain_add(v12, v14);
v15 = a2[21];
if ( v15 == 2 )
{
v32 = *(_QWORD *)(v9 + 320);
v33 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v32, v33);
v29 = *(_QWORD *)(v9 + 320);
v31 = llama_sampler_init_mirostat_v2(*a2, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 == 1 )
{
v26 = *(_QWORD *)(v9 + 320);
*(_QWORD *)&v27 = a2[10];
v28 = llama_sampler_init_temp(*(float *)&v27);
llama_sampler_chain_add(v26, v28);
v29 = *(_QWORD *)(v9 + 320);
v30 = llama_vocab_n_tokens(vocab, v27);
v31 = llama_sampler_init_mirostat(v30, *a2, 100LL, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 )
{
LABEL_39:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
240LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown mirostat version\"");
v36 = v35;
if ( (_QWORD)v40 )
operator delete((void *)v40, v41 - v40);
_Unwind_Resume(v36);
}
v16 = (_DWORD *)*((_QWORD *)a2 + 16);
v17 = (_DWORD *)*((_QWORD *)a2 + 17);
if ( v16 != v17 )
{
v42 = (_DWORD *)*((_QWORD *)a2 + 17);
while ( 2 )
{
switch ( *v16 )
{
case 1:
*(_OWORD *)v38 = 0LL;
v39 = 0LL;
v18 = (long long)(*((_QWORD *)a2 + 14) - *((_QWORD *)a2 + 13)) >> 5;
std::vector<char const*>::reserve(v38, v18);
v19 = (_QWORD *)*((_QWORD *)a2 + 13);
v20 = (_QWORD *)*((_QWORD *)a2 + 14);
while ( v19 != v20 )
{
v44[0] = *v19;
v18 = (long long)v44;
std::vector<char const*>::emplace_back<char const*>(v38, v44);
v19 += 4;
}
v23 = *(_QWORD *)(v9 + 320);
v24 = llama_model_n_ctx_train(v43, v18);
v25 = llama_sampler_init_dry(
vocab,
v24,
a2[19],
a2[20],
v38[0],
((char *)v38[1] - (char *)v38[0]) >> 3,
*((float *)a2 + 17),
*((float *)a2 + 18));
llama_sampler_chain_add(v23, v25);
v17 = v42;
if ( v38[0] )
operator delete(v38[0], v39 - (unsigned long long)v38[0]);
goto LABEL_27;
case 2:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_top_k(a2[4]);
goto LABEL_26;
case 3:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_top_p((int)a2[3], *((float *)a2 + 5));
goto LABEL_26;
case 4:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_min_p((int)a2[3], *((float *)a2 + 6));
goto LABEL_26;
case 6:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_typical((int)a2[3], *((float *)a2 + 9));
goto LABEL_26;
case 7:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_temp_ext(*((float *)a2 + 10), *((float *)a2 + 11), *((float *)a2 + 12));
goto LABEL_26;
case 8:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_xtc((int)a2[3], *a2, *((float *)a2 + 7), *((float *)a2 + 8));
goto LABEL_26;
case 9:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_infill(vocab);
goto LABEL_26;
case 0xA:
v21 = *(_QWORD *)(v9 + 320);
v22 = llama_sampler_init_penalties(a2[13], *((float *)a2 + 14), *((float *)a2 + 15), *((float *)a2 + 16));
LABEL_26:
llama_sampler_chain_add(v21, v22);
LABEL_27:
if ( ++v16 == v17 )
break;
continue;
default:
goto LABEL_38;
}
break;
}
}
v29 = *(_QWORD *)(v9 + 320);
v31 = llama_sampler_init_dist(*a2);
LABEL_34:
llama_sampler_chain_add(v29, v31);
if ( (_QWORD)v40 )
operator delete((void *)v40, v41 - v40);
return v9;
}
| common_sampler_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RSI
MOV qword ptr [RSP + 0x58],RDI
CALL 0x0011c190
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011bd60
MOV BPL,byte ptr [RBX + 0x61]
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RBX + 0xc8]
SUB RAX,qword ptr [RBX + 0xc0]
SAR RAX,0x3
MOV RSI,-0x3333333333333333
IMUL RSI,RAX
LAB_001ced49:
CALL 0x001d04f6
MOV R15,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
CMP R15,R13
JZ 0x001ced87
LEA R14,[RSP + 0x30]
LEA R12,[RSP + 0x10]
LAB_001ced6b:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x10],RAX
LAB_001ced73:
MOV RDI,R14
MOV RSI,R12
CALL 0x001d0bc0
ADD R15,0x28
CMP R15,R13
JNZ 0x001ced6b
LAB_001ced87:
LEA RDI,[RBX + 0x98]
LAB_001ced8e:
LEA RCX,[0x1f8425]
MOV EDX,0xb
XOR ESI,ESI
CALL 0x0011bba0
TEST EAX,EAX
JZ 0x001cf18f
MOV RSI,qword ptr [RBX + 0x98]
CMP byte ptr [RBX + 0xb8],0x1
JNZ 0x001cedf6
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
SUB R8,RCX
SAR R8,0x3
MOV R9,qword ptr [RBX + 0xd8]
MOV RAX,qword ptr [RBX + 0xe0]
SUB RAX,R9
SAR RAX,0x2
MOV qword ptr [RSP],RAX
LEA RDX,[0x1f7a3f]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b740
JMP 0x001cee07
LAB_001cedf6:
LEA RDX,[0x1f7a3f]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b180
LAB_001cee07:
MOV R12,RAX
LAB_001cee0a:
MOV EDI,0x1b8
CALL 0x0011b8d0
LAB_001cee14:
MOV R14,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00154ed2
MOV qword ptr [R14 + 0x138],R12
LAB_001cee29:
MOVZX EDI,BPL
CALL 0x0011b4e0
MOV qword ptr [R14 + 0x140],RAX
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,0x21
MOV ESI,0x20
CMOVGE ESI,EAX
MOV qword ptr [R14 + 0x148],RSI
MOV RDI,R14
ADD RDI,0x168
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x150],XMM0
MOV qword ptr [R14 + 0x160],0x0
LAB_001cee6e:
LEA RDX,[RSP + 0x10]
CALL 0x00179e82
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x1a0],XMM0
MOVUPS xmmword ptr [R14 + 0x190],XMM0
MOVUPS xmmword ptr [R14 + 0x180],XMM0
MOV qword ptr [R14 + 0x1b0],0x0
MOV R12,qword ptr [R14 + 0x140]
LAB_001ceea5:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c110
MOV RDX,qword ptr [RBX + 0x120]
MOV RSI,qword ptr [RBX + 0x128]
SUB RSI,RDX
SHR RSI,0x3
MOV EDI,EAX
CALL 0x0011be90
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9a0
MOV EAX,dword ptr [RBX + 0x54]
CMP EAX,0x2
JZ 0x001cf117
CMP EAX,0x1
JZ 0x001cf0d0
TEST EAX,EAX
JNZ 0x001cf1ca
MOV R15,qword ptr [RBX + 0x80]
MOV RBP,qword ptr [RBX + 0x88]
CMP R15,RBP
JZ 0x001cf14d
LEA R13,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RBP
LAB_001cef14:
MOV EAX,dword ptr [R15]
DEC EAX
CMP EAX,0x9
JA 0x001cf1a9
LEA RCX,[0x1f8260]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RSI,qword ptr [RBX + 0x70]
SUB RSI,qword ptr [RBX + 0x68]
SAR RSI,0x5
LAB_001cef4f:
MOV RDI,R13
CALL 0x001d04f6
MOV R12,qword ptr [RBX + 0x68]
MOV RBP,qword ptr [RBX + 0x70]
LAB_001cef5f:
CMP R12,RBP
JZ 0x001cf069
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x60],RAX
LAB_001cef71:
MOV RDI,R13
LEA RSI,[RSP + 0x60]
CALL 0x001d0bc0
ADD R12,0x20
JMP 0x001cef5f
caseD_a:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x34]
MOVSS XMM0,dword ptr [RBX + 0x38]
MOVSS XMM1,dword ptr [RBX + 0x3c]
MOVSS XMM2,dword ptr [RBX + 0x40]
LAB_001cef9d:
CALL 0x0011b700
JMP 0x001cf04c
caseD_6:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x24]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b6c0
JMP 0x001cf04c
caseD_7:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
MOVSS XMM1,dword ptr [RBX + 0x2c]
MOVSS XMM2,dword ptr [RBX + 0x30]
CALL 0x0011c0d0
JMP 0x001cf04c
caseD_3:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x14]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b130
JMP 0x001cf04c
caseD_9:
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011bd20
JMP 0x001cf04c
caseD_4:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x18]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011bc50
JMP 0x001cf04c
caseD_2:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x0011b400
JMP 0x001cf04c
caseD_8:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x20]
MOVSXD RDI,dword ptr [RBX + 0xc]
MOV ESI,dword ptr [RBX]
CALL 0x0011b2b0
LAB_001cf04c:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9a0
LAB_001cf057:
ADD R15,0x4
CMP R15,RBP
JNZ 0x001cef14
JMP 0x001cf14d
LAB_001cf069:
MOV R12,qword ptr [R14 + 0x140]
LAB_001cf070:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011b890
MOVSS XMM0,dword ptr [RBX + 0x44]
MOVSS XMM1,dword ptr [RBX + 0x48]
MOV EDX,dword ptr [RBX + 0x4c]
MOV ECX,dword ptr [RBX + 0x50]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
SUB R9,R8
SAR R9,0x3
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0011bec0
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9a0
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
MOV RBP,qword ptr [RSP + 0x50]
JZ 0x001cf057
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b900
JMP 0x001cf057
LAB_001cf0d0:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
LAB_001cf0dc:
CALL 0x0011b550
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9a0
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c110
MOV ESI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
MOV EDI,EAX
MOV EDX,0x64
CALL 0x0011c180
JMP 0x001cf15b
LAB_001cf117:
MOV R15,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
CALL 0x0011b550
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011b9a0
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
CALL 0x0011bea0
JMP 0x001cf15b
LAB_001cf14d:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
CALL 0x0011bd80
LAB_001cf15b:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9a0
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001cf17d
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x0011b900
LAB_001cf17d:
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cf18f:
LEA RDI,[0x1f8431]
LEA RDX,[0x1f847f]
MOV ESI,0xa5
XOR EAX,EAX
CALL 0x0011bed0
caseD_5:
LEA RDI,[0x1f8431]
LEA RDX,[0x1e92a1]
LEA RCX,[0x1f84b7]
MOV ESI,0xe5
XOR EAX,EAX
CALL 0x0011bed0
LAB_001cf1ca:
LEA RDI,[0x1f8431]
LEA RDX,[0x1e92a1]
LEA RCX,[0x1f84d7]
MOV ESI,0xf0
XOR EAX,EAX
CALL 0x0011bed0
|
/* common_sampler_init(llama_model const*, common_params_sampling const&) */
common_params_sampling * common_sampler_init(llama_model *param_1,common_params_sampling *param_2)
{
common_params_sampling cVar1;
int8 *puVar2;
int iVar3;
int4 uVar4;
int8 uVar5;
int8 uVar6;
common_params_sampling *this;
int8 uVar7;
int4 *puVar8;
allocator *paVar9;
int8 *puVar10;
int4 *puVar11;
char *local_88;
long lStack_80;
long local_78;
void *local_68;
long lStack_60;
long local_58;
int4 *local_48;
llama_model *local_40;
char *local_38;
local_40 = param_1;
uVar5 = llama_model_get_vocab();
llama_sampler_chain_default_params();
cVar1 = param_2[0x61];
local_68 = (void *)0x0;
lStack_60 = 0;
local_58 = 0;
/* try { // try from 001ced49 to 001ced4d has its CatchHandler @ 001cf209 */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_68,
(*(long *)(param_2 + 200) - *(long *)(param_2 + 0xc0) >> 3) * -0x3333333333333333);
puVar10 = *(int8 **)(param_2 + 0xc0);
puVar2 = *(int8 **)(param_2 + 200);
if (puVar10 != puVar2) {
do {
local_88 = (char *)*puVar10;
/* try { // try from 001ced73 to 001ced7d has its CatchHandler @ 001cf22f */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_68,&local_88);
puVar10 = puVar10 + 5;
} while (puVar10 != puVar2);
}
/* try { // try from 001ced8e to 001cee06 has its CatchHandler @ 001cf20d */
iVar3 = std::__cxx11::string::compare((ulong)(param_2 + 0x98),0,(char *)0xb);
if (iVar3 == 0) {
/* try { // try from 001cf18f to 001cf1a8 has its CatchHandler @ 001cf20d */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0xa5,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
}
if (param_2[0xb8] == (common_params_sampling)0x1) {
uVar6 = llama_sampler_init_grammar_lazy
(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f7a3f,local_68,
lStack_60 - (long)local_68 >> 3,*(long *)(param_2 + 0xd8),
*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 2);
}
else {
uVar6 = llama_sampler_init_grammar(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f7a3f);
}
/* try { // try from 001cee0a to 001cee13 has its CatchHandler @ 001cf20f */
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001cee14 to 001cee21 has its CatchHandler @ 001cf1fc */
common_params_sampling::common_params_sampling(this,param_2);
*(int8 *)(this + 0x138) = uVar6;
/* try { // try from 001cee29 to 001cee31 has its CatchHandler @ 001cf1ef */
uVar6 = llama_sampler_chain_init(cVar1);
*(int8 *)(this + 0x140) = uVar6;
paVar9 = (allocator *)0x20;
if (0x20 < (int)*(uint *)(param_2 + 4)) {
paVar9 = (allocator *)(ulong)*(uint *)(param_2 + 4);
}
*(allocator **)(this + 0x148) = paVar9;
*(int8 *)(this + 0x150) = 0;
*(int8 *)(this + 0x158) = 0;
*(int8 *)(this + 0x160) = 0;
/* try { // try from 001cee6e to 001cee77 has its CatchHandler @ 001cf1ed */
std::vector<int,std::allocator<int>>::vector((ulong)(this + 0x168),paVar9);
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 0x1b0) = 0;
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001ceea5 to 001ceed5 has its CatchHandler @ 001cf20f */
uVar4 = llama_vocab_n_tokens(uVar5);
uVar7 = llama_sampler_init_logit_bias
(uVar4,(ulong)(*(long *)(param_2 + 0x128) - *(long *)(param_2 + 0x120)) >> 3);
llama_sampler_chain_add(uVar6,uVar7);
iVar3 = *(int *)(param_2 + 0x54);
if (iVar3 == 2) {
uVar5 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar5,uVar6);
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_mirostat_v2
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),
*(int4 *)param_2);
}
else if (iVar3 == 1) {
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cf0dc to 001cf165 has its CatchHandler @ 001cf20f */
uVar7 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar6,uVar7);
uVar6 = *(int8 *)(this + 0x140);
uVar4 = llama_vocab_n_tokens(uVar5);
uVar5 = llama_sampler_init_mirostat
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),uVar4,
*(int4 *)param_2,100);
}
else {
if (iVar3 != 0) {
/* try { // try from 001cf1ca to 001cf1ea has its CatchHandler @ 001cf20f */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xf0,"GGML_ASSERT(%s) failed","false && \"unknown mirostat version\"");
}
puVar11 = *(int4 **)(param_2 + 0x80);
puVar8 = *(int4 **)(param_2 + 0x88);
if (puVar11 != puVar8) {
local_48 = puVar8;
do {
switch(*puVar11) {
case 1:
local_88 = (char *)0x0;
lStack_80 = 0;
local_78 = 0;
/* try { // try from 001cef4f to 001cef56 has its CatchHandler @ 001cf20b */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_88,
*(long *)(param_2 + 0x70) - *(long *)(param_2 + 0x68) >> 5);
puVar2 = *(int8 **)(param_2 + 0x70);
for (puVar10 = *(int8 **)(param_2 + 0x68); puVar10 != puVar2; puVar10 = puVar10 + 4)
{
local_38 = (char *)*puVar10;
/* try { // try from 001cef71 to 001cef7d has its CatchHandler @ 001cf213 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_88,&local_38);
}
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cf070 to 001cf0b1 has its CatchHandler @ 001cf20b */
uVar4 = llama_model_n_ctx_train(local_40);
uVar7 = llama_sampler_init_dry
(*(int4 *)(param_2 + 0x44),*(int4 *)(param_2 + 0x48),uVar5,
uVar4,*(int4 *)(param_2 + 0x4c),*(int4 *)(param_2 + 0x50),
local_88,lStack_80 - (long)local_88 >> 3);
llama_sampler_chain_add(uVar6,uVar7);
puVar8 = local_48;
if (local_88 != (char *)0x0) {
operator_delete(local_88,local_78 - (long)local_88);
}
goto LAB_001cf057;
case 2:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_k(*(int4 *)(param_2 + 0x10));
break;
case 3:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_p
(*(int4 *)(param_2 + 0x14),(long)*(int *)(param_2 + 0xc));
break;
case 4:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_min_p
(*(int4 *)(param_2 + 0x18),(long)*(int *)(param_2 + 0xc));
break;
default:
/* try { // try from 001cf1a9 to 001cf1c9 has its CatchHandler @ 001cf1eb */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp"
,0xe5,"GGML_ASSERT(%s) failed","false && \"unknown sampler type\"");
case 6:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_typical
(*(int4 *)(param_2 + 0x24),(long)*(int *)(param_2 + 0xc));
break;
case 7:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_temp_ext
(*(int4 *)(param_2 + 0x28),*(int4 *)(param_2 + 0x2c),
*(int4 *)(param_2 + 0x30));
break;
case 8:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_xtc
(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_2 + 0x20),
(long)*(int *)(param_2 + 0xc),*(int4 *)param_2);
break;
case 9:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_infill(uVar5);
break;
case 10:
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cef9d to 001cf056 has its CatchHandler @ 001cf211 */
uVar7 = llama_sampler_init_penalties
(*(int4 *)(param_2 + 0x38),*(int4 *)(param_2 + 0x3c),
*(int4 *)(param_2 + 0x40),*(int4 *)(param_2 + 0x34));
}
llama_sampler_chain_add(uVar6,uVar7);
LAB_001cf057:
puVar11 = puVar11 + 1;
} while (puVar11 != puVar8);
}
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_dist(*(int4 *)param_2);
}
llama_sampler_chain_add(uVar6,uVar5);
if (local_68 != (void *)0x0) {
operator_delete(local_68,local_58 - (long)local_68);
}
return this;
}
|
|
4,189 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1c98ae(%rip), %rax # 0x2c0248
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a3b0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xf69f0
leaq 0x1c986b(%rip), %rax # 0x2c0248
movq (%rax), %rax
movq 0x198(%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_mutex_trylock:
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+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_F69F0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_F69F0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_trylock(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[50])(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4);
return v4;
}
| psi_mutex_trylock:
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,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a3b0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001f69f0
LEA RAX,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001f69f0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
4,190 | gguf_get_arr_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | const char * gguf_get_arr_str(const struct gguf_context * ctx, int64_t key_id, size_t i) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_type() == GGUF_TYPE_STRING);
return ctx->kv[key_id].data_string[i].c_str();
} | O3 | cpp | gguf_get_arr_str:
pushq %rax
testq %rsi, %rsi
js 0x3e29c
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $0x2e8ba2e8ba2e8ba3, %rdi # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rdi
cmpq %rsi, %rdi
jle 0x3e29c
imulq $0x58, %rsi, %rcx
cmpl $0x8, 0x24(%rax,%rcx)
jne 0x3e2b8
addq %rcx, %rax
movq 0x40(%rax), %rcx
movq 0x48(%rax), %rax
subq %rcx, %rax
sarq $0x5, %rax
cmpq %rdx, %rax
jbe 0x3e297
shlq $0x5, %rdx
movq (%rcx,%rdx), %rax
popq %rcx
retq
callq 0x189a8
leaq 0x1f23a(%rip), %rdi # 0x5d4dd
leaq 0xe3bb(%rip), %rdx # 0x4c665
leaq 0x1f6a2(%rip), %rcx # 0x5d953
movl $0x30d, %esi # imm = 0x30D
jmp 0x3e2d2
leaq 0x1f21e(%rip), %rdi # 0x5d4dd
leaq 0xe39f(%rip), %rdx # 0x4c665
leaq 0x1f6f9(%rip), %rcx # 0x5d9c6
movl $0x30e, %esi # imm = 0x30E
xorl %eax, %eax
callq 0x17cd0
| gguf_get_arr_str:
push rax
test rsi, rsi
js short loc_3E29C
mov rax, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rax
sar rcx, 3
mov rdi, 2E8BA2E8BA2E8BA3h
imul rdi, rcx
cmp rdi, rsi
jle short loc_3E29C
imul rcx, rsi, 58h ; 'X'
cmp dword ptr [rax+rcx+24h], 8
jnz short loc_3E2B8
add rax, rcx
mov rcx, [rax+40h]
mov rax, [rax+48h]
sub rax, rcx
sar rax, 5
cmp rax, rdx
jbe short loc_3E297
shl rdx, 5
mov rax, [rcx+rdx]
pop rcx
retn
loc_3E297:
call gguf_get_arr_str_cold_1
loc_3E29C:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 30Dh
jmp short loc_3E2D2
loc_3E2B8:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetT_0; "ctx->kv[key_id].get_type() == GGUF_TYPE"...
mov esi, 30Eh
loc_3E2D2:
xor eax, eax
call _ggml_abort
| long long gguf_get_arr_str(long long a1, long long a2, unsigned long long a3, long long a4, int a5, int a6)
{
long long v6; // rax
long long v7; // rdi
long long v8; // rax
long long v9; // rcx
const char *v11; // rcx
int v12; // esi
if ( a2 < 0 || (v6 = *(_QWORD *)(a1 + 8), v7 = 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v6) >> 3), v7 <= a2) )
{
v11 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v12 = 781;
goto LABEL_9;
}
if ( *(_DWORD *)(v6 + 88 * a2 + 36) != 8 )
{
v11 = "ctx->kv[key_id].get_type() == GGUF_TYPE_STRING";
v12 = 782;
LABEL_9:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v12,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v11,
a5,
a6);
}
v8 = 88 * a2 + v6;
v9 = *(_QWORD *)(v8 + 64);
if ( (*(_QWORD *)(v8 + 72) - v9) >> 5 <= a3 )
gguf_get_arr_str_cold_1(v7);
return *(_QWORD *)(v9 + 32 * a3);
}
| gguf_get_arr_str:
PUSH RAX
TEST RSI,RSI
JS 0x0013e29c
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RAX
SAR RCX,0x3
MOV RDI,0x2e8ba2e8ba2e8ba3
IMUL RDI,RCX
CMP RDI,RSI
JLE 0x0013e29c
IMUL RCX,RSI,0x58
CMP dword ptr [RAX + RCX*0x1 + 0x24],0x8
JNZ 0x0013e2b8
ADD RAX,RCX
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x48]
SUB RAX,RCX
SAR RAX,0x5
CMP RAX,RDX
JBE 0x0013e297
SHL RDX,0x5
MOV RAX,qword ptr [RCX + RDX*0x1]
POP RCX
RET
LAB_0013e297:
CALL 0x001189a8
LAB_0013e29c:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15d953]
MOV ESI,0x30d
JMP 0x0013e2d2
LAB_0013e2b8:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15d9c6]
MOV ESI,0x30e
LAB_0013e2d2:
XOR EAX,EAX
CALL 0x00117cd0
|
int8 gguf_get_arr_str(long param_1,long param_2,ulong param_3)
{
long lVar1;
char *pcVar2;
int8 uVar3;
long lVar4;
if (-1 < param_2) {
lVar1 = *(long *)(param_1 + 8);
lVar4 = (*(long *)(param_1 + 0x10) - lVar1 >> 3) * 0x2e8ba2e8ba2e8ba3;
if (lVar4 - param_2 != 0 && param_2 <= lVar4) {
if (*(int *)(lVar1 + 0x24 + param_2 * 0x58) != 8) {
pcVar2 = "ctx->kv[key_id].get_type() == GGUF_TYPE_STRING";
uVar3 = 0x30e;
goto LAB_0013e2d2;
}
lVar1 = lVar1 + param_2 * 0x58;
lVar4 = *(long *)(lVar1 + 0x40);
if (param_3 < (ulong)(*(long *)(lVar1 + 0x48) - lVar4 >> 5)) {
return *(int8 *)(lVar4 + param_3 * 0x20);
}
gguf_get_arr_str_cold_1();
}
}
pcVar2 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar3 = 0x30d;
LAB_0013e2d2:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
4,191 | pvio_socket_shutdown | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_shutdown(MARIADB_PVIO *pvio)
{
if (pvio && pvio->data)
{
my_socket s = ((struct st_pvio_socket *)pvio->data)->socket;
#ifdef _WIN32
shutdown(s, SD_BOTH);
CancelIoEx((HANDLE)s, NULL);
#else
shutdown(s, SHUT_RDWR);
#endif
}
return -1;
} | O0 | c | pvio_socket_shutdown:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x740a6
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x740a6
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
movl $0x2, %esi
callq 0x385e0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pvio_socket_shutdown:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz short loc_740A6
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_740A6
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_C], eax
mov edi, [rbp+var_C]
mov esi, 2
call _shutdown
loc_740A6:
mov eax, 0FFFFFFFFh
add rsp, 10h
pop rbp
retn
| long long pvio_socket_shutdown(_QWORD *a1)
{
if ( a1 && *a1 )
shutdown(*(unsigned int *)*a1, 2LL);
return 0xFFFFFFFFLL;
}
| pvio_socket_shutdown:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001740a6
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001740a6
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
MOV EDI,dword ptr [RBP + -0xc]
MOV ESI,0x2
CALL 0x001385e0
LAB_001740a6:
MOV EAX,0xffffffff
ADD RSP,0x10
POP RBP
RET
|
int8 pvio_socket_shutdown(long *param_1)
{
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
shutdown(*(int *)*param_1,2);
}
return 0xffffffff;
}
|
|
4,192 | end_slave_io_cache | eloqsql/mysys/mf_iocache.c | void end_slave_io_cache(IO_CACHE *cache)
{
/* Remove the cache from the next_file_user circular linked list. */
if (cache->next_file_user != cache)
{
IO_CACHE *p= cache->next_file_user;
while (p->next_file_user != cache)
p= p->next_file_user;
p->next_file_user= cache->next_file_user;
}
my_free(cache->buffer);
} | O0 | c | end_slave_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0xe04b4
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0xe049e
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xe047c
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xf3ba0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| end_slave_io_cache:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+0D8h]
cmp rax, [rbp+var_8]
jz short loc_E04B4
mov rax, [rbp+var_8]
mov rax, [rax+0D8h]
mov [rbp+var_10], rax
loc_E047C:
mov rax, [rbp+var_10]
mov rax, [rax+0D8h]
cmp rax, [rbp+var_8]
jz short loc_E049E
mov rax, [rbp+var_10]
mov rax, [rax+0D8h]
mov [rbp+var_10], rax
jmp short loc_E047C
loc_E049E:
mov rax, [rbp+var_8]
mov rcx, [rax+0D8h]
mov rax, [rbp+var_10]
mov [rax+0D8h], rcx
loc_E04B4:
mov rax, [rbp+var_8]
mov rdi, [rax+20h]
call my_free
add rsp, 10h
pop rbp
retn
| long long end_slave_io_cache(long long a1)
{
long long i; // [rsp+0h] [rbp-10h]
if ( *(_QWORD *)(a1 + 216) != a1 )
{
for ( i = *(_QWORD *)(a1 + 216); *(_QWORD *)(i + 216) != a1; i = *(_QWORD *)(i + 216) )
;
*(_QWORD *)(i + 216) = *(_QWORD *)(a1 + 216);
}
return my_free(*(_QWORD *)(a1 + 32));
}
| end_slave_io_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x001e04b4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x10],RAX
LAB_001e047c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x001e049e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001e047c
LAB_001e049e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0xd8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd8],RCX
LAB_001e04b4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001f3ba0
ADD RSP,0x10
POP RBP
RET
|
void end_slave_io_cache(long param_1)
{
int8 local_18;
if (*(long *)(param_1 + 0xd8) != param_1) {
for (local_18 = *(long *)(param_1 + 0xd8); *(long *)(local_18 + 0xd8) != param_1;
local_18 = *(long *)(local_18 + 0xd8)) {
}
*(int8 *)(local_18 + 0xd8) = *(int8 *)(param_1 + 0xd8);
}
my_free(*(int8 *)(param_1 + 0x20));
return;
}
|
|
4,193 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O3 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
testq %rdx, %rdx
je 0xc3744
movq %rcx, -0x68(%rbp)
testq %r9, %r9
je 0xc3753
movq %rdi, -0x60(%rbp)
decq %rdx
xorl %ecx, %ecx
xorl %r13d, %r13d
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %rsi, -0x58(%rbp)
movq %r9, -0x40(%rbp)
cmpq $0x2, %r9
jb 0xc3628
movq -0x40(%rbp), %rbx
leaq (,%rbx,8), %r12
cmpq $0x6, %rbx
ja 0xc361b
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jle 0xc361b
movq -0x60(%rbp), %rcx
movq 0x20(%rcx), %r15
imulq $0x58, %rax, %r14
addq %r15, %r14
leaq (,%rbx,8), %rax
movq %rax, -0x70(%rbp)
cmpq $0x6, %rbx
je 0xc35f3
cmpq $0x0, (%r15,%r12)
jne 0xc3612
cmpb $0x0, 0x52(%r15)
jne 0xc3612
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x29510
testl %eax, %eax
je 0xc36cb
addq $0x58, %r15
cmpq %r14, %r15
jb 0xc35e6
decq %rbx
addq $-0x8, %r12
cmpq $0x1, %rbx
ja 0xc35b8
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rsi
cmpq %rcx, (%rsi)
jb 0xc3660
movq 0x10(%rsi), %rcx
movl %eax, %edx
shrl $0x8, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xc3660
movzbl %al, %eax
movq 0x8(%rsi), %rsi
movzbl (%rsi,%rdx), %edx
imull %eax, %edx
leaq (%rcx,%rdx,2), %r15
jmp 0xc36b1
leaq -0x3400(%rax), %rcx
leaq -0x4e00(%rax), %rdx
xorl %esi, %esi
cmpq $0x51a6, %rdx # imm = 0x51A6
setae %sil
shll $0x7, %esi
orl $0xfffffb40, %esi # imm = 0xFFFFFB40
cmpq $0x19b6, %rcx # imm = 0x19B6
movl $0xfb80, %ecx # imm = 0xFB80
cmovbl %ecx, %esi
movl %eax, %ecx
shrl $0xf, %ecx
addl %esi, %ecx
movw %cx, -0x36(%rbp)
orl $0x8000, %eax # imm = 0x8000
movw %ax, -0x34(%rbp)
movw $0x0, -0x32(%rbp)
leaq -0x36(%rbp), %r15
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %r9
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
addq $0x8, -0x30(%rbp)
decq %r9
jmp 0xc36ee
addq $0x30, %r15
movq -0x30(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %r9
subq %rbx, %r9
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movzwl (%r15), %eax
testw %ax, %ax
sete %cl
cmpq %rdx, %r13
setae %r8b
orb %cl, %r8b
jne 0xc3724
addq $0x2, %r15
movw %ax, (%rsi)
addq $0x2, %rsi
incq %r13
movzwl (%r15), %eax
testw %ax, %ax
je 0xc3724
addq $0x2, %r15
cmpq %rdx, %r13
jb 0xc3708
testw %ax, %ax
movzbl %dil, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpq %rdx, %r13
cmovnel %eax, %ecx
testq %r9, %r9
jne 0xc359a
jmp 0xc3758
movq $0x0, (%rcx)
testq %r9, %r9
setne %cl
jmp 0xc3764
xorl %r13d, %r13d
xorl %ecx, %ecx
movw $0x0, (%rsi)
movq -0x68(%rbp), %rax
movq %r13, (%rax)
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_char_weight_put:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_30], r8
test rdx, rdx
jz loc_C3744
mov [rbp+var_68], rcx
test r9, r9
jz loc_C3753
mov [rbp+var_60], rdi
dec rdx
xor ecx, ecx
xor r13d, r13d
mov [rbp+var_48], rdx
loc_C359A:
mov [rbp+var_50], rcx
mov [rbp+var_58], rsi
mov [rbp+var_40], r9
cmp r9, 2
jb short loc_C3628
mov rbx, [rbp+var_40]
lea r12, ds:0[rbx*8]
loc_C35B8:
cmp rbx, 6
ja short loc_C361B
mov rax, [rbp+var_60]
mov rax, [rax+18h]
test rax, rax
jle short loc_C361B
mov rcx, [rbp+var_60]
mov r15, [rcx+20h]
imul r14, rax, 58h ; 'X'
add r14, r15
lea rax, ds:0[rbx*8]
mov [rbp+var_70], rax
loc_C35E6:
cmp rbx, 6
jz short loc_C35F3
cmp qword ptr [r15+r12], 0
jnz short loc_C3612
loc_C35F3:
cmp byte ptr [r15+52h], 0
jnz short loc_C3612
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_70]
call _bcmp
test eax, eax
jz loc_C36CB
loc_C3612:
add r15, 58h ; 'X'
cmp r15, r14
jb short loc_C35E6
loc_C361B:
dec rbx
add r12, 0FFFFFFFFFFFFFFF8h
cmp rbx, 1
ja short loc_C35B8
loc_C3628:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov rsi, [rbp+var_60]
cmp [rsi], rcx
jb short loc_C3660
mov rcx, [rsi+10h]
mov edx, eax
shr edx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_C3660
movzx eax, al
mov rsi, [rsi+8]
movzx edx, byte ptr [rsi+rdx]
imul edx, eax
lea r15, [rcx+rdx*2]
jmp short loc_C36B1
loc_C3660:
lea rcx, [rax-3400h]
lea rdx, [rax-4E00h]
xor esi, esi
cmp rdx, 51A6h
setnb sil
shl esi, 7
or esi, 0FFFFFB40h
cmp rcx, 19B6h
mov ecx, 0FB80h
cmovb esi, ecx
mov ecx, eax
shr ecx, 0Fh
add ecx, esi
mov [rbp+var_36], cx
or eax, 8000h
mov [rbp+var_34], ax
mov [rbp+var_32], 0
lea r15, [rbp+var_36]
loc_C36B1:
mov rsi, [rbp+var_58]
mov r9, [rbp+var_40]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
add [rbp+var_30], 8
dec r9
jmp short loc_C36EE
loc_C36CB:
add r15, 30h ; '0'
mov rax, [rbp+var_30]
lea rax, [rax+rbx*8]
mov [rbp+var_30], rax
mov r9, [rbp+var_40]
sub r9, rbx
mov rsi, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
loc_C36EE:
movzx eax, word ptr [r15]
test ax, ax
setz cl
cmp r13, rdx
setnb r8b
or r8b, cl
jnz short loc_C3724
add r15, 2
loc_C3708:
mov [rsi], ax
add rsi, 2
inc r13
movzx eax, word ptr [r15]
test ax, ax
jz short loc_C3724
add r15, 2
cmp r13, rdx
jb short loc_C3708
loc_C3724:
test ax, ax
movzx eax, dil
mov ecx, 1
cmovz ecx, eax
cmp r13, rdx
cmovnz ecx, eax
test r9, r9
jnz loc_C359A
jmp short loc_C3758
loc_C3744:
mov qword ptr [rcx], 0
test r9, r9
setnz cl
jmp short loc_C3764
loc_C3753:
xor r13d, r13d
xor ecx, ecx
loc_C3758:
mov word ptr [rsi], 0
mov rax, [rbp+var_68]
mov [rax], r13
loc_C3764:
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_char_weight_put(
_QWORD *a1,
_WORD *a2,
long long a3,
unsigned long long *a4,
long long *a5,
unsigned long long a6)
{
unsigned long long v6; // r13
unsigned long long v7; // rbx
long long v8; // r12
long long v9; // rax
unsigned long long v10; // r15
unsigned long long v11; // r14
long long v12; // rax
long long v13; // rdx
long long v14; // rcx
__int16 *v15; // r15
__int16 v16; // si
unsigned __int8 v17; // di
unsigned long long v18; // rdx
__int16 v19; // ax
__int16 *v20; // r15
unsigned long long *v22; // [rsp+8h] [rbp-68h]
_WORD *v24; // [rsp+18h] [rbp-58h]
unsigned __int8 v25; // [rsp+20h] [rbp-50h]
unsigned long long v26; // [rsp+28h] [rbp-48h]
unsigned long long v27; // [rsp+30h] [rbp-40h]
_WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF
long long *v29; // [rsp+40h] [rbp-30h]
v29 = a5;
if ( a3 )
{
v22 = a4;
if ( a6 )
{
LOBYTE(a4) = 0;
v6 = 0LL;
v26 = a3 - 1;
do
{
v25 = (unsigned __int8)a4;
v24 = a2;
v27 = a6;
if ( a6 < 2 )
{
LABEL_15:
v12 = *v29;
if ( *a1 >= (unsigned long long)(unsigned int)*v29
&& (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) )
{
v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13));
}
else
{
v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40;
if ( (unsigned long long)(v12 - 13312) < 0x19B6 )
v16 = -1152;
v28[0] = v16 + ((unsigned int)v12 >> 15);
v28[1] = v12 | 0x8000;
v28[2] = 0;
v15 = v28;
}
a2 = v24;
v17 = v25;
v18 = v26;
++v29;
a6 = v27 - 1;
}
else
{
v7 = a6;
v8 = 8 * a6;
while ( 1 )
{
if ( v7 <= 6 )
{
v9 = a1[3];
if ( v9 > 0 )
break;
}
LABEL_14:
--v7;
v8 -= 8LL;
if ( v7 <= 1 )
goto LABEL_15;
}
v10 = a1[4];
v11 = v10 + 88 * v9;
while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) )
{
v10 += 88LL;
if ( v10 >= v11 )
goto LABEL_14;
}
v15 = (__int16 *)(v10 + 48);
v29 += v7;
a6 = v27 - v7;
v17 = v25;
v18 = v26;
}
v19 = *v15;
if ( *v15 != 0 && v6 < v18 )
{
v20 = v15 + 1;
do
{
*a2++ = v19;
++v6;
v19 = *v20;
if ( !*v20 )
break;
++v20;
}
while ( v6 < v18 );
}
LODWORD(a4) = 1;
if ( !v19 )
LODWORD(a4) = v17;
if ( v6 != v18 )
LODWORD(a4) = v17;
}
while ( a6 );
}
else
{
v6 = 0LL;
LODWORD(a4) = 0;
}
*a2 = 0;
*v22 = v6;
}
else
{
*a4 = 0LL;
LOBYTE(a4) = a6 != 0;
}
return (unsigned int)a4;
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x30],R8
TEST RDX,RDX
JZ 0x001c3744
MOV qword ptr [RBP + -0x68],RCX
TEST R9,R9
JZ 0x001c3753
MOV qword ptr [RBP + -0x60],RDI
DEC RDX
XOR ECX,ECX
XOR R13D,R13D
MOV qword ptr [RBP + -0x48],RDX
LAB_001c359a:
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x40],R9
CMP R9,0x2
JC 0x001c3628
MOV RBX,qword ptr [RBP + -0x40]
LEA R12,[RBX*0x8]
LAB_001c35b8:
CMP RBX,0x6
JA 0x001c361b
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JLE 0x001c361b
MOV RCX,qword ptr [RBP + -0x60]
MOV R15,qword ptr [RCX + 0x20]
IMUL R14,RAX,0x58
ADD R14,R15
LEA RAX,[RBX*0x8]
MOV qword ptr [RBP + -0x70],RAX
LAB_001c35e6:
CMP RBX,0x6
JZ 0x001c35f3
CMP qword ptr [R15 + R12*0x1],0x0
JNZ 0x001c3612
LAB_001c35f3:
CMP byte ptr [R15 + 0x52],0x0
JNZ 0x001c3612
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00129510
TEST EAX,EAX
JZ 0x001c36cb
LAB_001c3612:
ADD R15,0x58
CMP R15,R14
JC 0x001c35e6
LAB_001c361b:
DEC RBX
ADD R12,-0x8
CMP RBX,0x1
JA 0x001c35b8
LAB_001c3628:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RSI,qword ptr [RBP + -0x60]
CMP qword ptr [RSI],RCX
JC 0x001c3660
MOV RCX,qword ptr [RSI + 0x10]
MOV EDX,EAX
SHR EDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001c3660
MOVZX EAX,AL
MOV RSI,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RSI + RDX*0x1]
IMUL EDX,EAX
LEA R15,[RCX + RDX*0x2]
JMP 0x001c36b1
LAB_001c3660:
LEA RCX,[RAX + -0x3400]
LEA RDX,[RAX + -0x4e00]
XOR ESI,ESI
CMP RDX,0x51a6
SETNC SIL
SHL ESI,0x7
OR ESI,0xfffffb40
CMP RCX,0x19b6
MOV ECX,0xfb80
CMOVC ESI,ECX
MOV ECX,EAX
SHR ECX,0xf
ADD ECX,ESI
MOV word ptr [RBP + -0x36],CX
OR EAX,0x8000
MOV word ptr [RBP + -0x34],AX
MOV word ptr [RBP + -0x32],0x0
LEA R15,[RBP + -0x36]
LAB_001c36b1:
MOV RSI,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
ADD qword ptr [RBP + -0x30],0x8
DEC R9
JMP 0x001c36ee
LAB_001c36cb:
ADD R15,0x30
MOV RAX,qword ptr [RBP + -0x30]
LEA RAX,[RAX + RBX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV R9,qword ptr [RBP + -0x40]
SUB R9,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
LAB_001c36ee:
MOVZX EAX,word ptr [R15]
TEST AX,AX
SETZ CL
CMP R13,RDX
SETNC R8B
OR R8B,CL
JNZ 0x001c3724
ADD R15,0x2
LAB_001c3708:
MOV word ptr [RSI],AX
ADD RSI,0x2
INC R13
MOVZX EAX,word ptr [R15]
TEST AX,AX
JZ 0x001c3724
ADD R15,0x2
CMP R13,RDX
JC 0x001c3708
LAB_001c3724:
TEST AX,AX
MOVZX EAX,DIL
MOV ECX,0x1
CMOVZ ECX,EAX
CMP R13,RDX
CMOVNZ ECX,EAX
TEST R9,R9
JNZ 0x001c359a
JMP 0x001c3758
LAB_001c3744:
MOV qword ptr [RCX],0x0
TEST R9,R9
SETNZ CL
JMP 0x001c3764
LAB_001c3753:
XOR R13D,R13D
XOR ECX,ECX
LAB_001c3758:
MOV word ptr [RSI],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],R13
LAB_001c3764:
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
ushort uVar1;
short sVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
void *pvVar10;
void *__s1;
short *psVar11;
short local_3e;
ushort local_3c;
int2 local_3a;
ulong *local_38;
if (param_3 == 0) {
*param_4 = 0;
uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0);
}
else {
if (param_6 == 0) {
uVar9 = 0;
uVar7 = 0;
}
else {
uVar5 = param_3 - 1;
uVar9 = 0;
uVar4 = 0;
local_38 = param_5;
do {
if (1 < param_6) {
lVar8 = param_6 * 8;
uVar7 = param_6;
do {
if ((uVar7 < 7) && (0 < (long)param_1[3])) {
__s1 = (void *)param_1[4];
pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1);
do {
if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) &&
(*(char *)((long)__s1 + 0x52) == '\0')) &&
(iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) {
psVar11 = (short *)((long)__s1 + 0x30);
local_38 = local_38 + uVar7;
param_6 = param_6 - uVar7;
goto LAB_001c36ee;
}
__s1 = (void *)((long)__s1 + 0x58);
} while (__s1 < pvVar10);
}
uVar7 = uVar7 - 1;
lVar8 = lVar8 + -8;
} while (1 < uVar7);
}
uVar7 = *local_38;
if (*param_1 < (uVar7 & 0xffffffff)) {
LAB_001c3660:
uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40;
if (uVar7 - 0x3400 < 0x19b6) {
uVar1 = 0xfb80;
}
local_3e = (short)(uVar7 >> 0xf) + uVar1;
local_3c = (ushort)uVar7 | 0x8000;
local_3a = 0;
psVar11 = &local_3e;
}
else {
uVar6 = uVar7 >> 8 & 0xffffff;
lVar8 = *(long *)(param_1[2] + uVar6 * 8);
if (lVar8 == 0) goto LAB_001c3660;
psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) *
((uint)uVar7 & 0xff)) * 2);
}
local_38 = local_38 + 1;
param_6 = param_6 - 1;
LAB_001c36ee:
sVar2 = *psVar11;
if (uVar9 < uVar5 && sVar2 != 0) {
do {
psVar11 = psVar11 + 1;
*param_2 = sVar2;
param_2 = param_2 + 1;
uVar9 = uVar9 + 1;
sVar2 = *psVar11;
if (sVar2 == 0) break;
} while (uVar9 < uVar5);
}
uVar7 = 1;
if (sVar2 == 0) {
uVar7 = uVar4;
}
if (uVar9 != uVar5) {
uVar7 = uVar4;
}
uVar4 = uVar7;
} while (param_6 != 0);
}
*param_2 = 0;
*param_4 = uVar9;
}
return uVar7 & 0xffffffff;
}
|
|
4,194 | nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/json.hpp | output_adapter(StringType& s)
: oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0xa2e33
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4dd26
addq $0x10, %rsp
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail14output_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERS8_:
push rbx
sub rsp, 10h
mov rbx, rdi
mov rdi, rsp
call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_36detail21output_string_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEJRS9_EESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(std::string&)
lea rdi, [rsp+18h+var_10]
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()
add rsp, 10h
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::string>::output_adapter(_OWORD *a1)
{
__int128 v1; // xmm0
__int128 v3; // [rsp+0h] [rbp-18h] BYREF
std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(&v3);
v1 = v3;
*((_QWORD *)&v3 + 1) = 0LL;
*a1 = v1;
*(_QWORD *)&v3 = 0LL;
return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1);
}
| output_adapter:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RDI,RSP
CALL 0x001a2e33
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014dd26
ADD RSP,0x10
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::string
>::output_adapter(std::__cxx11::string&) */
void nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::__cxx11::string>::output_adapter
(string *param_1)
{
int8 uVar1;
int8 local_18;
int8 uStack_10;
std::
make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::__cxx11::string>,std::__cxx11::string&>
((string *)&local_18);
uVar1 = uStack_10;
uStack_10 = 0;
*(int8 *)param_1 = local_18;
*(int8 *)(param_1 + 8) = uVar1;
local_18 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10);
return;
}
|
|
4,195 | mi_get_status | eloqsql/storage/myisam/mi_locking.c | my_bool mi_get_status(void* param, my_bool concurrent_insert)
{
MI_INFO *info=(MI_INFO*) param;
DBUG_ENTER("mi_get_status");
DBUG_PRINT("info",("name: %s key_file: %lu data_file: %lu rows: %lu concurrent_insert: %d",
info->s->index_file_name,
(ulong) info->s->state.state.key_file_length,
(ulong) info->s->state.state.data_file_length,
(ulong) info->s->state.state.records,
concurrent_insert));
#ifndef DBUG_OFF
if (info->state->key_file_length > info->s->state.state.key_file_length ||
info->state->data_file_length > info->s->state.state.data_file_length)
DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld",
(long) info->state->key_file_length,
(long) info->state->data_file_length));
#endif
info->save_state=info->s->state.state;
info->state= &info->save_state;
info->append_insert_at_end= concurrent_insert;
if (concurrent_insert)
info->s->state.state.uncacheable= TRUE;
DBUG_RETURN(0);
} | O0 | c | mi_get_status:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xb2bac
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x18, %rsi
movl $0x38, %edx
callq 0x2a0b0
movq -0x18(%rbp), %rcx
addq $0x10, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x33a(%rax)
cmpb $0x0, -0x9(%rbp)
je 0xb2bf7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movb $0x1, 0x4c(%rax)
jmp 0xb2bf9
jmp 0xb2bfb
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mi_get_status:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_B2BAC:
mov rdi, [rbp+var_18]
add rdi, 10h
mov rax, [rbp+var_18]
mov rsi, [rax]
add rsi, 18h
mov edx, 38h ; '8'
call _memcpy
mov rcx, [rbp+var_18]
add rcx, 10h
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov cl, [rbp+var_9]
mov rax, [rbp+var_18]
mov [rax+33Ah], cl
cmp [rbp+var_9], 0
jz short loc_B2BF7
mov rax, [rbp+var_18]
mov rax, [rax]
mov byte ptr [rax+4Ch], 1
loc_B2BF7:
jmp short $+2
loc_B2BF9:
jmp short $+2
loc_B2BFB:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long mi_get_status(long long a1, char a2)
{
memcpy(a1 + 16, *(_QWORD *)a1 + 24LL, 56LL);
*(_QWORD *)(a1 + 8) = a1 + 16;
*(_BYTE *)(a1 + 826) = a2;
if ( a2 )
*(_BYTE *)(*(_QWORD *)a1 + 76LL) = 1;
return 0LL;
}
| mi_get_status:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b2bac
LAB_001b2bac:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
ADD RSI,0x18
MOV EDX,0x38
CALL 0x0012a0b0
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV CL,byte ptr [RBP + -0x9]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x33a],CL
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001b2bf7
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX + 0x4c],0x1
LAB_001b2bf7:
JMP 0x001b2bf9
LAB_001b2bf9:
JMP 0x001b2bfb
LAB_001b2bfb:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 mi_get_status(long *param_1,char param_2)
{
memcpy(param_1 + 2,(void *)(*param_1 + 0x18),0x38);
param_1[1] = (long)(param_1 + 2);
*(char *)((long)param_1 + 0x33a) = param_2;
if (param_2 != '\0') {
*(int1 *)(*param_1 + 0x4c) = 1;
}
return 0;
}
|
|
4,196 | ggml_backend_sched_reset | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | void ggml_backend_sched_reset(ggml_backend_sched_t sched) {
// reset state for the next run
if (!sched->is_reset) {
ggml_hash_set_reset(&sched->hash_set);
memset(sched->hv_tensor_backend_ids, -1, sched->hash_set.size * sizeof(sched->hv_tensor_backend_ids[0]));
memset(sched->hv_tensor_copies, 0, sched->hash_set.size * sched->n_backends * sched->n_copies * sizeof(struct ggml_tensor *));
sched->is_reset = true;
}
sched->is_alloc = false;
} | O2 | cpp | ggml_backend_sched_reset:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
jne 0x2b1da
leaq 0x110(%rbx), %rdi
callq 0x1d810
movq 0x110(%rbx), %rdx
movq 0x128(%rbx), %rdi
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x1cc30
movq 0x130(%rbx), %rdi
movslq 0x4(%rbx), %rdx
movslq 0x1b8(%rbx), %rax
imulq 0x110(%rbx), %rdx
imulq %rax, %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x1cc30
movb $0x1, (%rbx)
movb $0x0, 0x1(%rbx)
popq %rbx
retq
| ggml_backend_sched_reset:
push rbx
mov rbx, rdi
cmp byte ptr [rdi], 0
jnz short loc_2B1DA
lea rdi, [rbx+110h]
call _ggml_hash_set_reset
mov rdx, [rbx+110h]
mov rdi, [rbx+128h]
shl rdx, 2
mov esi, 0FFh
call _memset
mov rdi, [rbx+130h]
movsxd rdx, dword ptr [rbx+4]
movsxd rax, dword ptr [rbx+1B8h]
imul rdx, [rbx+110h]
imul rdx, rax
shl rdx, 3
xor esi, esi
call _memset
mov byte ptr [rbx], 1
loc_2B1DA:
mov byte ptr [rbx+1], 0
pop rbx
retn
| long long ggml_backend_sched_reset(long long a1)
{
long long result; // rax
if ( !*(_BYTE *)a1 )
{
ggml_hash_set_reset((_QWORD *)(a1 + 272));
memset(*(_QWORD *)(a1 + 296), 255LL, 4LL * *(_QWORD *)(a1 + 272));
result = memset(*(_QWORD *)(a1 + 304), 0LL, 8 * *(int *)(a1 + 440) * *(_QWORD *)(a1 + 272) * *(int *)(a1 + 4));
*(_BYTE *)a1 = 1;
}
*(_BYTE *)(a1 + 1) = 0;
return result;
}
| ggml_backend_sched_reset:
PUSH RBX
MOV RBX,RDI
CMP byte ptr [RDI],0x0
JNZ 0x0012b1da
LEA RDI,[RBX + 0x110]
CALL 0x0011d810
MOV RDX,qword ptr [RBX + 0x110]
MOV RDI,qword ptr [RBX + 0x128]
SHL RDX,0x2
MOV ESI,0xff
CALL 0x0011cc30
MOV RDI,qword ptr [RBX + 0x130]
MOVSXD RDX,dword ptr [RBX + 0x4]
MOVSXD RAX,dword ptr [RBX + 0x1b8]
IMUL RDX,qword ptr [RBX + 0x110]
IMUL RDX,RAX
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0011cc30
MOV byte ptr [RBX],0x1
LAB_0012b1da:
MOV byte ptr [RBX + 0x1],0x0
POP RBX
RET
|
void ggml_backend_sched_reset(char *param_1)
{
if (*param_1 == '\0') {
ggml_hash_set_reset(param_1 + 0x110);
memset(*(void **)(param_1 + 0x128),0xff,*(long *)(param_1 + 0x110) << 2);
memset(*(void **)(param_1 + 0x130),0,
(long)*(int *)(param_1 + 4) * *(long *)(param_1 + 0x110) *
(long)*(int *)(param_1 + 0x1b8) * 8);
*param_1 = '\x01';
}
param_1[1] = '\0';
return;
}
|
|
4,197 | mysql_client_find_plugin | eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c | struct st_mysql_client_plugin * STDCALL
mysql_client_find_plugin(MYSQL *mysql, const char *name, int type)
{
struct st_mysql_client_plugin *p;
int plugin_nr= get_plugin_nr(type);
if (is_not_initialized(mysql, name))
return NULL;
if (plugin_nr == -1)
{
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN,
ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, "invalid type");
}
if ((p= find_plugin(name, type)))
return p;
/* not found, load it */
return mysql_load_plugin(mysql, name, type, 0);
} | O3 | c | mysql_client_find_plugin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
leaq 0x1094b(%rip), %rcx # 0x383c0
cmpl %r15d, (%rax,%rcx)
je 0x27ac1
addq $0x8, %rax
cmpq $0x30, %rax
jne 0x27a75
cmpb $0x0, 0x22d44(%rip) # 0x4a7d0
je 0x27af7
leaq 0x20fcb(%rip), %rax # 0x48a60
movq (%rax), %rdx
leaq 0x20fd1(%rip), %rax # 0x48a70
movq 0x1d8(%rax), %rcx
leaq 0xd448(%rip), %r9 # 0x34ef5
movq %r14, %rdi
movl $0x80b, %esi # imm = 0x80B
movq %rbx, %r8
xorl %eax, %eax
callq 0x15789
jmp 0x27aca
cmpb $0x0, 0x22d08(%rip) # 0x4a7d0
je 0x27af7
movq %rbx, %rdi
movl %r15d, %esi
callq 0x276d3
movq %rax, %r12
testq %rax, %rax
jne 0x27b2b
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x279e9
leaq 0x20f62(%rip), %rax # 0x48a60
movq (%rax), %rdx
leaq 0x20f68(%rip), %rax # 0x48a70
movq 0x1d8(%rax), %rcx
leaq 0xd44b(%rip), %r9 # 0x34f61
xorl %r12d, %r12d
movq %r14, %rdi
movl $0x80b, %esi # imm = 0x80B
movq %rbx, %r8
xorl %eax, %eax
callq 0x15789
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| mysql_client_find_plugin:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15d, edx
mov rbx, rsi
mov r14, rdi
xor eax, eax
lea rcx, valid_plugins
loc_27A75:
cmp [rax+rcx], r15d
jz short loc_27AC1
add rax, 8
cmp rax, 30h ; '0'
jnz short loc_27A75
cmp cs:initialized, 0
jz short loc_27AF7
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
lea r9, aInvalidType; "invalid type"
mov rdi, r14
mov esi, 80Bh
mov r8, rbx
xor eax, eax
call my_set_error
jmp short loc_27ACA
loc_27AC1:
cmp cs:initialized, 0
jz short loc_27AF7
loc_27ACA:
mov rdi, rbx
mov esi, r15d
call find_plugin
mov r12, rax
test rax, rax
jnz short loc_27B2B
mov rdi, r14
mov rsi, rbx
mov edx, r15d
xor ecx, ecx
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp mysql_load_plugin
loc_27AF7:
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
xor eax, eax
call my_set_error
loc_27B2B:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mysql_client_find_plugin(
long long a1,
const char *a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14,
char a15)
{
long long v16; // rax
long long v17; // r8
long long v18; // r9
long long plugin; // r12
__m128 v20; // xmm4
__m128 v21; // xmm5
v16 = 0LL;
while ( valid_plugins[v16] != a3 )
{
v16 += 2LL;
if ( v16 == 12 )
{
if ( initialized )
{
my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, "invalid type");
goto LABEL_7;
}
LABEL_9:
plugin = 0LL;
my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, "not initialized");
return plugin;
}
}
if ( !initialized )
goto LABEL_9;
LABEL_7:
plugin = find_plugin((long long)a2, a3);
if ( !plugin )
return mysql_load_plugin(a1, a2, a3, 0, v17, v18, a4, a5, a6, a7, v20, v21, a10, a11, a15);
return plugin;
}
| mysql_client_find_plugin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,EDX
MOV RBX,RSI
MOV R14,RDI
XOR EAX,EAX
LEA RCX,[0x1383c0]
LAB_00127a75:
CMP dword ptr [RAX + RCX*0x1],R15D
JZ 0x00127ac1
ADD RAX,0x8
CMP RAX,0x30
JNZ 0x00127a75
CMP byte ptr [0x0014a7d0],0x0
JZ 0x00127af7
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x148a70]
MOV RCX,qword ptr [RAX + 0x1d8]
LEA R9,[0x134ef5]
MOV RDI,R14
MOV ESI,0x80b
MOV R8,RBX
XOR EAX,EAX
CALL 0x00115789
JMP 0x00127aca
LAB_00127ac1:
CMP byte ptr [0x0014a7d0],0x0
JZ 0x00127af7
LAB_00127aca:
MOV RDI,RBX
MOV ESI,R15D
CALL 0x001276d3
MOV R12,RAX
TEST RAX,RAX
JNZ 0x00127b2b
MOV RDI,R14
MOV RSI,RBX
MOV EDX,R15D
XOR ECX,ECX
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001279e9
LAB_00127af7:
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x148a70]
MOV RCX,qword ptr [RAX + 0x1d8]
LEA R9,[0x134f61]
XOR R12D,R12D
MOV RDI,R14
MOV ESI,0x80b
MOV R8,RBX
XOR EAX,EAX
CALL 0x00115789
LAB_00127b2b:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long mysql_client_find_plugin(int8 param_1,int8 param_2,int param_3)
{
long lVar1;
lVar1 = 0;
do {
if (*(int *)((long)&valid_plugins + lVar1) == param_3) {
if (initialized != '\0') goto LAB_00127aca;
goto LAB_00127af7;
}
lVar1 = lVar1 + 8;
} while (lVar1 != 0x30);
if (initialized == '\0') {
LAB_00127af7:
lVar1 = 0;
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00148c48,
param_2,"not initialized");
}
else {
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00148c48,
param_2,"invalid type");
LAB_00127aca:
lVar1 = find_plugin(param_2,param_3);
if (lVar1 == 0) {
lVar1 = mysql_load_plugin(param_1,param_2,param_3,0);
return lVar1;
}
}
return lVar1;
}
|
|
4,198 | minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value evaluate(const std::shared_ptr<Context> & context) const {
try {
return do_evaluate(context);
} catch (const std::exception & e) {
std::ostringstream out;
out << e.what();
if (location.source) out << error_location_suffix(*location.source, location.pos);
throw std::runtime_error(out.str());
}
} | O3 | cpp | minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
callq *(%rax)
movq %rbx, %rax
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x85baa
movq %rbx, %rdi
callq 0x1a3a0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1aba0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a8a0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x85ae9
movl $0x10, %edi
callq 0x1a460
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1add0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae40
xorl %ebp, %ebp
movq 0xa6516(%rip), %rsi # 0x12bff0
movq 0xa647f(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af30
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x775d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1aa10
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85aa5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x85aa5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85b82
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x85b82
jmp 0x85b7f
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85b6b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x85b75
jmp 0x85b82
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x85b82
movq %rax, %rbx
movq 0xa63ef(%rip), %rsi # 0x12bf78
leaq 0x28(%rsp), %rdi
callq 0x1a4c0
leaq 0x98(%rsp), %rdi
callq 0x1a2d0
jmp 0x85ba5
movq %rax, %rbx
callq 0x1ae70
movq %rbx, %rdi
callq 0x1afd0
movq %rax, %rdi
callq 0x218f5
| _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi]
call qword ptr [rax]
mov rax, rbx
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 1
jnz loc_85BAA
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]; int
test rsi, rsi
jnz short loc_85AE9
loc_85AA5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_85AE9:
mov rdx, [r14+18h]; int
lea rdi, [rsp+arg_0]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rsi, qword ptr [rsp+arg_0]
mov rdx, [rsp+arg_8]
lea rdi, [rsp+arg_20]
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+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_85AA5
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_85AA5
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_85B82
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_85B82
jmp short loc_85B7F
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_85B6B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_85B6B:
test bpl, bpl
jnz short loc_85B75
jmp short loc_85B82
mov rbx, rax
loc_85B75:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_85B82
loc_85B7F:
mov rbx, rax
loc_85B82:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_90]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_85BA5
mov rbx, rax
loc_85BA5:
call ___cxa_end_catch
loc_85BAA:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::Expression::evaluate(long long a1, void (***a2)(void))
{
(**a2)();
return a1;
}
| evaluate:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
LAB_00185a54:
CALL qword ptr [RAX]
LAB_00185a56:
MOV RAX,RBX
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const */
Expression * __thiscall minja::Expression::evaluate(Expression *this,shared_ptr *param_1)
{
/* try { // try from 00185a54 to 00185a55 has its CatchHandler @ 00185a65 */
(*(code *)**(int8 **)param_1)();
return this;
}
|
|
4,199 | ma_log_compact_keypage | eloqsql/storage/maria/ma_page.c | static my_bool _ma_log_compact_keypage(MARIA_PAGE *ma_page,
TrID min_read_from)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 1 + 7 + TRANSID_SIZE];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
uint translog_parts, extra_length;
my_off_t page= ma_page->pos;
DBUG_ENTER("_ma_log_compact_keypage");
DBUG_PRINT("enter", ("page: %lu", (ulong) (page / share->block_size)));
/* Store address of new root page */
page/= share->block_size;
page_store(log_data + FILEID_STORE_SIZE, page);
log_pos= log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE;
log_pos[0]= KEY_OP_COMPACT_PAGE;
transid_store(log_pos + 1, min_read_from);
log_pos+= 1 + TRANSID_SIZE;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
translog_parts= 1;
extra_length= 0;
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)(log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length),
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O0 | c | ma_log_compact_keypage:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa0(%rbp)
jmp 0x710b0
movq -0x90(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, %ecx
movq -0xa0(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0xa0(%rbp)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
movq -0xa0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x4(%rax)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb $0xb, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
shrq $0x20, %rax
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x48(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movl $0x1, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x88(%rbp), %rcx
movq -0x58(%rbp), %rax
movl -0x98(%rbp), %esi
addq %rsi, %rax
movl %eax, %r8d
movl -0x94(%rbp), %r9d
addl $0x2, %r9d
leaq -0x80(%rbp), %r10
leaq -0x20(%rbp), %rax
leaq -0x40(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x4f4f0
cmpb $0x0, %al
je 0x71200
jmp 0x711fa
movb $0x1, -0x21(%rbp)
jmp 0x71206
jmp 0x71202
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0xb1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x71230
movb -0xb1(%rbp), %al
addq $0xd0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
nop
| _ma_log_compact_keypage:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_A0], rax
jmp short $+2
loc_710B0:
mov rax, [rbp+var_90]
mov eax, [rax+7BCh]
mov ecx, eax
mov rax, [rbp+var_A0]
xor edx, edx
div rcx
mov [rbp+var_A0], rax
lea rax, [rbp+var_20]
add rax, 2
mov [rbp+var_A8], rax
mov rax, [rbp+var_A0]
mov ecx, eax
mov rax, [rbp+var_A8]
mov [rax], ecx
mov rax, [rbp+var_A0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_A8]
mov [rax+4], cl
lea rax, [rbp+var_20]
add rax, 2
add rax, 5
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov byte ptr [rax], 0Bh
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_B0], rax
mov rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_B0]
mov [rax], ecx
mov rax, [rbp+var_38]
shr rax, 20h
mov cx, ax
mov rax, [rbp+var_B0]
mov [rax+4], cx
mov rax, [rbp+var_48]
add rax, 7
mov [rbp+var_48], rax
lea rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
lea rcx, [rbp+var_20]
sub rax, rcx
mov eax, eax
mov [rbp+var_58], rax
mov [rbp+var_94], 1
mov [rbp+var_98], 0
mov rax, [rbp+var_30]
mov ecx, [rax+20h]
mov rax, [rbp+var_30]
mov [rax+24h], ecx
mov rax, [rbp+var_88]
mov rdx, [rax+8]
mov rcx, [rbp+var_88]
mov rax, [rbp+var_58]
mov esi, [rbp+var_98]
add rax, rsi
mov r8d, eax
mov r9d, [rbp+var_94]
add r9d, 2
lea r10, [rbp+var_80]
lea rax, [rbp+var_20]
lea rdi, [rbp+var_40]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+0D0h+var_D0], r10
mov [rsp+0D0h+var_C8], rax
mov [rsp+0D0h+var_C0], 0
call translog_write_record
cmp al, 0
jz short loc_71200
jmp short $+2
loc_711FA:
mov [rbp+var_21], 1
jmp short loc_71206
loc_71200:
jmp short $+2
loc_71202:
mov [rbp+var_21], 0
loc_71206:
mov al, [rbp+var_21]
mov [rbp+var_B1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_71230
mov al, [rbp+var_B1]
add rsp, 0D0h
pop rbp
retn
loc_71230:
call ___stack_chk_fail
| bool ma_log_compact_keypage(long long a1, long long a2)
{
unsigned long long v3; // [rsp+30h] [rbp-A0h]
long long *v4; // [rsp+48h] [rbp-88h]
_QWORD v5[5]; // [rsp+50h] [rbp-80h] BYREF
long long v6; // [rsp+78h] [rbp-58h]
_BYTE *v7; // [rsp+88h] [rbp-48h]
_BYTE v8[8]; // [rsp+90h] [rbp-40h] BYREF
long long v9; // [rsp+98h] [rbp-38h]
long long v10; // [rsp+A0h] [rbp-30h]
__int16 v11; // [rsp+B0h] [rbp-20h] BYREF
int v12; // [rsp+B2h] [rbp-1Eh]
char v13; // [rsp+B6h] [rbp-1Ah]
char v14; // [rsp+B7h] [rbp-19h]
int v15; // [rsp+B8h] [rbp-18h]
__int16 v16; // [rsp+BCh] [rbp-14h]
_BYTE v17[18]; // [rsp+BEh] [rbp-12h] BYREF
long long savedregs; // [rsp+D0h] [rbp+0h] BYREF
*(_QWORD *)&v17[10] = __readfsqword(0x28u);
v10 = a1;
v9 = a2;
v4 = *(long long **)a1;
v3 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(**(_QWORD **)a1 + 1980LL);
v12 = v3;
v13 = BYTE4(v3);
v14 = 11;
v15 = a2;
v16 = WORD2(a2);
v7 = v17;
v5[4] = &v11;
v6 = (unsigned int)v17 - ((unsigned int)&savedregs - 32);
*(_DWORD *)(a1 + 36) = *(_DWORD *)(a1 + 32);
return translog_write_record((long long)v8, 0xCu, v4[1], v4, v6, 3u, v5, &v11, 0LL) != 0;
}
| _ma_log_compact_keypage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RSI
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001710b0
LAB_001710b0:
MOV RAX,qword ptr [RBP + -0x90]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa0]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xa0],RAX
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xa0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xa8]
MOV byte ptr [RAX + 0x4],CL
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],0xb
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x20
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xb0]
MOV word ptr [RAX + 0x4],CX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x7
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x94],0x1
MOV dword ptr [RBP + -0x98],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RBP + -0x58]
MOV ESI,dword ptr [RBP + -0x98]
ADD RAX,RSI
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x94]
ADD R9D,0x2
LEA R10,[RBP + -0x80]
LEA RAX,[RBP + -0x20]
LEA RDI,[RBP + -0x40]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x0014f4f0
CMP AL,0x0
JZ 0x00171200
JMP 0x001711fa
LAB_001711fa:
MOV byte ptr [RBP + -0x21],0x1
JMP 0x00171206
LAB_00171200:
JMP 0x00171202
LAB_00171202:
MOV byte ptr [RBP + -0x21],0x0
LAB_00171206:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0xb1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00171230
MOV AL,byte ptr [RBP + -0xb1]
ADD RSP,0xd0
POP RBP
RET
LAB_00171230:
CALL 0x0012a270
|
int8 _ma_log_compact_keypage(long *param_1,int8 param_2)
{
long *plVar1;
char cVar2;
uint uVar3;
ulong uVar4;
long in_FS_OFFSET;
int1 local_88 [32];
int1 *local_68;
ulong local_60;
int1 *local_50;
int1 local_48 [8];
int8 local_40;
long *local_38;
int1 local_29;
int1 local_28 [2];
int4 local_26;
int1 local_22;
int1 local_21;
int4 local_20;
int2 local_1c;
int1 auStack_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_26 = (int4)uVar4;
local_22 = (int1)(uVar4 >> 0x20);
local_21 = 0xb;
local_20 = (int4)param_2;
local_1c = (int2)((ulong)param_2 >> 0x20);
local_50 = auStack_1a;
local_68 = local_28;
uVar3 = (int)local_50 - (int)local_28;
local_60 = (ulong)uVar3;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_40 = param_2;
local_38 = param_1;
cVar2 = translog_write_record(local_48,0xc,plVar1[1],plVar1,uVar3,3,local_88,local_28,0);
local_29 = cVar2 != '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.