index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
---|---|---|---|---|---|---|---|---|---|---|---|
1,500 | mi_keydef_write | eloqsql/storage/myisam/mi_open.c | uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movb 0x8(%rsi), %al
movb %al, -0x24(%rbp)
movb 0xc(%rsi), %al
movb %al, -0x23(%rbp)
movzwl 0xa(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x22(%rbp)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x20(%rbp)
movzwl 0x12(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1e(%rbp)
movzwl 0x14(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1c(%rbp)
movzwl 0x16(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x305a56(%rip), %rax # 0x389060
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x8365d
leaq -0x24(%rbp), %rsi
movl $0xc, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2f2d0
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x83677
movb %cl, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x24(%rbp), %rdx
leaq -0x30(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e382
movq (%r14), %rcx
jmp 0x8363b
callq 0x29240
| mi_keydef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_18], rax
mov al, [rsi+8]
mov [rbp+var_24], al
mov al, [rsi+0Ch]
mov [rbp+var_23], al
movzx eax, word ptr [rsi+0Ah]
rol ax, 8
mov [rbp+var_22], ax
movzx eax, word ptr [rsi+0Eh]
rol ax, 8
mov [rbp+var_20], ax
movzx eax, word ptr [rsi+12h]
rol ax, 8
mov [rbp+var_1E], ax
movzx eax, word ptr [rsi+14h]
rol ax, 8
mov [rbp+var_1C], ax
movzx eax, word ptr [rsi+16h]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_8365D
lea rsi, [rbp+var_24]
mov edx, 0Ch
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_8363B:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_83677
mov al, cl
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_8365D:
lea rdx, [rbp+var_24]
lea r14, [rbp+var_30]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_keydef_write_cold_1
mov rcx, [r14]
jmp short loc_8363B
loc_83677:
call ___stack_chk_fail
| bool mi_keydef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF
long long v7; // [rsp+50h] [rbp-30h] BYREF
_BYTE v8[2]; // [rsp+5Ch] [rbp-24h] BYREF
__int16 v9; // [rsp+5Eh] [rbp-22h]
__int16 v10; // [rsp+60h] [rbp-20h]
__int16 v11; // [rsp+62h] [rbp-1Eh]
__int16 v12; // [rsp+64h] [rbp-1Ch]
__int16 v13; // [rsp+66h] [rbp-1Ah]
unsigned long long v14; // [rsp+68h] [rbp-18h]
v14 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v9 = __ROL2__(*(_WORD *)(a2 + 10), 8);
v10 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v11 = __ROL2__(*(_WORD *)(a2 + 18), 8);
v12 = __ROL2__(*(_WORD *)(a2 + 20), 8);
v13 = __ROL2__(*(_WORD *)(a2 + 22), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_keydef_write_cold_1(v2, a1, (long long)v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)v8, 12LL, 4LL);
}
return v3 != 0;
}
| mi_keydef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [RSI + 0x8]
MOV byte ptr [RBP + -0x24],AL
MOV AL,byte ptr [RSI + 0xc]
MOV byte ptr [RBP + -0x23],AL
MOVZX EAX,word ptr [RSI + 0xa]
ROL AX,0x8
MOV word ptr [RBP + -0x22],AX
MOVZX EAX,word ptr [RSI + 0xe]
ROL AX,0x8
MOV word ptr [RBP + -0x20],AX
MOVZX EAX,word ptr [RSI + 0x12]
ROL AX,0x8
MOV word ptr [RBP + -0x1e],AX
MOVZX EAX,word ptr [RSI + 0x14]
ROL AX,0x8
MOV word ptr [RBP + -0x1c],AX
MOVZX EAX,word ptr [RSI + 0x16]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0018365d
LEA RSI,[RBP + -0x24]
MOV EDX,0xc
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012f2d0
MOV RCX,RAX
LAB_0018363b:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x00183677
MOV AL,CL
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0018365d:
LEA RDX,[RBP + -0x24]
LEA R14,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e382
MOV RCX,qword ptr [R14]
JMP 0x0018363b
LAB_00183677:
CALL 0x00129240
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_80 [72];
long local_38;
int1 local_2c;
int1 local_2b;
ushort local_2a;
ushort local_28;
ushort local_26;
ushort local_24;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = *(int1 *)(param_2 + 8);
local_2b = *(int1 *)(param_2 + 0xc);
local_2a = *(ushort *)(param_2 + 10) << 8 | *(ushort *)(param_2 + 10) >> 8;
local_28 = *(ushort *)(param_2 + 0xe) << 8 | *(ushort *)(param_2 + 0xe) >> 8;
local_26 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8;
local_24 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8;
local_22 = *(ushort *)(param_2 + 0x16) << 8 | *(ushort *)(param_2 + 0x16) >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7);
if (lVar1 == 0) {
local_38 = my_write(param_1,&local_2c,0xc,4);
}
else {
mi_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_38 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,501 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&, int, unsigned short) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp | void
SubdivisionPlanBuilder::setFaceTags(FaceTags& tags, int levelIndex, LocalIndex faceIndex) const {
tags.clear();
tags.hasPatch = _patchBuilder->IsFaceAPatch(levelIndex, faceIndex)
&& _patchBuilder->IsFaceALeaf(levelIndex, faceIndex);
if (!tags.hasPatch)
return;
tags.isRegular = _patchBuilder->IsPatchRegular(levelIndex, faceIndex);
if (tags.isRegular) {
tags.boundaryMask =
_patchBuilder->GetRegularPatchBoundaryMask(levelIndex, faceIndex);
if (tags.boundaryMask == 0 && _faceRefiner->GetAdaptiveOptions().useSingleCreasePatch) {
Far::PatchBuilder::SingleCreaseInfo info;
if (_patchBuilder->IsRegularSingleCreasePatch(levelIndex, faceIndex, info)) {
unsigned int isolationLevel = _faceRefiner->GetAdaptiveOptions().isolationLevel;
float sharpness = std::min(info.creaseSharpness, float(isolationLevel - levelIndex));
if (sharpness>0.f) {
tags.isSingleCrease = true;
tags.boundaryIndex = info.creaseEdgeInFace;
tags.sharpness = sharpness;
}
}
}
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&, int, unsigned short) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsi)
movq 0x110(%rdi), %rdi
movl %edx, %esi
movl %ecx, %edx
callq 0x3a8c0
testb %al, %al
je 0xa7b51
movq 0x110(%r14), %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x3a520
movzbl %al, %eax
jmp 0xa7b53
xorl %eax, %eax
movl (%rbx), %ecx
andl $-0x2, %ecx
movzwl %ax, %eax
orl %eax, %ecx
movw %cx, (%rbx)
testw %ax, %ax
je 0xa7c24
movq 0x110(%r14), %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x39700
movl (%rbx), %ecx
movzbl %al, %eax
andl $-0x3, %ecx
leal (%rcx,%rax,2), %ecx
movw %cx, (%rbx)
testb %al, %al
je 0xa7c24
movq 0x110(%r14), %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x39d00
movl (%rbx), %ecx
andl $-0x7d, %ecx
andl $0x1f, %eax
leal (%rcx,%rax,4), %eax
movw %ax, (%rbx)
jne 0xa7c24
movq 0x108(%r14), %rax
testb $0x1, 0x11(%rax)
je 0xa7c24
movq 0x110(%r14), %rdi
movq %rsp, %rcx
movl %ebp, %esi
movl %r15d, %edx
callq 0x3a370
testb %al, %al
je 0xa7c24
movq 0x108(%r14), %rax
movl 0x10(%rax), %eax
andl $0xf, %eax
subl %ebp, %eax
cvtsi2ss %rax, %xmm0
minss 0x4(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xa7c24
movl $0x8000, %eax # imm = 0x8000
orl (%rbx), %eax
movw %ax, (%rbx)
movl (%rsp), %ecx
andl $0x3, %ecx
shll $0x7, %ecx
andl $0xfffffe7f, %eax # imm = 0xFFFFFE7F
orl %ecx, %eax
movw %ax, (%rbx)
movss %xmm0, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder11setFaceTagsERNS2_8FaceTagsEit:
push rbp
push r15
push r14
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov rbx, rsi
mov r14, rdi
mov qword ptr [rsi], 0
mov rdi, [rdi+110h]; this
mov esi, edx; int
mov edx, ecx; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder12IsFaceAPatchEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(int,int)
test al, al
jz short loc_A7B51
mov rdi, [r14+110h]; this
mov esi, ebp; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder11IsFaceALeafEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int,int)
movzx eax, al
jmp short loc_A7B53
loc_A7B51:
xor eax, eax
loc_A7B53:
mov ecx, [rbx]
and ecx, 0FFFFFFFEh
movzx eax, ax
or ecx, eax
mov [rbx], cx
test ax, ax
jz loc_A7C24
mov rdi, [r14+110h]; this
mov esi, ebp; int
mov edx, r15d; int
mov ecx, 0FFFFFFFFh; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder14IsPatchRegularEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(int,int,int)
mov ecx, [rbx]
movzx eax, al
and ecx, 0FFFFFFFDh
lea ecx, [rcx+rax*2]
mov [rbx], cx
test al, al
jz loc_A7C24
mov rdi, [r14+110h]; this
mov esi, ebp; int
mov edx, r15d; int
mov ecx, 0FFFFFFFFh; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder27GetRegularPatchBoundaryMaskEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int,int,int)
mov ecx, [rbx]
and ecx, 0FFFFFF83h
and eax, 1Fh
lea eax, [rcx+rax*4]
mov [rbx], ax
jnz short loc_A7C24
mov rax, [r14+108h]
test byte ptr [rax+11h], 1
jz short loc_A7C24
mov rdi, [r14+110h]
mov rcx, rsp
mov esi, ebp
mov edx, r15d
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder26IsRegularSingleCreasePatchEiiRNS2_16SingleCreaseInfoE; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsRegularSingleCreasePatch(int,int,OpenSubdiv::v3_6_0::Far::PatchBuilder::SingleCreaseInfo &)
test al, al
jz short loc_A7C24
mov rax, [r14+108h]
mov eax, [rax+10h]
and eax, 0Fh
sub eax, ebp
cvtsi2ss xmm0, rax
minss xmm0, [rsp+28h+var_24]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_A7C24
mov eax, 8000h
or eax, [rbx]
mov [rbx], ax
mov ecx, [rsp+28h+var_28]
and ecx, 3
shl ecx, 7
and eax, 0FFFFFE7Fh
or eax, ecx
mov [rbx], ax
movss dword ptr [rbx+4], xmm0
loc_A7C24:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(long long a1, long long a2, int a3, int a4)
{
long long v4; // rax
long long result; // rax
bool v8; // zf
int v9; // eax
float v10; // xmm0_4
int v11; // eax
long long v12; // [rsp+0h] [rbp-28h] BYREF
v12 = v4;
*(_QWORD *)a2 = 0LL;
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4) )
LOWORD(result) = (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4);
else
LOWORD(result) = 0;
result = (unsigned __int16)result;
*(_WORD *)a2 = result | *(_WORD *)a2 & 0xFFFE;
if ( (_WORD)result )
{
result = (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4,
-1);
*(_WORD *)a2 = (*(_WORD *)a2 & 0xFFFD) + 2 * (unsigned __int8)result;
if ( (_BYTE)result )
{
v9 = OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4,
-1) & 0x1F;
v8 = v9 == 0;
result = (*(_DWORD *)a2 & 0xFFFFFF83) + 4 * v9;
*(_WORD *)a2 = result;
if ( v8 )
{
result = *(_QWORD *)(a1 + 264);
if ( (*(_BYTE *)(result + 17) & 1) != 0 )
{
result = OpenSubdiv::v3_6_0::Far::PatchBuilder::IsRegularSingleCreasePatch(
*(_QWORD *)(a1 + 272),
a3,
a4,
(long long)&v12);
if ( (_BYTE)result )
{
result = (*(_DWORD *)(*(_QWORD *)(a1 + 264) + 16LL) & 0xFu) - a3;
v10 = fminf((float)(int)result, *((float *)&v12 + 1));
if ( v10 > 0.0 )
{
v11 = *(_DWORD *)a2 | 0x8000;
*(_WORD *)a2 = v11;
result = ((v12 & 3) << 7) | v11 & 0xFFFFFE7F;
*(_WORD *)a2 = result;
*(float *)(a2 + 4) = v10;
}
}
}
}
}
}
return result;
}
| setFaceTags:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSI],0x0
MOV RDI,qword ptr [RDI + 0x110]
MOV ESI,EDX
MOV EDX,ECX
CALL 0x0013a8c0
TEST AL,AL
JZ 0x001a7b51
MOV RDI,qword ptr [R14 + 0x110]
MOV ESI,EBP
MOV EDX,R15D
CALL 0x0013a520
MOVZX EAX,AL
JMP 0x001a7b53
LAB_001a7b51:
XOR EAX,EAX
LAB_001a7b53:
MOV ECX,dword ptr [RBX]
AND ECX,0xfffffffe
MOVZX EAX,AX
OR ECX,EAX
MOV word ptr [RBX],CX
TEST AX,AX
JZ 0x001a7c24
MOV RDI,qword ptr [R14 + 0x110]
MOV ESI,EBP
MOV EDX,R15D
MOV ECX,0xffffffff
CALL 0x00139700
MOV ECX,dword ptr [RBX]
MOVZX EAX,AL
AND ECX,0xfffffffd
LEA ECX,[RCX + RAX*0x2]
MOV word ptr [RBX],CX
TEST AL,AL
JZ 0x001a7c24
MOV RDI,qword ptr [R14 + 0x110]
MOV ESI,EBP
MOV EDX,R15D
MOV ECX,0xffffffff
CALL 0x00139d00
MOV ECX,dword ptr [RBX]
AND ECX,0xffffff83
AND EAX,0x1f
LEA EAX,[RCX + RAX*0x4]
MOV word ptr [RBX],AX
JNZ 0x001a7c24
MOV RAX,qword ptr [R14 + 0x108]
TEST byte ptr [RAX + 0x11],0x1
JZ 0x001a7c24
MOV RDI,qword ptr [R14 + 0x110]
MOV RCX,RSP
MOV ESI,EBP
MOV EDX,R15D
CALL 0x0013a370
TEST AL,AL
JZ 0x001a7c24
MOV RAX,qword ptr [R14 + 0x108]
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0xf
SUB EAX,EBP
CVTSI2SS XMM0,RAX
MINSS XMM0,dword ptr [RSP + 0x4]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x001a7c24
MOV EAX,0x8000
OR EAX,dword ptr [RBX]
MOV word ptr [RBX],AX
MOV ECX,dword ptr [RSP]
AND ECX,0x3
SHL ECX,0x7
AND EAX,0xfffffe7f
OR EAX,ECX
MOV word ptr [RBX],AX
MOVSS dword ptr [RBX + 0x4],XMM0
LAB_001a7c24:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&,
int, unsigned short) const */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags
(SubdivisionPlanBuilder *this,FaceTags *param_1,int param_2,ushort param_3)
{
int4 uVar1;
char cVar2;
byte bVar3;
ushort uVar4;
int8 in_RAX;
int iVar5;
int6 in_register_0000000a;
float fVar6;
int8 local_28;
iVar5 = (int)CONCAT62(in_register_0000000a,param_3);
*(int8 *)param_1 = 0;
local_28 = in_RAX;
cVar2 = Far::PatchBuilder::IsFaceAPatch(*(PatchBuilder **)(this + 0x110),param_2,iVar5);
if (cVar2 == '\0') {
uVar4 = 0;
}
else {
bVar3 = Far::PatchBuilder::IsFaceALeaf(*(PatchBuilder **)(this + 0x110),param_2,iVar5);
uVar4 = (ushort)bVar3;
}
*(ushort *)param_1 = (ushort)*(int4 *)param_1 & 0xfffe | uVar4;
if (uVar4 != 0) {
bVar3 = Far::PatchBuilder::IsPatchRegular(*(PatchBuilder **)(this + 0x110),param_2,iVar5,-1);
*(ushort *)param_1 = ((ushort)*(int4 *)param_1 & 0xfffd) + (ushort)bVar3 * 2;
if (bVar3 != 0) {
uVar4 = Far::PatchBuilder::GetRegularPatchBoundaryMask
(*(PatchBuilder **)(this + 0x110),param_2,iVar5,-1);
*(ushort *)param_1 = ((ushort)*(int4 *)param_1 & 0xff83) + (uVar4 & 0x1f) * 4;
if (((uVar4 & 0x1f) == 0) && ((*(byte *)(*(long *)(this + 0x108) + 0x11) & 1) != 0)) {
cVar2 = Far::PatchBuilder::IsRegularSingleCreasePatch
(*(PatchBuilder **)(this + 0x110),param_2,iVar5,
(SingleCreaseInfo *)&local_28);
if (cVar2 != '\0') {
fVar6 = (float)((*(uint *)(*(long *)(this + 0x108) + 0x10) & 0xf) - param_2);
if (local_28._4_4_ <= fVar6) {
fVar6 = local_28._4_4_;
}
if (0.0 < fVar6) {
uVar1 = *(int4 *)param_1;
*(ushort *)param_1 = (ushort)uVar1 | 0x8000;
*(ushort *)param_1 =
(ushort)uVar1 & 0xfe7f | 0x8000 | (ushort)(((uint)local_28 & 3) << 7);
*(float *)(param_1 + 4) = fVar6;
}
}
}
}
}
return;
}
|
|
1,502 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&, int, unsigned short) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp | void
SubdivisionPlanBuilder::setFaceTags(FaceTags& tags, int levelIndex, LocalIndex faceIndex) const {
tags.clear();
tags.hasPatch = _patchBuilder->IsFaceAPatch(levelIndex, faceIndex)
&& _patchBuilder->IsFaceALeaf(levelIndex, faceIndex);
if (!tags.hasPatch)
return;
tags.isRegular = _patchBuilder->IsPatchRegular(levelIndex, faceIndex);
if (tags.isRegular) {
tags.boundaryMask =
_patchBuilder->GetRegularPatchBoundaryMask(levelIndex, faceIndex);
if (tags.boundaryMask == 0 && _faceRefiner->GetAdaptiveOptions().useSingleCreasePatch) {
Far::PatchBuilder::SingleCreaseInfo info;
if (_patchBuilder->IsRegularSingleCreasePatch(levelIndex, faceIndex, info)) {
unsigned int isolationLevel = _faceRefiner->GetAdaptiveOptions().isolationLevel;
float sharpness = std::min(info.creaseSharpness, float(isolationLevel - levelIndex));
if (sharpness>0.f) {
tags.isSingleCrease = true;
tags.boundaryIndex = info.creaseEdgeInFace;
tags.sharpness = sharpness;
}
}
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&, int, unsigned short) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, (%rsi)
movq 0x110(%rdi), %rdi
movl %edx, %esi
movl %ecx, %edx
callq 0x532a0
testb %al, %al
je 0xb2a32
movq 0x110(%r14), %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x52c20
movzbl %al, %eax
jmp 0xb2a34
xorl %eax, %eax
movl (%rbx), %ecx
andl $-0x2, %ecx
movzwl %ax, %eax
orl %eax, %ecx
movw %cx, (%rbx)
testw %ax, %ax
je 0xb2aff
movq 0x110(%r14), %rdi
pushq $-0x1
popq %rcx
movl %ebp, %esi
movl %r15d, %edx
callq 0x515a0
movl (%rbx), %ecx
movzbl %al, %eax
andl $-0x3, %ecx
leal (%rcx,%rax,2), %ecx
movw %cx, (%rbx)
testb %al, %al
je 0xb2aff
movq 0x110(%r14), %rdi
pushq $-0x1
popq %rcx
movl %ebp, %esi
movl %r15d, %edx
callq 0x51ef0
movl (%rbx), %ecx
andl $-0x7d, %ecx
andl $0x1f, %eax
leal (%rcx,%rax,4), %eax
movw %ax, (%rbx)
jne 0xb2aff
movq 0x108(%r14), %rax
testb $0x1, 0x11(%rax)
je 0xb2aff
movq 0x110(%r14), %rdi
movq %rsp, %rcx
movl %ebp, %esi
movl %r15d, %edx
callq 0x529a0
testb %al, %al
je 0xb2aff
movq 0x108(%r14), %rax
movl 0x10(%rax), %eax
andl $0xf, %eax
subl %ebp, %eax
cvtsi2ss %rax, %xmm0
minss 0x4(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb2aff
movzwl (%rbx), %eax
movl (%rsp), %ecx
andl $0x3, %ecx
shll $0x7, %ecx
andl $0x7e7f, %eax # imm = 0x7E7F
addl %ecx, %eax
addl $0x8000, %eax # imm = 0x8000
movw %ax, (%rbx)
movss %xmm0, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder11setFaceTagsERNS2_8FaceTagsEit:
push rbp
push r15
push r14
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov rbx, rsi
mov r14, rdi
and qword ptr [rsi], 0
mov rdi, [rdi+110h]; this
mov esi, edx; int
mov edx, ecx; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder12IsFaceAPatchEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(int,int)
test al, al
jz short loc_B2A32
mov rdi, [r14+110h]; this
mov esi, ebp; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder11IsFaceALeafEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int,int)
movzx eax, al
jmp short loc_B2A34
loc_B2A32:
xor eax, eax
loc_B2A34:
mov ecx, [rbx]
and ecx, 0FFFFFFFEh
movzx eax, ax
or ecx, eax
mov [rbx], cx
test ax, ax
jz loc_B2AFF
mov rdi, [r14+110h]; this
push 0FFFFFFFFFFFFFFFFh
pop rcx; int
mov esi, ebp; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder14IsPatchRegularEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(int,int,int)
mov ecx, [rbx]
movzx eax, al
and ecx, 0FFFFFFFDh
lea ecx, [rcx+rax*2]
mov [rbx], cx
test al, al
jz loc_B2AFF
mov rdi, [r14+110h]; this
push 0FFFFFFFFFFFFFFFFh
pop rcx; int
mov esi, ebp; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder27GetRegularPatchBoundaryMaskEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int,int,int)
mov ecx, [rbx]
and ecx, 0FFFFFF83h
and eax, 1Fh
lea eax, [rcx+rax*4]
mov [rbx], ax
jnz short loc_B2AFF
mov rax, [r14+108h]
test byte ptr [rax+11h], 1
jz short loc_B2AFF
mov rdi, [r14+110h]
mov rcx, rsp
mov esi, ebp
mov edx, r15d
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder26IsRegularSingleCreasePatchEiiRNS2_16SingleCreaseInfoE; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsRegularSingleCreasePatch(int,int,OpenSubdiv::v3_6_0::Far::PatchBuilder::SingleCreaseInfo &)
test al, al
jz short loc_B2AFF
mov rax, [r14+108h]
mov eax, [rax+10h]
and eax, 0Fh
sub eax, ebp
cvtsi2ss xmm0, rax
minss xmm0, [rsp+28h+var_24]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_B2AFF
movzx eax, word ptr [rbx]
mov ecx, [rsp+28h+var_28]
and ecx, 3
shl ecx, 7
and eax, 7E7Fh
add eax, ecx
add eax, 8000h
mov [rbx], ax
movss dword ptr [rbx+4], xmm0
loc_B2AFF:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(long long a1, long long a2, int a3, int a4)
{
long long v4; // rax
long long result; // rax
bool v8; // zf
int v9; // eax
float v10; // xmm0_4
long long v11; // [rsp+0h] [rbp-28h] BYREF
v11 = v4;
*(_QWORD *)a2 = 0LL;
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4) )
LOWORD(result) = (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4);
else
LOWORD(result) = 0;
result = (unsigned __int16)result;
*(_WORD *)a2 = result | *(_WORD *)a2 & 0xFFFE;
if ( (_WORD)result )
{
result = (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4,
-1);
*(_WORD *)a2 = (*(_WORD *)a2 & 0xFFFD) + 2 * (unsigned __int8)result;
if ( (_BYTE)result )
{
v9 = OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(
*(OpenSubdiv::v3_6_0::Far::PatchBuilder **)(a1 + 272),
a3,
a4,
-1) & 0x1F;
v8 = v9 == 0;
result = (*(_DWORD *)a2 & 0xFFFFFF83) + 4 * v9;
*(_WORD *)a2 = result;
if ( v8 )
{
result = *(_QWORD *)(a1 + 264);
if ( (*(_BYTE *)(result + 17) & 1) != 0 )
{
result = OpenSubdiv::v3_6_0::Far::PatchBuilder::IsRegularSingleCreasePatch(
*(_QWORD *)(a1 + 272),
a3,
a4,
(long long)&v11);
if ( (_BYTE)result )
{
result = (*(_DWORD *)(*(_QWORD *)(a1 + 264) + 16LL) & 0xFu) - a3;
v10 = fminf((float)(int)result, *((float *)&v11 + 1));
if ( v10 > 0.0 )
{
result = ((v11 & 3) << 7) + (*(_WORD *)a2 & 0x7E7F) + 0x8000;
*(_WORD *)a2 = ((v11 & 3) << 7) + (*(_WORD *)a2 & 0x7E7F) + 0x8000;
*(float *)(a2 + 4) = v10;
}
}
}
}
}
}
return result;
}
| setFaceTags:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV RBX,RSI
MOV R14,RDI
AND qword ptr [RSI],0x0
MOV RDI,qword ptr [RDI + 0x110]
MOV ESI,EDX
MOV EDX,ECX
CALL 0x001532a0
TEST AL,AL
JZ 0x001b2a32
MOV RDI,qword ptr [R14 + 0x110]
MOV ESI,EBP
MOV EDX,R15D
CALL 0x00152c20
MOVZX EAX,AL
JMP 0x001b2a34
LAB_001b2a32:
XOR EAX,EAX
LAB_001b2a34:
MOV ECX,dword ptr [RBX]
AND ECX,0xfffffffe
MOVZX EAX,AX
OR ECX,EAX
MOV word ptr [RBX],CX
TEST AX,AX
JZ 0x001b2aff
MOV RDI,qword ptr [R14 + 0x110]
PUSH -0x1
POP RCX
MOV ESI,EBP
MOV EDX,R15D
CALL 0x001515a0
MOV ECX,dword ptr [RBX]
MOVZX EAX,AL
AND ECX,0xfffffffd
LEA ECX,[RCX + RAX*0x2]
MOV word ptr [RBX],CX
TEST AL,AL
JZ 0x001b2aff
MOV RDI,qword ptr [R14 + 0x110]
PUSH -0x1
POP RCX
MOV ESI,EBP
MOV EDX,R15D
CALL 0x00151ef0
MOV ECX,dword ptr [RBX]
AND ECX,0xffffff83
AND EAX,0x1f
LEA EAX,[RCX + RAX*0x4]
MOV word ptr [RBX],AX
JNZ 0x001b2aff
MOV RAX,qword ptr [R14 + 0x108]
TEST byte ptr [RAX + 0x11],0x1
JZ 0x001b2aff
MOV RDI,qword ptr [R14 + 0x110]
MOV RCX,RSP
MOV ESI,EBP
MOV EDX,R15D
CALL 0x001529a0
TEST AL,AL
JZ 0x001b2aff
MOV RAX,qword ptr [R14 + 0x108]
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0xf
SUB EAX,EBP
CVTSI2SS XMM0,RAX
MINSS XMM0,dword ptr [RSP + 0x4]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x001b2aff
MOVZX EAX,word ptr [RBX]
MOV ECX,dword ptr [RSP]
AND ECX,0x3
SHL ECX,0x7
AND EAX,0x7e7f
ADD EAX,ECX
ADD EAX,0x8000
MOV word ptr [RBX],AX
MOVSS dword ptr [RBX + 0x4],XMM0
LAB_001b2aff:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::FaceTags&,
int, unsigned short) const */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::setFaceTags
(SubdivisionPlanBuilder *this,FaceTags *param_1,int param_2,ushort param_3)
{
char cVar1;
byte bVar2;
ushort uVar3;
int8 in_RAX;
int iVar4;
int6 in_register_0000000a;
float fVar5;
int8 local_28;
iVar4 = (int)CONCAT62(in_register_0000000a,param_3);
*(int8 *)param_1 = 0;
local_28 = in_RAX;
cVar1 = Far::PatchBuilder::IsFaceAPatch(*(PatchBuilder **)(this + 0x110),param_2,iVar4);
if (cVar1 == '\0') {
uVar3 = 0;
}
else {
bVar2 = Far::PatchBuilder::IsFaceALeaf(*(PatchBuilder **)(this + 0x110),param_2,iVar4);
uVar3 = (ushort)bVar2;
}
*(ushort *)param_1 = (ushort)*(int4 *)param_1 & 0xfffe | uVar3;
if (uVar3 != 0) {
bVar2 = Far::PatchBuilder::IsPatchRegular(*(PatchBuilder **)(this + 0x110),param_2,iVar4,-1);
*(ushort *)param_1 = ((ushort)*(int4 *)param_1 & 0xfffd) + (ushort)bVar2 * 2;
if (bVar2 != 0) {
uVar3 = Far::PatchBuilder::GetRegularPatchBoundaryMask
(*(PatchBuilder **)(this + 0x110),param_2,iVar4,-1);
*(ushort *)param_1 = ((ushort)*(int4 *)param_1 & 0xff83) + (uVar3 & 0x1f) * 4;
if (((uVar3 & 0x1f) == 0) && ((*(byte *)(*(long *)(this + 0x108) + 0x11) & 1) != 0)) {
cVar1 = Far::PatchBuilder::IsRegularSingleCreasePatch
(*(PatchBuilder **)(this + 0x110),param_2,iVar4,
(SingleCreaseInfo *)&local_28);
if (cVar1 != '\0') {
fVar5 = (float)((*(uint *)(*(long *)(this + 0x108) + 0x10) & 0xf) - param_2);
if (local_28._4_4_ <= fVar5) {
fVar5 = local_28._4_4_;
}
if (0.0 < fVar5) {
*(ushort *)param_1 =
(*(ushort *)param_1 & 0x7e7f) + (short)(((uint)local_28 & 3) << 7) + -0x8000;
*(float *)(param_1 + 4) = fVar5;
}
}
}
}
}
return;
}
|
|
1,503 | mi_write_keypage | eloqsql/storage/myisam/mi_page.c | int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_off_t page, int level, uchar *buff)
{
reg3 uint length;
DBUG_ENTER("_mi_write_keypage");
#ifndef FAST /* Safety check */
if (page < info->s->base.keystart ||
page+keyinfo->block_length > info->state->key_file_length ||
(page & (MI_MIN_KEY_BLOCK_LENGTH-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: key_start: %lu length: %lu page: %lu",
(long) info->s->base.keystart,
(long) info->state->key_file_length,
(long) page));
my_errno=EINVAL;
DBUG_RETURN((-1));
}
DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff));
#endif
if ((length=keyinfo->block_length) > IO_SIZE*2 &&
info->state->key_file_length != page+length)
length= ((mi_getint(buff)+IO_SIZE-1) & (uint) ~(IO_SIZE-1));
DBUG_RETURN((key_cache_write(info->s->key_cache,
info->s->kfile, &info->s->dirty_part_map,
page, level, (uchar*) buff, length,
(uint) keyinfo->block_length,
(int) ((info->lock_type != F_UNLCK) ||
info->s->delay_key_write))));
} | O3 | c | mi_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r11
cmpq %rdx, 0x108(%r11)
jbe 0x844f8
callq 0xa2412
movl $0x16, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x8459e
movq %r8, %r9
movl %ecx, %r8d
movq %rdx, %rcx
testl $0x3ff, %ecx # imm = 0x3FF
jne 0x844e3
movzwl 0xe(%rsi), %r10d
leaq (%r10,%rcx), %rax
movq 0x8(%rdi), %rdx
movq 0x20(%rdx), %rdx
cmpq %rdx, %rax
ja 0x844e3
cmpl $0x2001, %r10d # imm = 0x2001
setb %sil
cmpq %rax, %rdx
sete %al
orb %sil, %al
movl %r10d, %ebx
jne 0x84556
movzbl 0x1(%r9), %eax
movzbl (%r9), %edx
andl $0x7f, %edx
shll $0x8, %edx
leal (%rax,%rdx), %ebx
addl $0xfff, %ebx # imm = 0xFFF
andl $0xf000, %ebx # imm = 0xF000
movq 0x278(%r11), %rax
movl 0x350(%r11), %esi
leaq 0x280(%r11), %rdx
movl $0x1, %r14d
cmpl $0x2, 0x1f4(%rdi)
jne 0x84589
xorl %r14d, %r14d
cmpb $0x0, 0x383(%r11)
setne %r14b
subq $0x8, %rsp
movq %rax, %rdi
pushq %r14
pushq %r10
pushq %rbx
callq 0x98e1a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _mi_write_keypage:
push rbp
mov rbp, rsp
push r14
push rbx
mov r11, [rdi]
cmp [r11+108h], rdx
jbe short loc_844F8
loc_844E3:
call _my_thread_var
mov dword ptr [rax], 16h
mov eax, 0FFFFFFFFh
jmp loc_8459E
loc_844F8:
mov r9, r8
mov r8d, ecx
mov rcx, rdx
test ecx, 3FFh
jnz short loc_844E3
movzx r10d, word ptr [rsi+0Eh]
lea rax, [r10+rcx]
mov rdx, [rdi+8]
mov rdx, [rdx+20h]
cmp rax, rdx
ja short loc_844E3
cmp r10d, 2001h
setb sil
cmp rdx, rax
setz al
or al, sil
mov ebx, r10d
jnz short loc_84556
movzx eax, byte ptr [r9+1]
movzx edx, byte ptr [r9]
and edx, 7Fh
shl edx, 8
lea ebx, [rax+rdx]
add ebx, 0FFFh
and ebx, 0F000h
loc_84556:
mov rax, [r11+278h]
mov esi, [r11+350h]
lea rdx, [r11+280h]
mov r14d, 1
cmp dword ptr [rdi+1F4h], 2
jnz short loc_84589
xor r14d, r14d
cmp byte ptr [r11+383h], 0
setnz r14b
loc_84589:
sub rsp, 8
mov rdi, rax
push r14
push r10
push rbx
call key_cache_write
add rsp, 20h
loc_8459E:
pop rbx
pop r14
pop rbp
retn
| long long mi_write_keypage(long long *a1, long long a2, unsigned long long a3, unsigned int a4, _BYTE *a5)
{
long long v5; // r11
long long v8; // r8
long long v10; // r10
long long v11; // rax
unsigned long long v12; // rdx
long long v13; // rbx
_BOOL8 v14; // r14
v5 = *a1;
if ( *(_QWORD *)(*a1 + 264) > a3
|| (v8 = a4, (a3 & 0x3FF) != 0)
|| (v10 = *(unsigned __int16 *)(a2 + 14), v11 = v10 + a3, v12 = *(_QWORD *)(a1[1] + 32), v10 + a3 > v12) )
{
*(_DWORD *)my_thread_var(a1) = 22;
return 0xFFFFFFFFLL;
}
else
{
v13 = *(unsigned __int16 *)(a2 + 14);
if ( (unsigned int)v10 >= 0x2001 && v12 != v11 )
v13 = (unsigned __int16)((unsigned __int8)a5[1] + ((*a5 & 0x7F) << 8) + 4095) & 0xF000;
v14 = 1LL;
if ( *((_DWORD *)a1 + 125) == 2 )
v14 = *(_BYTE *)(v5 + 899) != 0;
return key_cache_write(*(_QWORD *)(v5 + 632), *(unsigned int *)(v5 + 848), v5 + 640, a3, v8, a5, v13, v10, v14);
}
}
| _mi_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R11,qword ptr [RDI]
CMP qword ptr [R11 + 0x108],RDX
JBE 0x001844f8
LAB_001844e3:
CALL 0x001a2412
MOV dword ptr [RAX],0x16
MOV EAX,0xffffffff
JMP 0x0018459e
LAB_001844f8:
MOV R9,R8
MOV R8D,ECX
MOV RCX,RDX
TEST ECX,0x3ff
JNZ 0x001844e3
MOVZX R10D,word ptr [RSI + 0xe]
LEA RAX,[R10 + RCX*0x1]
MOV RDX,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDX + 0x20]
CMP RAX,RDX
JA 0x001844e3
CMP R10D,0x2001
SETC SIL
CMP RDX,RAX
SETZ AL
OR AL,SIL
MOV EBX,R10D
JNZ 0x00184556
MOVZX EAX,byte ptr [R9 + 0x1]
MOVZX EDX,byte ptr [R9]
AND EDX,0x7f
SHL EDX,0x8
LEA EBX,[RAX + RDX*0x1]
ADD EBX,0xfff
AND EBX,0xf000
LAB_00184556:
MOV RAX,qword ptr [R11 + 0x278]
MOV ESI,dword ptr [R11 + 0x350]
LEA RDX,[R11 + 0x280]
MOV R14D,0x1
CMP dword ptr [RDI + 0x1f4],0x2
JNZ 0x00184589
XOR R14D,R14D
CMP byte ptr [R11 + 0x383],0x0
SETNZ R14B
LAB_00184589:
SUB RSP,0x8
MOV RDI,RAX
PUSH R14
PUSH R10
PUSH RBX
CALL 0x00198e1a
ADD RSP,0x20
LAB_0018459e:
POP RBX
POP R14
POP RBP
RET
|
int8
_mi_write_keypage(long *param_1,long param_2,ulong param_3,int4 param_4,byte *param_5)
{
ulong uVar1;
long lVar2;
int4 *puVar3;
int8 uVar4;
ushort uVar5;
ulong uVar6;
bool bVar7;
lVar2 = *param_1;
if ((*(ulong *)(lVar2 + 0x108) <= param_3) && ((param_3 & 0x3ff) == 0)) {
uVar5 = *(ushort *)(param_2 + 0xe);
uVar6 = (ulong)uVar5;
uVar1 = uVar6 + param_3;
if (uVar1 <= *(ulong *)(param_1[1] + 0x20)) {
if (*(ulong *)(param_1[1] + 0x20) != uVar1 && 0x2000 < uVar5) {
uVar5 = (ushort)param_5[1] + (*param_5 & 0x7f) * 0x100 + 0xfff & 0xf000;
}
bVar7 = true;
if (*(int *)((long)param_1 + 500) == 2) {
bVar7 = *(char *)(lVar2 + 899) != '\0';
}
uVar4 = key_cache_write(*(int8 *)(lVar2 + 0x278),*(int4 *)(lVar2 + 0x350),
lVar2 + 0x280,param_3,param_4,param_5,uVar5,uVar6,bVar7);
return uVar4;
}
}
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x16;
return 0xffffffff;
}
|
|
1,504 | my_caseup_ucs2 | eloqsql/strings/ctype-ucs2.c | static size_t my_caseup_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_ucs2(uni_plane, &wc);
if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O0 | c | my_caseup_ucs2:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x5c3b2
jmp 0x5c3b4
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0x5c3e4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x5c2d0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x5c3ed
jmp 0x5c447
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x61200
movl -0x34(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x5c300
movl %eax, %ecx
movl -0x58(%rbp), %eax
cmpl %ecx, %eax
je 0x5c420
jmp 0x5c447
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x5c3b4
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_caseup_ucs2:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short $+2
loc_5C3B2:
jmp short $+2
loc_5C3B4:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_51], al
jnb short loc_5C3E4
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_ucs2_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_51], al
loc_5C3E4:
mov al, [rbp+var_51]
test al, 1
jnz short loc_5C3ED
jmp short loc_5C447
loc_5C3ED:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_toupper_ucs2
mov eax, [rbp+var_34]
mov [rbp+var_58], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_ucs2
mov ecx, eax
mov eax, [rbp+var_58]
cmp eax, ecx
jz short loc_5C420
jmp short loc_5C447
loc_5C420:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_5C3B4
loc_5C447:
mov rax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
| long long my_caseup_ucs2(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-51h]
long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned long long v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+2Ch] [rbp-34h]
unsigned long long v12[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v13; // [rsp+40h] [rbp-20h]
long long v14; // [rsp+48h] [rbp-18h]
unsigned long long v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12[1] = a5;
v10 = a3 + a2;
v9 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v15 < v10 )
{
v11 = my_ucs2_uni(v16, (long long)v12, v15, v10, a5, a6);
v7 = v11 > 0;
}
if ( !v7 )
break;
my_toupper_ucs2(v8, v12);
if ( v11 != (unsigned int)my_uni_ucs2(v16, v12[0], v13, v9) )
break;
v15 += v11;
v13 += v11;
}
return v14;
}
| my_caseup_ucs2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015c3b2
LAB_0015c3b2:
JMP 0x0015c3b4
LAB_0015c3b4:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x51],AL
JNC 0x0015c3e4
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0015c2d0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x51],AL
LAB_0015c3e4:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x0015c3ed
JMP 0x0015c447
LAB_0015c3ed:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x00161200
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x58],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x0015c300
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x58]
CMP EAX,ECX
JZ 0x0015c420
JMP 0x0015c447
LAB_0015c420:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015c3b4
LAB_0015c447:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_ucs2(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_ucs2(uVar1,&local_38);
iVar3 = my_uni_ucs2(local_10,local_38,local_28,param_4 + param_5);
if (local_3c != iVar3) {
return local_20;
}
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + local_3c;
}
return local_20;
}
|
|
1,505 | js_array_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSValue obj;
int i;
obj = js_create_from_ctor(ctx, new_target, JS_CLASS_ARRAY);
if (JS_IsException(obj))
return obj;
if (argc == 1 && JS_IsNumber(argv[0])) {
uint32_t len;
if (JS_ToArrayLengthFree(ctx, &len, js_dup(argv[0]), TRUE))
goto fail;
if (JS_SetProperty(ctx, obj, JS_ATOM_length, js_uint32(len)) < 0)
goto fail;
} else {
for(i = 0; i < argc; i++) {
if (JS_SetPropertyUint32(ctx, obj, i, js_dup(argv[i])) < 0)
goto fail;
}
}
return obj;
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | js_array_constructor:
subq $0xb8, %rsp
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movq %r8, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movl $0x2, %ecx
callq 0x54e00
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x56e61
movq 0x70(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x5700b
cmpl $0x1, 0x8c(%rsp)
jne 0x56f32
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x506d0
cmpl $0x0, %eax
je 0x56f32
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x54(%rsp), %rsi
movl $0x1, %r8d
callq 0x35210
cmpl $0x0, %eax
je 0x56ee0
jmp 0x56fdd
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x54(%rsp), %edi
callq 0x33b60
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %r9
movl $0x32, %ecx
callq 0x31f00
cmpl $0x0, %eax
jge 0x56f2d
jmp 0x56fdd
jmp 0x56fc1
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jge 0x56fbf
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x80(%rsp), %rax
movslq 0x6c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq (%rsp), %rdi
movl 0xc(%rsp), %ecx
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
callq 0x33350
cmpl $0x0, %eax
jge 0x56fad
jmp 0x56fdd
jmp 0x56faf
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x56f3a
jmp 0x56fc1
movq 0x70(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x5700b
movq 0x90(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_array_constructor:
sub rsp, 0B8h
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_28], rdi
mov [rsp+0B8h+var_2C], ecx
mov [rsp+0B8h+var_38], r8
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_20]
mov rdx, [rsp+0B8h+var_18]
mov ecx, 2
call js_create_from_ctor
mov [rsp+0B8h+var_60], rax
mov [rsp+0B8h+var_58], rdx
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_58]
mov [rsp+0B8h+var_40], rax
mov rdi, [rsp+0B8h+var_48]
mov rsi, [rsp+0B8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_56E61
mov rax, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_8], rax
jmp loc_5700B
loc_56E61:
cmp [rsp+0B8h+var_2C], 1
jnz loc_56F32
mov rax, [rsp+0B8h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsNumber
cmp eax, 0
jz loc_56F32
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_A0], rax
mov rax, [rsp+0B8h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rdi, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_78], rax
mov [rsp+0B8h+var_70], rdx
mov rdx, [rsp+0B8h+var_78]
mov rcx, [rsp+0B8h+var_70]
lea rsi, [rsp+0B8h+var_64]
mov r8d, 1
call JS_ToArrayLengthFree
cmp eax, 0
jz short loc_56EE0
jmp loc_56FDD
loc_56EE0:
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_A8], rax
mov edi, [rsp+0B8h+var_64]
call js_uint32
mov rdi, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_88], rax
mov [rsp+0B8h+var_80], rdx
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_40]
mov r8, [rsp+0B8h+var_88]
mov r9, [rsp+0B8h+var_80]
mov ecx, 32h ; '2'
call JS_SetProperty
cmp eax, 0
jge short loc_56F2D
jmp loc_56FDD
loc_56F2D:
jmp loc_56FC1
loc_56F32:
mov [rsp+0B8h+var_4C], 0
loc_56F3A:
mov eax, [rsp+0B8h+var_4C]
cmp eax, [rsp+0B8h+var_2C]
jge short loc_56FBF
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_B8], rax
mov eax, [rsp+0B8h+var_4C]
mov [rsp+0B8h+var_AC], eax
mov rax, [rsp+0B8h+var_38]
movsxd rcx, [rsp+0B8h+var_4C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rdi, [rsp+0B8h+var_B8]
mov ecx, [rsp+0B8h+var_AC]
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_90], rdx
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_40]
mov r8, [rsp+0B8h+var_98]
mov r9, [rsp+0B8h+var_90]
call JS_SetPropertyUint32
cmp eax, 0
jge short loc_56FAD
jmp short loc_56FDD
loc_56FAD:
jmp short $+2
loc_56FAF:
mov eax, [rsp+0B8h+var_4C]
add eax, 1
mov [rsp+0B8h+var_4C], eax
jmp loc_56F3A
loc_56FBF:
jmp short $+2
loc_56FC1:
mov rax, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_8], rax
jmp short loc_5700B
loc_56FDD:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_40]
call JS_FreeValue
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
loc_5700B:
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long js_array_constructor(
long long a1,
long long a2,
long long a3,
signed int a4,
long long *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
int v18; // edx
long long v19; // rdx
int v21; // [rsp+10h] [rbp-A8h]
_DWORD *v22; // [rsp+20h] [rbp-98h]
int v23; // [rsp+30h] [rbp-88h]
_DWORD *v24; // [rsp+40h] [rbp-78h]
unsigned int v25; // [rsp+54h] [rbp-64h] BYREF
long long v26; // [rsp+58h] [rbp-60h]
long long v27; // [rsp+60h] [rbp-58h]
signed int i; // [rsp+6Ch] [rbp-4Ch]
long long v29; // [rsp+70h] [rbp-48h]
long long v30; // [rsp+78h] [rbp-40h]
long long *v31; // [rsp+80h] [rbp-38h]
signed int v32; // [rsp+8Ch] [rbp-2Ch]
long long v33; // [rsp+90h] [rbp-28h]
long long v34; // [rsp+98h] [rbp-20h]
long long v35; // [rsp+A0h] [rbp-18h]
long long v36; // [rsp+A8h] [rbp-10h]
long long v37; // [rsp+B0h] [rbp-8h]
v34 = a2;
v35 = a3;
v33 = a1;
v32 = a4;
v31 = a5;
v26 = js_create_from_ctor(a1, a2, a3, 2);
v27 = v13;
v29 = v26;
v30 = v13;
if ( JS_IsException_1(v26, v13) )
{
v36 = v29;
v37 = v30;
}
else
{
if ( v32 == 1 && JS_IsNumber(*v31, v31[1]) )
{
v24 = js_dup((_DWORD *)*v31, v31[1]);
if ( (unsigned int)JS_ToArrayLengthFree(
v33,
&v25,
(long long)v24,
v14,
1LL,
v15,
a6,
a7,
a8,
a9,
v16,
v17,
a12,
a13)
|| (v21 = v33, v23 = js_uint32(v25), (int)JS_SetProperty(v21, v29, v30, 50, v23, v18) < 0) )
{
LABEL_13:
JS_FreeValue(v33, v29, v30);
LODWORD(v36) = 0;
v37 = 6LL;
return v36;
}
}
else
{
for ( i = 0; i < v32; ++i )
{
v22 = js_dup((_DWORD *)v31[2 * i], v31[2 * i + 1]);
if ( (int)JS_SetPropertyUint32(v33, v29, v30, i, (long long)v22, v19) < 0 )
goto LABEL_13;
}
}
v36 = v29;
v37 = v30;
}
return v36;
}
| js_array_constructor:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x90],RDI
MOV dword ptr [RSP + 0x8c],ECX
MOV qword ptr [RSP + 0x80],R8
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
MOV ECX,0x2
CALL 0x00154e00
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00156e61
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x0015700b
LAB_00156e61:
CMP dword ptr [RSP + 0x8c],0x1
JNZ 0x00156f32
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001506d0
CMP EAX,0x0
JZ 0x00156f32
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x54]
MOV R8D,0x1
CALL 0x00135210
CMP EAX,0x0
JZ 0x00156ee0
JMP 0x00156fdd
LAB_00156ee0:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,dword ptr [RSP + 0x54]
CALL 0x00133b60
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV R8,qword ptr [RSP + 0x30]
MOV R9,qword ptr [RSP + 0x38]
MOV ECX,0x32
CALL 0x00131f00
CMP EAX,0x0
JGE 0x00156f2d
JMP 0x00156fdd
LAB_00156f2d:
JMP 0x00156fc1
LAB_00156f32:
MOV dword ptr [RSP + 0x6c],0x0
LAB_00156f3a:
MOV EAX,dword ptr [RSP + 0x6c]
CMP EAX,dword ptr [RSP + 0x8c]
JGE 0x00156fbf
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP],RAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x6c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RDI,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0xc]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
CALL 0x00133350
CMP EAX,0x0
JGE 0x00156fad
JMP 0x00156fdd
LAB_00156fad:
JMP 0x00156faf
LAB_00156faf:
MOV EAX,dword ptr [RSP + 0x6c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x6c],EAX
JMP 0x00156f3a
LAB_00156fbf:
JMP 0x00156fc1
LAB_00156fc1:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x0015700b
LAB_00156fdd:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00123c90
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
LAB_0015700b:
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16]
js_array_constructor
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int8 uVar1;
int iVar2;
int1 auVar3 [16];
int4 local_64;
int1 local_60 [16];
int local_4c;
int1 local_48 [16];
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_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_60 = js_create_from_ctor(param_1,param_2,param_3,2);
local_48 = local_60;
iVar2 = JS_IsException(local_60._0_8_,local_60._8_8_);
if (iVar2 != 0) {
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
goto LAB_0015700b;
}
if (local_2c == 1) {
iVar2 = JS_IsNumber(*local_38,local_38[1]);
uVar1 = local_28;
if (iVar2 == 0) goto LAB_00156f32;
auVar3 = js_dup(*local_38,local_38[1]);
iVar2 = JS_ToArrayLengthFree(uVar1,&local_64,auVar3._0_8_,auVar3._8_8_,1);
uVar1 = local_28;
if (iVar2 != 0) {
LAB_00156fdd:
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = 0;
local_8 = 6;
goto LAB_0015700b;
}
auVar3 = js_uint32(local_64);
iVar2 = JS_SetProperty(uVar1,local_48._0_8_,local_48._8_8_,0x32,auVar3._0_8_,auVar3._8_8_);
if (iVar2 < 0) goto LAB_00156fdd;
}
else {
LAB_00156f32:
for (local_4c = 0; uVar1 = local_28, iVar2 = local_4c, local_4c < local_2c;
local_4c = local_4c + 1) {
auVar3 = js_dup(local_38[(long)local_4c * 2],(local_38 + (long)local_4c * 2)[1]);
iVar2 = JS_SetPropertyUint32
(uVar1,local_48._0_8_,local_48._8_8_,iVar2,auVar3._0_8_,auVar3._8_8_);
if (iVar2 < 0) goto LAB_00156fdd;
}
}
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
LAB_0015700b:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
1,506 | llama_relative_position_bucket(int, int, unsigned long, bool) | monkey531[P]llama/src/llama-context.cpp | static int32_t llama_relative_position_bucket(llama_pos x, llama_pos y, uint64_t n_buckets, bool bidirectional) {
// TODO move to hparams if a T5 variant appears that uses a different value
const int64_t max_distance = 128;
if (bidirectional) {
n_buckets >>= 1;
}
const int64_t max_exact = n_buckets >> 1;
int32_t relative_position = x - y;
int32_t relative_bucket = 0;
if (bidirectional) {
relative_bucket += (relative_position > 0) * n_buckets;
relative_position = abs(relative_position);
} else {
relative_position = -std::min<int32_t>(relative_position, 0);
}
int32_t relative_position_if_large = floorf(max_exact + logf(1.0 * relative_position / max_exact) * (n_buckets - max_exact) / log(1.0 * max_distance / max_exact));
relative_position_if_large = std::min<int32_t>(relative_position_if_large, n_buckets - 1);
relative_bucket += (relative_position < max_exact ? relative_position : relative_position_if_large);
return relative_bucket;
} | O0 | cpp | llama_relative_position_bucket(int, int, unsigned long, bool):
subq $0x68, %rsp
movb %cl, %al
movl %edi, 0x64(%rsp)
movl %esi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
andb $0x1, %al
movb %al, 0x57(%rsp)
movq $0x80, 0x48(%rsp)
testb $0x1, 0x57(%rsp)
je 0x29b7f6
movq 0x58(%rsp), %rax
shrq %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
shrq %rax
movq %rax, 0x40(%rsp)
movl 0x64(%rsp), %eax
subl 0x60(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl $0x0, 0x38(%rsp)
testb $0x1, 0x57(%rsp)
je 0x29b850
cmpl $0x0, 0x3c(%rsp)
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
imulq 0x58(%rsp), %rcx
movslq 0x38(%rsp), %rax
addq %rcx, %rax
movl %eax, 0x38(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0x3c(%rsp)
jmp 0x29b872
movl $0x0, 0x34(%rsp)
leaq 0x3c(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x2034a0
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, 0x3c(%rsp)
cvtsi2sdq 0x40(%rsp), %xmm1
movsd %xmm1, 0x18(%rsp)
cvtsi2sdl 0x3c(%rsp), %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21bf30
movss %xmm0, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x24(%rsp)
testq %rax, %rax
movss %xmm0, 0x28(%rsp)
js 0x29b8de
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0x20(%rsp), %xmm0
movss 0x28(%rsp), %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
cvtsi2sdq 0x40(%rsp), %xmm1
movsd 0x134a29(%rip), %xmm0 # 0x3d0330
divsd %xmm1, %xmm0
callq 0x200530
movsd 0x10(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x18(%rsp), %xmm0
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x1f52a0
cvttss2si %xmm0, %eax
movl %eax, 0x30(%rsp)
movq 0x58(%rsp), %rax
subq $0x1, %rax
movl %eax, 0x2c(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x2034a0
movl (%rax), %eax
movl %eax, 0x30(%rsp)
movslq 0x3c(%rsp), %rax
cmpq 0x40(%rsp), %rax
jge 0x29b970
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x29b978
movl 0x30(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl 0x38(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)
| _ZL30llama_relative_position_bucketiimb:
sub rsp, 68h
mov al, cl
mov [rsp+68h+var_4], edi
mov [rsp+68h+var_8], esi
mov [rsp+68h+var_10], rdx
and al, 1
mov [rsp+68h+var_11], al
mov [rsp+68h+var_20], 80h
test [rsp+68h+var_11], 1
jz short loc_29B7F6
mov rax, [rsp+68h+var_10]
shr rax, 1
mov [rsp+68h+var_10], rax
loc_29B7F6:
mov rax, [rsp+68h+var_10]
shr rax, 1
mov [rsp+68h+var_28], rax
mov eax, [rsp+68h+var_4]
sub eax, [rsp+68h+var_8]
mov [rsp+68h+var_2C], eax
mov [rsp+68h+var_30], 0
test [rsp+68h+var_11], 1
jz short loc_29B850
cmp [rsp+68h+var_2C], 0
setnle al
and al, 1
movzx eax, al
mov ecx, eax
imul rcx, [rsp+68h+var_10]
movsxd rax, [rsp+68h+var_30]
add rax, rcx
mov [rsp+68h+var_30], eax
mov eax, [rsp+68h+var_2C]
mov ecx, eax
neg ecx
cmovns eax, ecx
mov [rsp+68h+var_2C], eax
jmp short loc_29B872
loc_29B850:
mov [rsp+68h+var_34], 0
lea rdi, [rsp+68h+var_2C]
lea rsi, [rsp+68h+var_34]
call __ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov rcx, rax
xor eax, eax
sub eax, [rcx]
mov [rsp+68h+var_2C], eax
loc_29B872:
cvtsi2sd xmm1, [rsp+68h+var_28]
movsd [rsp+68h+var_50], xmm1
cvtsi2sd xmm0, [rsp+68h+var_2C]
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
call _logf
movss [rsp+68h+var_48], xmm0
mov rax, [rsp+68h+var_10]
mov rcx, [rsp+68h+var_28]
sub rax, rcx
mov rdx, rax
shr rdx, 1
mov ecx, eax
and ecx, 1
or rcx, rdx
cvtsi2ss xmm0, rcx
addss xmm0, xmm0
cvtsi2ss xmm1, rax
movss [rsp+68h+var_44], xmm1
test rax, rax
movss [rsp+68h+var_40], xmm0
js short loc_29B8DE
movss xmm0, [rsp+68h+var_44]
movss [rsp+68h+var_40], xmm0
loc_29B8DE:
movss xmm0, [rsp+68h+var_48]
movss xmm1, [rsp+68h+var_40]
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
movsd [rsp+68h+var_58], xmm0
cvtsi2sd xmm1, [rsp+68h+var_28]
movsd xmm0, cs:qword_3D0330
divsd xmm0, xmm1
call _log
movsd xmm1, [rsp+68h+var_58]
movaps xmm2, xmm0
movsd xmm0, [rsp+68h+var_50]
divsd xmm1, xmm2
addsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
call _floorf
cvttss2si eax, xmm0
mov [rsp+68h+var_38], eax
mov rax, [rsp+68h+var_10]
sub rax, 1
mov [rsp+68h+var_3C], eax
lea rdi, [rsp+68h+var_38]
lea rsi, [rsp+68h+var_3C]
call __ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov eax, [rax]
mov [rsp+68h+var_38], eax
movsxd rax, [rsp+68h+var_2C]
cmp rax, [rsp+68h+var_28]
jge short loc_29B970
mov eax, [rsp+68h+var_2C]
mov [rsp+68h+var_5C], eax
jmp short loc_29B978
loc_29B970:
mov eax, [rsp+68h+var_38]
mov [rsp+68h+var_5C], eax
loc_29B978:
mov eax, [rsp+68h+var_5C]
add eax, [rsp+68h+var_30]
mov [rsp+68h+var_30], eax
mov eax, [rsp+68h+var_30]
add rsp, 68h
retn
| long long llama_relative_position_bucket(int a1, int a2, unsigned long long a3, char a4)
{
int v4; // eax
float v5; // xmm0_4
double v6; // xmm0_8
unsigned long long v7; // rcx
float v8; // xmm0_4
int v10; // [rsp+Ch] [rbp-5Ch]
double v11; // [rsp+18h] [rbp-50h]
float v12; // [rsp+28h] [rbp-40h]
int v13; // [rsp+2Ch] [rbp-3Ch] BYREF
int v14; // [rsp+30h] [rbp-38h] BYREF
int v15; // [rsp+34h] [rbp-34h] BYREF
int v16; // [rsp+38h] [rbp-30h]
int v17; // [rsp+3Ch] [rbp-2Ch] BYREF
signed long long v18; // [rsp+40h] [rbp-28h]
long long v19; // [rsp+48h] [rbp-20h]
char v20; // [rsp+57h] [rbp-11h]
unsigned long long v21; // [rsp+58h] [rbp-10h]
int v22; // [rsp+60h] [rbp-8h]
int v23; // [rsp+64h] [rbp-4h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4 & 1;
v19 = 128LL;
if ( (a4 & 1) != 0 )
v21 >>= 1;
v18 = v21 >> 1;
v17 = v23 - v22;
v16 = 0;
if ( (v20 & 1) != 0 )
{
v16 += v21 * (v17 > 0);
v4 = v17;
if ( v17 <= 0 )
v4 = -v17;
v17 = v4;
}
else
{
v15 = 0;
v17 = -*(_DWORD *)std::min<int>(&v17, &v15);
}
v11 = (double)(int)v18;
v5 = (double)v17 / (double)(int)v18;
v6 = logf(v5);
v7 = ((v21 - v18) >> 1) | ((_BYTE)v21 - (_BYTE)v18) & 1;
v12 = (float)(int)v7 + (float)(int)v7;
if ( (long long)(v21 - v18) >= 0 )
v12 = (float)((int)v21 - v18);
v8 = v11 + (float)(*(float *)&v6 * v12) / log(128.0 / (double)(int)v18);
v14 = (int)floorf(v8);
v13 = v21 - 1;
v14 = *(_DWORD *)std::min<int>(&v14, &v13);
if ( v17 >= v18 )
v10 = v14;
else
v10 = v17;
return (unsigned int)(v16 + v10);
}
| |||
1,507 | llama_relative_position_bucket(int, int, unsigned long, bool) | monkey531[P]llama/src/llama-context.cpp | static int32_t llama_relative_position_bucket(llama_pos x, llama_pos y, uint64_t n_buckets, bool bidirectional) {
// TODO move to hparams if a T5 variant appears that uses a different value
const int64_t max_distance = 128;
if (bidirectional) {
n_buckets >>= 1;
}
const int64_t max_exact = n_buckets >> 1;
int32_t relative_position = x - y;
int32_t relative_bucket = 0;
if (bidirectional) {
relative_bucket += (relative_position > 0) * n_buckets;
relative_position = abs(relative_position);
} else {
relative_position = -std::min<int32_t>(relative_position, 0);
}
int32_t relative_position_if_large = floorf(max_exact + logf(1.0 * relative_position / max_exact) * (n_buckets - max_exact) / log(1.0 * max_distance / max_exact));
relative_position_if_large = std::min<int32_t>(relative_position_if_large, n_buckets - 1);
relative_bucket += (relative_position < max_exact ? relative_position : relative_position_if_large);
return relative_bucket;
} | O2 | cpp | llama_relative_position_bucket(int, int, unsigned long, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
subl %esi, %edi
testl %ecx, %ecx
je 0xd73f9
shrq %rbx
xorl %eax, %eax
testl %edi, %edi
movl %ebx, %r14d
cmovlel %eax, %r14d
movl %edi, %ebp
negl %ebp
cmovsl %edi, %ebp
jmp 0xd7405
movl %edi, %ebp
sarl $0x1f, %ebp
andl %edi, %ebp
negl %ebp
xorl %r14d, %r14d
movq %rbx, %r15
shrq %r15
cvtsi2sd %r15, %xmm1
cvtsi2sd %ebp, %xmm0
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0xa8010
movq %rbx, %rax
subq %r15, %rax
js 0xd7436
cvtsi2ss %rax, %xmm1
jmp 0xd744b
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x6af07(%rip), %xmm0 # 0x142368
divsd 0x8(%rsp), %xmm0
callq 0xa0550
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
cvtsd2ss %xmm1, %xmm0
callq 0x9d3b0
cvttss2si %xmm0, %eax
decl %ebx
cmpl %eax, %ebx
cmovgel %eax, %ebx
movl %ebp, %eax
cmpq %rax, %r15
cmoval %ebp, %ebx
addl %r14d, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZL30llama_relative_position_bucketiimb:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdx
sub edi, esi
test ecx, ecx
jz short loc_D73F9
shr rbx, 1
xor eax, eax
test edi, edi
mov r14d, ebx
cmovle r14d, eax
mov ebp, edi
neg ebp
cmovs ebp, edi
jmp short loc_D7405
loc_D73F9:
mov ebp, edi
sar ebp, 1Fh
and ebp, edi
neg ebp
xor r14d, r14d
loc_D7405:
mov r15, rbx
shr r15, 1
cvtsi2sd xmm1, r15
cvtsi2sd xmm0, ebp
movsd [rsp+38h+var_30], xmm1
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
call _logf
mov rax, rbx
sub rax, r15
js short loc_D7436
cvtsi2ss xmm1, rax
jmp short loc_D744B
loc_D7436:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm1, rax
addss xmm1, xmm1
loc_D744B:
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
movsd [rsp+38h+var_28], xmm0
movsd xmm0, cs:qword_142368
divsd xmm0, [rsp+38h+var_30]
call _log
movsd xmm1, [rsp+38h+var_28]
divsd xmm1, xmm0
addsd xmm1, [rsp+38h+var_30]
cvtsd2ss xmm0, xmm1
call _floorf
cvttss2si eax, xmm0
dec ebx
cmp ebx, eax
cmovge ebx, eax
mov eax, ebp
cmp r15, rax
cmova ebx, ebp
add ebx, r14d
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long llama_relative_position_bucket(int a1, int a2, unsigned long long a3, int a4)
{
unsigned long long v4; // rbx
int v5; // edi
int v6; // r14d
int v7; // ebp
unsigned long long v8; // r15
float v9; // xmm0_4
float v10; // xmm0_4
long long v11; // rax
float v12; // xmm1_4
float v13; // xmm0_4
int v14; // eax
int v15; // ebx
double v17; // [rsp+8h] [rbp-30h]
v4 = a3;
v5 = a1 - a2;
if ( a4 )
{
v4 = a3 >> 1;
v6 = a3 >> 1;
if ( v5 <= 0 )
v6 = 0;
v7 = -v5;
if ( v5 > 0 )
v7 = v5;
}
else
{
v7 = -(v5 & (v5 >> 31));
v6 = 0;
}
v8 = v4 >> 1;
v17 = (double)(int)(v4 >> 1);
v9 = (double)v7 / v17;
v10 = logf(v9);
v11 = v4 - (v4 >> 1);
if ( v11 < 0 )
v12 = (float)(int)(((unsigned long long)v11 >> 1) | v11 & 1) + (float)(int)(((unsigned long long)v11 >> 1) | v11 & 1);
else
v12 = (float)(int)v11;
v13 = (float)(v10 * v12) / log(128.0 / v17) + v17;
v14 = (int)floorf(v13);
v15 = v4 - 1;
if ( v15 >= v14 )
v15 = v14;
if ( v8 > (unsigned int)v7 )
v15 = v7;
return (unsigned int)(v6 + v15);
}
| llama_relative_position_bucket:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
SUB EDI,ESI
TEST ECX,ECX
JZ 0x001d73f9
SHR RBX,0x1
XOR EAX,EAX
TEST EDI,EDI
MOV R14D,EBX
CMOVLE R14D,EAX
MOV EBP,EDI
NEG EBP
CMOVS EBP,EDI
JMP 0x001d7405
LAB_001d73f9:
MOV EBP,EDI
SAR EBP,0x1f
AND EBP,EDI
NEG EBP
XOR R14D,R14D
LAB_001d7405:
MOV R15,RBX
SHR R15,0x1
CVTSI2SD XMM1,R15
CVTSI2SD XMM0,EBP
MOVSD qword ptr [RSP + 0x8],XMM1
DIVSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
CALL 0x001a8010
MOV RAX,RBX
SUB RAX,R15
JS 0x001d7436
CVTSI2SS XMM1,RAX
JMP 0x001d744b
LAB_001d7436:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
CVTSI2SS XMM1,RAX
ADDSS XMM1,XMM1
LAB_001d744b:
MULSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00242368]
DIVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x001a0550
MOVSD XMM1,qword ptr [RSP + 0x10]
DIVSD XMM1,XMM0
ADDSD XMM1,qword ptr [RSP + 0x8]
CVTSD2SS XMM0,XMM1
CALL 0x0019d3b0
CVTTSS2SI EAX,XMM0
DEC EBX
CMP EBX,EAX
CMOVGE EBX,EAX
MOV EAX,EBP
CMP R15,RAX
CMOVA EBX,EBP
ADD EBX,R14D
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* llama_relative_position_bucket(int, int, unsigned long, bool) */
int llama_relative_position_bucket(int param_1,int param_2,ulong param_3,bool param_4)
{
int7 in_register_00000009;
uint uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
float fVar5;
double dVar6;
double dVar7;
uVar2 = param_1 - param_2;
if ((int)CONCAT71(in_register_00000009,param_4) == 0) {
iVar3 = 0;
uVar1 = -((int)uVar2 >> 0x1f & uVar2);
}
else {
param_3 = param_3 >> 1;
iVar3 = (int)param_3;
if ((int)uVar2 < 1) {
iVar3 = 0;
}
uVar1 = -uVar2;
if (0 < (int)uVar2) {
uVar1 = uVar2;
}
}
uVar4 = param_3 >> 1;
dVar7 = (double)uVar4;
fVar5 = logf((float)((double)(int)uVar1 / dVar7));
dVar6 = log(DAT_00242368 / dVar7);
fVar5 = floorf((float)((double)(fVar5 * (float)(param_3 - uVar4)) / dVar6 + dVar7));
uVar2 = (int)param_3 - 1;
if ((int)fVar5 <= (int)uVar2) {
uVar2 = (int)fVar5;
}
if (uVar1 < uVar4) {
uVar2 = uVar1;
}
return uVar2 + iVar3;
}
|
|
1,508 | llama_relative_position_bucket(int, int, unsigned long, bool) | monkey531[P]llama/src/llama-context.cpp | static int32_t llama_relative_position_bucket(llama_pos x, llama_pos y, uint64_t n_buckets, bool bidirectional) {
// TODO move to hparams if a T5 variant appears that uses a different value
const int64_t max_distance = 128;
if (bidirectional) {
n_buckets >>= 1;
}
const int64_t max_exact = n_buckets >> 1;
int32_t relative_position = x - y;
int32_t relative_bucket = 0;
if (bidirectional) {
relative_bucket += (relative_position > 0) * n_buckets;
relative_position = abs(relative_position);
} else {
relative_position = -std::min<int32_t>(relative_position, 0);
}
int32_t relative_position_if_large = floorf(max_exact + logf(1.0 * relative_position / max_exact) * (n_buckets - max_exact) / log(1.0 * max_distance / max_exact));
relative_position_if_large = std::min<int32_t>(relative_position_if_large, n_buckets - 1);
relative_bucket += (relative_position < max_exact ? relative_position : relative_position_if_large);
return relative_bucket;
} | O3 | cpp | llama_relative_position_bucket(int, int, unsigned long, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
subl %esi, %edi
testl %ecx, %ecx
je 0x9e1d8
shrq %rbx
xorl %eax, %eax
testl %edi, %edi
movl %ebx, %r14d
cmovlel %eax, %r14d
movl %edi, %ebp
negl %ebp
cmovsl %edi, %ebp
jmp 0x9e1e4
movl %edi, %ebp
sarl $0x1f, %ebp
andl %edi, %ebp
negl %ebp
xorl %r14d, %r14d
movq %rbx, %r15
shrq %r15
cvtsi2sd %r15, %xmm1
cvtsi2sd %ebp, %xmm0
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x6bc80
movq %rbx, %rax
subq %r15, %rax
js 0x9e218
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0x9e230
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x7613a(%rip), %xmm0 # 0x114380
divsd 0x8(%rsp), %xmm0
callq 0x67260
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
callq 0x65500
cvttss2si %xmm0, %eax
decl %ebx
cmpl %eax, %ebx
cmovgel %eax, %ebx
movl %ebp, %eax
cmpq %rax, %r15
cmoval %ebp, %ebx
addl %r14d, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZL30llama_relative_position_bucketiimb:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdx
sub edi, esi
test ecx, ecx
jz short loc_9E1D8
shr rbx, 1
xor eax, eax
test edi, edi
mov r14d, ebx
cmovle r14d, eax
mov ebp, edi
neg ebp
cmovs ebp, edi
jmp short loc_9E1E4
loc_9E1D8:
mov ebp, edi
sar ebp, 1Fh
and ebp, edi
neg ebp
xor r14d, r14d
loc_9E1E4:
mov r15, rbx
shr r15, 1
cvtsi2sd xmm1, r15
cvtsi2sd xmm0, ebp
movsd [rsp+38h+var_30], xmm1
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
call _logf
mov rax, rbx
sub rax, r15
js short loc_9E218
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
jmp short loc_9E230
loc_9E218:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
addss xmm1, xmm1
loc_9E230:
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
movsd [rsp+38h+var_28], xmm0
movsd xmm0, cs:qword_114380
divsd xmm0, [rsp+38h+var_30]
call _log
movsd xmm1, [rsp+38h+var_28]
divsd xmm1, xmm0
addsd xmm1, [rsp+38h+var_30]
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
call _floorf
cvttss2si eax, xmm0
dec ebx
cmp ebx, eax
cmovge ebx, eax
mov eax, ebp
cmp r15, rax
cmova ebx, ebp
add ebx, r14d
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long llama_relative_position_bucket(int a1, int a2, unsigned long long a3, int a4)
{
unsigned long long v4; // rbx
int v5; // edi
int v6; // r14d
int v7; // ebp
unsigned long long v8; // r15
float v9; // xmm0_4
float v10; // xmm0_4
long long v11; // rax
float v12; // xmm1_4
float v13; // xmm0_4
int v14; // eax
int v15; // ebx
double v17; // [rsp+8h] [rbp-30h]
v4 = a3;
v5 = a1 - a2;
if ( a4 )
{
v4 = a3 >> 1;
v6 = a3 >> 1;
if ( v5 <= 0 )
v6 = 0;
v7 = -v5;
if ( v5 > 0 )
v7 = v5;
}
else
{
v7 = -(v5 & (v5 >> 31));
v6 = 0;
}
v8 = v4 >> 1;
v17 = (double)(int)(v4 >> 1);
v9 = (double)v7 / v17;
v10 = logf(v9);
v11 = v4 - (v4 >> 1);
if ( v11 < 0 )
v12 = (float)(int)(((unsigned long long)v11 >> 1) | v11 & 1) + (float)(int)(((unsigned long long)v11 >> 1) | v11 & 1);
else
v12 = (float)(int)v11;
v13 = (float)(v10 * v12) / log(128.0 / v17) + v17;
v14 = (int)floorf(v13);
v15 = v4 - 1;
if ( v15 >= v14 )
v15 = v14;
if ( v8 > (unsigned int)v7 )
v15 = v7;
return (unsigned int)(v6 + v15);
}
| llama_relative_position_bucket:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
SUB EDI,ESI
TEST ECX,ECX
JZ 0x0019e1d8
SHR RBX,0x1
XOR EAX,EAX
TEST EDI,EDI
MOV R14D,EBX
CMOVLE R14D,EAX
MOV EBP,EDI
NEG EBP
CMOVS EBP,EDI
JMP 0x0019e1e4
LAB_0019e1d8:
MOV EBP,EDI
SAR EBP,0x1f
AND EBP,EDI
NEG EBP
XOR R14D,R14D
LAB_0019e1e4:
MOV R15,RBX
SHR R15,0x1
CVTSI2SD XMM1,R15
CVTSI2SD XMM0,EBP
MOVSD qword ptr [RSP + 0x8],XMM1
DIVSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
CALL 0x0016bc80
MOV RAX,RBX
SUB RAX,R15
JS 0x0019e218
XORPS XMM1,XMM1
CVTSI2SS XMM1,RAX
JMP 0x0019e230
LAB_0019e218:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
XORPS XMM1,XMM1
CVTSI2SS XMM1,RAX
ADDSS XMM1,XMM1
LAB_0019e230:
MULSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00214380]
DIVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x00167260
MOVSD XMM1,qword ptr [RSP + 0x10]
DIVSD XMM1,XMM0
ADDSD XMM1,qword ptr [RSP + 0x8]
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
CALL 0x00165500
CVTTSS2SI EAX,XMM0
DEC EBX
CMP EBX,EAX
CMOVGE EBX,EAX
MOV EAX,EBP
CMP R15,RAX
CMOVA EBX,EBP
ADD EBX,R14D
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* llama_relative_position_bucket(int, int, unsigned long, bool) */
int llama_relative_position_bucket(int param_1,int param_2,ulong param_3,bool param_4)
{
int7 in_register_00000009;
uint uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
float fVar5;
double dVar6;
double dVar7;
uVar2 = param_1 - param_2;
if ((int)CONCAT71(in_register_00000009,param_4) == 0) {
iVar3 = 0;
uVar1 = -((int)uVar2 >> 0x1f & uVar2);
}
else {
param_3 = param_3 >> 1;
iVar3 = (int)param_3;
if ((int)uVar2 < 1) {
iVar3 = 0;
}
uVar1 = -uVar2;
if (0 < (int)uVar2) {
uVar1 = uVar2;
}
}
uVar4 = param_3 >> 1;
dVar7 = (double)uVar4;
fVar5 = logf((float)((double)(int)uVar1 / dVar7));
dVar6 = log(DAT_00214380 / dVar7);
fVar5 = floorf((float)((double)(fVar5 * (float)(param_3 - uVar4)) / dVar6 + dVar7));
uVar2 = (int)param_3 - 1;
if ((int)fVar5 <= (int)uVar2) {
uVar2 = (int)fVar5;
}
if (uVar1 < uVar4) {
uVar2 = uVar1;
}
return uVar2 + iVar3;
}
|
|
1,509 | JS_ToObject | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToObject(JSContext *ctx, JSValue val)
{
int tag = JS_VALUE_GET_NORM_TAG(val);
JSValue obj;
switch(tag) {
default:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
return JS_ThrowTypeError(ctx, "Cannot convert undefined or null to object");
case JS_TAG_OBJECT:
case JS_TAG_EXCEPTION:
return js_dup(val);
case JS_TAG_BIG_INT:
obj = JS_NewObjectClass(ctx, JS_CLASS_BIG_INT);
goto set_value;
case JS_TAG_INT:
case JS_TAG_FLOAT64:
obj = JS_NewObjectClass(ctx, JS_CLASS_NUMBER);
goto set_value;
case JS_TAG_STRING:
/* XXX: should call the string constructor */
{
JSString *p1 = JS_VALUE_GET_STRING(val);
obj = JS_NewObjectClass(ctx, JS_CLASS_STRING);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_length, js_int32(p1->len), 0);
}
goto set_value;
case JS_TAG_BOOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_BOOLEAN);
goto set_value;
case JS_TAG_SYMBOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_SYMBOL);
set_value:
if (!JS_IsException(obj))
JS_SetObjectData(ctx, obj, js_dup(val));
return obj;
}
} | O0 | c | JS_ToObject:
subq $0xd8, %rsp
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
addl $0x9, %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x10, %eax
ja 0x377c8
movq 0x18(%rsp), %rax
leaq 0xd3065(%rip), %rcx # 0x10a824
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x377ca
movq 0xb0(%rsp), %rdi
leaq 0xd7314(%rip), %rsi # 0x10eaed
movb $0x0, %al
callq 0x2d300
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x37a43
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x216d0
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x37a43
movq 0xb0(%rsp), %rdi
movl $0x22, %esi
callq 0x2a480
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x4, %esi
callq 0x2a480
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xb0(%rsp), %rdi
movl $0x5, %esi
callq 0x2a480
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edi
callq 0x33cc0
movq 0x10(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x50(%rsp), %r8
movq 0x58(%rsp), %r9
movl $0x32, %ecx
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x371b0
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x6, %esi
callq 0x2a480
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x7, %esi
callq 0x2a480
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
jne 0x37a23
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x216d0
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
callq 0x55010
movq 0x98(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nopl (%rax,%rax)
| JS_ToObject:
sub rsp, 0D8h
mov [rsp+0D8h+var_20], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_28], rdi
mov eax, dword ptr [rsp+0D8h+var_18]
mov [rsp+0D8h+var_2C], eax
mov eax, [rsp+0D8h+var_2C]
add eax, 9; switch 17 cases
mov ecx, eax
mov [rsp+0D8h+var_C0], rcx
sub eax, 10h
ja short def_377C6; jumptable 00000000000377C6 default case, cases -6--2,4,5
mov rax, [rsp+0D8h+var_C0]
lea rcx, jpt_377C6
movsxd rax, ds:(jpt_377C6 - 10A824h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_377C6:
jmp short $+2; jumptable 00000000000377C6 default case, cases -6--2,4,5
loc_377CA:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 cases 2,3
lea rsi, aCannotConvertU; "Cannot convert undefined or null to obj"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_37A43
loc_377F5:
mov rdi, [rsp+0D8h+var_20]; jumptable 00000000000377C6 cases -1,6
mov rsi, [rsp+0D8h+var_18]
call js_dup
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_37A43
loc_3781F:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case -9
mov esi, 22h ; '"'
call JS_NewObjectClass
mov [rsp+0D8h+var_50], rax
mov [rsp+0D8h+var_48], rdx
mov rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_38], rax
jmp loc_379B9
loc_37866:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 cases 0,7
mov esi, 4
call JS_NewObjectClass
mov [rsp+0D8h+var_60], rax
mov [rsp+0D8h+var_58], rdx
mov rax, [rsp+0D8h+var_60]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_58]
mov [rsp+0D8h+var_38], rax
jmp loc_379B9
loc_378A7:
mov rax, [rsp+0D8h+var_20]; jumptable 00000000000377C6 case -7
mov [rsp+0D8h+var_68], rax
mov rdi, [rsp+0D8h+var_28]
mov esi, 5
call JS_NewObjectClass
mov [rsp+0D8h+var_78], rax
mov [rsp+0D8h+var_70], rdx
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_70]
mov [rsp+0D8h+var_38], rax
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_C8], rax
mov rax, [rsp+0D8h+var_68]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edi, eax
call js_int32
mov rdi, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], rdx
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
mov r8, [rsp+0D8h+var_88]
mov r9, [rsp+0D8h+var_80]
mov ecx, 32h ; '2'
xor eax, eax
mov [rsp+0D8h+var_D8], 0
call JS_DefinePropertyValue
jmp short loc_379B9
loc_3794B:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case 1
mov esi, 6
call JS_NewObjectClass
mov [rsp+0D8h+var_98], rax
mov [rsp+0D8h+var_90], rdx
mov rax, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_38], rax
jmp short loc_379B9
loc_37983:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case -8
mov esi, 7
call JS_NewObjectClass
mov [rsp+0D8h+var_A8], rax
mov [rsp+0D8h+var_A0], rdx
mov rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_A0]
mov [rsp+0D8h+var_38], rax
loc_379B9:
mov rdi, [rsp+0D8h+var_40]
mov rsi, [rsp+0D8h+var_38]
call JS_IsException_1
cmp eax, 0
jnz short loc_37A23
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_D0], rax
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_18]
call js_dup
mov rdi, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_B8], rax
mov [rsp+0D8h+var_B0], rdx
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
mov rcx, [rsp+0D8h+var_B8]
mov r8, [rsp+0D8h+var_B0]
call JS_SetObjectData
loc_37A23:
mov rax, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_10], rax
mov rax, [rsp+0D8h+var_38]
mov [rsp+0D8h+var_8], rax
loc_37A43:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
| _DWORD * JS_ToObject(
long long a1,
_DWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rdx
BOOL IsException_1; // eax
long long v16; // rdx
long long v17; // rdx
long long v18; // rdx
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
long long v23; // rdx
char v25; // [rsp+0h] [rbp-D8h]
_DWORD *v26; // [rsp+20h] [rbp-B8h]
long long v27; // [rsp+30h] [rbp-A8h]
_DWORD *v28; // [rsp+50h] [rbp-88h]
long long v29; // [rsp+98h] [rbp-40h]
long long v30; // [rsp+A0h] [rbp-38h]
unsigned int v31; // [rsp+C0h] [rbp-18h]
long long v32; // [rsp+C8h] [rbp-10h]
v31 = a3;
switch ( (int)a3 )
{
case -9:
v29 = JS_NewObjectClass(a1, 34);
v30 = v14;
IsException_1 = JS_IsException_1(v29, v14);
goto LABEL_10;
case -8:
v27 = JS_NewObjectClass(a1, 7);
v29 = v27;
v30 = v22;
IsException_1 = JS_IsException_1(v27, v22);
goto LABEL_10;
case -7:
v29 = JS_NewObjectClass(a1, 5);
v30 = v17;
v28 = (_DWORD *)js_int32(a2[1] & 0x7FFFFFFF);
JS_DefinePropertyValue(a1, v29, v30, 0x32u, v28, v18, a4, a5, a6, a7, v19, v20, a10, a11, 0);
IsException_1 = JS_IsException_1(v29, v30);
goto LABEL_10;
case -1:
case 6:
return js_dup(a2, a3);
case 0:
case 7:
v29 = JS_NewObjectClass(a1, 4);
v30 = v16;
IsException_1 = JS_IsException_1(v29, v16);
goto LABEL_10;
case 1:
v29 = JS_NewObjectClass(a1, 6);
v30 = v21;
IsException_1 = JS_IsException_1(v29, v21);
LABEL_10:
if ( !IsException_1 )
{
v26 = js_dup(a2, v31);
JS_SetObjectData(a1, v29, v30, v26, v23);
}
v32 = v29;
break;
default:
v32 = JS_ThrowTypeError(
a1,
(long long)"Cannot convert undefined or null to object",
a3,
(unsigned int)(a3 + 9),
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v25);
break;
}
return (_DWORD *)v32;
}
| JS_ToObject:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb0],RDI
MOV EAX,dword ptr [RSP + 0xc0]
MOV dword ptr [RSP + 0xac],EAX
MOV EAX,dword ptr [RSP + 0xac]
ADD EAX,0x9
MOV ECX,EAX
MOV qword ptr [RSP + 0x18],RCX
SUB EAX,0x10
JA 0x001377c8
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x20a824]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_fffffffa:
JMP 0x001377ca
caseD_2:
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x20eaed]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x00137a43
caseD_ffffffff:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001216d0
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x00137a43
caseD_fffffff7:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x22
CALL 0x0012a480
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_0:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x4
CALL 0x0012a480
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_fffffff9:
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x5
CALL 0x0012a480
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDI,EAX
CALL 0x00133cc0
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
MOV R8,qword ptr [RSP + 0x50]
MOV R9,qword ptr [RSP + 0x58]
MOV ECX,0x32
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001371b0
JMP 0x001379b9
caseD_1:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x6
CALL 0x0012a480
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_fffffff8:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x7
CALL 0x0012a480
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xa0],RAX
LAB_001379b9:
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00123cc0
CMP EAX,0x0
JNZ 0x00137a23
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001216d0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,qword ptr [RSP + 0x28]
CALL 0x00155010
LAB_00137a23:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xd0],RAX
LAB_00137a43:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16] JS_ToObject(int8 param_1,long param_2,int8 param_3)
{
int iVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 local_40;
int8 local_38;
int4 local_18;
local_18 = (int4)param_3;
switch(local_18) {
case 0:
case 7:
auVar2 = JS_NewObjectClass(param_1,4);
break;
case 1:
auVar2 = JS_NewObjectClass(param_1,6);
break;
case 0xfffffff7:
auVar2 = JS_NewObjectClass(param_1,0x22);
break;
case 0xfffffff8:
auVar2 = JS_NewObjectClass(param_1,7);
break;
case 0xfffffff9:
auVar2 = JS_NewObjectClass(param_1,5);
auVar3 = js_int32((uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
JS_DefinePropertyValue(param_1,auVar2._0_8_,auVar2._8_8_,0x32,auVar3._0_8_,auVar3._8_8_,0);
break;
default:
case 2:
case 3:
auVar2 = JS_ThrowTypeError(param_1,"Cannot convert int or null to object");
return auVar2;
case 0xffffffff:
case 6:
auVar2 = js_dup(param_2,param_3);
return auVar2;
}
local_38 = auVar2._8_8_;
local_40 = auVar2._0_8_;
iVar1 = JS_IsException(local_40,local_38);
if (iVar1 == 0) {
auVar3 = js_dup(param_2,param_3);
JS_SetObjectData(param_1,local_40,local_38,auVar3._0_8_,auVar3._8_8_);
}
return auVar2;
}
|
|
1,510 | JS_ToObject | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToObject(JSContext *ctx, JSValue val)
{
int tag = JS_VALUE_GET_NORM_TAG(val);
JSValue obj;
switch(tag) {
default:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
return JS_ThrowTypeError(ctx, "Cannot convert undefined or null to object");
case JS_TAG_OBJECT:
case JS_TAG_EXCEPTION:
return js_dup(val);
case JS_TAG_BIG_INT:
obj = JS_NewObjectClass(ctx, JS_CLASS_BIG_INT);
goto set_value;
case JS_TAG_INT:
case JS_TAG_FLOAT64:
obj = JS_NewObjectClass(ctx, JS_CLASS_NUMBER);
goto set_value;
case JS_TAG_STRING:
/* XXX: should call the string constructor */
{
JSString *p1 = JS_VALUE_GET_STRING(val);
obj = JS_NewObjectClass(ctx, JS_CLASS_STRING);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_length, js_int32(p1->len), 0);
}
goto set_value;
case JS_TAG_BOOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_BOOLEAN);
goto set_value;
case JS_TAG_SYMBOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_SYMBOL);
set_value:
if (!JS_IsException(obj))
JS_SetObjectData(ctx, obj, js_dup(val));
return obj;
}
} | O1 | c | JS_ToObject:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq %rsi, 0x10(%rsp)
leal 0x9(%rdx), %eax
cmpl $0x10, %eax
ja 0x26e45
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x75894(%rip), %rcx # 0x9c69c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, 0x8(%rsp)
cmpl $-0x9, %r14d
jb 0x26f31
movq 0x8(%rsp), %rax
incl (%rax)
jmp 0x26f31
movq 0x40(%r15), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movq %r15, %rdi
movl $0x4, %ecx
jmp 0x26ef4
leaq 0x78c3d(%rip), %rsi # 0x9fa89
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
jmp 0x26f31
movq 0x40(%r15), %rax
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
movq %r15, %rdi
movl $0x7, %ecx
jmp 0x26ef4
movq 0x40(%r15), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
movq %r15, %rdi
movl $0x6, %ecx
jmp 0x26ef4
movq 0x10(%rsp), %rbp
movq 0x40(%r15), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq %r15, %rdi
movl $0x5, %ecx
callq 0x20f05
movq %rax, %r12
movq %rdx, %r13
movq 0x4(%rbp), %r8
andl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movl $0x0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
movl $0x32, %ecx
xorl %r9d, %r9d
callq 0x26abb
jmp 0x26eff
movq 0x40(%r15), %rax
movq 0x220(%rax), %rsi
movq 0x228(%rax), %rdx
movq %r15, %rdi
movl $0x22, %ecx
callq 0x20f05
movq %rax, %r12
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x26f2b
movq %rbx, 0x8(%rsp)
cmpl $-0x9, %r14d
jb 0x26f17
movq 0x8(%rsp), %rax
incl (%rax)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x36e62
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ToObject:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov [rsp+48h+var_38], rsi
lea eax, [rdx+9]; switch 17 cases
cmp eax, 10h
ja short def_26E0F; jumptable 0000000000026E0F default case, cases -6--2,2-5
mov r14, rdx
mov rbx, rsi
lea rcx, jpt_26E0F
movsxd rax, ds:(jpt_26E0F - 9C69Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_26E11:
mov [rsp+48h+var_40], rbx; jumptable 0000000000026E0F cases -1,6
cmp r14d, 0FFFFFFF7h
jb loc_26F31
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
jmp loc_26F31
loc_26E2C:
mov rax, [r15+40h]; jumptable 0000000000026E0F cases 0,7
mov rsi, [rax+40h]
mov rdx, [rax+48h]
mov rdi, r15
mov ecx, 4
jmp loc_26EF4
def_26E0F:
lea rsi, aCannotConvertU; jumptable 0000000000026E0F default case, cases -6--2,2-5
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp loc_26F31
loc_26E63:
mov rax, [r15+40h]; jumptable 0000000000026E0F case -8
mov rsi, [rax+70h]
mov rdx, [rax+78h]
mov rdi, r15
mov ecx, 7
jmp short loc_26EF4
loc_26E79:
mov rax, [r15+40h]; jumptable 0000000000026E0F case 1
mov rsi, [rax+60h]
mov rdx, [rax+68h]
mov rdi, r15
mov ecx, 6
jmp short loc_26EF4
loc_26E8F:
mov rbp, [rsp+48h+var_38]; jumptable 0000000000026E0F case -7
mov rax, [r15+40h]
mov rsi, [rax+50h]
mov rdx, [rax+58h]
mov rdi, r15
mov ecx, 5
call JS_NewObjectProtoClass
mov r12, rax
mov r13, rdx
mov r8, [rbp+4]
and r8d, 7FFFFFFFh
mov [rsp+48h+var_48], 0
mov rdi, r15
mov rsi, rax
mov ecx, 32h ; '2'
xor r9d, r9d
call JS_DefinePropertyValue
jmp short loc_26EFF
loc_26EDA:
mov rax, [r15+40h]; jumptable 0000000000026E0F case -9
mov rsi, [rax+220h]
mov rdx, [rax+228h]
mov rdi, r15
mov ecx, 22h ; '"'
loc_26EF4:
call JS_NewObjectProtoClass
mov r12, rax
mov r13, rdx
loc_26EFF:
cmp r13d, 6
jz short loc_26F2B
mov [rsp+48h+var_40], rbx
cmp r14d, 0FFFFFFF7h
jb short loc_26F17
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
loc_26F17:
mov rdi, r15
mov rsi, r12
mov rdx, r13
mov rcx, rbx
mov r8, r14
call JS_SetObjectData
loc_26F2B:
mov rbx, r12
mov r14, r13
loc_26F31:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * JS_ToObject(
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)
{
_DWORD *v15; // rbx
long long v16; // rax
long long v17; // rsi
long long v18; // rdx
unsigned int v19; // ecx
long long v20; // rax
long long v21; // rax
unsigned long long v22; // r12
long long v23; // rdx
long long v24; // r13
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rax
long long v28; // rdx
char v30; // [rsp+0h] [rbp-48h]
v15 = (_DWORD *)a2;
switch ( (int)a3 )
{
case -9:
v27 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v27 + 544);
v18 = *(_QWORD *)(v27 + 552);
v19 = 34;
goto LABEL_10;
case -8:
v20 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v20 + 112);
v18 = *(_QWORD *)(v20 + 120);
v19 = 7;
goto LABEL_10;
case -7:
v22 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 80LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 88LL),
5u);
v24 = v23;
JS_DefinePropertyValue(
a1,
v22,
v23,
50LL,
(_DWORD *)(*(_QWORD *)(a2 + 4) & 0x7FFFFFFFLL),
0LL,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
0);
goto LABEL_11;
case -1:
case 6:
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*(_DWORD *)a2;
return v15;
case 0:
case 7:
v16 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v16 + 64);
v18 = *(_QWORD *)(v16 + 72);
v19 = 4;
goto LABEL_10;
case 1:
v21 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v21 + 96);
v18 = *(_QWORD *)(v21 + 104);
v19 = 6;
LABEL_10:
v22 = JS_NewObjectProtoClass(a1, v17, v18, v19);
v24 = v28;
LABEL_11:
if ( (_DWORD)v24 != 6 )
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*v15;
JS_SetObjectData(a1, v22, v24, v15, a3);
}
v15 = (_DWORD *)v22;
break;
default:
v15 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"Cannot convert undefined or null to object",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v30);
break;
}
return v15;
}
| |||
1,511 | SDL::PixelPainter::Line(SDL::Surface*, SDL::Vec2f const&, SDL::Vec2f const&, SDL::Color const&) | SDL3Lite/source/Shared/PixelPainter.cpp | void PixelPainter::Line(Surface* dest, const Vec2f& first, const Vec2f& last, const Color& color)
{
int x1 = (int)first.x;
int y1 = (int)first.y;
int x2 = (int)last.x;
int y2 = (int)last.y;
size_t surfW = dest->GetSize().x;
size_t surfH = dest->GetSize().y;
size_t surfBpp = dest->GetBpp();
uint8_t* surfPixels = dest->GetPixels();
size_t index = 0;
int deltaX;
int deltaY;
int signX;
int signY;
int error;
int error2;
deltaX = abs(x2 - x1);
deltaY = abs(y2 - y1);
signX = x1 < x2 ? 1 : -1;
signY = y1 < y2 ? 1 : -1;
error = deltaX - deltaY;
index = (surfW * (y2) + (x2)) * surfBpp;
if (index < surfW * surfH * surfBpp)
{
#if defined(_WIN32)
surfPixels[index + 0] = color.b;
surfPixels[index + 1] = color.g;
surfPixels[index + 2] = color.r;
#else
surfPixels[index + 0] = color.r;
surfPixels[index + 1] = color.g;
surfPixels[index + 2] = color.b;
#endif
}
while (x1 != x2 || y1 != y2)
{
index = (surfW * (y1)+(x1)) * surfBpp;
if (index < surfW * surfH * surfBpp)
{
#if defined(_WIN32)
surfPixels[index + 0] = color.b;
surfPixels[index + 1] = color.g;
surfPixels[index + 2] = color.r;
#else
surfPixels[index + 0] = color.r;
surfPixels[index + 1] = color.g;
surfPixels[index + 2] = color.b;
#endif
}
error2 = error * 2;
if (error2 > -deltaY)
{
error -= deltaY;
x1 += signX;
}
if (error2 < deltaX)
{
error += deltaX;
y1 += signY;
}
}
} | O3 | cpp | SDL::PixelPainter::Line(SDL::Surface*, SDL::Vec2f const&, SDL::Vec2f const&, SDL::Color const&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq 0x70(%rsp), %rax
cvttss2si (%rax), %eax
movl %eax, 0x5c(%rsp)
movq 0x70(%rsp), %rax
cvttss2si 0x4(%rax), %eax
movl %eax, 0x58(%rsp)
movq 0x68(%rsp), %rax
cvttss2si (%rax), %eax
movl %eax, 0x54(%rsp)
movq 0x68(%rsp), %rax
cvttss2si 0x4(%rax), %eax
movl %eax, 0x50(%rsp)
movq 0x78(%rsp), %rdi
callq 0x2d660
movslq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rdi
callq 0x2d660
movslq 0x4(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rdi
callq 0x2d640
cltq
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rdi
callq 0x2d670
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movl 0x54(%rsp), %eax
subl 0x5c(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x50(%rsp), %eax
subl 0x58(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, 0x20(%rsp)
movl 0x5c(%rsp), %edx
movl 0x54(%rsp), %esi
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl %esi, %edx
cmovll %ecx, %eax
movl %eax, 0x1c(%rsp)
movl 0x58(%rsp), %edx
movl 0x50(%rsp), %esi
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl %esi, %edx
cmovll %ecx, %eax
movl %eax, 0x18(%rsp)
movl 0x24(%rsp), %eax
subl 0x20(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x48(%rsp), %rax
movslq 0x50(%rsp), %rcx
imulq %rcx, %rax
movslq 0x54(%rsp), %rcx
addq %rcx, %rax
imulq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rcx
imulq 0x40(%rsp), %rcx
imulq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jae 0x2d14b
movq 0x60(%rsp), %rax
movb (%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x60(%rsp), %rax
movb 0x1(%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
movq 0x60(%rsp), %rax
movb 0x2(%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, 0x2(%rax,%rcx)
jmp 0x2d14d
movl 0x5c(%rsp), %ecx
movb $0x1, %al
cmpl 0x54(%rsp), %ecx
movb %al, 0xf(%rsp)
jne 0x2d16c
movl 0x58(%rsp), %eax
cmpl 0x50(%rsp), %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x2d179
jmp 0x2d24e
movq 0x48(%rsp), %rax
movslq 0x58(%rsp), %rcx
imulq %rcx, %rax
movslq 0x5c(%rsp), %rcx
addq %rcx, %rax
imulq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rcx
imulq 0x40(%rsp), %rcx
imulq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jae 0x2d1f5
movq 0x60(%rsp), %rax
movb (%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x60(%rsp), %rax
movb 0x1(%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
movq 0x60(%rsp), %rax
movb 0x2(%rax), %dl
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movb %dl, 0x2(%rax,%rcx)
movl 0x14(%rsp), %eax
shll %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
xorl %ecx, %ecx
subl 0x20(%rsp), %ecx
cmpl %ecx, %eax
jle 0x2d227
movl 0x20(%rsp), %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
movl 0x1c(%rsp), %eax
addl 0x5c(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x2d249
movl 0x24(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
addl 0x58(%rsp), %eax
movl %eax, 0x58(%rsp)
jmp 0x2d14d
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN3SDL12PixelPainter4LineEPNS_7SurfaceERKNS_5Vec2fES5_RKNS_5ColorE:
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 rax, [rsp+88h+var_18]
cvttss2si eax, dword ptr [rax]
mov [rsp+88h+var_2C], eax
mov rax, [rsp+88h+var_18]
cvttss2si eax, dword ptr [rax+4]
mov [rsp+88h+var_30], eax
mov rax, [rsp+88h+var_20]
cvttss2si eax, dword ptr [rax]
mov [rsp+88h+var_34], eax
mov rax, [rsp+88h+var_20]
cvttss2si eax, dword ptr [rax+4]
mov [rsp+88h+var_38], eax
mov rdi, [rsp+88h+var_10]; this
call _ZN3SDL7Surface7GetSizeEv; SDL::Surface::GetSize(void)
movsxd rax, dword ptr [rax]
mov [rsp+88h+var_40], rax
mov rdi, [rsp+88h+var_10]; this
call _ZN3SDL7Surface7GetSizeEv; SDL::Surface::GetSize(void)
movsxd rax, dword ptr [rax+4]
mov [rsp+88h+var_48], rax
mov rdi, [rsp+88h+var_10]; this
call _ZN3SDL7Surface6GetBppEv; SDL::Surface::GetBpp(void)
cdqe
mov [rsp+88h+var_50], rax
mov rdi, [rsp+88h+var_10]; this
call _ZN3SDL7Surface9GetPixelsEv; SDL::Surface::GetPixels(void)
mov [rsp+88h+var_58], rax
mov [rsp+88h+var_60], 0
mov eax, [rsp+88h+var_34]
sub eax, [rsp+88h+var_2C]
mov ecx, eax
neg ecx
cmovns eax, ecx
mov [rsp+88h+var_64], eax
mov eax, [rsp+88h+var_38]
sub eax, [rsp+88h+var_30]
mov ecx, eax
neg ecx
cmovns eax, ecx
mov [rsp+88h+var_68], eax
mov edx, [rsp+88h+var_2C]
mov esi, [rsp+88h+var_34]
mov eax, 0FFFFFFFFh
mov ecx, 1
cmp edx, esi
cmovl eax, ecx
mov [rsp+88h+var_6C], eax
mov edx, [rsp+88h+var_30]
mov esi, [rsp+88h+var_38]
mov eax, 0FFFFFFFFh
mov ecx, 1
cmp edx, esi
cmovl eax, ecx
mov [rsp+88h+var_70], eax
mov eax, [rsp+88h+var_64]
sub eax, [rsp+88h+var_68]
mov [rsp+88h+var_74], eax
mov rax, [rsp+88h+var_40]
movsxd rcx, [rsp+88h+var_38]
imul rax, rcx
movsxd rcx, [rsp+88h+var_34]
add rax, rcx
imul rax, [rsp+88h+var_50]
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_60]
mov rcx, [rsp+88h+var_40]
imul rcx, [rsp+88h+var_48]
imul rcx, [rsp+88h+var_50]
cmp rax, rcx
jnb short loc_2D14B
mov rax, [rsp+88h+var_28]
mov dl, [rax]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx], dl
mov rax, [rsp+88h+var_28]
mov dl, [rax+1]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx+1], dl
mov rax, [rsp+88h+var_28]
mov dl, [rax+2]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx+2], dl
loc_2D14B:
jmp short $+2
loc_2D14D:
mov ecx, [rsp+88h+var_2C]
mov al, 1
cmp ecx, [rsp+88h+var_34]
mov [rsp+88h+var_79], al
jnz short loc_2D16C
mov eax, [rsp+88h+var_30]
cmp eax, [rsp+88h+var_38]
setnz al
mov [rsp+88h+var_79], al
loc_2D16C:
mov al, [rsp+88h+var_79]
test al, 1
jnz short loc_2D179
jmp loc_2D24E
loc_2D179:
mov rax, [rsp+88h+var_40]
movsxd rcx, [rsp+88h+var_30]
imul rax, rcx
movsxd rcx, [rsp+88h+var_2C]
add rax, rcx
imul rax, [rsp+88h+var_50]
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_60]
mov rcx, [rsp+88h+var_40]
imul rcx, [rsp+88h+var_48]
imul rcx, [rsp+88h+var_50]
cmp rax, rcx
jnb short loc_2D1F5
mov rax, [rsp+88h+var_28]
mov dl, [rax]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx], dl
mov rax, [rsp+88h+var_28]
mov dl, [rax+1]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx+1], dl
mov rax, [rsp+88h+var_28]
mov dl, [rax+2]
mov rax, [rsp+88h+var_58]
mov rcx, [rsp+88h+var_60]
mov [rax+rcx+2], dl
loc_2D1F5:
mov eax, [rsp+88h+var_74]
shl eax, 1
mov [rsp+88h+var_78], eax
mov eax, [rsp+88h+var_78]
xor ecx, ecx
sub ecx, [rsp+88h+var_68]
cmp eax, ecx
jle short loc_2D227
mov ecx, [rsp+88h+var_68]
mov eax, [rsp+88h+var_74]
sub eax, ecx
mov [rsp+88h+var_74], eax
mov eax, [rsp+88h+var_6C]
add eax, [rsp+88h+var_2C]
mov [rsp+88h+var_2C], eax
loc_2D227:
mov eax, [rsp+88h+var_78]
cmp eax, [rsp+88h+var_64]
jge short loc_2D249
mov eax, [rsp+88h+var_64]
add eax, [rsp+88h+var_74]
mov [rsp+88h+var_74], eax
mov eax, [rsp+88h+var_70]
add eax, [rsp+88h+var_30]
mov [rsp+88h+var_30], eax
loc_2D249:
jmp loc_2D14D
loc_2D24E:
add rsp, 88h
retn
| bool SDL::PixelPainter::Line(
SDL::PixelPainter *this,
SDL::Surface *a2,
const SDL::Vec2f *a3,
const SDL::Vec2f *a4,
const SDL::Color *a5)
{
int v5; // eax
int v6; // eax
int v7; // eax
int v8; // eax
bool result; // al
bool v10; // [rsp+Fh] [rbp-79h]
int v11; // [rsp+10h] [rbp-78h]
int v12; // [rsp+14h] [rbp-74h]
int v13; // [rsp+18h] [rbp-70h]
int v14; // [rsp+1Ch] [rbp-6Ch]
int v15; // [rsp+20h] [rbp-68h]
int v16; // [rsp+24h] [rbp-64h]
unsigned long long v17; // [rsp+28h] [rbp-60h]
unsigned long long v18; // [rsp+28h] [rbp-60h]
long long Pixels; // [rsp+30h] [rbp-58h]
long long Bpp; // [rsp+38h] [rbp-50h]
long long v21; // [rsp+40h] [rbp-48h]
long long v22; // [rsp+48h] [rbp-40h]
int v23; // [rsp+50h] [rbp-38h]
int v24; // [rsp+54h] [rbp-34h]
int v25; // [rsp+58h] [rbp-30h]
int v26; // [rsp+5Ch] [rbp-2Ch]
v26 = (int)*(float *)a3;
v25 = (int)*((float *)a3 + 1);
v24 = (int)*(float *)a4;
v23 = (int)*((float *)a4 + 1);
v22 = *(int *)SDL::Surface::GetSize(a2);
v21 = *(int *)(SDL::Surface::GetSize(a2) + 4);
Bpp = (int)SDL::Surface::GetBpp(a2);
Pixels = SDL::Surface::GetPixels(a2);
v5 = v24 - v26;
if ( v26 - v24 >= 0 )
v5 = v26 - v24;
v16 = v5;
v6 = v23 - v25;
if ( v25 - v23 >= 0 )
v6 = v25 - v23;
v15 = v6;
v7 = -1;
if ( v26 < v24 )
v7 = 1;
v14 = v7;
v8 = -1;
if ( v25 < v23 )
v8 = 1;
v13 = v8;
v12 = v16 - v15;
v17 = Bpp * (v24 + v23 * v22);
if ( v17 < Bpp * v21 * v22 )
{
*(_BYTE *)(Pixels + v17) = *(_BYTE *)a5;
*(_BYTE *)(Pixels + v17 + 1) = *((_BYTE *)a5 + 1);
*(_BYTE *)(Pixels + v17 + 2) = *((_BYTE *)a5 + 2);
}
while ( 1 )
{
v10 = 1;
if ( v26 == v24 )
v10 = v25 != v23;
result = v10;
if ( !v10 )
break;
v18 = Bpp * (v26 + v25 * v22);
if ( v18 < Bpp * v21 * v22 )
{
*(_BYTE *)(Pixels + v18) = *(_BYTE *)a5;
*(_BYTE *)(Pixels + v18 + 1) = *((_BYTE *)a5 + 1);
*(_BYTE *)(Pixels + v18 + 2) = *((_BYTE *)a5 + 2);
}
v11 = 2 * v12;
if ( 2 * v12 > -v15 )
{
v12 -= v15;
v26 += v14;
}
if ( v11 < v16 )
{
v12 += v16;
v25 += v13;
}
}
return result;
}
| Line:
SUB RSP,0x88
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x60],R8
MOV RAX,qword ptr [RSP + 0x70]
CVTTSS2SI EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x5c],EAX
MOV RAX,qword ptr [RSP + 0x70]
CVTTSS2SI EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x58],EAX
MOV RAX,qword ptr [RSP + 0x68]
CVTTSS2SI EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x54],EAX
MOV RAX,qword ptr [RSP + 0x68]
CVTTSS2SI EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x50],EAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0012d660
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0012d660
MOVSXD RAX,dword ptr [RAX + 0x4]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0012d640
CDQE
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0012d670
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x28],0x0
MOV EAX,dword ptr [RSP + 0x54]
SUB EAX,dword ptr [RSP + 0x5c]
MOV ECX,EAX
NEG ECX
CMOVNS EAX,ECX
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x50]
SUB EAX,dword ptr [RSP + 0x58]
MOV ECX,EAX
NEG ECX
CMOVNS EAX,ECX
MOV dword ptr [RSP + 0x20],EAX
MOV EDX,dword ptr [RSP + 0x5c]
MOV ESI,dword ptr [RSP + 0x54]
MOV EAX,0xffffffff
MOV ECX,0x1
CMP EDX,ESI
CMOVL EAX,ECX
MOV dword ptr [RSP + 0x1c],EAX
MOV EDX,dword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x50]
MOV EAX,0xffffffff
MOV ECX,0x1
CMP EDX,ESI
CMOVL EAX,ECX
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x24]
SUB EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x48]
MOVSXD RCX,dword ptr [RSP + 0x50]
IMUL RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x54]
ADD RAX,RCX
IMUL RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x48]
IMUL RCX,qword ptr [RSP + 0x40]
IMUL RCX,qword ptr [RSP + 0x38]
CMP RAX,RCX
JNC 0x0012d14b
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
LAB_0012d14b:
JMP 0x0012d14d
LAB_0012d14d:
MOV ECX,dword ptr [RSP + 0x5c]
MOV AL,0x1
CMP ECX,dword ptr [RSP + 0x54]
MOV byte ptr [RSP + 0xf],AL
JNZ 0x0012d16c
MOV EAX,dword ptr [RSP + 0x58]
CMP EAX,dword ptr [RSP + 0x50]
SETNZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_0012d16c:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x0012d179
JMP 0x0012d24e
LAB_0012d179:
MOV RAX,qword ptr [RSP + 0x48]
MOVSXD RCX,dword ptr [RSP + 0x58]
IMUL RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x5c]
ADD RAX,RCX
IMUL RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x48]
IMUL RCX,qword ptr [RSP + 0x40]
IMUL RCX,qword ptr [RSP + 0x38]
CMP RAX,RCX
JNC 0x0012d1f5
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
LAB_0012d1f5:
MOV EAX,dword ptr [RSP + 0x14]
SHL EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
XOR ECX,ECX
SUB ECX,dword ptr [RSP + 0x20]
CMP EAX,ECX
JLE 0x0012d227
MOV ECX,dword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,ECX
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x5c],EAX
LAB_0012d227:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x0012d249
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x58],EAX
LAB_0012d249:
JMP 0x0012d14d
LAB_0012d24e:
ADD RSP,0x88
RET
|
/* SDL::PixelPainter::Line(SDL::Surface*, SDL::Vec2f const&, SDL::Vec2f const&, SDL::Color const&)
*/
void __thiscall
SDL::PixelPainter::Line
(PixelPainter *this,Surface *param_1,Vec2f *param_2,Vec2f *param_3,Color *param_4)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int *piVar9;
long lVar10;
long lVar11;
long lVar12;
ulong uVar13;
int local_74;
int local_30;
int local_2c;
local_2c = (int)*(float *)param_2;
local_30 = (int)*(float *)(param_2 + 4);
iVar2 = (int)*(float *)param_3;
iVar3 = (int)*(float *)(param_3 + 4);
piVar9 = (int *)Surface::GetSize(param_1);
lVar10 = (long)*piVar9;
lVar11 = Surface::GetSize(param_1);
iVar1 = *(int *)(lVar11 + 4);
iVar4 = Surface::GetBpp(param_1);
lVar11 = (long)iVar4;
lVar12 = Surface::GetPixels(param_1);
iVar4 = iVar2 - local_2c;
if (iVar4 < 1) {
iVar4 = -iVar4;
}
iVar5 = iVar3 - local_30;
if (iVar5 < 1) {
iVar5 = -iVar5;
}
iVar6 = -1;
if (local_2c < iVar2) {
iVar6 = 1;
}
iVar7 = -1;
if (local_30 < iVar3) {
iVar7 = 1;
}
local_74 = iVar4 - iVar5;
uVar13 = (lVar10 * iVar3 + (long)iVar2) * lVar11;
if (uVar13 < (ulong)(lVar10 * iVar1 * lVar11)) {
*(Color *)(lVar12 + uVar13) = *param_4;
*(Color *)(lVar12 + 1 + uVar13) = param_4[1];
*(Color *)(lVar12 + 2 + uVar13) = param_4[2];
}
while (local_2c != iVar2 || local_30 != iVar3) {
uVar13 = (lVar10 * local_30 + (long)local_2c) * lVar11;
if (uVar13 < (ulong)(lVar10 * iVar1 * lVar11)) {
*(Color *)(lVar12 + uVar13) = *param_4;
*(Color *)(lVar12 + 1 + uVar13) = param_4[1];
*(Color *)(lVar12 + 2 + uVar13) = param_4[2];
}
iVar8 = local_74 * 2;
if (iVar8 != -iVar5 && SBORROW4(iVar8,-iVar5) == iVar8 + iVar5 < 0) {
local_74 = local_74 - iVar5;
local_2c = iVar6 + local_2c;
}
if (iVar8 < iVar4) {
local_74 = iVar4 + local_74;
local_30 = iVar7 + local_30;
}
}
return;
}
|
|
1,512 | mi_init_bulk_insert | eloqsql/storage/myisam/mi_write.c | int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows)
{
MYISAM_SHARE *share=info->s;
MI_KEYDEF *key=share->keyinfo;
bulk_insert_param *params;
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_mi_init_bulk_insert");
DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
mi_clear_all_keys_active(key_map);
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) &&
mi_is_key_active(share->state.key_map, i))
{
num_keys++;
mi_set_key_active(key_map, i);
total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE;
}
}
if (num_keys==0 ||
num_keys * (size_t) MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
cache_size= (size_t) rows;
else
cache_size/=total_keylength*16;
info->bulk_insert=(TREE *)
my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++)
{
if (mi_is_key_active(key_map, i))
{
params->info=info;
params->keynr=i;
/* Only allocate a 16'th of the buffer at a time */
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2)keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
}
DBUG_RETURN(0);
} | O0 | c | mi_init_bulk_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x218(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc9410
jmp 0xc9412
jmp 0xc9414
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0xc94f7
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xc94e7
movq -0x28(%rbp), %rax
movl 0x184(%rax), %eax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0xc94e7
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0xc94a0
movb $0x1, %al
testb $0x1, %al
jne 0xc94a8
jmp 0xc94e7
xorl %eax, %eax
testb $0x1, %al
jne 0xc94a8
jmp 0xc94e7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
movl %eax, %ecx
addq $0x20, %rcx
movl -0x44(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0xc94e9
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc9431
cmpl $0x0, -0x40(%rbp)
je 0xc950a
movl -0x40(%rbp), %eax
shlq $0xe, %rax
cmpq -0x18(%rbp), %rax
jbe 0xc9518
jmp 0xc950c
movl $0x0, -0x4(%rbp)
jmp 0xc96e5
cmpq $0x0, -0x20(%rbp)
je 0xc953a
movq -0x20(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
cmpq -0x18(%rbp), %rax
jae 0xc953a
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc9551
movl -0x44(%rbp), %eax
shll $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
leaq 0xbbbf7c(%rip), %rax # 0xc854d4
movl (%rax), %edi
movq -0x28(%rbp), %rax
movl 0x180(%rax), %eax
imulq $0x298, %rax, %rsi # imm = 0x298
movl -0x40(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf8350
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0xc95a8
jmp 0xc959c
movl $0x80, -0x4(%rbp)
jmp 0xc96e5
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x180(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0xc96dc
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0xc960b
movb $0x1, %al
testb $0x1, %al
jne 0xc9616
jmp 0xc96ad
xorl %eax, %eax
testb $0x1, %al
jne 0xc9616
jmp 0xc96ad
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0x3c(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rdx
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x38(%rbp)
xorl %ecx, %ecx
leaq 0x61(%rip), %r8 # 0xc96f0
leaq 0xba(%rip), %r9 # 0xc9750
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xfeeb0
jmp 0xc96cc
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0xc96ce
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc95d2
jmp 0xc96de
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| mi_init_bulk_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+218h]
mov [rbp+var_30], rax
jmp short $+2
loc_C9410:
jmp short $+2
loc_C9412:
jmp short $+2
loc_C9414:
mov [rbp+var_50], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov [rbp+var_3C], 0
loc_C9431:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_C94F7
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+0Ah]
and eax, 1
cmp eax, 0
jnz loc_C94E7
mov rax, [rbp+var_28]
mov eax, [rax+184h]
mov ecx, [rbp+var_3C]
add ecx, 1
cmp eax, ecx
jz short loc_C94E7
mov rax, [rbp+var_28]
mov rax, [rax+0C0h]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_C94A0
mov al, 1
test al, 1
jnz short loc_C94A8
jmp short loc_C94E7
loc_C94A0:
xor eax, eax
test al, 1
jnz short loc_C94A8
jmp short loc_C94E7
loc_C94A8:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, eax
mov eax, 1
shl rax, cl
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
mov ecx, eax
add rcx, 20h ; ' '
mov eax, [rbp+var_44]
add rax, rcx
mov [rbp+var_44], eax
loc_C94E7:
jmp short $+2
loc_C94E9:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_C9431
loc_C94F7:
cmp [rbp+var_40], 0
jz short loc_C950A
mov eax, [rbp+var_40]
shl rax, 0Eh
cmp rax, [rbp+var_18]
jbe short loc_C9518
loc_C950A:
jmp short $+2
loc_C950C:
mov [rbp+var_4], 0
jmp loc_C96E5
loc_C9518:
cmp [rbp+var_20], 0
jz short loc_C953A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_44]
imul rax, rcx
cmp rax, [rbp+var_18]
jnb short loc_C953A
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp short loc_C9551
loc_C953A:
mov eax, [rbp+var_44]
shl eax, 4
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_C9551:
lea rax, mi_key_memory_MI_INFO_bulk_insert
mov edi, [rax]
mov rax, [rbp+var_28]
mov eax, [rax+180h]
imul rsi, rax, 298h
mov eax, [rbp+var_40]
shl rax, 4
add rsi, rax
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+80h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+80h], 0
jnz short loc_C95A8
jmp short $+2
loc_C959C:
mov [rbp+var_4], 80h
jmp loc_C96E5
loc_C95A8:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+180h]
imul rcx, 298h
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_3C], 0
loc_C95D2:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_C96DC
mov rax, [rbp+var_50]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_C960B
mov al, 1
test al, 1
jnz short loc_C9616
jmp loc_C96AD
loc_C960B:
xor eax, eax
test al, 1
jnz short loc_C9616
jmp loc_C96AD
loc_C9616:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_38]
mov [rax], rcx
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
mov rax, [rbp+var_10]
mov rdi, [rax+80h]
mov eax, [rbp+var_3C]
imul rax, 298h
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rsi, rax
mov rdx, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rdx, rax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 10h
mov [rbp+var_38], rcx
xor ecx, ecx
lea r8, keys_compare_0
lea r9, keys_free_0
xor r10d, r10d
mov [rsp+60h+var_60], rax
mov [rsp+60h+var_58], 0
call init_tree
jmp short loc_C96CC
loc_C96AD:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_3C]
imul rcx, 298h
add rax, rcx
mov qword ptr [rax], 0
loc_C96CC:
jmp short $+2
loc_C96CE:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_C95D2
loc_C96DC:
jmp short $+2
loc_C96DE:
mov [rbp+var_4], 0
loc_C96E5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_init_bulk_insert(_QWORD *a1, unsigned long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-50h]
unsigned int v6; // [rsp+1Ch] [rbp-44h]
unsigned int v7; // [rsp+20h] [rbp-40h]
unsigned int i; // [rsp+24h] [rbp-3Ch]
unsigned int j; // [rsp+24h] [rbp-3Ch]
long long v10; // [rsp+28h] [rbp-38h]
long long v11; // [rsp+30h] [rbp-30h]
long long v12; // [rsp+38h] [rbp-28h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v12 = *a1;
v11 = *(_QWORD *)(*a1 + 536LL);
v5 = 0LL;
v7 = 0;
v6 = 0;
for ( i = 0; i < *(_DWORD *)(v12 + 384); ++i )
{
if ( (*(_WORD *)(112LL * i + v11 + 10) & 1) == 0
&& *(_DWORD *)(v12 + 388) != i + 1
&& ((1LL << i) & *(_QWORD *)(v12 + 192)) != 0 )
{
++v7;
v5 |= 1LL << i;
v6 += *(unsigned __int16 *)(112LL * i + v11 + 22) + 32;
}
}
if ( v7 && (unsigned long long)v7 << 14 <= a2 )
{
if ( a3 && (unsigned long long)v6 * a3 < a2 )
LODWORD(v13) = a3;
else
v13 = a2 / (16 * v6);
a1[16] = my_malloc(mi_key_memory_MI_INFO_bulk_insert, 16LL * v7 + 664LL * *(unsigned int *)(v12 + 384), 0LL);
if ( a1[16] )
{
v10 = 664LL * *(unsigned int *)(v12 + 384) + a1[16];
for ( j = 0; j < *(_DWORD *)(v12 + 384); ++j )
{
if ( ((1LL << j) & v5) != 0 )
{
*(_QWORD *)v10 = a1;
*(_DWORD *)(v10 + 8) = j;
v3 = v10;
v10 += 16LL;
init_tree(
664 * j + *((_DWORD *)a1 + 32),
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
0,
(unsigned int)keys_compare_0,
(unsigned int)keys_free_0,
v3,
0LL);
}
else
{
*(_QWORD *)(664LL * j + a1[16]) = 0LL;
}
}
return 0;
}
else
{
return 128;
}
}
else
{
return 0;
}
}
| mi_init_bulk_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x218]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c9410
LAB_001c9410:
JMP 0x001c9412
LAB_001c9412:
JMP 0x001c9414
LAB_001c9414:
MOV qword ptr [RBP + -0x50],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x3c],0x0
LAB_001c9431:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x001c94f7
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001c94e7
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x184]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x1
CMP EAX,ECX
JZ 0x001c94e7
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xc0]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x001c94a0
MOV AL,0x1
TEST AL,0x1
JNZ 0x001c94a8
JMP 0x001c94e7
LAB_001c94a0:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001c94a8
JMP 0x001c94e7
LAB_001c94a8:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
OR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
MOV ECX,EAX
ADD RCX,0x20
MOV EAX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_001c94e7:
JMP 0x001c94e9
LAB_001c94e9:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c9431
LAB_001c94f7:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001c950a
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0xe
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001c9518
LAB_001c950a:
JMP 0x001c950c
LAB_001c950c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c96e5
LAB_001c9518:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001c953a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001c953a
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001c9551
LAB_001c953a:
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001c9551:
LEA RAX,[0xd854d4]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x180]
IMUL RSI,RAX,0x298
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0x4
ADD RSI,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f8350
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001c95a8
JMP 0x001c959c
LAB_001c959c:
MOV dword ptr [RBP + -0x4],0x80
JMP 0x001c96e5
LAB_001c95a8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x180]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x0
LAB_001c95d2:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x001c96dc
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x001c960b
MOV AL,0x1
TEST AL,0x1
JNZ 0x001c9616
JMP 0x001c96ad
LAB_001c960b:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001c9616
JMP 0x001c96ad
LAB_001c9616:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x80]
MOV EAX,dword ptr [RBP + -0x3c]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RDX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RBP + -0x38],RCX
XOR ECX,ECX
LEA R8,[0x1c96f0]
LEA R9,[0x1c9750]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001feeb0
JMP 0x001c96cc
LAB_001c96ad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LAB_001c96cc:
JMP 0x001c96ce
LAB_001c96ce:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c95d2
LAB_001c96dc:
JMP 0x001c96de
LAB_001c96de:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c96e5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001c9606) */
/* WARNING: Removing unreachable block (ram,0x001c949e) */
int4 mi_init_bulk_insert(long *param_1,ulong param_2,ulong param_3)
{
long lVar1;
long lVar2;
long lVar3;
ulong local_58;
uint local_4c;
uint local_48;
uint local_44;
int8 *local_40;
ulong local_20;
int4 local_c;
lVar1 = *param_1;
lVar2 = *(long *)(lVar1 + 0x218);
local_58 = 0;
local_48 = 0;
local_4c = 0;
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((((*(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 10) & 1) == 0) &&
(*(int *)(lVar1 + 0x184) != local_44 + 1)) &&
((*(ulong *)(lVar1 + 0xc0) & 1L << ((byte)local_44 & 0x3f)) != 0)) {
local_48 = local_48 + 1;
local_58 = 1L << ((byte)local_44 & 0x3f) | local_58;
local_4c = local_4c + *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16) + 0x20;
}
}
if ((local_48 == 0) || (param_2 < (ulong)local_48 << 0xe)) {
local_c = 0;
}
else {
if ((param_3 == 0) || (local_20 = param_3, param_2 <= param_3 * local_4c)) {
local_20 = param_2 / (local_4c << 4);
}
lVar3 = my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(ulong)*(uint *)(lVar1 + 0x180) * 0x298 + (ulong)local_48 * 0x10,0);
param_1[0x10] = lVar3;
if (param_1[0x10] == 0) {
local_c = 0x80;
}
else {
local_40 = (int8 *)(param_1[0x10] + (ulong)*(uint *)(lVar1 + 0x180) * 0x298);
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((local_58 & 1L << ((byte)local_44 & 0x3f)) == 0) {
*(int8 *)(param_1[0x10] + (ulong)local_44 * 0x298) = 0;
}
else {
*local_40 = param_1;
*(uint *)(local_40 + 1) = local_44;
init_tree(param_1[0x10] + (ulong)local_44 * 0x298,
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),0,keys_compare,
keys_free,local_40,0);
local_40 = local_40 + 2;
}
}
local_c = 0;
}
}
return local_c;
}
|
|
1,513 | ReplaceString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/aimrt-src/src/tools/protoc_plugin_cpp_gen_aimrt_cpp_rpc/main.cc | std::string& ReplaceString(std::string& source, const std::string& replace_what,
const std::string& replace_with_what) {
std::string::size_type pos = 0;
while (true) {
pos = source.find(replace_what, pos);
if (pos == std::string::npos) break;
source.replace(pos, replace_what.size(), replace_with_what);
pos += replace_with_what.size();
}
return source;
} | O0 | cpp | ReplaceString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x14700
movq %rax, 0x18(%rsp)
cmpq $-0x1, 0x18(%rsp)
jne 0x1445f
jmp 0x144aa
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x147d0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movq 0x20(%rsp), %rcx
callq 0x14760
movq 0x20(%rsp), %rdi
callq 0x147d0
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x1443c
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _Z13ReplaceStringRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], 0
loc_1443C:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_20]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong)
mov [rsp+38h+var_20], rax
cmp [rsp+38h+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_1445F
jmp short loc_144AA
loc_1445F:
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+38h+var_30]
mov rsi, [rsp+38h+var_28]
mov rdx, rax
mov rcx, [rsp+38h+var_18]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmRKS4_; std::string::replace(ulong,ulong,std::string const&)
mov rdi, [rsp+38h+var_18]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_20], rax
jmp short loc_1443C
loc_144AA:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long ReplaceString(long long a1, long long a2, long long a3)
{
long long i; // rax
long long v4; // rax
long long v6; // [rsp+18h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-20h]
for ( i = std::string::find(a1, a2, 0LL); ; i = std::string::find(a1, a2, v7) )
{
v6 = i;
if ( i == -1 )
break;
v4 = std::string::size(a2);
std::string::replace(a1, v6, v4, a3);
v7 = v6 + std::string::size(a3);
}
return a1;
}
| ReplaceString:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],0x0
LAB_0011443c:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x00114700
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],-0x1
JNZ 0x0011445f
JMP 0x001144aa
LAB_0011445f:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001147d0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x00114760
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001147d0
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0011443c
LAB_001144aa:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* ReplaceString(std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string const&) */
string * ReplaceString(string *param_1,string *param_2,string *param_3)
{
ulong uVar1;
long lVar2;
int8 local_20;
local_20 = 0;
while( true ) {
local_20 = std::__cxx11::string::find(param_1,param_2,local_20);
if (local_20 == 0xffffffffffffffff) break;
uVar1 = std::__cxx11::string::size(param_2);
std::__cxx11::string::replace(param_1,local_20,uVar1,param_3);
lVar2 = std::__cxx11::string::size(param_3);
local_20 = lVar2 + local_20;
}
return param_1;
}
|
|
1,514 | test_list_fields | eloqsql/libmariadb/unittest/libmariadb/result.c | static int test_list_fields(MYSQL *mysql)
{
MYSQL_RES *result;
int rc;
rc= mysql_query(mysql, "drop table if exists t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "create table t1(c1 int primary key auto_increment, c2 char(10) default 'mysql')");
check_mysql_rc(rc, mysql);
result= mysql_list_fields(mysql, "t1", NULL);
FAIL_IF(!result, "Invalid result set");
rc= 0;
while (mysql_fetch_row(result))
rc++;
FAIL_UNLESS(rc == 0, "rowcount != 0");
if (verify_prepare_field(result, 0, "c1", "c1", MYSQL_TYPE_LONG,
"t1", "t1",
schema, 11, "0"))
goto error;
if (verify_prepare_field(result, 1, "c2", "c2", MYSQL_TYPE_STRING,
"t1", "t1",
schema, 10, "mysql"))
goto error;
mysql_free_result(result);
check_mysql_rc(mysql_query(mysql, "drop table t1"), mysql);
return OK;
error:
mysql_free_result(result);
check_mysql_rc(mysql_query(mysql, "drop table t1"), mysql);
return FAIL;
} | O3 | c | test_list_fields:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x21061(%rip), %rsi # 0x38c50
callq 0x1dee1
testl %eax, %eax
je 0x17c2c
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1ff5a
movq %rax, %r15
movq %rbx, %rdi
callq 0x1ff45
leaq 0x20538(%rip), %rdi # 0x3814d
leaq 0x20b5c(%rip), %r8 # 0x38778
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x349, %r9d # imm = 0x349
jmp 0x17c71
leaq 0x217a6(%rip), %rsi # 0x393d9
movq %rbx, %rdi
callq 0x1dee1
testl %eax, %eax
je 0x17c8a
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1ff5a
movq %rax, %r15
movq %rbx, %rdi
callq 0x1ff45
leaq 0x204f1(%rip), %rdi # 0x3814d
leaq 0x20b15(%rip), %r8 # 0x38778
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x34c, %r9d # imm = 0x34C
xorl %eax, %eax
callq 0x187d7
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21153(%rip), %r15 # 0x38de4
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1f287
testq %rax, %rax
je 0x17cdd
movq %rax, %r14
movl $0x1, %r12d
movq %r14, %rdi
callq 0x1efdc
decl %r12d
testq %rax, %rax
jne 0x17cac
testl %r12d, %r12d
je 0x17d03
leaq 0x20340(%rip), %rdi # 0x38008
leaq 0x214cc(%rip), %rsi # 0x3919b
leaq 0x20aa2(%rip), %rdx # 0x38778
movl $0x354, %ecx # imm = 0x354
jmp 0x17cf7
leaq 0x20324(%rip), %rdi # 0x38008
leaq 0x20484(%rip), %rsi # 0x3816f
leaq 0x20a86(%rip), %rdx # 0x38778
movl $0x34f, %ecx # imm = 0x34F
xorl %eax, %eax
callq 0x187d7
jmp 0x17c78
subq $0x20, %rsp
leaq 0x2171b(%rip), %rcx # 0x39429
movq %r14, %rdi
xorl %esi, %esi
movq %rcx, %rdx
movq %r15, %r9
pushq 0x374b9(%rip) # 0x4f1d8
pushq %r15
callq 0x1396c
addq $0x30, %rsp
testl %eax, %eax
jne 0x17d5c
subq $0x20, %rsp
leaq 0x216f3(%rip), %rcx # 0x3942c
movq %r14, %rdi
movl $0x1, %esi
movq %rcx, %rdx
movq %r15, %r9
pushq 0x3748b(%rip) # 0x4f1d8
pushq %r15
callq 0x1396c
addq $0x30, %rsp
testl %eax, %eax
je 0x17dce
movq %r14, %rdi
callq 0x19b8e
leaq 0x20f7e(%rip), %rsi # 0x38ce9
movq %rbx, %rdi
callq 0x1dee1
movl $0x1, %r14d
testl %eax, %eax
je 0x17c7e
leaq 0x20f61(%rip), %rsi # 0x38ce9
movq %rbx, %rdi
callq 0x1dee1
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1ff5a
movq %rax, %r12
movq %rbx, %rdi
callq 0x1ff45
leaq 0x203a0(%rip), %rdi # 0x3814d
leaq 0x209c4(%rip), %r8 # 0x38778
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
movl $0x366, %r9d # imm = 0x366
xorl %eax, %eax
callq 0x187d7
jmp 0x17c7e
movq %r14, %rdi
callq 0x19b8e
leaq 0x20f0c(%rip), %rsi # 0x38ce9
movq %rbx, %rdi
callq 0x1dee1
testl %eax, %eax
je 0x17e2f
leaq 0x20ef9(%rip), %rsi # 0x38ce9
movq %rbx, %rdi
callq 0x1dee1
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1ff5a
movq %rax, %r15
movq %rbx, %rdi
callq 0x1ff45
leaq 0x20338(%rip), %rdi # 0x3814d
leaq 0x2095c(%rip), %r8 # 0x38778
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x361, %r9d # imm = 0x361
jmp 0x17c71
xorl %r14d, %r14d
jmp 0x17c7e
| test_list_fields:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
lea rsi, aDropTableIfExi_2; "drop table if exists t1"
call mysql_query
test eax, eax
jz short loc_17C2C
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 349h
jmp short loc_17C71
loc_17C2C:
lea rsi, aCreateTableT1C; "create table t1(c1 int primary key auto"...
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_17C8A
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 34Ch
loc_17C71:
xor eax, eax
call diag
loc_17C78:
mov r14d, 1
loc_17C7E:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_17C8A:
lea r15, aDropTableT1_0+0Bh; "t1"
mov rdi, rbx
mov rsi, r15
xor edx, edx
call mysql_list_fields
test rax, rax
jz short loc_17CDD
mov r14, rax
mov r12d, 1
loc_17CAC:
mov rdi, r14
call mysql_fetch_row
dec r12d
test rax, rax
jnz short loc_17CAC
test r12d, r12d
jz short loc_17D03
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRowcount0; "rowcount != 0"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 354h
jmp short loc_17CF7
loc_17CDD:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 34Fh
loc_17CF7:
xor eax, eax
call diag
jmp loc_17C78
loc_17D03:
sub rsp, 20h
lea rcx, aC1; "c1"
mov rdi, r14
xor esi, esi
mov rdx, rcx
mov r9, r15
push cs:schema
push r15
call do_verify_prepare_field
add rsp, 30h
test eax, eax
jnz short loc_17D5C
sub rsp, 20h
lea rcx, aC2; "c2"
mov rdi, r14
mov esi, 1
mov rdx, rcx
mov r9, r15
push cs:schema
push r15
call do_verify_prepare_field
add rsp, 30h
test eax, eax
jz short loc_17DCE
loc_17D5C:
mov rdi, r14
call mysql_free_result
lea rsi, aDropTableT1; "drop table t1"
mov rdi, rbx
call mysql_query
mov r14d, 1
test eax, eax
jz loc_17C7E
lea rsi, aDropTableT1; "drop table t1"
mov rdi, rbx
call mysql_query
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r12, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r12
mov ecx, eax
mov r9d, 366h
xor eax, eax
call diag
jmp loc_17C7E
loc_17DCE:
mov rdi, r14
call mysql_free_result
lea rsi, aDropTableT1; "drop table t1"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_17E2F
lea rsi, aDropTableT1; "drop table t1"
mov rdi, rbx
call mysql_query
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 361h
jmp loc_17C71
loc_17E2F:
xor r14d, r14d
jmp loc_17C7E
| long long test_list_fields(long long a1)
{
int v1; // eax
int v2; // r14d
int v3; // r15d
int v4; // eax
const char *v5; // rdi
const char *v6; // r8
const char *v7; // rsi
const char *v8; // rdx
int v9; // ecx
int v10; // r9d
int v11; // eax
int v12; // r14d
int v13; // r15d
int v14; // eax
unsigned int v15; // r14d
long long v17; // rax
long long v18; // r14
int v19; // r12d
long long v20; // r8
int v21; // r15d
int v22; // r12d
int v23; // eax
int v24; // r14d
int v25; // r15d
int v26; // eax
v1 = mysql_query(a1, "drop table if exists t1");
if ( v1 )
{
v2 = v1;
v3 = mysql_error(a1);
v4 = mysql_errno(a1);
v5 = "Error (%d): %s (%d) in %s line %d";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c";
LODWORD(v7) = v2;
LODWORD(v8) = v3;
v9 = v4;
v10 = 841;
LABEL_5:
diag((_DWORD)v5, (_DWORD)v7, (_DWORD)v8, v9, (_DWORD)v6, v10);
return 1;
}
v11 = mysql_query(a1, "create table t1(c1 int primary key auto_increment, c2 char(10) default 'mysql')");
if ( v11 )
{
v12 = v11;
v13 = mysql_error(a1);
v14 = mysql_errno(a1);
v5 = "Error (%d): %s (%d) in %s line %d";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c";
LODWORD(v7) = v12;
LODWORD(v8) = v13;
v9 = v14;
v10 = 844;
goto LABEL_5;
}
v17 = mysql_list_fields(a1, "t1", 0LL);
if ( !v17 )
{
v5 = "Error: %s (%s: %d)";
v7 = "Invalid result set";
v8 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c";
v9 = 847;
goto LABEL_5;
}
v18 = v17;
v19 = 1;
do
--v19;
while ( mysql_fetch_row(v18) );
if ( v19 )
{
v5 = "Error: %s (%s: %d)";
v7 = "rowcount != 0";
v8 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c";
v9 = 852;
goto LABEL_5;
}
if ( !(unsigned int)do_verify_prepare_field(
v18,
0LL,
(long long)"c1",
(long long)"c1",
(long long)v6,
(long long)"t1",
(long long)"t1",
schema)
&& !(unsigned int)do_verify_prepare_field(
v18,
1LL,
(long long)"c2",
(long long)"c2",
v20,
(long long)"t1",
(long long)"t1",
schema) )
{
mysql_free_result(v18);
if ( !(unsigned int)mysql_query(a1, "drop table t1") )
return 0;
v24 = mysql_query(a1, "drop table t1");
v25 = mysql_error(a1);
v26 = mysql_errno(a1);
v5 = "Error (%d): %s (%d) in %s line %d";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c";
LODWORD(v7) = v24;
LODWORD(v8) = v25;
v9 = v26;
v10 = 865;
goto LABEL_5;
}
mysql_free_result(v18);
v15 = 1;
if ( (unsigned int)mysql_query(a1, "drop table t1") )
{
v21 = mysql_query(a1, "drop table t1");
v22 = mysql_error(a1);
v23 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v21,
v22,
v23,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",
870);
}
return v15;
}
| test_list_fields:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x138c50]
CALL 0x0011dee1
TEST EAX,EAX
JZ 0x00117c2c
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011ff5a
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011ff45
LEA RDI,[0x13814d]
LEA R8,[0x138778]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x349
JMP 0x00117c71
LAB_00117c2c:
LEA RSI,[0x1393d9]
MOV RDI,RBX
CALL 0x0011dee1
TEST EAX,EAX
JZ 0x00117c8a
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011ff5a
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011ff45
LEA RDI,[0x13814d]
LEA R8,[0x138778]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x34c
LAB_00117c71:
XOR EAX,EAX
CALL 0x001187d7
LAB_00117c78:
MOV R14D,0x1
LAB_00117c7e:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00117c8a:
LEA R15,[0x138de4]
MOV RDI,RBX
MOV RSI,R15
XOR EDX,EDX
CALL 0x0011f287
TEST RAX,RAX
JZ 0x00117cdd
MOV R14,RAX
MOV R12D,0x1
LAB_00117cac:
MOV RDI,R14
CALL 0x0011efdc
DEC R12D
TEST RAX,RAX
JNZ 0x00117cac
TEST R12D,R12D
JZ 0x00117d03
LEA RDI,[0x138008]
LEA RSI,[0x13919b]
LEA RDX,[0x138778]
MOV ECX,0x354
JMP 0x00117cf7
LAB_00117cdd:
LEA RDI,[0x138008]
LEA RSI,[0x13816f]
LEA RDX,[0x138778]
MOV ECX,0x34f
LAB_00117cf7:
XOR EAX,EAX
CALL 0x001187d7
JMP 0x00117c78
LAB_00117d03:
SUB RSP,0x20
LEA RCX,[0x139429]
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RCX
MOV R9,R15
PUSH qword ptr [0x0014f1d8]
PUSH R15
CALL 0x0011396c
ADD RSP,0x30
TEST EAX,EAX
JNZ 0x00117d5c
SUB RSP,0x20
LEA RCX,[0x13942c]
MOV RDI,R14
MOV ESI,0x1
MOV RDX,RCX
MOV R9,R15
PUSH qword ptr [0x0014f1d8]
PUSH R15
CALL 0x0011396c
ADD RSP,0x30
TEST EAX,EAX
JZ 0x00117dce
LAB_00117d5c:
MOV RDI,R14
CALL 0x00119b8e
LEA RSI,[0x138ce9]
MOV RDI,RBX
CALL 0x0011dee1
MOV R14D,0x1
TEST EAX,EAX
JZ 0x00117c7e
LEA RSI,[0x138ce9]
MOV RDI,RBX
CALL 0x0011dee1
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011ff5a
MOV R12,RAX
MOV RDI,RBX
CALL 0x0011ff45
LEA RDI,[0x13814d]
LEA R8,[0x138778]
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
MOV R9D,0x366
XOR EAX,EAX
CALL 0x001187d7
JMP 0x00117c7e
LAB_00117dce:
MOV RDI,R14
CALL 0x00119b8e
LEA RSI,[0x138ce9]
MOV RDI,RBX
CALL 0x0011dee1
TEST EAX,EAX
JZ 0x00117e2f
LEA RSI,[0x138ce9]
MOV RDI,RBX
CALL 0x0011dee1
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011ff5a
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011ff45
LEA RDI,[0x13814d]
LEA R8,[0x138778]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x361
JMP 0x00117c71
LAB_00117e2f:
XOR R14D,R14D
JMP 0x00117c7e
|
int8 test_list_fields(int8 param_1)
{
int iVar1;
int4 uVar2;
int4 uVar3;
int8 uVar4;
long lVar5;
long lVar6;
char *pcVar7;
int8 uVar8;
iVar1 = mysql_query(param_1,"drop table if exists t1");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,
"create table t1(c1 int primary key auto_increment, c2 char(10) default \'mysql\')"
);
if (iVar1 == 0) {
lVar5 = mysql_list_fields(param_1,"t1",0);
if (lVar5 == 0) {
pcVar7 = "Invalid result set";
uVar4 = 0x34f;
}
else {
iVar1 = 1;
do {
lVar6 = mysql_fetch_row(lVar5);
iVar1 = iVar1 + -1;
} while (lVar6 != 0);
if (iVar1 == 0) {
iVar1 = do_verify_prepare_field(lVar5,0,&DAT_00139429);
if ((iVar1 != 0) || (iVar1 = do_verify_prepare_field(lVar5,1,&DAT_0013942c), iVar1 != 0))
{
mysql_free_result(lVar5);
iVar1 = mysql_query(param_1,"drop table t1");
if (iVar1 != 0) {
uVar2 = mysql_query(param_1,"drop table t1");
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",uVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c"
,0x366);
return 1;
}
return 1;
}
mysql_free_result(lVar5);
iVar1 = mysql_query(param_1,"drop table t1");
if (iVar1 == 0) {
return 0;
}
iVar1 = mysql_query(param_1,"drop table t1");
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar8 = 0x361;
goto LAB_00117c71;
}
pcVar7 = "rowcount != 0";
uVar4 = 0x354;
}
diag("Error: %s (%s: %d)",pcVar7,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",uVar4)
;
return 1;
}
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar8 = 0x34c;
}
else {
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar8 = 0x349;
}
LAB_00117c71:
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",uVar8);
return 1;
}
|
|
1,515 | queue_insert_safe | eloqsql/mysys/queues.c | int queue_insert_safe(QUEUE *queue, uchar *element)
{
if (queue->elements == queue->max_elements)
{
if (!queue->auto_extent)
return 2;
if (resize_queue(queue, queue->max_elements + queue->auto_extent))
return 1;
}
queue_insert(queue, element);
return 0;
} | O0 | c | queue_insert_safe:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0x8362a
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x83603
movl $0x2, -0x4(%rbp)
jmp 0x8363e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rax
addl 0x20(%rax), %esi
callq 0x833b0
cmpl $0x0, %eax
je 0x83628
movl $0x1, -0x4(%rbp)
jmp 0x8363e
jmp 0x8362a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x83490
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| queue_insert_safe:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+10h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+14h]
jnz short loc_8362A
mov rax, [rbp+var_10]
cmp dword ptr [rax+20h], 0
jnz short loc_83603
mov [rbp+var_4], 2
jmp short loc_8363E
loc_83603:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov esi, [rax+14h]
mov rax, [rbp+var_10]
add esi, [rax+20h]
call resize_queue
cmp eax, 0
jz short loc_83628
mov [rbp+var_4], 1
jmp short loc_8363E
loc_83628:
jmp short $+2
loc_8362A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call queue_insert
mov [rbp+var_4], 0
loc_8363E:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long queue_insert_safe(_DWORD *a1, long long a2)
{
if ( a1[4] != a1[5] )
goto LABEL_6;
if ( a1[8] )
{
if ( (unsigned int)resize_queue((long long)a1, a1[8] + a1[5]) )
return 1;
LABEL_6:
queue_insert((long long)a1, a2);
return 0;
}
return 2;
}
| queue_insert_safe:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x14]
JNZ 0x0018362a
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x20],0x0
JNZ 0x00183603
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0018363e
LAB_00183603:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
ADD ESI,dword ptr [RAX + 0x20]
CALL 0x001833b0
CMP EAX,0x0
JZ 0x00183628
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0018363e
LAB_00183628:
JMP 0x0018362a
LAB_0018362a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00183490
MOV dword ptr [RBP + -0x4],0x0
LAB_0018363e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 queue_insert_safe(long param_1,int8 param_2)
{
int iVar1;
if (*(int *)(param_1 + 0x10) == *(int *)(param_1 + 0x14)) {
if (*(int *)(param_1 + 0x20) == 0) {
return 2;
}
iVar1 = resize_queue(param_1,*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x20));
if (iVar1 != 0) {
return 1;
}
}
queue_insert(param_1,param_2);
return 0;
}
|
|
1,516 | ggml_opt_default_params | monkey531[P]llama/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O0 | cpp | ggml_opt_default_params:
movq %rdi, %rax
movq %rsi, -0x8(%rsp)
movq %rdx, -0x10(%rsp)
movq %rcx, -0x18(%rsp)
movq %r8, -0x20(%rsp)
movl %r9d, -0x24(%rsp)
movq -0x8(%rsp), %rcx
movq %rcx, (%rdi)
movq -0x10(%rsp), %rcx
movq %rcx, 0x8(%rdi)
movq -0x18(%rsp), %rcx
movq %rcx, 0x10(%rdi)
movq -0x20(%rsp), %rcx
movq %rcx, 0x18(%rdi)
movl -0x24(%rsp), %ecx
movl %ecx, 0x20(%rdi)
movl $0x2, 0x24(%rdi)
movl $0x1, 0x28(%rdi)
movq 0x75fe5(%rip), %rcx # 0xdafc0
movq %rcx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
retq
nopl (%rax,%rax)
| ggml_opt_default_params:
mov rax, rdi
mov [rsp+var_8], rsi
mov [rsp+var_10], rdx
mov [rsp+var_18], rcx
mov [rsp+var_20], r8
mov [rsp+var_24], r9d
mov rcx, [rsp+var_8]
mov [rdi], rcx
mov rcx, [rsp+var_10]
mov [rdi+8], rcx
mov rcx, [rsp+var_18]
mov [rdi+10h], rcx
mov rcx, [rsp+var_20]
mov [rdi+18h], rcx
mov ecx, [rsp+var_24]
mov [rdi+20h], ecx
mov dword ptr [rdi+24h], 2
mov dword ptr [rdi+28h], 1
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
mov qword ptr [rdi+38h], 0
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_DWORD *)(a1 + 36) = 2;
*(_DWORD *)(a1 + 40) = 1;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
MOV RAX,RDI
MOV qword ptr [RSP + -0x8],RSI
MOV qword ptr [RSP + -0x10],RDX
MOV qword ptr [RSP + -0x18],RCX
MOV qword ptr [RSP + -0x20],R8
MOV dword ptr [RSP + -0x24],R9D
MOV RCX,qword ptr [RSP + -0x8]
MOV qword ptr [RDI],RCX
MOV RCX,qword ptr [RSP + -0x10]
MOV qword ptr [RDI + 0x8],RCX
MOV RCX,qword ptr [RSP + -0x18]
MOV qword ptr [RDI + 0x10],RCX
MOV RCX,qword ptr [RSP + -0x20]
MOV qword ptr [RDI + 0x18],RCX
MOV ECX,dword ptr [RSP + -0x24]
MOV dword ptr [RDI + 0x20],ECX
MOV dword ptr [RDI + 0x24],0x2
MOV dword ptr [RDI + 0x28],0x1
MOV RCX,qword ptr [0x001dafc0]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],0x0
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int4 *)((long)param_1 + 0x24) = 2;
*(int4 *)(param_1 + 5) = 1;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_001dafc0;
param_1[7] = 0;
return param_1;
}
|
|
1,517 | ggml_opt_default_params | monkey531[P]llama/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O1 | cpp | ggml_opt_default_params:
movq %rdi, %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movl %r9d, 0x20(%rdi)
movabsq $0x100000002, %rcx # imm = 0x100000002
movq %rcx, 0x24(%rdi)
movq 0x40f18(%rip), %rcx # 0x69fb8
movq %rcx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
retq
| ggml_opt_default_params:
mov rax, rdi
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rcx
mov [rdi+18h], r8
mov [rdi+20h], r9d
mov rcx, 100000002h
mov [rdi+24h], rcx
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
mov qword ptr [rdi+38h], 0
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_QWORD *)(a1 + 36) = 0x100000002LL;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
MOV RAX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],R8
MOV dword ptr [RDI + 0x20],R9D
MOV RCX,0x100000002
MOV qword ptr [RDI + 0x24],RCX
MOV RCX,qword ptr [0x00169fb8]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],0x0
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int8 *)((long)param_1 + 0x24) = 0x100000002;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_00169fb8;
param_1[7] = 0;
return param_1;
}
|
|
1,518 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | monkey531[P]llama/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0x7c841
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x24470
movq %rax, %rbx
movq %r14, %rdi
callq 0x537d6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3d735(%rip), %rsi # 0xb9f98
leaq 0x10(%rsp), %rdi
callq 0x7c8c4
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x67d14
xorl %ebp, %ebp
leaq 0x85932(%rip), %rsi # 0x1021c0
leaq -0x2c4ff(%rip), %rdx # 0x50396
movq %rbx, %rdi
callq 0x24f50
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x25258
testb %bpl, %bpl
jne 0x7c8b4
jmp 0x7c8bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x246b0
movq %r14, %rdi
callq 0x24fe0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_7C841
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_7C841:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7C8B4
jmp short loc_7C8BC
mov r14, rax
loc_7C8B4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7C8BC:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
(long long)v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0017c841
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0017c841:
PUSH 0x20
POP RDI
CALL 0x00124470
MOV RBX,RAX
MOV RDI,R14
CALL 0x001537d6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0017c85c:
LEA RSI,[0x1b9f98]
LEA RDI,[RSP + 0x10]
CALL 0x0017c8c4
MOV BPL,0x1
LAB_0017c870:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00167d14
XOR EBP,EBP
LEA RSI,[0x2021c0]
LEA RDX,[0x150396]
MOV RDI,RBX
CALL 0x00124f50
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0017c85c to 0017c86c has its CatchHandler @ 0017c8b1 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 0017c870 to 0017c89c has its CatchHandler @ 0017c89d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
1,519 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | monkey531[P]llama/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0xa689d
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x71c06
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4f6c7(%rip), %rsi # 0xf5f88
leaq 0x10(%rsp), %rdi
callq 0xa6933
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8c216
xorl %ebp, %ebp
leaq 0x888c4(%rip), %rsi # 0x12f1b0
leaq -0x38a9b(%rip), %rdx # 0x6de58
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6919
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0xa6923
jmp 0xa692b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_A689D
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_A689D:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6919
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6919:
test bpl, bpl
jnz short loc_A6923
jmp short loc_A692B
mov r14, rax
loc_A6923:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A692B:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x001a689d
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001a689d:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00171c06
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001a68ba:
LEA RSI,[0x1f5f88]
LEA RDI,[RSP + 0x10]
CALL 0x001a6933
MOV BPL,0x1
LAB_001a68ce:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0018c216
XOR EBP,EBP
LEA RSI,[0x22f1b0]
LEA RDX,[0x16de58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001a68ba to 001a68ca has its CatchHandler @ 001a6920 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001a68ce to 001a68fa has its CatchHandler @ 001a68fb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
1,520 | main | ng-log[P]ng-log/src/striplog_unittest.cc | int main(int, char* argv[]) {
#if defined(_MSC_VER)
// Avoid presenting an interactive dialog that will cause the test to time
// out.
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif // defined(_MSC_VER)
std::signal(SIGABRT, handle_abort);
FLAGS_logtostderr = true;
InitializeLogging(argv[0]);
if (FLAGS_check_mode) {
printf("%s\n", DEBUG_MODE ? "dbg" : "opt");
return 0;
}
LOG(INFO) << "TESTMESSAGE INFO";
LOG(WARNING) << 2 << "something"
<< "TESTMESSAGE WARNING" << 1 << 'c' << A() << std::endl;
LOG(ERROR) << "TESTMESSAGE ERROR";
bool flag = true;
(flag ? LOG(INFO) : LOG(ERROR)) << "TESTMESSAGE COND";
LOG(FATAL) << "TESTMESSAGE FATAL";
} | O2 | cpp | main:
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rsi, %rbx
leaq 0x10b(%rip), %rsi # 0x8ad6
pushq $0x6
popq %rdi
callq 0x76c0
leaq 0x25010(%rip), %rax # 0x2d9ea
movb $0x1, (%rax)
movq (%rbx), %rdi
callq 0xc2e8
cmpb $0x1, 0x24ff5(%rip) # 0x2d9e1
jne 0x8a05
leaq 0x14620(%rip), %rdi # 0x1d015
callq 0x78f0
xorl %eax, %eax
addq $0x170, %rsp # imm = 0x170
popq %rbx
retq
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa0ea
movq %rbx, %rdi
callq 0xa214
leaq 0x8(%rsp), %rdi
callq 0x8c94
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa0ea
movq %rbx, %rdi
callq 0xa214
movq %rax, %rdi
callq 0x7290
leaq 0x8(%rsp), %rdi
callq 0x8c94
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa0ea
movq %rbx, %rdi
callq 0xa214
leaq 0x8(%rsp), %rdi
callq 0x8c94
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa0ea
movq %rbx, %rdi
callq 0xa214
leaq 0x8(%rsp), %rdi
callq 0x8c94
leaq 0x8(%rsp), %rbx
movl $0x168, %edx # imm = 0x168
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7310
movq %rbx, %rdi
callq 0x8c3c
movq %rbx, %rdi
callq 0xa214
jmp 0x8aaf
leaq 0x8(%rsp), %rdi
callq 0xa230
jmp 0x8ac1
jmp 0x8ac1
jmp 0x8ac1
jmp 0x8ac1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8c94
movq %rbx, %rdi
callq 0x7a00
| main:
push rbx
sub rsp, 170h
mov rbx, rsi
lea rsi, _ZN12_GLOBAL__N_112handle_abortEi; char *
push 6
pop rdi
call _signal
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
mov byte ptr [rax], 1
mov rdi, [rbx]; this
call _ZN5nglog17InitializeLoggingEPKc; nglog::InitializeLogging(char const*)
cmp cs:_ZN3fLB16FLAGS_check_modeE, 1; fLB::FLAGS_check_mode
jnz short loc_8A05
lea rdi, aDbg; "dbg"
call _puts
xor eax, eax
add rsp, 170h
pop rbx
retn
loc_8A05:
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov edx, 168h
mov rdi, rbx
xor esi, esi
call _memset
mov rdi, rbx; this
call _ZN5nglog15NullStreamFatalC1Ev; nglog::NullStreamFatal::NullStreamFatal(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
jmp short $+2
loc_8AAF:
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog15NullStreamFatalD1Ev; nglog::NullStreamFatal::~NullStreamFatal()
jmp short loc_8AC1
jmp short loc_8AC1
jmp short loc_8AC1
jmp short $+2
loc_8AC1:
mov rbx, rax
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
mov rdi, rbx
call __Unwind_Resume
| int main(int argc, const char **argv, const char **envp)
{
long long v4; // rax
_BYTE v5[368]; // [rsp+8h] [rbp-170h] BYREF
signal(6LL, `anonymous namespace'::handle_abort, envp);
fLB::FLAGS_logtostderr = 1;
nglog::InitializeLogging((nglog *)*argv, (const char *)`anonymous namespace'::handle_abort);
if ( fLB::FLAGS_check_mode != 1 )
{
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
v4 = nglog::NullStream::stream((nglog::NullStream *)v5);
std::endl<char,std::char_traits<char>>(v4);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
memset(v5, 0LL, 360LL);
nglog::NullStreamFatal::NullStreamFatal((nglog::NullStreamFatal *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStreamFatal::~NullStreamFatal((nglog::NullStreamFatal *)v5);
}
puts("dbg");
return 0;
}
| main:
PUSH RBX
SUB RSP,0x170
MOV RBX,RSI
LEA RSI,[0x108ad6]
PUSH 0x6
POP RDI
CALL 0x001076c0
LEA RAX,[0x12d9ea]
MOV byte ptr [RAX],0x1
MOV RDI,qword ptr [RBX]
CALL 0x0010c2e8
CMP byte ptr [0x0012d9e1],0x1
JNZ 0x00108a05
LEA RDI,[0x11d015]
CALL 0x001078f0
XOR EAX,EAX
ADD RSP,0x170
POP RBX
RET
LAB_00108a05:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010a0ea
LAB_00108a12:
MOV RDI,RBX
CALL 0x0010a214
LAB_00108a1a:
LEA RDI,[RSP + 0x8]
CALL 0x00108c94
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010a0ea
LAB_00108a31:
MOV RDI,RBX
CALL 0x0010a214
LAB_00108a39:
MOV RDI,RAX
CALL 0x00107290
LAB_00108a41:
LEA RDI,[RSP + 0x8]
CALL 0x00108c94
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010a0ea
LAB_00108a58:
MOV RDI,RBX
CALL 0x0010a214
LAB_00108a60:
LEA RDI,[RSP + 0x8]
CALL 0x00108c94
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010a0ea
LAB_00108a77:
MOV RDI,RBX
CALL 0x0010a214
LAB_00108a7f:
LEA RDI,[RSP + 0x8]
CALL 0x00108c94
LEA RBX,[RSP + 0x8]
MOV EDX,0x168
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00107310
MOV RDI,RBX
CALL 0x00108c3c
LAB_00108aa5:
MOV RDI,RBX
CALL 0x0010a214
LAB_00108aad:
JMP 0x00108aaf
LAB_00108aaf:
LEA RDI,[RSP + 0x8]
CALL 0x0010a230
LAB_00108ab9:
JMP 0x00108ac1
LAB_00108ac1:
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
CALL 0x00108c94
MOV RDI,RBX
CALL 0x00107a00
|
int8 main(int8 param_1,int8 *param_2)
{
ostream *poVar1;
int8 uVar2;
NullStream local_170 [360];
signal(6,(anonymous_namespace)::handle_abort);
fLB::FLAGS_logtostderr = 1;
nglog::InitializeLogging((char *)*param_2);
if (fLB::FLAGS_check_mode == '\x01') {
puts("dbg");
return 0;
}
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108a12 to 00108a19 has its CatchHandler @ 00108ac1 */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108a31 to 00108a38 has its CatchHandler @ 00108abf */
poVar1 = (ostream *)nglog::NullStream::stream(local_170);
/* try { // try from 00108a39 to 00108a40 has its CatchHandler @ 00108abd */
std::endl<char,std::char_traits<char>>(poVar1);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108a58 to 00108a5f has its CatchHandler @ 00108abb */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108a77 to 00108a7e has its CatchHandler @ 00108ab9 */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
memset((NullStreamFatal *)local_170,0,0x168);
nglog::NullStreamFatal::NullStreamFatal((NullStreamFatal *)local_170);
/* try { // try from 00108aa5 to 00108aac has its CatchHandler @ 00108aaf */
nglog::NullStream::stream(local_170);
/* catch() { ... } // from try @ 00108aa5 with catch @ 00108aaf */
uVar2 = nglog::NullStreamFatal::~NullStreamFatal((NullStreamFatal *)local_170);
/* catch() { ... } // from try @ 00108a77 with catch @ 00108ab9 */
/* catch() { ... } // from try @ 00108a12 with catch @ 00108ac1 */
nglog::NullStream::~NullStream(local_170);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
|
|
1,521 | main | ng-log[P]ng-log/src/striplog_unittest.cc | int main(int, char* argv[]) {
#if defined(_MSC_VER)
// Avoid presenting an interactive dialog that will cause the test to time
// out.
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif // defined(_MSC_VER)
std::signal(SIGABRT, handle_abort);
FLAGS_logtostderr = true;
InitializeLogging(argv[0]);
if (FLAGS_check_mode) {
printf("%s\n", DEBUG_MODE ? "dbg" : "opt");
return 0;
}
LOG(INFO) << "TESTMESSAGE INFO";
LOG(WARNING) << 2 << "something"
<< "TESTMESSAGE WARNING" << 1 << 'c' << A() << std::endl;
LOG(ERROR) << "TESTMESSAGE ERROR";
bool flag = true;
(flag ? LOG(INFO) : LOG(ERROR)) << "TESTMESSAGE COND";
LOG(FATAL) << "TESTMESSAGE FATAL";
} | O3 | cpp | main:
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rsi, %rbx
leaq 0x10d(%rip), %rsi # 0x8dc2
movl $0x6, %edi
callq 0x7650
leaq 0x26cc4(%rip), %rax # 0x2f98a
movb $0x1, (%rax)
movq (%rbx), %rdi
callq 0xdf0a
cmpb $0x1, 0x26ca9(%rip) # 0x2f981
jne 0x8cf1
leaq 0x19334(%rip), %rdi # 0x22015
callq 0x7860
xorl %eax, %eax
addq $0x170, %rsp # imm = 0x170
popq %rbx
retq
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaae2
movq %rbx, %rdi
callq 0xac62
leaq 0x8(%rsp), %rdi
callq 0x906c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaae2
movq %rbx, %rdi
callq 0xac62
movq %rax, %rdi
callq 0x7230
leaq 0x8(%rsp), %rdi
callq 0x906c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaae2
movq %rbx, %rdi
callq 0xac62
leaq 0x8(%rsp), %rdi
callq 0x906c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaae2
movq %rbx, %rdi
callq 0xac62
leaq 0x8(%rsp), %rdi
callq 0x906c
leaq 0x8(%rsp), %rbx
movl $0x168, %edx # imm = 0x168
movq %rbx, %rdi
xorl %esi, %esi
callq 0x72b0
movq %rbx, %rdi
callq 0x8fe0
movq %rbx, %rdi
callq 0xac62
jmp 0x8d9b
leaq 0x8(%rsp), %rdi
callq 0xac7e
jmp 0x8dad
jmp 0x8dad
jmp 0x8dad
jmp 0x8dad
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x906c
movq %rbx, %rdi
callq 0x7970
| main:
push rbx
sub rsp, 170h
mov rbx, rsi
lea rsi, _ZN12_GLOBAL__N_112handle_abortEi; char *
mov edi, 6
call _signal
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
mov byte ptr [rax], 1
mov rdi, [rbx]; this
call _ZN5nglog17InitializeLoggingEPKc; nglog::InitializeLogging(char const*)
cmp cs:_ZN3fLB16FLAGS_check_modeE, 1; fLB::FLAGS_check_mode
jnz short loc_8CF1
lea rdi, aDbg; "dbg"
call _puts
xor eax, eax
add rsp, 170h
pop rbx
retn
loc_8CF1:
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov rdi, rbx; this
call _ZN5nglog10NullStreamC1Ev; nglog::NullStream::NullStream(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
lea rbx, [rsp+178h+var_170]
mov edx, 168h
mov rdi, rbx
xor esi, esi
call _memset
mov rdi, rbx; this
call _ZN5nglog15NullStreamFatalC1Ev; nglog::NullStreamFatal::NullStreamFatal(void)
mov rdi, rbx; this
call _ZN5nglog10NullStream6streamEv; nglog::NullStream::stream(void)
jmp short $+2
loc_8D9B:
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog15NullStreamFatalD1Ev; nglog::NullStreamFatal::~NullStreamFatal()
jmp short loc_8DAD
jmp short loc_8DAD
jmp short loc_8DAD
jmp short $+2
loc_8DAD:
mov rbx, rax
lea rdi, [rsp+178h+var_170]; this
call _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
mov rdi, rbx
call __Unwind_Resume
| int main(int argc, const char **argv, const char **envp)
{
long long v4; // rax
_BYTE v5[368]; // [rsp+8h] [rbp-170h] BYREF
signal(6LL, `anonymous namespace'::handle_abort, envp);
fLB::FLAGS_logtostderr = 1;
nglog::InitializeLogging((nglog *)*argv, (const char *)`anonymous namespace'::handle_abort);
if ( fLB::FLAGS_check_mode != 1 )
{
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
v4 = nglog::NullStream::stream((nglog::NullStream *)v5);
std::endl<char,std::char_traits<char>>(v4);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
nglog::NullStream::NullStream((nglog::NullStream *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStream::~NullStream((nglog::NullStream *)v5);
memset(v5, 0LL, 360LL);
nglog::NullStreamFatal::NullStreamFatal((nglog::NullStreamFatal *)v5);
nglog::NullStream::stream((nglog::NullStream *)v5);
nglog::NullStreamFatal::~NullStreamFatal((nglog::NullStreamFatal *)v5);
}
puts("dbg");
return 0;
}
| main:
PUSH RBX
SUB RSP,0x170
MOV RBX,RSI
LEA RSI,[0x108dc2]
MOV EDI,0x6
CALL 0x00107650
LEA RAX,[0x12f98a]
MOV byte ptr [RAX],0x1
MOV RDI,qword ptr [RBX]
CALL 0x0010df0a
CMP byte ptr [0x0012f981],0x1
JNZ 0x00108cf1
LEA RDI,[0x122015]
CALL 0x00107860
XOR EAX,EAX
ADD RSP,0x170
POP RBX
RET
LAB_00108cf1:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010aae2
LAB_00108cfe:
MOV RDI,RBX
CALL 0x0010ac62
LAB_00108d06:
LEA RDI,[RSP + 0x8]
CALL 0x0010906c
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010aae2
LAB_00108d1d:
MOV RDI,RBX
CALL 0x0010ac62
LAB_00108d25:
MOV RDI,RAX
CALL 0x00107230
LAB_00108d2d:
LEA RDI,[RSP + 0x8]
CALL 0x0010906c
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010aae2
LAB_00108d44:
MOV RDI,RBX
CALL 0x0010ac62
LAB_00108d4c:
LEA RDI,[RSP + 0x8]
CALL 0x0010906c
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010aae2
LAB_00108d63:
MOV RDI,RBX
CALL 0x0010ac62
LAB_00108d6b:
LEA RDI,[RSP + 0x8]
CALL 0x0010906c
LEA RBX,[RSP + 0x8]
MOV EDX,0x168
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001072b0
MOV RDI,RBX
CALL 0x00108fe0
LAB_00108d91:
MOV RDI,RBX
CALL 0x0010ac62
LAB_00108d99:
JMP 0x00108d9b
LAB_00108d9b:
LEA RDI,[RSP + 0x8]
CALL 0x0010ac7e
LAB_00108da5:
JMP 0x00108dad
LAB_00108dad:
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
CALL 0x0010906c
MOV RDI,RBX
CALL 0x00107970
|
int8 main(int8 param_1,int8 *param_2)
{
ostream *poVar1;
int8 uVar2;
NullStream local_170 [360];
signal(6,(anonymous_namespace)::handle_abort);
fLB::FLAGS_logtostderr = 1;
nglog::InitializeLogging((char *)*param_2);
if (fLB::FLAGS_check_mode == '\x01') {
puts("dbg");
return 0;
}
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108cfe to 00108d05 has its CatchHandler @ 00108dad */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108d1d to 00108d24 has its CatchHandler @ 00108dab */
poVar1 = (ostream *)nglog::NullStream::stream(local_170);
/* try { // try from 00108d25 to 00108d2c has its CatchHandler @ 00108da9 */
std::endl<char,std::char_traits<char>>(poVar1);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108d44 to 00108d4b has its CatchHandler @ 00108da7 */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
nglog::NullStream::NullStream(local_170);
/* try { // try from 00108d63 to 00108d6a has its CatchHandler @ 00108da5 */
nglog::NullStream::stream(local_170);
nglog::NullStream::~NullStream(local_170);
memset((NullStreamFatal *)local_170,0,0x168);
nglog::NullStreamFatal::NullStreamFatal((NullStreamFatal *)local_170);
/* try { // try from 00108d91 to 00108d98 has its CatchHandler @ 00108d9b */
nglog::NullStream::stream(local_170);
/* catch() { ... } // from try @ 00108d91 with catch @ 00108d9b */
uVar2 = nglog::NullStreamFatal::~NullStreamFatal((NullStreamFatal *)local_170);
/* catch() { ... } // from try @ 00108d63 with catch @ 00108da5 */
/* catch() { ... } // from try @ 00108cfe with catch @ 00108dad */
nglog::NullStream::~NullStream(local_170);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
|
|
1,522 | testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | AssertionResult CmpHelperSTRCASEEQ(const char* lhs_expression,
const char* rhs_expression, const char* lhs,
const char* rhs) {
if (String::CaseInsensitiveCStringEquals(lhs, rhs)) {
return AssertionSuccess();
}
return EqFailure(lhs_expression, rhs_expression, PrintToString(lhs),
PrintToString(rhs), true);
} | O0 | cpp | testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*):
subq $0x98, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x259c0
testb $0x1, %al
jne 0x258eb
jmp 0x258fa
movq 0x10(%rsp), %rdi
callq 0x13220
jmp 0x259a2
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x49f20
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x49f20
jmp 0x25933
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rcx
leaq 0x30(%rsp), %r8
movl $0x1, %r9d
callq 0x249c0
jmp 0x25958
leaq 0x30(%rsp), %rdi
callq 0xec60
leaq 0x50(%rsp), %rdi
callq 0xec60
jmp 0x259a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x25996
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xec60
leaq 0x50(%rsp), %rdi
callq 0xec60
jmp 0x259af
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0xb910
nopl (%rax)
| _ZN7testing8internal18CmpHelperSTRCASEEQEPKcS2_S2_S2_:
sub rsp, 98h
mov [rsp+98h+var_88], rdi
mov rax, rdi
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_20], rcx
mov [rsp+98h+var_28], r8
mov rdi, [rsp+98h+var_20]; this
mov rsi, [rsp+98h+var_28]; char *
call _ZN7testing8internal6String28CaseInsensitiveCStringEqualsEPKcS3_; testing::internal::String::CaseInsensitiveCStringEquals(char const*,char const*)
test al, 1
jnz short loc_258EB
jmp short loc_258FA
loc_258EB:
mov rdi, [rsp+98h+var_88]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_259A2
loc_258FA:
mov rax, [rsp+98h+var_10]
mov [rsp+98h+var_98], rax
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_90], rax
lea rdi, [rsp+98h+var_48]
lea rsi, [rsp+98h+var_20]
call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&)
lea rdi, [rsp+98h+var_68]
lea rsi, [rsp+98h+var_28]
call _ZN7testing13PrintToStringIPKcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<char const*>(char const* const&)
jmp short $+2
loc_25933:
mov rdx, [rsp+98h+var_90]
mov rsi, [rsp+98h+var_98]
mov rdi, [rsp+98h+var_88]
lea rcx, [rsp+98h+var_48]
lea r8, [rsp+98h+var_68]
mov r9d, 1
call _ZN7testing8internal9EqFailureEPKcS2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_b; testing::internal::EqFailure(char const*,char const*,std::string const&,std::string const&,bool)
jmp short $+2
loc_25958:
lea rdi, [rsp+98h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_259A2
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_25996
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_25996:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_259AF
loc_259A2:
mov rax, [rsp+98h+var_80]
add rsp, 98h
retn
loc_259AF:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| testing::internal * testing::internal::CmpHelperSTRCASEEQ(
testing::internal *this,
const char *a2,
const char *a3,
testing::internal::String *a4,
char *a5)
{
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v15; // [rsp+0h] [rbp-98h]
long long v16; // [rsp+0h] [rbp-98h]
int v17; // [rsp+8h] [rbp-90h]
const char *v18; // [rsp+8h] [rbp-90h]
int v19; // [rsp+10h] [rbp-88h]
testing::AssertionResult *v20; // [rsp+10h] [rbp-88h]
testing::internal *v21; // [rsp+18h] [rbp-80h]
int v22; // [rsp+18h] [rbp-80h]
_BYTE v23[32]; // [rsp+30h] [rbp-68h] BYREF
_BYTE v24[32]; // [rsp+50h] [rbp-48h] BYREF
char *v25; // [rsp+70h] [rbp-28h] BYREF
testing::internal::String *v26; // [rsp+78h] [rbp-20h] BYREF
const char *v27; // [rsp+80h] [rbp-18h]
const char *v28; // [rsp+88h] [rbp-10h]
testing::internal *v29; // [rsp+90h] [rbp-8h]
v21 = this;
v29 = this;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5;
if ( (testing::internal::String::CaseInsensitiveCStringEquals(a4, a5, a3) & 1) != 0 )
{
testing::AssertionSuccess(this, (long long)a5, v6, v7, v8, v9);
}
else
{
testing::PrintToString<char const*>(
(unsigned int)v24,
(unsigned int)&v26,
v6,
v7,
v8,
v9,
(_DWORD)v28,
(_DWORD)v27,
(_DWORD)this,
(_DWORD)this);
testing::PrintToString<char const*>((unsigned int)v23, (unsigned int)&v25, v10, v11, v12, v13, v15, v17, v19, v22);
testing::internal::EqFailure(v20, v16, v18, (long long)v24, (long long)v23, 1);
std::string::~string(v23);
std::string::~string(v24);
}
return v21;
}
| CmpHelperSTRCASEEQ:
SUB RSP,0x98
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],R8
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x001259c0
TEST AL,0x1
JNZ 0x001258eb
JMP 0x001258fa
LAB_001258eb:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00113220
JMP 0x001259a2
LAB_001258fa:
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x78]
CALL 0x00149f20
LAB_00125922:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x70]
CALL 0x00149f20
JMP 0x00125933
LAB_00125933:
MOV RDX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x10]
LEA RCX,[RSP + 0x50]
LEA R8,[RSP + 0x30]
MOV R9D,0x1
CALL 0x001249c0
LAB_00125956:
JMP 0x00125958
LAB_00125958:
LEA RDI,[RSP + 0x30]
CALL 0x0010ec60
LEA RDI,[RSP + 0x50]
CALL 0x0010ec60
JMP 0x001259a2
LAB_001259a2:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x98
RET
|
/* testing::internal::CmpHelperSTRCASEEQ(char const*, char const*, char const*, char const*) */
internal * __thiscall
testing::internal::CmpHelperSTRCASEEQ
(internal *this,char *param_1,char *param_2,char *param_3,char *param_4)
{
char *pcVar1;
char *pcVar2;
ulong uVar3;
testing local_68 [32];
testing local_48 [32];
char *local_28;
char *local_20;
char *local_18;
char *local_10;
internal *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar3 = String::CaseInsensitiveCStringEquals(param_3,param_4);
pcVar2 = local_10;
pcVar1 = local_18;
if ((uVar3 & 1) == 0) {
PrintToString<char_const*>(local_48,&local_20);
/* try { // try from 00125922 to 00125930 has its CatchHandler @ 0012596e */
PrintToString<char_const*>(local_68,&local_28);
/* try { // try from 00125933 to 00125955 has its CatchHandler @ 0012597e */
EqFailure(this,pcVar2,pcVar1,(string *)local_48,(string *)local_68,true);
std::__cxx11::string::~string((string *)local_68);
std::__cxx11::string::~string((string *)local_48);
}
else {
AssertionSuccess((testing *)this);
}
return this;
}
|
|
1,523 | google::protobuf::TextFormat::Printer::PrintFieldValueToString(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.cc | void TextFormat::Printer::PrintFieldValueToString(const Message& message,
const FieldDescriptor* field,
int index,
std::string* output) const {
GOOGLE_DCHECK(output) << "output specified is nullptr";
output->clear();
io::StringOutputStream output_stream(output);
TextGenerator generator(&output_stream, initial_indent_level_);
PrintFieldValue(message, message.GetReflection(), field, index, &generator);
} | O0 | cpp | google::protobuf::TextFormat::Printer::PrintFieldValueToString(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) const:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movl %ecx, 0xcc(%rsp)
movq %r8, 0xc0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x34dc96
jmp 0x34dd66
movq 0xc0(%rsp), %rax
movb $0x0, 0x87(%rsp)
cmpq $0x0, %rax
je 0x34dcae
jmp 0x34dd1c
leaq 0xba6fb(%rip), %rdx # 0x4083b0
leaq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x3, %esi
movl $0x8b9, %ecx # imm = 0x8B9
callq 0x219560
movq 0x20(%rsp), %rdi
movb $0x1, 0x87(%rsp)
leaq 0xba7eb(%rip), %rsi # 0x4084d0
callq 0x218e20
movq %rax, 0x28(%rsp)
jmp 0x34dcf1
movq 0x28(%rsp), %rdi
leaq 0xba7ea(%rip), %rsi # 0x4084e7
callq 0x218e20
movq %rax, 0x18(%rsp)
jmp 0x34dd09
movq 0x18(%rsp), %rsi
leaq 0x73(%rsp), %rdi
callq 0x218fd0
jmp 0x34dd1a
jmp 0x34dd1c
testb $0x1, 0x87(%rsp)
jne 0x34dd28
jmp 0x34dd35
leaq 0x88(%rsp), %rdi
callq 0x2195a0
jmp 0x34dc8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
testb $0x1, 0x87(%rsp)
jne 0x34dd54
jmp 0x34dd61
leaq 0x88(%rsp), %rdi
callq 0x2195a0
jmp 0x34de32
movq 0xc0(%rsp), %rdi
callq 0x21600
movq 0xc0(%rsp), %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1f08f0
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rsi
movl (%rax), %edx
leaq 0x38(%rsp), %rdi
callq 0x352ba0
jmp 0x34dda2
movq 0xd8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5d1f0
movq %rax, 0x8(%rsp)
jmp 0x34ddba
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x30(%rsp), %rdi
movq 0xd0(%rsp), %rcx
movl 0xcc(%rsp), %r8d
leaq 0x38(%rsp), %r9
callq 0x34de40
jmp 0x34dde4
leaq 0x38(%rsp), %rdi
callq 0x352b40
leaq 0x60(%rsp), %rdi
callq 0x1f2470
addq $0xe8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x34de28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x352b40
leaq 0x60(%rsp), %rdi
callq 0x1f2470
movq 0x78(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZNK6google8protobuf10TextFormat7Printer23PrintFieldValueToStringERKNS0_7MessageEPKNS0_15FieldDescriptorEiPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0E8h
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_1C], ecx
mov [rsp+0E8h+var_28], r8
mov rax, [rsp+0E8h+var_8]
mov [rsp+0E8h+var_B8], rax
loc_34DC8B:
xor eax, eax
test al, 1
jnz short loc_34DC96
jmp loc_34DD66
loc_34DC96:
mov rax, [rsp+0E8h+var_28]
mov [rsp+0E8h+var_61], 0
cmp rax, 0
jz short loc_34DCAE
jmp short loc_34DD1C
loc_34DCAE:
lea rdx, aWorkspaceLlm4b_101; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_C8], rdi
mov esi, 3
mov ecx, 8B9h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_61], 1
lea rsi, aCheckFailedOut_5; "CHECK failed: output: "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0E8h+var_C0], rax
jmp short $+2
loc_34DCF1:
mov rdi, [rsp+0E8h+var_C0]
lea rsi, aOutputSpecifie; "output specified is nullptr"
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0E8h+var_D0], rax
jmp short $+2
loc_34DD09:
mov rsi, [rsp+0E8h+var_D0]
lea rdi, [rsp+0E8h+var_75]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_34DD1A:
jmp short $+2
loc_34DD1C:
test [rsp+0E8h+var_61], 1
jnz short loc_34DD28
jmp short loc_34DD35
loc_34DD28:
lea rdi, [rsp+0E8h+var_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_34DD35:
jmp loc_34DC8B
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
test [rsp+arg_7F], 1
jnz short loc_34DD54
jmp short loc_34DD61
loc_34DD54:
lea rdi, [rsp+arg_80]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_34DD61:
jmp loc_34DE32
loc_34DD66:
mov rdi, [rsp+0E8h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv; std::string::clear(void)
mov rsi, [rsp+0E8h+var_28]
lea rdi, [rsp+0E8h+var_88]
mov [rsp+0E8h+var_D8], rdi
call _ZN6google8protobuf2io18StringOutputStreamC2EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::io::StringOutputStream::StringOutputStream(std::string *)
mov rax, [rsp+0E8h+var_B8]
mov rsi, [rsp+0E8h+var_D8]; google::protobuf::io::ZeroCopyOutputStream *
mov edx, [rax]; int
lea rdi, [rsp+0E8h+var_B0]; this
call _ZN6google8protobuf10TextFormat7Printer13TextGeneratorC2EPNS0_2io20ZeroCopyOutputStreamEi; google::protobuf::TextFormat::Printer::TextGenerator::TextGenerator(google::protobuf::io::ZeroCopyOutputStream *,int)
jmp short $+2
loc_34DDA2:
mov rdi, [rsp+0E8h+var_10]; this
mov [rsp+0E8h+var_E8], rdi
call _ZNK6google8protobuf7Message13GetReflectionEv; google::protobuf::Message::GetReflection(void)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_34DDBA:
mov rdx, [rsp+0E8h+var_E0]; google::protobuf::Reflection *
mov rsi, [rsp+0E8h+var_E8]; google::protobuf::Message *
mov rdi, [rsp+0E8h+var_B8]; this
mov rcx, [rsp+0E8h+var_18]; google::protobuf::FieldDescriptor *
mov r8d, [rsp+0E8h+var_1C]; int
lea r9, [rsp+0E8h+var_B0]; google::protobuf::TextFormat::Printer::TextGenerator *
call _ZNK6google8protobuf10TextFormat7Printer15PrintFieldValueERKNS0_7MessageEPKNS0_10ReflectionEPKNS0_15FieldDescriptorEiPNS2_13TextGeneratorE; google::protobuf::TextFormat::Printer::PrintFieldValue(google::protobuf::Message const&,google::protobuf::Reflection const*,google::protobuf::FieldDescriptor const*,int,google::protobuf::TextFormat::Printer::TextGenerator *)
jmp short $+2
loc_34DDE4:
lea rdi, [rsp+0E8h+var_B0]; this
call _ZN6google8protobuf10TextFormat7Printer13TextGeneratorD2Ev; google::protobuf::TextFormat::Printer::TextGenerator::~TextGenerator()
lea rdi, [rsp+0E8h+var_88]; this
call _ZN6google8protobuf2io18StringOutputStreamD2Ev; google::protobuf::io::StringOutputStream::~StringOutputStream()
add rsp, 0E8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_34DE28
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_30]; this
call _ZN6google8protobuf10TextFormat7Printer13TextGeneratorD2Ev; google::protobuf::TextFormat::Printer::TextGenerator::~TextGenerator()
loc_34DE28:
lea rdi, [rsp+arg_58]; this
call _ZN6google8protobuf2io18StringOutputStreamD2Ev; google::protobuf::io::StringOutputStream::~StringOutputStream()
loc_34DE32:
mov rdi, [rsp+arg_70]
call __Unwind_Resume
| void google::protobuf::TextFormat::Printer::PrintFieldValueToString(
int *a1,
google::protobuf::Message *a2,
google::protobuf::FieldDescriptor *a3,
int a4,
long long a5)
{
const google::protobuf::Message *v5; // [rsp+0h] [rbp-E8h]
google::protobuf::Reflection *Reflection; // [rsp+8h] [rbp-E0h]
_BYTE v7[40]; // [rsp+38h] [rbp-B0h] BYREF
_BYTE v8[19]; // [rsp+60h] [rbp-88h] BYREF
long long v9; // [rsp+C0h] [rbp-28h]
int v10; // [rsp+CCh] [rbp-1Ch]
google::protobuf::FieldDescriptor *v11; // [rsp+D0h] [rbp-18h]
google::protobuf::Message *v12; // [rsp+D8h] [rbp-10h]
int *v13; // [rsp+E0h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
std::string::clear(a5);
google::protobuf::io::StringOutputStream::StringOutputStream((google::protobuf::io::ZeroCopyOutputStream *)v8, v9);
google::protobuf::TextFormat::Printer::TextGenerator::TextGenerator(
(google::protobuf::TextFormat::Printer::TextGenerator *)v7,
(google::protobuf::io::ZeroCopyOutputStream *)v8,
*a1);
v5 = v12;
Reflection = (google::protobuf::Reflection *)google::protobuf::Message::GetReflection(v12);
google::protobuf::TextFormat::Printer::PrintFieldValue(
(google::protobuf::TextFormat::Printer *)a1,
v5,
Reflection,
v11,
v10,
(google::protobuf::TextFormat::Printer::TextGenerator *)v7);
google::protobuf::TextFormat::Printer::TextGenerator::~TextGenerator((google::protobuf::TextFormat::Printer::TextGenerator *)v7);
google::protobuf::io::StringOutputStream::~StringOutputStream((google::protobuf::io::StringOutputStream *)v8);
}
| FindMessageTypeByName:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x10]
CALL 0x00128ad0
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
CALL 0x0038b9d0
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x20]
CALL 0x0038b480
ADD RSP,0x38
RET
|
/* google::protobuf::FileDescriptor::FindMessageTypeByName(std::__cxx11::string const&) const */
void __thiscall
google::protobuf::FileDescriptor::FindMessageTypeByName(FileDescriptor *this,string *param_1)
{
int8 uVar1;
int8 local_28;
int8 local_20;
int8 local_18;
string *local_10;
FileDescriptor *local_8;
uVar1 = *(int8 *)(this + 0x80);
local_10 = param_1;
local_8 = this;
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_28,param_1);
local_18 = FileDescriptorTables::FindNestedSymbol(uVar1,this,local_28,local_20);
Symbol::descriptor((Symbol *)&local_18);
return;
}
|
|
1,524 | stmt_unbuffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
} | O3 | c | stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x19e07
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x23410
leaq 0x3e0d(%rip), %rax # 0x2720f
movq %rax, 0x348(%rbx)
movl $0x1, %eax
jmp 0x23445
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rax
cmpb $-0x2, (%rax)
jne 0x23439
movq $0x0, (%r14)
leaq 0x3de4(%rip), %rax # 0x2720f
movq %rax, 0x348(%rbx)
movl $0x64, %eax
jmp 0x23445
movq %rax, (%r14)
incq 0xc8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+38h]
call ma_net_safe_read
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_23410
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 1
jmp short loc_23445
loc_23410:
mov rax, [rbx+38h]
mov rax, [rax+20h]
cmp byte ptr [rax], 0FEh
jnz short loc_23439
mov qword ptr [r14], 0
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 64h ; 'd'
jmp short loc_23445
loc_23439:
mov [r14], rax
inc qword ptr [rbx+0C8h]
xor eax, eax
loc_23445:
pop rbx
pop r14
pop rbp
retn
| long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5, int a6)
{
_BYTE *v7; // rax
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFF )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1LL;
}
else
{
v7 = *(_BYTE **)(a1[7] + 32);
if ( *v7 == 0xFE )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100LL;
}
else
{
*a2 = v7;
++a1[25];
return 0LL;
}
}
}
| stmt_unbuffered_fetch:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x00119e07
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x00123410
LEA RAX,[0x12720f]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x1
JMP 0x00123445
LAB_00123410:
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x00123439
MOV qword ptr [R14],0x0
LEA RAX,[0x12720f]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x64
JMP 0x00123445
LAB_00123439:
MOV qword ptr [R14],RAX
INC qword ptr [RBX + 0xc8]
XOR EAX,EAX
LAB_00123445:
POP RBX
POP R14
POP RBP
RET
|
int8 stmt_unbuffered_fetch(long param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
lVar2 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar2 == 0xffffffff) {
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 1;
}
else {
pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar1 == -2) {
*param_2 = 0;
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 100;
}
else {
*param_2 = pcVar1;
*(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1;
uVar3 = 0;
}
}
return uVar3;
}
|
|
1,525 | mi_init_bulk_insert | eloqsql/storage/myisam/mi_write.c | int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows)
{
MYISAM_SHARE *share=info->s;
MI_KEYDEF *key=share->keyinfo;
bulk_insert_param *params;
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_mi_init_bulk_insert");
DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
mi_clear_all_keys_active(key_map);
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) &&
mi_is_key_active(share->state.key_map, i))
{
num_keys++;
mi_set_key_active(key_map, i);
total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE;
}
}
if (num_keys==0 ||
num_keys * (size_t) MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
cache_size= (size_t) rows;
else
cache_size/=total_keylength*16;
info->bulk_insert=(TREE *)
my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++)
{
if (mi_is_key_active(key_map, i))
{
params->info=info;
params->keynr=i;
/* Only allocate a 16'th of the buffer at a time */
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2)keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
}
DBUG_RETURN(0);
} | O0 | c | mi_init_bulk_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x218(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc7710
jmp 0xc7712
jmp 0xc7714
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0xc77f7
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xc77e7
movq -0x28(%rbp), %rax
movl 0x184(%rax), %eax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0xc77e7
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0xc77a0
movb $0x1, %al
testb $0x1, %al
jne 0xc77a8
jmp 0xc77e7
xorl %eax, %eax
testb $0x1, %al
jne 0xc77a8
jmp 0xc77e7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
movl %eax, %ecx
addq $0x20, %rcx
movl -0x44(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0xc77e9
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc7731
cmpl $0x0, -0x40(%rbp)
je 0xc780a
movl -0x40(%rbp), %eax
shlq $0xe, %rax
cmpq -0x18(%rbp), %rax
jbe 0xc7818
jmp 0xc780c
movl $0x0, -0x4(%rbp)
jmp 0xc79e5
cmpq $0x0, -0x20(%rbp)
je 0xc783a
movq -0x20(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
cmpq -0x18(%rbp), %rax
jae 0xc783a
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc7851
movl -0x44(%rbp), %eax
shll $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
leaq 0xbb16ac(%rip), %rax # 0xc78f04
movl (%rax), %edi
movq -0x28(%rbp), %rax
movl 0x180(%rax), %eax
imulq $0x298, %rax, %rsi # imm = 0x298
movl -0x40(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf2e30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0xc78a8
jmp 0xc789c
movl $0x80, -0x4(%rbp)
jmp 0xc79e5
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x180(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0xc79dc
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0xc790b
movb $0x1, %al
testb $0x1, %al
jne 0xc7916
jmp 0xc79ad
xorl %eax, %eax
testb $0x1, %al
jne 0xc7916
jmp 0xc79ad
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0x3c(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rdx
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x38(%rbp)
xorl %ecx, %ecx
leaq 0x61(%rip), %r8 # 0xc79f0
leaq 0xba(%rip), %r9 # 0xc7a50
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xf98f0
jmp 0xc79cc
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0xc79ce
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc78d2
jmp 0xc79de
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| mi_init_bulk_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+218h]
mov [rbp+var_30], rax
jmp short $+2
loc_C7710:
jmp short $+2
loc_C7712:
jmp short $+2
loc_C7714:
mov [rbp+var_50], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov [rbp+var_3C], 0
loc_C7731:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_C77F7
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+0Ah]
and eax, 1
cmp eax, 0
jnz loc_C77E7
mov rax, [rbp+var_28]
mov eax, [rax+184h]
mov ecx, [rbp+var_3C]
add ecx, 1
cmp eax, ecx
jz short loc_C77E7
mov rax, [rbp+var_28]
mov rax, [rax+0C0h]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_C77A0
mov al, 1
test al, 1
jnz short loc_C77A8
jmp short loc_C77E7
loc_C77A0:
xor eax, eax
test al, 1
jnz short loc_C77A8
jmp short loc_C77E7
loc_C77A8:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, eax
mov eax, 1
shl rax, cl
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
mov ecx, eax
add rcx, 20h ; ' '
mov eax, [rbp+var_44]
add rax, rcx
mov [rbp+var_44], eax
loc_C77E7:
jmp short $+2
loc_C77E9:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_C7731
loc_C77F7:
cmp [rbp+var_40], 0
jz short loc_C780A
mov eax, [rbp+var_40]
shl rax, 0Eh
cmp rax, [rbp+var_18]
jbe short loc_C7818
loc_C780A:
jmp short $+2
loc_C780C:
mov [rbp+var_4], 0
jmp loc_C79E5
loc_C7818:
cmp [rbp+var_20], 0
jz short loc_C783A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_44]
imul rax, rcx
cmp rax, [rbp+var_18]
jnb short loc_C783A
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp short loc_C7851
loc_C783A:
mov eax, [rbp+var_44]
shl eax, 4
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_C7851:
lea rax, mi_key_memory_MI_INFO_bulk_insert
mov edi, [rax]
mov rax, [rbp+var_28]
mov eax, [rax+180h]
imul rsi, rax, 298h
mov eax, [rbp+var_40]
shl rax, 4
add rsi, rax
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+80h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+80h], 0
jnz short loc_C78A8
jmp short $+2
loc_C789C:
mov [rbp+var_4], 80h
jmp loc_C79E5
loc_C78A8:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+180h]
imul rcx, 298h
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_3C], 0
loc_C78D2:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_C79DC
mov rax, [rbp+var_50]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_C790B
mov al, 1
test al, 1
jnz short loc_C7916
jmp loc_C79AD
loc_C790B:
xor eax, eax
test al, 1
jnz short loc_C7916
jmp loc_C79AD
loc_C7916:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_38]
mov [rax], rcx
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
mov rax, [rbp+var_10]
mov rdi, [rax+80h]
mov eax, [rbp+var_3C]
imul rax, 298h
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rsi, rax
mov rdx, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rdx, rax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 10h
mov [rbp+var_38], rcx
xor ecx, ecx
lea r8, keys_compare_0
lea r9, keys_free_0
xor r10d, r10d
mov [rsp+60h+var_60], rax
mov [rsp+60h+var_58], 0
call init_tree
jmp short loc_C79CC
loc_C79AD:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_3C]
imul rcx, 298h
add rax, rcx
mov qword ptr [rax], 0
loc_C79CC:
jmp short $+2
loc_C79CE:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_C78D2
loc_C79DC:
jmp short $+2
loc_C79DE:
mov [rbp+var_4], 0
loc_C79E5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_init_bulk_insert(_QWORD *a1, unsigned long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-50h]
unsigned int v6; // [rsp+1Ch] [rbp-44h]
unsigned int v7; // [rsp+20h] [rbp-40h]
unsigned int i; // [rsp+24h] [rbp-3Ch]
unsigned int j; // [rsp+24h] [rbp-3Ch]
long long v10; // [rsp+28h] [rbp-38h]
long long v11; // [rsp+30h] [rbp-30h]
long long v12; // [rsp+38h] [rbp-28h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v12 = *a1;
v11 = *(_QWORD *)(*a1 + 536LL);
v5 = 0LL;
v7 = 0;
v6 = 0;
for ( i = 0; i < *(_DWORD *)(v12 + 384); ++i )
{
if ( (*(_WORD *)(112LL * i + v11 + 10) & 1) == 0
&& *(_DWORD *)(v12 + 388) != i + 1
&& ((1LL << i) & *(_QWORD *)(v12 + 192)) != 0 )
{
++v7;
v5 |= 1LL << i;
v6 += *(unsigned __int16 *)(112LL * i + v11 + 22) + 32;
}
}
if ( v7 && (unsigned long long)v7 << 14 <= a2 )
{
if ( a3 && (unsigned long long)v6 * a3 < a2 )
LODWORD(v13) = a3;
else
v13 = a2 / (16 * v6);
a1[16] = my_malloc(mi_key_memory_MI_INFO_bulk_insert, 16LL * v7 + 664LL * *(unsigned int *)(v12 + 384), 0LL);
if ( a1[16] )
{
v10 = 664LL * *(unsigned int *)(v12 + 384) + a1[16];
for ( j = 0; j < *(_DWORD *)(v12 + 384); ++j )
{
if ( ((1LL << j) & v5) != 0 )
{
*(_QWORD *)v10 = a1;
*(_DWORD *)(v10 + 8) = j;
v3 = v10;
v10 += 16LL;
init_tree(
664 * j + *((_DWORD *)a1 + 32),
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
0,
(unsigned int)keys_compare_0,
(unsigned int)keys_free_0,
v3,
0LL);
}
else
{
*(_QWORD *)(664LL * j + a1[16]) = 0LL;
}
}
return 0;
}
else
{
return 128;
}
}
else
{
return 0;
}
}
| mi_init_bulk_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x218]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c7710
LAB_001c7710:
JMP 0x001c7712
LAB_001c7712:
JMP 0x001c7714
LAB_001c7714:
MOV qword ptr [RBP + -0x50],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x3c],0x0
LAB_001c7731:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x001c77f7
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001c77e7
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x184]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x1
CMP EAX,ECX
JZ 0x001c77e7
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xc0]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x001c77a0
MOV AL,0x1
TEST AL,0x1
JNZ 0x001c77a8
JMP 0x001c77e7
LAB_001c77a0:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001c77a8
JMP 0x001c77e7
LAB_001c77a8:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
OR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
MOV ECX,EAX
ADD RCX,0x20
MOV EAX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_001c77e7:
JMP 0x001c77e9
LAB_001c77e9:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c7731
LAB_001c77f7:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001c780a
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0xe
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001c7818
LAB_001c780a:
JMP 0x001c780c
LAB_001c780c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c79e5
LAB_001c7818:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001c783a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001c783a
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001c7851
LAB_001c783a:
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001c7851:
LEA RAX,[0xd78f04]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x180]
IMUL RSI,RAX,0x298
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0x4
ADD RSI,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f2e30
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001c78a8
JMP 0x001c789c
LAB_001c789c:
MOV dword ptr [RBP + -0x4],0x80
JMP 0x001c79e5
LAB_001c78a8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x180]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x0
LAB_001c78d2:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x001c79dc
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x001c790b
MOV AL,0x1
TEST AL,0x1
JNZ 0x001c7916
JMP 0x001c79ad
LAB_001c790b:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001c7916
JMP 0x001c79ad
LAB_001c7916:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x80]
MOV EAX,dword ptr [RBP + -0x3c]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RDX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RBP + -0x38],RCX
XOR ECX,ECX
LEA R8,[0x1c79f0]
LEA R9,[0x1c7a50]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001f98f0
JMP 0x001c79cc
LAB_001c79ad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LAB_001c79cc:
JMP 0x001c79ce
LAB_001c79ce:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c78d2
LAB_001c79dc:
JMP 0x001c79de
LAB_001c79de:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c79e5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001c7906) */
/* WARNING: Removing unreachable block (ram,0x001c779e) */
int4 mi_init_bulk_insert(long *param_1,ulong param_2,ulong param_3)
{
long lVar1;
long lVar2;
long lVar3;
ulong local_58;
uint local_4c;
uint local_48;
uint local_44;
int8 *local_40;
ulong local_20;
int4 local_c;
lVar1 = *param_1;
lVar2 = *(long *)(lVar1 + 0x218);
local_58 = 0;
local_48 = 0;
local_4c = 0;
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((((*(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 10) & 1) == 0) &&
(*(int *)(lVar1 + 0x184) != local_44 + 1)) &&
((*(ulong *)(lVar1 + 0xc0) & 1L << ((byte)local_44 & 0x3f)) != 0)) {
local_48 = local_48 + 1;
local_58 = 1L << ((byte)local_44 & 0x3f) | local_58;
local_4c = local_4c + *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16) + 0x20;
}
}
if ((local_48 == 0) || (param_2 < (ulong)local_48 << 0xe)) {
local_c = 0;
}
else {
if ((param_3 == 0) || (local_20 = param_3, param_2 <= param_3 * local_4c)) {
local_20 = param_2 / (local_4c << 4);
}
lVar3 = my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(ulong)*(uint *)(lVar1 + 0x180) * 0x298 + (ulong)local_48 * 0x10,0);
param_1[0x10] = lVar3;
if (param_1[0x10] == 0) {
local_c = 0x80;
}
else {
local_40 = (int8 *)(param_1[0x10] + (ulong)*(uint *)(lVar1 + 0x180) * 0x298);
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((local_58 & 1L << ((byte)local_44 & 0x3f)) == 0) {
*(int8 *)(param_1[0x10] + (ulong)local_44 * 0x298) = 0;
}
else {
*local_40 = param_1;
*(uint *)(local_40 + 1) = local_44;
init_tree(param_1[0x10] + (ulong)local_44 * 0x298,
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),0,keys_compare,
keys_free,local_40,0);
local_40 = local_40 + 2;
}
}
local_c = 0;
}
}
return local_c;
}
|
|
1,526 | ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>::HasQuitted() | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/include/ftxui/component/receiver.hpp | bool HasQuitted() {
std::unique_lock<std::mutex> lock(mutex_);
return queue_.empty() && !senders_;
} | O2 | cpp | ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>::HasQuitted():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x29ad8
movq 0x58(%rbx), %rax
cmpq 0x38(%rbx), %rax
je 0x29003
xorl %ebx, %ebx
jmp 0x2900e
movl 0xa8(%rbx), %eax
testl %eax, %eax
sete %bl
movq %rsp, %rdi
callq 0x29aee
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
| _ZN5ftxui12ReceiverImplISt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEEE10HasQuittedEv:
push rbx
sub rsp, 10h
mov rbx, rdi
mov rdi, rsp
mov rsi, rbx
call _ZNSt11unique_lockISt5mutexEC2ERS0_; std::unique_lock<std::mutex>::unique_lock(std::mutex&)
mov rax, [rbx+58h]
cmp rax, [rbx+38h]
jz short loc_29003
xor ebx, ebx
jmp short loc_2900E
loc_29003:
mov eax, [rbx+0A8h]
test eax, eax
setz bl
loc_2900E:
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov eax, ebx
add rsp, 10h
pop rbx
retn
| long long ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::HasQuitted(
long long a1)
{
long long v1; // rbx
_BYTE v3[24]; // [rsp+0h] [rbp-18h] BYREF
v1 = a1;
std::unique_lock<std::mutex>::unique_lock(v3, a1);
if ( *(_QWORD *)(v1 + 88) == *(_QWORD *)(v1 + 56) )
LOBYTE(v1) = *(_DWORD *)(a1 + 168) == 0;
else
LODWORD(v1) = 0;
std::unique_lock<std::mutex>::~unique_lock(v3);
return (unsigned int)v1;
}
| HasQuitted:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RDI,RSP
MOV RSI,RBX
CALL 0x00129ad8
MOV RAX,qword ptr [RBX + 0x58]
CMP RAX,qword ptr [RBX + 0x38]
JZ 0x00129003
XOR EBX,EBX
JMP 0x0012900e
LAB_00129003:
MOV EAX,dword ptr [RBX + 0xa8]
TEST EAX,EAX
SETZ BL
LAB_0012900e:
MOV RDI,RSP
CALL 0x00129aee
MOV EAX,EBX
ADD RSP,0x10
POP RBX
RET
|
/* ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>
>::HasQuitted() */
ulong __thiscall
ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>::
HasQuitted(ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> *this
)
{
ulong uVar1;
unique_lock<std::mutex> auStack_18 [16];
std::unique_lock<std::mutex>::unique_lock(auStack_18,(mutex *)this);
if (*(long *)(this + 0x58) == *(long *)(this + 0x38)) {
uVar1 = CONCAT71((int7)((ulong)this >> 8),*(int *)(this + 0xa8) == 0);
}
else {
uVar1 = 0;
}
std::unique_lock<std::mutex>::~unique_lock(auStack_18);
return uVar1 & 0xffffffff;
}
|
|
1,527 | ma_ft_add | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_add(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_ma_ft_add");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist= _ma_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error= _ma_ft_store(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O0 | c | ma_ft_add:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0x79474
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x78d70
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x794b4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x793d0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x328, %rdi # imm = 0x328
movl $0x2, %esi
callq 0xf5540
jmp 0x794cb
jmp 0x794cd
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_ft_add:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], 0FFFFFFFFh
jmp short $+2
loc_79474:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_794B4
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_38]
mov r8, [rbp+var_28]
call _ma_ft_store
mov [rbp+var_2C], eax
loc_794B4:
mov rdi, [rbp+var_8]
add rdi, 328h
mov esi, 2
call free_root
jmp short $+2
loc_794CB:
jmp short $+2
loc_794CD:
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long ma_ft_add(_QWORD *a1, unsigned int a2, _BYTE *a3, long long a4, long long a5)
{
_QWORD *v6; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+14h] [rbp-2Ch]
v7 = -1;
v6 = (_QWORD *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101));
if ( v6 )
v7 = ma_ft_store((long long)a1, a2, a3, v6, a5);
free_root(a1 + 101, 2LL);
return v7;
}
| _ma_ft_add:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],0xffffffff
JMP 0x00179474
LAB_00179474:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x00178d70
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001794b4
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x001793d0
MOV dword ptr [RBP + -0x2c],EAX
LAB_001794b4:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x328
MOV ESI,0x2
CALL 0x001f5540
JMP 0x001794cb
LAB_001794cb:
JMP 0x001794cd
LAB_001794cd:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4
_ma_ft_add(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5)
{
long lVar1;
int4 local_34;
local_34 = 0xffffffff;
lVar1 = _ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x328);
if (lVar1 != 0) {
local_34 = _ma_ft_store(param_1,param_2,param_3,lVar1,param_5);
}
free_root(param_1 + 0x328,2);
return local_34;
}
|
|
1,528 | js_os_clearTimeout | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_clearTimeout(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSOSTimer *th;
int64_t timer_id;
if (JS_ToInt64(ctx, &timer_id, argv[0]))
return JS_EXCEPTION;
th = find_timer_by_id(ts, timer_id);
if (!th)
return JS_UNDEFINED;
free_timer(rt, th);
return JS_UNDEFINED;
} | O0 | c | js_os_clearTimeout:
subq $0x58, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x27f00
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x115d0
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %rsp, %rsi
callq 0x38bf0
cmpl $0x0, %eax
je 0x1954b
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x1959b
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movl %eax, %esi
callq 0x1ce60
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1957b
movl $0x0, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
jmp 0x1959b
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x116b0
movl $0x0, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x58, %rsp
retq
nopw (%rax,%rax)
| js_os_clearTimeout:
sub rsp, 58h
mov [rsp+58h+var_20], rsi
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_28], rdi
mov [rsp+58h+var_2C], ecx
mov [rsp+58h+var_38], r8
mov rdi, [rsp+58h+var_28]
call JS_GetRuntime
mov [rsp+58h+var_40], rax
mov rdi, [rsp+58h+var_40]
call js_get_thread_state
mov [rsp+58h+var_48], rax
mov rdi, [rsp+58h+var_28]
mov rax, [rsp+58h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
mov rsi, rsp
call JS_ToInt64
cmp eax, 0
jz short loc_1954B
mov dword ptr [rsp+58h+var_10], 0
mov [rsp+58h+var_8], 6
jmp short loc_1959B
loc_1954B:
mov rdi, [rsp+58h+var_48]
mov rax, [rsp+58h+var_58]
mov esi, eax
call find_timer_by_id
mov [rsp+58h+var_50], rax
cmp [rsp+58h+var_50], 0
jnz short loc_1957B
mov dword ptr [rsp+58h+var_10], 0
mov [rsp+58h+var_8], 3
jmp short loc_1959B
loc_1957B:
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_50]
call free_timer
mov dword ptr [rsp+58h+var_10], 0
mov [rsp+58h+var_8], 3
loc_1959B:
mov rax, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_8]
add rsp, 58h
retn
| long long js_os_clearTimeout(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v10; // [rsp+0h] [rbp-58h] BYREF
long long timer_by_id; // [rsp+8h] [rbp-50h]
long long thread_state; // [rsp+10h] [rbp-48h]
long long Runtime; // [rsp+18h] [rbp-40h]
_QWORD *v14; // [rsp+20h] [rbp-38h]
int v15; // [rsp+2Ch] [rbp-2Ch]
long long v16; // [rsp+30h] [rbp-28h]
long long v17; // [rsp+38h] [rbp-20h]
long long v18; // [rsp+40h] [rbp-18h]
long long v19; // [rsp+48h] [rbp-10h]
long long v20; // [rsp+50h] [rbp-8h]
v17 = a2;
v18 = a3;
v16 = a1;
v15 = a4;
v14 = a5;
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8);
if ( (unsigned int)JS_ToInt64(a1, &v10, *v14, v14[1]) )
{
LODWORD(v19) = 0;
v20 = 6LL;
}
else
{
timer_by_id = find_timer_by_id(thread_state, (unsigned int)v10);
if ( timer_by_id )
free_timer(Runtime, timer_by_id);
LODWORD(v19) = 0;
v20 = 3LL;
}
return v19;
}
| js_os_clearTimeout:
SUB RSP,0x58
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ECX
MOV qword ptr [RSP + 0x20],R8
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00127f00
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001115d0
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
MOV RSI,RSP
CALL 0x00138bf0
CMP EAX,0x0
JZ 0x0011954b
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x6
JMP 0x0011959b
LAB_0011954b:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV ESI,EAX
CALL 0x0011ce60
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x0011957b
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x3
JMP 0x0011959b
LAB_0011957b:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001116b0
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x3
LAB_0011959b:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x58
RET
|
int1 [16]
js_os_clearTimeout(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
ulong local_58;
long local_50;
int8 local_48;
int8 local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = JS_GetRuntime(param_1);
local_48 = js_get_thread_state(local_40);
iVar2 = JS_ToInt64(local_28,&local_58,*local_38,local_38[1]);
if (iVar2 == 0) {
local_50 = find_timer_by_id(local_48,local_58 & 0xffffffff);
if (local_50 == 0) {
local_8 = 3;
}
else {
free_timer(local_40,local_50);
local_8 = 3;
}
}
else {
local_8 = 6;
}
auVar1._4_8_ = local_8;
auVar1._0_4_ = uStack_c;
auVar1._12_4_ = 0;
return auVar1 << 0x20;
}
|
|
1,529 | js_os_clearTimeout | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_clearTimeout(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSOSTimer *th;
int64_t timer_id;
if (JS_ToInt64(ctx, &timer_id, argv[0]))
return JS_EXCEPTION;
th = find_timer_by_id(ts, timer_id);
if (!th)
return JS_UNDEFINED;
free_timer(rt, th);
return JS_UNDEFINED;
} | O2 | c | js_os_clearTimeout:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdi, %r12
callq 0x1a185
movq %rax, %rbx
movq %rax, %rdi
callq 0x1028a
movq %rax, %r15
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x214fe
testl %eax, %eax
je 0x13fa6
pushq $0x6
popq %r14
xorl %eax, %eax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%rsp), %rax
pushq $0x3
popq %r14
testl %eax, %eax
jle 0x13f95
leaq 0x20(%r15), %rcx
addq $0x28, %r15
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq (%r15), %r15
cmpq %rcx, %r15
je 0x13f95
cmpq %rax, 0x10(%r15)
je 0x13fd3
addq $0x8, %r15
jmp 0x13fbf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10323
jmp 0x13f95
| js_os_clearTimeout:
push r15
push r14
push r12
push rbx
push rax
mov r14, r8
mov r12, rdi
call JS_GetRuntime
mov rbx, rax
mov rdi, rax
call js_get_thread_state
mov r15, rax
mov rdx, [r14]
mov rcx, [r14+8]
mov rsi, rsp
mov rdi, r12
call JS_ToInt64
test eax, eax
jz short loc_13FA6
push 6
pop r14
loc_13F95:
xor eax, eax
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_13FA6:
mov rax, [rsp+28h+var_28]
push 3
pop r14
test eax, eax
jle short loc_13F95
lea rcx, [r15+20h]
add r15, 28h ; '('
and eax, 7FFFFFFFh
loc_13FBF:
mov r15, [r15]
cmp r15, rcx
jz short loc_13F95
cmp [r15+10h], rax
jz short loc_13FD3
add r15, 8
jmp short loc_13FBF
loc_13FD3:
mov rdi, rbx
mov rsi, r15
call free_timer
jmp short loc_13F95
| long long js_os_clearTimeout(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
char v5; // al
long long Runtime; // rbx
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long thread_state; // r15
long long *v14; // rcx
long long **i; // r15
long long *v16; // r15
_QWORD v17[5]; // [rsp+0h] [rbp-28h] BYREF
LOBYTE(v17[0]) = v5;
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v8, v9, v10, v11, v17[0]);
if ( !(unsigned int)JS_ToInt64(a1, v17, *a5, a5[1]) && SLODWORD(v17[0]) > 0 )
{
v14 = (long long *)(thread_state + 32);
for ( i = (long long **)(thread_state + 40); ; i = (long long **)(v16 + 1) )
{
v16 = *i;
if ( v16 == v14 )
break;
if ( v16[2] == (v17[0] & 0x7FFFFFFF) )
{
free_timer(Runtime, v16);
return 0LL;
}
}
}
return 0LL;
}
| js_os_clearTimeout:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R12,RDI
CALL 0x0011a185
MOV RBX,RAX
MOV RDI,RAX
CALL 0x0011028a
MOV R15,RAX
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV RSI,RSP
MOV RDI,R12
CALL 0x001214fe
TEST EAX,EAX
JZ 0x00113fa6
PUSH 0x6
POP R14
LAB_00113f95:
XOR EAX,EAX
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00113fa6:
MOV RAX,qword ptr [RSP]
PUSH 0x3
POP R14
TEST EAX,EAX
JLE 0x00113f95
LEA RCX,[R15 + 0x20]
ADD R15,0x28
AND EAX,0x7fffffff
LAB_00113fbf:
MOV R15,qword ptr [R15]
CMP R15,RCX
JZ 0x00113f95
CMP qword ptr [R15 + 0x10],RAX
JZ 0x00113fd3
ADD R15,0x8
JMP 0x00113fbf
LAB_00113fd3:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00110323
JMP 0x00113f95
|
int1 [16] js_os_clearTimeout(int8 param_1)
{
long lVar1;
int1 auVar2 [16];
uint in_EAX;
int iVar3;
int8 uVar4;
long lVar5;
int8 *in_R8;
long *plVar6;
ulong uStack_30;
uint local_28 [2];
local_28[0] = in_EAX;
uVar4 = JS_GetRuntime();
lVar5 = js_get_thread_state(uVar4);
iVar3 = JS_ToInt64(param_1,local_28,*in_R8,in_R8[1]);
if (iVar3 == 0) {
uStack_30 = 3;
if (0 < (int)local_28[0]) {
plVar6 = (long *)(lVar5 + 0x28);
while (lVar1 = *plVar6, uStack_30 = 3, lVar1 != lVar5 + 0x20) {
if (*(ulong *)(lVar1 + 0x10) == (ulong)(local_28[0] & 0x7fffffff)) {
free_timer(uVar4,lVar1);
break;
}
plVar6 = (long *)(lVar1 + 8);
}
}
}
else {
uStack_30 = 6;
}
auVar2._8_8_ = 0;
auVar2._0_8_ = uStack_30;
return auVar2 << 0x40;
}
|
|
1,530 | QuaternionToMatrix | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix QuaternionToMatrix(Quaternion q)
{
Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity()
float a2 = q.x*q.x;
float b2 = q.y*q.y;
float c2 = q.z*q.z;
float ac = q.x*q.z;
float ab = q.x*q.y;
float bc = q.y*q.z;
float ad = q.w*q.x;
float bd = q.w*q.y;
float cd = q.w*q.z;
result.m0 = 1 - 2*(b2 + c2);
result.m1 = 2*(ab + cd);
result.m2 = 2*(ac - bd);
result.m4 = 2*(ab - cd);
result.m5 = 1 - 2*(a2 + c2);
result.m6 = 2*(bc + ad);
result.m8 = 2*(ac + bd);
result.m9 = 2*(bc - ad);
result.m10 = 1 - 2*(a2 + b2);
return result;
} | O1 | c | QuaternionToMatrix:
movq %rdi, %rax
xorps %xmm2, %xmm2
movups %xmm2, 0x30(%rdi)
movups %xmm2, (%rdi)
movups %xmm2, 0x10(%rdi)
movups %xmm2, 0x20(%rdi)
movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4 # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, %xmm3
mulss %xmm4, %xmm3
movaps %xmm0, %xmm6
mulss %xmm1, %xmm6
movaps %xmm0, %xmm7
mulss %xmm4, %xmm7
movaps %xmm4, %xmm5
mulss %xmm1, %xmm5
movaps %xmm1, %xmm8
shufps $0x55, %xmm1, %xmm8 # xmm8 = xmm8[1,1],xmm1[1,1]
mulss %xmm8, %xmm0
mulss %xmm8, %xmm4
mulss %xmm1, %xmm8
movaps %xmm1, %xmm9
mulss %xmm1, %xmm9
movaps %xmm3, %xmm10
addss %xmm9, %xmm10
addss %xmm10, %xmm10
movss 0x6cd61(%rip), %xmm1 # 0xd9944
movaps %xmm1, %xmm11
subss %xmm10, %xmm11
movss %xmm11, (%rdi)
movaps %xmm7, %xmm10
addss %xmm8, %xmm10
addss %xmm10, %xmm10
movss %xmm10, 0x10(%rdi)
movaps %xmm6, %xmm10
subss %xmm4, %xmm10
addss %xmm10, %xmm10
movss %xmm10, 0x20(%rdi)
subss %xmm8, %xmm7
addss %xmm7, %xmm7
movss %xmm7, 0x4(%rdi)
addss %xmm2, %xmm9
addss %xmm9, %xmm9
movaps %xmm1, %xmm7
subss %xmm9, %xmm7
movss %xmm7, 0x14(%rdi)
movaps %xmm5, %xmm7
addss %xmm0, %xmm7
addss %xmm7, %xmm7
movss %xmm7, 0x24(%rdi)
addss %xmm6, %xmm4
addss %xmm4, %xmm4
movss %xmm4, 0x8(%rdi)
subss %xmm0, %xmm5
addss %xmm5, %xmm5
movss %xmm5, 0x18(%rdi)
addss %xmm2, %xmm3
addss %xmm3, %xmm3
subss %xmm3, %xmm1
movss %xmm1, 0x28(%rdi)
retq
| QuaternionToMatrix:
mov rax, rdi
xorps xmm2, xmm2
movups xmmword ptr [rdi+30h], xmm2
movups xmmword ptr [rdi], xmm2
movups xmmword ptr [rdi+10h], xmm2
movups xmmword ptr [rdi+20h], xmm2
mov dword ptr [rdi+3Ch], 3F800000h
movaps xmm2, xmm0
mulss xmm2, xmm0
movaps xmm4, xmm0
shufps xmm4, xmm0, 55h ; 'U'
movaps xmm3, xmm4
mulss xmm3, xmm4
movaps xmm6, xmm0
mulss xmm6, xmm1
movaps xmm7, xmm0
mulss xmm7, xmm4
movaps xmm5, xmm4
mulss xmm5, xmm1
movaps xmm8, xmm1
shufps xmm8, xmm1, 55h ; 'U'
mulss xmm0, xmm8
mulss xmm4, xmm8
mulss xmm8, xmm1
movaps xmm9, xmm1
mulss xmm9, xmm1
movaps xmm10, xmm3
addss xmm10, xmm9
addss xmm10, xmm10
movss xmm1, cs:dword_D9944
movaps xmm11, xmm1
subss xmm11, xmm10
movss dword ptr [rdi], xmm11
movaps xmm10, xmm7
addss xmm10, xmm8
addss xmm10, xmm10
movss dword ptr [rdi+10h], xmm10
movaps xmm10, xmm6
subss xmm10, xmm4
addss xmm10, xmm10
movss dword ptr [rdi+20h], xmm10
subss xmm7, xmm8
addss xmm7, xmm7
movss dword ptr [rdi+4], xmm7
addss xmm9, xmm2
addss xmm9, xmm9
movaps xmm7, xmm1
subss xmm7, xmm9
movss dword ptr [rdi+14h], xmm7
movaps xmm7, xmm5
addss xmm7, xmm0
addss xmm7, xmm7
movss dword ptr [rdi+24h], xmm7
addss xmm4, xmm6
addss xmm4, xmm4
movss dword ptr [rdi+8], xmm4
subss xmm5, xmm0
addss xmm5, xmm5
movss dword ptr [rdi+18h], xmm5
addss xmm3, xmm2
addss xmm3, xmm3
subss xmm1, xmm3
movss dword ptr [rdi+28h], xmm1
retn
| long long QuaternionToMatrix(long long a1, __m128 a2, __m128 a3)
{
long long result; // rax
float v4; // xmm2_4
float v5; // xmm4_4
float v6; // xmm3_4
float v7; // xmm6_4
float v8; // xmm7_4
float v9; // xmm5_4
float v10; // xmm8_4
float v11; // xmm0_4
float v12; // xmm4_4
float v13; // xmm8_4
result = a1;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_DWORD *)(a1 + 60) = 1065353216;
v4 = a2.m128_f32[0] * a2.m128_f32[0];
v5 = _mm_shuffle_ps(a2, a2, 85).m128_f32[0];
v6 = v5 * v5;
v7 = a2.m128_f32[0] * a3.m128_f32[0];
v8 = a2.m128_f32[0] * v5;
v9 = v5 * a3.m128_f32[0];
v10 = _mm_shuffle_ps(a3, a3, 85).m128_f32[0];
v11 = a2.m128_f32[0] * v10;
v12 = v5 * v10;
v13 = v10 * a3.m128_f32[0];
*(float *)a1 = 1.0
- (float)((float)(v6 + (float)(a3.m128_f32[0] * a3.m128_f32[0]))
+ (float)(v6 + (float)(a3.m128_f32[0] * a3.m128_f32[0])));
*(float *)(a1 + 16) = (float)(v8 + v13) + (float)(v8 + v13);
*(float *)(a1 + 32) = (float)(v7 - v12) + (float)(v7 - v12);
*(float *)(a1 + 4) = (float)(v8 - v13) + (float)(v8 - v13);
*(float *)(a1 + 20) = 1.0
- (float)((float)((float)(a3.m128_f32[0] * a3.m128_f32[0]) + v4)
+ (float)((float)(a3.m128_f32[0] * a3.m128_f32[0]) + v4));
*(float *)(a1 + 36) = (float)(v9 + v11) + (float)(v9 + v11);
*(float *)(a1 + 8) = (float)(v12 + v7) + (float)(v12 + v7);
*(float *)(a1 + 24) = (float)(v9 - v11) + (float)(v9 - v11);
*(float *)(a1 + 40) = 1.0 - (float)((float)(v6 + v4) + (float)(v6 + v4));
return result;
}
| QuaternionToMatrix:
MOV RAX,RDI
XORPS XMM2,XMM2
MOVUPS xmmword ptr [RDI + 0x30],XMM2
MOVUPS xmmword ptr [RDI],XMM2
MOVUPS xmmword ptr [RDI + 0x10],XMM2
MOVUPS xmmword ptr [RDI + 0x20],XMM2
MOV dword ptr [RDI + 0x3c],0x3f800000
MOVAPS XMM2,XMM0
MULSS XMM2,XMM0
MOVAPS XMM4,XMM0
SHUFPS XMM4,XMM0,0x55
MOVAPS XMM3,XMM4
MULSS XMM3,XMM4
MOVAPS XMM6,XMM0
MULSS XMM6,XMM1
MOVAPS XMM7,XMM0
MULSS XMM7,XMM4
MOVAPS XMM5,XMM4
MULSS XMM5,XMM1
MOVAPS XMM8,XMM1
SHUFPS XMM8,XMM1,0x55
MULSS XMM0,XMM8
MULSS XMM4,XMM8
MULSS XMM8,XMM1
MOVAPS XMM9,XMM1
MULSS XMM9,XMM1
MOVAPS XMM10,XMM3
ADDSS XMM10,XMM9
ADDSS XMM10,XMM10
MOVSS XMM1,dword ptr [0x001d9944]
MOVAPS XMM11,XMM1
SUBSS XMM11,XMM10
MOVSS dword ptr [RDI],XMM11
MOVAPS XMM10,XMM7
ADDSS XMM10,XMM8
ADDSS XMM10,XMM10
MOVSS dword ptr [RDI + 0x10],XMM10
MOVAPS XMM10,XMM6
SUBSS XMM10,XMM4
ADDSS XMM10,XMM10
MOVSS dword ptr [RDI + 0x20],XMM10
SUBSS XMM7,XMM8
ADDSS XMM7,XMM7
MOVSS dword ptr [RDI + 0x4],XMM7
ADDSS XMM9,XMM2
ADDSS XMM9,XMM9
MOVAPS XMM7,XMM1
SUBSS XMM7,XMM9
MOVSS dword ptr [RDI + 0x14],XMM7
MOVAPS XMM7,XMM5
ADDSS XMM7,XMM0
ADDSS XMM7,XMM7
MOVSS dword ptr [RDI + 0x24],XMM7
ADDSS XMM4,XMM6
ADDSS XMM4,XMM4
MOVSS dword ptr [RDI + 0x8],XMM4
SUBSS XMM5,XMM0
ADDSS XMM5,XMM5
MOVSS dword ptr [RDI + 0x18],XMM5
ADDSS XMM3,XMM2
ADDSS XMM3,XMM3
SUBSS XMM1,XMM3
MOVSS dword ptr [RDI + 0x28],XMM1
RET
|
float * QuaternionToMatrix(int8 param_1,int8 param_2,float *param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
fVar3 = (float)((ulong)param_2 >> 0x20);
fVar5 = (float)param_2;
fVar2 = (float)((ulong)param_1 >> 0x20);
fVar4 = (float)param_1;
param_3[0xc] = 0.0;
param_3[0xd] = 0.0;
param_3[0xe] = 0.0;
param_3[0xf] = 0.0;
param_3[0] = 0.0;
param_3[1] = 0.0;
param_3[2] = 0.0;
param_3[3] = 0.0;
param_3[4] = 0.0;
param_3[5] = 0.0;
param_3[6] = 0.0;
param_3[7] = 0.0;
param_3[8] = 0.0;
param_3[9] = 0.0;
param_3[10] = 0.0;
param_3[0xb] = 0.0;
param_3[0xf] = 1.0;
fVar1 = DAT_001d9944;
fVar6 = fVar2 * fVar2 + fVar5 * fVar5;
*param_3 = DAT_001d9944 - (fVar6 + fVar6);
fVar6 = fVar4 * fVar2 + fVar3 * fVar5;
param_3[4] = fVar6 + fVar6;
fVar6 = fVar4 * fVar5 - fVar2 * fVar3;
param_3[8] = fVar6 + fVar6;
fVar6 = fVar4 * fVar2 - fVar3 * fVar5;
param_3[1] = fVar6 + fVar6;
fVar6 = fVar5 * fVar5 + fVar4 * fVar4;
param_3[5] = fVar1 - (fVar6 + fVar6);
fVar6 = fVar2 * fVar5 + fVar4 * fVar3;
param_3[9] = fVar6 + fVar6;
fVar6 = fVar2 * fVar3 + fVar4 * fVar5;
param_3[2] = fVar6 + fVar6;
fVar5 = fVar2 * fVar5 - fVar4 * fVar3;
param_3[6] = fVar5 + fVar5;
fVar4 = fVar2 * fVar2 + fVar4 * fVar4;
param_3[10] = fVar1 - (fVar4 + fVar4);
return param_3;
}
|
|
1,531 | QuaternionToMatrix | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix QuaternionToMatrix(Quaternion q)
{
Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity()
float a2 = q.x*q.x;
float b2 = q.y*q.y;
float c2 = q.z*q.z;
float ac = q.x*q.z;
float ab = q.x*q.y;
float bc = q.y*q.z;
float ad = q.w*q.x;
float bd = q.w*q.y;
float cd = q.w*q.z;
result.m0 = 1 - 2*(b2 + c2);
result.m1 = 2*(ab + cd);
result.m2 = 2*(ac - bd);
result.m4 = 2*(ab - cd);
result.m5 = 1 - 2*(a2 + c2);
result.m6 = 2*(bc + ad);
result.m8 = 2*(ac + bd);
result.m9 = 2*(bc - ad);
result.m10 = 1 - 2*(a2 + b2);
return result;
} | O2 | c | QuaternionToMatrix:
movq %rdi, %rax
xorps %xmm2, %xmm2
movups %xmm2, 0xc(%rdi)
movups %xmm2, 0x1c(%rdi)
movups %xmm2, 0x2c(%rdi)
movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4 # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, %xmm3
mulss %xmm4, %xmm3
movaps %xmm0, %xmm6
mulss %xmm1, %xmm6
movaps %xmm0, %xmm7
mulss %xmm4, %xmm7
movaps %xmm4, %xmm5
mulss %xmm1, %xmm5
movaps %xmm1, %xmm8
shufps $0x55, %xmm1, %xmm8 # xmm8 = xmm8[1,1],xmm1[1,1]
mulss %xmm8, %xmm0
mulss %xmm8, %xmm4
mulss %xmm1, %xmm8
movaps %xmm1, %xmm9
mulss %xmm1, %xmm9
movaps %xmm3, %xmm10
addss %xmm9, %xmm10
addss %xmm10, %xmm10
movss 0x5fae2(%rip), %xmm1 # 0xb969c
movaps %xmm1, %xmm11
subss %xmm10, %xmm11
movss %xmm11, (%rdi)
movaps %xmm7, %xmm10
addss %xmm8, %xmm10
addss %xmm10, %xmm10
movss %xmm10, 0x10(%rdi)
movaps %xmm6, %xmm10
subss %xmm4, %xmm10
addss %xmm10, %xmm10
movss %xmm10, 0x20(%rdi)
subss %xmm8, %xmm7
addss %xmm7, %xmm7
movss %xmm7, 0x4(%rdi)
addss %xmm2, %xmm9
addss %xmm9, %xmm9
movaps %xmm1, %xmm7
subss %xmm9, %xmm7
movss %xmm7, 0x14(%rdi)
movaps %xmm5, %xmm7
addss %xmm0, %xmm7
addss %xmm7, %xmm7
movss %xmm7, 0x24(%rdi)
addss %xmm6, %xmm4
addss %xmm4, %xmm4
movss %xmm4, 0x8(%rdi)
subss %xmm0, %xmm5
addss %xmm5, %xmm5
movss %xmm5, 0x18(%rdi)
addss %xmm2, %xmm3
addss %xmm3, %xmm3
subss %xmm3, %xmm1
movss %xmm1, 0x28(%rdi)
retq
| QuaternionToMatrix:
mov rax, rdi
xorps xmm2, xmm2
movups xmmword ptr [rdi+0Ch], xmm2
movups xmmword ptr [rdi+1Ch], xmm2
movups xmmword ptr [rdi+2Ch], xmm2
mov dword ptr [rdi+3Ch], 3F800000h
movaps xmm2, xmm0
mulss xmm2, xmm0
movaps xmm4, xmm0
shufps xmm4, xmm0, 55h ; 'U'
movaps xmm3, xmm4
mulss xmm3, xmm4
movaps xmm6, xmm0
mulss xmm6, xmm1
movaps xmm7, xmm0
mulss xmm7, xmm4
movaps xmm5, xmm4
mulss xmm5, xmm1
movaps xmm8, xmm1
shufps xmm8, xmm1, 55h ; 'U'
mulss xmm0, xmm8
mulss xmm4, xmm8
mulss xmm8, xmm1
movaps xmm9, xmm1
mulss xmm9, xmm1
movaps xmm10, xmm3
addss xmm10, xmm9
addss xmm10, xmm10
movss xmm1, cs:dword_B969C
movaps xmm11, xmm1
subss xmm11, xmm10
movss dword ptr [rdi], xmm11
movaps xmm10, xmm7
addss xmm10, xmm8
addss xmm10, xmm10
movss dword ptr [rdi+10h], xmm10
movaps xmm10, xmm6
subss xmm10, xmm4
addss xmm10, xmm10
movss dword ptr [rdi+20h], xmm10
subss xmm7, xmm8
addss xmm7, xmm7
movss dword ptr [rdi+4], xmm7
addss xmm9, xmm2
addss xmm9, xmm9
movaps xmm7, xmm1
subss xmm7, xmm9
movss dword ptr [rdi+14h], xmm7
movaps xmm7, xmm5
addss xmm7, xmm0
addss xmm7, xmm7
movss dword ptr [rdi+24h], xmm7
addss xmm4, xmm6
addss xmm4, xmm4
movss dword ptr [rdi+8], xmm4
subss xmm5, xmm0
addss xmm5, xmm5
movss dword ptr [rdi+18h], xmm5
addss xmm3, xmm2
addss xmm3, xmm3
subss xmm1, xmm3
movss dword ptr [rdi+28h], xmm1
retn
| long long QuaternionToMatrix(long long a1, __m128 a2, __m128 a3)
{
long long result; // rax
float v4; // xmm2_4
float v5; // xmm4_4
float v6; // xmm3_4
float v7; // xmm6_4
float v8; // xmm7_4
float v9; // xmm5_4
float v10; // xmm8_4
float v11; // xmm0_4
float v12; // xmm4_4
float v13; // xmm8_4
result = a1;
*(_OWORD *)(a1 + 12) = 0LL;
*(_OWORD *)(a1 + 28) = 0LL;
*(_OWORD *)(a1 + 44) = 0LL;
*(_DWORD *)(a1 + 60) = 1065353216;
v4 = a2.m128_f32[0] * a2.m128_f32[0];
v5 = _mm_shuffle_ps(a2, a2, 85).m128_f32[0];
v6 = v5 * v5;
v7 = a2.m128_f32[0] * a3.m128_f32[0];
v8 = a2.m128_f32[0] * v5;
v9 = v5 * a3.m128_f32[0];
v10 = _mm_shuffle_ps(a3, a3, 85).m128_f32[0];
v11 = a2.m128_f32[0] * v10;
v12 = v5 * v10;
v13 = v10 * a3.m128_f32[0];
*(float *)a1 = 1.0
- (float)((float)(v6 + (float)(a3.m128_f32[0] * a3.m128_f32[0]))
+ (float)(v6 + (float)(a3.m128_f32[0] * a3.m128_f32[0])));
*(float *)(a1 + 16) = (float)(v8 + v13) + (float)(v8 + v13);
*(float *)(a1 + 32) = (float)(v7 - v12) + (float)(v7 - v12);
*(float *)(a1 + 4) = (float)(v8 - v13) + (float)(v8 - v13);
*(float *)(a1 + 20) = 1.0
- (float)((float)((float)(a3.m128_f32[0] * a3.m128_f32[0]) + v4)
+ (float)((float)(a3.m128_f32[0] * a3.m128_f32[0]) + v4));
*(float *)(a1 + 36) = (float)(v9 + v11) + (float)(v9 + v11);
*(float *)(a1 + 8) = (float)(v12 + v7) + (float)(v12 + v7);
*(float *)(a1 + 24) = (float)(v9 - v11) + (float)(v9 - v11);
*(float *)(a1 + 40) = 1.0 - (float)((float)(v6 + v4) + (float)(v6 + v4));
return result;
}
| QuaternionToMatrix:
MOV RAX,RDI
XORPS XMM2,XMM2
MOVUPS xmmword ptr [RDI + 0xc],XMM2
MOVUPS xmmword ptr [RDI + 0x1c],XMM2
MOVUPS xmmword ptr [RDI + 0x2c],XMM2
MOV dword ptr [RDI + 0x3c],0x3f800000
MOVAPS XMM2,XMM0
MULSS XMM2,XMM0
MOVAPS XMM4,XMM0
SHUFPS XMM4,XMM0,0x55
MOVAPS XMM3,XMM4
MULSS XMM3,XMM4
MOVAPS XMM6,XMM0
MULSS XMM6,XMM1
MOVAPS XMM7,XMM0
MULSS XMM7,XMM4
MOVAPS XMM5,XMM4
MULSS XMM5,XMM1
MOVAPS XMM8,XMM1
SHUFPS XMM8,XMM1,0x55
MULSS XMM0,XMM8
MULSS XMM4,XMM8
MULSS XMM8,XMM1
MOVAPS XMM9,XMM1
MULSS XMM9,XMM1
MOVAPS XMM10,XMM3
ADDSS XMM10,XMM9
ADDSS XMM10,XMM10
MOVSS XMM1,dword ptr [0x001b969c]
MOVAPS XMM11,XMM1
SUBSS XMM11,XMM10
MOVSS dword ptr [RDI],XMM11
MOVAPS XMM10,XMM7
ADDSS XMM10,XMM8
ADDSS XMM10,XMM10
MOVSS dword ptr [RDI + 0x10],XMM10
MOVAPS XMM10,XMM6
SUBSS XMM10,XMM4
ADDSS XMM10,XMM10
MOVSS dword ptr [RDI + 0x20],XMM10
SUBSS XMM7,XMM8
ADDSS XMM7,XMM7
MOVSS dword ptr [RDI + 0x4],XMM7
ADDSS XMM9,XMM2
ADDSS XMM9,XMM9
MOVAPS XMM7,XMM1
SUBSS XMM7,XMM9
MOVSS dword ptr [RDI + 0x14],XMM7
MOVAPS XMM7,XMM5
ADDSS XMM7,XMM0
ADDSS XMM7,XMM7
MOVSS dword ptr [RDI + 0x24],XMM7
ADDSS XMM4,XMM6
ADDSS XMM4,XMM4
MOVSS dword ptr [RDI + 0x8],XMM4
SUBSS XMM5,XMM0
ADDSS XMM5,XMM5
MOVSS dword ptr [RDI + 0x18],XMM5
ADDSS XMM3,XMM2
ADDSS XMM3,XMM3
SUBSS XMM1,XMM3
MOVSS dword ptr [RDI + 0x28],XMM1
RET
|
float * QuaternionToMatrix(int8 param_1,int8 param_2,float *param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
fVar3 = (float)((ulong)param_2 >> 0x20);
fVar5 = (float)param_2;
fVar2 = (float)((ulong)param_1 >> 0x20);
fVar4 = (float)param_1;
param_3[3] = 0.0;
param_3[4] = 0.0;
param_3[5] = 0.0;
param_3[6] = 0.0;
param_3[7] = 0.0;
param_3[8] = 0.0;
param_3[9] = 0.0;
param_3[10] = 0.0;
param_3[0xb] = 0.0;
param_3[0xc] = 0.0;
param_3[0xd] = 0.0;
param_3[0xe] = 0.0;
param_3[0xf] = 1.0;
fVar1 = DAT_001b969c;
fVar6 = fVar2 * fVar2 + fVar5 * fVar5;
*param_3 = DAT_001b969c - (fVar6 + fVar6);
fVar6 = fVar4 * fVar2 + fVar3 * fVar5;
param_3[4] = fVar6 + fVar6;
fVar6 = fVar4 * fVar5 - fVar2 * fVar3;
param_3[8] = fVar6 + fVar6;
fVar6 = fVar4 * fVar2 - fVar3 * fVar5;
param_3[1] = fVar6 + fVar6;
fVar6 = fVar5 * fVar5 + fVar4 * fVar4;
param_3[5] = fVar1 - (fVar6 + fVar6);
fVar6 = fVar2 * fVar5 + fVar4 * fVar3;
param_3[9] = fVar6 + fVar6;
fVar6 = fVar2 * fVar3 + fVar4 * fVar5;
param_3[2] = fVar6 + fVar6;
fVar5 = fVar2 * fVar5 - fVar4 * fVar3;
param_3[6] = fVar5 + fVar5;
fVar4 = fVar2 * fVar2 + fVar4 * fVar4;
param_3[10] = fVar1 - (fVar4 + fVar4);
return param_3;
}
|
|
1,532 | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | bool has_named(const std::string & name) {
for (const auto & p : kwargs) {
if (p.first == name) return true;
}
return false;
} | O2 | cpp | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r15
movq %rcx, %r14
cmpq %r15, %rcx
je 0x85805
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3bb14
leaq 0x70(%r14), %rcx
testb %al, %al
je 0x857ea
cmpq %r15, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rsi
mov rcx, [rdi+18h]
mov r15, [rdi+20h]
loc_857EA:
mov r14, rcx
cmp rcx, r15
jz short loc_85805
mov rdi, r14
mov rsi, rbx
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
lea rcx, [r14+70h]
test al, al
jz short loc_857EA
loc_85805:
cmp r14, r15
setnz al
pop rbx
pop r14
pop r15
retn
| bool minja::ArgumentsValue::has_named(long long a1, _QWORD *a2)
{
_QWORD *v2; // rcx
_QWORD *v3; // r15
_QWORD *v4; // r14
bool v5; // al
v2 = *(_QWORD **)(a1 + 24);
v3 = *(_QWORD **)(a1 + 32);
do
{
v4 = v2;
if ( v2 == v3 )
break;
v5 = std::operator==<char>(v2, a2);
v2 = v4 + 14;
}
while ( !v5 );
return v4 != v3;
}
| has_named:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV R15,qword ptr [RDI + 0x20]
LAB_001857ea:
MOV R14,RCX
CMP RCX,R15
JZ 0x00185805
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013bb14
LEA RCX,[R14 + 0x70]
TEST AL,AL
JZ 0x001857ea
LAB_00185805:
CMP R14,R15
SETNZ AL
POP RBX
POP R14
POP R15
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
bool __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
string *psVar1;
string *psVar2;
char cVar3;
string *psVar4;
psVar1 = *(string **)(this + 0x20);
psVar2 = *(string **)(this + 0x18);
do {
psVar4 = psVar2;
if (psVar4 == psVar1) break;
cVar3 = std::operator==(psVar4,param_1);
psVar2 = psVar4 + 0x70;
} while (cVar3 == '\0');
return psVar4 != psVar1;
}
|
|
1,533 | coro::thread_pool::executor(unsigned long) | AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp | auto thread_pool::executor(std::size_t idx) -> void
{
if (m_opts.on_thread_start_functor != nullptr)
{
m_opts.on_thread_start_functor(idx);
}
// Process until shutdown is requested.
while (!m_shutdown_requested.load(std::memory_order::acquire))
{
std::unique_lock<std::mutex> lk{m_wait_mutex};
m_wait_cv.wait(lk, [&]() { return !m_queue.empty() || m_shutdown_requested.load(std::memory_order::acquire); });
if (m_queue.empty())
{
continue;
}
auto handle = m_queue.front();
m_queue.pop_front();
lk.unlock();
// Release the lock while executing the coroutine.
handle.resume();
m_size.fetch_sub(1, std::memory_order::release);
}
// Process until there are no ready tasks left.
while (m_size.load(std::memory_order::acquire) > 0)
{
std::unique_lock<std::mutex> lk{m_wait_mutex};
// m_size will only drop to zero once all executing coroutines are finished
// but the queue could be empty for threads that finished early.
if (m_queue.empty())
{
break;
}
auto handle = m_queue.front();
m_queue.pop_front();
lk.unlock();
// Release the lock while executing the coroutine.
handle.resume();
m_size.fetch_sub(1, std::memory_order::release);
}
if (m_opts.on_thread_stop_functor != nullptr)
{
m_opts.on_thread_stop_functor(idx);
}
} | O3 | cpp | coro::thread_pool::executor(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0x4840
leaq 0x10(%rbx), %rdi
movq %rsp, %rsi
movq %r14, (%rsi)
callq *0x28(%rbx)
movq %r14, 0x10(%rsp)
movb 0x128(%rbx), %al
testb $0x1, %al
jne 0x48f2
leaq 0x68(%rbx), %r14
leaq 0x90(%rbx), %r15
leaq 0xd0(%rbx), %r12
movq %rsp, %r13
movq %r14, (%rsp)
movb $0x0, 0x8(%rsp)
movq %r13, %rdi
callq 0x41c0
movb $0x1, 0x8(%rsp)
movq 0xe0(%rbx), %rax
movq 0x100(%rbx), %rcx
cmpq %rax, %rcx
jne 0x48b6
movb 0x128(%rbx), %al
testb $0x1, %al
jne 0x48a8
movq %r15, %rdi
movq %r13, %rsi
callq 0x4fc4
jmp 0x487e
movq 0xe0(%rbx), %rax
movq 0x100(%rbx), %rcx
cmpq %rax, %rcx
je 0x48dc
movq (%rax), %rbp
movq %r12, %rdi
callq 0x4bfa
movq %r13, %rdi
callq 0x41fc
movq %rbp, %rdi
callq *(%rbp)
lock
decq 0x120(%rbx)
movq %r13, %rdi
callq 0x41aa
movb 0x128(%rbx), %al
testb $0x1, %al
je 0x4868
movq 0x120(%rbx), %rax
testq %rax, %rax
je 0x4972
leaq 0x68(%rbx), %r14
leaq 0xd0(%rbx), %r15
movq %rsp, %r12
movq %r14, (%rsp)
movb $0x0, 0x8(%rsp)
movq %r12, %rdi
callq 0x41c0
movb $0x1, 0x8(%rsp)
movq 0xe0(%rbx), %rax
cmpq %rax, 0x100(%rbx)
je 0x496a
movq (%rax), %r13
movq %r15, %rdi
callq 0x4bfa
movq %r12, %rdi
callq 0x41fc
movq %r13, %rdi
callq *(%r13)
lock
decq 0x120(%rbx)
movq %r12, %rdi
callq 0x41aa
movq 0x120(%rbx), %rax
testq %rax, %rax
jne 0x490c
jmp 0x4972
movq %rsp, %rdi
callq 0x41aa
cmpq $0x0, 0x40(%rbx)
je 0x498b
leaq 0x30(%rbx), %rdi
movq %rsp, %rsi
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
callq *0x48(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x499e
jmp 0x499e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x41aa
movq %rbx, %rdi
callq 0x2270
nop
| _ZN4coro11thread_pool8executorEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rdi+20h], 0
jz short loc_4840
lea rdi, [rbx+10h]
mov rsi, rsp
mov [rsi], r14
call qword ptr [rbx+28h]
loc_4840:
mov [rsp+48h+var_38], r14
mov al, [rbx+128h]
test al, 1
jnz loc_48F2
lea r14, [rbx+68h]
lea r15, [rbx+90h]
lea r12, [rbx+0D0h]
mov r13, rsp
loc_4868:
mov [rsp+48h+var_48], r14
mov [rsp+48h+var_40], 0
mov rdi, r13
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov [rsp+48h+var_40], 1
loc_487E:
mov rax, [rbx+0E0h]
mov rcx, [rbx+100h]
cmp rcx, rax
jnz short loc_48B6
mov al, [rbx+128h]
test al, 1
jnz short loc_48A8
mov rdi, r15
mov rsi, r13
call _ZNSt3_V222condition_variable_any4waitISt11unique_lockISt5mutexEEEvRT_; std::_V2::condition_variable_any::wait<std::unique_lock<std::mutex>>(std::unique_lock<std::mutex> &)
jmp short loc_487E
loc_48A8:
mov rax, [rbx+0E0h]
mov rcx, [rbx+100h]
loc_48B6:
cmp rcx, rax
jz short loc_48DC
mov rbp, [rax]
mov rdi, r12
call _ZNSt5dequeINSt7__n486116coroutine_handleIvEESaIS2_EE9pop_frontEv; std::deque<std::__n4861::coroutine_handle<void>>::pop_front(void)
mov rdi, r13
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
mov rdi, rbp
call qword ptr [rbp+0]
lock dec qword ptr [rbx+120h]
loc_48DC:
mov rdi, r13
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov al, [rbx+128h]
test al, 1
jz loc_4868
loc_48F2:
mov rax, [rbx+120h]
test rax, rax
jz short loc_4972
lea r14, [rbx+68h]
lea r15, [rbx+0D0h]
mov r12, rsp
loc_490C:
mov [rsp+48h+var_48], r14
mov [rsp+48h+var_40], 0
mov rdi, r12
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov [rsp+48h+var_40], 1
mov rax, [rbx+0E0h]
cmp [rbx+100h], rax
jz short loc_496A
mov r13, [rax]
mov rdi, r15
call _ZNSt5dequeINSt7__n486116coroutine_handleIvEESaIS2_EE9pop_frontEv; std::deque<std::__n4861::coroutine_handle<void>>::pop_front(void)
mov rdi, r12
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
mov rdi, r13
call qword ptr [r13+0]
lock dec qword ptr [rbx+120h]
mov rdi, r12
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rax, [rbx+120h]
test rax, rax
jnz short loc_490C
jmp short loc_4972
loc_496A:
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
loc_4972:
cmp qword ptr [rbx+40h], 0
jz short loc_498B
lea rdi, [rbx+30h]
mov rsi, rsp
mov rax, [rsp+48h+var_38]
mov [rsi], rax
call qword ptr [rbx+48h]
loc_498B:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_499E
jmp short $+2
loc_499E:
mov rbx, rax
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| void ( *** coro::thread_pool::executor(coro::thread_pool *this, char *a2))(_QWORD)
{
int v2; // edx
int v3; // r8d
int v4; // r9d
void ( ***v5)(_QWORD); // rax
void ( ***v6)(_QWORD); // rcx
void ( **v7)(_QWORD); // rbp
void ( ***result)(_QWORD); // rax
void ( **v9)(_QWORD); // r13
char *v10; // [rsp+0h] [rbp-48h] BYREF
char v11; // [rsp+8h] [rbp-40h]
char *v12; // [rsp+10h] [rbp-38h]
if ( *((_QWORD *)this + 4) )
{
v10 = a2;
(*((void ( **)(char *))this + 5))((char *)this + 16);
}
v12 = a2;
while ( (*((_BYTE *)this + 296) & 1) == 0 )
{
v10 = (char *)this + 104;
v11 = 0;
std::unique_lock<std::mutex>::lock((long long)&v10);
v11 = 1;
while ( 1 )
{
v5 = (void ( ***)(_QWORD))*((_QWORD *)this + 28);
v6 = (void ( ***)(_QWORD))*((_QWORD *)this + 32);
if ( v6 != v5 )
break;
if ( (*((_BYTE *)this + 296) & 1) != 0 )
{
v5 = (void ( ***)(_QWORD))*((_QWORD *)this + 28);
v6 = (void ( ***)(_QWORD))*((_QWORD *)this + 32);
break;
}
std::_V2::condition_variable_any::wait<std::unique_lock<std::mutex>>(
(_DWORD)this + 144,
(unsigned int)&v10,
v2,
(_DWORD)v6,
v3,
v4,
(char)v10);
}
if ( v6 != v5 )
{
v7 = *v5;
std::deque<std::__n4861::coroutine_handle<void>>::pop_front((char *)this + 208);
std::unique_lock<std::mutex>::unlock((long long)&v10);
(*v7)(v7);
_InterlockedDecrement64((volatile signed long long *)this + 36);
}
std::unique_lock<std::mutex>::~unique_lock((long long)&v10);
}
result = (void ( ***)(_QWORD))*((_QWORD *)this + 36);
if ( result )
{
while ( 1 )
{
v10 = (char *)this + 104;
v11 = 0;
std::unique_lock<std::mutex>::lock((long long)&v10);
v11 = 1;
result = (void ( ***)(_QWORD))*((_QWORD *)this + 28);
if ( *((void ( ****)(_QWORD))this + 32) == result )
break;
v9 = *result;
std::deque<std::__n4861::coroutine_handle<void>>::pop_front((char *)this + 208);
std::unique_lock<std::mutex>::unlock((long long)&v10);
(*v9)(v9);
_InterlockedDecrement64((volatile signed long long *)this + 36);
std::unique_lock<std::mutex>::~unique_lock((long long)&v10);
result = (void ( ***)(_QWORD))*((_QWORD *)this + 36);
if ( !result )
goto LABEL_17;
}
std::unique_lock<std::mutex>::~unique_lock((long long)&v10);
}
LABEL_17:
if ( *((_QWORD *)this + 8) )
{
v10 = v12;
return (void ( ***)(_QWORD))(*((long long ( **)(char *))this + 9))((char *)this + 48);
}
return result;
}
| executor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RDI + 0x20],0x0
JZ 0x00104840
LEA RDI,[RBX + 0x10]
MOV RSI,RSP
MOV qword ptr [RSI],R14
CALL qword ptr [RBX + 0x28]
LAB_00104840:
MOV qword ptr [RSP + 0x10],R14
MOV AL,byte ptr [RBX + 0x128]
TEST AL,0x1
JNZ 0x001048f2
LEA R14,[RBX + 0x68]
LEA R15,[RBX + 0x90]
LEA R12,[RBX + 0xd0]
MOV R13,RSP
LAB_00104868:
MOV qword ptr [RSP],R14
MOV byte ptr [RSP + 0x8],0x0
MOV RDI,R13
CALL 0x001041c0
MOV byte ptr [RSP + 0x8],0x1
LAB_0010487e:
MOV RAX,qword ptr [RBX + 0xe0]
MOV RCX,qword ptr [RBX + 0x100]
CMP RCX,RAX
JNZ 0x001048b6
MOV AL,byte ptr [RBX + 0x128]
TEST AL,0x1
JNZ 0x001048a8
LAB_0010489b:
MOV RDI,R15
MOV RSI,R13
CALL 0x00104fc4
JMP 0x0010487e
LAB_001048a8:
MOV RAX,qword ptr [RBX + 0xe0]
MOV RCX,qword ptr [RBX + 0x100]
LAB_001048b6:
CMP RCX,RAX
JZ 0x001048dc
MOV RBP,qword ptr [RAX]
MOV RDI,R12
CALL 0x00104bfa
LAB_001048c6:
MOV RDI,R13
CALL 0x001041fc
MOV RDI,RBP
CALL qword ptr [RBP]
LAB_001048d4:
DEC.LOCK qword ptr [RBX + 0x120]
LAB_001048dc:
MOV RDI,R13
CALL 0x001041aa
MOV AL,byte ptr [RBX + 0x128]
TEST AL,0x1
JZ 0x00104868
LAB_001048f2:
MOV RAX,qword ptr [RBX + 0x120]
TEST RAX,RAX
JZ 0x00104972
LEA R14,[RBX + 0x68]
LEA R15,[RBX + 0xd0]
MOV R12,RSP
LAB_0010490c:
MOV qword ptr [RSP],R14
MOV byte ptr [RSP + 0x8],0x0
MOV RDI,R12
CALL 0x001041c0
MOV byte ptr [RSP + 0x8],0x1
MOV RAX,qword ptr [RBX + 0xe0]
CMP qword ptr [RBX + 0x100],RAX
JZ 0x0010496a
MOV R13,qword ptr [RAX]
MOV RDI,R15
CALL 0x00104bfa
LAB_0010493d:
MOV RDI,R12
CALL 0x001041fc
MOV RDI,R13
CALL qword ptr [R13]
LAB_0010494c:
DEC.LOCK qword ptr [RBX + 0x120]
MOV RDI,R12
CALL 0x001041aa
MOV RAX,qword ptr [RBX + 0x120]
TEST RAX,RAX
JNZ 0x0010490c
JMP 0x00104972
LAB_0010496a:
MOV RDI,RSP
CALL 0x001041aa
LAB_00104972:
CMP qword ptr [RBX + 0x40],0x0
JZ 0x0010498b
LEA RDI,[RBX + 0x30]
MOV RSI,RSP
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSI],RAX
CALL qword ptr [RBX + 0x48]
LAB_0010498b:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* coro::thread_pool::executor(unsigned long) */
void __thiscall coro::thread_pool::executor(thread_pool *this,ulong param_1)
{
int8 *puVar1;
int8 *puVar2;
thread_pool *local_48;
int1 local_40;
ulong local_38;
if (*(long *)(this + 0x20) != 0) {
local_48 = (thread_pool *)param_1;
(**(code **)(this + 0x28))(this + 0x10);
}
local_38 = param_1;
if (((byte)this[0x128] & 1) == 0) {
do {
local_40 = 0;
local_48 = this + 0x68;
std::unique_lock<std::mutex>::lock();
local_40 = 1;
while( true ) {
puVar1 = *(int8 **)(this + 0xe0);
puVar2 = *(int8 **)(this + 0x100);
if (puVar2 != puVar1) break;
if (((byte)this[0x128] & 1) != 0) {
puVar1 = *(int8 **)(this + 0xe0);
puVar2 = *(int8 **)(this + 0x100);
break;
}
/* try { // try from 0010489b to 001048a5 has its CatchHandler @ 0010499e */
std::_V2::condition_variable_any::wait<std::unique_lock<std::mutex>>
((condition_variable_any *)(this + 0x90),(unique_lock *)&local_48);
}
if (puVar2 != puVar1) {
puVar1 = (int8 *)*puVar1;
std::
deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
::pop_front((deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
*)(this + 0xd0));
/* try { // try from 001048c6 to 001048d3 has its CatchHandler @ 0010499c */
std::unique_lock<std::mutex>::unlock();
(*(code *)*puVar1)(puVar1);
LOCK();
*(long *)(this + 0x120) = *(long *)(this + 0x120) + -1;
UNLOCK();
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_48);
} while (((byte)this[0x128] & 1) == 0);
}
if (*(long *)(this + 0x120) != 0) {
do {
local_40 = 0;
local_48 = this + 0x68;
std::unique_lock<std::mutex>::lock();
local_40 = 1;
if (*(int8 **)(this + 0x100) == *(int8 **)(this + 0xe0)) {
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_48);
break;
}
puVar2 = (int8 *)**(int8 **)(this + 0xe0);
std::
deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
::pop_front((deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>>
*)(this + 0xd0));
/* try { // try from 0010493d to 0010494b has its CatchHandler @ 0010499a */
std::unique_lock<std::mutex>::unlock();
(*(code *)*puVar2)(puVar2);
LOCK();
*(long *)(this + 0x120) = *(long *)(this + 0x120) + -1;
UNLOCK();
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_48);
} while (*(long *)(this + 0x120) != 0);
}
if (*(long *)(this + 0x40) != 0) {
local_48 = (thread_pool *)local_38;
(**(code **)(this + 0x48))(this + 0x30);
}
return;
}
|
|
1,534 | my_strnncollsp_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *end;
size_t length;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
return ((int) a[-1] - (int) b[-1]);
}
return a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
} | O0 | c | my_strnncollsp_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3f678
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x3f680
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x40(%rbp)
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3f6de
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x3f6dc
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x28(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3f735
jmp 0x3f693
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3f6ef
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x3f72f
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3f715
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
subq -0x40(%rbp), %rsi
callq 0x3eea0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
jmp 0x3f729
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x40(%rbp), %rsi
callq 0x3eea0
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| my_strnncollsp_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_3F678
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
jmp short loc_3F680
loc_3F678:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_3F680:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_50]
mov [rbp+var_40], rcx
add rax, rcx
mov [rbp+var_38], rax
loc_3F693:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_38]
jnb short loc_3F6DE
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_3F6DC
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx-1]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_3F735
loc_3F6DC:
jmp short loc_3F693
loc_3F6DE:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnz short loc_3F6EF
xor eax, eax
mov [rbp+var_54], eax
jmp short loc_3F72F
loc_3F6EF:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_3F715
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
sub rsi, [rbp+var_40]
call my_strnncollsp_padspace_bin
mov ecx, eax
xor eax, eax
sub eax, ecx
mov [rbp+var_58], eax
jmp short loc_3F729
loc_3F715:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
sub rsi, [rbp+var_40]
call my_strnncollsp_padspace_bin
mov [rbp+var_58], eax
loc_3F729:
mov eax, [rbp+var_58]
mov [rbp+var_54], eax
loc_3F72F:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_3F735:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long my_strnncollsp_8bit_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned __int8 *v5; // rax
unsigned __int8 *v6; // rcx
unsigned long long v10; // [rsp+10h] [rbp-50h]
unsigned __int8 *v12; // [rsp+48h] [rbp-18h]
v12 = a2;
if ( a3 >= a5 )
v10 = a5;
else
v10 = a3;
while ( v12 < &a2[v10] )
{
v5 = v12++;
v6 = a4++;
if ( *v5 != *v6 )
return (unsigned int)(*(v12 - 1) - *(a4 - 1));
}
if ( a3 == a5 )
{
return 0;
}
else if ( a3 >= a5 )
{
return (unsigned int)my_strnncollsp_padspace_bin(v12, a3 - v10);
}
else
{
return (unsigned int)-(int)my_strnncollsp_padspace_bin(a4, a5 - v10);
}
}
| my_strnncollsp_8bit_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0013f678
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013f680
LAB_0013f678:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_0013f680:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RCX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0013f693:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013f6de
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0013f6dc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + -0x1]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013f735
LAB_0013f6dc:
JMP 0x0013f693
LAB_0013f6de:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013f6ef
XOR EAX,EAX
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0013f72f
LAB_0013f6ef:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0013f715
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
SUB RSI,qword ptr [RBP + -0x40]
CALL 0x0013eea0
MOV ECX,EAX
XOR EAX,EAX
SUB EAX,ECX
MOV dword ptr [RBP + -0x58],EAX
JMP 0x0013f729
LAB_0013f715:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
SUB RSI,qword ptr [RBP + -0x40]
CALL 0x0013eea0
MOV dword ptr [RBP + -0x58],EAX
LAB_0013f729:
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
LAB_0013f72f:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013f735:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncollsp_8bit_bin
(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte *pbVar2;
int local_60;
int local_5c;
ulong local_58;
byte *local_30;
byte *local_20;
local_58 = param_5;
if (param_3 < param_5) {
local_58 = param_3;
}
pbVar1 = param_4;
pbVar2 = param_2;
do {
local_20 = pbVar2;
local_30 = pbVar1;
if (param_2 + local_58 <= local_20) {
if (param_3 == param_5) {
local_5c = 0;
}
else {
if (param_3 < param_5) {
local_60 = my_strnncollsp_padspace_bin(local_30,param_5 - local_58);
local_60 = -local_60;
}
else {
local_60 = my_strnncollsp_padspace_bin(local_20,param_3 - local_58);
}
local_5c = local_60;
}
return local_5c;
}
pbVar1 = local_30 + 1;
pbVar2 = local_20 + 1;
} while (*local_20 == *local_30);
return (uint)*local_20 - (uint)*local_30;
}
|
|
1,535 | graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*) | monkey531[P]llama/ggml/src/ggml-backend.cpp | static void graph_copy_init_tensor(struct ggml_hash_set * hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) {
size_t id = ggml_hash_find(hash_set, src);
if (node_init[id]) {
return;
}
node_init[id] = true;
struct ggml_tensor * dst = node_copies[id];
if (dst->view_src != NULL) {
graph_copy_init_tensor(hash_set, node_copies, node_init, src->view_src);
ggml_backend_view_init(dst);
}
else {
ggml_backend_tensor_copy(src, dst);
}
// init src
for (int i = 0; i < GGML_MAX_SRC; i++) {
struct ggml_tensor * s = src->src[i];
if (s == NULL) {
continue;
}
graph_copy_init_tensor(hash_set, node_copies, node_init, s);
}
} | O2 | cpp | graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rsi
callq 0x2ceec
cmpb $0x0, (%r14,%rax)
je 0x2ce86
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x1, (%r14,%rax)
movq (%r15,%rax,8), %r13
cmpq $0x0, 0xe8(%r13)
je 0x2ceb8
movq 0xe8(%rbx), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2ce58
movq %r13, %rdi
callq 0x1e220
jmp 0x2cec3
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1cad0
xorl %r13d, %r13d
cmpq $0xa, %r13
je 0x2ce7c
movq 0x98(%rbx,%r13,8), %rcx
testq %rcx, %rcx
je 0x2cee7
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2ce58
incq %r13
jmp 0x2cec6
| _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rsi, rcx
call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*)
cmp byte ptr [r14+rax], 0
jz short loc_2CE86
loc_2CE7C:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_2CE86:
mov byte ptr [r14+rax], 1
mov r13, [r15+rax*8]
cmp qword ptr [r13+0E8h], 0
jz short loc_2CEB8
mov rcx, [rbx+0E8h]
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_; graph_copy_init_tensor(ggml_hash_set *,ggml_tensor **,bool *,ggml_tensor *)
mov rdi, r13
call _ggml_backend_view_init
jmp short loc_2CEC3
loc_2CEB8:
mov rdi, rbx
mov rsi, r13
call _ggml_backend_tensor_copy
loc_2CEC3:
xor r13d, r13d
loc_2CEC6:
cmp r13, 0Ah
jz short loc_2CE7C
mov rcx, [rbx+r13*8+98h]
test rcx, rcx
jz short loc_2CEE7
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_; graph_copy_init_tensor(ggml_hash_set *,ggml_tensor **,bool *,ggml_tensor *)
loc_2CEE7:
inc r13
jmp short loc_2CEC6
| long long graph_copy_init_tensor(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long result; // rax
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // r13
long long i; // r13
long long v19; // rcx
result = ggml_hash_find(a1, a4);
if ( !*(_BYTE *)(a3 + result) )
{
*(_BYTE *)(a3 + result) = 1;
v17 = *(_QWORD *)(a2 + 8 * result);
if ( *(_QWORD *)(v17 + 232) )
{
graph_copy_init_tensor(a1, a2, a3, *(_QWORD *)(a4 + 232));
result = ggml_backend_view_init(v17);
}
else
{
result = ggml_backend_tensor_copy(a4, *(_QWORD *)(a2 + 8 * result), a5, a6, a7, a8, v15, v16, a11, a12);
}
for ( i = 0LL; i != 10; ++i )
{
v19 = *(_QWORD *)(a4 + 8 * i + 152);
if ( v19 )
result = graph_copy_init_tensor(a1, a2, a3, v19);
}
}
return result;
}
| graph_copy_init_tensor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RSI,RCX
CALL 0x0012ceec
CMP byte ptr [R14 + RAX*0x1],0x0
JZ 0x0012ce86
LAB_0012ce7c:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0012ce86:
MOV byte ptr [R14 + RAX*0x1],0x1
MOV R13,qword ptr [R15 + RAX*0x8]
CMP qword ptr [R13 + 0xe8],0x0
JZ 0x0012ceb8
MOV RCX,qword ptr [RBX + 0xe8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x0012ce58
MOV RDI,R13
CALL 0x0011e220
JMP 0x0012cec3
LAB_0012ceb8:
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011cad0
LAB_0012cec3:
XOR R13D,R13D
LAB_0012cec6:
CMP R13,0xa
JZ 0x0012ce7c
MOV RCX,qword ptr [RBX + R13*0x8 + 0x98]
TEST RCX,RCX
JZ 0x0012cee7
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x0012ce58
LAB_0012cee7:
INC R13
JMP 0x0012cec6
|
/* graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*) */
void graph_copy_init_tensor
(ggml_hash_set *param_1,ggml_tensor **param_2,bool *param_3,ggml_tensor *param_4)
{
ggml_tensor *pgVar1;
long lVar2;
lVar2 = ggml_hash_find(param_1,param_4);
if (param_3[lVar2] == false) {
param_3[lVar2] = true;
pgVar1 = param_2[lVar2];
if (*(long *)(pgVar1 + 0xe8) == 0) {
ggml_backend_tensor_copy(param_4,pgVar1);
}
else {
graph_copy_init_tensor(param_1,param_2,param_3,*(ggml_tensor **)(param_4 + 0xe8));
ggml_backend_view_init(pgVar1);
}
for (lVar2 = 0; lVar2 != 10; lVar2 = lVar2 + 1) {
if (*(ggml_tensor **)(param_4 + lVar2 * 8 + 0x98) != (ggml_tensor *)0x0) {
graph_copy_init_tensor
(param_1,param_2,param_3,*(ggml_tensor **)(param_4 + lVar2 * 8 + 0x98));
}
}
}
return;
}
|
|
1,536 | evmone::instr::core::rjumpv(evmone::StackTop, evmone::ExecutionState&, unsigned char const*) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline code_iterator rjumpv(StackTop stack, ExecutionState& /*state*/, code_iterator pc) noexcept
{
constexpr auto REL_OFFSET_SIZE = sizeof(int16_t);
const auto case_ = stack.pop();
const auto max_index = pc[1];
const auto pc_post = pc + 1 + 1 /* max_index */ + (max_index + 1) * REL_OFFSET_SIZE /* tbl */;
if (case_ > max_index)
{
return pc_post;
}
else
{
const auto rel_offset =
read_int16_be(&pc[2 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]);
return pc_post + rel_offset;
}
} | O2 | cpp | evmone::instr::core::rjumpv(evmone::StackTop, evmone::ExecutionState&, unsigned char const*):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
leaq 0x10(%rsp), %rdi
movaps %xmm1, 0x10(%rdi)
movaps %xmm0, (%rdi)
movzbl 0x1(%rdx), %eax
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
leaq (%rdx,%rax,2), %rbx
addq $0x4, %rbx
callq 0x3d29e
testb %al, %al
jne 0x3d293
movl 0x10(%rsp), %eax
movzwl %ax, %eax
movzbl 0x3(%r14,%rax,2), %ecx
movzbl 0x2(%r14,%rax,2), %eax
shll $0x8, %eax
movswq %ax, %rax
orq %rcx, %rax
addq %rax, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
| _ZN6evmone5instr4core6rjumpvENS_8StackTopERNS_14ExecutionStateEPKh:
push r14
push rbx
sub rsp, 38h
mov r14, rdx
movups xmm0, xmmword ptr [rdi]
movups xmm1, xmmword ptr [rdi+10h]
lea rdi, [rsp+48h+var_38]
movaps xmmword ptr [rdi+10h], xmm1
movaps xmmword ptr [rdi], xmm0
movzx eax, byte ptr [rdx+1]
lea rsi, [rsp+48h+var_39]
mov [rsi], al
lea rbx, [rdx+rax*2]
add rbx, 4
call _ZN4intxgtILj256EhvEEbRKNS_4uintIXT_EEERKT0_; intx::operator><256u,uchar,void>(intx::uint<256u> const&,uchar const&)
test al, al
jnz short loc_3D293
mov eax, [rsp+48h+var_38]
movzx eax, ax
movzx ecx, byte ptr [r14+rax*2+3]
movzx eax, byte ptr [r14+rax*2+2]
shl eax, 8
movsx rax, ax
or rax, rcx
add rbx, rax
loc_3D293:
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
| long long evmone::instr::core::rjumpv(__int128 *a1, long long a2, long long a3)
{
long long v4; // rbx
__int128 v6; // [rsp+10h] [rbp-38h]
v6 = *a1;
v4 = a3 + 2LL * *(unsigned __int8 *)(a3 + 1) + 4;
if ( !(unsigned __int8)intx::operator><256u,unsigned char,void>() )
v4 += *(unsigned __int8 *)(a3 + 2LL * (unsigned __int16)v6 + 3) | (unsigned long long)(__int16)(*(unsigned __int8 *)(a3 + 2LL * (unsigned __int16)v6 + 2) << 8);
return v4;
}
| rjumpv:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS XMM1,xmmword ptr [RDI + 0x10]
LEA RDI,[RSP + 0x10]
MOVAPS xmmword ptr [RDI + 0x10],XMM1
MOVAPS xmmword ptr [RDI],XMM0
MOVZX EAX,byte ptr [RDX + 0x1]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
LEA RBX,[RDX + RAX*0x2]
ADD RBX,0x4
CALL 0x0013d29e
TEST AL,AL
JNZ 0x0013d293
MOV EAX,dword ptr [RSP + 0x10]
MOVZX EAX,AX
MOVZX ECX,byte ptr [R14 + RAX*0x2 + 0x3]
MOVZX EAX,byte ptr [R14 + RAX*0x2 + 0x2]
SHL EAX,0x8
MOVSX RAX,AX
OR RAX,RCX
ADD RBX,RAX
LAB_0013d293:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* evmone::instr::core::rjumpv(evmone::StackTop, evmone::ExecutionState&, unsigned char const*) */
long evmone::instr::core::rjumpv(int8 *param_1,int8 param_2,long param_3)
{
bool bVar1;
long lVar2;
byte local_39;
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
local_38 = *param_1;
uStack_30 = param_1[1];
local_28 = param_1[2];
uStack_20 = param_1[3];
local_39 = *(byte *)(param_3 + 1);
lVar2 = param_3 + (ulong)local_39 * 2 + 4;
bVar1 = intx::operator>((uint *)&local_38,&local_39);
if (!bVar1) {
lVar2 = lVar2 + ((long)(short)((ushort)*(byte *)(param_3 + 2 +
(ulong)((uint)local_38 & 0xffff) * 2) << 8) |
(ulong)*(byte *)(param_3 + 3 + (ulong)((uint)local_38 & 0xffff) * 2));
}
return lVar2;
}
|
|
1,537 | init_variables | eloqsql/mysys/my_getopt.c | static void init_variables(const struct my_option *options,
init_func_p func_init_one_value)
{
DBUG_ENTER("init_variables");
for (; options->name; options++)
{
void *value;
DBUG_PRINT("options", ("name: '%s'", options->name));
/*
We must set u_max_value first as for some variables
options->u_max_value == options->value and in this case we want to
set the value to default value.
*/
if (options->u_max_value)
func_init_one_value(options, options->u_max_value, options->max_value);
value= options->var_type & GET_ASK_ADDR ?
(*my_getopt_get_addr)("", 0, options, 0) : options->value;
if (value)
func_init_one_value(options, value, options->def_value);
}
DBUG_VOID_RETURN;
} | O0 | c | init_variables:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xf6570
jmp 0xf64d0
jmp 0xf64d2
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xf64f7
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x50(%rcx), %rdx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0xf652c
leaq 0xb977b6(%rip), %rax # 0xc8dcc8
movq (%rax), %rax
movq -0x8(%rbp), %rdx
leaq 0x6bb16(%rip), %rdi # 0x162036
xorl %esi, %esi
xorl %ecx, %ecx
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0xf6538
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xf655d
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rdx
callq *%rax
jmp 0xf655f
movq -0x8(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x8(%rbp)
jmp 0xf64c0
jmp 0xf6572
jmp 0xf6574
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| init_variables:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_F64C0:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_F6570
jmp short $+2
loc_F64D0:
jmp short $+2
loc_F64D2:
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_F64F7
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_8]
mov rsi, [rcx+20h]
mov rcx, [rbp+var_8]
mov rdx, [rcx+50h]
call rax
loc_F64F7:
mov rax, [rbp+var_8]
mov rax, [rax+30h]
and rax, 80h
cmp rax, 0
jz short loc_F652C
lea rax, my_getopt_get_addr
mov rax, [rax]
mov rdx, [rbp+var_8]
lea rdi, asc_162032+4; ""
xor esi, esi
xor ecx, ecx
call rax
mov [rbp+var_20], rax
jmp short loc_F6538
loc_F652C:
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_20], rax
loc_F6538:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_F655D
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_8]
mov rdx, [rcx+40h]
call rax
loc_F655D:
jmp short $+2
loc_F655F:
mov rax, [rbp+var_8]
add rax, 70h ; 'p'
mov [rbp+var_8], rax
jmp loc_F64C0
loc_F6570:
jmp short $+2
loc_F6572:
jmp short $+2
loc_F6574:
add rsp, 20h
pop rbp
retn
| _QWORD * init_variables(_QWORD *a1, void ( *a2)(_QWORD *, long long, _QWORD))
{
_QWORD *result; // rax
long long addr; // [rsp+0h] [rbp-20h]
while ( 1 )
{
result = a1;
if ( !*a1 )
break;
if ( a1[4] )
a2(a1, a1[4], a1[10]);
if ( (a1[6] & 0x80LL) != 0 )
addr = my_getopt_get_addr("", 0LL, a1, 0LL);
else
addr = a1[3];
if ( addr )
a2(a1, addr, a1[8]);
a1 += 14;
}
return result;
}
| init_variables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_001f64c0:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001f6570
JMP 0x001f64d0
LAB_001f64d0:
JMP 0x001f64d2
LAB_001f64d2:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001f64f7
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x50]
CALL RAX
LAB_001f64f7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x30]
AND RAX,0x80
CMP RAX,0x0
JZ 0x001f652c
LEA RAX,[0xd8dcc8]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x8]
LEA RDI,[0x262036]
XOR ESI,ESI
XOR ECX,ECX
CALL RAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001f6538
LAB_001f652c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_001f6538:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001f655d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x40]
CALL RAX
LAB_001f655d:
JMP 0x001f655f
LAB_001f655f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x70
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f64c0
LAB_001f6570:
JMP 0x001f6572
LAB_001f6572:
JMP 0x001f6574
LAB_001f6574:
ADD RSP,0x20
POP RBP
RET
|
void init_variables(long *param_1,code *param_2)
{
long local_28;
long *local_10;
for (local_10 = param_1; *local_10 != 0; local_10 = local_10 + 0xe) {
if (local_10[4] != 0) {
(*param_2)(local_10,local_10[4],local_10[10]);
}
if ((local_10[6] & 0x80U) == 0) {
local_28 = local_10[3];
}
else {
local_28 = (*my_getopt_get_addr)(&DAT_00262036,0,local_10,0);
}
if (local_28 != 0) {
(*param_2)(local_10,local_28,local_10[8]);
}
}
return;
}
|
|
1,538 | test_bug15613 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug15613(MYSQL *mysql)
{
MYSQL_STMT *stmt;
const char *stmt_text;
MYSQL_RES *metadata;
MYSQL_FIELD *field;
int rc;
//https://jira.mariadb.org/browse/XPT-273
SKIP_XPAND;
/* I. Prepare the table */
rc= mysql_query(mysql, "set names latin1");
check_mysql_rc(rc, mysql);
mysql_query(mysql, "drop table if exists t1");
rc= mysql_query(mysql,
"create table t1 (t text character set utf8, "
"tt tinytext character set utf8, "
"mt mediumtext character set utf8, "
"lt longtext character set utf8, "
"vl varchar(255) character set latin1,"
"vb varchar(255) character set binary,"
"vu varchar(255) character set utf8)");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
/* II. Check SELECT metadata */
stmt_text= ("select t, tt, mt, lt, vl, vb, vu from t1");
rc= mysql_stmt_prepare(stmt, SL(stmt_text));
metadata= mysql_stmt_result_metadata(stmt);
field= mysql_fetch_fields(metadata);
FAIL_UNLESS(field[0].length == 65535, "length != 65535");
FAIL_UNLESS(field[1].length == 255, "length != 255");
FAIL_UNLESS(field[2].length == 16777215, "length != 166777215");
FAIL_UNLESS(field[3].length == 4294967295UL, "length != 4294967295UL");
FAIL_UNLESS(field[4].length == 255, "length != 255");
FAIL_UNLESS(field[5].length == 255, "length != 255");
FAIL_UNLESS(field[6].length == 255, "length != 255");
mysql_free_result(metadata);
mysql_stmt_free_result(stmt);
/* III. Cleanup */
rc= mysql_query(mysql, "drop table t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "set names default");
check_mysql_rc(rc, mysql);
mysql_stmt_close(stmt);
return OK;
} | O3 | c | test_bug15613:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x45c9b(%rip), %rdi # 0x62ce0
testq %rdi, %rdi
je 0x1d063
callq 0x2d402
leaq 0x295be(%rip), %rsi # 0x46614
movq %rax, %rdi
callq 0x14100
testq %rax, %rax
jne 0x1d0ce
leaq 0x295b0(%rip), %rdi # 0x4661a
callq 0x145b0
testq %rax, %rax
je 0x1d087
leaq 0x2aea5(%rip), %rsi # 0x47f20
movq %rax, %rdi
callq 0x14660
testl %eax, %eax
je 0x1d0ce
leaq 0x2bd39(%rip), %rsi # 0x48dc7
movq %rbx, %rdi
callq 0x2bbf9
testl %eax, %eax
je 0x1d0e3
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2dc72
movq %rax, %r15
movq %rbx, %rdi
callq 0x2dc5d
leaq 0x2926e(%rip), %rdi # 0x46325
leaq 0x29bff(%rip), %r8 # 0x46cbd
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x315, %r9d # imm = 0x315
jmp 0x1d137
leaq 0x2ae38(%rip), %rdi # 0x47f0d
xorl %eax, %eax
callq 0x264ef
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x1d143
leaq 0x2a038(%rip), %rsi # 0x47122
movq %rbx, %rdi
callq 0x2bbf9
leaq 0x2bcdf(%rip), %rsi # 0x48dd8
movq %rbx, %rdi
callq 0x2bbf9
testl %eax, %eax
je 0x1d14e
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2dc72
movq %rax, %r15
movq %rbx, %rdi
callq 0x2dc5d
leaq 0x29203(%rip), %rdi # 0x46325
leaq 0x29b94(%rip), %r8 # 0x46cbd
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x31f, %r9d # imm = 0x31F
xorl %eax, %eax
callq 0x264ef
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x322b8
movq %rax, %r14
leaq 0x2bd74(%rip), %rsi # 0x48ed4
movl $0x28, %edx
movq %rax, %rdi
callq 0x3267c
movq %r14, %rdi
callq 0x335a9
movq %rax, %r15
movq %rax, %rdi
callq 0x2dbc7
cmpq $0xffff, 0x38(%rax) # imm = 0xFFFF
jne 0x1d253
cmpq $0xff, 0xb8(%rax)
jne 0x1d272
cmpq $0xffffff, 0x138(%rax) # imm = 0xFFFFFF
jne 0x1d291
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, 0x1b8(%rax)
jne 0x1d2ad
cmpq $0xff, 0x238(%rax)
jne 0x1d2c9
cmpq $0xff, 0x2b8(%rax)
jne 0x1d2e5
cmpq $0xff, 0x338(%rax)
jne 0x1d301
movq %r15, %rdi
callq 0x278a6
movq %r14, %rdi
callq 0x32008
leaq 0x2ac4d(%rip), %rsi # 0x47e59
movq %rbx, %rdi
callq 0x2bbf9
testl %eax, %eax
je 0x1d327
movl %eax, %r15d
movq %rbx, %rdi
callq 0x2dc72
movq %rax, %r14
movq %rbx, %rdi
callq 0x2dc5d
leaq 0x290ec(%rip), %rdi # 0x46325
leaq 0x29a7d(%rip), %r8 # 0x46cbd
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x334, %r9d # imm = 0x334
jmp 0x1d137
leaq 0x28f86(%rip), %rdi # 0x461e0
leaq 0x2bc9c(%rip), %rsi # 0x48efd
leaq 0x29a55(%rip), %rdx # 0x46cbd
movl $0x328, %ecx # imm = 0x328
jmp 0x1d31b
leaq 0x28f67(%rip), %rdi # 0x461e0
leaq 0x2bc8d(%rip), %rsi # 0x48f0d
leaq 0x29a36(%rip), %rdx # 0x46cbd
movl $0x329, %ecx # imm = 0x329
jmp 0x1d31b
leaq 0x28f48(%rip), %rdi # 0x461e0
leaq 0x2bc7c(%rip), %rsi # 0x48f1b
leaq 0x29a17(%rip), %rdx # 0x46cbd
movl $0x32a, %ecx # imm = 0x32A
jmp 0x1d31b
leaq 0x28f2c(%rip), %rdi # 0x461e0
leaq 0x2bc74(%rip), %rsi # 0x48f2f
leaq 0x299fb(%rip), %rdx # 0x46cbd
movl $0x32b, %ecx # imm = 0x32B
jmp 0x1d31b
leaq 0x28f10(%rip), %rdi # 0x461e0
leaq 0x2bc36(%rip), %rsi # 0x48f0d
leaq 0x299df(%rip), %rdx # 0x46cbd
movl $0x32c, %ecx # imm = 0x32C
jmp 0x1d31b
leaq 0x28ef4(%rip), %rdi # 0x461e0
leaq 0x2bc1a(%rip), %rsi # 0x48f0d
leaq 0x299c3(%rip), %rdx # 0x46cbd
movl $0x32d, %ecx # imm = 0x32D
jmp 0x1d31b
leaq 0x28ed8(%rip), %rdi # 0x461e0
leaq 0x2bbfe(%rip), %rsi # 0x48f0d
leaq 0x299a7(%rip), %rdx # 0x46cbd
movl $0x32e, %ecx # imm = 0x32E
xorl %eax, %eax
callq 0x264ef
jmp 0x1d13e
leaq 0x2bc18(%rip), %rsi # 0x48f46
movq %rbx, %rdi
callq 0x2bbf9
testl %eax, %eax
je 0x1d371
movl %eax, %r15d
movq %rbx, %rdi
callq 0x2dc72
movq %rax, %r14
movq %rbx, %rdi
callq 0x2dc5d
leaq 0x28fce(%rip), %rdi # 0x46325
leaq 0x2995f(%rip), %r8 # 0x46cbd
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x336, %r9d # imm = 0x336
jmp 0x1d137
movq %r14, %rdi
callq 0x31cc9
xorl %eax, %eax
jmp 0x1d143
| test_bug15613:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, cs:mysql_default
test rdi, rdi
jz short loc_1D063
call mysql_get_server_info
lea rsi, aXpand; "Xpand"
mov rdi, rax
call _strstr
test rax, rax
jnz short loc_1D0CE
loc_1D063:
lea rdi, aSrv; "srv"
call _getenv
test rax, rax
jz short loc_1D087
lea rsi, aTestDisabledWi_0+13h; "xpand"
mov rdi, rax
call _strcmp
test eax, eax
jz short loc_1D0CE
loc_1D087:
lea rsi, aSetNamesLatin1; "set names latin1"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1D0E3
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 315h
jmp short loc_1D137
loc_1D0CE:
lea rdi, aTestDisabledWi_0; "test disabled with xpand"
xor eax, eax
call diag
mov eax, 0FFFFFFFFh
jmp short loc_1D143
loc_1D0E3:
lea rsi, aDropTableIfExi; "drop table if exists t1"
mov rdi, rbx
call mysql_query
lea rsi, aCreateTableT1T; "create table t1 (t text character set u"...
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1D14E
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 31Fh
loc_1D137:
xor eax, eax
call diag
loc_1D13E:
mov eax, 1
loc_1D143:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1D14E:
mov rdi, rbx
call mysql_stmt_init
mov r14, rax
lea rsi, aSelectTTtMtLtV; "select t, tt, mt, lt, vl, vb, vu from t"...
mov edx, 28h ; '('
mov rdi, rax
call mysql_stmt_prepare
mov rdi, r14
call mysql_stmt_result_metadata
mov r15, rax
mov rdi, rax
call mysql_fetch_fields
cmp qword ptr [rax+38h], 0FFFFh
jnz loc_1D253
cmp qword ptr [rax+0B8h], 0FFh
jnz loc_1D272
cmp qword ptr [rax+138h], 0FFFFFFh
jnz loc_1D291
mov ecx, 0FFFFFFFFh
cmp [rax+1B8h], rcx
jnz loc_1D2AD
cmp qword ptr [rax+238h], 0FFh
jnz loc_1D2C9
cmp qword ptr [rax+2B8h], 0FFh
jnz loc_1D2E5
cmp qword ptr [rax+338h], 0FFh
jnz loc_1D301
mov rdi, r15
call mysql_free_result
mov rdi, r14
call mysql_stmt_free_result
lea rsi, aDropTableT1_0; "drop table t1"
mov rdi, rbx
call mysql_query
test eax, eax
jz loc_1D327
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 334h
jmp loc_1D137
loc_1D253:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength65535; "length != 65535"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 328h
jmp loc_1D31B
loc_1D272:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength255; "length != 255"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 329h
jmp loc_1D31B
loc_1D291:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength16677721; "length != 166777215"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 32Ah
jmp short loc_1D31B
loc_1D2AD:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength42949672; "length != 4294967295UL"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 32Bh
jmp short loc_1D31B
loc_1D2C9:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength255; "length != 255"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 32Ch
jmp short loc_1D31B
loc_1D2E5:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength255; "length != 255"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 32Dh
jmp short loc_1D31B
loc_1D301:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aLength255; "length != 255"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 32Eh
loc_1D31B:
xor eax, eax
call diag
jmp loc_1D13E
loc_1D327:
lea rsi, aSetNamesDefaul; "set names default"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1D371
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 336h
jmp loc_1D137
loc_1D371:
mov rdi, r14
call mysql_stmt_close
xor eax, eax
jmp loc_1D143
| long long test_bug15613(long long a1)
{
long long server_info; // rax
char *v2; // rsi
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // rax
int v8; // eax
int v9; // r14d
int v10; // r15d
int v11; // eax
const char *v12; // rdi
const char *v13; // r8
const char *v14; // rsi
const char *v15; // rdx
int v16; // ecx
int v17; // r9d
int v19; // eax
int v20; // r14d
int v21; // r15d
int v22; // eax
long long v23; // r14
long long v24; // r15
_QWORD *fields; // rax
int v26; // eax
int v27; // r15d
int v28; // r14d
int v29; // eax
int v30; // eax
int v31; // r15d
int v32; // r14d
int v33; // eax
if ( mysql_default && (server_info = mysql_get_server_info(mysql_default), v2 = "Xpand", strstr(server_info, "Xpand"))
|| (v7 = getenv("srv")) != 0 && (v2 = "xpand", !(unsigned int)strcmp(v7, "xpand")) )
{
diag((unsigned int)"test disabled with xpand", (_DWORD)v2, v3, v4, v5, v6);
return 0xFFFFFFFFLL;
}
v8 = mysql_query(a1, "set names latin1");
if ( v8 )
{
v9 = v8;
v10 = mysql_error(a1);
v11 = mysql_errno(a1);
v12 = "Error (%d): %s (%d) in %s line %d";
v13 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
LODWORD(v14) = v9;
LODWORD(v15) = v10;
v16 = v11;
v17 = 789;
LABEL_10:
diag((_DWORD)v12, (_DWORD)v14, (_DWORD)v15, v16, (_DWORD)v13, v17);
return 1LL;
}
mysql_query(a1, "drop table if exists t1");
v19 = mysql_query(
a1,
"create table t1 (t text character set utf8, tt tinytext character set utf8, mt mediumtext character set utf8, "
"lt longtext character set utf8, vl varchar(255) character set latin1,vb varchar(255) character set binary,vu v"
"archar(255) character set utf8)");
if ( v19 )
{
v20 = v19;
v21 = mysql_error(a1);
v22 = mysql_errno(a1);
v12 = "Error (%d): %s (%d) in %s line %d";
v13 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
LODWORD(v14) = v20;
LODWORD(v15) = v21;
v16 = v22;
v17 = 799;
goto LABEL_10;
}
v23 = mysql_stmt_init(a1);
mysql_stmt_prepare(v23, "select t, tt, mt, lt, vl, vb, vu from t1", 40LL);
v24 = mysql_stmt_result_metadata(v23);
fields = (_QWORD *)mysql_fetch_fields(v24);
if ( fields[7] != 0xFFFFLL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 65535";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 808;
goto LABEL_10;
}
if ( fields[23] != 255LL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 255";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 809;
goto LABEL_10;
}
if ( fields[39] != 0xFFFFFFLL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 166777215";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 810;
goto LABEL_10;
}
if ( fields[55] != 0xFFFFFFFFLL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 4294967295UL";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 811;
goto LABEL_10;
}
if ( fields[71] != 255LL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 255";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 812;
goto LABEL_10;
}
if ( fields[87] != 255LL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 255";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 813;
goto LABEL_10;
}
if ( fields[103] != 255LL )
{
v12 = "Error: %s (%s: %d)";
v14 = "length != 255";
v15 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
v16 = 814;
goto LABEL_10;
}
mysql_free_result(v24);
mysql_stmt_free_result(v23);
v26 = mysql_query(a1, "drop table t1");
if ( v26 )
{
v27 = v26;
v28 = mysql_error(a1);
v29 = mysql_errno(a1);
v12 = "Error (%d): %s (%d) in %s line %d";
v13 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
LODWORD(v14) = v27;
LODWORD(v15) = v28;
v16 = v29;
v17 = 820;
goto LABEL_10;
}
v30 = mysql_query(a1, "set names default");
if ( v30 )
{
v31 = v30;
v32 = mysql_error(a1);
v33 = mysql_errno(a1);
v12 = "Error (%d): %s (%d) in %s line %d";
v13 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c";
LODWORD(v14) = v31;
LODWORD(v15) = v32;
v16 = v33;
v17 = 822;
goto LABEL_10;
}
mysql_stmt_close(v23);
return 0LL;
}
| test_bug15613:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [0x00162ce0]
TEST RDI,RDI
JZ 0x0011d063
CALL 0x0012d402
LEA RSI,[0x146614]
MOV RDI,RAX
CALL 0x00114100
TEST RAX,RAX
JNZ 0x0011d0ce
LAB_0011d063:
LEA RDI,[0x14661a]
CALL 0x001145b0
TEST RAX,RAX
JZ 0x0011d087
LEA RSI,[0x147f20]
MOV RDI,RAX
CALL 0x00114660
TEST EAX,EAX
JZ 0x0011d0ce
LAB_0011d087:
LEA RSI,[0x148dc7]
MOV RDI,RBX
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x0011d0e3
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0012dc72
MOV R15,RAX
MOV RDI,RBX
CALL 0x0012dc5d
LEA RDI,[0x146325]
LEA R8,[0x146cbd]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x315
JMP 0x0011d137
LAB_0011d0ce:
LEA RDI,[0x147f0d]
XOR EAX,EAX
CALL 0x001264ef
MOV EAX,0xffffffff
JMP 0x0011d143
LAB_0011d0e3:
LEA RSI,[0x147122]
MOV RDI,RBX
CALL 0x0012bbf9
LEA RSI,[0x148dd8]
MOV RDI,RBX
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x0011d14e
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0012dc72
MOV R15,RAX
MOV RDI,RBX
CALL 0x0012dc5d
LEA RDI,[0x146325]
LEA R8,[0x146cbd]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x31f
LAB_0011d137:
XOR EAX,EAX
CALL 0x001264ef
LAB_0011d13e:
MOV EAX,0x1
LAB_0011d143:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011d14e:
MOV RDI,RBX
CALL 0x001322b8
MOV R14,RAX
LEA RSI,[0x148ed4]
MOV EDX,0x28
MOV RDI,RAX
CALL 0x0013267c
MOV RDI,R14
CALL 0x001335a9
MOV R15,RAX
MOV RDI,RAX
CALL 0x0012dbc7
CMP qword ptr [RAX + 0x38],0xffff
JNZ 0x0011d253
CMP qword ptr [RAX + 0xb8],0xff
JNZ 0x0011d272
CMP qword ptr [RAX + 0x138],0xffffff
JNZ 0x0011d291
MOV ECX,0xffffffff
CMP qword ptr [RAX + 0x1b8],RCX
JNZ 0x0011d2ad
CMP qword ptr [RAX + 0x238],0xff
JNZ 0x0011d2c9
CMP qword ptr [RAX + 0x2b8],0xff
JNZ 0x0011d2e5
CMP qword ptr [RAX + 0x338],0xff
JNZ 0x0011d301
MOV RDI,R15
CALL 0x001278a6
MOV RDI,R14
CALL 0x00132008
LEA RSI,[0x147e59]
MOV RDI,RBX
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x0011d327
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0012dc72
MOV R14,RAX
MOV RDI,RBX
CALL 0x0012dc5d
LEA RDI,[0x146325]
LEA R8,[0x146cbd]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x334
JMP 0x0011d137
LAB_0011d253:
LEA RDI,[0x1461e0]
LEA RSI,[0x148efd]
LEA RDX,[0x146cbd]
MOV ECX,0x328
JMP 0x0011d31b
LAB_0011d272:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f0d]
LEA RDX,[0x146cbd]
MOV ECX,0x329
JMP 0x0011d31b
LAB_0011d291:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f1b]
LEA RDX,[0x146cbd]
MOV ECX,0x32a
JMP 0x0011d31b
LAB_0011d2ad:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f2f]
LEA RDX,[0x146cbd]
MOV ECX,0x32b
JMP 0x0011d31b
LAB_0011d2c9:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f0d]
LEA RDX,[0x146cbd]
MOV ECX,0x32c
JMP 0x0011d31b
LAB_0011d2e5:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f0d]
LEA RDX,[0x146cbd]
MOV ECX,0x32d
JMP 0x0011d31b
LAB_0011d301:
LEA RDI,[0x1461e0]
LEA RSI,[0x148f0d]
LEA RDX,[0x146cbd]
MOV ECX,0x32e
LAB_0011d31b:
XOR EAX,EAX
CALL 0x001264ef
JMP 0x0011d13e
LAB_0011d327:
LEA RSI,[0x148f46]
MOV RDI,RBX
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x0011d371
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0012dc72
MOV R14,RAX
MOV RDI,RBX
CALL 0x0012dc5d
LEA RDI,[0x146325]
LEA R8,[0x146cbd]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x336
JMP 0x0011d137
LAB_0011d371:
MOV RDI,R14
CALL 0x00131cc9
XOR EAX,EAX
JMP 0x0011d143
|
int8 test_bug15613(int8 param_1)
{
int iVar1;
int4 uVar2;
char *pcVar3;
int8 uVar4;
long lVar5;
int8 uVar6;
if (mysql_default != 0) {
pcVar3 = (char *)mysql_get_server_info();
pcVar3 = strstr(pcVar3,"Xpand");
if (pcVar3 != (char *)0x0) goto LAB_0011d0ce;
}
pcVar3 = getenv("srv");
if ((pcVar3 != (char *)0x0) && (iVar1 = strcmp(pcVar3,"xpand"), iVar1 == 0)) {
LAB_0011d0ce:
diag("test disabled with xpand");
return 0xffffffff;
}
iVar1 = mysql_query(param_1,"set names latin1");
if (iVar1 == 0) {
mysql_query(param_1,"drop table if exists t1");
iVar1 = mysql_query(param_1,
"create table t1 (t text character set utf8, tt tinytext character set utf8, mt mediumtext character set utf8, lt longtext character set utf8, vl varchar(255) character set latin1,vb varchar(255) character set binary,vu varchar(255) character set utf8)"
);
if (iVar1 == 0) {
uVar4 = mysql_stmt_init(param_1);
mysql_stmt_prepare(uVar4,"select t, tt, mt, lt, vl, vb, vu from t1",0x28);
uVar6 = mysql_stmt_result_metadata(uVar4);
lVar5 = mysql_fetch_fields(uVar6);
if (*(long *)(lVar5 + 0x38) == 0xffff) {
if (*(long *)(lVar5 + 0xb8) == 0xff) {
if (*(long *)(lVar5 + 0x138) == 0xffffff) {
if (*(long *)(lVar5 + 0x1b8) == 0xffffffff) {
if (*(long *)(lVar5 + 0x238) == 0xff) {
if (*(long *)(lVar5 + 0x2b8) == 0xff) {
if (*(long *)(lVar5 + 0x338) == 0xff) {
mysql_free_result(uVar6);
mysql_stmt_free_result(uVar4);
iVar1 = mysql_query(param_1,"drop table t1");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"set names default");
if (iVar1 == 0) {
mysql_stmt_close(uVar4);
return 0;
}
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x336;
}
else {
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x334;
}
goto LAB_0011d137;
}
pcVar3 = "length != 255";
uVar4 = 0x32e;
}
else {
pcVar3 = "length != 255";
uVar4 = 0x32d;
}
}
else {
pcVar3 = "length != 255";
uVar4 = 0x32c;
}
}
else {
pcVar3 = "length != 4294967295UL";
uVar4 = 0x32b;
}
}
else {
pcVar3 = "length != 166777215";
uVar4 = 0x32a;
}
}
else {
pcVar3 = "length != 255";
uVar4 = 0x329;
}
}
else {
pcVar3 = "length != 65535";
uVar4 = 0x328;
}
diag("Error: %s (%s: %d)",pcVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",uVar4
);
return 1;
}
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 799;
}
else {
uVar4 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar6 = 0x315;
}
LAB_0011d137:
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",uVar6);
return 1;
}
|
|
1,539 | ma_store_blob_length | eloqsql/storage/maria/ma_dynrec.c | void _ma_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O0 | c | ma_store_blob_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x3fcba
movq -0x28(%rbp), %rax
leaq 0x1191af(%rip), %rcx # 0x158df8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
jmp 0x3fcbc
jmp 0x3fc61
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0x3fcbc
jmp 0x3fc7a
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x3fcbc
jmp 0x3fca7
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3fcba
jmp 0x3fcbc
popq %rbp
retq
nop
| _ma_store_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 3
ja short def_3FC50; jumptable 000000000003FC50 default case
mov rax, [rbp+var_28]
lea rcx, jpt_3FC50
movsxd rax, ds:(jpt_3FC50 - 158DF8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_3FC52:
mov eax, [rbp+var_10]; jumptable 000000000003FC50 case 1
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
jmp short loc_3FCBC
loc_3FC5F:
jmp short $+2; jumptable 000000000003FC50 case 2
loc_3FC61:
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov eax, [rbp+var_10]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax], cx
jmp short loc_3FCBC
loc_3FC78:
jmp short $+2; jumptable 000000000003FC50 case 3
loc_3FC7A:
mov eax, [rbp+var_10]
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
mov eax, [rbp+var_10]
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov [rax+1], cl
mov eax, [rbp+var_10]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_8]
mov [rax+2], cl
jmp short loc_3FCBC
loc_3FCA5:
jmp short $+2; jumptable 000000000003FC50 case 4
loc_3FCA7:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov ecx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], ecx
jmp short $+2; jumptable 000000000003FC50 default case
def_3FC50:
jmp short $+2; jumptable 000000000003FC50 default case
loc_3FCBC:
pop rbp
retn
| unsigned long long ma_store_blob_length(_BYTE *a1, int a2, int a3)
{
unsigned long long result; // rax
result = (unsigned int)(a2 - 1);
switch ( a2 )
{
case 1:
result = (unsigned long long)a1;
*a1 = a3;
break;
case 2:
result = (unsigned long long)a1;
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
result = (unsigned long long)a1;
a1[2] = BYTE2(a3);
break;
case 4:
result = (unsigned long long)a1;
*(_DWORD *)a1 = a3;
break;
default:
return result;
}
return result;
}
| _ma_store_blob_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x3
JA 0x0013fcba
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x258df8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
JMP 0x0013fcbc
caseD_2:
JMP 0x0013fc61
LAB_0013fc61:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],CX
JMP 0x0013fcbc
caseD_3:
JMP 0x0013fc7a
LAB_0013fc7a:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],CL
JMP 0x0013fcbc
caseD_4:
JMP 0x0013fca7
LAB_0013fca7:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
JMP 0x0013fcba
LAB_0013fcba:
JMP 0x0013fcbc
default:
POP RBP
RET
|
void _ma_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
|
|
1,540 | 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() | monkey531[P]llama/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();
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x3edb1
leaq 0x28(%rdi), %rcx
jmp 0x3edbe
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x3edc4
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x3eddb
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x3eddc
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x72e02(%rip), %rdi # 0xb1be6
leaq 0x6d355(%rip), %rdx # 0xac140
leaq 0x72fbc(%rip), %rcx # 0xb1dae
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x24e90
| _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_3EDB1
lea rcx, [rdi+28h]
jmp short loc_3EDBE
loc_3EDB1:
mov rax, [rdi+30h]
test rax, rax
jz short loc_3EDC4
lea rcx, [rdi+30h]
loc_3EDBE:
dec rax
mov [rcx], rax
loc_3EDC4:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_3EDDB
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_3EDDC
dec rax
mov [rdi+40h], rax
locret_3EDDB:
retn
loc_3EDDC:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| 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
long long v3; // rax
*(_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 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return std::vector<char>::emplace_back<char>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0013edb1
LEA RCX,[RDI + 0x28]
JMP 0x0013edbe
LAB_0013edb1:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0013edc4
LEA RCX,[RDI + 0x30]
LAB_0013edbe:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0013edc4:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0013eddb
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x0013eddc
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_0013eddb:
RET
LAB_0013eddc:
PUSH RAX
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b1dae]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x00124e90
|
/* 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;
int8 in_R8;
int8 in_R9;
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_0013edc4;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0013edc4:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
|
|
1,541 | 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() | monkey531[P]llama/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 0x596cf
leaq 0x28(%rdi), %rcx
jmp 0x596dc
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x596e2
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x596f9
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x596fa
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x944e1(%rip), %rdi # 0xedbe3
leaq 0x8ea37(%rip), %rdx # 0xe8140
leaq 0x9468c(%rip), %rcx # 0xedd9c
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x1be80
| _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_596CF
lea rcx, [rdi+28h]
jmp short loc_596DC
loc_596CF:
mov rax, [rdi+30h]
test rax, rax
jz short loc_596E2
lea rcx, [rdi+30h]
loc_596DC:
dec rax
mov [rcx], rax
loc_596E2:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_596F9
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_596FA
dec rax
mov [rdi+40h], rax
locret_596F9:
retn
loc_596FA:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| 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
long long v3; // rax
*(_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 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return std::vector<char>::emplace_back<char>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x001596cf
LEA RCX,[RDI + 0x28]
JMP 0x001596dc
LAB_001596cf:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x001596e2
LEA RCX,[RDI + 0x30]
LAB_001596dc:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_001596e2:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x001596f9
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x001596fa
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_001596f9:
RET
LAB_001596fa:
PUSH RAX
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1edd9c]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x0011be80
|
/* 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;
int8 in_R8;
int8 in_R9;
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_001596e2;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_001596e2:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
|
|
1,542 | trnman_init | eloqsql/storage/maria/trnman.c | int trnman_init(TrID initial_trid)
{
DBUG_ENTER("trnman_init");
DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid));
short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!short_trid_to_active_trn))
DBUG_RETURN(1);
short_trid_to_active_trn--; /* min short_id is 1 */
/*
Initialize lists.
active_list_max.min_read_from must be larger than any trid,
so that when an active list is empty we would could free
all committed list.
And committed_list_max itself can not be freed so
committed_list_max.commit_trid must not be smaller that
active_list_max.min_read_from
*/
active_list_max.trid= active_list_min.trid= 0;
active_list_max.min_read_from= MAX_TRID;
active_list_max.next= active_list_min.prev= 0;
active_list_max.prev= &active_list_min;
active_list_min.next= &active_list_max;
committed_list_max.commit_trid= MAX_TRID;
committed_list_max.next= committed_list_min.prev= 0;
committed_list_max.prev= &committed_list_min;
committed_list_min.next= &committed_list_max;
trnman_active_transactions= 0;
trnman_committed_transactions= 0;
trnman_allocated_transactions= 0;
/* This is needed for recovery and repair */
dummy_transaction_object.min_read_from= ~(TrID) 0;
dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
pool= 0;
global_trid_generator= initial_trid;
trid_min_read_from= initial_trid;
lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE,
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
DBUG_RETURN(0);
} | O3 | c | trnman_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x30
popq %rdx
movl $0x7fff8, %esi # imm = 0x7FFF8
xorl %edi, %edi
callq 0xa0c8d
movq %rax, 0x3d50aa(%rip) # 0x3ff420
testq %rax, %rax
je 0x2a4c2
andq $0x0, 0x3d5119(%rip) # 0x3ff4a0
andq $0x0, 0x3d51c1(%rip) # 0x3ff550
addq $-0x8, %rax
orq $-0x1, 0x3d51bd(%rip) # 0x3ff558
movq %rax, 0x3d507e(%rip) # 0x3ff420
andq $0x0, 0x3d50ee(%rip) # 0x3ff498
leaq 0x3d5077(%rip), %rax # 0x3ff428
andq $0x0, 0x3d5187(%rip) # 0x3ff540
leaq 0x3d5118(%rip), %rcx # 0x3ff4d8
orq $-0x1, 0x3d5248(%rip) # 0x3ff610
movq %rax, 0x3d5179(%rip) # 0x3ff548
andq $0x0, 0x3d52d1(%rip) # 0x3ff6a8
movq %rcx, 0x3d50b2(%rip) # 0x3ff490
andq $0x0, 0x3d520a(%rip) # 0x3ff5f0
leaq 0x3d519b(%rip), %rax # 0x3ff588
andl $0x0, 0x3d52f4(%rip) # 0x3ff6e8
leaq 0x3d523d(%rip), %rcx # 0x3ff638
andl $0x0, 0x3d52ea(%rip) # 0x3ff6ec
movq %rcx, 0x3d51ef(%rip) # 0x3ff5f8
andl $0x0, 0x3d52e0(%rip) # 0x3ff6f0
leaq 0x3d4e79(%rip), %rcx # 0x3ff290
orq $-0x1, 0x80(%rcx)
movq %rax, 0x3d527a(%rip) # 0x3ff6a0
andq $0x0, 0x3d52ca(%rip) # 0x3ff6f8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0xa0(%rcx)
movq %r14, 0x3d52ba(%rip) # 0x3ff700
movq %r14, 0x35bdeb(%rip) # 0x386238
andq $0x0, (%rsp)
leaq 0x3d52af(%rip), %rdi # 0x3ff708
leaq 0x1d3f5(%rip), %r9 # 0x47855
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa6af0
leaq 0x3d4f09(%rip), %rax # 0x3ff380
movl (%rax), %edi
leaq 0x35dc40(%rip), %rax # 0x3880c0
movq (%rax), %rax
leaq 0x3d5346(%rip), %r14 # 0x3ff7d0
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x3d5379(%rip) # 0x3ff810
movq %r14, 0x3d536a(%rip) # 0x3ff808
xorps %xmm0, %xmm0
movups %xmm0, 0x3d5350(%rip) # 0x3ff7f8
leaq 0xbe0831(%rip), %rsi # 0xc0ace0
movq %r14, %rdi
callq 0x29340
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rbx
jmp 0x2a4b7
| trnman_init:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rdi
xor ebx, ebx
push 30h ; '0'
pop rdx
mov esi, 7FFF8h
xor edi, edi
call my_malloc
mov cs:short_trid_to_active_trn, rax
test rax, rax
jz loc_2A4C2
and cs:qword_3FF4A0, 0
and cs:qword_3FF550, 0
add rax, 0FFFFFFFFFFFFFFF8h
or cs:qword_3FF558, 0FFFFFFFFFFFFFFFFh
mov cs:short_trid_to_active_trn, rax
and cs:qword_3FF498, 0
lea rax, active_list_min
and cs:qword_3FF540, 0
lea rcx, active_list_max
or cs:qword_3FF610, 0FFFFFFFFFFFFFFFFh
mov cs:qword_3FF548, rax
and cs:qword_3FF6A8, 0
mov cs:qword_3FF490, rcx
and cs:qword_3FF5F0, 0
lea rax, committed_list_max
and cs:trnman_active_transactions, 0
lea rcx, committed_list_min
and cs:trnman_committed_transactions, 0
mov cs:qword_3FF5F8, rcx
and cs:trnman_allocated_transactions, 0
lea rcx, dummy_transaction_object
or qword ptr [rcx+80h], 0FFFFFFFFFFFFFFFFh
mov cs:qword_3FF6A0, rax
and cs:pool, 0
mov rax, 8000000000000000h
mov [rcx+0A0h], rax
mov cs:global_trid_generator, r14
mov cs:trid_min_read_from, r14
and [rsp+20h+var_20], 0
lea rdi, trid_to_trn
lea r9, trn_get_hash_key
push 8
pop rsi
push 1
pop rdx
xor ecx, ecx
xor r8d, r8d
call lf_hash_init
lea rax, key_LOCK_trn_list
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
lea r14, LOCK_trn_list
mov rsi, r14
call qword ptr [rax+40h]
mov cs:qword_3FF810, rax
mov cs:qword_3FF808, r14
xorps xmm0, xmm0
movups cs:xmmword_3FF7F8, xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
loc_2A4B7:
mov eax, ebx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_2A4C2:
push 1
pop rbx
jmp short loc_2A4B7
| long long trnman_init(long long a1)
{
unsigned int v1; // ebx
long long v2; // rax
v1 = 0;
v2 = my_malloc(0LL, 524280LL, 48LL);
short_trid_to_active_trn = v2;
if ( v2 )
{
qword_3FF4A0 = 0LL;
qword_3FF550 = 0LL;
qword_3FF558 = -1LL;
short_trid_to_active_trn = v2 - 8;
qword_3FF498 = 0LL;
qword_3FF540 = 0LL;
qword_3FF610 = -1LL;
qword_3FF548 = (long long)&active_list_min;
qword_3FF6A8 = 0LL;
qword_3FF490 = (long long)&active_list_max;
qword_3FF5F0 = 0LL;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
qword_3FF5F8 = (long long)&committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object[16] = -1LL;
qword_3FF6A0 = (long long)&committed_list_max;
pool = 0LL;
dummy_transaction_object[20] = 0x8000000000000000LL;
global_trid_generator = a1;
trid_min_read_from = a1;
lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL);
qword_3FF810 = ((long long ( *)(_QWORD, void *))PSI_server[8])(key_LOCK_trn_list, &LOCK_trn_list);
qword_3FF808 = (long long)&LOCK_trn_list;
xmmword_3FF7F8 = 0LL;
pthread_mutex_init(&LOCK_trn_list, &my_fast_mutexattr);
}
else
{
return 1;
}
return v1;
}
| trnman_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
XOR EBX,EBX
PUSH 0x30
POP RDX
MOV ESI,0x7fff8
XOR EDI,EDI
CALL 0x001a0c8d
MOV qword ptr [0x004ff420],RAX
TEST RAX,RAX
JZ 0x0012a4c2
AND qword ptr [0x004ff4a0],0x0
AND qword ptr [0x004ff550],0x0
ADD RAX,-0x8
OR qword ptr [0x004ff558],-0x1
MOV qword ptr [0x004ff420],RAX
AND qword ptr [0x004ff498],0x0
LEA RAX,[0x4ff428]
AND qword ptr [0x004ff540],0x0
LEA RCX,[0x4ff4d8]
OR qword ptr [0x004ff610],-0x1
MOV qword ptr [0x004ff548],RAX
AND qword ptr [0x004ff6a8],0x0
MOV qword ptr [0x004ff490],RCX
AND qword ptr [0x004ff5f0],0x0
LEA RAX,[0x4ff588]
AND dword ptr [0x004ff6e8],0x0
LEA RCX,[0x4ff638]
AND dword ptr [0x004ff6ec],0x0
MOV qword ptr [0x004ff5f8],RCX
AND dword ptr [0x004ff6f0],0x0
LEA RCX,[0x4ff290]
OR qword ptr [RCX + 0x80],-0x1
MOV qword ptr [0x004ff6a0],RAX
AND qword ptr [0x004ff6f8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RCX + 0xa0],RAX
MOV qword ptr [0x004ff700],R14
MOV qword ptr [0x00486238],R14
AND qword ptr [RSP],0x0
LEA RDI,[0x4ff708]
LEA R9,[0x147855]
PUSH 0x8
POP RSI
PUSH 0x1
POP RDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001a6af0
LEA RAX,[0x4ff380]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
LEA R14,[0x4ff7d0]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [0x004ff810],RAX
MOV qword ptr [0x004ff808],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x004ff7f8],XMM0
LEA RSI,[0xd0ace0]
MOV RDI,R14
CALL 0x00129340
LAB_0012a4b7:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0012a4c2:
PUSH 0x1
POP RBX
JMP 0x0012a4b7
|
bool trnman_init(int8 param_1)
{
long lVar1;
lVar1 = my_malloc(0,0x7fff8,0x30);
if (lVar1 == 0) {
short_trid_to_active_trn = 0;
}
else {
active_list_min._120_8_ = 0;
active_list_max._120_8_ = 0;
short_trid_to_active_trn = lVar1 + -8;
active_list_max._128_8_ = 0xffffffffffffffff;
active_list_min._112_8_ = 0;
active_list_max._104_8_ = 0;
committed_list_max._136_8_ = 0xffffffffffffffff;
active_list_max._112_8_ = active_list_min;
committed_list_min._112_8_ = 0;
active_list_min._104_8_ = active_list_max;
committed_list_max._104_8_ = 0;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
committed_list_max._112_8_ = committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object._128_8_ = 0xffffffffffffffff;
committed_list_min._104_8_ = committed_list_max;
pool = 0;
dummy_transaction_object._160_8_ = 0x8000000000000000;
trid_min_read_from = param_1;
global_trid_generator = param_1;
lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0);
LOCK_trn_list._64_8_ = (**(code **)(PSI_server + 0x40))(key_LOCK_trn_list,LOCK_trn_list);
LOCK_trn_list._56_8_ = LOCK_trn_list;
LOCK_trn_list._40_8_ = 0;
LOCK_trn_list._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)LOCK_trn_list,(pthread_mutexattr_t *)&my_fast_mutexattr);
}
return lVar1 == 0;
}
|
|
1,543 | c4_eth_create_tx_path | corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c | INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
} | O0 | c | c4_eth_create_tx_path:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x231c0
movl $0x0, -0x58(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffe0, -0x48(%rbp) # imm = 0xFFFFFFE0
movl $0x0, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x14(%rbp)
jbe 0x31ebc
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
movl $0x4, %edx
callq 0x9eb60
movl $0x4, -0x88(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x88(%rbp), %edi
movq -0x80(%rbp), %rsi
callq 0x9f4a0
movl %eax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rdi
movl -0x68(%rbp), %esi
movq -0x60(%rbp), %rdx
callq 0x366c0
movq -0x20(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| c4_eth_create_tx_path:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
lea rdi, [rbp+var_40]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov [rbp+var_58], 0
lea rax, [rbp+var_40]
mov [rbp+var_50], rax
mov [rbp+var_48], 0FFFFFFE0h
mov dword ptr [rbp+var_68], 0
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov [rbp+var_60], rax
cmp [rbp+var_14], 0
jbe short loc_31EBC
mov eax, [rbp+var_14]
mov esi, eax
lea rdi, [rbp+var_58]
mov edx, 4
call buffer_add_be
mov [rbp+var_88], 4
lea rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_88]
mov rsi, [rbp+var_80]
call bytes_remove_leading_zeros
mov dword ptr [rbp+var_78], eax
mov [rbp+var_70], rdx
mov rax, [rbp+var_78]
mov [rbp+var_68], rax
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
loc_31EBC:
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
mov rdi, [rbp+var_20]
mov esi, dword ptr [rbp+var_68]
mov rdx, [rbp+var_60]
call rlp_add_item
mov rax, [rbp+var_20]
movups xmm0, xmmword ptr [rax]
movaps [rbp+var_10], xmm0
mov eax, dword ptr [rbp+var_10]
mov rdx, qword ptr [rbp+var_10+8]
add rsp, 90h
pop rbp
retn
| long long c4_eth_create_tx_path(unsigned int a1, long long a2)
{
long long v2; // rdx
unsigned int v4; // [rsp+28h] [rbp-68h]
long long v5; // [rsp+30h] [rbp-60h]
int v6; // [rsp+38h] [rbp-58h] BYREF
_BYTE *v7; // [rsp+40h] [rbp-50h]
int v8; // [rsp+48h] [rbp-48h]
_BYTE v9[32]; // [rsp+50h] [rbp-40h] BYREF
long long v10; // [rsp+70h] [rbp-20h]
unsigned int v11; // [rsp+7Ch] [rbp-14h]
v11 = a1;
v10 = a2;
memset(v9, 0LL, sizeof(v9));
v6 = 0;
v7 = v9;
v8 = -32;
v4 = 0;
v5 = *(_QWORD *)(v10 + 8);
if ( v11 )
{
buffer_add_be(&v6, v11, 4LL);
v4 = bytes_remove_leading_zeros(4LL, v9);
v5 = v2;
}
*(_DWORD *)v10 = 0;
rlp_add_item(v10, v4, v5);
return (unsigned int)*(_OWORD *)v10;
}
| c4_eth_create_tx_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RDI,[RBP + -0x40]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x001231c0
MOV dword ptr [RBP + -0x58],0x0
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBP + -0x48],0xffffffe0
MOV dword ptr [RBP + -0x68],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x60],RAX
CMP dword ptr [RBP + -0x14],0x0
JBE 0x00131ebc
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
LEA RDI,[RBP + -0x58]
MOV EDX,0x4
CALL 0x0019eb60
MOV dword ptr [RBP + -0x88],0x4
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
CALL 0x0019f4a0
MOV dword ptr [RBP + -0x78],EAX
MOV qword ptr [RBP + -0x70],RDX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x60],RAX
LAB_00131ebc:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x001366c0
MOV RAX,qword ptr [RBP + -0x20]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RBP + -0x10],XMM0
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,ulong *param_2)
{
int4 uVar1;
ulong extraout_RDX;
int1 auVar2 [16];
ulong local_68;
int4 local_60 [2];
int1 *local_58;
int4 local_50;
int1 local_48 [32];
ulong *local_28;
int local_1c;
local_28 = param_2;
local_1c = param_1;
memset(local_48,0,0x20);
local_60[0] = 0;
local_58 = local_48;
local_50 = 0xffffffe0;
uVar1 = 0;
local_68 = local_28[1];
if (local_1c != 0) {
buffer_add_be(local_60,local_1c,4);
uVar1 = bytes_remove_leading_zeros(4,local_48);
local_68 = extraout_RDX;
}
*(int4 *)local_28 = 0;
rlp_add_item(local_28,uVar1,local_68);
auVar2._0_8_ = *local_28 & 0xffffffff;
auVar2._8_8_ = local_28[1];
return auVar2;
}
|
|
1,544 | c4_eth_create_tx_path | corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c | INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
} | O2 | c | c4_eth_create_tx_path:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
andl $0x0, 0x8(%rsp)
movaps %xmm0, (%rax)
movq %rax, 0x10(%rsp)
movl $0xffffffe0, 0x18(%rsp) # imm = 0xFFFFFFE0
testl %edi, %edi
je 0x2b60e
movl %edi, %esi
leaq 0x8(%rsp), %rdi
pushq $0x4
popq %rbp
movl %ebp, %edx
callq 0x4b6e5
leaq 0x20(%rsp), %rsi
movl %ebp, %edi
callq 0x4bb72
movl %eax, %esi
jmp 0x2b614
movq 0x8(%rbx), %rdx
xorl %esi, %esi
andl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x2e039
movl (%rbx), %eax
movq 0x8(%rbx), %rdx
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
| c4_eth_create_tx_path:
push rbp
push rbx
sub rsp, 48h
mov rbx, rsi
xorps xmm0, xmm0
lea rax, [rsp+58h+var_38]
movaps xmmword ptr [rax+10h], xmm0
and [rsp+58h+var_50], 0
movaps xmmword ptr [rax], xmm0
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_40], 0FFFFFFE0h
test edi, edi
jz short loc_2B60E
mov esi, edi
lea rdi, [rsp+58h+var_50]
push 4
pop rbp
mov edx, ebp
call buffer_add_be
lea rsi, [rsp+58h+var_38]
mov edi, ebp
call bytes_remove_leading_zeros
mov esi, eax
jmp short loc_2B614
loc_2B60E:
mov rdx, [rbx+8]
xor esi, esi
loc_2B614:
and dword ptr [rbx], 0
mov rdi, rbx
call rlp_add_item
mov eax, [rbx]
mov rdx, [rbx+8]
add rsp, 48h
pop rbx
pop rbp
retn
| long long c4_eth_create_tx_path(unsigned int a1, _QWORD *a2)
{
long long v3; // rdx
long long v4; // rsi
int v6; // [rsp+8h] [rbp-50h] BYREF
_BYTE *v7; // [rsp+10h] [rbp-48h]
int v8; // [rsp+18h] [rbp-40h]
_BYTE v9[56]; // [rsp+20h] [rbp-38h] BYREF
v6 = 0;
memset(v9, 0, 32);
v7 = v9;
v8 = -32;
if ( a1 )
{
buffer_add_be(&v6, a1, 4LL);
v4 = (unsigned int)bytes_remove_leading_zeros(4LL, v9);
}
else
{
v3 = a2[1];
v4 = 0LL;
}
*(_DWORD *)a2 = 0;
rlp_add_item(a2, v4, v3);
return *(unsigned int *)a2;
}
| c4_eth_create_tx_path:
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
AND dword ptr [RSP + 0x8],0x0
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0xffffffe0
TEST EDI,EDI
JZ 0x0012b60e
MOV ESI,EDI
LEA RDI,[RSP + 0x8]
PUSH 0x4
POP RBP
MOV EDX,EBP
CALL 0x0014b6e5
LEA RSI,[RSP + 0x20]
MOV EDI,EBP
CALL 0x0014bb72
MOV ESI,EAX
JMP 0x0012b614
LAB_0012b60e:
MOV RDX,qword ptr [RBX + 0x8]
XOR ESI,ESI
LAB_0012b614:
AND dword ptr [RBX],0x0
MOV RDI,RBX
CALL 0x0012e039
MOV EAX,dword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x48
POP RBX
POP RBP
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,uint *param_2)
{
int4 uVar1;
int8 extraout_RDX;
int8 uVar2;
int1 auVar3 [16];
int4 local_50 [2];
int8 *local_48;
int4 local_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
local_48 = &local_38;
local_28 = 0;
uStack_20 = 0;
local_50[0] = 0;
local_38 = 0;
uStack_30 = 0;
local_40 = 0xffffffe0;
if (param_1 == 0) {
uVar2 = *(int8 *)(param_2 + 2);
uVar1 = 0;
}
else {
buffer_add_be(local_50,param_1,4);
uVar1 = bytes_remove_leading_zeros(4,&local_38);
uVar2 = extraout_RDX;
}
*param_2 = 0;
rlp_add_item(param_2,uVar1,uVar2);
auVar3._4_4_ = 0;
auVar3._0_4_ = *param_2;
auVar3._8_8_ = *(int8 *)(param_2 + 2);
return auVar3;
}
|
|
1,545 | c4_eth_create_tx_path | corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c | INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
} | O3 | c | c4_eth_create_tx_path:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0xffffffe0, 0x18(%rsp) # imm = 0xFFFFFFE0
testl %edi, %edi
je 0x2cb0c
movl %edi, %esi
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0x5372c
leaq 0x20(%rsp), %rsi
movl $0x4, %edi
callq 0x53c1f
movl %eax, %esi
jmp 0x2cb12
movq 0x8(%rbx), %rdx
xorl %esi, %esi
movl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x2f7e9
movl (%rbx), %eax
movq 0x8(%rbx), %rdx
addq $0x40, %rsp
popq %rbx
retq
| c4_eth_create_tx_path:
push rbx
sub rsp, 40h
mov rbx, rsi
xorps xmm0, xmm0
lea rax, [rsp+48h+var_28]
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 0FFFFFFE0h
test edi, edi
jz short loc_2CB0C
mov esi, edi
lea rdi, [rsp+48h+var_40]
mov edx, 4
call buffer_add_be
lea rsi, [rsp+48h+var_28]
mov edi, 4
call bytes_remove_leading_zeros
mov esi, eax
jmp short loc_2CB12
loc_2CB0C:
mov rdx, [rbx+8]
xor esi, esi
loc_2CB12:
mov dword ptr [rbx], 0
mov rdi, rbx
call rlp_add_item
mov eax, [rbx]
mov rdx, [rbx+8]
add rsp, 40h
pop rbx
retn
| long long c4_eth_create_tx_path(unsigned int a1, _QWORD *a2)
{
long long v3; // rdx
long long v4; // rsi
int v6; // [rsp+8h] [rbp-40h] BYREF
_BYTE *v7; // [rsp+10h] [rbp-38h]
int v8; // [rsp+18h] [rbp-30h]
_BYTE v9[40]; // [rsp+20h] [rbp-28h] BYREF
memset(v9, 0, 32);
v6 = 0;
v7 = v9;
v8 = -32;
if ( a1 )
{
buffer_add_be(&v6, a1, 4LL);
v4 = (unsigned int)bytes_remove_leading_zeros(4LL, v9);
}
else
{
v3 = a2[1];
v4 = 0LL;
}
*(_DWORD *)a2 = 0;
rlp_add_item(a2, v4, v3);
return *(unsigned int *)a2;
}
| c4_eth_create_tx_path:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0xffffffe0
TEST EDI,EDI
JZ 0x0012cb0c
MOV ESI,EDI
LEA RDI,[RSP + 0x8]
MOV EDX,0x4
CALL 0x0015372c
LEA RSI,[RSP + 0x20]
MOV EDI,0x4
CALL 0x00153c1f
MOV ESI,EAX
JMP 0x0012cb12
LAB_0012cb0c:
MOV RDX,qword ptr [RBX + 0x8]
XOR ESI,ESI
LAB_0012cb12:
MOV dword ptr [RBX],0x0
MOV RDI,RBX
CALL 0x0012f7e9
MOV EAX,dword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x40
POP RBX
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,uint *param_2)
{
int4 uVar1;
int8 extraout_RDX;
int8 uVar2;
int1 auVar3 [16];
int4 local_40 [2];
int8 *local_38;
int4 local_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
local_38 = &local_28;
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_40[0] = 0;
local_30 = 0xffffffe0;
if (param_1 == 0) {
uVar2 = *(int8 *)(param_2 + 2);
uVar1 = 0;
}
else {
buffer_add_be(local_40,param_1,4);
uVar1 = bytes_remove_leading_zeros(4,&local_28);
uVar2 = extraout_RDX;
}
*param_2 = 0;
rlp_add_item(param_2,uVar1,uVar2);
auVar3._4_4_ = 0;
auVar3._0_4_ = *param_2;
auVar3._8_8_ = *(int8 *)(param_2 + 2);
return auVar3;
}
|
|
1,546 | LefDefParser::defwStartGroups(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwStartGroups(int count)
{
defwFunc = DEFW_GROUP_START; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if ((defwState >= DEFW_GROUP_START) && (defwState <= DEFW_GROUP_END))
return DEFW_BAD_ORDER;
fprintf(defwFile, "GROUPS %d ;\n", count);
defwLines++;
defwState = DEFW_GROUP_START;
defwCounter = count;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwStartGroups(int):
pushq %rax
movl %edi, (%rsp)
leaq 0xd49d(%rip), %rax # 0x2b168
movl $0x4d, (%rax)
leaq 0xd480(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1dce8
movl $0x1, 0x4(%rsp)
jmp 0x1dd5b
leaq 0xd475(%rip), %rax # 0x2b164
cmpl $0x4d, (%rax)
jl 0x1dd0a
leaq 0xd469(%rip), %rax # 0x2b164
cmpl $0x4f, (%rax)
jg 0x1dd0a
movl $0x2, 0x4(%rsp)
jmp 0x1dd5b
leaq 0xd447(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl (%rsp), %edx
leaq 0x7274(%rip), %rsi # 0x24f92
movb $0x0, %al
callq 0x10f0
leaq 0xd434(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xd428(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0xd423(%rip), %rax # 0x2b164
movl $0x4d, (%rax)
movl (%rsp), %ecx
leaq 0xd427(%rip), %rax # 0x2b178
movl %ecx, (%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser15defwStartGroupsEi:
push rax
mov [rsp+8+var_8], edi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 4Dh ; 'M'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1DCE8
mov [rsp+8+var_4], 1
jmp short loc_1DD5B
loc_1DCE8:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 4Dh ; 'M'
jl short loc_1DD0A
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 4Fh ; 'O'
jg short loc_1DD0A
mov [rsp+8+var_4], 2
jmp short loc_1DD5B
loc_1DD0A:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+8+var_8]
lea rsi, aGroupsD; "GROUPS %d ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 4Dh ; 'M'
mov ecx, [rsp+8+var_8]
lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter
mov [rax], ecx
mov [rsp+8+var_4], 0
loc_1DD5B:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwStartGroups(LefDefParser *this)
{
LefDefParser::defwFunc = 77;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState < 77 || LefDefParser::defwState > 79 )
{
fprintf(LefDefParser::defwFile, "GROUPS %d ;\n", (_DWORD)this);
++LefDefParser::defwLines;
LefDefParser::defwState = 77;
LefDefParser::defwCounter = (_DWORD)this;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwStartGroups:
PUSH RAX
MOV dword ptr [RSP],EDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x4d
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011dce8
MOV dword ptr [RSP + 0x4],0x1
JMP 0x0011dd5b
LAB_0011dce8:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x4d
JL 0x0011dd0a
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x4f
JG 0x0011dd0a
MOV dword ptr [RSP + 0x4],0x2
JMP 0x0011dd5b
LAB_0011dd0a:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP]
LEA RSI,[0x124f92]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x4d
MOV ECX,dword ptr [RSP]
LEA RAX,[0x12b178]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x4],0x0
LAB_0011dd5b:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwStartGroups(int) */
int4 LefDefParser::defwStartGroups(int param_1)
{
int4 local_4;
defwFunc = 0x4d;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if ((defwState < 0x4d) || (0x4f < defwState)) {
fprintf(defwFile,"GROUPS %d ;\n",param_1);
defwLines = defwLines + 1;
defwState = 0x4d;
local_4 = 0;
defwCounter = param_1;
}
else {
local_4 = 2;
}
return local_4;
}
|
|
1,547 | POINTonE2_Deserialize_Z | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c | static BLST_ERROR POINTonE2_Deserialize_Z(POINTonE2_affine *out,
const unsigned char in[192])
{
unsigned char in0 = in[0];
if ((in0 & 0xe0) == 0)
return POINTonE2_Deserialize_BE(out, in);
if (in0 & 0x80) /* compressed bit */
return POINTonE2_Uncompress_Z(out, in);
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 191)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
}
return BLST_BAD_ENCODING;
} | O0 | c | POINTonE2_Deserialize_Z:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
andl $0xe0, %eax
cmpl $0x0, %eax
jne 0xaacfc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xba390
movl %eax, -0x4(%rbp)
jmp 0xaad7d
movzbl -0x19(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xaad1c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xaab90
movl %eax, -0x4(%rbp)
jmp 0xaad7d
movzbl -0x19(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xaad76
movzbl -0x19(%rbp), %eax
andl $0x3f, %eax
movzbl %al, %edi
callq 0xb6d20
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movl $0xbf, %esi
callq 0xb4500
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0xaad74
movq -0x10(%rbp), %rdi
movl $0xc0, %esi
callq 0xa7170
movl $0x0, -0x4(%rbp)
jmp 0xaad7d
jmp 0xaad76
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| POINTonE2_Deserialize_Z:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
and eax, 0E0h
cmp eax, 0
jnz short loc_AACFC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call POINTonE2_Deserialize_BE
mov [rbp+var_4], eax
jmp loc_AAD7D
loc_AACFC:
movzx eax, [rbp+var_19]
and eax, 80h
cmp eax, 0
jz short loc_AAD1C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call POINTonE2_Uncompress_Z
mov [rbp+var_4], eax
jmp short loc_AAD7D
loc_AAD1C:
movzx eax, [rbp+var_19]
and eax, 40h
cmp eax, 0
jz short loc_AAD76
movzx eax, [rbp+var_19]
and eax, 3Fh
movzx edi, al
call _byte_is_zero
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
add rdi, 1
mov esi, 0BFh
call bytes_are_zero
mov rcx, rax
mov rax, [rbp+var_28]
and rax, rcx
cmp rax, 0
jz short loc_AAD74
mov rdi, [rbp+var_10]
mov esi, 0C0h
call vec_zero
mov [rbp+var_4], 0
jmp short loc_AAD7D
loc_AAD74:
jmp short $+2
loc_AAD76:
mov [rbp+var_4], 1
loc_AAD7D:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long POINTonE2_Deserialize_Z(long long a1, char *a2)
{
long long is_zero; // [rsp+8h] [rbp-28h]
char v4; // [rsp+17h] [rbp-19h]
v4 = *a2;
if ( (*a2 & 0xE0) != 0 )
{
if ( v4 < 0 )
{
return (unsigned int)POINTonE2_Uncompress_Z(a1, a2);
}
else if ( (v4 & 0x40) != 0 && (is_zero = byte_is_zero(v4 & 0x3F), (bytes_are_zero(a2 + 1, 191LL) & is_zero) != 0) )
{
vec_zero(a1, 0xC0uLL);
return 0;
}
else
{
return 1;
}
}
else
{
return (unsigned int)POINTonE2_Deserialize_BE(a1, a2);
}
}
| POINTonE2_Deserialize_Z:
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 + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0xe0
CMP EAX,0x0
JNZ 0x001aacfc
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001ba390
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001aad7d
LAB_001aacfc:
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001aad1c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001aab90
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001aad7d
LAB_001aad1c:
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001aad76
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x3f
MOVZX EDI,AL
CALL 0x001b6d20
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV ESI,0xbf
CALL 0x001b4500
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,RCX
CMP RAX,0x0
JZ 0x001aad74
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xc0
CALL 0x001a7170
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001aad7d
LAB_001aad74:
JMP 0x001aad76
LAB_001aad76:
MOV dword ptr [RBP + -0x4],0x1
LAB_001aad7d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 POINTonE2_Deserialize_Z(int8 param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
int4 local_c;
bVar1 = *param_2;
if ((bVar1 & 0xe0) == 0) {
local_c = POINTonE2_Deserialize_BE(param_1,param_2);
}
else if ((bVar1 & 0x80) == 0) {
if ((bVar1 & 0x40) != 0) {
uVar2 = byte_is_zero(bVar1 & 0x3f);
uVar3 = bytes_are_zero(param_2 + 1,0xbf);
if ((uVar2 & uVar3) != 0) {
vec_zero(param_1,0xc0);
return 0;
}
}
local_c = 1;
}
else {
local_c = POINTonE2_Uncompress_Z(param_1,param_2);
}
return local_c;
}
|
|
1,548 | testing::TestResult::Skipped() const | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | bool TestResult::Skipped() const {
return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0;
} | O1 | cpp | testing::TestResult::Skipped() const:
pushq %rbx
movq %rdi, %rbx
callq 0x241b8
testb %al, %al
je 0x2418d
xorl %eax, %eax
jmp 0x241b5
movq 0x38(%rbx), %rcx
movq 0x40(%rbx), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x241b5
xorl %esi, %esi
cmpl $0x3, (%rcx)
sete %sil
addl %esi, %eax
addq $0x70, %rcx
cmpq %rdx, %rcx
jne 0x2419c
testl %eax, %eax
setne %al
popq %rbx
retq
nop
| _ZNK7testing10TestResult7SkippedEv:
push rbx
mov rbx, rdi
call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void)
test al, al
jz short loc_2418D
xor eax, eax
jmp short loc_241B5
loc_2418D:
mov rcx, [rbx+38h]
mov rdx, [rbx+40h]
xor eax, eax
cmp rcx, rdx
jz short loc_241B5
loc_2419C:
xor esi, esi
cmp dword ptr [rcx], 3
setz sil
add eax, esi
add rcx, 70h ; 'p'
cmp rcx, rdx
jnz short loc_2419C
test eax, eax
setnz al
loc_241B5:
pop rbx
retn
| char testing::TestResult::Skipped(testing::TestResult *this)
{
int v1; // eax
_DWORD *v2; // rcx
_DWORD *v3; // rdx
if ( (unsigned __int8)testing::TestResult::Failed(this) )
{
LOBYTE(v1) = 0;
}
else
{
v2 = (_DWORD *)*((_QWORD *)this + 7);
v3 = (_DWORD *)*((_QWORD *)this + 8);
v1 = 0;
if ( v2 != v3 )
{
do
{
v1 += *v2 == 3;
v2 += 28;
}
while ( v2 != v3 );
LOBYTE(v1) = v1 != 0;
}
}
return v1;
}
| Skipped:
PUSH RBX
MOV RBX,RDI
CALL 0x001241b8
TEST AL,AL
JZ 0x0012418d
XOR EAX,EAX
JMP 0x001241b5
LAB_0012418d:
MOV RCX,qword ptr [RBX + 0x38]
MOV RDX,qword ptr [RBX + 0x40]
XOR EAX,EAX
CMP RCX,RDX
JZ 0x001241b5
LAB_0012419c:
XOR ESI,ESI
CMP dword ptr [RCX],0x3
SETZ SIL
ADD EAX,ESI
ADD RCX,0x70
CMP RCX,RDX
JNZ 0x0012419c
TEST EAX,EAX
SETNZ AL
LAB_001241b5:
POP RBX
RET
|
/* testing::TestResult::Skipped() const */
int __thiscall testing::TestResult::Skipped(TestResult *this)
{
char cVar1;
int iVar2;
int *piVar3;
cVar1 = Failed(this);
if (cVar1 == '\0') {
piVar3 = *(int **)(this + 0x38);
iVar2 = 0;
if (piVar3 != *(int **)(this + 0x40)) {
do {
iVar2 = iVar2 + (uint)(*piVar3 == 3);
piVar3 = piVar3 + 0x1c;
} while (piVar3 != *(int **)(this + 0x40));
iVar2 = CONCAT31((int3)((uint)iVar2 >> 8),iVar2 != 0);
}
}
else {
iVar2 = 0;
}
return iVar2;
}
|
|
1,549 | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::getCompMembers(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | inline IndexArray
DynamicRelation::getCompMembers(Index compIndex) {
int count = _countsAndOffsets[2*compIndex];
if (count > _memberCountPerComp) {
IndexVector & irregMembers = _irregIndices[compIndex];
return IndexArray(&irregMembers[0], (int)irregMembers.size());
} else {
int offset = _countsAndOffsets[2*compIndex+1];
return IndexArray(&_regIndices[offset], count);
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::getCompMembers(int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x8(%rax), %rdi
movl -0x1c(%rbp), %eax
shll %eax
movslq %eax, %rsi
callq 0xc7140
movq -0x38(%rbp), %rcx
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x4(%rcx), %eax
jle 0xf0a79
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1c(%rbp), %rsi
callq 0xc6610
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc7140
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd7ae0
movq -0x40(%rbp), %rsi
movl %eax, %edx
leaq -0x10(%rbp), %rdi
callq 0xd6d00
jmp 0xf0ab9
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x1c(%rbp), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x2c(%rbp)
movq 0x10(%rax), %rdi
movslq -0x2c(%rbp), %rsi
callq 0xc7140
movq %rax, %rsi
movl -0x20(%rbp), %edx
leaq -0x10(%rbp), %rdi
callq 0xd6d00
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %edx
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_115DynamicRelation14getCompMembersEi:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rdi, [rax+8]
mov eax, [rbp+var_1C]
shl eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
cmp eax, [rcx+4]
jle short loc_F0A79
mov rdi, [rbp+var_38]
add rdi, 18h
lea rsi, [rbp+var_1C]
call __ZNSt3mapIiSt6vectorIiSaIiEESt4lessIiESaISt4pairIKiS2_EEEixERS6_; std::map<int,std::vector<int>>::operator[](int const&)
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
xor eax, eax
mov esi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov [rbp+var_40], rax
mov rdi, [rbp+var_28]
call __ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rsi, [rbp+var_40]
mov edx, eax
lea rdi, [rbp+var_10]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEC2EPii; OpenSubdiv::v3_6_0::Vtr::Array<int>::Array(int *,int)
jmp short loc_F0AB9
loc_F0A79:
mov rax, [rbp+var_38]
mov rdi, [rax+8]
mov eax, [rbp+var_1C]
shl eax, 1
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_38]
mov ecx, [rcx]
mov [rbp+var_2C], ecx
mov rdi, [rax+10h]
movsxd rsi, [rbp+var_2C]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rsi, rax
mov edx, [rbp+var_20]
lea rdi, [rbp+var_10]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEC2EPii; OpenSubdiv::v3_6_0::Vtr::Array<int>::Array(int *,int)
loc_F0AB9:
mov rax, [rbp+var_10]
mov edx, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::DynamicRelation::getCompMembers(
OpenSubdiv::v3_6_0::Vtr::internal::_anonymous_namespace_::DynamicRelation *this,
int a2)
{
unsigned int v2; // eax
int *v3; // rax
long long v4; // rax
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-28h]
unsigned int v8; // [rsp+20h] [rbp-20h]
int v9; // [rsp+24h] [rbp-1Ch] BYREF
OpenSubdiv::v3_6_0::Vtr::internal::_anonymous_namespace_::DynamicRelation *v10; // [rsp+28h] [rbp-18h]
long long v11; // [rsp+30h] [rbp-10h] BYREF
v10 = this;
v9 = a2;
v8 = *(_DWORD *)std::vector<int>::operator[](*((_QWORD *)this + 1), 2 * a2);
if ( (signed int)v8 <= *((_DWORD *)this + 1) )
{
v3 = (int *)std::vector<int>::operator[](*((_QWORD *)this + 1), 2 * v9 + 1);
v4 = std::vector<int>::operator[](*((_QWORD *)this + 2), *v3);
OpenSubdiv::v3_6_0::Vtr::Array<int>::Array(&v11, v4, v8);
}
else
{
v7 = std::map<int,std::vector<int>>::operator[]((char *)this + 24, &v9);
v6 = std::vector<int>::operator[](v7, 0LL);
v2 = std::vector<int>::size(v7);
OpenSubdiv::v3_6_0::Vtr::Array<int>::Array(&v11, v6, v2);
}
return v11;
}
| getCompMembers:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOVSXD RSI,EAX
CALL 0x001c7140
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x4]
JLE 0x001f0a79
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x18
LEA RSI,[RBP + -0x1c]
CALL 0x001c6610
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001c7140
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001d7ae0
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,EAX
LEA RDI,[RBP + -0x10]
CALL 0x001d6d00
JMP 0x001f0ab9
LAB_001f0a79:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
ADD EAX,0x1
MOVSXD RSI,EAX
CALL 0x001c7140
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x2c],ECX
MOV RDI,qword ptr [RAX + 0x10]
MOVSXD RSI,dword ptr [RBP + -0x2c]
CALL 0x001c7140
MOV RSI,RAX
MOV EDX,dword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x10]
CALL 0x001d6d00
LAB_001f0ab9:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::(anonymous namespace)::DynamicRelation::getCompMembers(int) */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::(anonymous_namespace)::DynamicRelation::getCompMembers
(DynamicRelation *this,int param_1)
{
int iVar1;
int *piVar2;
vector<int,std::allocator<int>> *this_00;
int1 auVar3 [16];
int local_24;
DynamicRelation *local_20;
Array<int> local_18 [16];
int1 auVar4 [11];
local_24 = param_1;
local_20 = this;
piVar2 = (int *)std::vector<int,std::allocator<int>>::operator[]
(*(vector<int,std::allocator<int>> **)(this + 8),(long)(param_1 << 1));
iVar1 = *piVar2;
if (*(int *)(this + 4) < iVar1) {
this_00 = (vector<int,std::allocator<int>> *)
std::
map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
::operator[]((map<int,std::vector<int,std::allocator<int>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<int,std::allocator<int>>>>>
*)(this + 0x18),&local_24);
piVar2 = (int *)std::vector<int,std::allocator<int>>::operator[](this_00,0);
iVar1 = std::vector<int,std::allocator<int>>::size(this_00);
Array<int>::Array(local_18,piVar2,iVar1);
}
else {
piVar2 = (int *)std::vector<int,std::allocator<int>>::operator[]
(*(vector<int,std::allocator<int>> **)(this + 8),
(long)(local_24 * 2 + 1));
piVar2 = (int *)std::vector<int,std::allocator<int>>::operator[]
(*(vector<int,std::allocator<int>> **)(this + 0x10),(long)*piVar2);
Array<int>::Array(local_18,piVar2,iVar1);
}
auVar3._12_4_ = 0;
auVar3[0] = local_18[0];
auVar4[1] = local_18[1];
auVar4[2] = local_18[2];
auVar4[3] = local_18[3];
auVar4[4] = local_18[4];
auVar4[5] = local_18[5];
auVar4[6] = local_18[6];
auVar4[7] = local_18[7];
auVar3[8] = local_18[8];
auVar3[9] = local_18[9];
auVar3[10] = local_18[10];
auVar3[0xb] = local_18[0xb];
return auVar3;
}
|
|
1,550 | ma_tls_end | eloqsql/libmariadb/libmariadb/secure/openssl.c | void ma_tls_end()
{
if (ma_tls_initialized)
{
pthread_mutex_lock(&LOCK_openssl_config);
#ifndef HAVE_OPENSSL_1_1_API
if (LOCK_crypto)
{
int i;
CRYPTO_set_locking_callback(NULL);
CRYPTO_THREADID_set_callback(NULL);
for (i=0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&LOCK_crypto[i]);
ma_free((gptr)LOCK_crypto);
LOCK_crypto= NULL;
}
#endif
if (mariadb_deinitialize_ssl)
{
#ifndef HAVE_OPENSSL_1_1_API
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
CONF_modules_free();
CONF_modules_unload(1);
#endif
}
ma_tls_initialized= FALSE;
pthread_mutex_unlock(&LOCK_openssl_config);
pthread_mutex_destroy(&LOCK_openssl_config);
}
return;
} | O3 | c | ma_tls_end:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2275e(%rip), %r14 # 0x4bfe0
cmpb $0x0, (%r14)
je 0x298af
leaq 0x24031(%rip), %rbx # 0x4d8c0
movq %rbx, %rdi
callq 0x136a0
movb $0x0, (%r14)
movq %rbx, %rdi
callq 0x13330
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x13540
popq %rbx
popq %r14
popq %rbp
retq
| ma_tls_end:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, ma_tls_initialized
cmp byte ptr [r14], 0
jz short loc_298AF
lea rbx, LOCK_openssl_config
mov rdi, rbx
call _pthread_mutex_lock
mov byte ptr [r14], 0
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_mutex_destroy
loc_298AF:
pop rbx
pop r14
pop rbp
retn
| long long ma_tls_end()
{
long long result; // rax
if ( ma_tls_initialized )
{
pthread_mutex_lock(&LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock(&LOCK_openssl_config);
return pthread_mutex_destroy(&LOCK_openssl_config);
}
return result;
}
| ma_tls_end:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x14bfe0]
CMP byte ptr [R14],0x0
JZ 0x001298af
LEA RBX,[0x14d8c0]
MOV RDI,RBX
CALL 0x001136a0
MOV byte ptr [R14],0x0
MOV RDI,RBX
CALL 0x00113330
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00113540
LAB_001298af:
POP RBX
POP R14
POP RBP
RET
|
void ma_tls_end(void)
{
if (ma_tls_initialized != '\0') {
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config);
return;
}
return;
}
|
|
1,551 | ma_ft_store | eloqsql/storage/maria/ma_ft_update.c | static int _ma_ft_store(MARIA_HA *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
DBUG_ENTER("_ma_ft_store");
for (; wlist->pos; wlist++)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos);
if (_ma_ck_write(info, &key))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | ma_ft_store:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, (%rcx)
je 0x70798
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
leaq -0x50(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %r15, %rcx
movq %r12, %r8
movq -0x30(%rbp), %r9
callq 0x70601
movq %rbx, %rdi
movq %r14, %rsi
callq 0x57f98
testb %al, %al
jne 0x70793
cmpq $0x0, 0x18(%r12)
leaq 0x18(%r12), %r12
jne 0x7075b
xorl %eax, %eax
jmp 0x70798
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_ft_store:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_30], r8
xor eax, eax
cmp qword ptr [rcx], 0
jz short loc_70798
mov r12, rcx
mov r15, rdx
mov r13d, esi
mov rbx, rdi
lea r14, [rbp+var_50]
loc_7075B:
mov rdi, rbx
mov rsi, r14
mov edx, r13d
mov rcx, r15
mov r8, r12
mov r9, [rbp+var_30]
call _ma_ft_make_key
mov rdi, rbx
mov rsi, r14
call _ma_ck_write
test al, al
jnz short loc_70793
cmp qword ptr [r12+18h], 0
lea r12, [r12+18h]
jnz short loc_7075B
xor eax, eax
jmp short loc_70798
loc_70793:
mov eax, 1
loc_70798:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_ft_store(long long a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6)
{
long long result; // rax
long long i; // r12
_BYTE v10[32]; // [rsp+0h] [rbp-50h] BYREF
long long v11; // [rsp+20h] [rbp-30h]
v11 = a5;
result = 0LL;
if ( *a4 )
{
for ( i = (long long)a4; ; i += 24LL )
{
ma_ft_make_key(a1, (long long)v10, a2, a3, i, v11, a6);
if ( ma_ck_write(a1, (long long)v10) )
break;
if ( *(_QWORD *)(i + 24) == 0LL )
return 0LL;
}
return 1LL;
}
return result;
}
| _ma_ft_store:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x30],R8
XOR EAX,EAX
CMP qword ptr [RCX],0x0
JZ 0x00170798
MOV R12,RCX
MOV R15,RDX
MOV R13D,ESI
MOV RBX,RDI
LEA R14,[RBP + -0x50]
LAB_0017075b:
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R13D
MOV RCX,R15
MOV R8,R12
MOV R9,qword ptr [RBP + -0x30]
CALL 0x00170601
MOV RDI,RBX
MOV RSI,R14
CALL 0x00157f98
TEST AL,AL
JNZ 0x00170793
CMP qword ptr [R12 + 0x18],0x0
LEA R12,[R12 + 0x18]
JNZ 0x0017075b
XOR EAX,EAX
JMP 0x00170798
LAB_00170793:
MOV EAX,0x1
LAB_00170798:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
long *plVar1;
char cVar2;
int1 local_58 [32];
int8 local_38;
if (*param_4 != 0) {
local_38 = param_5;
do {
_ma_ft_make_key(param_1,local_58,param_2,param_3,param_4,local_38);
cVar2 = _ma_ck_write(param_1,local_58);
if (cVar2 != '\0') {
return 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return 0;
}
|
|
1,552 | translog_walk_filenames | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_walk_filenames(const char *directory,
my_bool (*callback)(const char *,
const char *))
{
MY_DIR *dirp;
uint i;
my_bool rc= FALSE;
/* Finds and removes transaction log files */
if (!(dirp = my_dir(directory, MYF(MY_DONT_SORT))))
return FALSE;
for (i= 0; i < dirp->number_of_files; i++)
{
char *file= dirp->dir_entry[i].name;
if (strncmp(file, "aria_log.", 10) == 0 &&
file[10] >= '0' && file[10] <= '9' &&
file[11] >= '0' && file[11] <= '9' &&
file[12] >= '0' && file[12] <= '9' &&
file[13] >= '0' && file[13] <= '9' &&
file[14] >= '0' && file[14] <= '9' &&
file[15] >= '0' && file[15] <= '9' &&
file[16] >= '0' && file[16] <= '9' &&
file[17] >= '0' && file[17] <= '9' &&
file[18] == '\0' && (*callback)(directory, file))
{
rc= TRUE;
break;
}
}
my_dirend(dirp);
return rc;
} | O3 | c | translog_walk_filenames:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x9f315
testq %rax, %rax
je 0x48d79
movq %rax, %rbx
movl 0x8(%rax), %r12d
testl %r12d, %r12d
je 0x48d6e
movq %r15, -0x30(%rbp)
movq %r14, -0x38(%rbp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %r13
movl $0xa, %edx
movq %r13, %rdi
leaq 0x90eb6(%rip), %rsi # 0xd9b9f
callq 0x291d0
testl %eax, %eax
jne 0x48d5b
movb 0xa(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0xb(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0xc(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0xd(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0xe(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0xf(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0x10(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
movb 0x11(%r13), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x48d5b
cmpb $0x0, 0x12(%r13)
jne 0x48d5b
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq *-0x38(%rbp)
testb %al, %al
jne 0x48d8b
movl 0x8(%rbx), %r12d
incq %r15
movl %r12d, %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x48cd3
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x9f2e4
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r12b
jmp 0x48d71
| translog_walk_filenames:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov r15, rdi
xor r12d, r12d
xor esi, esi
call my_dir
test rax, rax
jz loc_48D79
mov rbx, rax
mov r12d, [rax+8]
test r12d, r12d
jz loc_48D6E
mov [rbp+var_30], r15
mov [rbp+var_38], r14
xor r14d, r14d
xor r15d, r15d
loc_48CD3:
mov rax, [rbx]
mov r13, [rax+r14]
mov edx, 0Ah
mov rdi, r13
lea rsi, aAriaLog; "aria_log."
call _strncmp
test eax, eax
jnz short loc_48D5B
mov al, [r13+0Ah]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+0Bh]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+0Ch]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+0Dh]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+0Eh]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+0Fh]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+10h]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
mov al, [r13+11h]
add al, 0D0h
cmp al, 9
ja short loc_48D5B
cmp byte ptr [r13+12h], 0
jnz short loc_48D5B
mov rdi, [rbp+var_30]
mov rsi, r13
call [rbp+var_38]
test al, al
jnz short loc_48D8B
mov r12d, [rbx+8]
loc_48D5B:
inc r15
mov eax, r12d
add r14, 10h
cmp r15, rax
jb loc_48CD3
loc_48D6E:
xor r12d, r12d
loc_48D71:
mov rdi, rbx
call my_dirend
loc_48D79:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_48D8B:
mov r12b, 1
jmp short loc_48D71
| long long translog_walk_filenames(long long a1, unsigned __int8 ( *a2)(long long, _BYTE *))
{
unsigned int v2; // r12d
long long v3; // rax
long long v4; // rbx
long long v5; // r14
unsigned long long v6; // r15
_BYTE *v7; // r13
v2 = 0;
v3 = my_dir(a1, 0LL);
if ( !v3 )
return v2;
v4 = v3;
v2 = *(_DWORD *)(v3 + 8);
if ( !v2 )
{
LABEL_17:
v2 = 0;
goto LABEL_18;
}
v5 = 0LL;
v6 = 0LL;
while ( 1 )
{
v7 = *(_BYTE **)(*(_QWORD *)v4 + v5);
if ( (unsigned int)strncmp(v7, "aria_log.", 10LL)
|| (unsigned __int8)(v7[10] - 48) > 9u
|| (unsigned __int8)(v7[11] - 48) > 9u
|| (unsigned __int8)(v7[12] - 48) > 9u
|| (unsigned __int8)(v7[13] - 48) > 9u
|| (unsigned __int8)(v7[14] - 48) > 9u
|| (unsigned __int8)(v7[15] - 48) > 9u
|| (unsigned __int8)(v7[16] - 48) > 9u
|| (unsigned __int8)(v7[17] - 48) > 9u
|| v7[18] )
{
goto LABEL_16;
}
if ( a2(a1, v7) )
break;
v2 = *(_DWORD *)(v4 + 8);
LABEL_16:
++v6;
v5 += 16LL;
if ( v6 >= v2 )
goto LABEL_17;
}
LOBYTE(v2) = 1;
LABEL_18:
my_dirend(v4);
return v2;
}
| translog_walk_filenames:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV R15,RDI
XOR R12D,R12D
XOR ESI,ESI
CALL 0x0019f315
TEST RAX,RAX
JZ 0x00148d79
MOV RBX,RAX
MOV R12D,dword ptr [RAX + 0x8]
TEST R12D,R12D
JZ 0x00148d6e
MOV qword ptr [RBP + -0x30],R15
MOV qword ptr [RBP + -0x38],R14
XOR R14D,R14D
XOR R15D,R15D
LAB_00148cd3:
MOV RAX,qword ptr [RBX]
MOV R13,qword ptr [RAX + R14*0x1]
MOV EDX,0xa
MOV RDI,R13
LEA RSI,[0x1d9b9f]
CALL 0x001291d0
TEST EAX,EAX
JNZ 0x00148d5b
MOV AL,byte ptr [R13 + 0xa]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0xb]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0xc]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0xd]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0xe]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0xf]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0x10]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
MOV AL,byte ptr [R13 + 0x11]
ADD AL,0xd0
CMP AL,0x9
JA 0x00148d5b
CMP byte ptr [R13 + 0x12],0x0
JNZ 0x00148d5b
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R13
CALL qword ptr [RBP + -0x38]
TEST AL,AL
JNZ 0x00148d8b
MOV R12D,dword ptr [RBX + 0x8]
LAB_00148d5b:
INC R15
MOV EAX,R12D
ADD R14,0x10
CMP R15,RAX
JC 0x00148cd3
LAB_00148d6e:
XOR R12D,R12D
LAB_00148d71:
MOV RDI,RBX
CALL 0x0019f2e4
LAB_00148d79:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00148d8b:
MOV R12B,0x1
JMP 0x00148d71
|
int8 translog_walk_filenames(int8 param_1,code *param_2)
{
char *__s1;
char cVar1;
int iVar2;
long *plVar3;
ulong uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
uVar5 = 0;
plVar3 = (long *)my_dir(param_1,0);
if (plVar3 != (long *)0x0) {
uVar4 = (ulong)*(uint *)(plVar3 + 1);
if (*(uint *)(plVar3 + 1) != 0) {
lVar6 = 0;
uVar7 = 0;
do {
__s1 = *(char **)(*plVar3 + lVar6);
iVar2 = strncmp(__s1,"aria_log.",10);
if ((((((iVar2 == 0) && ((byte)(__s1[10] - 0x30U) < 10)) && ((byte)(__s1[0xb] - 0x30U) < 10)
) && (((byte)(__s1[0xc] - 0x30U) < 10 && ((byte)(__s1[0xd] - 0x30U) < 10)))) &&
(((byte)(__s1[0xe] - 0x30U) < 10 &&
(((byte)(__s1[0xf] - 0x30U) < 10 && ((byte)(__s1[0x10] - 0x30U) < 10)))))) &&
(((byte)(__s1[0x11] - 0x30U) < 10 && (__s1[0x12] == '\0')))) {
cVar1 = (*param_2)(param_1,__s1);
if (cVar1 != '\0') {
uVar5 = CONCAT71((int7)(uVar4 >> 8),1);
goto LAB_00148d71;
}
uVar4 = (ulong)*(uint *)(plVar3 + 1);
}
uVar7 = uVar7 + 1;
lVar6 = lVar6 + 0x10;
} while (uVar7 < uVar4);
}
uVar5 = 0;
LAB_00148d71:
my_dirend(plVar3);
}
return uVar5;
}
|
|
1,553 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x3316c
movq %rbx, %rdx
callq 0x330d1
jmp 0x33173
leaq 0x2efbc(%rip), %rax # 0x6212f
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_3316C
mov rdx, rbx
call strmake_root
jmp short loc_33173
loc_3316C:
lea rax, aNewSection+14h; ""
loc_33173:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0013316c
MOV RDX,RBX
CALL 0x001330d1
JMP 0x00133173
LAB_0013316c:
LEA RAX,[0x16212f]
LAB_00133173:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
char *pcVar1;
int1 auVar2 [16];
if (param_3 == 0) {
pcVar1 = "";
}
else {
pcVar1 = (char *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = pcVar1;
return auVar2;
}
|
|
1,554 | ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp | std::string
get_name() const
{
return name;
} | O1 | cpp | ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x40(%rsi), %rax
movq 0x48(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0xd2a8
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE8get_nameB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+40h]
mov rdx, [rsi+48h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 64), *(_QWORD *)(a2 + 64) + *(_QWORD *)(a2 + 72));
return a1;
}
| get_name[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x40]
MOV RDX,qword ptr [RSI + 0x48]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x0010d2a8
MOV RAX,RBX
POP RBX
RET
|
/* ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const */
void ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x40),*(long *)(in_RSI + 0x48) + *(long *)(in_RSI + 0x40));
return;
}
|
|
1,555 | ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp | std::string
get_name() const
{
return name;
} | O3 | cpp | ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x40(%rsi), %rax
movq 0x48(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0xd25e
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE8get_nameB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+40h]
mov rdx, [rsi+48h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *(_BYTE **)(a2 + 64), *(_QWORD *)(a2 + 64) + *(_QWORD *)(a2 + 72));
return a1;
}
| get_name[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x40]
MOV RDX,qword ptr [RSI + 0x48]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x0010d25e
MOV RAX,RBX
POP RBX
RET
|
/* ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name[abi:cxx11]() const */
void ELFIO::section_impl<ELFIO::Elf32_Shdr>::get_name_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x40),*(long *)(in_RSI + 0x48) + *(long *)(in_RSI + 0x40));
return;
}
|
|
1,556 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O0 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
leaq 0x4faf9(%rip), %rax # 0xaf7ae
leaq 0x4faea(%rip), %rcx # 0xaf7a6
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0x3b7325(%rip), %rdi # 0x416ff4
leaq -0x306(%rip), %rsi # 0x5f9d0
callq 0x262e0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5fd70
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x5fcf7
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5fd5a
leaq 0x25a562(%rip), %rax # 0x2ba260
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rsi
leaq 0x25a54c(%rip), %rdi # 0x2ba260
leaq 0x4fa9b(%rip), %rdx # 0xaf7b6
callq *%rax
cmpl $0x0, %eax
jne 0x5fd2c
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5fd34
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x5fd34
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x5fd53
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5fd70
movl %eax, -0x4(%rbp)
jmp 0x5fd5a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charset_number:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdx, [rbp+var_20]
and rdx, 400h
lea rax, aUtf8mb4; "utf8mb4"
lea rcx, aUtf8mb3; "utf8mb3"
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_30], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_5FCF7
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_5FD5A
loc_5FCF7:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_10]
lea rdi, my_charset_latin1
lea rdx, aUtf8; "utf8"
call rax
cmp eax, 0
jnz short loc_5FD2C
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_5FD34
loc_5FD2C:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_5FD34:
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_5FD53
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_4], eax
jmp short loc_5FD5A
loc_5FD53:
mov [rbp+var_4], 0
loc_5FD5A:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-38h]
const char *v6; // [rsp+10h] [rbp-30h]
unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h]
v3 = "utf8mb4";
if ( (a3 & 0x400) != 0 )
v3 = "utf8mb3";
v6 = v3;
pthread_once(&charsets_initialized, init_available_charsets);
charset_number_internal = get_charset_number_internal(a1, a2);
if ( charset_number_internal )
{
return charset_number_internal;
}
else
{
if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8") )
{
v5 = 0LL;
}
else
{
v5 = v6;
}
if ( v5 )
return (unsigned int)get_charset_number_internal(v5, a2);
else
return 0;
}
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x400
LEA RAX,[0x1af7ae]
LEA RCX,[0x1af7a6]
CMP RDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0x516ff4]
LEA RSI,[0x15f9d0]
CALL 0x001262e0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0015fd70
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x0015fcf7
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015fd5a
LAB_0015fcf7:
LEA RAX,[0x3ba260]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x3ba260]
LEA RDX,[0x1af7b6]
CALL RAX
CMP EAX,0x0
JNZ 0x0015fd2c
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015fd34
LAB_0015fd2c:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015fd34
LAB_0015fd34:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0015fd53
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0015fd70
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015fd5a
LAB_0015fd53:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015fd5a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int get_charset_number(int8 param_1,int4 param_2,ulong param_3)
{
int iVar1;
char *local_40;
int local_c;
local_40 = "utf8mb4";
if ((param_3 & 0x400) != 0) {
local_40 = "utf8mb3";
}
pthread_once(&charsets_initialized,init_available_charsets);
local_c = get_charset_number_internal(param_1,param_2);
if (local_c == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003ba320 + 0x40))
(&my_charset_latin1,param_1,&DAT_001af7b6);
if (iVar1 != 0) {
local_40 = (char *)0x0;
}
if (local_40 == (char *)0x0) {
local_c = 0;
}
else {
local_c = get_charset_number_internal(local_40,param_2);
}
}
return local_c;
}
|
|
1,557 | Catch::Detail::unique_ptr<Catch::Detail::(anonymous namespace)::CoutStream> Catch::Detail::make_unique<Catch::Detail::(anonymous namespace)::CoutStream>() | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.hpp | unique_ptr<T> make_unique(Args&&... args) {
return unique_ptr<T>(new T(CATCH_FORWARD(args)...));
} | O3 | cpp | Catch::Detail::unique_ptr<Catch::Detail::(anonymous namespace)::CoutStream> Catch::Detail::make_unique<Catch::Detail::(anonymous namespace)::CoutStream>():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x118, %edi # imm = 0x118
callq 0x171f0
movq %rax, %rbx
leaq 0xd385f(%rip), %rax # 0x130268
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq 0xd5529(%rip), %rax # 0x131f40
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq 0xe8(%rax,%rcx), %rsi
callq 0x17e00
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x118, %esi # imm = 0x118
movq %rbx, %rdi
callq 0x17150
movq %r14, %rdi
callq 0x17740
| _ZN5Catch6Detail11make_uniqueINS0_12_GLOBAL__N_110CoutStreamEJEEENS0_10unique_ptrIT_EEDpOT0_:
push r14
push rbx
push rax
mov r14, rdi
mov edi, 118h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rax, off_130268
mov [rbx], rax
lea rdi, [rbx+8]
mov rax, cs:_ZSt4cout_ptr
mov rcx, [rax]
mov rcx, [rcx-18h]
mov rsi, [rax+rcx+0E8h]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
mov [r14], rbx
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov esi, 118h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
| long long Catch::Detail::make_unique<Catch::Detail::`anonymous namespace'::CoutStream>(_QWORD *a1)
{
_QWORD *v1; // rbx
long long result; // rax
v1 = (_QWORD *)operator new(0x118uLL);
*v1 = off_130268;
result = std::ostream::ostream(v1 + 1, *(_QWORD *)((char *)&std::cout + *(_QWORD *)(std::cout - 24LL) + 232));
*a1 = v1;
return result;
}
| make_unique<Catch::Detail::(anonymous_namespace)::CoutStream>:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EDI,0x118
CALL 0x001171f0
MOV RBX,RAX
LEA RAX,[0x230268]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x8]
MOV RAX,qword ptr [0x00231f40]
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV RSI,qword ptr [RAX + RCX*0x1 + 0xe8]
LAB_0015ca26:
CALL 0x00117e00
LAB_0015ca2b:
MOV qword ptr [R14],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* Catch::Detail::unique_ptr<Catch::Detail::(anonymous namespace)::CoutStream>
Catch::Detail::make_unique<Catch::Detail::(anonymous namespace)::CoutStream>() */
void __thiscall
Catch::Detail::make_unique<Catch::Detail::(anonymous_namespace)::CoutStream>(Detail *this)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0x118);
*puVar1 = &PTR__CoutStream_00230268;
/* try { // try from 0015ca26 to 0015ca2a has its CatchHandler @ 0015ca36 */
std::ostream::ostream
((ostream *)(puVar1 + 1),
*(streambuf **)
(PTR_cout_00231f40 + *(long *)(*(long *)PTR_cout_00231f40 + -0x18) + 0xe8));
*(int8 **)this = puVar1;
return;
}
|
|
1,558 | ggml_set_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_set_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
size_t nb1,
size_t nb2,
size_t nb3,
size_t offset,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) >= ggml_nelements(b));
// make a view of the destination
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
GGML_ASSERT(offset < (size_t)(1 << 30));
int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_SET;
result->src[0] = a;
result->src[1] = b;
return result;
} | O0 | c | ggml_set_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb 0x18(%rbp), %al
movq 0x10(%rbp), %r10
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
andb $0x1, %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rdi
callq 0x45f50
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x45f50
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jge 0x4f18f
leaq 0x62442(%rip), %rdi # 0xb15b7
movl $0xb0d, %esi # imm = 0xB0D
leaq 0x62488(%rip), %rdx # 0xb1609
leaq 0x64926(%rip), %rcx # 0xb3aae
movb $0x0, %al
callq 0x48a00
testb $0x1, -0x31(%rbp)
je 0x4f1a8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x428f0
movq %rax, -0x70(%rbp)
jmp 0x4f1b9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45d90
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x40000000, 0x10(%rbp) # imm = 0x40000000
jb 0x4f1ec
leaq 0x623e5(%rip), %rdi # 0xb15b7
movl $0xb12, %esi # imm = 0xB12
leaq 0x6242b(%rip), %rdx # 0xb1609
leaq 0x648f0(%rip), %rcx # 0xb3ad5
movb $0x0, %al
callq 0x48a00
movq -0x20(%rbp), %rax
movl %eax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movl %eax, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movl %eax, -0x58(%rbp)
movq 0x10(%rbp), %rax
movl %eax, -0x54(%rbp)
movb -0x31(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x14, %edx
callq 0x4e370
movq -0x40(%rbp), %rax
movl $0x1e, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x40(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
| ggml_set_impl:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, [rbp+arg_8]
mov r10, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
and al, 1
mov [rbp+var_31], al
mov rdi, [rbp+var_10]
call _ggml_nelements
mov [rbp+var_68], rax
mov rdi, [rbp+var_18]
call _ggml_nelements
mov rcx, rax
mov rax, [rbp+var_68]
cmp rax, rcx
jge short loc_4F18F
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B0Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA; "ggml_nelements(a) >= ggml_nelements(b)"
mov al, 0
call _ggml_abort
loc_4F18F:
test [rbp+var_31], 1
jz short loc_4F1A8
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ggml_view_tensor
mov [rbp+var_70], rax
jmp short loc_4F1B9
loc_4F1A8:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ggml_dup_tensor
mov [rbp+var_70], rax
loc_4F1B9:
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
cmp [rbp+arg_0], 40000000h
jb short loc_4F1EC
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B12h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeT130; "offset < (size_t)(1 << 30)"
mov al, 0
call _ggml_abort
loc_4F1EC:
mov rax, [rbp+var_20]
mov [rbp+var_60], eax
mov rax, [rbp+var_28]
mov [rbp+var_5C], eax
mov rax, [rbp+var_30]
mov [rbp+var_58], eax
mov rax, [rbp+arg_0]
mov [rbp+var_54], eax
mov dl, [rbp+var_31]
xor eax, eax
mov ecx, 1
test dl, 1
cmovnz eax, ecx
mov [rbp+var_50], eax
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_60]
mov edx, 14h
call ggml_set_op_params
mov rax, [rbp+var_40]
mov dword ptr [rax+50h], 1Eh
mov rcx, [rbp+var_10]
mov rax, [rbp+var_40]
mov [rax+98h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_40]
mov [rax+0A0h], rcx
mov rax, [rbp+var_40]
add rsp, 70h
pop rbp
retn
| long long ggml_set_impl(
long long a1,
unsigned int *a2,
_QWORD *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
unsigned long long a15,
char a16)
{
double v16; // xmm4_8
double v17; // xmm5_8
long long v19; // [rsp+0h] [rbp-70h]
long long v20; // [rsp+8h] [rbp-68h]
_DWORD v21[8]; // [rsp+10h] [rbp-60h] BYREF
long long v22; // [rsp+30h] [rbp-40h]
char v23; // [rsp+3Fh] [rbp-31h]
long long v24; // [rsp+40h] [rbp-30h]
long long v25; // [rsp+48h] [rbp-28h]
long long v26; // [rsp+50h] [rbp-20h]
_QWORD *v27; // [rsp+58h] [rbp-18h]
unsigned int *v28; // [rsp+60h] [rbp-10h]
long long v29; // [rsp+68h] [rbp-8h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5;
v24 = a6;
v23 = a16 & 1;
v20 = ggml_nelements(a2);
if ( v20 < ggml_nelements(v27) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
2829,
(long long)"GGML_ASSERT(%s) failed",
"ggml_nelements(a) >= ggml_nelements(b)");
if ( (v23 & 1) != 0 )
v19 = (long long)ggml_view_tensor(v29, (long long)v28, a7, a8, a9, a10, v16, v17, a13, a14);
else
v19 = ggml_dup_tensor(v29, v28);
v22 = v19;
if ( a15 >= 0x40000000 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
2834,
(long long)"GGML_ASSERT(%s) failed",
"offset < (size_t)(1 << 30)");
v21[0] = v26;
v21[1] = v25;
v21[2] = v24;
v21[3] = a15;
v21[4] = (v23 & 1) != 0;
ggml_set_op_params(v22, (long long)v21, 0x14uLL);
*(_DWORD *)(v22 + 80) = 30;
*(_QWORD *)(v22 + 152) = v28;
*(_QWORD *)(v22 + 160) = v27;
return v22;
}
| ggml_set_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,byte ptr [RBP + 0x18]
MOV R10,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
AND AL,0x1
MOV byte ptr [RBP + -0x31],AL
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00145f50
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00145f50
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,RCX
JGE 0x0014f18f
LEA RDI,[0x1b15b7]
MOV ESI,0xb0d
LEA RDX,[0x1b1609]
LEA RCX,[0x1b3aae]
MOV AL,0x0
CALL 0x00148a00
LAB_0014f18f:
TEST byte ptr [RBP + -0x31],0x1
JZ 0x0014f1a8
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001428f0
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0014f1b9
LAB_0014f1a8:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00145d90
MOV qword ptr [RBP + -0x70],RAX
LAB_0014f1b9:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + 0x10],0x40000000
JC 0x0014f1ec
LEA RDI,[0x1b15b7]
MOV ESI,0xb12
LEA RDX,[0x1b1609]
LEA RCX,[0x1b3ad5]
MOV AL,0x0
CALL 0x00148a00
LAB_0014f1ec:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x60],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x54],EAX
MOV DL,byte ptr [RBP + -0x31]
XOR EAX,EAX
MOV ECX,0x1
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x60]
MOV EDX,0x14
CALL 0x0014e370
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX + 0x50],0x1e
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x70
POP RBP
RET
|
long ggml_set_impl(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,ulong param_7,byte param_8)
{
long lVar1;
long lVar2;
long local_78;
int4 local_68;
int4 local_64;
int4 local_60;
int4 local_5c;
uint local_58;
long local_48;
byte local_39;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_39 = param_8 & 1;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
lVar1 = ggml_nelements(param_2);
lVar2 = ggml_nelements(local_20);
if (lVar1 < lVar2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xb0d,"GGML_ASSERT(%s) failed","ggml_nelements(a) >= ggml_nelements(b)");
}
if ((local_39 & 1) == 0) {
local_78 = ggml_dup_tensor(local_10,local_18);
}
else {
local_78 = ggml_view_tensor(local_10,local_18);
}
local_48 = local_78;
if (0x3fffffff < param_7) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xb12,"GGML_ASSERT(%s) failed","offset < (size_t)(1 << 30)");
}
local_68 = (int4)local_28;
local_64 = (int4)local_30;
local_60 = (int4)local_38;
local_5c = (int4)param_7;
local_58 = (uint)((local_39 & 1) != 0);
ggml_set_op_params(local_48,&local_68,0x14);
*(int4 *)(local_48 + 0x50) = 0x1e;
*(int8 *)(local_48 + 0x98) = local_18;
*(int8 *)(local_48 + 0xa0) = local_20;
return local_48;
}
|
|
1,559 | ggml_set_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_set_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
size_t nb1,
size_t nb2,
size_t nb3,
size_t offset,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) >= ggml_nelements(b));
// make a view of the destination
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
GGML_ASSERT(offset < (size_t)(1 << 30));
int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_SET;
result->src[0] = a;
result->src[1] = b;
return result;
} | O1 | c | ggml_set_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %rcx, %r12
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq 0x18(%rdx), %rcx
imulq 0x10(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jl 0x1d31f
movq %r8, %r15
movq %rsi, %rbx
movq %rdx, %r13
movb 0x48(%rsp), %r14b
movq 0x40(%rsp), %rbp
testb %r14b, %r14b
je 0x1d2be
movq %rbx, %rsi
callq 0x17260
jmp 0x1d2d4
leaq 0x10(%rbx), %rcx
movl (%rbx), %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b871
cmpq $0x40000000, %rbp # imm = 0x40000000
jae 0x1d33b
testq %rax, %rax
je 0x1d357
movzbl %r14b, %ecx
movl %r12d, 0x54(%rax)
movl %r15d, 0x58(%rax)
movq (%rsp), %rdx
movl %edx, 0x5c(%rax)
movl %ebp, 0x60(%rax)
movl %ecx, 0x64(%rax)
movl $0x1e, 0x50(%rax)
movq %rbx, 0x98(%rax)
movq %r13, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f249(%rip), %rdi # 0x4c56f
leaq 0x2f294(%rip), %rdx # 0x4c5c1
leaq 0x314cd(%rip), %rcx # 0x4e801
movl $0xb0d, %esi # imm = 0xB0D
jmp 0x1d371
leaq 0x2f22d(%rip), %rdi # 0x4c56f
leaq 0x2f278(%rip), %rdx # 0x4c5c1
leaq 0x314d8(%rip), %rcx # 0x4e828
movl $0xb12, %esi # imm = 0xB12
jmp 0x1d371
leaq 0x31367(%rip), %rdi # 0x4e6c5
leaq 0x2f25c(%rip), %rdx # 0x4c5c1
leaq 0x31486(%rip), %rcx # 0x4e7f2
movl $0x70, %esi
xorl %eax, %eax
callq 0x18ce0
| ggml_set_impl:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r9
mov r12, rcx
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rcx, [rdx+18h]
imul rcx, [rdx+10h]
imul rcx, [rdx+20h]
imul rcx, [rdx+28h]
cmp rax, rcx
jl loc_1D31F
mov r15, r8
mov rbx, rsi
mov r13, rdx
mov r14b, [rsp+38h+arg_8]
mov rbp, [rsp+38h+arg_0]
test r14b, r14b
jz short loc_1D2BE
mov rsi, rbx
call _ggml_view_tensor
jmp short loc_1D2D4
loc_1D2BE:
lea rcx, [rbx+10h]
mov esi, [rbx]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1D2D4:
cmp rbp, 40000000h
jnb short loc_1D33B
test rax, rax
jz short loc_1D357
movzx ecx, r14b
mov [rax+54h], r12d
mov [rax+58h], r15d
mov rdx, [rsp+38h+var_38]
mov [rax+5Ch], edx
mov [rax+60h], ebp
mov [rax+64h], ecx
mov dword ptr [rax+50h], 1Eh
mov [rax+98h], rbx
mov [rax+0A0h], r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1D31F:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA; "ggml_nelements(a) >= ggml_nelements(b)"
mov esi, 0B0Dh
jmp short loc_1D371
loc_1D33B:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeT130; "offset < (size_t)(1 << 30)"
mov esi, 0B12h
jmp short loc_1D371
loc_1D357:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
loc_1D371:
xor eax, eax
call _ggml_abort
| long long ggml_set_impl(
long long a1,
long long a2,
_QWORD *a3,
int a4,
int a5,
int a6,
double a7,
unsigned long long a8,
unsigned __int8 a9)
{
long long result; // rax
const char *v13; // rdi
const char *v14; // rcx
int v15; // esi
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) < a3[5]
* a3[4]
* a3[2]
* a3[3] )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v14 = "ggml_nelements(a) >= ggml_nelements(b)";
v15 = 2829;
goto LABEL_11;
}
if ( a9 )
result = ggml_view_tensor(a1, a2, a7);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (long long *)(a2 + 16), 0LL, 0LL, a7);
if ( a8 >= 0x40000000 )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v14 = "offset < (size_t)(1 << 30)";
v15 = 2834;
goto LABEL_11;
}
if ( !result )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
v14 = "tensor != NULL";
v15 = 112;
LABEL_11:
ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, a5, a6);
}
*(_DWORD *)(result + 84) = a4;
*(_DWORD *)(result + 88) = a5;
*(_DWORD *)(result + 92) = a6;
*(_DWORD *)(result + 96) = a8;
*(_DWORD *)(result + 100) = a9;
*(_DWORD *)(result + 80) = 30;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_set_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],R9
MOV R12,RCX
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RCX,qword ptr [RDX + 0x18]
IMUL RCX,qword ptr [RDX + 0x10]
IMUL RCX,qword ptr [RDX + 0x20]
IMUL RCX,qword ptr [RDX + 0x28]
CMP RAX,RCX
JL 0x0011d31f
MOV R15,R8
MOV RBX,RSI
MOV R13,RDX
MOV R14B,byte ptr [RSP + 0x48]
MOV RBP,qword ptr [RSP + 0x40]
TEST R14B,R14B
JZ 0x0011d2be
MOV RSI,RBX
CALL 0x00117260
JMP 0x0011d2d4
LAB_0011d2be:
LEA RCX,[RBX + 0x10]
MOV ESI,dword ptr [RBX]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011b871
LAB_0011d2d4:
CMP RBP,0x40000000
JNC 0x0011d33b
TEST RAX,RAX
JZ 0x0011d357
MOVZX ECX,R14B
MOV dword ptr [RAX + 0x54],R12D
MOV dword ptr [RAX + 0x58],R15D
MOV RDX,qword ptr [RSP]
MOV dword ptr [RAX + 0x5c],EDX
MOV dword ptr [RAX + 0x60],EBP
MOV dword ptr [RAX + 0x64],ECX
MOV dword ptr [RAX + 0x50],0x1e
MOV qword ptr [RAX + 0x98],RBX
MOV qword ptr [RAX + 0xa0],R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011d31f:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14e801]
MOV ESI,0xb0d
JMP 0x0011d371
LAB_0011d33b:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14e828]
MOV ESI,0xb12
JMP 0x0011d371
LAB_0011d357:
LEA RDI,[0x14e6c5]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14e7f2]
MOV ESI,0x70
LAB_0011d371:
XOR EAX,EAX
CALL 0x00118ce0
|
void ggml_set_impl(int8 param_1,int4 *param_2,long param_3,int4 param_4,
int4 param_5,int4 param_6,ulong param_7,byte param_8)
{
long lVar1;
char *pcVar2;
int8 uVar3;
char *pcVar4;
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) <
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28)) {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "ggml_nelements(a) >= ggml_nelements(b)";
uVar3 = 0xb0d;
}
else {
if (param_8 == 0) {
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_1,param_2);
}
if (param_7 < 0x40000000) {
if (lVar1 != 0) {
*(int4 *)(lVar1 + 0x54) = param_4;
*(int4 *)(lVar1 + 0x58) = param_5;
*(int4 *)(lVar1 + 0x5c) = param_6;
*(int *)(lVar1 + 0x60) = (int)param_7;
*(uint *)(lVar1 + 100) = (uint)param_8;
*(int4 *)(lVar1 + 0x50) = 0x1e;
*(int4 **)(lVar1 + 0x98) = param_2;
*(long *)(lVar1 + 0xa0) = param_3;
return;
}
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
pcVar2 = "tensor != NULL";
uVar3 = 0x70;
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "offset < (size_t)(1 << 30)";
uVar3 = 0xb12;
}
}
/* WARNING: Subroutine does not return */
ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
1,560 | ggml_set_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_set_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
size_t nb1,
size_t nb2,
size_t nb3,
size_t offset,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) >= ggml_nelements(b));
// make a view of the destination
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
GGML_ASSERT(offset < (size_t)(1 << 30));
int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_SET;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_set_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq 0x18(%rdx), %rcx
imulq 0x10(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jl 0x228fc
movq %rsi, %rbx
movq %rdx, %r14
movq %r8, %r15
movq %r9, %r12
cmpb $0x0, 0x58(%rsp)
je 0x2289c
callq 0x1d410
jmp 0x228a1
callq 0x1e7a0
movq %rax, %rbp
movq 0x50(%rsp), %rax
cmpq $0x40000000, %rax # imm = 0x40000000
jae 0x22918
movq %rsp, %rsi
movl %r13d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r12d, 0x8(%rsi)
movl %eax, 0xc(%rsi)
movzbl 0x58(%rsp), %eax
movl %eax, 0x10(%rsi)
pushq $0x14
popq %rdx
movq %rbp, %rdi
callq 0x2221d
movl $0x1e, 0x50(%rbp)
movq %rbx, 0x98(%rbp)
movq %r14, 0xa0(%rbp)
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2bc80(%rip), %rdi # 0x4e583
leaq 0x2bccb(%rip), %rdx # 0x4e5d5
leaq 0x2df04(%rip), %rcx # 0x50815
movl $0xb0d, %esi # imm = 0xB0D
jmp 0x22932
leaq 0x2bc64(%rip), %rdi # 0x4e583
leaq 0x2bcaf(%rip), %rdx # 0x4e5d5
leaq 0x2df0f(%rip), %rcx # 0x5083c
movl $0xb12, %esi # imm = 0xB12
xorl %eax, %eax
callq 0x1f9b0
| ggml_set_impl:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rcx, [rdx+18h]
imul rcx, [rdx+10h]
imul rcx, [rdx+20h]
imul rcx, [rdx+28h]
cmp rax, rcx
jl short loc_228FC
mov rbx, rsi
mov r14, rdx
mov r15, r8
mov r12, r9
cmp [rsp+48h+arg_8], 0
jz short loc_2289C
call _ggml_view_tensor
jmp short loc_228A1
loc_2289C:
call _ggml_dup_tensor
loc_228A1:
mov rbp, rax
mov rax, [rsp+48h+arg_0]
cmp rax, 40000000h
jnb short loc_22918
mov rsi, rsp
mov [rsi], r13d
mov [rsi+4], r15d
mov [rsi+8], r12d
mov [rsi+0Ch], eax
movzx eax, [rsp+48h+arg_8]
mov [rsi+10h], eax
push 14h
pop rdx
mov rdi, rbp
call ggml_set_op_params
mov dword ptr [rbp+50h], 1Eh
mov [rbp+98h], rbx
mov [rbp+0A0h], r14
mov rax, rbp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_228FC:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA; "ggml_nelements(a) >= ggml_nelements(b)"
mov esi, 0B0Dh
jmp short loc_22932
loc_22918:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeT130; "offset < (size_t)(1 << 30)"
mov esi, 0B12h
loc_22932:
xor eax, eax
call _ggml_abort
| long long ggml_set_impl(
long long a1,
long long a2,
_QWORD *a3,
int a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
unsigned long long a15,
unsigned __int8 a16)
{
int v18; // r15d
int v19; // r12d
long long v20; // rax
long long v21; // rcx
long long v22; // rbp
const char *v24; // rcx
int v25; // esi
_DWORD v26[18]; // [rsp+0h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) < a3[5]
* a3[4]
* a3[2]
* a3[3] )
{
v24 = "ggml_nelements(a) >= ggml_nelements(b)";
v25 = 2829;
goto LABEL_9;
}
v18 = a5;
v19 = a6;
if ( a16 )
v20 = ggml_view_tensor(a1, a2, a7, a8, a9, a10, a11, a12, a13, a14);
else
v20 = ggml_dup_tensor(a1, (unsigned int *)a2);
v22 = v20;
if ( a15 >= 0x40000000 )
{
v24 = "offset < (size_t)(1 << 30)";
v25 = 2834;
LABEL_9:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v25,
(long long)"GGML_ASSERT(%s) failed",
(long long)v24,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v26[0]);
}
v26[0] = a4;
v26[1] = v18;
v26[2] = v19;
v26[3] = a15;
v26[4] = a16;
ggml_set_op_params(v20, (long long)v26, 20LL, a7, a8, a9, a10, a11, a12, a13, a14, v21, a5, a6);
*(_DWORD *)(v22 + 80) = 30;
*(_QWORD *)(v22 + 152) = a2;
*(_QWORD *)(v22 + 160) = a3;
return v22;
}
| ggml_set_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RCX,qword ptr [RDX + 0x18]
IMUL RCX,qword ptr [RDX + 0x10]
IMUL RCX,qword ptr [RDX + 0x20]
IMUL RCX,qword ptr [RDX + 0x28]
CMP RAX,RCX
JL 0x001228fc
MOV RBX,RSI
MOV R14,RDX
MOV R15,R8
MOV R12,R9
CMP byte ptr [RSP + 0x58],0x0
JZ 0x0012289c
CALL 0x0011d410
JMP 0x001228a1
LAB_0012289c:
CALL 0x0011e7a0
LAB_001228a1:
MOV RBP,RAX
MOV RAX,qword ptr [RSP + 0x50]
CMP RAX,0x40000000
JNC 0x00122918
MOV RSI,RSP
MOV dword ptr [RSI],R13D
MOV dword ptr [RSI + 0x4],R15D
MOV dword ptr [RSI + 0x8],R12D
MOV dword ptr [RSI + 0xc],EAX
MOVZX EAX,byte ptr [RSP + 0x58]
MOV dword ptr [RSI + 0x10],EAX
PUSH 0x14
POP RDX
MOV RDI,RBP
CALL 0x0012221d
MOV dword ptr [RBP + 0x50],0x1e
MOV qword ptr [RBP + 0x98],RBX
MOV qword ptr [RBP + 0xa0],R14
MOV RAX,RBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001228fc:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x150815]
MOV ESI,0xb0d
JMP 0x00122932
LAB_00122918:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15083c]
MOV ESI,0xb12
LAB_00122932:
XOR EAX,EAX
CALL 0x0011f9b0
|
long ggml_set_impl(int8 param_1,long param_2,long param_3,int4 param_4,
int4 param_5,int4 param_6,ulong param_7,byte param_8)
{
long lVar1;
char *pcVar2;
int8 uVar3;
int4 local_48;
int4 local_44;
int4 local_40;
int4 local_3c;
uint local_38;
if (*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10) * *(long *)(param_2 + 0x20) *
*(long *)(param_2 + 0x28) <
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28)) {
pcVar2 = "ggml_nelements(a) >= ggml_nelements(b)";
uVar3 = 0xb0d;
}
else {
if (param_8 == 0) {
lVar1 = ggml_dup_tensor();
}
else {
lVar1 = ggml_view_tensor();
}
if (param_7 < 0x40000000) {
local_3c = (int4)param_7;
local_38 = (uint)param_8;
local_48 = param_4;
local_44 = param_5;
local_40 = param_6;
ggml_set_op_params(lVar1,&local_48,0x14);
*(int4 *)(lVar1 + 0x50) = 0x1e;
*(long *)(lVar1 + 0x98) = param_2;
*(long *)(lVar1 + 0xa0) = param_3;
return lVar1;
}
pcVar2 = "offset < (size_t)(1 << 30)";
uVar3 = 0xb12;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
1,561 | ggml_set_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_set_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
size_t nb1,
size_t nb2,
size_t nb3,
size_t offset,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) >= ggml_nelements(b));
// make a view of the destination
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
GGML_ASSERT(offset < (size_t)(1 << 30));
int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_SET;
result->src[0] = a;
result->src[1] = b;
return result;
} | O3 | c | ggml_set_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %rcx, %r12
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
imulq 0x28(%rsi), %rax
movq 0x18(%rdx), %rcx
imulq 0x10(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jl 0x1c034
movq %r8, %r15
movq %rsi, %rbx
movq %rdx, %r13
movb 0x48(%rsp), %r14b
movq 0x40(%rsp), %rbp
testb %r14b, %r14b
je 0x1bfd3
movq %rbx, %rsi
callq 0x16260
jmp 0x1bfe9
leaq 0x10(%rbx), %rcx
movl (%rbx), %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
cmpq $0x40000000, %rbp # imm = 0x40000000
jae 0x1c050
testq %rax, %rax
je 0x1c06c
movzbl %r14b, %ecx
movl %r12d, 0x54(%rax)
movl %r15d, 0x58(%rax)
movq (%rsp), %rdx
movl %edx, 0x5c(%rax)
movl %ebp, 0x60(%rax)
movl %ecx, 0x64(%rax)
movl $0x1e, 0x50(%rax)
movq %rbx, 0x98(%rax)
movq %r13, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x305d8(%rip), %rdi # 0x4c613
leaq 0x30623(%rip), %rdx # 0x4c665
leaq 0x3285c(%rip), %rcx # 0x4e8a5
movl $0xb0d, %esi # imm = 0xB0D
jmp 0x1c086
leaq 0x305bc(%rip), %rdi # 0x4c613
leaq 0x30607(%rip), %rdx # 0x4c665
leaq 0x32867(%rip), %rcx # 0x4e8cc
movl $0xb12, %esi # imm = 0xB12
jmp 0x1c086
leaq 0x326f6(%rip), %rdi # 0x4e769
leaq 0x305eb(%rip), %rdx # 0x4c665
leaq 0x32815(%rip), %rcx # 0x4e896
movl $0x70, %esi
xorl %eax, %eax
callq 0x17cd0
| ggml_set_impl:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r9
mov r12, rcx
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
imul rax, [rsi+28h]
mov rcx, [rdx+18h]
imul rcx, [rdx+10h]
imul rcx, [rdx+20h]
imul rcx, [rdx+28h]
cmp rax, rcx
jl loc_1C034
mov r15, r8
mov rbx, rsi
mov r13, rdx
mov r14b, [rsp+38h+arg_8]
mov rbp, [rsp+38h+arg_0]
test r14b, r14b
jz short loc_1BFD3
mov rsi, rbx
call _ggml_view_tensor
jmp short loc_1BFE9
loc_1BFD3:
lea rcx, [rbx+10h]
mov esi, [rbx]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1BFE9:
cmp rbp, 40000000h
jnb short loc_1C050
test rax, rax
jz short loc_1C06C
movzx ecx, r14b
mov [rax+54h], r12d
mov [rax+58h], r15d
mov rdx, [rsp+38h+var_38]
mov [rax+5Ch], edx
mov [rax+60h], ebp
mov [rax+64h], ecx
mov dword ptr [rax+50h], 1Eh
mov [rax+98h], rbx
mov [rax+0A0h], r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1C034:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA; "ggml_nelements(a) >= ggml_nelements(b)"
mov esi, 0B0Dh
jmp short loc_1C086
loc_1C050:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeT130; "offset < (size_t)(1 << 30)"
mov esi, 0B12h
jmp short loc_1C086
loc_1C06C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
loc_1C086:
xor eax, eax
call _ggml_abort
| long long ggml_set_impl(
long long a1,
long long a2,
_QWORD *a3,
int a4,
int a5,
int a6,
double a7,
unsigned long long a8,
unsigned __int8 a9)
{
long long result; // rax
const char *v13; // rdi
const char *v14; // rcx
int v15; // esi
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) < a3[5]
* a3[4]
* a3[2]
* a3[3] )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v14 = "ggml_nelements(a) >= ggml_nelements(b)";
v15 = 2829;
goto LABEL_11;
}
if ( a9 )
result = ggml_view_tensor(a1, a2, a7);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)(a2 + 16), 0LL, 0LL, a7);
if ( a8 >= 0x40000000 )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v14 = "offset < (size_t)(1 << 30)";
v15 = 2834;
goto LABEL_11;
}
if ( !result )
{
v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
v14 = "tensor != NULL";
v15 = 112;
LABEL_11:
ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, a5, a6);
}
*(_DWORD *)(result + 84) = a4;
*(_DWORD *)(result + 88) = a5;
*(_DWORD *)(result + 92) = a6;
*(_DWORD *)(result + 96) = a8;
*(_DWORD *)(result + 100) = a9;
*(_DWORD *)(result + 80) = 30;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_set_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],R9
MOV R12,RCX
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
IMUL RAX,qword ptr [RSI + 0x28]
MOV RCX,qword ptr [RDX + 0x18]
IMUL RCX,qword ptr [RDX + 0x10]
IMUL RCX,qword ptr [RDX + 0x20]
IMUL RCX,qword ptr [RDX + 0x28]
CMP RAX,RCX
JL 0x0011c034
MOV R15,R8
MOV RBX,RSI
MOV R13,RDX
MOV R14B,byte ptr [RSP + 0x48]
MOV RBP,qword ptr [RSP + 0x40]
TEST R14B,R14B
JZ 0x0011bfd3
MOV RSI,RBX
CALL 0x00116260
JMP 0x0011bfe9
LAB_0011bfd3:
LEA RCX,[RBX + 0x10]
MOV ESI,dword ptr [RBX]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
LAB_0011bfe9:
CMP RBP,0x40000000
JNC 0x0011c050
TEST RAX,RAX
JZ 0x0011c06c
MOVZX ECX,R14B
MOV dword ptr [RAX + 0x54],R12D
MOV dword ptr [RAX + 0x58],R15D
MOV RDX,qword ptr [RSP]
MOV dword ptr [RAX + 0x5c],EDX
MOV dword ptr [RAX + 0x60],EBP
MOV dword ptr [RAX + 0x64],ECX
MOV dword ptr [RAX + 0x50],0x1e
MOV qword ptr [RAX + 0x98],RBX
MOV qword ptr [RAX + 0xa0],R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011c034:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14e8a5]
MOV ESI,0xb0d
JMP 0x0011c086
LAB_0011c050:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14e8cc]
MOV ESI,0xb12
JMP 0x0011c086
LAB_0011c06c:
LEA RDI,[0x14e769]
LEA RDX,[0x14c665]
LEA RCX,[0x14e896]
MOV ESI,0x70
LAB_0011c086:
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_set_impl(int8 param_1,int4 *param_2,long param_3,int4 param_4,
int4 param_5,int4 param_6,ulong param_7,byte param_8)
{
long lVar1;
char *pcVar2;
int8 uVar3;
char *pcVar4;
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) <
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28)) {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "ggml_nelements(a) >= ggml_nelements(b)";
uVar3 = 0xb0d;
}
else {
if (param_8 == 0) {
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_1,param_2);
}
if (param_7 < 0x40000000) {
if (lVar1 != 0) {
*(int4 *)(lVar1 + 0x54) = param_4;
*(int4 *)(lVar1 + 0x58) = param_5;
*(int4 *)(lVar1 + 0x5c) = param_6;
*(int *)(lVar1 + 0x60) = (int)param_7;
*(uint *)(lVar1 + 100) = (uint)param_8;
*(int4 *)(lVar1 + 0x50) = 0x1e;
*(int4 **)(lVar1 + 0x98) = param_2;
*(long *)(lVar1 + 0xa0) = param_3;
return;
}
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
pcVar2 = "tensor != NULL";
uVar3 = 0x70;
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "offset < (size_t)(1 << 30)";
uVar3 = 0xb12;
}
}
/* WARNING: Subroutine does not return */
ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
1,562 | ma_tls_end | eloqsql/libmariadb/libmariadb/secure/openssl.c | void ma_tls_end()
{
if (ma_tls_initialized)
{
pthread_mutex_lock(&LOCK_openssl_config);
#ifndef HAVE_OPENSSL_1_1_API
if (LOCK_crypto)
{
int i;
CRYPTO_set_locking_callback(NULL);
CRYPTO_THREADID_set_callback(NULL);
for (i=0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&LOCK_crypto[i]);
ma_free((gptr)LOCK_crypto);
LOCK_crypto= NULL;
}
#endif
if (mariadb_deinitialize_ssl)
{
#ifndef HAVE_OPENSSL_1_1_API
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
CONF_modules_free();
CONF_modules_unload(1);
#endif
}
ma_tls_initialized= FALSE;
pthread_mutex_unlock(&LOCK_openssl_config);
pthread_mutex_destroy(&LOCK_openssl_config);
}
return;
} | O0 | c | ma_tls_end:
pushq %rbp
movq %rsp, %rbp
leaq 0x29ab5(%rip), %rax # 0x603e0
cmpb $0x0, (%rax)
je 0x3696c
leaq 0x2b389(%rip), %rdi # 0x61cc0
callq 0x13660
leaq 0x2825d(%rip), %rax # 0x5eba0
cmpl $0x0, (%rax)
je 0x3694a
jmp 0x3694a
leaq 0x29a8f(%rip), %rax # 0x603e0
movb $0x0, (%rax)
leaq 0x2b365(%rip), %rdi # 0x61cc0
callq 0x13310
leaq 0x2b359(%rip), %rdi # 0x61cc0
callq 0x134f0
popq %rbp
retq
nop
| ma_tls_end:
push rbp
mov rbp, rsp
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jz short loc_3696C
lea rdi, LOCK_openssl_config
call _pthread_mutex_lock
lea rax, mariadb_deinitialize_ssl
cmp dword ptr [rax], 0
jz short loc_3694A
jmp short $+2
loc_3694A:
lea rax, ma_tls_initialized
mov byte ptr [rax], 0
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
lea rdi, LOCK_openssl_config
call _pthread_mutex_destroy
loc_3696C:
pop rbp
retn
| void *ma_tls_end()
{
void *result; // rax
result = &ma_tls_initialized;
if ( ma_tls_initialized )
{
pthread_mutex_lock(&LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock(&LOCK_openssl_config);
return (void *)pthread_mutex_destroy(&LOCK_openssl_config);
}
return result;
}
| ma_tls_end:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x1603e0]
CMP byte ptr [RAX],0x0
JZ 0x0013696c
LEA RDI,[0x161cc0]
CALL 0x00113660
LEA RAX,[0x15eba0]
CMP dword ptr [RAX],0x0
JZ 0x0013694a
JMP 0x0013694a
LAB_0013694a:
LEA RAX,[0x1603e0]
MOV byte ptr [RAX],0x0
LEA RDI,[0x161cc0]
CALL 0x00113310
LEA RDI,[0x161cc0]
CALL 0x001134f0
LAB_0013696c:
POP RBP
RET
|
void ma_tls_end(void)
{
if (ma_tls_initialized != '\0') {
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
ma_tls_initialized = '\0';
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config);
}
return;
}
|
|
1,563 | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op<&evmc_status_code evmone::advanced::instr::impl<(evmone::Opcode)10, &evmone::instr::core::exp(evmone::StackTop, long, evmone::ExecutionState&)>(evmone::advanced::AdvancedExecutionState&)>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp | const Instruction* op(const Instruction* instr, AdvancedExecutionState& state) noexcept
{
if (const auto status_code = InstrFn(state); status_code != EVMC_SUCCESS)
return state.exit(status_code);
return ++instr;
} | O3 | cpp | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op<&evmc_status_code evmone::advanced::instr::impl<(evmone::Opcode)10, &evmone::instr::core::exp(evmone::StackTop, long, evmone::ExecutionState&)>(evmone::advanced::AdvancedExecutionState&)>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x220(%rsi), %rsi
movq 0x228(%r14), %rdi
movq %r14, %rdx
callq 0x4238c
movq %rdx, 0x220(%r14)
addq $-0x60, 0x228(%r14)
testl %eax, %eax
je 0x50712
movl %eax, 0x78(%r14)
addq $0x10, %rbx
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %rbx, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
| _ZN6evmone8advanced12_GLOBAL__N_12opIXadL_ZNS0_5instr4implILNS_6OpcodeE94EXadL_ZNS_5instr4core5mcopyENS_8StackTopElRNS_14ExecutionStateEEEEE16evmc_status_codeRNS0_22AdvancedExecutionStateEEEEEPKNS0_11InstructionESG_SD_:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+220h]
mov rdi, [r14+228h]
mov rdx, r14
call _ZN6evmone5instr4core5mcopyENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::mcopy(evmone::StackTop,long,evmone::ExecutionState &)
mov [r14+220h], rdx
add qword ptr [r14+228h], 0FFFFFFFFFFFFFFA0h
test eax, eax
jz short loc_50712
mov [r14+78h], eax
loc_50712:
add rbx, 10h
xor ecx, ecx
test eax, eax
cmovz rcx, rbx
mov rax, rcx
add rsp, 8
pop rbx
pop r14
retn
| long long evmone::advanced::`anonymous namespace'::op<&evmc_status_code evmone::advanced::instr::impl<(evmone::Opcode)94,&evmone::instr::core::mcopy>>(
long long a1,
long long a2)
{
int v2; // eax
long long v3; // rdx
long long v4; // rcx
v2 = evmone::instr::core::mcopy(*(const __m128i **)(a2 + 552), *(char **)(a2 + 544), a2);
*(_QWORD *)(a2 + 544) = v3;
*(_QWORD *)(a2 + 552) -= 96LL;
if ( v2 )
*(_DWORD *)(a2 + 120) = v2;
v4 = 0LL;
if ( !v2 )
return a1 + 16;
return v4;
}
| op<&(evmc_status_code_evmone::advanced::instr::impl<(evmone::Opcode)94,&evmone::instr::core::mcopy>(evmone::advanced::AdvancedExecutionState&))>:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x220]
MOV RDI,qword ptr [R14 + 0x228]
MOV RDX,R14
CALL 0x0014238c
MOV qword ptr [R14 + 0x220],RDX
ADD qword ptr [R14 + 0x228],-0x60
TEST EAX,EAX
JZ 0x00150712
MOV dword ptr [R14 + 0x78],EAX
LAB_00150712:
ADD RBX,0x10
XOR ECX,ECX
TEST EAX,EAX
CMOVZ RCX,RBX
MOV RAX,RCX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous
namespace)::op<&(evmc_status_code evmone::advanced::instr::impl<(evmone::Opcode)94,
&evmone::instr::core::mcopy>(evmone::advanced::AdvancedExecutionState&))>(evmone::advanced::Instruction
const*, evmone::advanced::AdvancedExecutionState&) */
Instruction *
evmone::advanced::(anonymous_namespace)::
op<&(evmc_status_code_evmone::advanced::instr::impl<(evmone::Opcode)94,&evmone::instr::core::mcopy>(evmone::advanced::AdvancedExecutionState&))>
(Instruction *param_1,AdvancedExecutionState *param_2)
{
int iVar1;
Instruction *pIVar2;
int8 extraout_RDX;
iVar1 = instr::core::mcopy(*(int8 *)(param_2 + 0x228),*(int8 *)(param_2 + 0x220),
param_2);
*(int8 *)(param_2 + 0x220) = extraout_RDX;
*(long *)(param_2 + 0x228) = *(long *)(param_2 + 0x228) + -0x60;
if (iVar1 != 0) {
*(int *)(param_2 + 0x78) = iVar1;
}
pIVar2 = (Instruction *)0x0;
if (iVar1 == 0) {
pIVar2 = param_1 + 0x10;
}
return pIVar2;
}
|
|
1,564 | testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int, char const*) | giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-typed-test.cc | const char* TypedTestSuitePState::VerifyRegisteredTestNames(
const char* test_suite_name, const char* file, int line,
const char* registered_tests) {
RegisterTypeParameterizedTestSuite(test_suite_name, CodeLocation(file, line));
typedef RegisteredTestsMap::const_iterator RegisteredTestIter;
registered_ = true;
std::vector<std::string> name_vec = SplitIntoTestNames(registered_tests);
Message errors;
std::set<std::string> tests;
for (std::vector<std::string>::const_iterator name_it = name_vec.begin();
name_it != name_vec.end(); ++name_it) {
const std::string& name = *name_it;
if (tests.count(name) != 0) {
errors << "Test " << name << " is listed more than once.\n";
continue;
}
if (registered_tests_.count(name) != 0) {
tests.insert(name);
} else {
errors << "No test named " << name
<< " can be found in this test suite.\n";
}
}
for (RegisteredTestIter it = registered_tests_.begin();
it != registered_tests_.end(); ++it) {
if (tests.count(it->first) == 0) {
errors << "You forgot to list test " << it->first << ".\n";
}
}
const std::string& errors_str = errors.GetString();
if (!errors_str.empty()) {
fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(),
errors_str.c_str());
fflush(stderr);
posix::Abort();
}
return registered_tests;
} | O2 | cpp | testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x28(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movq %r12, %rsi
callq 0x81f0
leaq 0xc0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x13119
movq %rdx, 0xb0(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
jmp 0x1311f
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x30(%rsp), %rcx
movq %rax, 0x28(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xb0(%rsp), %rsi
movq %rcx, 0x8(%rsi)
movb $0x0, 0x38(%rsp)
movl %ebp, 0x20(%rsi)
movq %rbx, %rdi
callq 0x13479
movq %r12, 0x48(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x8ad8
leaq 0x28(%rsp), %rdi
callq 0x8ad8
movb $0x1, (%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r14, 0x58(%rsp)
leaq -0x1(%r14), %rbx
movsbl 0x1(%rbx), %edi
incq %rbx
callq 0x2826a
testb %al, %al
jne 0x13182
leaq 0x60(%rsp), %r14
leaq 0x80(%rsp), %r12
leaq 0x10(%rsp), %r13
testq %rbx, %rbx
je 0x131e7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x281f4
movq %r12, %rdi
movq %r14, %rsi
callq 0x281a2
movq %r13, %rdi
movq %r12, %rsi
callq 0x2b138
movq %r12, %rdi
callq 0x8ad8
movq %r14, %rdi
callq 0x8ad8
movq %rbx, %rdi
callq 0x28240
movq %rax, %rbx
jmp 0x131a4
movl %ebp, 0xc(%rsp)
movq %rsp, %rdi
callq 0x1575e
leaq 0x88(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq 0x10(%rsp), %r13
movq (%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x10(%rax), %rbp
leaq 0x8(%r15), %r14
leaq 0x80(%rsp), %rbx
leaq 0x203cc(%rip), %r12 # 0x33601
cmpq 0x18(%rsp), %r13
je 0x132b7
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2509a
testq %rax, %rax
je 0x13273
movq %rbp, %rdi
leaq 0x203a5(%rip), %rsi # 0x335fb
callq 0x84c0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x8450
movq %r12, %rsi
movq %rbp, %rdi
callq 0x84c0
jmp 0x1328e
movq %r14, %rdi
movq %r13, %rsi
callq 0x250b4
testq %rax, %rax
je 0x13294
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2b1da
addq $0x20, %r13
jmp 0x13235
movq %rbp, %rdi
leaq 0x2037f(%rip), %rsi # 0x3361d
callq 0x84c0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x8450
leaq 0x20377(%rip), %rsi # 0x3362c
jmp 0x13269
movq 0x20(%r15), %rbx
addq $0x10, %r15
leaq 0x80(%rsp), %r14
leaq 0x20fc6(%rip), %r13 # 0x34294
cmpq %r15, %rbx
je 0x13326
leaq 0x20(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2509a
testq %rax, %rax
jne 0x13319
movq (%rsp), %r12
addq $0x10, %r12
movq %r12, %rdi
leaq 0x20356(%rip), %rsi # 0x3364f
callq 0x84c0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x8450
movq (%rsp), %rdi
addq $0x10, %rdi
movq %r13, %rsi
callq 0x84c0
movq %rbx, %rdi
callq 0x85d0
movq %rax, %rbx
jmp 0x132ce
movq (%rsp), %r14
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x15922
cmpq $0x0, 0x68(%rsp)
movq 0x58(%rsp), %rbx
jne 0x13388
leaq 0x60(%rsp), %rdi
callq 0x8ad8
leaq 0x80(%rsp), %rdi
callq 0x2827c
testq %r14, %r14
je 0x13369
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x246f8
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ac39(%rip), %r15 # 0x4dfc8
movq (%r15), %rbx
leaq 0xd8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x11bec
leaq 0xd8(%rsp), %r14
movq (%r14), %rdx
movq 0x60(%rsp), %rcx
leaq 0x202a9(%rip), %rsi # 0x33668
movq %rbx, %rdi
xorl %eax, %eax
callq 0x87f0
movq %r14, %rdi
callq 0x8ad8
movq (%r15), %rdi
callq 0x8610
callq 0x24a45
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8ad8
jmp 0x1344c
movq %rax, %rbx
jmp 0x1344c
jmp 0x13415
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8ad8
leaq 0x28(%rsp), %rdi
callq 0x8ad8
jmp 0x13471
movq %rax, %rbx
jmp 0x13471
movq %rax, %rbx
jmp 0x13467
movq %rax, %rbx
jmp 0x1342f
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x8ad8
leaq 0x60(%rsp), %rdi
callq 0x8ad8
jmp 0x13467
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x1344c
movq %rax, %rbx
movq 0x50(%rsp), %r14
leaq 0x80(%rsp), %rdi
callq 0x2827c
testq %r14, %r14
je 0x13467
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x246f8
movq %rbx, %rdi
callq 0x89a0
| _ZN7testing8internal20TypedTestSuitePState25VerifyRegisteredTestNamesEPKcS3_iS3_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r14, r8
mov ebp, ecx
mov r12, rdx
mov rbx, rsi
mov r15, rdi
lea rdi, [rsp+128h+var_100]
lea rdx, [rsp+128h+var_A8]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
lea rcx, [rsp+128h+var_68]
mov [rcx-10h], rcx
lea rax, [rsp+128h+var_F0]
mov rdx, [rax-10h]
cmp rdx, rax
jz short loc_13119
mov qword ptr [rsp+128h+var_78], rdx
mov rcx, [rsp+128h+var_F0]
mov [rsp+128h+var_68], rcx
jmp short loc_1311F
loc_13119:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_1311F:
mov rcx, [rsp+128h+var_F8]
mov [rsp+128h+var_100], rax
and [rsp+128h+var_F8], 0
lea rsi, [rsp+128h+var_78]; char
mov [rsi+8], rcx
mov byte ptr [rsp+128h+var_F0], 0
mov [rsi+20h], ebp
mov rdi, rbx
call _ZN7testing8internal34RegisterTypeParameterizedTestSuiteEPKcNS0_12CodeLocationE; testing::internal::RegisterTypeParameterizedTestSuite(char const*,testing::internal::CodeLocation)
mov [rsp+128h+var_E0], r12
lea rdi, [rsp+128h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov byte ptr [r15], 1
xorps xmm0, xmm0
movaps [rsp+128h+var_118], xmm0
and [rsp+128h+var_108], 0
mov [rsp+128h+var_D0], r14
lea rbx, [r14-1]
loc_13182:
movsx edi, byte ptr [rbx+1]; this
inc rbx
call _ZN7testing8internal7IsSpaceEc; testing::internal::IsSpace(char)
test al, al
jnz short loc_13182
lea r14, [rsp+128h+var_C8]
lea r12, [rsp+128h+var_A8]
lea r13, [rsp+128h+var_118]
loc_131A4:
test rbx, rbx
jz short loc_131E7
mov rdi, r14
mov rsi, rbx
call _ZN7testing8internal19GetPrefixUntilCommaB5cxx11EPKc; testing::internal::GetPrefixUntilComma(char const*)
mov rdi, r12
mov rsi, r14
call _ZN7testing8internal19StripTrailingSpacesENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StripTrailingSpaces(std::string)
mov rdi, r13
mov rsi, r12; char *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx; this
call _ZN7testing8internal9SkipCommaEPKc; testing::internal::SkipComma(char const*)
mov rbx, rax
jmp short loc_131A4
loc_131E7:
mov [rsp+128h+var_11C], ebp
mov rdi, rsp; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
lea rax, [rsp+128h+var_A0]
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 r13, qword ptr [rsp+128h+var_118]
mov rax, [rsp+128h+var_128]
mov [rsp+128h+var_D8], rax
lea rbp, [rax+10h]
lea r14, [r15+8]
lea rbx, [rsp+128h+var_A8]
lea r12, aIsListedMoreTh; " is listed more than once.\n"
loc_13235:
cmp r13, qword ptr [rsp+128h+var_118+8]
jz short loc_132B7
mov rdi, rbx
mov rsi, r13
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_; std::set<std::string>::count(std::string const&)
test rax, rax
jz short loc_13273
mov rdi, rbp
lea rsi, aTest; "Test "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rbp
mov rsi, r13
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rsi, r12
loc_13269:
mov rdi, rbp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short loc_1328E
loc_13273:
mov rdi, r14
mov rsi, r13
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7testing8internal12CodeLocationESt4lessIvESaISt4pairIKS5_S8_EEE5countERSC_; std::map<std::string,testing::internal::CodeLocation>::count(std::string const&)
test rax, rax
jz short loc_13294
mov rdi, rbx
mov rsi, r13
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&)
loc_1328E:
add r13, 20h ; ' '
jmp short loc_13235
loc_13294:
mov rdi, rbp
lea rsi, aNoTestNamed; "No test named "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rbp
mov rsi, r13
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aCanBeFoundInTh; " can be found in this test suite.\n"
jmp short loc_13269
loc_132B7:
mov rbx, [r15+20h]
add r15, 10h
lea r14, [rsp+128h+var_A8]
lea r13, aNoteRandomizin+32h; ".\n"
loc_132CE:
cmp rbx, r15
jz short loc_13326
lea rbp, [rbx+20h]
mov rdi, r14
mov rsi, rbp
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_; std::set<std::string>::count(std::string const&)
test rax, rax
jnz short loc_13319
mov r12, [rsp+128h+var_128]
add r12, 10h
mov rdi, r12
lea rsi, aYouForgotToLis; "You forgot to list test "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, r12
mov rsi, rbp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, [rsp+128h+var_128]
add rdi, 10h
mov rsi, r13
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_13319:
mov rdi, rbx
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov rbx, rax
jmp short loc_132CE
loc_13326:
mov r14, [rsp+128h+var_128]
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
cmp [rsp+128h+var_C0], 0
mov rbx, [rsp+128h+var_D0]
jnz short loc_13388
lea rdi, [rsp+128h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_A8]
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 r14, r14
jz short loc_13369
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_13369:
lea rdi, [rsp+128h+var_118]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_13388:
mov r15, cs:stderr_ptr
mov rbx, [r15]
lea rdi, [rsp+128h+var_50]
mov rsi, [rsp+128h+var_E0]
mov edx, [rsp+128h+var_11C]
call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int)
lea r14, [rsp+128h+var_50]
mov rdx, [r14]
mov rcx, [rsp+128h+var_C8]
lea rsi, aSS; "%s %s"
mov rdi, rbx
xor eax, eax
call _fprintf
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [r15]; this
call _fflush
call _ZN7testing8internal5posix5AbortEv; testing::internal::posix::Abort(void)
mov rbx, rax
lea rdi, [rsp+128h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1344C
mov rbx, rax
jmp short loc_1344C
jmp short loc_13415
mov rbx, rax
lea rdi, [rsp+128h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_13471
mov rbx, rax
jmp short loc_13471
loc_13415:
mov rbx, rax
jmp short loc_13467
mov rbx, rax
jmp short loc_1342F
mov rbx, rax
lea rdi, [rsp+128h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1342F:
lea rdi, [rsp+128h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_13467
mov rbx, rax
mov r14, [rsp+128h+var_128]
jmp short loc_1344C
mov rbx, rax
mov r14, [rsp+128h+var_D8]
loc_1344C:
lea rdi, [rsp+128h+var_A8]
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 r14, r14
jz short loc_13467
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_13467:
lea rdi, [rsp+128h+var_118]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_13471:
mov rdi, rbx
call __Unwind_Resume
| const char * testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(
testing::internal::TypedTestSuitePState *this,
const char *a2,
const char *a3,
int a4,
const char *a5)
{
long long v9; // rcx
testing::internal *v10; // rbx
testing::internal *v11; // rdi
long long v12; // r13
long long v13; // rbp
const char *v14; // rsi
long long v15; // rbx
char *v16; // r15
long long v17; // r12
long long v18; // r14
const char *v19; // rbx
long long v21; // rbx
testing::internal::posix *v22; // rdi
long long v23; // [rsp+0h] [rbp-128h] BYREF
int v24; // [rsp+Ch] [rbp-11Ch]
__int128 v25; // [rsp+10h] [rbp-118h] BYREF
long long v26; // [rsp+20h] [rbp-108h]
__int128 *v27; // [rsp+28h] [rbp-100h] BYREF
long long v28; // [rsp+30h] [rbp-F8h]
__int128 v29; // [rsp+38h] [rbp-F0h] BYREF
const char *v30; // [rsp+48h] [rbp-E0h]
long long v31; // [rsp+50h] [rbp-D8h]
const char *v32; // [rsp+58h] [rbp-D0h]
const char *v33[4]; // [rsp+60h] [rbp-C8h] BYREF
char v34[8]; // [rsp+80h] [rbp-A8h] BYREF
int v35; // [rsp+88h] [rbp-A0h] BYREF
long long v36; // [rsp+90h] [rbp-98h]
int *v37; // [rsp+98h] [rbp-90h]
int *v38; // [rsp+A0h] [rbp-88h]
long long v39; // [rsp+A8h] [rbp-80h]
char v40[8]; // [rsp+B0h] [rbp-78h] BYREF
long long v41; // [rsp+B8h] [rbp-70h]
__int128 v42; // [rsp+C0h] [rbp-68h] BYREF
int v43; // [rsp+D0h] [rbp-58h]
const char *v44[10]; // [rsp+D8h] [rbp-50h] BYREF
std::string::basic_string(&v27, a3, v34);
*(_QWORD *)v40 = &v42;
if ( v27 == &v29 )
{
v42 = v29;
}
else
{
*(_QWORD *)v40 = v27;
*(_QWORD *)&v42 = v29;
}
v9 = v28;
v27 = &v29;
v28 = 0LL;
v41 = v9;
LOBYTE(v29) = 0;
v43 = a4;
testing::internal::RegisterTypeParameterizedTestSuite(a2);
v30 = a3;
std::string::~string(v40);
std::string::~string(&v27);
*(_BYTE *)this = 1;
v25 = 0LL;
v26 = 0LL;
v32 = a5;
v10 = (testing::internal *)(a5 - 1);
do
{
v11 = (testing::internal *)(unsigned int)*((char *)v10 + 1);
v10 = (testing::internal *)((char *)v10 + 1);
}
while ( (unsigned __int8)testing::internal::IsSpace(v11, (char)v40) );
while ( v10 )
{
testing::internal::GetPrefixUntilComma[abi:cxx11](v33, v10);
testing::internal::StripTrailingSpaces(v34, v33);
std::vector<std::string>::emplace_back<std::string>(&v25, v34);
std::string::~string(v34);
std::string::~string(v33);
v10 = (testing::internal *)testing::internal::SkipComma(v10, v34);
}
v24 = a4;
testing::Message::Message((testing::Message *)&v23);
v35 = 0;
v36 = 0LL;
v37 = &v35;
v38 = &v35;
v39 = 0LL;
v12 = v25;
v31 = v23;
v13 = v23 + 16;
while ( v12 != *((_QWORD *)&v25 + 1) )
{
if ( std::set<std::string>::count(v34, v12) )
{
std::operator<<<std::char_traits<char>>(v13, "Test ");
std::operator<<<char>(v13, v12);
v14 = " is listed more than once.\n";
LABEL_12:
std::operator<<<std::char_traits<char>>(v13, v14);
goto LABEL_15;
}
if ( !std::map<std::string,testing::internal::CodeLocation>::count((char *)this + 8, v12) )
{
std::operator<<<std::char_traits<char>>(v13, "No test named ");
std::operator<<<char>(v13, v12);
v14 = " can be found in this test suite.\n";
goto LABEL_12;
}
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&>(
v34,
v12);
LABEL_15:
v12 += 32LL;
}
v15 = *((_QWORD *)this + 4);
v16 = (char *)this + 16;
while ( (char *)v15 != v16 )
{
if ( !std::set<std::string>::count(v34, v15 + 32) )
{
v17 = v23 + 16;
std::operator<<<std::char_traits<char>>(v23 + 16, "You forgot to list test ");
std::operator<<<char>(v17, v15 + 32);
std::operator<<<std::char_traits<char>>(v23 + 16, ".\n");
}
v15 = std::_Rb_tree_increment(v15);
}
v18 = v23;
testing::internal::StringStreamToString(v33, v23);
v19 = v32;
if ( v33[1] )
{
v21 = stderr;
testing::internal::FormatFileLocation[abi:cxx11]((long long)v44, v30, v24);
fprintf(v21, "%s %s", v44[0], v33[0]);
std::string::~string(v44);
v22 = (testing::internal::posix *)stderr;
fflush(stderr);
testing::internal::posix::Abort(v22);
}
std::string::~string(v33);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(v34);
if ( v18 )
(*(void ( **)(long long))(*(_QWORD *)v18 + 8LL))(v18);
std::vector<std::string>::~vector(&v25);
return v19;
}
| VerifyRegisteredTestNames:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R14,R8
MOV EBP,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R15,RDI
LAB_001130d3:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x80]
MOV RSI,R12
CALL 0x001081f0
LEA RCX,[RSP + 0xc0]
MOV qword ptr [RCX + -0x10],RCX
LEA RAX,[RSP + 0x38]
MOV RDX,qword ptr [RAX + -0x10]
CMP RDX,RAX
JZ 0x00113119
MOV qword ptr [RSP + 0xb0],RDX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xc0],RCX
JMP 0x0011311f
LAB_00113119:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0011311f:
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x28],RAX
AND qword ptr [RSP + 0x30],0x0
LEA RSI,[RSP + 0xb0]
MOV qword ptr [RSI + 0x8],RCX
MOV byte ptr [RSP + 0x38],0x0
MOV dword ptr [RSI + 0x20],EBP
LAB_00113143:
MOV RDI,RBX
CALL 0x00113479
MOV qword ptr [RSP + 0x48],R12
LEA RDI,[RSP + 0xb0]
CALL 0x00108ad8
LEA RDI,[RSP + 0x28]
CALL 0x00108ad8
MOV byte ptr [R15],0x1
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
AND qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x58],R14
LEA RBX,[R14 + -0x1]
LAB_00113182:
MOVSX EDI,byte ptr [RBX + 0x1]
INC RBX
CALL 0x0012826a
TEST AL,AL
JNZ 0x00113182
LEA R14,[RSP + 0x60]
LEA R12,[RSP + 0x80]
LEA R13,[RSP + 0x10]
LAB_001131a4:
TEST RBX,RBX
JZ 0x001131e7
LAB_001131a9:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001281f4
LAB_001131b4:
MOV RDI,R12
MOV RSI,R14
CALL 0x001281a2
LAB_001131bf:
MOV RDI,R13
MOV RSI,R12
CALL 0x0012b138
MOV RDI,R12
CALL 0x00108ad8
MOV RDI,R14
CALL 0x00108ad8
MOV RDI,RBX
CALL 0x00128240
MOV RBX,RAX
JMP 0x001131a4
LAB_001131e7:
MOV dword ptr [RSP + 0xc],EBP
MOV RDI,RSP
CALL 0x0011575e
LEA RAX,[RSP + 0x88]
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 R13,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x50],RAX
LEA RBP,[RAX + 0x10]
LEA R14,[R15 + 0x8]
LEA RBX,[RSP + 0x80]
LEA R12,[0x133601]
LAB_00113235:
CMP R13,qword ptr [RSP + 0x18]
JZ 0x001132b7
LAB_0011323c:
MOV RDI,RBX
MOV RSI,R13
CALL 0x0012509a
TEST RAX,RAX
JZ 0x00113273
MOV RDI,RBP
LEA RSI,[0x1335fb]
CALL 0x001084c0
MOV RDI,RBP
MOV RSI,R13
CALL 0x00108450
MOV RSI,R12
LAB_00113269:
MOV RDI,RBP
CALL 0x001084c0
JMP 0x0011328e
LAB_00113273:
MOV RDI,R14
MOV RSI,R13
CALL 0x001250b4
TEST RAX,RAX
JZ 0x00113294
MOV RDI,RBX
MOV RSI,R13
CALL 0x0012b1da
LAB_0011328e:
ADD R13,0x20
JMP 0x00113235
LAB_00113294:
MOV RDI,RBP
LEA RSI,[0x13361d]
CALL 0x001084c0
MOV RDI,RBP
MOV RSI,R13
CALL 0x00108450
LEA RSI,[0x13362c]
JMP 0x00113269
LAB_001132b7:
MOV RBX,qword ptr [R15 + 0x20]
ADD R15,0x10
LEA R14,[RSP + 0x80]
LEA R13,[0x134294]
LAB_001132ce:
CMP RBX,R15
JZ 0x00113326
LEA RBP,[RBX + 0x20]
LAB_001132d7:
MOV RDI,R14
MOV RSI,RBP
CALL 0x0012509a
TEST RAX,RAX
JNZ 0x00113319
MOV R12,qword ptr [RSP]
ADD R12,0x10
MOV RDI,R12
LEA RSI,[0x13364f]
CALL 0x001084c0
MOV RDI,R12
MOV RSI,RBP
CALL 0x00108450
MOV RDI,qword ptr [RSP]
ADD RDI,0x10
MOV RSI,R13
CALL 0x001084c0
LAB_00113319:
MOV RDI,RBX
CALL 0x001085d0
MOV RBX,RAX
JMP 0x001132ce
LAB_00113326:
MOV R14,qword ptr [RSP]
LAB_0011332a:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
CALL 0x00115922
LAB_00113337:
CMP qword ptr [RSP + 0x68],0x0
MOV RBX,qword ptr [RSP + 0x58]
JNZ 0x00113388
LEA RDI,[RSP + 0x60]
CALL 0x00108ad8
LEA RDI,[RSP + 0x80]
CALL 0x0012827c
TEST R14,R14
JZ 0x00113369
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x8]
LAB_00113369:
LEA RDI,[RSP + 0x10]
CALL 0x001246f8
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00113388:
MOV R15,qword ptr [0x0014dfc8]
MOV RBX,qword ptr [R15]
LAB_00113392:
LEA RDI,[RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0xc]
CALL 0x00111bec
LAB_001133a8:
LEA R14,[RSP + 0xd8]
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [RSP + 0x60]
LEA RSI,[0x133668]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001087f0
MOV RDI,R14
CALL 0x00108ad8
MOV RDI,qword ptr [R15]
CALL 0x00108610
CALL 0x00124a45
|
/* testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int,
char const*) */
char * __thiscall
testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames
(TypedTestSuitePState *this,char *param_1,char *param_2,int param_3,char *param_4)
{
char *pcVar1;
FILE *__stream;
int *puVar2;
char cVar3;
long lVar4;
_Rb_tree_node_base *p_Var5;
char *pcVar6;
ostream *poVar7;
string *psVar8;
long *local_128;
int local_11c;
string *local_118;
string *psStack_110;
int8 local_108;
uint *local_100;
int8 local_f8;
uint local_f0 [2];
int4 uStack_e8;
int4 uStack_e4;
char *local_e0;
long *local_d8;
char *local_d0;
int8 local_c8;
long local_c0;
allocator local_a8 [8];
int4 local_a0 [2];
int8 local_98;
int4 *local_90;
int4 *local_88;
int8 local_80;
uint *local_78;
int8 local_70;
uint local_68 [2];
int4 uStack_60;
int4 uStack_5c;
int local_58;
int8 local_50 [4];
/* try { // try from 001130d3 to 001130e7 has its CatchHandler @ 00113410 */
std::__cxx11::string::string((string *)&local_100,param_2,local_a8);
local_70 = local_f8;
local_78 = local_68;
if (local_100 == local_f0) {
uStack_60 = uStack_e8;
uStack_5c = uStack_e4;
}
else {
local_78 = local_100;
}
local_f8 = 0;
local_f0[0] = local_f0[0] & 0xffffff00;
local_100 = local_f0;
local_58 = param_3;
/* try { // try from 00113143 to 0011314a has its CatchHandler @ 001133f4 */
RegisterTypeParameterizedTestSuite(param_1);
local_e0 = param_2;
std::__cxx11::string::~string((string *)&local_78);
std::__cxx11::string::~string((string *)&local_100);
*this = (TypedTestSuitePState)0x1;
local_118 = (string *)0x0;
psStack_110 = (string *)0x0;
local_108 = 0;
pcVar6 = param_4 + -1;
local_d0 = param_4;
do {
pcVar1 = pcVar6 + 1;
pcVar6 = pcVar6 + 1;
cVar3 = IsSpace(*pcVar1);
} while (cVar3 != '\0');
for (; pcVar6 != (char *)0x0; pcVar6 = (char *)SkipComma(pcVar6)) {
/* try { // try from 001131a9 to 001131b3 has its CatchHandler @ 00113415 */
GetPrefixUntilComma_abi_cxx11_((internal *)&local_c8,pcVar6);
/* try { // try from 001131b4 to 001131be has its CatchHandler @ 0011341a */
StripTrailingSpaces((internal *)local_a8,(internal *)&local_c8);
/* try { // try from 001131bf to 001131c9 has its CatchHandler @ 0011341f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_118,
(string *)local_a8);
std::__cxx11::string::~string((string *)local_a8);
std::__cxx11::string::~string((string *)&local_c8);
}
local_11c = param_3;
/* try { // try from 001131e7 to 001131f2 has its CatchHandler @ 001133f2 */
Message::Message((Message *)&local_128);
local_90 = local_a0;
local_a0[0] = 0;
local_98 = 0;
local_80 = 0;
local_d8 = local_128;
poVar7 = (ostream *)(local_128 + 2);
psVar8 = local_118;
local_88 = local_90;
do {
if (psVar8 == psStack_110) {
for (p_Var5 = *(_Rb_tree_node_base **)(this + 0x20);
p_Var5 != (_Rb_tree_node_base *)(this + 0x10);
p_Var5 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var5)) {
/* try { // try from 001132d7 to 00113318 has its CatchHandler @ 0011343b */
lVar4 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::count((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)local_a8,(string *)(p_Var5 + 0x20));
if (lVar4 == 0) {
poVar7 = (ostream *)(local_128 + 2);
std::operator<<(poVar7,"You forgot to list test ");
std::operator<<(poVar7,(string *)(p_Var5 + 0x20));
std::operator<<((ostream *)(local_128 + 2),".\n");
}
}
/* try { // try from 0011332a to 00113336 has its CatchHandler @ 001133ed */
StringStreamToString((stringstream *)&local_c8);
pcVar6 = local_d0;
puVar2 = PTR_stderr_0014dfc8;
if (local_c0 == 0) {
std::__cxx11::string::~string((string *)&local_c8);
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((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)local_a8);
if (local_128 != (long *)0x0) {
(**(code **)(*local_128 + 8))(local_128);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_118);
return pcVar6;
}
__stream = *(FILE **)PTR_stderr_0014dfc8;
/* try { // try from 00113392 to 001133a7 has its CatchHandler @ 001133de */
FormatFileLocation_abi_cxx11_((internal *)local_50,local_e0,local_11c);
fprintf(__stream,"%s %s",local_50[0],local_c8);
std::__cxx11::string::~string((string *)local_50);
fflush(*(FILE **)puVar2);
/* WARNING: Subroutine does not return */
posix::Abort();
}
/* try { // try from 0011323c to 001132ad has its CatchHandler @ 00113444 */
lVar4 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::count((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)local_a8,psVar8);
if (lVar4 == 0) {
lVar4 = std::
map<std::__cxx11::string,testing::internal::CodeLocation,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>>
::count((map<std::__cxx11::string,testing::internal::CodeLocation,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>>
*)(this + 8),psVar8);
if (lVar4 == 0) {
std::operator<<(poVar7,"No test named ");
std::operator<<(poVar7,psVar8);
pcVar6 = " can be found in this test suite.\n";
goto LAB_00113269;
}
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&>
((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)local_a8,psVar8);
}
else {
std::operator<<(poVar7,"Test ");
std::operator<<(poVar7,psVar8);
pcVar6 = " is listed more than once.\n";
LAB_00113269:
std::operator<<(poVar7,pcVar6);
}
psVar8 = psVar8 + 0x20;
} while( true );
}
|
|
1,565 | translog_read_file_header | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc, File file)
{
uchar page_buff[LOG_HEADER_DATA_SIZE];
DBUG_ENTER("translog_read_file_header");
if (mysql_file_pread(file, page_buff,
sizeof(page_buff), 0, MYF(MY_FNABP | MY_WME)))
{
DBUG_PRINT("info", ("log read fail error: %d", my_errno));
DBUG_RETURN(1);
}
translog_interpret_file_header(desc, page_buff);
DBUG_PRINT("info", ("timestamp: %llu aria ver: %lu mysql ver: %lu "
"server id %lu page size %lu file number %lu "
"max lsn: " LSN_FMT,
(ulonglong) desc->timestamp,
(ulong) desc->maria_version,
(ulong) desc->mysql_version,
(ulong) desc->server_id,
desc->page_size, (ulong) desc->file_number,
LSN_IN_PARTS(desc->max_lsn)));
DBUG_RETURN(0);
} | O0 | c | translog_read_file_header:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x50(%rbp)
movl %esi, -0x54(%rbp)
movl -0x54(%rbp), %edx
leaq -0x40(%rbp), %rcx
leaq 0x123e53(%rip), %rdi # 0x1516ad
movl $0x4e0, %esi # imm = 0x4E0
movl $0x2c, %r8d
xorl %eax, %eax
movl %eax, %r9d
movq $0x12, (%rsp)
callq 0x2d8d0
cmpq $0x0, %rax
je 0x2d889
jmp 0x2d87f
jmp 0x2d881
jmp 0x2d883
movb $0x1, -0x41(%rbp)
jmp 0x2d89e
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2d710
jmp 0x2d898
jmp 0x2d89a
movb $0x0, -0x41(%rbp)
movb -0x41(%rbp), %al
movb %al, -0x55(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2d8bf
movb -0x55(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| translog_read_file_header:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_50], rdi
mov [rbp+var_54], esi
mov edx, [rbp+var_54]
lea rcx, [rbp+var_40]
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4E0h
mov r8d, 2Ch ; ','
xor eax, eax
mov r9d, eax
mov [rsp+60h+var_60], 12h
call inline_mysql_file_pread_0
cmp rax, 0
jz short loc_2D889
jmp short $+2
loc_2D87F:
jmp short $+2
loc_2D881:
jmp short $+2
loc_2D883:
mov [rbp+var_41], 1
jmp short loc_2D89E
loc_2D889:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_40]
call translog_interpret_file_header
jmp short $+2
loc_2D898:
jmp short $+2
loc_2D89A:
mov [rbp+var_41], 0
loc_2D89E:
mov al, [rbp+var_41]
mov [rbp+var_55], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2D8BF
mov al, [rbp+var_55]
add rsp, 60h
pop rbp
retn
loc_2D8BF:
call ___stack_chk_fail
| char translog_read_file_header(unsigned long long *a1, int a2)
{
_BYTE v4[56]; // [rsp+20h] [rbp-40h] BYREF
unsigned long long v5; // [rsp+58h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( inline_mysql_file_pread_0(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1248,
a2,
(unsigned int)v4,
44,
0,
18LL) )
{
return 1;
}
translog_interpret_file_header(a1, (long long)v4);
return 0;
}
| translog_read_file_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x50],RDI
MOV dword ptr [RBP + -0x54],ESI
MOV EDX,dword ptr [RBP + -0x54]
LEA RCX,[RBP + -0x40]
LEA RDI,[0x2516ad]
MOV ESI,0x4e0
MOV R8D,0x2c
XOR EAX,EAX
MOV R9D,EAX
MOV qword ptr [RSP],0x12
CALL 0x0012d8d0
CMP RAX,0x0
JZ 0x0012d889
JMP 0x0012d87f
LAB_0012d87f:
JMP 0x0012d881
LAB_0012d881:
JMP 0x0012d883
LAB_0012d883:
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0012d89e
LAB_0012d889:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x40]
CALL 0x0012d710
JMP 0x0012d898
LAB_0012d898:
JMP 0x0012d89a
LAB_0012d89a:
MOV byte ptr [RBP + -0x41],0x0
LAB_0012d89e:
MOV AL,byte ptr [RBP + -0x41]
MOV byte ptr [RBP + -0x55],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012d8bf
MOV AL,byte ptr [RBP + -0x55]
ADD RSP,0x60
POP RBP
RET
LAB_0012d8bf:
CALL 0x0012a250
|
int8 translog_read_file_header(int8 param_1,int4 param_2)
{
long lVar1;
long in_FS_OFFSET;
bool local_49;
int1 local_48 [56];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x4e0,
param_2,local_48,0x2c,0,0x12);
if (lVar1 == 0) {
translog_interpret_file_header(param_1,local_48);
}
local_49 = lVar1 != 0;
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_49);
}
|
|
1,566 | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static void common_params_handle_model_default(
std::string & model,
const std::string & model_url,
std::string & hf_repo,
std::string & hf_file,
const std::string & hf_token,
const std::string & model_default) {
if (!hf_repo.empty()) {
// short-hand to avoid specifying --hf-file -> default it to --model
if (hf_file.empty()) {
if (model.empty()) {
auto auto_detected = common_get_hf_file(hf_repo, hf_token);
if (auto_detected.first.empty() || auto_detected.second.empty()) {
exit(1); // built without CURL, error message already printed
}
hf_repo = auto_detected.first;
hf_file = auto_detected.second;
} else {
hf_file = model;
}
}
// make sure model path is present (for caching purposes)
if (model.empty()) {
// this is to avoid different repo having same file name, or same file name in different subdirs
std::string filename = hf_repo + "_" + hf_file;
// to make sure we don't have any slashes in the filename
string_replace_all(filename, "/", "_");
model = fs_get_cache_file(filename);
}
} else if (!model_url.empty()) {
if (model.empty()) {
auto f = string_split<std::string>(model_url, '#').front();
f = string_split<std::string>(f, '?').front();
model = fs_get_cache_file(string_split<std::string>(f, '/').back());
}
} else if (model.empty()) {
model = model_default;
}
} | O0 | cpp | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x1d8, %rsp # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movq %rdx, 0x1c0(%rsp)
movq %rcx, 0x1b8(%rsp)
movq %r8, 0x1b0(%rsp)
movq %r9, 0x1a8(%rsp)
movq 0x1c0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80fe0
movq 0x1b8(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80ce2
jmp 0x80dc1
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80cf8
jmp 0x80daa
movq 0x1c0(%rsp), %rsi
movq 0x1b0(%rsp), %rdx
leaq 0x168(%rsp), %rdi
callq 0xf0200
leaq 0x168(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80d3d
leaq 0x168(%rsp), %rdi
addq $0x20, %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80d3d
jmp 0x80d47
movl $0x1, %edi
callq 0x5ac20
movq 0x1c0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x5b410
jmp 0x80d5e
leaq 0x188(%rsp), %rsi
movq 0x1b8(%rsp), %rdi
callq 0x5b410
jmp 0x80d75
leaq 0x168(%rsp), %rdi
callq 0x92e60
jmp 0x80dbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x92e60
jmp 0x811b0
movq 0x1d0(%rsp), %rsi
movq 0x1b8(%rsp), %rdi
callq 0x5b410
jmp 0x80dc1
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x80dd7
jmp 0x80fdb
movq 0x1c0(%rsp), %rsi
leaq 0x18f34e(%rip), %rdx # 0x210134
leaq 0x118(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x894d0
movq 0x18(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
leaq 0x138(%rsp), %rdi
callq 0x92e90
jmp 0x80e14
leaq 0x118(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5b0d0
movq 0x10(%rsp), %rdx
leaq 0x1946b1(%rip), %rsi # 0x2154f0
leaq 0xf8(%rsp), %rdi
callq 0x61fc0
jmp 0x80e4e
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5b0d0
movq 0x8(%rsp), %rdx
leaq 0x18f2c8(%rip), %rsi # 0x210134
leaq 0xd0(%rsp), %rdi
callq 0x61fc0
jmp 0x80e7b
leaq 0x138(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0xec440
jmp 0x80e9a
leaq 0xd0(%rsp), %rdi
callq 0x5b558
leaq 0xcf(%rsp), %rdi
callq 0x5b530
leaq 0xf8(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
callq 0x5b530
leaq 0xa8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xee510
jmp 0x80ee5
movq 0x1d0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a950
leaq 0xa8(%rsp), %rdi
callq 0x5b558
leaq 0x138(%rsp), %rdi
callq 0x5b558
jmp 0x80fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x5b558
jmp 0x811b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x80fa6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x80f8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5b558
leaq 0xcf(%rsp), %rdi
callq 0x5b530
leaq 0xf8(%rsp), %rdi
callq 0x5b558
leaq 0xf7(%rsp), %rdi
callq 0x5b530
jmp 0x80fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x5b558
jmp 0x811b0
jmp 0x811a8
movq 0x1c8(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x8117c
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x8100b
jmp 0x8117a
movq 0x1c8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x23, %edx
callq 0x811c0
movq (%rsp), %rdi
callq 0x92ee0
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
callq 0x5a210
jmp 0x81041
leaq 0x70(%rsp), %rdi
callq 0x620d0
leaq 0x58(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x3f, %edx
callq 0x811c0
jmp 0x81064
leaq 0x58(%rsp), %rdi
callq 0x92ee0
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
callq 0x5b410
jmp 0x81080
leaq 0x58(%rsp), %rdi
callq 0x620d0
leaq 0x20(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x2f, %edx
callq 0x811c0
jmp 0x810a3
leaq 0x20(%rsp), %rdi
callq 0x92f10
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0xee510
jmp 0x810bc
movq 0x1d0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5a950
leaq 0x38(%rsp), %rdi
callq 0x5b558
leaq 0x20(%rsp), %rdi
callq 0x620d0
leaq 0x88(%rsp), %rdi
callq 0x5b558
jmp 0x8117a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x620d0
jmp 0x811b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x8116b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x620d0
jmp 0x8116b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x620d0
leaq 0x88(%rsp), %rdi
callq 0x5b558
jmp 0x811b0
jmp 0x811a6
movq 0x1d0(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x8118f
jmp 0x811a4
movq 0x1a8(%rsp), %rsi
movq 0x1d0(%rsp), %rdi
callq 0x5b410
jmp 0x811a6
jmp 0x811a8
addq $0x1d8, %rsp # imm = 0x1D8
retq
movq 0x160(%rsp), %rdi
callq 0x5abc0
nopl (%rax)
| _ZL34common_params_handle_model_defaultRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S5_S5_S7_S7_:
sub rsp, 1D8h
mov [rsp+1D8h+var_8], rdi
mov [rsp+1D8h+var_10], rsi
mov qword ptr [rsp+1D8h+var_18], rdx
mov [rsp+1D8h+var_20], rcx
mov [rsp+1D8h+var_28], r8
mov [rsp+1D8h+var_30], r9
mov rdi, qword ptr [rsp+1D8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_80FE0
mov rdi, [rsp+1D8h+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_80CE2
jmp loc_80DC1
loc_80CE2:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_80CF8
jmp loc_80DAA
loc_80CF8:
mov rsi, qword ptr [rsp+1D8h+var_18]; int
mov rdx, [rsp+1D8h+var_28]; void *
lea rdi, [rsp+1D8h+var_70]; int
call _Z18common_get_hf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; common_get_hf_file(std::string const&,std::string const&)
lea rdi, [rsp+1D8h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_80D3D
lea rdi, [rsp+1D8h+var_70]
add rdi, 20h ; ' '
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_80D3D
jmp short loc_80D47
loc_80D3D:
mov edi, 1
call _exit
loc_80D47:
mov rdi, qword ptr [rsp+1D8h+var_18]
lea rsi, [rsp+1D8h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_80D5E:
lea rsi, [rsp+1D8h+var_50]
mov rdi, [rsp+1D8h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_80D75:
lea rdi, [rsp+1D8h+var_70]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp short loc_80DBF
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_160]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp loc_811B0
loc_80DAA:
mov rsi, [rsp+1D8h+var_8]
mov rdi, [rsp+1D8h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_80DBF:
jmp short $+2
loc_80DC1:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_80DD7
jmp loc_80FDB
loc_80DD7:
mov rsi, qword ptr [rsp+1D8h+var_18]; int
lea rdx, aCall911+8; int
lea rdi, [rsp+1D8h+var_C0]; int
mov [rsp+1D8h+var_1C0], rdi; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rsi, [rsp+1D8h+var_1C0]
mov rdx, [rsp+1D8h+var_20]
lea rdi, [rsp+1D8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_80E14:
lea rdi, [rsp+1D8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_E1]
mov qword ptr [rsp+1D8h+var_1C8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+1D8h+var_1C8]
lea rsi, asc_2154EF+1; "/"
lea rdi, [rsp+1D8h+var_E1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_80E4E:
lea rdi, [rsp+1D8h+var_109]
mov qword ptr [rsp+1D8h+var_1D0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+1D8h+var_1D0]
lea rsi, aCall911+8; "_"
lea rdi, [rsp+1D8h+var_109+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_80E7B:
lea rdi, [rsp+1D8h+var_A0]
lea rsi, [rsp+1D8h+var_E1+1]
lea rdx, [rsp+1D8h+var_109+1]
call _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_; string_replace_all(std::string &,std::string const&,std::string const&)
jmp short $+2
loc_80E9A:
lea rdi, [rsp+1D8h+var_109+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_109]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+1D8h+var_E1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+1D8h+var_130]; int
lea rsi, [rsp+1D8h+var_A0]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
jmp short $+2
loc_80EE5:
mov rdi, [rsp+1D8h+var_8]
lea rsi, [rsp+1D8h+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+1D8h+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_80FDB
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_811B0
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_80FA6
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_80F8C
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_80F8C:
lea rdi, [rsp+arg_C7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_80FA6:
lea rdi, [rsp+arg_EF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_80FC9
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
loc_80FC9:
lea rdi, [rsp+arg_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_811B0
loc_80FDB:
jmp loc_811A8
loc_80FE0:
mov rdi, [rsp+1D8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_8117C
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8100B
jmp loc_8117A
loc_8100B:
mov rsi, [rsp+1D8h+var_10]
lea rdi, [rsp+1D8h+var_168]
mov qword ptr [rsp+1D8h+var_1D8], rdi; int
mov edx, 23h ; '#'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rdi, qword ptr [rsp+1D8h+var_1D8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_150]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_81041:
lea rdi, [rsp+1D8h+var_168]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_180]
lea rsi, [rsp+1D8h+var_150]
mov edx, 3Fh ; '?'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
jmp short $+2
loc_81064:
lea rdi, [rsp+1D8h+var_180]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_150]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_81080:
lea rdi, [rsp+1D8h+var_180]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_1B8]
lea rsi, [rsp+1D8h+var_150]
mov edx, 2Fh ; '/'
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
jmp short $+2
loc_810A3:
lea rdi, [rsp+1D8h+var_1B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rsi, rax
lea rdi, [rsp+1D8h+var_1A0]; int
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
jmp short $+2
loc_810BC:
mov rdi, [rsp+1D8h+var_8]
lea rsi, [rsp+1D8h+var_1A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+1D8h+var_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_1B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+1D8h+var_150]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_8117A
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_811B0
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_8116B
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_50]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_8116B
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_8116B:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_811B0
loc_8117A:
jmp short loc_811A6
loc_8117C:
mov rdi, [rsp+1D8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_8118F
jmp short loc_811A4
loc_8118F:
mov rsi, [rsp+1D8h+var_30]
mov rdi, [rsp+1D8h+var_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_811A4:
jmp short $+2
loc_811A6:
jmp short $+2
loc_811A8:
add rsp, 1D8h
retn
loc_811B0:
mov rdi, [rsp+arg_158]
call __Unwind_Resume
| void common_params_handle_model_default(
long long a1,
long long a2,
long long a3,
long long a4,
void *a5,
long long a6)
{
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // rax
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v23; // [rsp+0h] [rbp-1D8h]
int v24; // [rsp+0h] [rbp-1D8h]
int v25; // [rsp+0h] [rbp-1D8h]
int v26[2]; // [rsp+0h] [rbp-1D8h]
int v27; // [rsp+0h] [rbp-1D8h]
int v28; // [rsp+0h] [rbp-1D8h]
void *v29; // [rsp+8h] [rbp-1D0h]
int v30; // [rsp+8h] [rbp-1D0h]
int v31; // [rsp+10h] [rbp-1C8h]
int v32; // [rsp+10h] [rbp-1C8h]
int v33; // [rsp+18h] [rbp-1C0h]
long long v34; // [rsp+18h] [rbp-1C0h]
int v35; // [rsp+18h] [rbp-1C0h]
long long v36; // [rsp+20h] [rbp-1B8h] BYREF
char v37; // [rsp+28h] [rbp-1B0h]
int v38; // [rsp+30h] [rbp-1A8h]
int v39; // [rsp+38h] [rbp-1A0h] BYREF
int v40; // [rsp+40h] [rbp-198h]
int v41; // [rsp+48h] [rbp-190h]
long long v42; // [rsp+50h] [rbp-188h]
long long v43; // [rsp+58h] [rbp-180h] BYREF
char v44; // [rsp+60h] [rbp-178h]
long long v45[3]; // [rsp+70h] [rbp-168h] BYREF
_BYTE v46[32]; // [rsp+88h] [rbp-150h] BYREF
int v47[9]; // [rsp+A8h] [rbp-130h] BYREF
char v48; // [rsp+CFh] [rbp-109h] BYREF
_BYTE v49[39]; // [rsp+D0h] [rbp-108h] BYREF
char v50; // [rsp+F7h] [rbp-E1h] BYREF
_BYTE v51[32]; // [rsp+F8h] [rbp-E0h] BYREF
long long v52[4]; // [rsp+118h] [rbp-C0h] BYREF
_BYTE v53[48]; // [rsp+138h] [rbp-A0h] BYREF
int v54[8]; // [rsp+168h] [rbp-70h] BYREF
_BYTE v55[32]; // [rsp+188h] [rbp-50h] BYREF
long long v56; // [rsp+1A8h] [rbp-30h]
void *v57; // [rsp+1B0h] [rbp-28h]
long long v58; // [rsp+1B8h] [rbp-20h]
int v59[2]; // [rsp+1C0h] [rbp-18h]
long long v60; // [rsp+1C8h] [rbp-10h]
long long v61; // [rsp+1D0h] [rbp-8h]
v61 = a1;
v60 = a2;
*(_QWORD *)v59 = a3;
v58 = a4;
v57 = a5;
v56 = a6;
if ( (std::string::empty(a3) & 1) != 0 )
{
if ( (std::string::empty(v60) & 1) != 0 )
{
if ( (std::string::empty(v61) & 1) != 0 )
std::string::operator=(v61, v56);
}
else if ( (std::string::empty(v61) & 1) != 0 )
{
string_split<std::string>((unsigned int)v45, v60, 35, v12, v13, v14, (unsigned int)v45);
v15 = std::vector<std::string>::front(*(_QWORD *)v26);
std::string::basic_string(v46, v15);
std::vector<std::string>::~vector(v45);
string_split<std::string>((unsigned int)&v43, (unsigned int)v46, 63, v16, v17, v18, v26[0]);
v19 = std::vector<std::string>::front(&v43);
std::string::operator=(v46, v19);
std::vector<std::string>::~vector(&v43);
string_split<std::string>((unsigned int)&v36, (unsigned int)v46, 47, v20, v21, v22, v27);
std::vector<std::string>::back(&v36);
fs_get_cache_file((int)&v39, v28, (int)v29, v31, v33, v36, v37, v38, v39, v40, v41, v42, v43, v44);
std::string::operator=(v61, &v39);
std::string::~string(&v39);
std::vector<std::string>::~vector(&v36);
std::string::~string(v46);
}
}
else
{
if ( (std::string::empty(v58) & 1) != 0 )
{
if ( (std::string::empty(v61) & 1) != 0 )
{
common_get_hf_file((int)v54, v59[0], v57);
if ( (std::string::empty(v54) & 1) != 0 || (std::string::empty(v55) & 1) != 0 )
exit(1LL);
std::string::operator=(*(_QWORD *)v59, v54);
std::string::operator=(v58, v55);
std::pair<std::string,std::string>::~pair(v54);
}
else
{
std::string::operator=(v58, v61);
}
}
if ( (std::string::empty(v61) & 1) != 0 )
{
std::operator+<char>((int)v52, v59[0], (int)"_", v6, v7, v8, v23, v29, v31, (long long)v52);
std::operator+<char>(v53, v34, v58);
std::string::~string(v52);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v51, (long long)"/", (long long)&v50);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v49, (long long)"_", (long long)&v48);
string_replace_all(
(unsigned int)v53,
(unsigned int)v51,
(unsigned int)v49,
v9,
v10,
v11,
v24,
(unsigned int)&v48,
(unsigned int)&v50,
v34,
v36,
v37);
std::string::~string(v49);
std::allocator<char>::~allocator(&v48);
std::string::~string(v51);
std::allocator<char>::~allocator(&v50);
fs_get_cache_file((int)v47, v25, v30, v32, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44);
std::string::operator=(v61, v47);
std::string::~string(v47);
std::string::~string(v53);
}
}
}
| common_params_handle_model_default:
SUB RSP,0x1d8
MOV qword ptr [RSP + 0x1d0],RDI
MOV qword ptr [RSP + 0x1c8],RSI
MOV qword ptr [RSP + 0x1c0],RDX
MOV qword ptr [RSP + 0x1b8],RCX
MOV qword ptr [RSP + 0x1b0],R8
MOV qword ptr [RSP + 0x1a8],R9
MOV RDI,qword ptr [RSP + 0x1c0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180fe0
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180ce2
JMP 0x00180dc1
LAB_00180ce2:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180cf8
JMP 0x00180daa
LAB_00180cf8:
MOV RSI,qword ptr [RSP + 0x1c0]
MOV RDX,qword ptr [RSP + 0x1b0]
LEA RDI,[RSP + 0x168]
CALL 0x001f0200
LEA RDI,[RSP + 0x168]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180d3d
LEA RDI,[RSP + 0x168]
ADD RDI,0x20
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180d3d
JMP 0x00180d47
LAB_00180d3d:
MOV EDI,0x1
CALL 0x0015ac20
LAB_00180d47:
MOV RDI,qword ptr [RSP + 0x1c0]
LAB_00180d4f:
LEA RSI,[RSP + 0x168]
CALL 0x0015b410
JMP 0x00180d5e
LAB_00180d5e:
LEA RSI,[RSP + 0x188]
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015b410
LAB_00180d73:
JMP 0x00180d75
LAB_00180d75:
LEA RDI,[RSP + 0x168]
CALL 0x00192e60
JMP 0x00180dbf
LAB_00180daa:
MOV RSI,qword ptr [RSP + 0x1d0]
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0015b410
LAB_00180dbf:
JMP 0x00180dc1
LAB_00180dc1:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x00180dd7
JMP 0x00180fdb
LAB_00180dd7:
MOV RSI,qword ptr [RSP + 0x1c0]
LEA RDX,[0x310134]
LEA RDI,[RSP + 0x118]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001894d0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x1b8]
LAB_00180e05:
LEA RDI,[RSP + 0x138]
CALL 0x00192e90
JMP 0x00180e14
LAB_00180e14:
LEA RDI,[RSP + 0x118]
CALL 0x0015b558
LEA RDI,[RSP + 0xf7]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x10]
LAB_00180e38:
LEA RSI,[0x3154f0]
LEA RDI,[RSP + 0xf8]
CALL 0x00161fc0
JMP 0x00180e4e
LAB_00180e4e:
LEA RDI,[RSP + 0xcf]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x8]
LAB_00180e65:
LEA RSI,[0x310134]
LEA RDI,[RSP + 0xd0]
CALL 0x00161fc0
JMP 0x00180e7b
LAB_00180e7b:
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0xf8]
LEA RDX,[RSP + 0xd0]
CALL 0x001ec440
JMP 0x00180e9a
LAB_00180e9a:
LEA RDI,[RSP + 0xd0]
CALL 0x0015b558
LEA RDI,[RSP + 0xcf]
CALL 0x0015b530
LEA RDI,[RSP + 0xf8]
CALL 0x0015b558
LEA RDI,[RSP + 0xf7]
CALL 0x0015b530
LAB_00180ece:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x138]
CALL 0x001ee510
LAB_00180ee3:
JMP 0x00180ee5
LAB_00180ee5:
MOV RDI,qword ptr [RSP + 0x1d0]
LEA RSI,[RSP + 0xa8]
CALL 0x0015a950
LEA RDI,[RSP + 0xa8]
CALL 0x0015b558
LEA RDI,[RSP + 0x138]
CALL 0x0015b558
JMP 0x00180fdb
LAB_00180fdb:
JMP 0x001811a8
LAB_00180fe0:
MOV RDI,qword ptr [RSP + 0x1c8]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x0018117c
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x0018100b
JMP 0x0018117a
LAB_0018100b:
MOV RSI,qword ptr [RSP + 0x1c8]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RSP],RDI
MOV EDX,0x23
CALL 0x001811c0
MOV RDI,qword ptr [RSP]
CALL 0x00192ee0
MOV RSI,RAX
LAB_00181032:
LEA RDI,[RSP + 0x88]
CALL 0x0015a210
JMP 0x00181041
LAB_00181041:
LEA RDI,[RSP + 0x70]
CALL 0x001620d0
LAB_0018104b:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x88]
MOV EDX,0x3f
CALL 0x001811c0
JMP 0x00181064
LAB_00181064:
LEA RDI,[RSP + 0x58]
CALL 0x00192ee0
MOV RSI,RAX
LAB_00181071:
LEA RDI,[RSP + 0x88]
CALL 0x0015b410
JMP 0x00181080
LAB_00181080:
LEA RDI,[RSP + 0x58]
CALL 0x001620d0
LAB_0018108a:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x88]
MOV EDX,0x2f
CALL 0x001811c0
JMP 0x001810a3
LAB_001810a3:
LEA RDI,[RSP + 0x20]
CALL 0x00192f10
MOV RSI,RAX
LAB_001810b0:
LEA RDI,[RSP + 0x38]
CALL 0x001ee510
LAB_001810ba:
JMP 0x001810bc
LAB_001810bc:
MOV RDI,qword ptr [RSP + 0x1d0]
LEA RSI,[RSP + 0x38]
CALL 0x0015a950
LEA RDI,[RSP + 0x38]
CALL 0x0015b558
LEA RDI,[RSP + 0x20]
CALL 0x001620d0
LEA RDI,[RSP + 0x88]
CALL 0x0015b558
JMP 0x0018117a
LAB_0018117a:
JMP 0x001811a6
LAB_0018117c:
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015a4f0
TEST AL,0x1
JNZ 0x0018118f
JMP 0x001811a4
LAB_0018118f:
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDI,qword ptr [RSP + 0x1d0]
CALL 0x0015b410
LAB_001811a4:
JMP 0x001811a6
LAB_001811a6:
JMP 0x001811a8
LAB_001811a8:
ADD RSP,0x1d8
RET
|
/* common_params_handle_model_default(std::__cxx11::string&, std::__cxx11::string const&,
std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string
const&) */
void common_params_handle_model_default
(string *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
string *param_6)
{
string *psVar1;
byte bVar2;
string local_1b8 [24];
string local_1a0 [32];
string local_180 [24];
string local_168 [24];
string local_150 [32];
string local_130 [39];
allocator local_109;
string local_108 [39];
allocator local_e1;
string local_e0 [32];
string local_c0 [32];
string local_a0 [48];
string local_70 [32];
string local_50 [32];
string *local_30;
string *local_28;
string *local_20;
string *local_18;
string *local_10;
string *local_8;
local_30 = param_6;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
std::__cxx11::string::operator=(local_20,local_8);
}
else {
common_get_hf_file(local_70,local_18);
bVar2 = std::__cxx11::string::empty();
if (((bVar2 & 1) != 0) || (bVar2 = std::__cxx11::string::empty(), (bVar2 & 1) != 0)) {
/* WARNING: Subroutine does not return */
exit(1);
}
/* try { // try from 00180d4f to 00180d72 has its CatchHandler @ 00180d84 */
std::__cxx11::string::operator=(local_18,local_70);
std::__cxx11::string::operator=(local_20,local_50);
std::pair<std::__cxx11::string,std::__cxx11::string>::~pair
((pair<std::__cxx11::string,std::__cxx11::string> *)local_70);
}
}
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
std::operator+(local_c0,(char *)local_18);
/* try { // try from 00180e05 to 00180e11 has its CatchHandler @ 00180f19 */
std::operator+(local_a0,local_c0);
std::__cxx11::string::~string(local_c0);
std::allocator<char>::allocator();
/* try { // try from 00180e38 to 00180e4b has its CatchHandler @ 00180f3f */
std::__cxx11::string::string<std::allocator<char>>(local_e0,"/",&local_e1);
std::allocator<char>::allocator();
/* try { // try from 00180e65 to 00180e78 has its CatchHandler @ 00180f55 */
std::__cxx11::string::string<std::allocator<char>>(local_108,"_",&local_109);
/* try { // try from 00180e7b to 00180e97 has its CatchHandler @ 00180f6b */
string_replace_all(local_a0,local_e0,local_108);
std::__cxx11::string::~string(local_108);
std::allocator<char>::~allocator((allocator<char> *)&local_109);
std::__cxx11::string::~string(local_e0);
std::allocator<char>::~allocator((allocator<char> *)&local_e1);
/* try { // try from 00180ece to 00180ee2 has its CatchHandler @ 00180fb5 */
fs_get_cache_file(local_130);
std::__cxx11::string::operator=(local_8,local_130);
std::__cxx11::string::~string(local_130);
std::__cxx11::string::~string(local_a0);
}
}
else {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) == 0) {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
string_split<std::__cxx11::string>(local_168,(char)local_10);
psVar1 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_168);
/* try { // try from 00181032 to 0018103e has its CatchHandler @ 001810f4 */
std::__cxx11::string::string(local_150,psVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_168);
/* try { // try from 0018104b to 00181061 has its CatchHandler @ 00181117 */
string_split<std::__cxx11::string>(local_180,(char)local_150);
psVar1 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_180);
/* try { // try from 00181071 to 0018107d has its CatchHandler @ 0018112d */
std::__cxx11::string::operator=(local_150,psVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_180);
/* try { // try from 0018108a to 001810a0 has its CatchHandler @ 00181117 */
string_split<std::__cxx11::string>(local_1b8,(char)local_150);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_1b8);
/* try { // try from 001810b0 to 001810b9 has its CatchHandler @ 0018114d */
fs_get_cache_file(local_1a0);
std::__cxx11::string::operator=(local_8,local_1a0);
std::__cxx11::string::~string(local_1a0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_1b8);
std::__cxx11::string::~string(local_150);
}
}
else {
bVar2 = std::__cxx11::string::empty();
if ((bVar2 & 1) != 0) {
std::__cxx11::string::operator=(local_8,local_30);
}
}
}
return;
}
|
|
1,567 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x79c0d
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x79c24
movl $0x0, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x79c80
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x79c4d
movl $0x0, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x79d22
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x79ccd
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x79ccd
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x79cd9
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x79cd9
movl $0x0, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x79e00
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x79d9b
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x79d9b
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x79d9b
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x79d81
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x79d9b
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x79da4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x79da4
movl $0x0, -0x4(%rbp)
jmp 0x79e09
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x79e09
jmp 0x79e02
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_79C0D
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_79E09
loc_79C0D:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_79C24
mov [rbp+var_4], 0
jmp loc_79E09
loc_79C24:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_79C80
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_79C4D
mov [rbp+var_4], 0
jmp loc_79E09
loc_79C4D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_79E09
loc_79C80:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_79D22
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_79CCD
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_79CCD
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_79CD9
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_79CD9
loc_79CCD:
mov [rbp+var_4], 0
jmp loc_79E09
loc_79CD9:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_79E09
loc_79D22:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_79E00
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_79D9B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_79D9B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_79D9B
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_79D81
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_79D9B
loc_79D81:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_79DA4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_79DA4
loc_79D9B:
mov [rbp+var_4], 0
jmp short loc_79E09
loc_79DA4:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_79E09
loc_79E00:
jmp short $+2
loc_79E02:
mov [rbp+var_4], 0
loc_79E09:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
v4 = *a3;
if ( *a3 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (a3[1] ^ 0x80) < 64
&& (a3[2] ^ 0x80) < 64
&& (a3[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a3[1] >= 0x90u)
&& (v4 <= 0xF3u || a3[1] <= 0x8Fu) )
{
*a2 = a3[3] ^ 0x80u | ((long long)(a3[2] ^ 0x80u) << 6) | ((long long)(a3[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) )
{
*a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 )
{
*a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
*a2 = v4;
return 1;
}
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x00179c0d
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00179e09
LAB_00179c0d:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x00179c24
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00179e09
LAB_00179c24:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x00179c80
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x00179c4d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00179e09
LAB_00179c4d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00179e09
LAB_00179c80:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x00179d22
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00179ccd
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00179ccd
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x00179cd9
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x00179cd9
LAB_00179ccd:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00179e09
LAB_00179cd9:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00179e09
LAB_00179d22:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x00179e00
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00179d9b
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00179d9b
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00179d9b
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x00179d81
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x00179d9b
LAB_00179d81:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x00179da4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x00179da4
LAB_00179d9b:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00179e09
LAB_00179da4:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00179e09
LAB_00179e00:
JMP 0x00179e02
LAB_00179e02:
MOV dword ptr [RBP + -0x4],0x0
LAB_00179e09:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_no_range(int8 param_1,ulong *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
bVar1 = *param_3;
if (bVar1 < 0x80) {
*param_2 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if ((param_3[1] ^ 0x80) < 0x40) {
*param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_3[1])))) {
*param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 |
(long)(int)(param_3[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if ((((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((param_3[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_3[1])))) &&
((bVar1 < 0xf4 || (param_3[1] < 0x90)))) {
*param_2 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_3[1] ^ 0x80) << 0xc |
(long)(int)(param_3[2] ^ 0x80) << 6 | (long)(int)(param_3[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
1,568 | multadd | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc)
{
int i, wds;
ULong *x;
ULLong carry, y;
Bigint *b1;
wds= b->wds;
x= b->p.x;
i= 0;
carry= a;
do
{
y= *x * (ULLong)m + carry;
carry= y >> 32;
*x++= (ULong)(y & FFFFFFFF);
}
while (++i < wds);
if (carry)
{
if (wds >= b->maxwds)
{
b1= Balloc(b->k+1, alloc);
Bcopy(b1, b);
Bfree(b, alloc);
b= b1;
}
b->p.x[wds++]= (ULong) carry;
b->wds= wds;
}
return b;
} | O0 | c | multadd:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
imulq %rcx, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl -0x20(%rbp), %eax
jl 0x3623a
cmpq $0x0, -0x30(%rbp)
je 0x3631b
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x362f3
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
addl $0x1, %edi
movq -0x18(%rbp), %rsi
callq 0x36330
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
addq $0x10, %rsi
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rdx
shlq $0x2, %rdx
addq $0x8, %rdx
callq 0x13360
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x35e30
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| multadd:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_20], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_28], rax
mov [rbp+var_1C], 0
movsxd rax, [rbp+var_10]
mov [rbp+var_30], rax
loc_3623A:
mov rax, [rbp+var_28]
mov eax, [rax]
movsxd rcx, [rbp+var_C]
imul rax, rcx
add rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
shr rax, 20h
mov [rbp+var_30], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 4
mov [rbp+var_28], rdx
mov [rax], ecx
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
cmp eax, [rbp+var_20]
jl short loc_3623A
cmp [rbp+var_30], 0
jz loc_3631B
mov eax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jl short loc_362F3
mov rax, [rbp+var_8]
mov edi, [rax+8]
add edi, 1
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
add rdi, 10h
mov rsi, [rbp+var_8]
add rsi, 10h
mov rax, [rbp+var_8]
movsxd rdx, dword ptr [rax+14h]
shl rdx, 2
add rdx, 8
call _memcpy
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_362F3:
mov rax, [rbp+var_30]
mov edx, eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov esi, ecx
add esi, 1
mov [rbp+var_20], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+14h], ecx
loc_3631B:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4)
{
unsigned int *v4; // rax
long long v6; // [rsp+0h] [rbp-40h]
unsigned long long v7; // [rsp+8h] [rbp-38h]
unsigned long long v8; // [rsp+10h] [rbp-30h]
unsigned int *v9; // [rsp+18h] [rbp-28h]
int v10; // [rsp+20h] [rbp-20h]
int v11; // [rsp+24h] [rbp-1Ch]
unsigned long long v13; // [rsp+38h] [rbp-8h]
v13 = a1;
v10 = *(_DWORD *)(a1 + 20);
v9 = *(unsigned int **)a1;
v11 = 0;
v8 = a3;
do
{
v7 = v8 + a2 * (unsigned long long)*v9;
v8 = HIDWORD(v7);
v4 = v9++;
*v4 = v7;
++v11;
}
while ( v11 < v10 );
if ( v8 )
{
if ( v10 >= *(_DWORD *)(a1 + 12) )
{
v6 = Balloc((unsigned int)(*(_DWORD *)(a1 + 8) + 1), a4);
memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8);
Bfree(a1, a4);
v13 = v6;
}
*(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7);
*(_DWORD *)(v13 + 20) = v10 + 1;
}
return v13;
}
| multadd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOVSXD RAX,dword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
LAB_0013623a:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RAX,RCX
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,dword ptr [RBP + -0x20]
JL 0x0013623a
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0013631b
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x001362f3
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x8]
ADD EDI,0x1
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00136330
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RAX + 0x14]
SHL RDX,0x2
ADD RDX,0x8
CALL 0x00113360
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00135e30
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001362f3:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x20],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],ECX
LAB_0013631b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long * multadd(long *param_1,int param_2,int param_3,int8 param_4)
{
int iVar1;
ulong uVar2;
ulong local_38;
uint *local_30;
int local_24;
long *local_10;
iVar1 = *(int *)((long)param_1 + 0x14);
local_24 = 0;
local_38 = (ulong)param_3;
local_30 = (uint *)*param_1;
do {
uVar2 = (ulong)*local_30 * (long)param_2 + local_38;
local_38 = uVar2 >> 0x20;
*local_30 = (uint)uVar2;
local_24 = local_24 + 1;
local_30 = local_30 + 1;
} while (local_24 < iVar1);
local_10 = param_1;
if (local_38 != 0) {
if (*(int *)((long)param_1 + 0xc) <= iVar1) {
local_10 = (long *)Balloc((int)param_1[1] + 1,param_4);
memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8);
Bfree(param_1,param_4);
}
*(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20);
*(int *)((long)local_10 + 0x14) = iVar1 + 1;
}
return local_10;
}
|
|
1,569 | nglog::ReprintFatalMessage() | ng-log[P]ng-log/src/logging.cc | void ReprintFatalMessage() {
if (fatal_message[0]) {
const size_t n = strlen(fatal_message);
if (!FLAGS_logtostderr) {
// Also write to stderr (don't color to avoid terminal checks)
WriteToStderr(fatal_message, n);
}
LogDestination::LogToAllLogfiles(NGLOG_ERROR, fatal_time, fatal_message, n);
}
} | O2 | cpp | nglog::ReprintFatalMessage():
cmpb $0x0, 0x3490e(%rip) # 0x40c50
je 0xc389
pushq %rbx
leaq 0x34904(%rip), %rdi # 0x40c50
callq 0x8230
movq %rax, %rbx
leaq 0x25787(%rip), %rax # 0x31ae2
cmpb $0x0, (%rax)
jne 0xc36f
leaq 0x348e9(%rip), %rdi # 0x40c50
movq %rbx, %rsi
callq 0xc38a
leaq 0x349da(%rip), %rsi # 0x40d50
leaq 0x348d3(%rip), %rdx # 0x40c50
pushq $0x2
popq %rdi
movq %rbx, %rcx
popq %rbx
jmp 0x10088
retq
| _ZN5nglog19ReprintFatalMessageEv:
cmp cs:_ZN5nglogL13fatal_messageE, 0; nglog::fatal_message
jz short locret_C389
push rbx
lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message
call _strlen
mov rbx, rax
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jnz short loc_C36F
lea rdi, _ZN5nglogL13fatal_messageE; this
mov rsi, rbx; char *
call _ZN5nglogL13WriteToStderrEPKcm; nglog::WriteToStderr(char const*,ulong)
loc_C36F:
lea rsi, _ZN5nglogL10fatal_timeE; nglog::fatal_time
lea rdx, _ZN5nglogL13fatal_messageE; nglog::fatal_message
push 2
pop rdi
mov rcx, rbx
pop rbx
jmp _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong)
locret_C389:
retn
| void nglog::ReprintFatalMessage(nglog *this)
{
unsigned long long v1; // rdx
const char *v2; // rbx
if ( nglog::fatal_message[0] )
{
v2 = (const char *)strlen(nglog::fatal_message);
if ( !fLB::FLAGS_logtostderr )
nglog::WriteToStderr((nglog *)nglog::fatal_message, v2, v1);
nglog::LogDestination::LogToAllLogfiles(2LL, &nglog::fatal_time, nglog::fatal_message, v2);
}
}
| ReprintFatalMessage:
CMP byte ptr [0x00140c50],0x0
JZ 0x0010c389
PUSH RBX
LEA RDI,[0x140c50]
CALL 0x00108230
MOV RBX,RAX
LEA RAX,[0x131ae2]
CMP byte ptr [RAX],0x0
JNZ 0x0010c36f
LEA RDI,[0x140c50]
MOV RSI,RBX
CALL 0x0010c38a
LAB_0010c36f:
LEA RSI,[0x140d50]
LEA RDX,[0x140c50]
PUSH 0x2
POP RDI
MOV RCX,RBX
POP RBX
JMP 0x00110088
LAB_0010c389:
RET
|
/* nglog::ReprintFatalMessage() */
void nglog::ReprintFatalMessage(void)
{
size_t sVar1;
if (fatal_message != '\0') {
sVar1 = strlen(&fatal_message);
if (fLB::FLAGS_logtostderr == '\0') {
WriteToStderr(&fatal_message,sVar1);
}
LogDestination::LogToAllLogfiles(2,&fatal_time,&fatal_message,sVar1);
return;
}
return;
}
|
|
1,570 | nglog::ReprintFatalMessage() | ng-log[P]ng-log/src/logging.cc | void ReprintFatalMessage() {
if (fatal_message[0]) {
const size_t n = strlen(fatal_message);
if (!FLAGS_logtostderr) {
// Also write to stderr (don't color to avoid terminal checks)
WriteToStderr(fatal_message, n);
}
LogDestination::LogToAllLogfiles(NGLOG_ERROR, fatal_time, fatal_message, n);
}
} | O3 | cpp | nglog::ReprintFatalMessage():
cmpb $0x0, 0x34f92(%rip) # 0x40be0
je 0xbc88
pushq %rbx
leaq 0x34f88(%rip), %rdi # 0x40be0
callq 0x71f0
movq %rax, %rbx
leaq 0x25e13(%rip), %rax # 0x31a7a
cmpb $0x0, (%rax)
je 0xbc89
leaq 0x3506d(%rip), %rsi # 0x40ce0
leaq 0x34f66(%rip), %rdx # 0x40be0
movl $0x2, %edi
movq %rbx, %rcx
popq %rbx
jmp 0x115f4
retq
movq %rbx, %rdi
callq 0x7b5b
jmp 0xbc6c
nop
| _ZN5nglog19ReprintFatalMessageEv:
cmp cs:_ZN5nglogL13fatal_messageE, 0; nglog::fatal_message
jz short locret_BC88
push rbx
lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message
call _strlen
mov rbx, rax
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jz short loc_BC89
loc_BC6C:
lea rsi, _ZN5nglogL10fatal_timeE; nglog::fatal_time
lea rdx, _ZN5nglogL13fatal_messageE; nglog::fatal_message
mov edi, 2
mov rcx, rbx
pop rbx
jmp _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong)
locret_BC88:
retn
loc_BC89:
mov rdi, rbx
call _ZN5nglog19ReprintFatalMessageEv_cold_1; nglog::ReprintFatalMessage(void) [clone]
jmp short loc_BC6C
| void nglog::ReprintFatalMessage(nglog *this)
{
long long v1; // rbx
if ( nglog::fatal_message )
{
v1 = strlen(&nglog::fatal_message);
if ( !fLB::FLAGS_logtostderr )
nglog::ReprintFatalMessage(v1);
nglog::LogDestination::LogToAllLogfiles(2LL, &nglog::fatal_time, &nglog::fatal_message, v1);
}
}
| ReprintFatalMessage:
CMP byte ptr [0x00140be0],0x0
JZ 0x0010bc88
PUSH RBX
LEA RDI,[0x140be0]
CALL 0x001071f0
MOV RBX,RAX
LEA RAX,[0x131a7a]
CMP byte ptr [RAX],0x0
JZ 0x0010bc89
LAB_0010bc6c:
LEA RSI,[0x140ce0]
LEA RDX,[0x140be0]
MOV EDI,0x2
MOV RCX,RBX
POP RBX
JMP 0x001115f4
LAB_0010bc88:
RET
LAB_0010bc89:
MOV RDI,RBX
CALL 0x00107b5b
JMP 0x0010bc6c
|
/* nglog::ReprintFatalMessage() */
void nglog::ReprintFatalMessage(void)
{
nglog *this;
if (fatal_message != '\0') {
this = (nglog *)strlen(&fatal_message);
if (fLB::FLAGS_logtostderr == '\0') {
ReprintFatalMessage(this);
}
LogDestination::LogToAllLogfiles(2,&fatal_time,&fatal_message,this);
return;
}
return;
}
|
|
1,571 | my_casedn_str_8bit | eloqsql/strings/ctype-simple.c | size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str)
{
register const uchar *map= cs->to_lower;
char *str_orig= str;
while ((*str= (char) map[(uchar) *str]) != 0)
str++;
return (size_t) (str - str_orig);
} | O0 | c | my_casedn_str_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movq -0x10(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0xa6e6a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa6e40
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
| my_casedn_str_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+48h]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
loc_A6E40:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov al, [rax+rcx]
mov rcx, [rbp+var_10]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_A6E6A
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_A6E40
loc_A6E6A:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
sub rax, rcx
pop rbp
retn
| _BYTE * my_casedn_str_8bit(long long a1, _BYTE *a2)
{
char v2; // al
long long v4; // [rsp+8h] [rbp-18h]
_BYTE *v5; // [rsp+10h] [rbp-10h]
v5 = a2;
v4 = *(_QWORD *)(a1 + 72);
while ( 1 )
{
v2 = *(_BYTE *)(v4 + (unsigned __int8)*v5);
*v5 = v2;
if ( !v2 )
break;
++v5;
}
return (_BYTE *)(v5 - a2);
}
| my_casedn_str_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_001a6e40:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001a6e6a
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001a6e40
LAB_001a6e6a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
POP RBP
RET
|
long my_casedn_str_8bit(long param_1,byte *param_2)
{
byte bVar1;
long lVar2;
byte *local_18;
lVar2 = *(long *)(param_1 + 0x48);
local_18 = param_2;
while (bVar1 = *(byte *)(lVar2 + (ulong)*local_18), *local_18 = bVar1, bVar1 != 0) {
local_18 = local_18 + 1;
}
return (long)local_18 - (long)param_2;
}
|
|
1,572 | ggml_add_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_add_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_can_repeat(b, a));
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_ADD;
result->src[0] = a;
result->src[1] = b;
return result;
} | O0 | c | ggml_add_impl:
subq $0x38, %rsp
movb %cl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x44e70
testb $0x1, %al
jne 0x4adaf
leaq 0x69822(%rip), %rdi # 0xb45b7
movl $0x743, %esi # imm = 0x743
leaq 0x69861(%rip), %rdx # 0xb4602
leaq 0x699d9(%rip), %rcx # 0xb4781
movb $0x0, %al
callq 0x46780
testb $0x1, 0x1f(%rsp)
je 0x4adcc
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x408f0
movq %rax, 0x8(%rsp)
jmp 0x4ade0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x43c20
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl $0x2, 0x50(%rax)
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| ggml_add_impl:
sub rsp, 38h
mov al, cl
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
and al, 1
mov [rsp+38h+var_19], al
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_10]
call _ggml_can_repeat
test al, 1
jnz short loc_4ADAF
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 743h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)"
mov al, 0
call _ggml_abort
loc_4ADAF:
test [rsp+38h+var_19], 1
jz short loc_4ADCC
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_view_tensor
mov [rsp+38h+var_30], rax
jmp short loc_4ADE0
loc_4ADCC:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_dup_tensor
mov [rsp+38h+var_30], rax
loc_4ADE0:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov dword ptr [rax+50h], 2
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov [rax+98h], rcx
mov rcx, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
mov [rax+0A0h], rcx
mov rax, [rsp+38h+var_28]
add rsp, 38h
retn
| long long ggml_add_impl(
long long a1,
long long *a2,
_QWORD *a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
double v12; // xmm4_8
double v13; // xmm5_8
long long v15; // [rsp+8h] [rbp-30h]
char v16; // [rsp+1Fh] [rbp-19h]
v16 = a4 & 1;
if ( !ggml_can_repeat(a3, a2) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
1859,
(long long)"GGML_ASSERT(%s) failed",
"ggml_can_repeat(b, a)");
if ( (v16 & 1) != 0 )
v15 = (long long)ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v12, v13, a11, a12);
else
v15 = ggml_dup_tensor(a1, (unsigned int *)a2);
*(_DWORD *)(v15 + 80) = 2;
*(_QWORD *)(v15 + 152) = a2;
*(_QWORD *)(v15 + 160) = a3;
return v15;
}
| ggml_add_impl:
SUB RSP,0x38
MOV AL,CL
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x1f],AL
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00144e70
TEST AL,0x1
JNZ 0x0014adaf
LEA RDI,[0x1b45b7]
MOV ESI,0x743
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4781]
MOV AL,0x0
CALL 0x00146780
LAB_0014adaf:
TEST byte ptr [RSP + 0x1f],0x1
JZ 0x0014adcc
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001408f0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0014ade0
LAB_0014adcc:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00143c20
MOV qword ptr [RSP + 0x8],RAX
LAB_0014ade0:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x50],0x2
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x38
RET
|
long ggml_add_impl(int8 param_1,int8 param_2,int8 param_3,byte param_4)
{
ulong uVar1;
long local_30;
uVar1 = ggml_can_repeat(param_3,param_2);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x743,
"GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)");
}
if ((param_4 & 1) == 0) {
local_30 = ggml_dup_tensor(param_1,param_2);
}
else {
local_30 = ggml_view_tensor(param_1,param_2);
}
*(int4 *)(local_30 + 0x50) = 2;
*(int8 *)(local_30 + 0x98) = param_2;
*(int8 *)(local_30 + 0xa0) = param_3;
return local_30;
}
|
|
1,573 | ggml_add_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_add_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_can_repeat(b, a));
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_ADD;
result->src[0] = a;
result->src[1] = b;
return result;
} | O1 | c | ggml_add_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x17570
testb %al, %al
je 0x1a3ec
testb %bpl, %bpl
je 0x1a3b2
movq %r15, %rdi
movq %r14, %rsi
callq 0x16260
jmp 0x1a3cc
movl (%r14), %esi
leaq 0x10(%r14), %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19cd9
movl $0x2, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3021c(%rip), %rdi # 0x4a60f
leaq 0x30260(%rip), %rdx # 0x4a65a
leaq 0x303d8(%rip), %rcx # 0x4a7d9
movl $0x743, %esi # imm = 0x743
xorl %eax, %eax
callq 0x17c70
| ggml_add_impl:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rdx
call _ggml_can_repeat
test al, al
jz short loc_1A3EC
test bpl, bpl
jz short loc_1A3B2
mov rdi, r15
mov rsi, r14
call _ggml_view_tensor
jmp short loc_1A3CC
loc_1A3B2:
mov esi, [r14]
lea rcx, [r14+10h]
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1A3CC:
mov dword ptr [rax+50h], 2
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1A3EC:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)"
mov esi, 743h
xor eax, eax
call _ggml_abort
| long long ggml_add_impl(long long a1, long long *a2, _QWORD *a3, char a4)
{
int v6; // r8d
int v7; // r9d
long long result; // rax
if ( !ggml_can_repeat(a3, a2) )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
1859,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"ggml_can_repeat(b, a)",
v6,
v7);
if ( a4 )
result = ggml_view_tensor(a1, (long long)a2);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, a2 + 2, 0LL, 0LL);
*(_DWORD *)(result + 80) = 2;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_add_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RDX
CALL 0x00117570
TEST AL,AL
JZ 0x0011a3ec
TEST BPL,BPL
JZ 0x0011a3b2
MOV RDI,R15
MOV RSI,R14
CALL 0x00116260
JMP 0x0011a3cc
LAB_0011a3b2:
MOV ESI,dword ptr [R14]
LEA RCX,[R14 + 0x10]
MOV RDI,R15
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119cd9
LAB_0011a3cc:
MOV dword ptr [RAX + 0x50],0x2
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011a3ec:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a65a]
LEA RCX,[0x14a7d9]
MOV ESI,0x743
XOR EAX,EAX
CALL 0x00117c70
|
void ggml_add_impl(int8 param_1,int4 *param_2,int8 param_3,char param_4)
{
char cVar1;
long lVar2;
cVar1 = ggml_can_repeat(param_3);
if (cVar1 != '\0') {
if (param_4 == '\0') {
lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0);
}
else {
lVar2 = ggml_view_tensor(param_1,param_2);
}
*(int4 *)(lVar2 + 0x50) = 2;
*(int4 **)(lVar2 + 0x98) = param_2;
*(int8 *)(lVar2 + 0xa0) = param_3;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x743,
"GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)");
}
|
|
1,574 | ggml_add_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_add_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_can_repeat(b, a));
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_ADD;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_add_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x1dda0
testb %al, %al
je 0x2065f
movq %r15, %rdi
movq %r14, %rsi
testb %bpl, %bpl
je 0x2063a
callq 0x1c3e0
jmp 0x2063f
callq 0x1d660
movl $0x2, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2af1d(%rip), %rdi # 0x4b583
leaq 0x2af61(%rip), %rdx # 0x4b5ce
leaq 0x2b0d9(%rip), %rcx # 0x4b74d
movl $0x743, %esi # imm = 0x743
xorl %eax, %eax
callq 0x1e770
| ggml_add_impl:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rdx
call _ggml_can_repeat
test al, al
jz short loc_2065F
mov rdi, r15
mov rsi, r14
test bpl, bpl
jz short loc_2063A
call _ggml_view_tensor
jmp short loc_2063F
loc_2063A:
call _ggml_dup_tensor
loc_2063F:
mov dword ptr [rax+50h], 2
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2065F:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatB; "ggml_can_repeat(b, a)"
mov esi, 743h
xor eax, eax
call _ggml_abort
| long long ggml_add_impl(
long long a1,
long long *a2,
_QWORD *a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
char v12; // al
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long result; // rax
char v20; // [rsp-8h] [rbp-28h]
v20 = v12;
if ( !ggml_can_repeat(a3, a2) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
1859,
(long long)"GGML_ASSERT(%s) failed",
(long long)"ggml_can_repeat(b, a)",
v15,
v16,
a5,
a6,
a7,
a8,
v17,
v18,
a11,
a12,
v20);
if ( a4 )
result = ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v17, v18, a11, a12);
else
result = ggml_dup_tensor(a1, (unsigned int *)a2);
*(_DWORD *)(result + 80) = 2;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_add_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RDX
CALL 0x0011dda0
TEST AL,AL
JZ 0x0012065f
MOV RDI,R15
MOV RSI,R14
TEST BPL,BPL
JZ 0x0012063a
CALL 0x0011c3e0
JMP 0x0012063f
LAB_0012063a:
CALL 0x0011d660
LAB_0012063f:
MOV dword ptr [RAX + 0x50],0x2
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012065f:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14b74d]
MOV ESI,0x743
XOR EAX,EAX
CALL 0x0011e770
|
void ggml_add_impl(int8 param_1,int8 param_2,int8 param_3,char param_4)
{
char cVar1;
long lVar2;
cVar1 = ggml_can_repeat(param_3);
if (cVar1 != '\0') {
if (param_4 == '\0') {
lVar2 = ggml_dup_tensor(param_1,param_2);
}
else {
lVar2 = ggml_view_tensor();
}
*(int4 *)(lVar2 + 0x50) = 2;
*(int8 *)(lVar2 + 0x98) = param_2;
*(int8 *)(lVar2 + 0xa0) = param_3;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x743,
"GGML_ASSERT(%s) failed","ggml_can_repeat(b, a)");
}
|
|
1,575 | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
} | O0 | cpp | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
callq 0x29b690
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rdi
callq 0x29b6c0
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x29b6f0
testb $0x1, %al
jne 0x29b36b
jmp 0x29b4b6
leaq 0x90(%rsp), %rdi
callq 0x29b730
movq %rax, 0x80(%rsp)
movb $0x1, 0x7f(%rsp)
movq 0x80(%rsp), %rdi
callq 0x26b940
testb $0x1, %al
jne 0x29b398
jmp 0x29b402
movq 0x80(%rsp), %rdi
callq 0x271840
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
leaq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x271850
movq 0x10(%rsp), %rdi
callq 0x223e90
movb %al, 0x1b(%rsp)
jmp 0x29b3cf
movb 0x1b(%rsp), %al
andb $0x1, %al
movb %al, 0x7f(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x21f6a0
jmp 0x29b402
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x21f6a0
jmp 0x29b4be
testb $0x1, 0x7f(%rsp)
je 0x29b4a2
movq 0x80(%rsp), %rdi
addq $0x10, %rdi
callq 0x29b740
testb $0x1, %al
jne 0x29b477
movl $0x10, %edi
callq 0x64880
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x5b1ad(%rip), %rsi # 0x2f65eb
callq 0x645d0
jmp 0x29b445
movq 0x8(%rsp), %rdi
movq 0x11db57(%rip), %rsi # 0x3b8fa8
movq 0x11db18(%rip), %rdx # 0x3b8f70
callq 0x64d60
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x652b0
jmp 0x29b4be
movq 0x80(%rsp), %rdi
addq $0x10, %rdi
callq 0x21f8f0
movq %rax, %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x244690
jmp 0x29b4b6
jmp 0x29b4a4
leaq 0x90(%rsp), %rdi
callq 0x29b760
jmp 0x29b34d
addq $0xb8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x64e40
nopl (%rax,%rax)
| _ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rax, [rsp+0B8h+var_8]
add rax, 20h ; ' '
mov [rsp+0B8h+var_20], rax
mov rdi, [rsp+0B8h+var_20]
call _ZNKSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES1_INS2_12TemplateNodeEEESaIS7_EE5beginEv; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::begin(void)
mov [rsp+0B8h+var_28], rax
mov rdi, [rsp+0B8h+var_20]
call _ZNKSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES1_INS2_12TemplateNodeEEESaIS7_EE3endEv; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::end(void)
mov [rsp+0B8h+var_30], rax
loc_29B34D:
lea rdi, [rsp+0B8h+var_28]
lea rsi, [rsp+0B8h+var_30]
call _ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESJ_; __gnu_cxx::operator!=<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>(__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>> const&)
test al, 1
jnz short loc_29B36B
jmp loc_29B4B6
loc_29B36B:
lea rdi, [rsp+0B8h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator*(void)
mov [rsp+0B8h+var_38], rax
mov [rsp+0B8h+var_39], 1
mov rdi, [rsp+0B8h+var_38]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_29B398
jmp short loc_29B402
loc_29B398:
mov rdi, [rsp+0B8h+var_38]
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+0B8h+var_18]
lea rdi, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_A8], rdi
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, [rsp+0B8h+var_A8]; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov [rsp+0B8h+var_9D], al
jmp short $+2
loc_29B3CF:
mov al, [rsp+0B8h+var_9D]
and al, 1
mov [rsp+0B8h+var_39], al
lea rdi, [rsp+0B8h+var_90]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_29B402
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_98], rcx
mov [rsp+0B8h+var_9C], eax
lea rdi, [rsp+0B8h+var_90]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_29B4BE
loc_29B402:
test [rsp+0B8h+var_39], 1
jz loc_29B4A2
mov rdi, [rsp+0B8h+var_38]
add rdi, 10h
call _ZNKSt12__shared_ptrIN5minja12TemplateNodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_29B477
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_B0], rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_29B445:
mov rdi, [rsp+0B8h+var_B0]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0B8h+var_B0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_98], rcx
mov [rsp+0B8h+var_9C], eax
call ___cxa_free_exception
jmp short loc_29B4BE
loc_29B477:
mov rdi, [rsp+0B8h+var_38]
add rdi, 10h
call _ZNKSt19__shared_ptr_accessIN5minja12TemplateNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rsi, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_18]
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
jmp short loc_29B4B6
loc_29B4A2:
jmp short $+2
loc_29B4A4:
lea rdi, [rsp+0B8h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator++(void)
jmp loc_29B34D
loc_29B4B6:
add rsp, 0B8h
retn
loc_29B4BE:
mov rdi, [rsp+0B8h+var_98]
call __Unwind_Resume
| long long minja::IfNode::do_render(long long a1, long long a2, long long a3)
{
long long result; // rax
void (***v4)(void); // rsi
long long ( ***v5)(_QWORD); // rax
std::runtime_error *exception; // [rsp+8h] [rbp-B0h]
_BYTE v7[87]; // [rsp+28h] [rbp-90h] BYREF
char v8; // [rsp+7Fh] [rbp-39h]
_QWORD *v9; // [rsp+80h] [rbp-38h]
long long v10; // [rsp+88h] [rbp-30h] BYREF
_QWORD v11[5]; // [rsp+90h] [rbp-28h] BYREF
v11[4] = a1;
v11[3] = a2;
v11[2] = a3;
v11[1] = a1 + 32;
v11[0] = std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::begin(a1 + 32);
v10 = std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::end(a1 + 32);
while ( 1 )
{
result = __gnu_cxx::operator!=<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>(
v11,
&v10);
if ( (result & 1) == 0 )
break;
v9 = (_QWORD *)__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator*(v11);
v8 = 1;
if ( std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v9) )
{
v4 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v9);
minja::Expression::evaluate((long long)v7, v4);
v8 = minja::Value::to_bool((minja::Value *)v7) & 1;
minja::Value::~Value((minja::Value *)v7);
}
if ( (v8 & 1) != 0 )
{
if ( (std::__shared_ptr<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2>::operator bool(v9 + 2) & 1) == 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v5 = (long long ( ***)(_QWORD))std::__shared_ptr_access<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(v9 + 2));
return minja::TemplateNode::render(v5);
}
__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator++(v11);
}
return result;
}
| |||
1,576 | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
} | O2 | cpp | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x20(%rdi), %r12
movq 0x28(%rdi), %r13
leaq 0x8(%rsp), %r15
cmpq %r13, %r12
je 0xdaf86
movq (%r12), %rsi
testq %rsi, %rsi
je 0xdaf71
movq %r15, %rdi
movq %rbx, %rdx
callq 0xcf5c8
movq %r15, %rdi
callq 0xb5de4
movl %eax, %ebp
movq %r15, %rdi
callq 0xb445e
testb %bpl, %bpl
jne 0xdaf71
addq $0x20, %r12
jmp 0xdaf3b
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0xdaf95
movq %r14, %rsi
movq %rbx, %rdx
callq 0xbf2a6
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x28580
movq %rax, %rbx
leaq 0x2a271(%rip), %rsi # 0x105218
movq %rax, %rdi
callq 0x28410
movq 0x8c03a(%rip), %rsi # 0x166ff0
movq 0x8bf9b(%rip), %rdx # 0x166f58
movq %rbx, %rdi
callq 0x29320
movq %rax, %r14
movq %rbx, %rdi
callq 0x28830
jmp 0xdafdf
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xb445e
movq %r14, %rdi
callq 0x293c0
nop
| _ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdx
mov r14, rsi
mov r12, [rdi+20h]
mov r13, [rdi+28h]
lea r15, [rsp+88h+var_80]
loc_DAF3B:
cmp r12, r13
jz short loc_DAF86
mov rsi, [r12]
test rsi, rsi
jz short loc_DAF71
mov rdi, r15
mov rdx, rbx
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r15; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jnz short loc_DAF71
add r12, 20h ; ' '
jmp short loc_DAF3B
loc_DAF71:
mov rdi, [r12+10h]
test rdi, rdi
jz short loc_DAF95
mov rsi, r14
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
loc_DAF86:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_DAF95:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_DAFDF
mov r14, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_DAFDF:
mov rdi, r14
call __Unwind_Resume
| void minja::IfNode::do_render(long long a1)
{
long long v1; // r12
long long v2; // r13
char v3; // bp
long long ( ***v4)(_QWORD); // rdi
std::runtime_error *exception; // rbx
_BYTE v6[128]; // [rsp+8h] [rbp-80h] BYREF
v1 = *(_QWORD *)(a1 + 32);
v2 = *(_QWORD *)(a1 + 40);
while ( v1 != v2 )
{
if ( !*(_QWORD *)v1
|| (minja::Expression::evaluate((long long)v6, *(void (****)(void))v1),
v3 = minja::Value::to_bool((minja::Value *)v6),
minja::Value::~Value((minja::Value *)v6),
v3) )
{
v4 = *(long long ( ****)(_QWORD))(v1 + 16);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render(v4);
return;
}
v1 += 32LL;
}
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDX
MOV R14,RSI
MOV R12,qword ptr [RDI + 0x20]
MOV R13,qword ptr [RDI + 0x28]
LEA R15,[RSP + 0x8]
LAB_001daf3b:
CMP R12,R13
JZ 0x001daf86
MOV RSI,qword ptr [R12]
TEST RSI,RSI
JZ 0x001daf71
MOV RDI,R15
MOV RDX,RBX
CALL 0x001cf5c8
LAB_001daf54:
MOV RDI,R15
CALL 0x001b5de4
LAB_001daf5c:
MOV EBP,EAX
MOV RDI,R15
CALL 0x001b445e
TEST BPL,BPL
JNZ 0x001daf71
ADD R12,0x20
JMP 0x001daf3b
LAB_001daf71:
MOV RDI,qword ptr [R12 + 0x10]
TEST RDI,RDI
JZ 0x001daf95
MOV RSI,R14
MOV RDX,RBX
CALL 0x001bf2a6
LAB_001daf86:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001daf95:
PUSH 0x10
POP RDI
CALL 0x00128580
MOV RBX,RAX
LAB_001dafa0:
LEA RSI,[0x205218]
MOV RDI,RAX
CALL 0x00128410
LAB_001dafaf:
MOV RSI,qword ptr [0x00266ff0]
MOV RDX,qword ptr [0x00266f58]
MOV RDI,RBX
CALL 0x00129320
|
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int8 *puVar1;
char cVar2;
runtime_error *this;
int8 *puVar3;
Expression local_80 [80];
puVar3 = *(int8 **)(param_1 + 0x20);
puVar1 = *(int8 **)(param_1 + 0x28);
while( true ) {
if (puVar3 == puVar1) {
return;
}
if ((shared_ptr *)*puVar3 == (shared_ptr *)0x0) break;
Expression::evaluate(local_80,(shared_ptr *)*puVar3);
/* try { // try from 001daf54 to 001daf5b has its CatchHandler @ 001dafd2 */
cVar2 = Value::to_bool((Value *)local_80);
Value::~Value((Value *)local_80);
if (cVar2 != '\0') break;
puVar3 = puVar3 + 4;
}
if ((ostringstream *)puVar3[2] != (ostringstream *)0x0) {
TemplateNode::render((ostringstream *)puVar3[2],param_2);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001dafa0 to 001dafae has its CatchHandler @ 001dafc5 */
std::runtime_error::runtime_error(this,"IfNode.cascade.second is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58);
}
|
|
1,577 | WorldgenTask::finalize() | untodesu[P]voxelius/game/server/worldgen.cc | void WorldgenTask::finalize(void)
{
auto dim_tasks = active_tasks.find(m_dimension);
if(dim_tasks == active_tasks.cend()) {
// Normally this should never happen but
// one can never be sure about anything
// when that anything is threaded out
return;
}
auto it = dim_tasks->second.find(m_cpos);
if(it == dim_tasks->second.cend()) {
// Normally this should never happen but
// one can never be sure about anything
// when that anything is threaded out
return;
}
auto chunk = m_dimension->create_chunk(m_cpos);
chunk->set_voxels(m_voxels);
if(aggressive_caching) {
// Marking the chunk with InhabitedComponent makes
// it so that it is saved regardles of whether it was
// modified by players or not. This isn't particularly
// good for server-side disk usage but it might improve performance
m_dimension->chunks.emplace<InhabitedComponent>(chunk->get_entity());
}
protocol::ChunkVoxels response;
response.voxels = m_voxels;
response.chunk = m_cpos;
auto packet = protocol::encode(response);
for(auto session : it->second) {
if(session->peer) {
// Respond with the voxels to every session
// that has requested this specific chunk for this dimension
enet_peer_send(session->peer, protocol::CHANNEL, packet);
}
}
dim_tasks->second.erase(it);
if(dim_tasks->second.empty()) {
// There are no more requests
// to generate a chunk for that
// dimension, at least for now
active_tasks.erase(dim_tasks);
}
} | O2 | cpp | WorldgenTask::finalize():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2038, %rsp # imm = 0x2038
movq %rdi, %r12
leaq 0x20(%rdi), %rbp
leaq 0xdafbb(%rip), %rdi # 0x10dea8
movq %rbp, %rsi
callq 0x331f6
movq %rax, %rbx
movslq 0xdafc9(%rip), %rax # 0x10dec8
imulq $0x38, %rax, %rax
addq 0xdafa6(%rip), %rax # 0x10deb0
cmpq %rax, %rbx
je 0x33025
movq %rbx, %r14
addq $0x8, %r14
leaq 0x2028(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x3320c
movslq 0x28(%rbx), %rcx
imulq $0x48, %rcx, %rcx
addq 0x10(%rbx), %rcx
movq %rax, 0x8(%rsp)
cmpq %rcx, %rax
je 0x33025
movq 0x20(%r12), %rdi
movq %r13, %rsi
callq 0x385e4
movq %rax, %r15
addq $0x28, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x34c46
cmpb $0x1, 0xdaf6b(%rip) # 0x10ded8
jne 0x32f89
movq (%rbp), %rbp
addq $0x8, %rbp
movq %r15, %rdi
callq 0x34c64
movq %rbp, %rdi
movl %eax, %esi
callq 0x33222
leaq 0x34(%rsp), %r15
andq $0x0, -0x14(%r15)
leaq 0xd4486(%rip), %rax # 0x107420
movq %rax, -0x1c(%r15)
movl $0x2000, %edx # imm = 0x2000
movq %r15, %rdi
movq %r12, %rsi
callq 0x175d0
movq (%r13), %rax
movq %rax, -0xc(%r15)
movl 0x8(%r13), %eax
movl %eax, -0x4(%r15)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x3fbe8
movq %rax, %r12
movq 0x8(%rsp), %r13
movq %r13, %r15
addq $0x20, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x32ffb
movq 0x8(%r15), %rax
movq 0x40(%rax), %rdi
testq %rdi, %rdi
je 0x32fda
xorl %esi, %esi
movq %r12, %rdx
callq 0x92415
jmp 0x32fda
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq %r14, %rdi
callq 0x33272
cmpl $0x0, 0x28(%rbx)
jne 0x33025
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0xdae88(%rip), %rdi # 0x10dea8
callq 0x332c2
addq $0x2038, %rsp # imm = 0x2038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12WorldgenTask8finalizeEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2038h
mov r12, rdi
lea rbp, [rdi+20h]
lea rdi, _ZL12active_tasks; active_tasks
mov rsi, rbp
call _ZN7emhash87HashMapIP9DimensionNS0_IN3glm3vecILi3EiLNS3_9qualifierE0EEESt13unordered_setIP7SessionSt4hashIS9_ESt8equal_toIS9_ESaIS9_EESA_IS6_ESC_IS6_EEESA_IS2_ESC_IS2_EE4findIS2_EENSL_8iteratorERKT_; emhash8::HashMap<Dimension *,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension *>,std::equal_to<Dimension *>>::find<Dimension *>(Dimension * const&)
mov rbx, rax
movsxd rax, cs:dword_10DEC8
imul rax, 38h ; '8'
add rax, cs:qword_10DEB0
cmp rbx, rax
jz loc_33025
mov r14, rbx
add r14, 8
lea r13, [r12+2028h]
mov rdi, r14
mov rsi, r13
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEESt13unordered_setIP7SessionSt4hashIS7_ESt8equal_toIS7_ESaIS7_EES8_IS4_ESA_IS4_EE4findIS4_EENSG_8iteratorERKT_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find<glm::vec<3,int,(glm::qualifier)0>>(glm::vec<3,int,(glm::qualifier)0> const&)
movsxd rcx, dword ptr [rbx+28h]
imul rcx, 48h ; 'H'
add rcx, [rbx+10h]
mov [rsp+2068h+var_2060], rax
cmp rax, rcx
jz loc_33025
mov rdi, [r12+20h]
mov rsi, r13
call _ZN9Dimension12create_chunkERKN3glm3vecILi3EiLNS0_9qualifierE0EEE; Dimension::create_chunk(glm::vec<3,int,(glm::qualifier)0> const&)
mov r15, rax
add r12, 28h ; '('
mov rdi, rax
mov rsi, r12
call _ZN5Chunk10set_voxelsERK12VoxelStorage; Chunk::set_voxels(VoxelStorage const&)
cmp cs:_ZL18aggressive_caching, 1; aggressive_caching
jnz short loc_32F89
mov rbp, [rbp+0]
add rbp, 8
mov rdi, r15; this
call _ZNK5Chunk10get_entityEv; Chunk::get_entity(void)
mov rdi, rbp
mov esi, eax
call _ZN4entt14basic_registryINS_6entityESaIS1_EE7emplaceI18InhabitedComponentJEEEDcS1_DpOT0_
loc_32F89:
lea r15, [rsp+2068h+var_2034]
and qword ptr [r15-14h], 0
lea rax, off_107420
mov [r15-1Ch], rax
mov edx, 2000h
mov rdi, r15
mov rsi, r12
call _memcpy
mov rax, [r13+0]
mov [r15-0Ch], rax
mov eax, [r13+8]
mov [r15-4], eax
lea rdi, [rsp+2068h+var_2050]; this
push 1
pop rsi; protocol::ChunkVoxels *
call _ZN8protocol6encodeERKNS_11ChunkVoxelsEj; protocol::encode(protocol::ChunkVoxels const&,uint)
mov r12, rax
mov r13, [rsp+2068h+var_2060]
mov r15, r13
add r15, 20h ; ' '
loc_32FDA:
mov r15, [r15]
test r15, r15
jz short loc_32FFB
mov rax, [r15+8]
mov rdi, [rax+40h]
test rdi, rdi
jz short loc_32FDA
xor esi, esi
mov rdx, r12
call enet_peer_send
jmp short loc_32FDA
loc_32FFB:
lea rsi, [rsp+2068h+var_2058]
mov [rsi], r13
mov rdi, r14
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEESt13unordered_setIP7SessionSt4hashIS7_ESt8equal_toIS7_ESaIS7_EES8_IS4_ESA_IS4_EE5eraseERKNSG_14const_iteratorE; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::erase(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::const_iterator const&)
cmp dword ptr [rbx+28h], 0
jnz short loc_33025
lea rsi, [rsp+2068h+var_2058]
mov [rsi], rbx
lea rdi, _ZL12active_tasks; active_tasks
call _ZN7emhash87HashMapIP9DimensionNS0_IN3glm3vecILi3EiLNS3_9qualifierE0EEESt13unordered_setIP7SessionSt4hashIS9_ESt8equal_toIS9_ESaIS9_EESA_IS6_ESC_IS6_EEESA_IS2_ESC_IS2_EE5eraseERKNSL_14const_iteratorE; emhash8::HashMap<Dimension *,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension *>,std::equal_to<Dimension *>>::erase(emhash8::HashMap<Dimension *,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension *>,std::equal_to<Dimension *>>::const_iterator const&)
loc_33025:
add rsp, 2038h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long WorldgenTask::finalize(WorldgenTask *this)
{
long long v1; // rbx
long long result; // rax
Chunk *chunk; // r15
long long v4; // rbp
unsigned int entity; // eax
unsigned int v6; // edx
long long v7; // r12
_QWORD *v8; // r15
long long v9; // rdi
long long v10; // [rsp+8h] [rbp-2060h]
_QWORD v11[3]; // [rsp+18h] [rbp-2050h] BYREF
int v12; // [rsp+30h] [rbp-2038h]
_BYTE v13[8244]; // [rsp+34h] [rbp-2034h] BYREF
v1 = emhash8::HashMap<Dimension *,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension *>,std::equal_to<Dimension *>>::find<Dimension *>(
&active_tasks,
(char *)this + 32);
result = qword_10DEB0 + 56LL * dword_10DEC8;
if ( v1 != result )
{
result = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find<glm::vec<3,int,(glm::qualifier)0>>(
v1 + 8,
(char *)this + 8232);
v10 = result;
if ( result != *(_QWORD *)(v1 + 16) + 72LL * *(int *)(v1 + 40) )
{
chunk = (Chunk *)Dimension::create_chunk(*((_QWORD *)this + 4), (char *)this + 8232);
Chunk::set_voxels(chunk, (WorldgenTask *)((char *)this + 40));
if ( aggressive_caching == 1 )
{
v4 = *((_QWORD *)this + 4) + 8LL;
entity = Chunk::get_entity(chunk);
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace<InhabitedComponent>(v4, entity);
}
v11[1] = 0LL;
v11[0] = &off_107420;
memcpy(v13, (char *)this + 40, 0x2000LL);
v11[2] = *((_QWORD *)this + 1029);
v12 = *((_DWORD *)this + 2060);
v7 = protocol::encode((protocol *)v11, (const protocol::ChunkVoxels *)((char *)&dword_0 + 1), v6);
v8 = (_QWORD *)(v10 + 32);
while ( 1 )
{
v8 = (_QWORD *)*v8;
if ( !v8 )
break;
v9 = *(_QWORD *)(v8[1] + 64LL);
if ( v9 )
enet_peer_send(v9, 0LL, v7);
}
result = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::erase(v1 + 8);
if ( !*(_DWORD *)(v1 + 40) )
return emhash8::HashMap<Dimension *,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session *>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension *>,std::equal_to<Dimension *>>::erase(&active_tasks);
}
}
return result;
}
| finalize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2038
MOV R12,RDI
LEA RBP,[RDI + 0x20]
LEA RDI,[0x20dea8]
MOV RSI,RBP
CALL 0x001331f6
MOV RBX,RAX
MOVSXD RAX,dword ptr [0x0020dec8]
IMUL RAX,RAX,0x38
ADD RAX,qword ptr [0x0020deb0]
CMP RBX,RAX
JZ 0x00133025
MOV R14,RBX
ADD R14,0x8
LEA R13,[R12 + 0x2028]
MOV RDI,R14
MOV RSI,R13
CALL 0x0013320c
MOVSXD RCX,dword ptr [RBX + 0x28]
IMUL RCX,RCX,0x48
ADD RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,RCX
JZ 0x00133025
MOV RDI,qword ptr [R12 + 0x20]
MOV RSI,R13
CALL 0x001385e4
MOV R15,RAX
ADD R12,0x28
MOV RDI,RAX
MOV RSI,R12
CALL 0x00134c46
CMP byte ptr [0x0020ded8],0x1
JNZ 0x00132f89
MOV RBP,qword ptr [RBP]
ADD RBP,0x8
MOV RDI,R15
CALL 0x00134c64
MOV RDI,RBP
MOV ESI,EAX
CALL 0x00133222
LAB_00132f89:
LEA R15,[RSP + 0x34]
AND qword ptr [R15 + -0x14],0x0
LEA RAX,[0x207420]
MOV qword ptr [R15 + -0x1c],RAX
MOV EDX,0x2000
MOV RDI,R15
MOV RSI,R12
CALL 0x001175d0
MOV RAX,qword ptr [R13]
MOV qword ptr [R15 + -0xc],RAX
MOV EAX,dword ptr [R13 + 0x8]
MOV dword ptr [R15 + -0x4],EAX
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RSI
CALL 0x0013fbe8
MOV R12,RAX
MOV R13,qword ptr [RSP + 0x8]
MOV R15,R13
ADD R15,0x20
LAB_00132fda:
MOV R15,qword ptr [R15]
TEST R15,R15
JZ 0x00132ffb
MOV RAX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RAX + 0x40]
TEST RDI,RDI
JZ 0x00132fda
XOR ESI,ESI
MOV RDX,R12
CALL 0x00192415
JMP 0x00132fda
LAB_00132ffb:
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R13
MOV RDI,R14
CALL 0x00133272
CMP dword ptr [RBX + 0x28],0x0
JNZ 0x00133025
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
LEA RDI,[0x20dea8]
CALL 0x001332c2
LAB_00133025:
ADD RSP,0x2038
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WorldgenTask::finalize() */
void __thiscall WorldgenTask::finalize(WorldgenTask *this)
{
vec *pvVar1;
Dimension *pDVar2;
int4 uVar3;
long lVar4;
long lVar5;
Chunk *this_00;
int8 uVar6;
long *plVar7;
long local_2058;
int **local_2050;
int8 local_2048;
int8 local_2040;
int4 local_2038;
int1 local_2034 [8196];
lVar4 = emhash8::
HashMap<Dimension*,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension*>,std::equal_to<Dimension*>>
::find<Dimension*>((HashMap<Dimension*,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension*>,std::equal_to<Dimension*>>
*)active_tasks,(Dimension **)(this + 0x20));
if (lVar4 != (long)(int)active_tasks._32_4_ * 0x38 + active_tasks._8_8_) {
pvVar1 = (vec *)(this + 0x2028);
lVar5 = emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::find<glm::vec<3,int,(glm::qualifier)0>>
((HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(lVar4 + 8),pvVar1);
if (lVar5 != (long)*(int *)(lVar4 + 0x28) * 0x48 + *(long *)(lVar4 + 0x10)) {
this_00 = (Chunk *)Dimension::create_chunk(*(Dimension **)(this + 0x20),pvVar1);
Chunk::set_voxels(this_00,(VoxelStorage *)(this + 0x28));
if (aggressive_caching == '\x01') {
pDVar2 = *(Dimension **)(this + 0x20);
uVar3 = Chunk::get_entity(this_00);
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace<InhabitedComponent>
((basic_registry<entt::entity,std::allocator<entt::entity>> *)(pDVar2 + 8),uVar3);
}
local_2048 = 0;
local_2050 = &PTR__Base_00207420;
memcpy(local_2034,(VoxelStorage *)(this + 0x28),0x2000);
local_2040 = *(int8 *)pvVar1;
local_2038 = *(int4 *)(this + 0x2030);
uVar6 = protocol::encode((ChunkVoxels *)&local_2050,1);
plVar7 = (long *)(lVar5 + 0x20);
while (plVar7 = (long *)*plVar7, plVar7 != (long *)0x0) {
if (*(long *)(plVar7[1] + 0x40) != 0) {
enet_peer_send(*(long *)(plVar7[1] + 0x40),0,uVar6);
}
}
local_2058 = lVar5;
emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::erase((HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(lVar4 + 8),(const_iterator *)&local_2058);
if (*(int *)(lVar4 + 0x28) == 0) {
local_2058 = lVar4;
emhash8::
HashMap<Dimension*,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension*>,std::equal_to<Dimension*>>
::erase((HashMap<Dimension*,emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,std::unordered_set<Session*,std::hash<Session*>,std::equal_to<Session*>,std::allocator<Session*>>,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>,std::hash<Dimension*>,std::equal_to<Dimension*>>
*)active_tasks,(const_iterator *)&local_2058);
}
}
}
return;
}
|
|
1,578 | lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | dmazzella[P]pylunasvg/lunasvg/source/svglayoutstate.cpp | static bool parseUrlValue(std::string_view& input, std::string& value)
{
if(!skipString(input, "url")
|| !skipOptionalSpaces(input)
|| !skipDelimiter(input, '(')
|| !skipOptionalSpaces(input)) {
return false;
}
switch(input.front()) {
case '\'':
case '\"': {
auto delim = input.front();
input.remove_prefix(1);
skipOptionalSpaces(input);
if(!skipDelimiter(input, '#'))
return false;
while(!input.empty() && input.front() != delim) {
value += input.front();
input.remove_prefix(1);
}
skipOptionalSpaces(input);
if(!skipDelimiter(input, delim))
return false;
break;
} case '#': {
input.remove_prefix(1);
while(!input.empty() && input.front() != ')') {
value += input.front();
input.remove_prefix(1);
}
break;
} default:
return false;
}
return skipOptionalSpaces(input) && skipDelimiter(input, ')');
} | O0 | cpp | lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x5aa2d(%rip), %rsi # 0x8ca90
callq 0x33260
movq -0x38(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x33360
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x2a(%rbp)
jne 0x32083
jmp 0x320c4
movq -0x10(%rbp), %rdi
callq 0x332b0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x2a(%rbp)
jne 0x3209a
jmp 0x320c4
movq -0x10(%rbp), %rdi
movl $0x28, %esi
callq 0x33420
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x2a(%rbp)
jne 0x320b6
jmp 0x320c4
movq -0x10(%rbp), %rdi
callq 0x332b0
xorb $-0x1, %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x320cd
jmp 0x320d6
movb $0x0, -0x1(%rbp)
jmp 0x3226c
movq -0x10(%rbp), %rdi
callq 0x20640
movsbl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x22, %eax
je 0x32108
jmp 0x320ec
movl -0x3c(%rbp), %eax
subl $0x23, %eax
je 0x321cc
jmp 0x320fa
movl -0x3c(%rbp), %eax
subl $0x27, %eax
jne 0x32236
jmp 0x32108
movq -0x10(%rbp), %rdi
callq 0x20640
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x231b0
movq -0x10(%rbp), %rdi
callq 0x332b0
movq -0x10(%rbp), %rdi
movl $0x23, %esi
callq 0x33420
testb $0x1, %al
jne 0x32148
movb $0x0, -0x1(%rbp)
jmp 0x3226c
jmp 0x3214a
movq -0x10(%rbp), %rdi
callq 0x20620
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x3d(%rbp)
jne 0x32177
movq -0x10(%rbp), %rdi
callq 0x20640
movsbl (%rax), %eax
movsbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x32180
jmp 0x321a7
movq -0x10(%rbp), %rdi
callq 0x20640
movb (%rax), %al
movq -0x18(%rbp), %rdi
movsbl %al, %esi
callq 0xb200
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x231b0
jmp 0x3214a
movq -0x10(%rbp), %rdi
callq 0x332b0
movq -0x10(%rbp), %rdi
movsbl -0x29(%rbp), %esi
callq 0x33420
testb $0x1, %al
jne 0x321ca
movb $0x0, -0x1(%rbp)
jmp 0x3226c
jmp 0x3223c
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x231b0
movq -0x10(%rbp), %rdi
callq 0x20620
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x3e(%rbp)
jne 0x32204
movq -0x10(%rbp), %rdi
callq 0x20640
movsbl (%rax), %eax
cmpl $0x29, %eax
setne %al
movb %al, -0x3e(%rbp)
movb -0x3e(%rbp), %al
testb $0x1, %al
jne 0x3220d
jmp 0x32234
movq -0x10(%rbp), %rdi
callq 0x20640
movb (%rax), %al
movq -0x18(%rbp), %rdi
movsbl %al, %esi
callq 0xb200
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x231b0
jmp 0x321da
jmp 0x3223c
movb $0x0, -0x1(%rbp)
jmp 0x3226c
movq -0x10(%rbp), %rdi
callq 0x332b0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x3f(%rbp)
jne 0x32253
jmp 0x32264
movq -0x10(%rbp), %rdi
movl $0x29, %esi
callq 0x33420
movb %al, -0x3f(%rbp)
movb -0x3f(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN7lunasvgL13parseUrlValueERSt17basic_string_viewIcSt11char_traitsIcEERNSt7__cxx1112basic_stringIcS2_SaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
lea rdi, [rbp+var_28]
lea rsi, aUrl; "url"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_28]
call _ZN7lunasvg10skipStringERSt17basic_string_viewIcSt11char_traitsIcEERKS3_; lunasvg::skipString(std::string_view &,std::string_view const&)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_2A], al
jnz short loc_32083
jmp short loc_320C4
loc_32083:
mov rdi, [rbp+var_10]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_2A], al
jnz short loc_3209A
jmp short loc_320C4
loc_3209A:
mov rdi, [rbp+var_10]
mov esi, 28h ; '('
call _ZN7lunasvg13skipDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipDelimiter(std::string_view &,char)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_2A], al
jnz short loc_320B6
jmp short loc_320C4
loc_320B6:
mov rdi, [rbp+var_10]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
xor al, 0FFh
mov [rbp+var_2A], al
loc_320C4:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_320CD
jmp short loc_320D6
loc_320CD:
mov [rbp+var_1], 0
jmp loc_3226C
loc_320D6:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
movsx eax, byte ptr [rax]
mov [rbp+var_3C], eax
sub eax, 22h ; '"'
jz short loc_32108
jmp short $+2
loc_320EC:
mov eax, [rbp+var_3C]
sub eax, 23h ; '#'
jz loc_321CC
jmp short $+2
loc_320FA:
mov eax, [rbp+var_3C]
sub eax, 27h ; '''
jnz loc_32236
jmp short $+2
loc_32108:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
mov al, [rax]
mov [rbp+var_29], al
mov rdi, [rbp+var_10]
mov esi, 1
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
mov rdi, [rbp+var_10]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
mov rdi, [rbp+var_10]
mov esi, 23h ; '#'
call _ZN7lunasvg13skipDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipDelimiter(std::string_view &,char)
test al, 1
jnz short loc_32148
mov [rbp+var_1], 0
jmp loc_3226C
loc_32148:
jmp short $+2
loc_3214A:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_3D], al
jnz short loc_32177
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_29]
cmp eax, ecx
setnz al
mov [rbp+var_3D], al
loc_32177:
mov al, [rbp+var_3D]
test al, 1
jnz short loc_32180
jmp short loc_321A7
loc_32180:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
mov al, [rax]
mov rdi, [rbp+var_18]
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
mov rdi, [rbp+var_10]
mov esi, 1
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
jmp short loc_3214A
loc_321A7:
mov rdi, [rbp+var_10]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
mov rdi, [rbp+var_10]
movsx esi, [rbp+var_29]
call _ZN7lunasvg13skipDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipDelimiter(std::string_view &,char)
test al, 1
jnz short loc_321CA
mov [rbp+var_1], 0
jmp loc_3226C
loc_321CA:
jmp short loc_3223C
loc_321CC:
mov rdi, [rbp+var_10]
mov esi, 1
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
loc_321DA:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_3E], al
jnz short loc_32204
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
movsx eax, byte ptr [rax]
cmp eax, 29h ; ')'
setnz al
mov [rbp+var_3E], al
loc_32204:
mov al, [rbp+var_3E]
test al, 1
jnz short loc_3220D
jmp short loc_32234
loc_3220D:
mov rdi, [rbp+var_10]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
mov al, [rax]
mov rdi, [rbp+var_18]
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
mov rdi, [rbp+var_10]
mov esi, 1
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
jmp short loc_321DA
loc_32234:
jmp short loc_3223C
loc_32236:
mov [rbp+var_1], 0
jmp short loc_3226C
loc_3223C:
mov rdi, [rbp+var_10]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_3F], al
jnz short loc_32253
jmp short loc_32264
loc_32253:
mov rdi, [rbp+var_10]
mov esi, 29h ; ')'
call _ZN7lunasvg13skipDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipDelimiter(std::string_view &,char)
mov [rbp+var_3F], al
loc_32264:
mov al, [rbp+var_3F]
and al, 1
mov [rbp+var_1], al
loc_3226C:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
| char lunasvg::parseUrlValue(_QWORD *a1, long long a2)
{
char *v2; // rax
char *v3; // rax
char v5; // [rsp+1h] [rbp-3Fh]
bool v6; // [rsp+2h] [rbp-3Eh]
bool v7; // [rsp+3h] [rbp-3Dh]
int v8; // [rsp+4h] [rbp-3Ch]
char v9; // [rsp+16h] [rbp-2Ah]
char v10; // [rsp+17h] [rbp-29h]
_BYTE v11[16]; // [rsp+18h] [rbp-28h] BYREF
long long v12; // [rsp+28h] [rbp-18h]
_QWORD *v13; // [rsp+30h] [rbp-10h]
v13 = a1;
v12 = a2;
std::string_view::basic_string_view(v11, "url");
v9 = 1;
if ( (lunasvg::skipString(a1, v11) & 1) != 0 )
{
v9 = 1;
if ( (lunasvg::skipOptionalSpaces(v13) & 1) != 0 )
{
v9 = 1;
if ( (lunasvg::skipDelimiter(v13, 40LL) & 1) != 0 )
v9 = ~(unsigned __int8)lunasvg::skipOptionalSpaces(v13);
}
}
if ( (v9 & 1) != 0 )
return 0;
v8 = *(char *)std::string_view::front((long long)v13);
if ( v8 == 34 )
goto LABEL_10;
if ( v8 != 35 )
{
if ( v8 != 39 )
return 0;
LABEL_10:
v10 = *(_BYTE *)std::string_view::front((long long)v13);
std::string_view::remove_prefix(v13, 1LL);
lunasvg::skipOptionalSpaces(v13);
if ( (lunasvg::skipDelimiter(v13, 35LL) & 1) == 0 )
return 0;
while ( 1 )
{
v7 = 0;
if ( !std::string_view::empty(v13) )
v7 = *(char *)std::string_view::front((long long)v13) != v10;
if ( !v7 )
break;
v2 = (char *)std::string_view::front((long long)v13);
std::string::operator+=(v12, (unsigned int)*v2);
std::string_view::remove_prefix(v13, 1LL);
}
lunasvg::skipOptionalSpaces(v13);
if ( (lunasvg::skipDelimiter(v13, (unsigned int)v10) & 1) == 0 )
return 0;
goto LABEL_26;
}
std::string_view::remove_prefix(v13, 1LL);
while ( 1 )
{
v6 = 0;
if ( !std::string_view::empty(v13) )
v6 = *(_BYTE *)std::string_view::front((long long)v13) != 41;
if ( !v6 )
break;
v3 = (char *)std::string_view::front((long long)v13);
std::string::operator+=(v12, (unsigned int)*v3);
std::string_view::remove_prefix(v13, 1LL);
}
LABEL_26:
v5 = 0;
if ( (lunasvg::skipOptionalSpaces(v13) & 1) != 0 )
v5 = lunasvg::skipDelimiter(v13, 41LL);
return v5 & 1;
}
| parseUrlValue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x28]
LEA RSI,[0x18ca90]
CALL 0x00133260
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x28]
CALL 0x00133360
MOV CL,AL
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0x2a],AL
JNZ 0x00132083
JMP 0x001320c4
LAB_00132083:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001332b0
MOV CL,AL
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0x2a],AL
JNZ 0x0013209a
JMP 0x001320c4
LAB_0013209a:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x28
CALL 0x00133420
MOV CL,AL
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0x2a],AL
JNZ 0x001320b6
JMP 0x001320c4
LAB_001320b6:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001332b0
XOR AL,0xff
MOV byte ptr [RBP + -0x2a],AL
LAB_001320c4:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x001320cd
JMP 0x001320d6
LAB_001320cd:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013226c
LAB_001320d6:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
SUB EAX,0x22
JZ 0x00132108
JMP 0x001320ec
LAB_001320ec:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x23
JZ 0x001321cc
JMP 0x001320fa
LAB_001320fa:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x27
JNZ 0x00132236
JMP 0x00132108
LAB_00132108:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x29],AL
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001231b0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001332b0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x23
CALL 0x00133420
TEST AL,0x1
JNZ 0x00132148
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013226c
LAB_00132148:
JMP 0x0013214a
LAB_0013214a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120620
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x3d],AL
JNZ 0x00132177
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x3d],AL
LAB_00132177:
MOV AL,byte ptr [RBP + -0x3d]
TEST AL,0x1
JNZ 0x00132180
JMP 0x001321a7
LAB_00132180:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOV AL,byte ptr [RAX]
MOV RDI,qword ptr [RBP + -0x18]
MOVSX ESI,AL
CALL 0x0010b200
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001231b0
JMP 0x0013214a
LAB_001321a7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001332b0
MOV RDI,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RBP + -0x29]
CALL 0x00133420
TEST AL,0x1
JNZ 0x001321ca
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013226c
LAB_001321ca:
JMP 0x0013223c
LAB_001321cc:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001231b0
LAB_001321da:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120620
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x3e],AL
JNZ 0x00132204
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x29
SETNZ AL
MOV byte ptr [RBP + -0x3e],AL
LAB_00132204:
MOV AL,byte ptr [RBP + -0x3e]
TEST AL,0x1
JNZ 0x0013220d
JMP 0x00132234
LAB_0013220d:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00120640
MOV AL,byte ptr [RAX]
MOV RDI,qword ptr [RBP + -0x18]
MOVSX ESI,AL
CALL 0x0010b200
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001231b0
JMP 0x001321da
LAB_00132234:
JMP 0x0013223c
LAB_00132236:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013226c
LAB_0013223c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001332b0
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x3f],AL
JNZ 0x00132253
JMP 0x00132264
LAB_00132253:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x29
CALL 0x00133420
MOV byte ptr [RBP + -0x3f],AL
LAB_00132264:
MOV AL,byte ptr [RBP + -0x3f]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0013226c:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char> >&,
std::__cxx11::string&) */
byte lunasvg::parseUrlValue(basic_string_view *param_1,string *param_2)
{
char cVar1;
byte extraout_AL;
uint uVar2;
ulong uVar3;
char *pcVar4;
bool bVar5;
byte local_47;
byte local_32;
basic_string_view<char,std::char_traits<char>> local_30 [16];
string *local_20;
basic_string_view *local_18;
local_20 = param_2;
local_18 = param_1;
std::basic_string_view<char,std::char_traits<char>>::basic_string_view(local_30,"url");
uVar3 = skipString(param_1,(basic_string_view *)local_30);
local_32 = 1;
if ((uVar3 & 1) != 0) {
uVar3 = skipOptionalSpaces(local_18);
local_32 = 1;
if ((uVar3 & 1) != 0) {
uVar3 = skipDelimiter(local_18,'(');
local_32 = 1;
if ((uVar3 & 1) != 0) {
skipOptionalSpaces(local_18);
local_32 = extraout_AL ^ 0xff;
}
}
}
if ((local_32 & 1) != 0) {
return 0;
}
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
cVar1 = *pcVar4;
if (cVar1 != '\"') {
if (cVar1 == '#') {
std::basic_string_view<char,std::char_traits<char>>::remove_prefix
((basic_string_view<char,std::char_traits<char>> *)local_18,1);
while( true ) {
uVar2 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)local_18);
bVar5 = false;
if ((uVar2 & 1) == 0) {
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
bVar5 = *pcVar4 != ')';
}
if (!bVar5) break;
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
std::__cxx11::string::operator+=(local_20,*pcVar4);
std::basic_string_view<char,std::char_traits<char>>::remove_prefix
((basic_string_view<char,std::char_traits<char>> *)local_18,1);
}
goto LAB_0013223c;
}
if (cVar1 != '\'') {
return 0;
}
}
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
cVar1 = *pcVar4;
std::basic_string_view<char,std::char_traits<char>>::remove_prefix
((basic_string_view<char,std::char_traits<char>> *)local_18,1);
skipOptionalSpaces(local_18);
uVar3 = skipDelimiter(local_18,'#');
if ((uVar3 & 1) == 0) {
return 0;
}
while( true ) {
uVar2 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)local_18);
bVar5 = false;
if ((uVar2 & 1) == 0) {
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
bVar5 = *pcVar4 != cVar1;
}
if (!bVar5) break;
pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)local_18);
std::__cxx11::string::operator+=(local_20,*pcVar4);
std::basic_string_view<char,std::char_traits<char>>::remove_prefix
((basic_string_view<char,std::char_traits<char>> *)local_18,1);
}
skipOptionalSpaces(local_18);
uVar3 = skipDelimiter(local_18,cVar1);
if ((uVar3 & 1) == 0) {
return 0;
}
LAB_0013223c:
uVar2 = skipOptionalSpaces(local_18);
local_47 = 0;
if ((uVar2 & 1) != 0) {
local_47 = skipDelimiter(local_18,')');
}
return local_47 & 1;
}
|
|
1,579 | lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | dmazzella[P]pylunasvg/lunasvg/source/svglayoutstate.cpp | static bool parseUrlValue(std::string_view& input, std::string& value)
{
if(!skipString(input, "url")
|| !skipOptionalSpaces(input)
|| !skipDelimiter(input, '(')
|| !skipOptionalSpaces(input)) {
return false;
}
switch(input.front()) {
case '\'':
case '\"': {
auto delim = input.front();
input.remove_prefix(1);
skipOptionalSpaces(input);
if(!skipDelimiter(input, '#'))
return false;
while(!input.empty() && input.front() != delim) {
value += input.front();
input.remove_prefix(1);
}
skipOptionalSpaces(input);
if(!skipDelimiter(input, delim))
return false;
break;
} case '#': {
input.remove_prefix(1);
while(!input.empty() && input.front() != ')') {
value += input.front();
input.remove_prefix(1);
}
break;
} default:
return false;
}
return skipOptionalSpaces(input) && skipDelimiter(input, ')');
} | O3 | cpp | lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq $0x3, (%rsi)
leaq 0x2d2d4(%rip), %rax # 0x43b00
movq %rax, 0x8(%rsi)
callq 0x16b6f
testb %al, %al
je 0x16888
movq (%rbx), %rax
testq %rax, %rax
je 0x16888
movq 0x8(%rbx), %rdx
leaq -0x1(%rax), %rcx
movq %rax, %rdi
negq %rdi
xorl %esi, %esi
movabsq $0x100002600, %r15 # imm = 0x100002600
movzbl (%rdx,%rsi), %r8d
cmpq $0x28, %r8
ja 0x16888
btq %r8, %r15
jae 0x16895
leaq (%rdx,%rsi), %r8
incq %r8
movq %r8, 0x8(%rbx)
movq %rcx, (%rbx)
incq %rsi
decq %rcx
movq %rdi, %r8
addq %rsi, %r8
jne 0x1685b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x28, %r8
jne 0x16888
leaq (%rdx,%rsi), %rdi
incq %rdi
movq %rdi, 0x8(%rbx)
movq %rsi, %rdi
subq %rax, %rdi
movq %rcx, (%rbx)
incq %rdi
je 0x16888
movq $-0x2, %rcx
subq %rsi, %rcx
leaq -0x1(%rax), %rdi
movzbl 0x1(%rdx,%rsi), %r8d
cmpq $0x20, %r8
ja 0x168f4
btq %r8, %r15
jae 0x168f4
leaq (%rdx,%rsi), %r8
addq $0x2, %r8
movq %r8, 0x8(%rbx)
leaq (%rax,%rcx), %r8
movq %r8, (%rbx)
incq %rsi
decq %rcx
cmpq %rsi, %rdi
jne 0x168c2
jmp 0x16888
movzbl 0x1(%rdx,%rsi), %ebp
cmpl $0x22, %ebp
je 0x16956
cmpl $0x27, %ebp
je 0x16956
cmpl $0x23, %ebp
jne 0x16888
addq %rsi, %rdx
addq $0x2, %rdx
movq %rdx, 0x8(%rbx)
addq %rax, %rcx
addq $-0x2, %rax
movq %rcx, (%rbx)
cmpq %rsi, %rax
je 0x16888
movb (%rdx), %al
cmpb $0x29, %al
je 0x16a3f
movsbl %al, %esi
movq %r14, %rdi
callq 0xa290
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
incq %rdx
movq %rdx, 0x8(%rbx)
decq %rcx
movq %rcx, (%rbx)
jne 0x16926
jmp 0x16888
leaq (%rdx,%rsi), %rdi
addq $0x2, %rdi
movq %rdi, 0x8(%rbx)
addq %rax, %rcx
leaq -0x2(%rax), %rdi
movq %rcx, (%rbx)
cmpq %rsi, %rdi
je 0x16888
subq %rsi, %rax
addq $-0x3, %rax
addq %rsi, %rdx
addq $0x3, %rdx
movq %rax, %rcx
movzbl -0x1(%rdx), %esi
xorl %eax, %eax
cmpq $0x23, %rsi
ja 0x1688a
btq %rsi, %r15
jae 0x169b3
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
incq %rdx
xorl %eax, %eax
addq $-0x1, %rcx
jb 0x16986
jmp 0x1688a
cmpq $0x23, %rsi
jne 0x1688a
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
testq %rcx, %rcx
je 0x16888
movb (%rdx), %al
cmpb %bpl, %al
je 0x169fa
movsbl %al, %esi
movq %r14, %rdi
callq 0xa290
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
incq %rdx
movq %rdx, 0x8(%rbx)
decq %rcx
movq %rcx, (%rbx)
jne 0x169cd
jmp 0x16888
incq %rdx
decq %rcx
cmpb $0x20, %al
ja 0x16a25
movzbl %al, %eax
btq %rax, %r15
jae 0x16a25
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
subq $0x1, %rcx
jb 0x16888
movb (%rdx), %al
incq %rdx
jmp 0x16a00
cmpb %bpl, -0x1(%rdx)
jne 0x16888
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
testq %rcx, %rcx
je 0x16888
incq %rdx
decq %rcx
movzbl -0x1(%rdx), %esi
xorl %eax, %eax
cmpq $0x29, %rsi
ja 0x1688a
btq %rsi, %r15
jae 0x16a72
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
incq %rdx
xorl %eax, %eax
addq $-0x1, %rcx
jb 0x16a45
jmp 0x1688a
cmpq $0x29, %rsi
jne 0x1688a
movq %rdx, 0x8(%rbx)
movq %rcx, (%rbx)
movb $0x1, %al
jmp 0x1688a
| _ZN7lunasvgL13parseUrlValueERSt17basic_string_viewIcSt11char_traitsIcEERNSt7__cxx1112basic_stringIcS2_SaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_30]
mov qword ptr [rsi], 3
lea rax, aUrl; "url"
mov [rsi+8], rax
call _ZN7lunasvg10skipStringERSt17basic_string_viewIcSt11char_traitsIcEERKS3_; lunasvg::skipString(std::string_view &,std::string_view const&)
test al, al
jz short loc_16888
mov rax, [rbx]
test rax, rax
jz short loc_16888
mov rdx, [rbx+8]
lea rcx, [rax-1]
mov rdi, rax
neg rdi
xor esi, esi
mov r15, 100002600h
loc_1685B:
movzx r8d, byte ptr [rdx+rsi]
cmp r8, 28h ; '('
ja short loc_16888
bt r15, r8
jnb short loc_16895
lea r8, [rdx+rsi]
inc r8
mov [rbx+8], r8
mov [rbx], rcx
inc rsi
dec rcx
mov r8, rdi
add r8, rsi
jnz short loc_1685B
loc_16888:
xor eax, eax
loc_1688A:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_16895:
cmp r8, 28h ; '('
jnz short loc_16888
lea rdi, [rdx+rsi]
inc rdi
mov [rbx+8], rdi
mov rdi, rsi
sub rdi, rax
mov [rbx], rcx
inc rdi
jz short loc_16888
mov rcx, 0FFFFFFFFFFFFFFFEh
sub rcx, rsi
lea rdi, [rax-1]
loc_168C2:
movzx r8d, byte ptr [rdx+rsi+1]
cmp r8, 20h ; ' '
ja short loc_168F4
bt r15, r8
jnb short loc_168F4
lea r8, [rdx+rsi]
add r8, 2
mov [rbx+8], r8
lea r8, [rax+rcx]
mov [rbx], r8
inc rsi
dec rcx
cmp rdi, rsi
jnz short loc_168C2
jmp short loc_16888
loc_168F4:
movzx ebp, byte ptr [rdx+rsi+1]
cmp ebp, 22h ; '"'
jz short loc_16956
cmp ebp, 27h ; '''
jz short loc_16956
cmp ebp, 23h ; '#'
jnz short loc_16888
add rdx, rsi
add rdx, 2
mov [rbx+8], rdx
add rcx, rax
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbx], rcx
cmp rax, rsi
jz loc_16888
loc_16926:
mov al, [rdx]
cmp al, 29h ; ')'
jz loc_16A3F
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rcx, [rbx]
mov rdx, [rbx+8]
inc rdx
mov [rbx+8], rdx
dec rcx
mov [rbx], rcx
jnz short loc_16926
jmp loc_16888
loc_16956:
lea rdi, [rdx+rsi]
add rdi, 2
mov [rbx+8], rdi
add rcx, rax
lea rdi, [rax-2]
mov [rbx], rcx
cmp rdi, rsi
jz loc_16888
sub rax, rsi
add rax, 0FFFFFFFFFFFFFFFDh
add rdx, rsi
add rdx, 3
mov rcx, rax
loc_16986:
movzx esi, byte ptr [rdx-1]
xor eax, eax
cmp rsi, 23h ; '#'
ja loc_1688A
bt r15, rsi
jnb short loc_169B3
mov [rbx+8], rdx
mov [rbx], rcx
inc rdx
xor eax, eax
add rcx, 0FFFFFFFFFFFFFFFFh
jb short loc_16986
jmp loc_1688A
loc_169B3:
cmp rsi, 23h ; '#'
jnz loc_1688A
mov [rbx+8], rdx
mov [rbx], rcx
test rcx, rcx
jz loc_16888
loc_169CD:
mov al, [rdx]
cmp al, bpl
jz short loc_169FA
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rcx, [rbx]
mov rdx, [rbx+8]
inc rdx
mov [rbx+8], rdx
dec rcx
mov [rbx], rcx
jnz short loc_169CD
jmp loc_16888
loc_169FA:
inc rdx
dec rcx
loc_16A00:
cmp al, 20h ; ' '
ja short loc_16A25
movzx eax, al
bt r15, rax
jnb short loc_16A25
mov [rbx+8], rdx
mov [rbx], rcx
sub rcx, 1
jb loc_16888
mov al, [rdx]
inc rdx
jmp short loc_16A00
loc_16A25:
cmp [rdx-1], bpl
jnz loc_16888
mov [rbx+8], rdx
mov [rbx], rcx
test rcx, rcx
jz loc_16888
loc_16A3F:
inc rdx
dec rcx
loc_16A45:
movzx esi, byte ptr [rdx-1]
xor eax, eax
cmp rsi, 29h ; ')'
ja loc_1688A
bt r15, rsi
jnb short loc_16A72
mov [rbx+8], rdx
mov [rbx], rcx
inc rdx
xor eax, eax
add rcx, 0FFFFFFFFFFFFFFFFh
jb short loc_16A45
jmp loc_1688A
loc_16A72:
cmp rsi, 29h ; ')'
jnz loc_1688A
mov [rbx+8], rdx
mov [rbx], rcx
mov al, 1
jmp loc_1688A
| char lunasvg::parseUrlValue(long long *a1, long long a2)
{
long long v3; // rax
long long v4; // rdx
long long v5; // rcx
long long v6; // rsi
long long v7; // r15
unsigned long long v8; // r8
char result; // al
long long i; // rcx
unsigned long long v11; // r8
int v12; // ebp
unsigned __int8 *v13; // rdx
long long v14; // rcx
long long v15; // rcx
unsigned __int8 *v16; // rdx
long long v17; // rcx
unsigned long long v18; // rsi
bool v19; // cf
unsigned __int8 v20; // al
long long v21; // rcx
_BYTE *v22; // rdx
long long v23; // rcx
unsigned long long v24; // rsi
_QWORD v25[6]; // [rsp+8h] [rbp-30h] BYREF
v25[0] = 3LL;
v25[1] = "url";
if ( (unsigned __int8)lunasvg::skipString(a1, v25) )
{
v3 = *a1;
if ( *a1 )
{
v4 = a1[1];
v5 = v3 - 1;
v6 = 0LL;
v7 = 0x100002600LL;
do
{
v8 = *(unsigned __int8 *)(v4 + v6);
if ( v8 > 0x28 )
break;
if ( !_bittest64(&v7, v8) )
{
if ( v8 != 40 )
return 0;
a1[1] = v4 + v6 + 1;
*a1 = v5;
if ( v6 - v3 == -1 )
return 0;
for ( i = -2 - v6; ; --i )
{
v11 = *(unsigned __int8 *)(v4 + v6 + 1);
if ( v11 > 0x20 || !_bittest64(&v7, v11) )
break;
a1[1] = v4 + v6 + 2;
*a1 = v3 + i;
if ( v3 - 1 == ++v6 )
return 0;
}
v12 = *(unsigned __int8 *)(v4 + v6 + 1);
if ( v12 == 34 || v12 == 39 )
{
a1[1] = v4 + v6 + 2;
*a1 = v3 + i;
if ( v3 - 2 == v6 )
return 0;
v16 = (unsigned __int8 *)(v6 + v4 + 3);
v17 = v3 - v6 - 3;
while ( 1 )
{
v18 = *(v16 - 1);
result = 0;
if ( v18 > 0x23 )
break;
if ( !_bittest64(&v7, v18) )
{
if ( v18 != 35 )
return result;
a1[1] = (long long)v16;
*a1 = v17;
if ( !v17 )
return 0;
while ( 1 )
{
v20 = *v16;
if ( *v16 == (_BYTE)v12 )
break;
std::string::push_back(a2, (unsigned int)(char)v20);
v21 = *a1;
v16 = (unsigned __int8 *)(a1[1] + 1);
a1[1] = (long long)v16;
v17 = v21 - 1;
*a1 = v17;
if ( !v17 )
return 0;
}
v13 = v16 + 1;
v14 = v17 - 1;
while ( v20 <= 0x20u && _bittest64(&v7, v20) )
{
a1[1] = (long long)v13;
*a1 = v14;
v19 = v14-- == 0;
if ( v19 )
return 0;
v20 = *v13++;
}
if ( *(v13 - 1) != (_BYTE)v12 )
return 0;
a1[1] = (long long)v13;
*a1 = v14;
if ( !v14 )
return 0;
goto LABEL_41;
}
a1[1] = (long long)v16;
*a1 = v17;
++v16;
result = 0;
v19 = v17-- != 0;
if ( !v19 )
return result;
}
}
else
{
if ( v12 != 35 )
return 0;
v13 = (unsigned __int8 *)(v6 + v4 + 2);
a1[1] = (long long)v13;
v14 = v3 + i;
*a1 = v14;
if ( v3 - 2 == v6 )
return 0;
while ( *v13 != 41 )
{
std::string::push_back(a2, (unsigned int)(char)*v13);
v15 = *a1;
v13 = (unsigned __int8 *)(a1[1] + 1);
a1[1] = (long long)v13;
v14 = v15 - 1;
*a1 = v14;
if ( !v14 )
return 0;
}
LABEL_41:
v22 = v13 + 1;
v23 = v14 - 1;
while ( 1 )
{
v24 = (unsigned __int8)*(v22 - 1);
result = 0;
if ( v24 > 0x29 )
break;
if ( !_bittest64(&v7, v24) )
{
if ( v24 == 41 )
{
a1[1] = (long long)v22;
*a1 = v23;
return 1;
}
return result;
}
a1[1] = (long long)v22;
*a1 = v23;
++v22;
result = 0;
v19 = v23-- != 0;
if ( !v19 )
return result;
}
}
return result;
}
a1[1] = v4 + v6 + 1;
*a1 = v5;
++v6;
--v5;
}
while ( v6 != v3 );
}
}
return 0;
}
| parseUrlValue:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],0x3
LEA RAX,[0x143b00]
MOV qword ptr [RSI + 0x8],RAX
CALL 0x00116b6f
TEST AL,AL
JZ 0x00116888
MOV RAX,qword ptr [RBX]
TEST RAX,RAX
JZ 0x00116888
MOV RDX,qword ptr [RBX + 0x8]
LEA RCX,[RAX + -0x1]
MOV RDI,RAX
NEG RDI
XOR ESI,ESI
MOV R15,0x100002600
LAB_0011685b:
MOVZX R8D,byte ptr [RDX + RSI*0x1]
CMP R8,0x28
JA 0x00116888
BT R15,R8
JNC 0x00116895
LEA R8,[RDX + RSI*0x1]
INC R8
MOV qword ptr [RBX + 0x8],R8
MOV qword ptr [RBX],RCX
INC RSI
DEC RCX
MOV R8,RDI
ADD R8,RSI
JNZ 0x0011685b
LAB_00116888:
XOR EAX,EAX
LAB_0011688a:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00116895:
CMP R8,0x28
JNZ 0x00116888
LEA RDI,[RDX + RSI*0x1]
INC RDI
MOV qword ptr [RBX + 0x8],RDI
MOV RDI,RSI
SUB RDI,RAX
MOV qword ptr [RBX],RCX
INC RDI
JZ 0x00116888
MOV RCX,-0x2
SUB RCX,RSI
LEA RDI,[RAX + -0x1]
LAB_001168c2:
MOVZX R8D,byte ptr [RDX + RSI*0x1 + 0x1]
CMP R8,0x20
JA 0x001168f4
BT R15,R8
JNC 0x001168f4
LEA R8,[RDX + RSI*0x1]
ADD R8,0x2
MOV qword ptr [RBX + 0x8],R8
LEA R8,[RAX + RCX*0x1]
MOV qword ptr [RBX],R8
INC RSI
DEC RCX
CMP RDI,RSI
JNZ 0x001168c2
JMP 0x00116888
LAB_001168f4:
MOVZX EBP,byte ptr [RDX + RSI*0x1 + 0x1]
CMP EBP,0x22
JZ 0x00116956
CMP EBP,0x27
JZ 0x00116956
CMP EBP,0x23
JNZ 0x00116888
ADD RDX,RSI
ADD RDX,0x2
MOV qword ptr [RBX + 0x8],RDX
ADD RCX,RAX
ADD RAX,-0x2
MOV qword ptr [RBX],RCX
CMP RAX,RSI
JZ 0x00116888
LAB_00116926:
MOV AL,byte ptr [RDX]
CMP AL,0x29
JZ 0x00116a3f
MOVSX ESI,AL
MOV RDI,R14
CALL 0x0010a290
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
INC RDX
MOV qword ptr [RBX + 0x8],RDX
DEC RCX
MOV qword ptr [RBX],RCX
JNZ 0x00116926
JMP 0x00116888
LAB_00116956:
LEA RDI,[RDX + RSI*0x1]
ADD RDI,0x2
MOV qword ptr [RBX + 0x8],RDI
ADD RCX,RAX
LEA RDI,[RAX + -0x2]
MOV qword ptr [RBX],RCX
CMP RDI,RSI
JZ 0x00116888
SUB RAX,RSI
ADD RAX,-0x3
ADD RDX,RSI
ADD RDX,0x3
MOV RCX,RAX
LAB_00116986:
MOVZX ESI,byte ptr [RDX + -0x1]
XOR EAX,EAX
CMP RSI,0x23
JA 0x0011688a
BT R15,RSI
JNC 0x001169b3
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
INC RDX
XOR EAX,EAX
ADD RCX,-0x1
JC 0x00116986
JMP 0x0011688a
LAB_001169b3:
CMP RSI,0x23
JNZ 0x0011688a
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
TEST RCX,RCX
JZ 0x00116888
LAB_001169cd:
MOV AL,byte ptr [RDX]
CMP AL,BPL
JZ 0x001169fa
MOVSX ESI,AL
MOV RDI,R14
CALL 0x0010a290
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
INC RDX
MOV qword ptr [RBX + 0x8],RDX
DEC RCX
MOV qword ptr [RBX],RCX
JNZ 0x001169cd
JMP 0x00116888
LAB_001169fa:
INC RDX
DEC RCX
LAB_00116a00:
CMP AL,0x20
JA 0x00116a25
MOVZX EAX,AL
BT R15,RAX
JNC 0x00116a25
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
SUB RCX,0x1
JC 0x00116888
MOV AL,byte ptr [RDX]
INC RDX
JMP 0x00116a00
LAB_00116a25:
CMP byte ptr [RDX + -0x1],BPL
JNZ 0x00116888
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
TEST RCX,RCX
JZ 0x00116888
LAB_00116a3f:
INC RDX
DEC RCX
LAB_00116a45:
MOVZX ESI,byte ptr [RDX + -0x1]
XOR EAX,EAX
CMP RSI,0x29
JA 0x0011688a
BT R15,RSI
JNC 0x00116a72
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
INC RDX
XOR EAX,EAX
ADD RCX,-0x1
JC 0x00116a45
JMP 0x0011688a
LAB_00116a72:
CMP RSI,0x29
JNZ 0x0011688a
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX],RCX
MOV AL,0x1
JMP 0x0011688a
|
/* lunasvg::parseUrlValue(std::basic_string_view<char, std::char_traits<char> >&,
std::__cxx11::string&) */
int8 lunasvg::parseUrlValue(basic_string_view *param_1,string *param_2)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
char cVar5;
long lVar6;
byte *pbVar7;
byte *pbVar8;
long lVar9;
ulong uVar10;
bool bVar11;
int8 local_30;
int *local_28;
local_30 = 3;
local_28 = &DAT_00143b00;
cVar5 = skipString(param_1,(basic_string_view *)&local_30);
if (cVar5 == '\0') {
return 0;
}
lVar3 = *(long *)param_1;
if (lVar3 == 0) {
return 0;
}
lVar4 = *(long *)(param_1 + 8);
lVar9 = 0;
lVar6 = lVar3;
while( true ) {
lVar6 = lVar6 + -1;
uVar10 = (ulong)*(byte *)(lVar4 + lVar9);
if (0x28 < uVar10) {
return 0;
}
if ((0x100002600U >> (uVar10 & 0x3f) & 1) == 0) break;
*(long *)(param_1 + 8) = lVar4 + lVar9 + 1;
*(long *)param_1 = lVar6;
lVar9 = lVar9 + 1;
if (lVar9 == lVar3) {
return 0;
}
}
if (uVar10 != 0x28) {
return 0;
}
*(long *)(param_1 + 8) = lVar4 + lVar9 + 1;
*(long *)param_1 = lVar6;
if (lVar9 - lVar3 == -1) {
return 0;
}
lVar6 = -2 - lVar9;
while ((uVar10 = (ulong)*(byte *)(lVar4 + 1 + lVar9), uVar10 < 0x21 &&
((0x100002600U >> (uVar10 & 0x3f) & 1) != 0))) {
*(long *)(param_1 + 8) = lVar4 + lVar9 + 2;
*(long *)param_1 = lVar3 + lVar6;
lVar9 = lVar9 + 1;
lVar6 = lVar6 + -1;
if (lVar3 + -1 == lVar9) {
return 0;
}
}
bVar2 = *(byte *)(lVar4 + 1 + lVar9);
if ((bVar2 == 0x22) || (bVar2 == 0x27)) {
*(long *)(param_1 + 8) = lVar4 + lVar9 + 2;
*(long *)param_1 = lVar6 + lVar3;
if (lVar3 + -2 == lVar9) {
return 0;
}
lVar6 = (lVar3 - lVar9) + -3;
pbVar8 = (byte *)(lVar4 + lVar9 + 3);
while( true ) {
uVar10 = (ulong)pbVar8[-1];
if (0x23 < uVar10) {
return 0;
}
if ((0x100002600U >> (uVar10 & 0x3f) & 1) == 0) break;
*(byte **)(param_1 + 8) = pbVar8;
*(long *)param_1 = lVar6;
pbVar8 = pbVar8 + 1;
bVar11 = lVar6 == 0;
lVar6 = lVar6 + -1;
if (bVar11) {
return 0;
}
}
if (uVar10 != 0x23) {
return 0;
}
*(byte **)(param_1 + 8) = pbVar8;
*(long *)param_1 = lVar6;
while( true ) {
if (lVar6 == 0) {
return 0;
}
bVar1 = *pbVar8;
if (bVar1 == bVar2) break;
std::__cxx11::string::push_back((char)param_2);
pbVar8 = (byte *)(*(long *)(param_1 + 8) + 1);
*(byte **)(param_1 + 8) = pbVar8;
lVar6 = *(long *)param_1 + -1;
*(long *)param_1 = lVar6;
}
while( true ) {
lVar6 = lVar6 + -1;
pbVar7 = pbVar8 + 1;
if ((0x20 < bVar1) || ((0x100002600U >> ((ulong)bVar1 & 0x3f) & 1) == 0)) break;
*(byte **)(param_1 + 8) = pbVar7;
*(long *)param_1 = lVar6;
if (lVar6 == 0) {
return 0;
}
bVar1 = *pbVar7;
pbVar8 = pbVar7;
}
if (*pbVar8 != bVar2) {
return 0;
}
*(byte **)(param_1 + 8) = pbVar7;
*(long *)param_1 = lVar6;
if (lVar6 == 0) {
return 0;
}
}
else {
if (bVar2 != 0x23) {
return 0;
}
pbVar7 = (byte *)(lVar4 + lVar9 + 2);
*(byte **)(param_1 + 8) = pbVar7;
lVar6 = lVar6 + lVar3;
*(long *)param_1 = lVar6;
if (lVar3 + -2 == lVar9) {
return 0;
}
while (*pbVar7 != 0x29) {
std::__cxx11::string::push_back((char)param_2);
pbVar7 = (byte *)(*(long *)(param_1 + 8) + 1);
*(byte **)(param_1 + 8) = pbVar7;
lVar6 = *(long *)param_1 + -1;
*(long *)param_1 = lVar6;
if (lVar6 == 0) {
return 0;
}
}
}
while( true ) {
lVar6 = lVar6 + -1;
pbVar8 = pbVar7 + 1;
uVar10 = (ulong)*pbVar7;
if (0x29 < uVar10) {
return 0;
}
if ((0x100002600U >> (uVar10 & 0x3f) & 1) == 0) break;
*(byte **)(param_1 + 8) = pbVar8;
*(long *)param_1 = lVar6;
pbVar7 = pbVar8;
if (lVar6 == 0) {
return 0;
}
}
if (uVar10 == 0x29) {
*(byte **)(param_1 + 8) = pbVar8;
*(long *)param_1 = lVar6;
return 1;
}
return 0;
}
|
|
1,580 | mysql_local_infile_end | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
void mysql_local_infile_end(void *ptr)
{
MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr;
if (info)
{
if (info->fp)
ma_close(info->fp);
free(ptr);
}
return;
} | O0 | c | mysql_local_infile_end:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x33dca
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x33dc1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3ccd0
movq -0x8(%rbp), %rdi
callq 0x13530
addq $0x10, %rsp
popq %rbp
retq
| mysql_local_infile_end:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_33DCA
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz short loc_33DC1
mov rax, [rbp+var_10]
mov rdi, [rax]
call ma_close
loc_33DC1:
mov rdi, [rbp+var_8]
call _free
loc_33DCA:
add rsp, 10h
pop rbp
retn
| long long mysql_local_infile_end(_QWORD *a1)
{
long long result; // rax
result = (long long)a1;
if ( a1 )
{
if ( *a1 )
ma_close(*a1);
return free(a1);
}
return result;
}
| mysql_local_infile_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00133dca
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x00133dc1
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0013ccd0
LAB_00133dc1:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00113530
LAB_00133dca:
ADD RSP,0x10
POP RBP
RET
|
void mysql_local_infile_end(long *param_1)
{
if (param_1 != (long *)0x0) {
if (*param_1 != 0) {
ma_close(*param_1);
}
free(param_1);
}
return;
}
|
|
1,581 | my_casedn_str_mb | eloqsql/strings/ctype-mb.c | size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_lower;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O3 | c | my_casedn_str_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %rax
je 0x39b40
movq %rdi, %r14
movq 0x48(%rdi), %r12
movq %rbx, %r15
movl 0x9c(%r14), %edx
addq %r15, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x39b30
movzbl (%r15), %eax
movb (%r12,%rax), %al
movb %al, (%r15)
movl $0x1, %ecx
jmp 0x39b32
movl %eax, %ecx
leaq (%r15,%rcx), %rax
cmpb $0x0, (%r15,%rcx)
movq %rax, %r15
jne 0x39afc
subq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
cmp byte ptr [rsi], 0
mov rax, rsi
jz short loc_39B40
mov r14, rdi
mov r12, [rdi+48h]
mov r15, rbx
loc_39AFC:
mov edx, [r14+9Ch]
add rdx, r15
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_39B30
movzx eax, byte ptr [r15]
mov al, [r12+rax]
mov [r15], al
mov ecx, 1
jmp short loc_39B32
loc_39B30:
mov ecx, eax
loc_39B32:
lea rax, [r15+rcx]
cmp byte ptr [r15+rcx], 0
mov r15, rax
jnz short loc_39AFC
loc_39B40:
sub rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_mb(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
long long v3; // r12
_BYTE *v4; // r15
int v5; // eax
long long v6; // rcx
bool v7; // zf
v2 = a2;
if ( *a2 )
{
v3 = *(_QWORD *)(a1 + 72);
v4 = a2;
do
{
v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
&v4[*(unsigned int *)(a1 + 156)]);
if ( v5 >= 2 )
{
v6 = (unsigned int)v5;
}
else
{
*v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4);
v6 = 1LL;
}
v2 = &v4[v6];
v7 = v4[v6] == 0;
v4 += v6;
}
while ( !v7 );
}
return v2 - a2;
}
| my_casedn_str_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV RAX,RSI
JZ 0x00139b40
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x48]
MOV R15,RBX
LAB_00139afc:
MOV EDX,dword ptr [R14 + 0x9c]
ADD RDX,R15
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x00139b30
MOVZX EAX,byte ptr [R15]
MOV AL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15],AL
MOV ECX,0x1
JMP 0x00139b32
LAB_00139b30:
MOV ECX,EAX
LAB_00139b32:
LEA RAX,[R15 + RCX*0x1]
CMP byte ptr [R15 + RCX*0x1],0x0
MOV R15,RAX
JNZ 0x00139afc
LAB_00139b40:
SUB RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_mb(long param_1,byte *param_2)
{
byte *pbVar1;
long lVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
byte *pbVar6;
pbVar4 = param_2;
if (*param_2 != 0) {
lVar2 = *(long *)(param_1 + 0x48);
pbVar6 = param_2;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c));
if ((int)uVar3 < 2) {
*pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6);
uVar5 = 1;
}
else {
uVar5 = (ulong)uVar3;
}
pbVar4 = pbVar6 + uVar5;
pbVar1 = pbVar6 + uVar5;
pbVar6 = pbVar4;
} while (*pbVar1 != 0);
}
return (long)pbVar4 - (long)param_2;
}
|
|
1,582 | double minja::Value::get<double>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | double minja::Value::get<double>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xcc900
cmpq $0x0, 0x20(%r14)
jne 0xcc900
cmpq $0x0, 0x30(%r14)
jne 0xcc900
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcccb0
movsd (%rbx), %xmm0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21690
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xc39c0
leaq 0x610ac(%rip), %rsi # 0x12d9d2
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xbd260
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x214b0
xorl %ebp, %ebp
movq 0xa5674(%rip), %rsi # 0x171fc0
movq 0xa562d(%rip), %rdx # 0x171f80
movq %rbx, %rdi
callq 0x21ad0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcc979
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcc994
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xcc9be
jmp 0xcc9c6
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcc9be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xcc9be
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f80
movq %r14, %rdi
callq 0x21b70
| _ZNK5minja5Value3getIdEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_CC900
cmp qword ptr [r14+20h], 0
jnz short loc_CC900
cmp qword ptr [r14+30h], 0
jnz short loc_CC900
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
movsd xmm0, qword ptr [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_CC900:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CC979
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CC979:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CC994
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CC994:
test bpl, bpl
jnz short loc_CC9BE
jmp short loc_CC9C6
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CC9BE
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CC9BE
mov r14, rax
loc_CC9BE:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_CC9C6:
mov rdi, r14
call __Unwind_Resume
| double minja::Value::get<double>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
double v4[2]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0.0;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v4);
return v4[0];
}
| get<double>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001cc900
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001cc900
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001cc900
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001cccb0
MOVSD XMM0,qword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001cc900:
MOV EDI,0x10
CALL 0x00121690
MOV RBX,RAX
LAB_001cc90d:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001c39c0
LAB_001cc91f:
LEA RSI,[0x22d9d2]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001bd260
MOV BPL,0x1
LAB_001cc936:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x001214b0
XOR EBP,EBP
MOV RSI,qword ptr [0x00271fc0]
MOV RDX,qword ptr [0x00271f80]
MOV RDI,RBX
CALL 0x00121ad0
|
/* double minja::Value::get<double>() const */
double __thiscall minja::Value::get<double>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
double local_38 [4];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0.0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001cc90d to 001cc91e has its CatchHandler @ 001cc9bb */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001cc91f to 001cc932 has its CatchHandler @ 001cc99b */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001cc936 to 001cc95a has its CatchHandler @ 001cc95b */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00271fc0,PTR__runtime_error_00271f80);
}
|
|
1,583 | testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc | static ::std::string FormatDeathTestOutput(const ::std::string& output) {
::std::string ret;
for (size_t at = 0;;) {
const size_t line_end = output.find('\n', at);
ret += "[ DEATH ] ";
if (line_end == ::std::string::npos) {
ret += output.substr(at);
break;
}
ret += output.substr(at, line_end + 1 - at);
at = line_end + 1;
}
return ret;
} | O1 | cpp | testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsp, %r12
movq %r14, %rdi
movl $0xa, %esi
movq %r15, %rdx
callq 0x8710
movq %rax, %r13
movq %rbx, %rdi
leaq 0x3341e(%rip), %rsi # 0x43aec
callq 0x8a50
cmpq $-0x1, %r13
je 0x10722
leaq 0x1(%r13), %rbp
movq %rbp, %rcx
subq %r15, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8510
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1071d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbp, %r15
jmp 0x10763
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x8510
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x10763
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
cmpq $-0x1, %r13
jne 0x106b1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10783
jmp 0x107a5
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x107a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x107a8
jmp 0x107a5
movq %rax, %r14
movq (%rbx), %rdi
movq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x107c0
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq %r14, %rdi
callq 0x8990
| _ZN7testing8internalL21FormatDeathTestOutputERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+58h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
xor r15d, r15d
mov r12, rsp
loc_106B1:
mov rdi, r14
mov esi, 0Ah
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r13, rax
mov rdi, rbx
lea rsi, aDeath; "[ DEATH ] "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
cmp r13, 0FFFFFFFFFFFFFFFFh
jz short loc_10722
lea rbp, [r13+1]
mov rcx, rbp
sub rcx, r15
mov rdi, r12
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rsp+58h+var_58]
mov rdx, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_58]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_1071D
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1071D:
mov r15, rbp
jmp short loc_10763
loc_10722:
mov rdi, r12
mov rsi, r14
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rsp+58h+var_58]
mov rdx, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_58]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_10763
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10763:
cmp r13, 0FFFFFFFFFFFFFFFFh
jnz loc_106B1
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_10783
jmp short loc_107A5
loc_10783:
mov r14, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_107A8
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_107A8
jmp short $+2
loc_107A5:
mov r14, rax
loc_107A8:
mov rdi, [rbx]; void *
mov rax, [rsp+arg_18]
cmp rdi, rax
jz short loc_107C0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_107C0:
mov rdi, r14
call __Unwind_Resume
| long long testing::internal::FormatDeathTestOutput(long long a1, long long a2)
{
long long v2; // r15
long long v3; // r13
void *v5; // [rsp+0h] [rbp-58h] BYREF
_QWORD v6[9]; // [rsp+10h] [rbp-48h] BYREF
v6[2] = a1 + 16;
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = 0LL;
do
{
v3 = std::string::find(a2, 10LL, v2);
std::string::append(a1, "[ DEATH ] ");
if ( v3 == -1 )
{
std::string::substr(&v5, a2, v2, -1LL);
std::string::_M_append(a1, v5);
if ( v5 != v6 )
operator delete(v5, v6[0] + 1LL);
}
else
{
std::string::substr(&v5, a2, v2, v3 + 1 - v2);
std::string::_M_append(a1, v5);
if ( v5 != v6 )
operator delete(v5, v6[0] + 1LL);
v2 = v3 + 1;
}
}
while ( v3 != -1 );
return a1;
}
| FormatDeathTestOutput:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV R12,RSP
LAB_001106b1:
MOV RDI,R14
MOV ESI,0xa
MOV RDX,R15
CALL 0x00108710
MOV R13,RAX
LAB_001106c4:
MOV RDI,RBX
LEA RSI,[0x143aec]
CALL 0x00108a50
CMP R13,-0x1
JZ 0x00110722
LEA RBP,[R13 + 0x1]
MOV RCX,RBP
SUB RCX,R15
LAB_001106e3:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00108510
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001106fa:
MOV RDI,RBX
CALL 0x00108170
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0011071d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_0011071d:
MOV R15,RBP
JMP 0x00110763
LAB_00110722:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
MOV RCX,-0x1
CALL 0x00108510
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_00110740:
MOV RDI,RBX
CALL 0x00108170
LAB_00110748:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00110763
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_00110763:
CMP R13,-0x1
JNZ 0x001106b1
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::FormatDeathTestOutput(std::__cxx11::string const&) */
internal * __thiscall testing::internal::FormatDeathTestOutput(internal *this,string *param_1)
{
long lVar1;
long *local_58 [2];
long local_48 [2];
internal *local_38;
local_38 = this + 0x10;
*(internal **)this = local_38;
*(int8 *)(this + 8) = 0;
this[0x10] = (internal)0x0;
do {
lVar1 = std::__cxx11::string::find((char)param_1,10);
/* try { // try from 001106c4 to 001106d2 has its CatchHandler @ 001107a5 */
std::__cxx11::string::append((char *)this);
if (lVar1 == -1) {
/* try { // try from 00110722 to 00110736 has its CatchHandler @ 00110781 */
std::__cxx11::string::substr((ulong)local_58,(ulong)param_1);
/* try { // try from 00110740 to 00110747 has its CatchHandler @ 0011077f */
std::__cxx11::string::_M_append((char *)this,(ulong)local_58[0]);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
}
else {
/* try { // try from 001106e3 to 001106f0 has its CatchHandler @ 001107a3 */
std::__cxx11::string::substr((ulong)local_58,(ulong)param_1);
/* try { // try from 001106fa to 00110701 has its CatchHandler @ 00110783 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_58[0]);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
}
} while (lVar1 != -1);
return this;
}
|
|
1,584 | ScratchAllocator::allocBytes(unsigned long) | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | void *ScratchAllocator::allocBytes(size_t size)
{
size_t offset = (block.offset + alignof(std::max_align_t) - 1) & ~(alignof(std::max_align_t) - 1);
if (offset + size < block.size)
{
void *copyData = block.data + offset;
block.offset = offset + size;
return copyData;
}
else
{
auto allocSize = std::max<size_t>(4096, size);
blocks.emplace_back(::malloc(allocSize));
block = { static_cast<uint8_t *>(blocks.back().get()), 0, allocSize };
block.offset = size;
return block.data;
}
} | O0 | cpp | ScratchAllocator::allocBytes(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq 0x10(%rcx), %rax
addq $0x10, %rax
subq $0x1, %rax
andq $-0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
cmpq 0x18(%rcx), %rax
jae 0x184353
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x20(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1843f0
movq $0x1000, -0x38(%rbp) # imm = 0x1000
leaq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x167d10
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x30(%rbp)
addq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0x177ae0
movq -0x68(%rbp), %rdi
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x188bc0
movq -0x60(%rbp), %rdi
addq $0x20, %rdi
callq 0x188c30
movq %rax, %rdi
callq 0x188c70
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN16ScratchAllocator10allocBytesEm:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rcx, [rbp+var_10]
mov [rbp+var_60], rcx
mov rax, [rcx+10h]
add rax, 10h
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
cmp rax, [rcx+18h]
jnb short loc_184353
mov rax, [rbp+var_60]
mov rcx, [rax+8]
add rcx, [rbp+var_20]
mov [rbp+var_28], rcx
mov rcx, [rbp+var_20]
add rcx, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_1843F0
loc_184353:
mov [rbp+var_38], 1000h
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call __ZSt3maxImERKT_S2_S2_; std::max<ulong>(ulong const&,ulong const&)
mov rcx, rax
mov rax, [rbp+var_60]
mov rcx, [rcx]
mov [rbp+var_30], rcx
add rax, 20h ; ' '
mov [rbp+var_68], rax
mov rdi, [rbp+var_30]
call _malloc
mov rdi, [rbp+var_68]
mov [rbp+var_40], rax
lea rsi, [rbp+var_40]
call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EE12emplace_backIJPvEEEvDpOT_; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::emplace_back<void *>(void * &&)
mov rdi, [rbp+var_60]
add rdi, 20h ; ' '
call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EE4backEv; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::back(void)
mov rdi, rax
call _ZNKSt10unique_ptrIvN16ScratchAllocator13MallocDeleterEE3getEv; std::unique_ptr<void,ScratchAllocator::MallocDeleter>::get(void)
mov rcx, rax
mov rax, [rbp+var_60]
mov [rbp+var_58], rcx
mov [rbp+var_50], 0
mov rcx, [rbp+var_30]
mov [rbp+var_48], rcx
mov rcx, [rbp+var_58]
mov [rax+8], rcx
mov rcx, [rbp+var_50]
mov [rax+10h], rcx
mov rcx, [rbp+var_48]
mov [rax+18h], rcx
mov rcx, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rax+8]
mov [rbp+var_8], rax
loc_1843F0:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| unsigned long long ScratchAllocator::allocBytes(ScratchAllocator *this, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+28h] [rbp-48h]
long long v6; // [rsp+30h] [rbp-40h] BYREF
long long v7; // [rsp+38h] [rbp-38h] BYREF
long long v8; // [rsp+40h] [rbp-30h]
unsigned long long v9; // [rsp+48h] [rbp-28h]
unsigned long long v10; // [rsp+50h] [rbp-20h]
_QWORD v11[2]; // [rsp+58h] [rbp-18h] BYREF
v11[1] = this;
v11[0] = a2;
v10 = (*((_QWORD *)this + 2) + 15LL) & 0xFFFFFFFFFFFFFFF0LL;
if ( a2 + v10 >= *((_QWORD *)this + 3) )
{
v7 = 4096LL;
v8 = *(_QWORD *)std::max<unsigned long>(&v7, v11);
v6 = malloc(v8);
std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::emplace_back<void *>((char *)this + 32, &v6);
v2 = std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::back((char *)this + 32);
v3 = std::unique_ptr<void,ScratchAllocator::MallocDeleter>::get(v2);
v5 = v8;
*((_QWORD *)this + 1) = v3;
*((_QWORD *)this + 2) = 0LL;
*((_QWORD *)this + 3) = v5;
*((_QWORD *)this + 2) = v11[0];
return *((_QWORD *)this + 1);
}
else
{
v9 = v10 + *((_QWORD *)this + 1);
*((_QWORD *)this + 2) = v11[0] + v10;
return v9;
}
}
| |||
1,585 | ScratchAllocator::allocBytes(unsigned long) | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | void *ScratchAllocator::allocBytes(size_t size)
{
size_t offset = (block.offset + alignof(std::max_align_t) - 1) & ~(alignof(std::max_align_t) - 1);
if (offset + size < block.size)
{
void *copyData = block.data + offset;
block.offset = offset + size;
return copyData;
}
else
{
auto allocSize = std::max<size_t>(4096, size);
blocks.emplace_back(::malloc(allocSize));
block = { static_cast<uint8_t *>(blocks.back().get()), 0, allocSize };
block.offset = size;
return block.data;
}
} | O1 | cpp | ScratchAllocator::allocBytes(unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
addq $0xf, %rax
andq $-0x10, %rax
leaq (%rax,%rsi), %rcx
cmpq 0x18(%rdi), %rcx
jae 0x88918
addq 0x8(%rbx), %rax
movq %rcx, %r14
jmp 0x88971
movq %rsi, %r14
cmpq $0x1001, %rsi # imm = 0x1001
movl $0x1000, %r15d # imm = 0x1000
cmovaeq %rsi, %r15
movq %r15, %rdi
callq 0x7fe50
movq %rax, -0x20(%rbp)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x8894c
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x88959
leaq 0x20(%rbx), %rdi
leaq -0x20(%rbp), %rdx
callq 0x8f11a
movq 0x28(%rbx), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN16ScratchAllocator10allocBytesEm:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+10h]
add rax, 0Fh
and rax, 0FFFFFFFFFFFFFFF0h
lea rcx, [rax+rsi]
cmp rcx, [rdi+18h]
jnb short loc_88918
add rax, [rbx+8]
mov r14, rcx
jmp short loc_88971
loc_88918:
mov r14, rsi
cmp rsi, 1001h
mov r15d, 1000h
cmovnb r15, rsi
mov rdi, r15
call _malloc
mov [rbp+var_20], rax
mov rsi, [rbx+28h]
cmp rsi, [rbx+30h]
jz short loc_8894C
mov [rsi], rax
add qword ptr [rbx+28h], 8
jmp short loc_88959
loc_8894C:
lea rdi, [rbx+20h]
lea rdx, [rbp+var_20]
call _ZNSt6vectorISt10unique_ptrIvN16ScratchAllocator13MallocDeleterEESaIS3_EE17_M_realloc_insertIJPvEEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_; std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::_M_realloc_insert<void *>(__gnu_cxx::__normal_iterator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>*,std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>>,void * &&)
loc_88959:
mov rax, [rbx+28h]
mov rax, [rax-8]
mov [rbx+8], rax
mov qword ptr [rbx+10h], 0
mov [rbx+18h], r15
loc_88971:
mov [rbx+10h], r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| unsigned long long ScratchAllocator::allocBytes(ScratchAllocator *this, unsigned long long a2)
{
long long v2; // rax
unsigned long long v3; // rax
unsigned long long v4; // rcx
unsigned long long result; // rax
unsigned long long v6; // r14
long long v7; // r15
long long v8; // rax
long long *v9; // rsi
long long v10[4]; // [rsp+0h] [rbp-20h] BYREF
v10[0] = v2;
v3 = (*((_QWORD *)this + 2) + 15LL) & 0xFFFFFFFFFFFFFFF0LL;
v4 = v3 + a2;
if ( v3 + a2 >= *((_QWORD *)this + 3) )
{
v6 = a2;
v7 = 4096LL;
if ( a2 >= 0x1001 )
v7 = a2;
v8 = malloc(v7);
v10[0] = v8;
v9 = (long long *)*((_QWORD *)this + 5);
if ( v9 == *((long long **)this + 6) )
{
std::vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>::_M_realloc_insert<void *>(
(char *)this + 32,
v9,
v10);
}
else
{
*v9 = v8;
*((_QWORD *)this + 5) += 8LL;
}
result = *(_QWORD *)(*((_QWORD *)this + 5) - 8LL);
*((_QWORD *)this + 1) = result;
*((_QWORD *)this + 2) = 0LL;
*((_QWORD *)this + 3) = v7;
}
else
{
result = *((_QWORD *)this + 1) + v3;
v6 = v4;
}
*((_QWORD *)this + 2) = v6;
return result;
}
| allocBytes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
ADD RAX,0xf
AND RAX,-0x10
LEA RCX,[RAX + RSI*0x1]
CMP RCX,qword ptr [RDI + 0x18]
JNC 0x00188918
ADD RAX,qword ptr [RBX + 0x8]
MOV R14,RCX
JMP 0x00188971
LAB_00188918:
MOV R14,RSI
CMP RSI,0x1001
MOV R15D,0x1000
CMOVNC R15,RSI
MOV RDI,R15
CALL 0x0017fe50
MOV qword ptr [RBP + -0x20],RAX
MOV RSI,qword ptr [RBX + 0x28]
CMP RSI,qword ptr [RBX + 0x30]
JZ 0x0018894c
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x28],0x8
JMP 0x00188959
LAB_0018894c:
LEA RDI,[RBX + 0x20]
LEA RDX,[RBP + -0x20]
CALL 0x0018f11a
LAB_00188959:
MOV RAX,qword ptr [RBX + 0x28]
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x18],R15
LAB_00188971:
MOV qword ptr [RBX + 0x10],R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ScratchAllocator::allocBytes(unsigned long) */
long __thiscall ScratchAllocator::allocBytes(ScratchAllocator *this,ulong param_1)
{
ulong uVar1;
int8 *puVar2;
ulong uVar3;
long lVar4;
size_t __size;
void *local_28;
uVar3 = *(long *)(this + 0x10) + 0xfU & 0xfffffffffffffff0;
uVar1 = uVar3 + param_1;
if (uVar1 < *(ulong *)(this + 0x18)) {
lVar4 = uVar3 + *(long *)(this + 8);
param_1 = uVar1;
}
else {
__size = 0x1000;
if (0x1000 < param_1) {
__size = param_1;
}
local_28 = malloc(__size);
puVar2 = *(int8 **)(this + 0x28);
if (puVar2 == *(int8 **)(this + 0x30)) {
std::
vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>>
::_M_realloc_insert<void*>
((vector<std::unique_ptr<void,ScratchAllocator::MallocDeleter>,std::allocator<std::unique_ptr<void,ScratchAllocator::MallocDeleter>>>
*)(this + 0x20),puVar2,&local_28);
}
else {
*puVar2 = local_28;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 8;
}
lVar4 = *(long *)(*(long *)(this + 0x28) + -8);
*(long *)(this + 8) = lVar4;
*(int8 *)(this + 0x10) = 0;
*(size_t *)(this + 0x18) = __size;
}
*(ulong *)(this + 0x10) = param_1;
return lVar4;
}
|
|
1,586 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O0 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xc13f7
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xc13d4
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xc13e4
jmp 0xc13d6
jmp 0xc13d8
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xc1482
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc1380
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xc147c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xc1440
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xc144d
jmp 0xc1442
jmp 0xc1444
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xc1482
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc1380
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0xc1470
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xc1476
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_C13F7
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
ja short loc_C13D4
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jnz short loc_C13E4
loc_C13D4:
jmp short $+2
loc_C13D6:
jmp short $+2
loc_C13D8:
mov [rbp+var_4], 200h
jmp loc_C1482
loc_C13E4:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_1C], eax
loc_C13F7:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_C147C
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
ja short loc_C1440
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jnz short loc_C144D
loc_C1440:
jmp short $+2
loc_C1442:
jmp short $+2
loc_C1444:
mov [rbp+var_4], 200h
jmp short loc_C1482
loc_C144D:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jbe short loc_C1470
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_C1476
loc_C1470:
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
loc_C1476:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
loc_C147C:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_C1482:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long find_longest_bitstream_0(unsigned __int16 *a1, unsigned long long a2)
{
unsigned __int16 *v4; // [rsp+10h] [rbp-30h]
unsigned __int16 *v5; // [rsp+18h] [rbp-28h]
unsigned int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
unsigned __int16 *v8; // [rsp+30h] [rbp-10h]
v7 = 1;
if ( (*a1 & 0x8000) != 0 )
{
LABEL_6:
v8 = a1 + 1;
if ( (a1[1] & 0x8000) == 0 )
{
v4 = &v8[*v8];
if ( (unsigned long long)v4 > a2 || v4 == v8 )
return 512;
v6 = find_longest_bitstream_0(v4, a2) + 1;
if ( v7 <= v6 )
return v6;
else
return v7;
}
return v7;
}
v5 = &a1[*a1];
if ( (unsigned long long)v5 <= a2 && v5 != a1 )
{
v7 = find_longest_bitstream_0(v5, a2) + 1;
goto LABEL_6;
}
return 512;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001c13f7
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001c13d4
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001c13e4
LAB_001c13d4:
JMP 0x001c13d6
LAB_001c13d6:
JMP 0x001c13d8
LAB_001c13d8:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001c1482
LAB_001c13e4:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001c1380
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_001c13f7:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001c147c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001c1440
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001c144d
LAB_001c1440:
JMP 0x001c1442
LAB_001c1442:
JMP 0x001c1444
LAB_001c1444:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001c1482
LAB_001c144d:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001c1380
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JBE 0x001c1470
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001c1476
LAB_001c1470:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
LAB_001c1476:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001c147c:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001c1482:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint find_longest_bitstream(ushort *param_1,ushort *param_2)
{
int iVar1;
ushort *puVar2;
uint local_3c;
uint local_24;
local_24 = 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_24 = iVar1 + 1;
}
param_1 = param_1 + 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_3c = iVar1 + 1;
if (local_3c < local_24) {
local_3c = local_24;
}
local_24 = local_3c;
}
return local_24;
}
|
|
1,587 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O3 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x87614
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x87657
movq %rbx, %rsi
callq 0x875d2
movl %eax, %r15d
incl %r15d
jmp 0x8761a
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x87654
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x87657
movq %rbx, %rsi
callq 0x875d2
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x87657
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_87614
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_87657
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_8761A
loc_87614:
mov r15d, 1
loc_8761A:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_87654
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_87657
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_87657
loc_87654:
mov eax, r15d
loc_87657:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x00187614
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x00187657
MOV RSI,RBX
CALL 0x001875d2
MOV R15D,EAX
INC R15D
JMP 0x0018761a
LAB_00187614:
MOV R15D,0x1
LAB_0018761a:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x00187654
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x00187657
MOV RSI,RBX
CALL 0x001875d2
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x00187657
LAB_00187654:
MOV EAX,R15D
LAB_00187657:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
|
|
1,588 | getopt_ll | eloqsql/mysys/my_getopt.c | static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
{
longlong num=eval_num_suffix_ll(arg, err, (char*) optp->name);
return getopt_ll_limit_value(num, optp, NULL);
} | O3 | c | getopt_ll:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
movl %r15d, (%rdx)
callq 0x28050
movq %rax, %r13
movl %r15d, (%rax)
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
movl $0xa, %edx
callq 0x28830
cmpl $0x22, (%r13)
jne 0x5ea06
leaq 0x2da1da(%rip), %rcx # 0x338bc0
leaq 0x3c600(%rip), %rsi # 0x9afed
xorl %r13d, %r13d
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq *(%rcx)
movl $0x1, (%r12)
jmp 0x5eaca
movq -0x38(%rbp), %rdx
movb (%rdx), %cl
movzbl %cl, %esi
cmpl $0x53, %esi
jle 0x5ea2c
leal -0x65(%rsi), %edi
cmpl $0xb, %edi
ja 0x5ea50
leaq 0x4179d(%rip), %rsi # 0xa01c0
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
leal -0x45(%rsi), %edi
cmpl $0xb, %edi
ja 0x5ea8e
leaq 0x41755(%rip), %rsi # 0xa0190
movslq (%rsi,%rdi,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movabsq $0x1000000000000000, %r13 # imm = 0x1000000000000000
jmp 0x5ea98
cmpl $0x54, %esi
je 0x5ea5e
cmpl $0x74, %esi
jne 0x5eae6
movabsq $0x10000000000, %r13 # imm = 0x10000000000
jmp 0x5ea98
movabsq $0x4000000000000, %r13 # imm = 0x4000000000000
jmp 0x5ea98
movl $0x400, %r13d # imm = 0x400
jmp 0x5ea98
movl $0x40000000, %r13d # imm = 0x40000000
jmp 0x5ea98
movl $0x100000, %r13d # imm = 0x100000
jmp 0x5ea98
movl $0x1, %r13d
testl %esi, %esi
jne 0x5eae6
imulq %rax, %r13
cmpl $0x0, (%r12)
je 0x5eaca
movq 0x2d851e(%rip), %rax # 0x336fc8
movq (%rax), %rdi
movsbl %cl, %ecx
leaq 0x3c554(%rip), %rdx # 0x9b00b
movl $0x1, %esi
movq -0x30(%rbp), %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x28720
movq %r13, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x5dd1f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, (%r12)
movb (%rdx), %cl
xorl %r13d, %r13d
jmp 0x5eaa3
| getopt_ll:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov rax, [rsi]
mov [rbp+var_30], rax
xor r15d, r15d
mov [rdx], r15d
call ___errno_location
mov r13, rax
mov [rax], r15d
lea rsi, [rbp+var_38]
mov rdi, r14
mov edx, 0Ah
call ___isoc23_strtol
cmp dword ptr [r13+0], 22h ; '"'
jnz short loc_5EA06
lea rcx, my_getopt_error_reporter
lea rsi, aIncorrectInteg; "Incorrect integer value: '%s'"
xor r13d, r13d
xor edi, edi
mov rdx, r14
xor eax, eax
call qword ptr [rcx]
mov dword ptr [r12], 1
jmp loc_5EACA
loc_5EA06:
mov rdx, [rbp+var_38]
mov cl, [rdx]
movzx esi, cl
cmp esi, 53h ; 'S'
jle short loc_5EA2C
lea edi, [rsi-65h]; switch 12 cases
cmp edi, 0Bh
ja short def_5EA2A; jumptable 000000000005EA2A default case
lea rsi, jpt_5EA2A
movsxd rdi, ds:(jpt_5EA2A - 0A01C0h)[rsi+rdi*4]
add rdi, rsi
jmp rdi; switch jump
loc_5EA2C:
lea edi, [rsi-45h]; switch 12 cases
cmp edi, 0Bh
ja short def_5EA42; jumptable 000000000005EA42 default case
lea rsi, jpt_5EA42
movsxd rdi, ds:(jpt_5EA42 - 0A0190h)[rsi+rdi*4]
add rdi, rsi
jmp rdi; switch jump
loc_5EA44:
mov r13, 1000000000000000h; jumptable 000000000005EA2A case 101
jmp short loc_5EA98
def_5EA2A:
cmp esi, 54h ; 'T'; jumptable 000000000005EA2A default case
jz short loc_5EA5E
cmp esi, 74h ; 't'
jnz loc_5EAE6; jumptable 000000000005EA2A cases 102,104-106,108,110,111
loc_5EA5E:
mov r13, 10000000000h
jmp short loc_5EA98
loc_5EA6A:
mov r13, 4000000000000h; jumptable 000000000005EA2A case 112
jmp short loc_5EA98
loc_5EA76:
mov r13d, 400h; jumptable 000000000005EA2A case 107
jmp short loc_5EA98
loc_5EA7E:
mov r13d, 40000000h; jumptable 000000000005EA2A case 103
jmp short loc_5EA98
loc_5EA86:
mov r13d, offset unk_100000; jumptable 000000000005EA2A case 109
jmp short loc_5EA98
def_5EA42:
mov r13d, 1; jumptable 000000000005EA42 default case
test esi, esi
jnz short loc_5EAE6; jumptable 000000000005EA2A cases 102,104-106,108,110,111
loc_5EA98:
imul r13, rax
cmp dword ptr [r12], 0
jz short loc_5EACA
loc_5EAA3:
mov rax, cs:stderr_ptr
mov rdi, [rax]
movsx ecx, cl
lea rdx, aUnknownSuffixC; "Unknown suffix '%c' used for variable '"...
mov esi, 1
mov r8, [rbp+var_30]
mov r9, r14
xor eax, eax
call ___fprintf_chk
loc_5EACA:
mov rdi, r13
mov rsi, rbx
xor edx, edx
call getopt_ll_limit_value
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5EAE6:
mov dword ptr [r12], 1; jumptable 000000000005EA2A cases 102,104-106,108,110,111
mov cl, [rdx]
xor r13d, r13d
jmp short loc_5EAA3
| long long getopt_ll(const char *a1, const char **a2, _DWORD *a3)
{
_DWORD *v5; // r13
long long v6; // rax
long long v7; // r13
char *v8; // rdx
char v9; // cl
unsigned int v10; // esi
long long v11; // r13
char *v13; // [rsp+8h] [rbp-38h] BYREF
const char *v14; // [rsp+10h] [rbp-30h]
v14 = *a2;
*a3 = 0;
v5 = (_DWORD *)__errno_location(a1);
*v5 = 0;
v6 = __isoc23_strtol(a1, &v13, 10LL);
if ( *v5 == 34 )
{
v7 = 0LL;
my_getopt_error_reporter(0, "Incorrect integer value: '%s'", a1);
*a3 = 1;
return getopt_ll_limit_value(v7, (long long)a2, 0LL);
}
v8 = v13;
v9 = *v13;
v10 = (unsigned __int8)*v13;
if ( v10 <= 0x53 )
{
switch ( *v13 )
{
case 'E':
LABEL_6:
v11 = 0x1000000000000000LL;
goto LABEL_15;
case 'F':
case 'H':
case 'I':
case 'J':
case 'L':
case 'N':
case 'O':
break;
case 'G':
LABEL_12:
v11 = 0x40000000LL;
goto LABEL_15;
case 'K':
LABEL_11:
v11 = 1024LL;
goto LABEL_15;
case 'M':
LABEL_13:
v11 = (long long)&unk_100000;
goto LABEL_15;
case 'P':
LABEL_10:
v11 = 0x4000000000000LL;
goto LABEL_15;
default:
v11 = 1LL;
if ( !*v13 )
goto LABEL_15;
break;
}
LABEL_18:
*a3 = 1;
v9 = *v8;
v7 = 0LL;
goto LABEL_16;
}
switch ( *v13 )
{
case 'e':
goto LABEL_6;
case 'f':
case 'h':
case 'i':
case 'j':
case 'l':
case 'n':
case 'o':
goto LABEL_18;
case 'g':
goto LABEL_12;
case 'k':
goto LABEL_11;
case 'm':
goto LABEL_13;
case 'p':
goto LABEL_10;
default:
if ( v10 != 84 && v10 != 116 )
goto LABEL_18;
v11 = 0x10000000000LL;
break;
}
LABEL_15:
v7 = v6 * v11;
if ( *a3 )
LABEL_16:
__fprintf_chk(stderr, 1LL, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", (unsigned int)v9, v14, a1);
return getopt_ll_limit_value(v7, (long long)a2, 0LL);
}
| getopt_ll:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI]
MOV qword ptr [RBP + -0x30],RAX
XOR R15D,R15D
MOV dword ptr [RDX],R15D
CALL 0x00128050
MOV R13,RAX
MOV dword ptr [RAX],R15D
LEA RSI,[RBP + -0x38]
MOV RDI,R14
MOV EDX,0xa
CALL 0x00128830
CMP dword ptr [R13],0x22
JNZ 0x0015ea06
LEA RCX,[0x438bc0]
LEA RSI,[0x19afed]
XOR R13D,R13D
XOR EDI,EDI
MOV RDX,R14
XOR EAX,EAX
CALL qword ptr [RCX]
MOV dword ptr [R12],0x1
JMP 0x0015eaca
LAB_0015ea06:
MOV RDX,qword ptr [RBP + -0x38]
MOV CL,byte ptr [RDX]
MOVZX ESI,CL
CMP ESI,0x53
JLE 0x0015ea2c
LEA EDI,[RSI + -0x65]
CMP EDI,0xb
JA 0x0015ea50
LEA RSI,[0x1a01c0]
MOVSXD RDI,dword ptr [RSI + RDI*0x4]
ADD RDI,RSI
switchD:
JMP RDI
LAB_0015ea2c:
LEA EDI,[RSI + -0x45]
CMP EDI,0xb
JA 0x0015ea8e
LEA RSI,[0x1a0190]
MOVSXD RDI,dword ptr [RSI + RDI*0x4]
ADD RDI,RSI
switchD:
JMP RDI
caseD_65:
MOV R13,0x1000000000000000
JMP 0x0015ea98
default:
CMP ESI,0x54
JZ 0x0015ea5e
CMP ESI,0x74
JNZ 0x0015eae6
LAB_0015ea5e:
MOV R13,0x10000000000
JMP 0x0015ea98
caseD_70:
MOV R13,0x4000000000000
JMP 0x0015ea98
caseD_6b:
MOV R13D,0x400
JMP 0x0015ea98
caseD_67:
MOV R13D,0x40000000
JMP 0x0015ea98
caseD_6d:
MOV R13D,0x100000
JMP 0x0015ea98
default:
MOV R13D,0x1
TEST ESI,ESI
JNZ 0x0015eae6
LAB_0015ea98:
IMUL R13,RAX
CMP dword ptr [R12],0x0
JZ 0x0015eaca
LAB_0015eaa3:
MOV RAX,qword ptr [0x00436fc8]
MOV RDI,qword ptr [RAX]
MOVSX ECX,CL
LEA RDX,[0x19b00b]
MOV ESI,0x1
MOV R8,qword ptr [RBP + -0x30]
MOV R9,R14
XOR EAX,EAX
CALL 0x00128720
LAB_0015eaca:
MOV RDI,R13
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0015dd1f
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_66:
MOV dword ptr [R12],0x1
MOV CL,byte ptr [RDX]
XOR R13D,R13D
JMP 0x0015eaa3
|
void getopt_ll(int8 param_1,int8 *param_2,int *param_3)
{
int *piVar1;
long lVar2;
byte bVar3;
long lVar4;
byte *local_40;
int8 local_38;
local_38 = *param_2;
*param_3 = 0;
piVar1 = __errno_location();
*piVar1 = 0;
lVar2 = __isoc23_strtol(param_1,&local_40,10);
if (*piVar1 == 0x22) {
lVar4 = 0;
(*(code *)my_getopt_error_reporter)(0,"Incorrect integer value: \'%s\'",param_1);
*param_3 = 1;
goto LAB_0015eaca;
}
bVar3 = *local_40;
if (bVar3 < 0x54) {
switch(bVar3) {
case 0x45:
goto switchD_0015ea2a_caseD_65;
case 0x46:
case 0x48:
case 0x49:
case 0x4a:
case 0x4c:
case 0x4e:
case 0x4f:
break;
case 0x47:
goto switchD_0015ea2a_caseD_67;
case 0x4b:
goto switchD_0015ea2a_caseD_6b;
case 0x4d:
goto switchD_0015ea2a_caseD_6d;
case 0x50:
goto switchD_0015ea2a_caseD_70;
default:
lVar4 = 1;
if (bVar3 == 0) goto LAB_0015ea98;
}
switchD_0015ea2a_caseD_66:
*param_3 = 1;
bVar3 = *local_40;
lVar4 = 0;
}
else {
switch(bVar3) {
case 0x65:
switchD_0015ea2a_caseD_65:
lVar4 = 0x1000000000000000;
break;
case 0x66:
case 0x68:
case 0x69:
case 0x6a:
case 0x6c:
case 0x6e:
case 0x6f:
goto switchD_0015ea2a_caseD_66;
case 0x67:
switchD_0015ea2a_caseD_67:
lVar4 = 0x40000000;
break;
case 0x6b:
switchD_0015ea2a_caseD_6b:
lVar4 = 0x400;
break;
case 0x6d:
switchD_0015ea2a_caseD_6d:
lVar4 = 0x100000;
break;
case 0x70:
switchD_0015ea2a_caseD_70:
lVar4 = 0x4000000000000;
break;
default:
if ((bVar3 != 0x54) && (bVar3 != 0x74)) goto switchD_0015ea2a_caseD_66;
lVar4 = 0x10000000000;
}
LAB_0015ea98:
lVar4 = lVar4 * lVar2;
if (*param_3 == 0) goto LAB_0015eaca;
}
__fprintf_chk(*(int8 *)PTR_stderr_00436fc8,1,
"Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')\n",(int)(char)bVar3,
local_38,param_1);
LAB_0015eaca:
getopt_ll_limit_value(lVar4,param_2,0);
return;
}
|
|
1,589 | ftxui::ButtonOption::Animated(ftxui::Color) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/component_options.cpp | ButtonOption ButtonOption::Animated(Color color) {
return ButtonOption::Animated(
Color::Interpolate(0.85F, color, Color::Black), // NOLINT
Color::Interpolate(0.10F, color, Color::White), // NOLINT
Color::Interpolate(0.10F, color, Color::Black), // NOLINT
Color::Interpolate(0.85F, color, Color::White)); // NOLINT
} | O3 | cpp | ftxui::ButtonOption::Animated(ftxui::Color):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl %esi, (%r14)
leaq 0x14(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x20b8a
movss 0xac7e(%rip), %xmm0 # 0x3f0b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x20da8
movl %eax, %ebp
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0xf, %esi
callq 0x20b8a
movss 0xac5b(%rip), %xmm0 # 0x3f0b4
movq %r14, %rdi
movq %r15, %rsi
callq 0x20da8
movl %eax, %r15d
leaq 0xc(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x20b8a
movss 0xac36(%rip), %xmm0 # 0x3f0b4
movq %r14, %rdi
movq %r12, %rsi
callq 0x20da8
movl %eax, %r12d
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0xf, %esi
callq 0x20b8a
movss 0xac0a(%rip), %xmm0 # 0x3f0b0
movq %r14, %rdi
movq %r13, %rsi
callq 0x20da8
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq 0x342a4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5ftxui12ButtonOption8AnimatedENS_5ColorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+48h+var_44]
mov [r14], esi
lea r15, [rsp+48h+var_34]
mov rdi, r15
xor esi, esi
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
movss xmm0, cs:flt_3F0B0; float
mov rdi, r14; this
mov rsi, r15; ftxui::Color *
call _ZN5ftxui5Color11InterpolateEfRKS0_S2_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)
mov ebp, eax
lea r15, [rsp+48h+var_38]
mov rdi, r15
mov esi, 0Fh
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
movss xmm0, cs:flt_3F0B4; float
mov rdi, r14; this
mov rsi, r15; ftxui::Color *
call _ZN5ftxui5Color11InterpolateEfRKS0_S2_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)
mov r15d, eax
lea r12, [rsp+48h+var_3C]
mov rdi, r12
xor esi, esi
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
movss xmm0, cs:flt_3F0B4; float
mov rdi, r14; this
mov rsi, r12; ftxui::Color *
call _ZN5ftxui5Color11InterpolateEfRKS0_S2_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)
mov r12d, eax
lea r13, [rsp+48h+var_40]
mov rdi, r13
mov esi, 0Fh
call _ZN5ftxui5ColorC2ENS0_9Palette16E; ftxui::Color::Color(ftxui::Color::Palette16)
movss xmm0, cs:flt_3F0B0; float
mov rdi, r14; this
mov rsi, r13; ftxui::Color *
call _ZN5ftxui5Color11InterpolateEfRKS0_S2_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)
mov rdi, rbx
mov esi, ebp
mov edx, r15d
mov ecx, r12d
mov r8d, eax
call _ZN5ftxui12ButtonOption8AnimatedENS_5ColorES1_S1_S1_; ftxui::ButtonOption::Animated(ftxui::Color,ftxui::Color,ftxui::Color,ftxui::Color)
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ftxui::ButtonOption::Animated(long long a1, int a2)
{
unsigned long long v2; // rdx
int v3; // ebp
unsigned long long v4; // rdx
int v5; // r15d
unsigned long long v6; // rdx
int v7; // r12d
unsigned long long v8; // rdx
int v9; // eax
int v11; // [rsp+4h] [rbp-44h] BYREF
_BYTE v12[4]; // [rsp+8h] [rbp-40h] BYREF
_BYTE v13[4]; // [rsp+Ch] [rbp-3Ch] BYREF
_BYTE v14[4]; // [rsp+10h] [rbp-38h] BYREF
_BYTE v15[52]; // [rsp+14h] [rbp-34h] BYREF
v11 = a2;
ftxui::Color::Color((long long)v15, 0);
v3 = ftxui::Color::Interpolate((ftxui::Color *)&v11, 0.85000002, (const ftxui::Color *)v15, v2);
ftxui::Color::Color((long long)v14, 15);
v5 = ftxui::Color::Interpolate((ftxui::Color *)&v11, 0.1, (const ftxui::Color *)v14, v4);
ftxui::Color::Color((long long)v13, 0);
v7 = ftxui::Color::Interpolate((ftxui::Color *)&v11, 0.1, (const ftxui::Color *)v13, v6);
ftxui::Color::Color((long long)v12, 15);
v9 = ftxui::Color::Interpolate((ftxui::Color *)&v11, 0.85000002, (const ftxui::Color *)v12, v8);
ftxui::ButtonOption::Animated(a1, v3, v5, v7, v9);
return a1;
}
| Animated:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x4]
MOV dword ptr [R14],ESI
LEA R15,[RSP + 0x14]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00120b8a
MOVSS XMM0,dword ptr [0x0013f0b0]
MOV RDI,R14
MOV RSI,R15
CALL 0x00120da8
MOV EBP,EAX
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV ESI,0xf
CALL 0x00120b8a
MOVSS XMM0,dword ptr [0x0013f0b4]
MOV RDI,R14
MOV RSI,R15
CALL 0x00120da8
MOV R15D,EAX
LEA R12,[RSP + 0xc]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00120b8a
MOVSS XMM0,dword ptr [0x0013f0b4]
MOV RDI,R14
MOV RSI,R12
CALL 0x00120da8
MOV R12D,EAX
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV ESI,0xf
CALL 0x00120b8a
MOVSS XMM0,dword ptr [0x0013f0b0]
MOV RDI,R14
MOV RSI,R13
CALL 0x00120da8
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R15D
MOV ECX,R12D
MOV R8D,EAX
CALL 0x001342a4
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ftxui::ButtonOption::Animated(ftxui::Color) */
ButtonOption * __thiscall ftxui::ButtonOption::Animated(ButtonOption *this,int4 param_2)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 local_44;
Color local_40 [4];
Color local_3c [4];
Color local_38 [4];
Color local_34 [4];
local_44 = param_2;
Color::Color(local_34,0);
uVar1 = Color::Interpolate(DAT_0013f0b0,(Color *)&local_44,local_34);
Color::Color(local_38,0xf);
uVar2 = Color::Interpolate(_DAT_0013f0b4,(Color *)&local_44,local_38);
Color::Color(local_3c,0);
uVar3 = Color::Interpolate(_DAT_0013f0b4,(Color *)&local_44,local_3c);
Color::Color(local_40,0xf);
uVar4 = Color::Interpolate(DAT_0013f0b0,(Color *)&local_44,local_40);
Animated(this,uVar1,uVar2,uVar3,uVar4);
return this;
}
|
|
1,590 | my_ftell | eloqsql/mysys/my_fstream.c | my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
{
long long pos;
DBUG_ENTER("my_ftell");
DBUG_PRINT("my",("stream:%p MyFlags: %lu", stream, MyFlags));
pos=IF_WIN(_ftelli64(stream),ftell(stream));
DBUG_PRINT("exit",("ftell: %lld",pos));
DBUG_RETURN((my_off_t) pos);
} | O3 | c | my_ftell:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x245a0
nop
| my_ftell:
push rbp
mov rbp, rsp
pop rbp
jmp _ftello64
| long long my_ftell(long long a1)
{
return ftello64(a1);
}
| my_ftell:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x001245a0
|
void my_ftell(FILE *param_1)
{
ftello64(param_1);
return;
}
|
|
1,591 | MatrixFrustum | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane)
{
Matrix result = { 0 };
float rl = (float)(right - left);
float tb = (float)(top - bottom);
float fn = (float)(farPlane - nearPlane);
result.m0 = ((float)nearPlane*2.0f)/rl;
result.m1 = 0.0f;
result.m2 = 0.0f;
result.m3 = 0.0f;
result.m4 = 0.0f;
result.m5 = ((float)nearPlane*2.0f)/tb;
result.m6 = 0.0f;
result.m7 = 0.0f;
result.m8 = ((float)right + (float)left)/rl;
result.m9 = ((float)top + (float)bottom)/tb;
result.m10 = -((float)farPlane + (float)nearPlane)/fn;
result.m11 = -1.0f;
result.m12 = 0.0f;
result.m13 = 0.0f;
result.m14 = -((float)farPlane*(float)nearPlane*2.0f)/fn;
result.m15 = 0.0f;
return result;
} | O2 | c | MatrixFrustum:
cvtsd2ss %xmm1, %xmm6
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm7
cvtsd2ss %xmm3, %xmm8
subsd %xmm2, %xmm3
cvtsd2ss %xmm3, %xmm9
cvtsd2ss %xmm4, %xmm1
movq %rdi, %rax
movaps %xmm1, %xmm3
addss %xmm1, %xmm3
movaps %xmm3, %xmm10
divss %xmm7, %xmm10
movss %xmm10, (%rdi)
cvtsd2ss %xmm5, %xmm10
andl $0x0, 0x4(%rdi)
subsd %xmm4, %xmm5
andl $0x0, 0x24(%rdi)
cvtsd2ss %xmm5, %xmm4
cvtsd2ss %xmm0, %xmm0
addss %xmm6, %xmm0
divss %xmm7, %xmm0
movss %xmm0, 0x8(%rdi)
cvtsd2ss %xmm2, %xmm0
addss %xmm8, %xmm0
unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
unpcklps %xmm9, %xmm9 # xmm9 = xmm9[0,0,1,1]
divps %xmm9, %xmm3
movaps %xmm1, %xmm0
addss %xmm10, %xmm0
xorps 0x5c226(%rip), %xmm0 # 0xb5140
xorps %xmm2, %xmm2
movlhps %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0]
movups %xmm2, 0xc(%rdi)
andq $0x0, 0x1c(%rdi)
mulss %xmm10, %xmm1
mulss 0x608a2(%rip), %xmm1 # 0xb97d8
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
unpcklps %xmm4, %xmm4 # xmm4 = xmm4[0,0,1,1]
divps %xmm4, %xmm0
movlps %xmm0, 0x28(%rdi)
movaps 0x6a606(%rip), %xmm0 # 0xc3550
movups %xmm0, 0x30(%rdi)
retq
| MatrixFrustum:
cvtsd2ss xmm6, xmm1
subsd xmm1, xmm0
cvtsd2ss xmm7, xmm1
cvtsd2ss xmm8, xmm3
subsd xmm3, xmm2
cvtsd2ss xmm9, xmm3
cvtsd2ss xmm1, xmm4
mov rax, rdi
movaps xmm3, xmm1
addss xmm3, xmm1
movaps xmm10, xmm3
divss xmm10, xmm7
movss dword ptr [rdi], xmm10
cvtsd2ss xmm10, xmm5
and dword ptr [rdi+4], 0
subsd xmm5, xmm4
and dword ptr [rdi+24h], 0
cvtsd2ss xmm4, xmm5
cvtsd2ss xmm0, xmm0
addss xmm0, xmm6
divss xmm0, xmm7
movss dword ptr [rdi+8], xmm0
cvtsd2ss xmm0, xmm2
addss xmm0, xmm8
unpcklps xmm3, xmm0
unpcklps xmm9, xmm9
divps xmm3, xmm9
movaps xmm0, xmm1
addss xmm0, xmm10
xorps xmm0, cs:xmmword_B5140
xorps xmm2, xmm2
movlhps xmm2, xmm3
movups xmmword ptr [rdi+0Ch], xmm2
and qword ptr [rdi+1Ch], 0
mulss xmm1, xmm10
mulss xmm1, cs:dword_B97D8
unpcklps xmm0, xmm1
unpcklps xmm4, xmm4
divps xmm0, xmm4
movlps qword ptr [rdi+28h], xmm0
movaps xmm0, cs:xmmword_C3550
movups xmmword ptr [rdi+30h], xmm0
retn
| long long MatrixFrustum(long long a1, __m128 a2, __m128 a3, double a4, double a5, __m128 a6, double a7)
{
__m128 v7; // xmm9
float v8; // xmm6_4
float v9; // xmm7_4
float v10; // xmm8_4
long long result; // rax
__m128 v12; // xmm3
float v13; // xmm10_4
__m128 v14; // xmm3
__m128 v15; // xmm0
v8 = *(double *)a3.m128_u64;
*(double *)a3.m128_u64 = *(double *)a3.m128_u64 - *(double *)a2.m128_u64;
v9 = *(double *)a3.m128_u64;
v10 = a5;
v7.m128_f32[0] = a5 - a4;
a3.m128_f32[0] = *(double *)a6.m128_u64;
result = a1;
v12 = a3;
v12.m128_f32[0] = a3.m128_f32[0] + a3.m128_f32[0];
*(float *)a1 = (float)(a3.m128_f32[0] + a3.m128_f32[0]) / v9;
v13 = a7;
*(_DWORD *)(a1 + 4) = 0;
*(_DWORD *)(a1 + 36) = 0;
a6.m128_f32[0] = a7 - *(double *)a6.m128_u64;
a2.m128_f32[0] = *(double *)a2.m128_u64;
*(float *)(a1 + 8) = (float)(a2.m128_f32[0] + v8) / v9;
a2.m128_f32[0] = a4;
a2.m128_f32[0] = a2.m128_f32[0] + v10;
v14 = _mm_div_ps(_mm_unpacklo_ps(v12, a2), _mm_unpacklo_ps(v7, v7));
v15 = a3;
v15.m128_f32[0] = a3.m128_f32[0] + v13;
*(__m128 *)(a1 + 12) = _mm_movelh_ps((__m128)0LL, v14);
*(_QWORD *)(a1 + 28) = 0LL;
a3.m128_f32[0] = (float)(a3.m128_f32[0] * v13) * -2.0;
_mm_storel_ps(
(double *)(a1 + 40),
_mm_div_ps(_mm_unpacklo_ps(_mm_xor_ps(v15, (__m128)xmmword_B5140), a3), _mm_unpacklo_ps(a6, a6)));
*(_OWORD *)(a1 + 48) = xmmword_C3550;
return result;
}
| MatrixFrustum:
CVTSD2SS XMM6,XMM1
SUBSD XMM1,XMM0
CVTSD2SS XMM7,XMM1
CVTSD2SS XMM8,XMM3
SUBSD XMM3,XMM2
CVTSD2SS XMM9,XMM3
CVTSD2SS XMM1,XMM4
MOV RAX,RDI
MOVAPS XMM3,XMM1
ADDSS XMM3,XMM1
MOVAPS XMM10,XMM3
DIVSS XMM10,XMM7
MOVSS dword ptr [RDI],XMM10
CVTSD2SS XMM10,XMM5
AND dword ptr [RDI + 0x4],0x0
SUBSD XMM5,XMM4
AND dword ptr [RDI + 0x24],0x0
CVTSD2SS XMM4,XMM5
CVTSD2SS XMM0,XMM0
ADDSS XMM0,XMM6
DIVSS XMM0,XMM7
MOVSS dword ptr [RDI + 0x8],XMM0
CVTSD2SS XMM0,XMM2
ADDSS XMM0,XMM8
UNPCKLPS XMM3,XMM0
UNPCKLPS XMM9,XMM9
DIVPS XMM3,XMM9
MOVAPS XMM0,XMM1
ADDSS XMM0,XMM10
XORPS XMM0,xmmword ptr [0x001b5140]
XORPS XMM2,XMM2
MOVLHPS XMM2,XMM3
MOVUPS xmmword ptr [RDI + 0xc],XMM2
AND qword ptr [RDI + 0x1c],0x0
MULSS XMM1,XMM10
MULSS XMM1,dword ptr [0x001b97d8]
UNPCKLPS XMM0,XMM1
UNPCKLPS XMM4,XMM4
DIVPS XMM0,XMM4
MOVLPS qword ptr [RDI + 0x28],XMM0
MOVAPS XMM0,xmmword ptr [0x001c3550]
MOVUPS xmmword ptr [RDI + 0x30],XMM0
RET
| ||
1,592 | MatrixFrustum | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane)
{
Matrix result = { 0 };
float rl = (float)(right - left);
float tb = (float)(top - bottom);
float fn = (float)(farPlane - nearPlane);
result.m0 = ((float)nearPlane*2.0f)/rl;
result.m1 = 0.0f;
result.m2 = 0.0f;
result.m3 = 0.0f;
result.m4 = 0.0f;
result.m5 = ((float)nearPlane*2.0f)/tb;
result.m6 = 0.0f;
result.m7 = 0.0f;
result.m8 = ((float)right + (float)left)/rl;
result.m9 = ((float)top + (float)bottom)/tb;
result.m10 = -((float)farPlane + (float)nearPlane)/fn;
result.m11 = -1.0f;
result.m12 = 0.0f;
result.m13 = 0.0f;
result.m14 = -((float)farPlane*(float)nearPlane*2.0f)/fn;
result.m15 = 0.0f;
return result;
} | O3 | c | MatrixFrustum:
cvtsd2ss %xmm1, %xmm6
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm7
cvtsd2ss %xmm3, %xmm8
subsd %xmm2, %xmm3
cvtsd2ss %xmm3, %xmm9
xorps %xmm3, %xmm3
cvtsd2ss %xmm5, %xmm3
subsd %xmm4, %xmm5
xorps %xmm1, %xmm1
cvtsd2ss %xmm5, %xmm1
movq %rdi, %rax
cvtsd2ss %xmm4, %xmm4
movaps %xmm4, %xmm5
addss %xmm4, %xmm5
movaps %xmm5, %xmm10
divss %xmm7, %xmm10
movss %xmm10, (%rdi)
xorl %ecx, %ecx
movl %ecx, 0x4(%rdi)
cvtsd2ss %xmm0, %xmm0
movl %ecx, 0x24(%rdi)
addss %xmm6, %xmm0
divss %xmm7, %xmm0
movss %xmm0, 0x8(%rdi)
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
addss %xmm8, %xmm0
unpcklps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1]
unpcklps %xmm9, %xmm9 # xmm9 = xmm9[0,0,1,1]
divps %xmm9, %xmm5
movaps %xmm4, %xmm0
addss %xmm3, %xmm0
xorps 0x6628f(%rip), %xmm0 # 0xcf150
xorps %xmm2, %xmm2
movlhps %xmm5, %xmm2 # xmm2 = xmm2[0],xmm5[0]
movups %xmm2, 0xc(%rdi)
mulss %xmm3, %xmm4
mulss 0x6ad85(%rip), %xmm4 # 0xd3c5c
movq $0x0, 0x1c(%rdi)
unpcklps %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
unpcklps %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1]
divps %xmm1, %xmm0
movlps %xmm0, 0x28(%rdi)
movaps 0x7446d(%rip), %xmm0 # 0xdd360
movups %xmm0, 0x30(%rdi)
retq
| MatrixFrustum:
cvtsd2ss xmm6, xmm1
subsd xmm1, xmm0
cvtsd2ss xmm7, xmm1
cvtsd2ss xmm8, xmm3
subsd xmm3, xmm2
cvtsd2ss xmm9, xmm3
xorps xmm3, xmm3
cvtsd2ss xmm3, xmm5
subsd xmm5, xmm4
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm5
mov rax, rdi
cvtsd2ss xmm4, xmm4
movaps xmm5, xmm4
addss xmm5, xmm4
movaps xmm10, xmm5
divss xmm10, xmm7
movss dword ptr [rdi], xmm10
xor ecx, ecx
mov [rdi+4], ecx
cvtsd2ss xmm0, xmm0
mov [rdi+24h], ecx
addss xmm0, xmm6
divss xmm0, xmm7
movss dword ptr [rdi+8], xmm0
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm2
addss xmm0, xmm8
unpcklps xmm5, xmm0
unpcklps xmm9, xmm9
divps xmm5, xmm9
movaps xmm0, xmm4
addss xmm0, xmm3
xorps xmm0, cs:xmmword_CF150
xorps xmm2, xmm2
movlhps xmm2, xmm5
movups xmmword ptr [rdi+0Ch], xmm2
mulss xmm4, xmm3
mulss xmm4, cs:dword_D3C5C
mov qword ptr [rdi+1Ch], 0
unpcklps xmm0, xmm4
unpcklps xmm1, xmm1
divps xmm0, xmm1
movlps qword ptr [rdi+28h], xmm0
movaps xmm0, cs:xmmword_DD360
movups xmmword ptr [rdi+30h], xmm0
retn
| long long MatrixFrustum(long long a1, double a2, double a3, double a4, double a5, __m128 a6, double a7)
{
__m128 v7; // xmm9
float v8; // xmm6_4
float v9; // xmm7_4
float v10; // xmm8_4
float v11; // xmm3_4
__m128 v12; // xmm1
long long result; // rax
__m128 v14; // xmm5
float v15; // xmm0_4
__m128 v16; // xmm0
__m128 v17; // xmm5
__m128 v18; // xmm0
v8 = a3;
v9 = a3 - a2;
v10 = a5;
v7.m128_f32[0] = a5 - a4;
v11 = a7;
v12 = 0LL;
v12.m128_f32[0] = a7 - *(double *)a6.m128_u64;
result = a1;
a6.m128_f32[0] = *(double *)a6.m128_u64;
v14 = a6;
v14.m128_f32[0] = a6.m128_f32[0] + a6.m128_f32[0];
*(float *)a1 = (float)(a6.m128_f32[0] + a6.m128_f32[0]) / v9;
*(_DWORD *)(a1 + 4) = 0;
v15 = a2;
*(_DWORD *)(a1 + 36) = 0;
*(float *)(a1 + 8) = (float)(v15 + v8) / v9;
v16 = 0LL;
v16.m128_f32[0] = a4;
v16.m128_f32[0] = v16.m128_f32[0] + v10;
v17 = _mm_div_ps(_mm_unpacklo_ps(v14, v16), _mm_unpacklo_ps(v7, v7));
v18 = a6;
v18.m128_f32[0] = a6.m128_f32[0] + v11;
*(__m128 *)(a1 + 12) = _mm_movelh_ps((__m128)0LL, v17);
a6.m128_f32[0] = (float)(a6.m128_f32[0] * v11) * -2.0;
*(_QWORD *)(a1 + 28) = 0LL;
_mm_storel_ps(
(double *)(a1 + 40),
_mm_div_ps(_mm_unpacklo_ps(_mm_xor_ps(v18, (__m128)xmmword_CF150), a6), _mm_unpacklo_ps(v12, v12)));
*(_OWORD *)(a1 + 48) = xmmword_DD360;
return result;
}
| MatrixFrustum:
CVTSD2SS XMM6,XMM1
SUBSD XMM1,XMM0
CVTSD2SS XMM7,XMM1
CVTSD2SS XMM8,XMM3
SUBSD XMM3,XMM2
CVTSD2SS XMM9,XMM3
XORPS XMM3,XMM3
CVTSD2SS XMM3,XMM5
SUBSD XMM5,XMM4
XORPS XMM1,XMM1
CVTSD2SS XMM1,XMM5
MOV RAX,RDI
CVTSD2SS XMM4,XMM4
MOVAPS XMM5,XMM4
ADDSS XMM5,XMM4
MOVAPS XMM10,XMM5
DIVSS XMM10,XMM7
MOVSS dword ptr [RDI],XMM10
XOR ECX,ECX
MOV dword ptr [RDI + 0x4],ECX
CVTSD2SS XMM0,XMM0
MOV dword ptr [RDI + 0x24],ECX
ADDSS XMM0,XMM6
DIVSS XMM0,XMM7
MOVSS dword ptr [RDI + 0x8],XMM0
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM2
ADDSS XMM0,XMM8
UNPCKLPS XMM5,XMM0
UNPCKLPS XMM9,XMM9
DIVPS XMM5,XMM9
MOVAPS XMM0,XMM4
ADDSS XMM0,XMM3
XORPS XMM0,xmmword ptr [0x001cf150]
XORPS XMM2,XMM2
MOVLHPS XMM2,XMM5
MOVUPS xmmword ptr [RDI + 0xc],XMM2
MULSS XMM4,XMM3
MULSS XMM4,dword ptr [0x001d3c5c]
MOV qword ptr [RDI + 0x1c],0x0
UNPCKLPS XMM0,XMM4
UNPCKLPS XMM1,XMM1
DIVPS XMM0,XMM1
MOVLPS qword ptr [RDI + 0x28],XMM0
MOVAPS XMM0,xmmword ptr [0x001dd360]
MOVUPS xmmword ptr [RDI + 0x30],XMM0
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
float * MatrixFrustum(double param_1,double param_2,double param_3,double param_4,double param_5,
double param_6,float *param_7)
{
int1 auVar1 [16];
int8 uVar2;
int1 auVar3 [16];
float fVar5;
uint uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int4 in_XMM9_Db;
int1 auVar4 [16];
uVar6 = (uint)((ulong)param_5 >> 0x20);
fVar5 = (float)param_5;
auVar7._0_4_ = fVar5 + fVar5;
*param_7 = auVar7._0_4_ / (float)(param_2 - param_1);
param_7[1] = 0.0;
param_7[9] = 0.0;
param_7[2] = ((float)param_1 + (float)param_2) / (float)(param_2 - param_1);
auVar7._4_4_ = (float)param_3 + (float)param_4;
auVar7._8_4_ = uVar6;
auVar7._12_4_ = 0;
auVar1._4_4_ = (float)(param_4 - param_3);
auVar1._0_4_ = (float)(param_4 - param_3);
auVar1._8_4_ = in_XMM9_Db;
auVar1._12_4_ = in_XMM9_Db;
auVar8 = divps(auVar7,auVar1);
auVar3._0_4_ = (uint)(fVar5 + (float)param_6) ^ _DAT_001cf150;
auVar4._4_4_ = uVar6 ^ _UNK_001cf154;
auVar4._0_4_ = auVar3._0_4_;
param_7[3] = 0.0;
param_7[4] = 0.0;
*(long *)(param_7 + 5) = auVar8._0_8_;
fVar5 = fVar5 * (float)param_6 * DAT_001d3c5c;
param_7[7] = 0.0;
param_7[8] = 0.0;
auVar4._8_4_ = auVar4._4_4_;
auVar4._12_4_ = uVar6;
auVar3._8_8_ = auVar4._8_8_;
auVar3._4_4_ = fVar5;
auVar8._4_4_ = (float)(param_6 - param_5);
auVar8._0_4_ = (float)(param_6 - param_5);
auVar8._8_8_ = 0;
auVar8 = divps(auVar3,auVar8);
*(long *)(param_7 + 10) = auVar8._0_8_;
uVar2 = _UNK_001dd368;
*(int8 *)(param_7 + 0xc) = _DAT_001dd360;
*(int8 *)(param_7 + 0xe) = uVar2;
return param_7;
}
|
|
1,593 | google::protobuf::(anonymous namespace)::NewAllowedProto3Extendee[abi:cxx11]() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | std::set<std::string>* NewAllowedProto3Extendee() {
auto allowed_proto3_extendees = new std::set<std::string>;
const char* kOptionNames[] = {
"FileOptions", "MessageOptions", "FieldOptions",
"EnumOptions", "EnumValueOptions", "ServiceOptions",
"MethodOptions", "OneofOptions", "ExtensionRangeOptions"};
for (const char* option_name : kOptionNames) {
// descriptor.proto has a different package name in opensource. We allow
// both so the opensource protocol compiler can also compile internal
// proto3 files with custom options. See: b/27567912
allowed_proto3_extendees->insert(std::string("google.protobuf.") +
option_name);
// Split the word to trick the opensource processing scripts so they
// will keep the original package name.
allowed_proto3_extendees->insert(std::string("proto") + "2." + option_name);
}
return allowed_proto3_extendees;
} | O0 | cpp | google::protobuf::(anonymous namespace)::NewAllowedProto3Extendee[abi:cxx11]():
subq $0x1a8, %rsp # imm = 0x1A8
movl $0x30, %edi
callq 0x13450
movq %rax, %rdi
movq %rdi, 0x48(%rsp)
callq 0x77df0
movq 0x48(%rsp), %rax
movq %rax, 0x1a0(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x210946(%rip), %rsi # 0x277c20
movl $0x48, %edx
callq 0x13390
leaq 0x150(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x148(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x138(%rsp)
movq 0x140(%rsp), %rax
cmpq 0x138(%rsp), %rax
je 0x675cc
movq 0x140(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x130(%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x13760
movq 0x40(%rsp), %rdx
leaq 0x188cb9(%rip), %rsi # 0x1f0025
leaq 0xf0(%rsp), %rdi
callq 0x135f0
jmp 0x6737b
movq 0x130(%rsp), %rdx
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x191c0
jmp 0x6739a
movq 0x38(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x896b0
movb %dl, 0x2f(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x673b7
movb 0x2f(%rsp), %al
movq 0x30(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movb %al, 0xd0(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x13290
leaq 0xf0(%rsp), %rdi
callq 0x13290
leaq 0xef(%rsp), %rdi
callq 0x134d0
movq 0x1a0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x13760
movq 0x20(%rsp), %rdx
leaq 0x18816c(%rip), %rsi # 0x1ef58a
leaq 0x68(%rsp), %rdi
callq 0x135f0
jmp 0x6742a
leaq 0x188c05(%rip), %rdx # 0x1f0036
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x191c0
jmp 0x67445
movq 0x130(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x191c0
jmp 0x67464
movq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x896b0
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x67481
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movb %al, 0x58(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x13290
leaq 0x88(%rsp), %rdi
callq 0x13290
leaq 0x68(%rsp), %rdi
callq 0x13290
leaq 0x67(%rsp), %rdi
callq 0x134d0
movq 0x140(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x140(%rsp)
jmp 0x67318
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x67534
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x67527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x13290
leaq 0xf0(%rsp), %rdi
callq 0x13290
leaq 0xef(%rsp), %rdi
callq 0x134d0
jmp 0x675dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x675c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x675b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
jmp 0x675a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x13290
leaq 0x88(%rsp), %rdi
callq 0x13290
leaq 0x68(%rsp), %rdi
callq 0x13290
leaq 0x67(%rsp), %rdi
callq 0x134d0
jmp 0x675dc
movq 0x1a0(%rsp), %rax
addq $0x1a8, %rsp # imm = 0x1A8
retq
movq 0xe0(%rsp), %rdi
callq 0x13750
nopl (%rax)
| _ZN6google8protobuf12_GLOBAL__N_124NewAllowedProto3ExtendeeB5cxx11Ev:
sub rsp, 1A8h
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov [rsp+1A8h+var_160], rdi
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EEC2Ev; std::set<std::string>::set(void)
mov rax, [rsp+1A8h+var_160]
mov [rsp+1A8h+var_8], rax
lea rdi, [rsp+1A8h+var_58]
lea rsi, off_277C20; "FileOptions"
mov edx, 48h ; 'H'
call _memcpy
lea rax, [rsp+1A8h+var_58]
mov [rsp+1A8h+var_60], rax
mov rax, [rsp+1A8h+var_60]
mov [rsp+1A8h+var_68], rax
mov rax, [rsp+1A8h+var_60]
add rax, 48h ; 'H'
mov [rsp+1A8h+var_70], rax
loc_67318:
mov rax, [rsp+1A8h+var_68]
cmp rax, [rsp+1A8h+var_70]
jz loc_675CC
mov rax, [rsp+1A8h+var_68]
mov rax, [rax]
mov [rsp+1A8h+var_78], rax
mov rax, [rsp+1A8h+var_8]
mov [rsp+1A8h+var_170], rax
lea rdi, [rsp+1A8h+var_B9]
mov [rsp+1A8h+var_168], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+1A8h+var_168]
lea rsi, aGoogleProtobuf_26; "google.protobuf."
lea rdi, [rsp+1A8h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_6737B:
mov rdx, [rsp+1A8h+var_78]
lea rdi, [rsp+1A8h+var_98]
lea rsi, [rsp+1A8h+var_B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_6739A:
mov rdi, [rsp+1A8h+var_170]
lea rsi, [rsp+1A8h+var_98]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE6insertEOS5_; std::set<std::string>::insert(std::string&&)
mov [rsp+1A8h+var_179], dl
mov [rsp+1A8h+var_178], rax
jmp short $+2
loc_673B7:
mov al, [rsp+1A8h+var_179]
mov rcx, [rsp+1A8h+var_178]
mov [rsp+1A8h+var_E0], rcx
mov [rsp+1A8h+var_D8], al
lea rdi, [rsp+1A8h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1A8h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1A8h+var_B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+1A8h+var_8]
mov [rsp+1A8h+var_190], rax
lea rdi, [rsp+1A8h+var_141]
mov [rsp+1A8h+var_188], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+1A8h+var_188]
lea rsi, aUnknownEnsureT+1Ch; "proto"
lea rdi, [rsp+1A8h+var_140]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_6742A:
lea rdx, a2; "2."
lea rdi, [rsp+1A8h+var_120]
lea rsi, [rsp+1A8h+var_140]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_67445:
mov rdx, [rsp+1A8h+var_78]
lea rdi, [rsp+1A8h+var_100]
lea rsi, [rsp+1A8h+var_120]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_67464:
mov rdi, [rsp+1A8h+var_190]
lea rsi, [rsp+1A8h+var_100]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE6insertEOS5_; std::set<std::string>::insert(std::string&&)
mov [rsp+1A8h+var_199], dl
mov [rsp+1A8h+var_198], rax
jmp short $+2
loc_67481:
mov al, [rsp+1A8h+var_199]
mov rcx, [rsp+1A8h+var_198]
mov [rsp+1A8h+var_158], rcx
mov [rsp+1A8h+var_150], al
lea rdi, [rsp+1A8h+var_100]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1A8h+var_120]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1A8h+var_140]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1A8h+var_141]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+1A8h+var_68]
add rax, 8
mov [rsp+1A8h+var_68], rax
jmp loc_67318
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
jmp short loc_67534
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
jmp short loc_67527
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
lea rdi, [rsp+arg_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_67527:
lea rdi, [rsp+arg_E8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_67534:
lea rdi, [rsp+arg_E7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_675DC
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
jmp short loc_675C0
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
jmp short loc_675B6
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
jmp short loc_675A9
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
lea rdi, [rsp+arg_A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_675A9:
lea rdi, [rsp+arg_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_675B6:
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_675C0:
lea rdi, [rsp+arg_5F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_675DC
loc_675CC:
mov rax, [rsp+1A8h+var_8]
add rsp, 1A8h
retn
loc_675DC:
mov rdi, [rsp+arg_D8]
call __Unwind_Resume
| long long google::protobuf::`anonymous namespace'::NewAllowedProto3Extendee[abi:cxx11]()
{
_BYTE *v0; // rsi
char v1; // dl
long long v3; // [rsp+18h] [rbp-190h]
long long v4; // [rsp+38h] [rbp-170h]
long long v5; // [rsp+48h] [rbp-160h]
char v6; // [rsp+67h] [rbp-141h] BYREF
_BYTE v7[32]; // [rsp+68h] [rbp-140h] BYREF
_BYTE v8[32]; // [rsp+88h] [rbp-120h] BYREF
_BYTE v9[32]; // [rsp+A8h] [rbp-100h] BYREF
long long v10; // [rsp+C8h] [rbp-E0h]
char v11; // [rsp+D0h] [rbp-D8h]
char v12; // [rsp+EFh] [rbp-B9h] BYREF
_BYTE v13[32]; // [rsp+F0h] [rbp-B8h] BYREF
_BYTE v14[32]; // [rsp+110h] [rbp-98h] BYREF
long long v15; // [rsp+130h] [rbp-78h]
long long *v16; // [rsp+138h] [rbp-70h]
long long *v17; // [rsp+140h] [rbp-68h]
_BYTE *v18; // [rsp+148h] [rbp-60h]
_BYTE v19[72]; // [rsp+150h] [rbp-58h] BYREF
long long v20; // [rsp+198h] [rbp-10h] BYREF
long long v21; // [rsp+1A0h] [rbp-8h]
v5 = operator new(0x30uLL);
std::set<std::string>::set(v5);
v21 = v5;
v0 = &off_277C20;
memcpy(v19, &off_277C20, sizeof(v19));
v18 = v19;
v17 = (long long *)v19;
v16 = &v20;
while ( v17 != v16 )
{
v15 = *v17;
v4 = v21;
std::allocator<char>::allocator(&v12, v0);
std::string::basic_string(v13, "google.protobuf.", &v12);
std::operator+<char>((long long)v14, (long long)v13, v15);
v10 = std::set<std::string>::insert(v4, v14);
v11 = v1;
std::string::~string(v14);
std::string::~string(v13);
std::allocator<char>::~allocator(&v12);
v3 = v21;
std::allocator<char>::allocator(&v6, v14);
std::string::basic_string(v7, "proto", &v6);
std::operator+<char>((long long)v8, (long long)v7, (long long)"2.");
std::operator+<char>((long long)v9, (long long)v8, v15);
v0 = v9;
std::set<std::string>::insert(v3, v9);
std::string::~string(v9);
std::string::~string(v8);
std::string::~string(v7);
std::allocator<char>::~allocator(&v6);
++v17;
}
return v21;
}
| NewAllowedProto3Extendee[abi:cxx11]:
SUB RSP,0x1a8
MOV EDI,0x30
CALL 0x00113450
MOV RDI,RAX
MOV qword ptr [RSP + 0x48],RDI
CALL 0x00177df0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x1a0],RAX
LEA RDI,[RSP + 0x150]
LEA RSI,[0x377c20]
MOV EDX,0x48
CALL 0x00113390
LEA RAX,[RSP + 0x150]
MOV qword ptr [RSP + 0x148],RAX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x140],RAX
MOV RAX,qword ptr [RSP + 0x148]
ADD RAX,0x48
MOV qword ptr [RSP + 0x138],RAX
LAB_00167318:
MOV RAX,qword ptr [RSP + 0x140]
CMP RAX,qword ptr [RSP + 0x138]
JZ 0x001675cc
MOV RAX,qword ptr [RSP + 0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0x1a0]
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0xef]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00113760
MOV RDX,qword ptr [RSP + 0x40]
LAB_00167365:
LEA RSI,[0x2f0025]
LEA RDI,[RSP + 0xf0]
CALL 0x001135f0
JMP 0x0016737b
LAB_0016737b:
MOV RDX,qword ptr [RSP + 0x130]
LAB_00167383:
LEA RDI,[RSP + 0x110]
LEA RSI,[RSP + 0xf0]
CALL 0x001191c0
JMP 0x0016739a
LAB_0016739a:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x110]
CALL 0x001896b0
MOV byte ptr [RSP + 0x2f],DL
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001673b7
LAB_001673b7:
MOV AL,byte ptr [RSP + 0x2f]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xc8],RCX
MOV byte ptr [RSP + 0xd0],AL
LEA RDI,[RSP + 0x110]
CALL 0x00113290
LEA RDI,[RSP + 0xf0]
CALL 0x00113290
LEA RDI,[RSP + 0xef]
CALL 0x001134d0
MOV RAX,qword ptr [RSP + 0x1a0]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x67]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00113760
MOV RDX,qword ptr [RSP + 0x20]
LAB_00167417:
LEA RSI,[0x2ef58a]
LEA RDI,[RSP + 0x68]
CALL 0x001135f0
JMP 0x0016742a
LAB_0016742a:
LEA RDX,[0x2f0036]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x68]
CALL 0x001191c0
JMP 0x00167445
LAB_00167445:
MOV RDX,qword ptr [RSP + 0x130]
LAB_0016744d:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x88]
CALL 0x001191c0
JMP 0x00167464
LAB_00167464:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xa8]
CALL 0x001896b0
LAB_00167476:
MOV byte ptr [RSP + 0xf],DL
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00167481
LAB_00167481:
MOV AL,byte ptr [RSP + 0xf]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RCX
MOV byte ptr [RSP + 0x58],AL
LEA RDI,[RSP + 0xa8]
CALL 0x00113290
LEA RDI,[RSP + 0x88]
CALL 0x00113290
LEA RDI,[RSP + 0x68]
CALL 0x00113290
LEA RDI,[RSP + 0x67]
CALL 0x001134d0
MOV RAX,qword ptr [RSP + 0x140]
ADD RAX,0x8
MOV qword ptr [RSP + 0x140],RAX
JMP 0x00167318
LAB_001675cc:
MOV RAX,qword ptr [RSP + 0x1a0]
ADD RSP,0x1a8
RET
|
/* google::protobuf::(anonymous namespace)::NewAllowedProto3Extendee[abi:cxx11]() */
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *
google::protobuf::(anonymous_namespace)::NewAllowedProto3Extendee_abi_cxx11_(void)
{
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*psVar1;
int1 extraout_DL;
allocator local_141;
string local_140 [32];
string local_120 [32];
string local_100 [32];
int8 local_e0;
int1 local_d8;
allocator local_b9;
string local_b8 [32];
string local_98 [32];
int8 local_78;
int8 *local_70;
int8 *local_68;
int8 *local_60;
int8 local_58 [9];
int8 uStack_10;
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*local_8;
psVar1 = (set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)operator_new(0x30);
std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>::
set(psVar1);
local_8 = psVar1;
memcpy(local_58,&DAT_00377c20,0x48);
local_70 = &uStack_10;
local_68 = local_58;
local_60 = local_68;
for (; psVar1 = local_8, local_68 != local_70; local_68 = local_68 + 1) {
local_78 = *local_68;
std::allocator<char>::allocator();
/* try { // try from 00167365 to 00167378 has its CatchHandler @ 001674da */
std::__cxx11::string::string(local_b8,"google.protobuf.",&local_b9);
/* try { // try from 00167383 to 00167397 has its CatchHandler @ 001674f0 */
std::operator+(local_98,(char *)local_b8);
/* try { // try from 0016739a to 001673ab has its CatchHandler @ 00167506 */
local_e0 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert(psVar1,local_98);
local_d8 = extraout_DL;
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string(local_b8);
std::allocator<char>::~allocator((allocator<char> *)&local_b9);
psVar1 = local_8;
std::allocator<char>::allocator();
/* try { // try from 00167417 to 00167427 has its CatchHandler @ 00167546 */
std::__cxx11::string::string(local_140,"proto",&local_141);
/* try { // try from 0016742a to 00167442 has its CatchHandler @ 0016755c */
std::operator+(local_120,(char *)local_140);
/* try { // try from 0016744d to 00167461 has its CatchHandler @ 00167572 */
std::operator+(local_100,(char *)local_120);
/* try { // try from 00167464 to 00167475 has its CatchHandler @ 00167588 */
std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>::
insert(psVar1,local_100);
std::__cxx11::string::~string(local_100);
std::__cxx11::string::~string(local_120);
std::__cxx11::string::~string(local_140);
std::allocator<char>::~allocator((allocator<char> *)&local_141);
}
return local_8;
}
|
|
1,594 | Field_datetime0::get_TIME(st_mysql_time*, unsigned char const*, date_mode_t) const | eloqsql/sql/field.cc | bool Field_datetime0::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
date_mode_t fuzzydate) const
{
DBUG_ASSERT(marked_for_read());
longlong tmp= sint8korr(pos);
uint32 part1,part2;
part1=(uint32) (tmp/1000000LL);
part2=(uint32) (tmp - (ulonglong) part1*1000000LL);
ltime->time_type= MYSQL_TIMESTAMP_DATETIME;
ltime->neg= 0;
ltime->second_part= 0;
ltime->second= (int) (part2%100);
ltime->minute= (int) (part2/100%100);
ltime->hour= (int) (part2/10000);
ltime->day= (int) (part1%100);
ltime->month= (int) (part1/100%100);
ltime->year= (int) (part1/10000);
return validate_MMDD(tmp, ltime->month, ltime->day, fuzzydate);
} | O0 | cpp | Field_datetime0::get_TIME(st_mysql_time*, unsigned char const*, date_mode_t) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %ecx, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xce9251
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0xf4240, %ecx # imm = 0xF4240
cqto
idivq %rcx
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0xf4240, %rcx, %rcx # imm = 0xF4240
subq %rcx, %rax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, 0x24(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movl -0x30(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movq -0x18(%rbp), %rax
movl %edx, 0x14(%rax)
movl -0x30(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movq -0x18(%rbp), %rax
movl %edx, 0x10(%rax)
movl -0x30(%rbp), %eax
movl $0x2710, %ecx # imm = 0x2710
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x2c(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movq -0x18(%rbp), %rax
movl %edx, 0x8(%rax)
movl -0x2c(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movq -0x18(%rbp), %rax
movl %edx, 0x4(%rax)
movl -0x2c(%rbp), %eax
movl $0x2710, %ecx # imm = 0x2710
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
setne %al
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %edx
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl -0x4(%rbp), %esi
movl %esi, -0x34(%rbp)
movl -0x34(%rbp), %r8d
movzbl %al, %esi
andl $0x1, %esi
callq 0xcf6ff0
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
| _ZNK15Field_datetime08get_TIMEEP13st_mysql_timePKh11date_mode_t:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], ecx
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
jmp short $+2
loc_CE9251:
mov rdi, [rbp+var_40]
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov ecx, 0F4240h
cqo
idiv rcx
mov [rbp+var_2C], eax
mov rax, [rbp+var_28]
mov ecx, [rbp+var_2C]
imul rcx, 0F4240h
sub rax, rcx
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov dword ptr [rax+24h], 1
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 0
mov rax, [rbp+var_18]
mov qword ptr [rax+18h], 0
mov eax, [rbp+var_30]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov rax, [rbp+var_18]
mov [rax+14h], edx
mov eax, [rbp+var_30]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov rax, [rbp+var_18]
mov [rax+10h], edx
mov eax, [rbp+var_30]
mov ecx, 2710h
xor edx, edx
div ecx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+0Ch], ecx
mov eax, [rbp+var_2C]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov rax, [rbp+var_18]
mov [rax+8], edx
mov eax, [rbp+var_2C]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov rax, [rbp+var_18]
mov [rax+4], edx
mov eax, [rbp+var_2C]
mov ecx, 2710h
xor edx, edx
div ecx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], ecx
cmp [rbp+var_28], 0
setnz al
mov rcx, [rbp+var_18]
mov edx, [rcx+4]
mov rcx, [rbp+var_18]
mov ecx, [rcx+8]
mov esi, [rbp+var_4]
mov [rbp+var_34], esi
mov r8d, [rbp+var_34]
movzx esi, al
and esi, 1
call _ZNK24Field_temporal_with_date13validate_MMDDEbjj11date_mode_t; Field_temporal_with_date::validate_MMDD(bool,uint,uint,date_mode_t)
and al, 1
add rsp, 40h
pop rbp
retn
| char Field_datetime0::get_TIME(long long a1, long long a2, long long *a3, unsigned int a4)
{
unsigned int v5; // [rsp+10h] [rbp-30h]
unsigned int v6; // [rsp+14h] [rbp-2Ch]
long long v7; // [rsp+18h] [rbp-28h]
v7 = *a3;
v6 = *a3 / 1000000;
v5 = *a3 % 1000000;
*(_DWORD *)(a2 + 36) = 1;
*(_BYTE *)(a2 + 32) = 0;
*(_QWORD *)(a2 + 24) = 0LL;
*(_DWORD *)(a2 + 20) = v5 % 0x64;
*(_DWORD *)(a2 + 16) = v5 / 0x64 % 0x64;
*(_DWORD *)(a2 + 12) = v5 / 0x2710;
*(_DWORD *)(a2 + 8) = v6 % 0x64;
*(_DWORD *)(a2 + 4) = v6 / 0x64 % 0x64;
*(_DWORD *)a2 = v6 / 0x2710;
return Field_temporal_with_date::validate_MMDD(a1, v7 != 0, *(unsigned int *)(a2 + 4), *(unsigned int *)(a2 + 8), a4) & 1;
}
| calc_pack_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP dword ptr [RBP + -0xc],0x13
JBE 0x00ce9258
MOV EDI,dword ptr [RBP + -0xc]
SUB EDI,0x1
SUB EDI,0x13
CALL 0x00d00590
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00ce9262
LAB_00ce9258:
MOV EAX,0x8
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00ce9262
LAB_00ce9262:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
/* Type_handler_datetime::calc_pack_length(unsigned int) const */
int4 __thiscall
Type_handler_datetime::calc_pack_length(Type_handler_datetime *this,uint param_1)
{
int4 local_18;
if (param_1 < 0x14) {
local_18 = 8;
}
else {
local_18 = hires_bytes(param_1 - 0x14);
}
return local_18;
}
|
|
1,595 | Field_datetime0::get_TIME(st_mysql_time*, unsigned char const*, date_mode_t) const | eloqsql/sql/field.cc | bool Field_datetime0::get_TIME(MYSQL_TIME *ltime, const uchar *pos,
date_mode_t fuzzydate) const
{
DBUG_ASSERT(marked_for_read());
longlong tmp= sint8korr(pos);
uint32 part1,part2;
part1=(uint32) (tmp/1000000LL);
part2=(uint32) (tmp - (ulonglong) part1*1000000LL);
ltime->time_type= MYSQL_TIMESTAMP_DATETIME;
ltime->neg= 0;
ltime->second_part= 0;
ltime->second= (int) (part2%100);
ltime->minute= (int) (part2/100%100);
ltime->hour= (int) (part2/10000);
ltime->day= (int) (part1%100);
ltime->month= (int) (part1/100%100);
ltime->year= (int) (part1/10000);
return validate_MMDD(tmp, ltime->month, ltime->day, fuzzydate);
} | O3 | cpp | Field_datetime0::get_TIME(st_mysql_time*, unsigned char const*, date_mode_t) const:
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rdi
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
movq %rdi, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
imull $0xfff0bdc0, %edx, %eax # imm = 0xFFF0BDC0
addl %edi, %eax
movl $0x1, 0x24(%rsi)
movb $0x0, 0x20(%rsi)
movq $0x0, 0x18(%rsi)
imulq $0x51eb851f, %rax, %r8 # imm = 0x51EB851F
shrq $0x25, %r8
imull $0x64, %r8d, %r9d
movl %eax, %r10d
subl %r9d, %r10d
movl %r10d, 0x14(%rsi)
imulq $0x28f5c29, %r8, %r9 # imm = 0x28F5C29
shrq $0x20, %r9
imull $0x64, %r9d, %r9d
subl %r9d, %r8d
movl %r8d, 0x10(%rsi)
movl $0xd1b71759, %r8d # imm = 0xD1B71759
imulq %r8, %rax
shrq $0x2d, %rax
movl %eax, 0xc(%rsi)
movl %edx, %r9d
imulq $0x51eb851f, %r9, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %r10d
subl %r10d, %edx
movl %edx, 0x8(%rsi)
imulq $0x28f5c29, %rax, %r10 # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r10d
subl %r10d, %eax
movl %eax, 0x4(%rsi)
imulq %r8, %r9
shrq $0x2d, %r9
movl %r9d, (%rsi)
testq %rdi, %rdi
je 0x980c4f
testl %eax, %eax
setne %al
testl %edx, %edx
setne %dl
testb %al, %dl
je 0x980c54
xorl %ecx, %ecx
jmp 0x980c5a
shrl $0x18, %ecx
jmp 0x980c57
shrl $0x17, %ecx
andl $0x1, %ecx
movl %ecx, %eax
popq %rbp
retq
| _ZNK15Field_datetime08get_TIMEEP13st_mysql_timePKh11date_mode_t:
push rbp
mov rbp, rsp
mov rdi, [rdx]
mov rdx, 431BDE82D7B634DBh
mov rax, rdi
imul rdx
mov rax, rdx
shr rax, 3Fh
sar rdx, 12h
add rdx, rax
imul eax, edx, 0FFF0BDC0h
add eax, edi
mov dword ptr [rsi+24h], 1
mov byte ptr [rsi+20h], 0
mov qword ptr [rsi+18h], 0
imul r8, rax, 51EB851Fh
shr r8, 25h
imul r9d, r8d, 64h ; 'd'
mov r10d, eax
sub r10d, r9d
mov [rsi+14h], r10d
imul r9, r8, 28F5C29h
shr r9, 20h
imul r9d, 64h ; 'd'
sub r8d, r9d
mov [rsi+10h], r8d
mov r8d, 0D1B71759h
imul rax, r8
shr rax, 2Dh
mov [rsi+0Ch], eax
mov r9d, edx
imul rax, r9, 51EB851Fh
shr rax, 25h
imul r10d, eax, 64h ; 'd'
sub edx, r10d
mov [rsi+8], edx
imul r10, rax, 28F5C29h
shr r10, 20h
imul r10d, 64h ; 'd'
sub eax, r10d
mov [rsi+4], eax
imul r9, r8
shr r9, 2Dh
mov [rsi], r9d
test rdi, rdi
jz short loc_980C4F
test eax, eax
setnz al
test edx, edx
setnz dl
test dl, al
jz short loc_980C54
xor ecx, ecx
jmp short loc_980C5A
loc_980C4F:
shr ecx, 18h
jmp short loc_980C57
loc_980C54:
shr ecx, 17h
loc_980C57:
and ecx, 1
loc_980C5A:
mov eax, ecx
pop rbp
retn
| long long Field_datetime0::get_TIME(long long a1, long long a2, long long *a3, unsigned int a4)
{
long long v4; // rdi
long long v5; // rdx
unsigned int v6; // r9d
unsigned long long v7; // rax
unsigned int v8; // edx
int v9; // eax
unsigned int v11; // ecx
v4 = *a3;
v5 = (unsigned __int128)(0x431BDE82D7B634DBLL * (__int128)*a3) >> 64;
LODWORD(v5) = ((unsigned long long)v5 >> 63) + (v5 >> 18);
*(_DWORD *)(a2 + 36) = 1;
*(_BYTE *)(a2 + 32) = 0;
*(_QWORD *)(a2 + 24) = 0LL;
*(_DWORD *)(a2 + 20) = ((int)v4 - 1000000 * (int)v5) % 0x64u;
*(_DWORD *)(a2 + 16) = ((int)v4 - 1000000 * (int)v5) / 0x64u
- 100 * ((42949673 * ((unsigned int)(v4 - 1000000 * v5) / 0x64uLL)) >> 32);
*(_DWORD *)(a2 + 12) = ((int)v4 - 1000000 * (int)v5) / 0x2710u;
v6 = v5;
v7 = (unsigned int)v5 / 0x64uLL;
v8 = (unsigned int)v5 % 0x64;
*(_DWORD *)(a2 + 8) = v8;
v9 = v7 - 100 * ((42949673 * v7) >> 32);
*(_DWORD *)(a2 + 4) = v9;
*(_DWORD *)a2 = v6 / 0x2710;
if ( !v4 )
{
v11 = HIBYTE(a4);
return v11 & 1;
}
if ( v9 == 0 || v8 == 0 )
{
v11 = a4 >> 23;
return v11 & 1;
}
return 0;
}
| |||
1,596 | my_numcells_eucjp | eloqsql/strings/ctype-ujis.c | static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_eucjp:
cmpq %rdx, %rsi
jae 0xca2a2
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0xca27b
cmpl $0x8f, %edi
jne 0xca287
movl $0x3, %edi
movl $0x2, %ecx
jmp 0xca295
movl $0x2, %edi
movl $0x1, %ecx
jmp 0xca295
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0xca25c
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_eucjp:
cmp rsi, rdx
jnb short loc_CA2A2
push rbp
mov rbp, rsp
xor eax, eax
loc_CA25C:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_CA27B
cmp edi, 8Fh
jnz short loc_CA287
mov edi, 3
mov ecx, 2
jmp short loc_CA295
loc_CA27B:
mov edi, 2
mov ecx, 1
jmp short loc_CA295
loc_CA287:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_CA295:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_CA25C
pop rbp
retn
loc_CA2A2:
xor eax, eax
retn
| long long my_numcells_eucjp(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_eucjp:
CMP RSI,RDX
JNC 0x001ca2a2
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001ca25c:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x001ca27b
CMP EDI,0x8f
JNZ 0x001ca287
MOV EDI,0x3
MOV ECX,0x2
JMP 0x001ca295
LAB_001ca27b:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x001ca295
LAB_001ca287:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_001ca295:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x001ca25c
POP RBP
RET
LAB_001ca2a2:
XOR EAX,EAX
RET
|
long my_numcells_eucjp(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
1,597 | add_directory | eloqsql/mysys/my_default.c | static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
{
char buf[FN_REFLEN];
size_t len;
char *p;
my_bool err __attribute__((unused));
len= normalize_dirname(buf, dir);
if (!(p= strmake_root(alloc, buf, len)))
return 1; /* Failure */
/* Should never fail if DEFAULT_DIRS_SIZE is correct size */
err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE);
DBUG_ASSERT(err == FALSE);
return 0;
} | O3 | c | add_directory:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq -0x220(%rbp), %r15
movq %r15, %rdi
callq 0x5cc67
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x5d4c5
testq %rax, %rax
je 0x5b5d3
movl $0x8, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5cf48
xorl %eax, %eax
jmp 0x5b5d8
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x5b5f5
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x36290
nop
| add_directory:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 208h
mov rbx, rdx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea r15, [rbp+var_220]
mov rdi, r15
call normalize_dirname
mov rdi, r14
mov rsi, r15
mov rdx, rax
call strmake_root
test rax, rax
jz short loc_5B5D3
mov edx, 8
mov rdi, rax
mov rsi, rbx
call array_append_string_unique
xor eax, eax
jmp short loc_5B5D8
loc_5B5D3:
mov eax, 1
loc_5B5D8:
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_5B5F5
add rsp, 208h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5B5F5:
call ___stack_chk_fail
| long long add_directory(long long a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // rax
_BYTE v7[512]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v8; // [rsp+200h] [rbp-20h]
v8 = __readfsqword(0x28u);
v4 = normalize_dirname(v7);
v5 = strmake_root(a1, v7, v4);
if ( !v5 )
return 1LL;
array_append_string_unique(v5, a3, 8LL);
return 0LL;
}
| add_directory:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x208
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA R15,[RBP + -0x220]
MOV RDI,R15
CALL 0x0015cc67
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x0015d4c5
TEST RAX,RAX
JZ 0x0015b5d3
MOV EDX,0x8
MOV RDI,RAX
MOV RSI,RBX
CALL 0x0015cf48
XOR EAX,EAX
JMP 0x0015b5d8
LAB_0015b5d3:
MOV EAX,0x1
LAB_0015b5d8:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x0015b5f5
ADD RSP,0x208
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015b5f5:
CALL 0x00136290
|
bool add_directory(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_228 [512];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = normalize_dirname(local_228);
lVar2 = strmake_root(param_1,local_228,uVar1);
if (lVar2 != 0) {
array_append_string_unique(lVar2,param_3,8);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar2 == 0;
}
|
|
1,598 | YAML::detail::node& YAML::detail::node_data::get<char [11]>(char const (&) [11], std::shared_ptr<YAML::detail::memory_holder>) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h | inline node& node_data::get(const Key& key, shared_memory_holder pMemory) {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) {
m_type = NodeType::Sequence;
return *pNode;
}
convert_to_map(pMemory);
break;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
if (it != m_map.end()) {
return *it->second;
}
node& k = convert_to_node(key, pMemory);
node& v = pMemory->create_node();
insert_map_pair(k, v);
return v;
} | O0 | c | YAML::detail::node& YAML::detail::node_data::get<char [11]>(char const (&) [11], std::shared_ptr<YAML::detail::memory_holder>):
subq $0xe8, %rsp
movq %rdx, 0x38(%rsp)
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xc8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x10(%rax), %eax
movq %rax, 0x48(%rsp)
subq $0x4, %rax
ja 0x2a2ad5
movq 0x48(%rsp), %rax
leaq 0x341699(%rip), %rcx # 0x5e4058
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x2a2ad5
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x1e4c50
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x29e440
movq %rax, 0x30(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x1e4c80
movq 0x30(%rsp), %rax
movq %rax, 0xc0(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x2a2a5c
movq 0x40(%rsp), %rax
movl $0x3, 0x10(%rax)
movq 0xc0(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x2a2c3f
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x365d20
jmp 0x2a2ad5
movl $0x40, %edi
callq 0x192f50
movq 0x40(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
addq $0x4, %rsi
movq 0xd0(%rsp), %rdx
callq 0x29e460
jmp 0x2a2a9a
movq 0x18(%rsp), %rdi
leaq 0x4a2d12(%rip), %rsi # 0x7457b8
leaq 0xc01d3(%rip), %rdx # 0x362c80
callq 0x198050
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x19ea50
jmp 0x2a2c4f
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0x1f13d0
movq 0x40(%rsp), %rdi
movq %rax, 0x90(%rsp)
addq $0x80, %rdi
callq 0x1f1400
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq 0xd0(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0x2a2c60
movq 0x40(%rsp), %rdi
movq %rax, 0x98(%rsp)
addq $0x80, %rdi
callq 0x1f1400
movq %rax, 0x70(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1ea1c0
xorb $-0x1, %al
testb $0x1, %al
jne 0x2a2b7e
jmp 0x2a2b9c
leaq 0x98(%rsp), %rdi
callq 0x1ea510
movq 0x8(%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0x2a2c3f
movq 0x38(%rsp), %rsi
movq 0xd0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1e4c50
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2a2ce0
movq %rax, 0x10(%rsp)
jmp 0x2a2bd1
leaq 0x58(%rsp), %rdi
callq 0x1e4c80
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rdi
movq %rax, 0x68(%rsp)
callq 0x1e4e30
movq %rax, %rdi
callq 0x1e4e40
movq 0x40(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x365d90
movq 0x50(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x2a2c3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x1e4c80
jmp 0x2a2c4f
movq 0xe0(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0x198ce0
nopl (%rax)
| _ZN4YAML6detail9node_data3getIA15_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
sub rsp, 0E8h
mov [rsp+0E8h+var_B0], rdx
mov [rsp+0E8h+var_10], rdi
mov [rsp+0E8h+var_18], rsi
mov [rsp+0E8h+var_20], rdx
mov rax, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_A8], rax
mov eax, [rax+10h]
mov [rsp+0E8h+var_A0], rax
sub rax, 4; switch 5 cases
ja def_2A29C6; jumptable 00000000002A29C6 default case
mov rax, [rsp+0E8h+var_A0]
lea rcx, jpt_2A29C6
movsxd rax, ds:(jpt_2A29C6 - 5E4058h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2A29C8:
jmp def_2A29C6; jumptable 00000000002A29C6 case 4
loc_2A29CD:
mov rsi, [rsp+0E8h+var_B0]; jumptable 00000000002A29C6 cases 0,1,3
mov rax, [rsp+0E8h+var_A8]
add rax, 60h ; '`'
mov [rsp+0E8h+var_C8], rax
mov rax, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_C0], rax
lea rdi, [rsp+0E8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+0E8h+var_C8]
mov rsi, [rsp+0E8h+var_C0]
lea rdx, [rsp+0E8h+var_38]
call _ZN4YAML6detail7get_idxIA15_cvE3getERKSt6vectorIPNS0_4nodeESaIS6_EERA15_KcSt10shared_ptrINS0_13memory_holderEE; YAML::detail::get_idx<char [15],void>::get(std::vector<YAML::detail::node *> const&,char const(&)[15],std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+0E8h+var_B8], rax
lea rdi, [rsp+0E8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_28], rax
cmp [rsp+0E8h+var_28], 0
jz short loc_2A2A5C
mov rax, [rsp+0E8h+var_A8]
mov dword ptr [rax+10h], 3
mov rax, [rsp+0E8h+var_28]
mov [rsp+0E8h+var_8], rax
jmp loc_2A2C3F
loc_2A2A5C:
mov rsi, [rsp+0E8h+var_B0]
mov rdi, [rsp+0E8h+var_A8]
call _ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
jmp short def_2A29C6; jumptable 00000000002A29C6 default case
loc_2A2A6D:
mov edi, 40h ; '@'; jumptable 00000000002A29C6 case 2
call ___cxa_allocate_exception
mov rsi, [rsp+0E8h+var_A8]
mov rdi, rax
mov rax, rdi
mov [rsp+0E8h+var_D0], rax
add rsi, 4
mov rdx, [rsp+0E8h+var_18]
call _ZN4YAML12BadSubscriptC2IA15_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [15]>(YAML::Mark const&,char [15] const&)
jmp short $+2
loc_2A2A9A:
mov rdi, [rsp+0E8h+var_D0]; void *
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML12BadSubscriptD2Ev; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0E8h+var_D0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0E8h+var_40], rcx
mov [rsp+0E8h+var_44], eax
call ___cxa_free_exception
jmp loc_2A2C4F
def_2A29C6:
mov rdi, [rsp+0E8h+var_A8]; jumptable 00000000002A29C6 default case
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE5beginEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(void)
mov rdi, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_58], rax
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov rcx, rax
mov rax, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_60], rcx
mov rcx, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_70], rcx
mov [rsp+0E8h+var_68], rax
mov rdi, [rsp+0E8h+var_58]
mov rsi, [rsp+0E8h+var_60]
mov rdx, [rsp+0E8h+var_70]
mov rcx, [rsp+0E8h+var_68]
call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEEZNS4_9node_data3getIA15_cEERS5_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_ESH_SH_SH_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node_data::get<char [15]>(char [15] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(char [15],char [15],YAML::detail::node_data::get<char [15]>(char [15] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1})
mov rdi, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_50], rax
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov [rsp+0E8h+var_78], rax
lea rdi, [rsp+0E8h+var_50]
lea rsi, [rsp+0E8h+var_78]
call _ZN9__gnu_cxxeqIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_2A2B7E
jmp short loc_2A2B9C
loc_2A2B7E:
lea rdi, [rsp+0E8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void)
mov rax, [rax+8]
mov [rsp+0E8h+var_8], rax
jmp loc_2A2C3F
loc_2A2B9C:
mov rsi, [rsp+0E8h+var_B0]
mov rax, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_E8], rax
lea rdi, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_E0], rdi
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+0E8h+var_E8]
mov rsi, [rsp+0E8h+var_E0]
call _ZN4YAML6detail9node_data15convert_to_nodeIA15_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_node<char [15]>(char [15] const&,std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_2A2BD1:
lea rdi, [rsp+0E8h+var_90]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_80], rax
call _ZNKSt19__shared_ptr_accessIN4YAML6detail13memory_holderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<YAML::detail::memory_holder,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax; this
call _ZN4YAML6detail13memory_holder11create_nodeEv; YAML::detail::memory_holder::create_node(void)
mov rdi, [rsp+0E8h+var_A8]; this
mov [rsp+0E8h+var_98], rax
mov rsi, [rsp+0E8h+var_80]; YAML::detail::node *
mov rdx, [rsp+0E8h+var_98]; YAML::detail::node *
call _ZN4YAML6detail9node_data15insert_map_pairERNS0_4nodeES3_; YAML::detail::node_data::insert_map_pair(YAML::detail::node &,YAML::detail::node &)
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_8], rax
jmp short loc_2A2C3F
mov rcx, rax
mov eax, edx
mov [rsp+0E8h+var_40], rcx
mov [rsp+0E8h+var_44], eax
lea rdi, [rsp+0E8h+var_90]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
jmp short loc_2A2C4F
loc_2A2C3F:
mov rax, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
loc_2A2C4F:
mov rdi, [rsp+0E8h+var_40]
call __Unwind_Resume
| YAML::detail::node * YAML::detail::node_data::get<char [15]>(
YAML::detail::node_data *a1,
long long a2,
long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
YAML::detail::memory_holder *v7; // rax
int v9; // [rsp+0h] [rbp-E8h]
YAML::detail::node *v10; // [rsp+10h] [rbp-D8h]
_QWORD *exception; // [rsp+18h] [rbp-D0h]
long long v12; // [rsp+30h] [rbp-B8h]
YAML::detail::node *node; // [rsp+50h] [rbp-98h]
_BYTE v15[16]; // [rsp+58h] [rbp-90h] BYREF
YAML::detail::node *v16; // [rsp+68h] [rbp-80h]
_QWORD v17[3]; // [rsp+70h] [rbp-78h] BYREF
long long v18; // [rsp+88h] [rbp-60h]
long long v19; // [rsp+90h] [rbp-58h]
long long v20; // [rsp+98h] [rbp-50h] BYREF
_BYTE v21[16]; // [rsp+B0h] [rbp-38h] BYREF
long long v22; // [rsp+C0h] [rbp-28h]
long long v23; // [rsp+C8h] [rbp-20h]
long long v24; // [rsp+D0h] [rbp-18h]
YAML::detail::node_data *v25; // [rsp+D8h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
switch ( *((_DWORD *)a1 + 4) )
{
case 0:
case 1:
case 3:
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v21, a3);
v12 = YAML::detail::get_idx<char [15],void>::get();
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v21);
v22 = v12;
if ( v12 )
{
*((_DWORD *)a1 + 4) = 3;
return (YAML::detail::node *)v22;
}
else
{
YAML::detail::node_data::convert_to_map(a1, a3);
LABEL_6:
v19 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin((long long)a1 + 128);
v18 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end((long long)a1 + 128);
v17[1] = v24;
v17[2] = a3;
v20 = std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node& YAML::detail::node_data::get<char [15]>(char [15] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(
v19,
v18,
v24,
a3);
v17[0] = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end((long long)a1 + 128);
if ( __gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>(
(long long)&v20,
(long long)v17) )
{
v9 = v24;
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v15, a3);
v10 = (YAML::detail::node *)YAML::detail::node_data::convert_to_node<char [15]>(
v9,
(unsigned int)v15,
v3,
v4,
v5,
v6,
v9,
(unsigned int)v15);
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v15);
v16 = v10;
v7 = (YAML::detail::memory_holder *)std::__shared_ptr_access<YAML::detail::memory_holder,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a3);
node = (YAML::detail::node *)YAML::detail::memory_holder::create_node(v7);
YAML::detail::node_data::insert_map_pair(a1, v16, node);
return node;
}
else
{
return *(YAML::detail::node **)(__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->((long long)&v20)
+ 8);
}
}
case 2:
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [15]>(exception, (long long)a1 + 4, v24);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::BadSubscript::~BadSubscript);
default:
goto LABEL_6;
}
}
| |||
1,599 | YAML::detail::node& YAML::detail::node_data::get<char [11]>(char const (&) [11], std::shared_ptr<YAML::detail::memory_holder>) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h | inline node& node_data::get(const Key& key, shared_memory_holder pMemory) {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) {
m_type = NodeType::Sequence;
return *pNode;
}
convert_to_map(pMemory);
break;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
if (it != m_map.end()) {
return *it->second;
}
node& k = convert_to_node(key, pMemory);
node& v = pMemory->create_node();
insert_map_pair(k, v);
return v;
} | O3 | c | YAML::detail::node& YAML::detail::node_data::get<char [11]>(char const (&) [11], std::shared_ptr<YAML::detail::memory_holder>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl $0x2, %eax
jb 0xc5f23
cmpl $0x3, %eax
je 0xc5f23
cmpl $0x2, %eax
jne 0xc5f51
movl $0x40, %edi
callq 0x80f20
movq %rax, %r14
addq $0x4, %rbx
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xc4cf2
leaq 0x1d4564(%rip), %rsi # 0x29a478
leaq 0x4f8f9(%rip), %rdx # 0x115814
movq %r14, %rdi
callq 0x83970
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xc5f46
movq 0x1dad95(%rip), %rax # 0x2a0cc8
cmpb $0x0, (%rax)
je 0xc5f3d
incl 0x8(%rdi)
jmp 0xc5f41
lock
incl 0x8(%rdi)
callq 0x81a00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x116684
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xc6065
cmpq 0x88(%rbx), %rax
je 0xc5f7c
movq 0x8(%rax), %r14
jmp 0xc6020
movq (%r14), %r13
movq 0x8(%r14), %r15
testq %r15, %r15
je 0xc5f9f
movq 0x1dad39(%rip), %rax # 0x2a0cc8
cmpb $0x0, (%rax)
je 0xc5f9a
incl 0x8(%r15)
jmp 0xc5f9f
lock
incl 0x8(%r15)
leaq 0x48(%rsp), %rsi
movq %r12, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0xa23f4
leaq 0x8(%rsp), %rdi
callq 0x9d0a4
movq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x11597c
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %r12
testq %rdi, %rdi
je 0xc5fdc
callq 0x81a00
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc5ff7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82190
testq %r15, %r15
je 0xc6004
movq %r15, %rdi
callq 0x81a00
movq (%r14), %rax
movq (%rax), %rdi
callq 0x1159d6
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1166cc
movq %r14, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x816f0
jmp 0xc605d
movq %rax, %rbx
jmp 0xc6050
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9c7d4
testq %r15, %r15
je 0xc605d
movq %r15, %rdi
callq 0x81a00
movq %rbx, %rdi
callq 0x83b70
| _ZN4YAML6detail9node_data3getIA12_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov eax, [rdi+10h]
cmp eax, 2
jb short loc_C5F23
cmp eax, 3
jz short loc_C5F23
cmp eax, 2
jnz short loc_C5F51
mov edi, 40h ; '@'; thrown_size
call ___cxa_allocate_exception
mov r14, rax
add rbx, 4
mov rdi, rax
mov rsi, rbx
mov rdx, r12
call _ZN4YAML12BadSubscriptC2IA12_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [12]>(YAML::Mark const&,char [12] const&)
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_C5F23:
mov rdi, [r14+8]
test rdi, rdi
jz short loc_C5F46
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_C5F3D
inc dword ptr [rdi+8]
jmp short loc_C5F41
loc_C5F3D:
lock inc dword ptr [rdi+8]
loc_C5F41:
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C5F46:
mov rdi, rbx; this
mov rsi, r14
call _ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
loc_C5F51:
mov rdi, [rbx+80h]
mov rsi, [rbx+88h]
mov rdx, r12
mov rcx, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZNS4_9node_data3getIA12_cEERS5_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_EEESJ_SJ_SJ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [12]>(char [12] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(char [12],char [12],__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [12]>(char [12] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>,std::random_access_iterator_tag)
cmp rax, [rbx+88h]
jz short loc_C5F7C
mov r14, [rax+8]
jmp loc_C6020
loc_C5F7C:
mov r13, [r14]
mov r15, [r14+8]
test r15, r15
jz short loc_C5F9F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_C5F9A
inc dword ptr [r15+8]
jmp short loc_C5F9F
loc_C5F9A:
lock inc dword ptr [r15+8]
loc_C5F9F:
lea rsi, [rsp+78h+var_30]
mov [rsi], r12
lea rdi, [rsp+78h+var_70]; this
call _ZN4YAML4NodeC2IPKcEERKT_; YAML::Node::Node<char const*>(char const* const&)
lea rdi, [rsp+78h+var_70]; this
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
mov rsi, [rsp+78h+var_48]
mov rdi, r13
call _ZN4YAML6detail13memory_holder5mergeERS1_; YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)
mov rdi, [rsp+78h+var_40]
mov r12, [rsp+78h+var_38]
test rdi, rdi
jz short loc_C5FDC
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C5FDC:
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C5FF7
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C5FF7:
test r15, r15
jz short loc_C6004
mov rdi, r15
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C6004:
mov rax, [r14]
mov rdi, [rax]; this
call _ZN4YAML6detail6memory11create_nodeEv; YAML::detail::memory::create_node(void)
mov r14, rax
mov rdi, rbx; this
mov rsi, r12; YAML::detail::node *
mov rdx, rax; YAML::detail::node *
call _ZN4YAML6detail9node_data15insert_map_pairERNS0_4nodeES3_; YAML::detail::node_data::insert_map_pair(YAML::detail::node &,YAML::detail::node &)
loc_C6020:
mov rax, r14
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_C605D
mov rbx, rax
jmp short loc_C6050
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
loc_C6050:
test r15, r15
jz short loc_C605D
mov rdi, r15
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C605D:
mov rdi, rbx
call __Unwind_Resume
| YAML::detail::node * YAML::detail::node_data::get<char [12]>(
YAML::detail::node_data *this,
long long a2,
long long a3)
{
unsigned int v5; // eax
_QWORD *exception; // r14
long long v7; // rdi
long long v8; // rax
YAML::detail::node *node; // r14
YAML::detail::memory **v10; // r13
long long v11; // r15
YAML::detail::node *v12; // r12
YAML::detail::memory **v14; // [rsp+8h] [rbp-70h] BYREF
_QWORD *v15; // [rsp+10h] [rbp-68h]
_QWORD v16[3]; // [rsp+20h] [rbp-58h] BYREF
long long v17; // [rsp+38h] [rbp-40h]
YAML::detail::node *v18; // [rsp+40h] [rbp-38h]
long long v19[6]; // [rsp+48h] [rbp-30h] BYREF
v5 = *((_DWORD *)this + 4);
if ( v5 < 2 || v5 == 3 )
{
v7 = *(_QWORD *)(a3 + 8);
if ( v7 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v7 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v7 + 8));
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
}
YAML::detail::node_data::convert_to_map(this);
}
else if ( v5 == 2 )
{
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [12]>(exception, (_DWORD)this + 4, a2);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::Exception::~Exception);
}
v8 = std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node& YAML::detail::node_data::get<char [12]>(char [12] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(
*((_QWORD *)this + 16),
*((_QWORD *)this + 17),
a2,
a3);
if ( v8 != *((_QWORD *)this + 17) )
return *(YAML::detail::node **)(v8 + 8);
v10 = *(YAML::detail::memory ***)a3;
v11 = *(_QWORD *)(a3 + 8);
if ( v11 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v11 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v11 + 8));
}
v19[0] = a2;
YAML::Node::Node<char const*>((YAML::Node *)&v14, v19);
YAML::Node::EnsureNodeExists(&v14);
YAML::detail::memory_holder::merge(v10, v16[2]);
v12 = v18;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 != v16 )
operator delete(v15, v16[0] + 1LL);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
node = (YAML::detail::node *)YAML::detail::memory::create_node(**(YAML::detail::memory ***)a3);
YAML::detail::node_data::insert_map_pair(this, v12, node);
return node;
}
| get<char[12]>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x10]
CMP EAX,0x2
JC 0x001c5f23
CMP EAX,0x3
JZ 0x001c5f23
CMP EAX,0x2
JNZ 0x001c5f51
MOV EDI,0x40
CALL 0x00180f20
MOV R14,RAX
ADD RBX,0x4
LAB_001c5eff:
MOV RDI,RAX
MOV RSI,RBX
MOV RDX,R12
CALL 0x001c4cf2
LAB_001c5f0d:
LEA RSI,[0x39a478]
LEA RDX,[0x215814]
MOV RDI,R14
CALL 0x00183970
LAB_001c5f23:
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x001c5f46
MOV RAX,qword ptr [0x003a0cc8]
CMP byte ptr [RAX],0x0
JZ 0x001c5f3d
INC dword ptr [RDI + 0x8]
JMP 0x001c5f41
LAB_001c5f3d:
INC.LOCK dword ptr [RDI + 0x8]
LAB_001c5f41:
CALL 0x00181a00
LAB_001c5f46:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00216684
LAB_001c5f51:
MOV RDI,qword ptr [RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x88]
MOV RDX,R12
MOV RCX,R14
CALL 0x001c6065
CMP RAX,qword ptr [RBX + 0x88]
JZ 0x001c5f7c
MOV R14,qword ptr [RAX + 0x8]
JMP 0x001c6020
LAB_001c5f7c:
MOV R13,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x001c5f9f
MOV RAX,qword ptr [0x003a0cc8]
CMP byte ptr [RAX],0x0
JZ 0x001c5f9a
INC dword ptr [R15 + 0x8]
JMP 0x001c5f9f
LAB_001c5f9a:
INC.LOCK dword ptr [R15 + 0x8]
LAB_001c5f9f:
LEA RSI,[RSP + 0x48]
MOV qword ptr [RSI],R12
LAB_001c5fa7:
LEA RDI,[RSP + 0x8]
CALL 0x001a23f4
LAB_001c5fb1:
LEA RDI,[RSP + 0x8]
CALL 0x0019d0a4
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,R13
CALL 0x0021597c
LAB_001c5fc8:
MOV RDI,qword ptr [RSP + 0x38]
MOV R12,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x001c5fdc
CALL 0x00181a00
LAB_001c5fdc:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001c5ff7
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00182190
LAB_001c5ff7:
TEST R15,R15
JZ 0x001c6004
MOV RDI,R15
CALL 0x00181a00
LAB_001c6004:
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX]
CALL 0x002159d6
MOV R14,RAX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x002166cc
LAB_001c6020:
MOV RAX,R14
ADD RSP,0x50
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* YAML::detail::node& YAML::detail::node_data::get<char [12]>(char const (&) [12],
std::shared_ptr<YAML::detail::memory_holder>) */
node * __thiscall
YAML::detail::node_data::get<char[12]>(node_data *this,char *param_1,int8 *param_3)
{
uint uVar1;
memory_holder *this_00;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
BadSubscript *this_01;
long lVar3;
node *pnVar4;
Node local_70 [8];
long *local_68;
long local_58 [2];
memory_holder *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
node *local_38;
char *local_30;
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 < 2) || (uVar1 == 3)) {
p_Var2 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_3[1];
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_003a0cc8 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
}
convert_to_map(this,(shared_ptr *)param_3);
}
else if (uVar1 == 2) {
this_01 = (BadSubscript *)__cxa_allocate_exception(0x40);
/* try { // try from 001c5eff to 001c5f0c has its CatchHandler @ 001c6031 */
BadSubscript::BadSubscript<char[12]>(this_01,(Mark *)(this + 4),param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&BadSubscript::typeinfo,BadInsert::~BadInsert);
}
lVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char[12]>(char_const(&)[12],std::shared_ptr<YAML::detail::memory_holder>)::_lambda(std::pair<YAML::detail::node*,YAML::detail::node*>)_1_>>
(*(int8 *)(this + 0x80),*(int8 *)(this + 0x88),param_1,param_3);
if (lVar3 == *(long *)(this + 0x88)) {
this_00 = (memory_holder *)*param_3;
p_Var2 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_3[1];
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_003a0cc8 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
}
}
/* try { // try from 001c5fa7 to 001c5fb0 has its CatchHandler @ 001c603e */
local_30 = param_1;
Node::Node<char_const*>(local_70,&local_30);
/* try { // try from 001c5fb1 to 001c5fc7 has its CatchHandler @ 001c6043 */
Node::EnsureNodeExists(local_70);
memory_holder::merge(this_00,local_48);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
}
pnVar4 = (node *)memory::create_node(*(memory **)*param_3);
insert_map_pair(this,local_38,pnVar4);
}
else {
pnVar4 = *(node **)(lVar3 + 8);
}
return pnVar4;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.