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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,800 | LefDefParser::lefiProp::setPropNameMapString(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiProp.cpp | void
lefiProp::setPropNameMapString(const char *string)
{
int len;
dataType_ = 'N';
hasNameMapString_ = 1;
if ((len = strlen(string) + 1) > stringLength_)
bumpSize(len);
strcpy(stringData_, CASE(string));
} | O3 | cpp | LefDefParser::lefiProp::setPropNameMapString(char const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movw $0x4e01, 0x16(%rdi) # imm = 0x4E01
movq %rsi, %rdi
callq 0x20e0
movq %rax, %r15
incl %r15d
cmpl 0x20(%r14), %r15d
jle 0x39325
movq 0x18(%r14), %rdi
callq 0x322d0
movslq %r15d, %rdi
callq 0x30c15
movq %rax, 0x18(%r14)
movl %r15d, 0x20(%r14)
movb $0x0, (%rax)
movq 0x18(%r14), %r14
movq %rbx, %rdi
callq 0x33e9a
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x21d0
nop
| _ZN12LefDefParser8lefiProp20setPropNameMapStringEPKc:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov word ptr [rdi+16h], 4E01h
mov rdi, rsi
call _strlen
mov r15, rax
inc r15d
cmp r15d, [r14+20h]
jle short loc_39325
mov rdi, [r14+18h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
movsxd rdi, r15d; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [r14+18h], rax
mov [r14+20h], r15d
mov byte ptr [rax], 0
loc_39325:
mov r14, [r14+18h]
mov rdi, rbx; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r14
mov rsi, rax
pop rbx
pop r14
pop r15
jmp _strcpy
| long long LefDefParser::lefiProp::setPropNameMapString(LefDefParser::lefiProp *this, char *a2)
{
int v2; // r15d
_BYTE *v3; // rax
long long v4; // r14
LefDefParser *v5; // rax
*((_WORD *)this + 11) = 19969;
v2 = strlen(a2) + 1;
if ( v2 > *((_DWORD *)this + 8) )
{
LefDefParser::lefFree(*((LefDefParser **)this + 3), a2);
v3 = (_BYTE *)LefDefParser::lefMalloc((LefDefParser *)v2);
*((_QWORD *)this + 3) = v3;
*((_DWORD *)this + 8) = v2;
*v3 = 0;
}
v4 = *((_QWORD *)this + 3);
v5 = LefDefParser::CASE((LefDefParser *)a2, a2);
return strcpy(v4, v5);
}
| setPropNameMapString:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV word ptr [RDI + 0x16],0x4e01
MOV RDI,RSI
CALL 0x001020e0
MOV R15,RAX
INC R15D
CMP R15D,dword ptr [R14 + 0x20]
JLE 0x00139325
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x001322d0
MOVSXD RDI,R15D
CALL 0x00130c15
MOV qword ptr [R14 + 0x18],RAX
MOV dword ptr [R14 + 0x20],R15D
MOV byte ptr [RAX],0x0
LAB_00139325:
MOV R14,qword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x00133e9a
MOV RDI,R14
MOV RSI,RAX
POP RBX
POP R14
POP R15
JMP 0x001021d0
|
/* LefDefParser::lefiProp::setPropNameMapString(char const*) */
void __thiscall LefDefParser::lefiProp::setPropNameMapString(lefiProp *this,char *param_1)
{
size_t sVar1;
int1 *puVar2;
char *__src;
char *pcVar3;
int iVar4;
*(int2 *)(this + 0x16) = 0x4e01;
pcVar3 = param_1;
sVar1 = strlen(param_1);
iVar4 = (int)sVar1 + 1;
if (*(int *)(this + 0x20) < iVar4) {
lefFree(*(void **)(this + 0x18));
puVar2 = (int1 *)lefMalloc((LefDefParser *)(long)iVar4,(ulong)pcVar3);
*(int1 **)(this + 0x18) = puVar2;
*(int *)(this + 0x20) = iVar4;
*puVar2 = 0;
}
pcVar3 = *(char **)(this + 0x18);
__src = (char *)CASE(param_1);
strcpy(pcVar3,__src);
return;
}
| |
23,801 | start_of_next_entry | eloqsql/storage/maria/ma_blockrec.c | static inline uint start_of_next_entry(uchar *dir)
{
uchar *prev;
/*
Find previous used entry. (There is always a previous entry as
the directory never starts with a deleted entry)
*/
for (prev= dir - DIR_ENTRY_SIZE ;
prev[0] == 0 && prev[1] == 0 ;
prev-= DIR_ENTRY_SIZE)
{}
return (uint) uint2korr(prev);
} | O0 | c | start_of_next_entry:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x81546
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x8154f
jmp 0x8155f
jmp 0x81551
movq -0x10(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x81524
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
popq %rbp
retq
nopl (%rax,%rax)
| start_of_next_entry:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
loc_81524:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jnz short loc_81546
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0
setz al
mov [rbp+var_11], al
loc_81546:
mov al, [rbp+var_11]
test al, 1
jnz short loc_8154F
jmp short loc_8155F
loc_8154F:
jmp short $+2
loc_81551:
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
jmp short loc_81524
loc_8155F:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
pop rbp
retn
| long long start_of_next_entry(long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
_BYTE *i; // [rsp+2h] [rbp-10h]
for ( i = (_BYTE *)(a1 - 4); ; i -= 4 )
{
v2 = 0;
if ( !*i )
v2 = i[1] == 0;
if ( !v2 )
break;
}
return *(unsigned __int16 *)i;
}
| start_of_next_entry:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
LAB_00181524:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JNZ 0x00181546
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_00181546:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x0018154f
JMP 0x0018155f
LAB_0018154f:
JMP 0x00181551
LAB_00181551:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00181524
LAB_0018155f:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
POP RBP
RET
|
int2 start_of_next_entry(long param_1)
{
bool bVar1;
char *local_18;
local_18 = (char *)(param_1 + -4);
while( true ) {
bVar1 = false;
if (*local_18 == '\0') {
bVar1 = local_18[1] == '\0';
}
if (!bVar1) break;
local_18 = local_18 + -4;
}
return *(int2 *)local_18;
}
| |
23,802 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O3 | c | my_wc_mb_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x33c4c
cmpl $0x7f, %esi
ja 0x33c4d
movb %sil, (%rdx)
movl $0x1, %eax
retq
leal -0xa4(%rsi), %eax
cmpl $0x138, %eax # imm = 0x138
ja 0x33c68
movl %eax, %eax
leaq 0x139f3d(%rip), %rsi # 0x16dba0
jmp 0x33d43
leal -0x2c7(%rsi), %eax
cmpl $0x18a, %eax # imm = 0x18A
ja 0x33c83
movl %eax, %eax
leaq 0x13a1a2(%rip), %rsi # 0x16de20
jmp 0x33d43
leal -0x2015(%rsi), %eax
cmpl $0x2fd, %eax # imm = 0x2FD
ja 0x33c9e
movl %eax, %eax
leaq 0x13a4a7(%rip), %rsi # 0x16e140
jmp 0x33d43
leal -0x2460(%rsi), %eax
cmpl $0x1e2, %eax # imm = 0x1E2
ja 0x33cb9
movl %eax, %eax
leaq 0x13aa8c(%rip), %rsi # 0x16e740
jmp 0x33d43
leal -0x3000(%rsi), %eax
cmpl $0x129, %eax # imm = 0x129
ja 0x33cd1
movl %eax, %eax
leaq 0x13ae41(%rip), %rsi # 0x16eb10
jmp 0x33d43
leal -0x3220(%rsi), %eax
cmpl $0x9, %eax
ja 0x33ce7
movl %eax, %eax
leaq 0x13b08b(%rip), %rsi # 0x16ed70
jmp 0x33d43
leal -0x4e00(%rsi), %eax
cmpl $0x4d54, %eax # imm = 0x4D54
ja 0x33cff
movl %eax, %eax
leaq 0x13b093(%rip), %rsi # 0x16ed90
jmp 0x33d43
leal -0x9c7c(%rsi), %eax
cmpl $0x66, %eax
ja 0x33d15
movl %eax, %eax
leaq 0x144b2d(%rip), %rsi # 0x178840
jmp 0x33d43
leal -0x9e1f(%rsi), %eax
cmpl $0x181, %eax # imm = 0x181
ja 0x33d2d
movl %eax, %eax
leaq 0x144be5(%rip), %rsi # 0x178910
jmp 0x33d43
leal -0xff01(%rsi), %eax
cmpl $0xe4, %eax
ja 0x33d79
movl %eax, %eax
leaq 0x144edd(%rip), %rsi # 0x178c20
leaq (%rsi,%rax,2), %rax
pushq %rbp
movq %rsp, %rbp
movzwl (%rax), %esi
testw %si, %si
je 0x33d75
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x33d77
orl $0x8080, %esi # imm = 0x8080
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
jmp 0x33d77
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| my_wc_mb_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_33C4C
cmp esi, 7Fh
ja short loc_33C4D
mov [rdx], sil
mov eax, 1
locret_33C4C:
retn
loc_33C4D:
lea eax, [rsi-0A4h]
cmp eax, 138h
ja short loc_33C68
mov eax, eax
lea rsi, tab_uni_gb23120
jmp loc_33D43
loc_33C68:
lea eax, [rsi-2C7h]
cmp eax, 18Ah
ja short loc_33C83
mov eax, eax
lea rsi, tab_uni_gb23121
jmp loc_33D43
loc_33C83:
lea eax, [rsi-2015h]
cmp eax, 2FDh
ja short loc_33C9E
mov eax, eax
lea rsi, tab_uni_gb23122; "*!,!"
jmp loc_33D43
loc_33C9E:
lea eax, [rsi-2460h]
cmp eax, 1E2h
ja short loc_33CB9
mov eax, eax
lea rsi, tab_uni_gb23123; "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\""
jmp loc_33D43
loc_33CB9:
lea eax, [rsi-3000h]
cmp eax, 129h
ja short loc_33CD1
mov eax, eax
lea rsi, tab_uni_gb23124; "!!\"!#!(!"
jmp short loc_33D43
loc_33CD1:
lea eax, [rsi-3220h]
cmp eax, 9
ja short loc_33CE7
mov eax, eax
lea rsi, tab_uni_gb23125; "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\""
jmp short loc_33D43
loc_33CE7:
lea eax, [rsi-4E00h]
cmp eax, 4D54h
ja short loc_33CFF
mov eax, eax
lea rsi, tab_uni_gb23126; ";R!6"
jmp short loc_33D43
loc_33CFF:
lea eax, [rsi-9C7Ch]
cmp eax, 66h ; 'f'
ja short loc_33D15
mov eax, eax
lea rsi, tab_uni_gb23127
jmp short loc_33D43
loc_33D15:
lea eax, [rsi-9E1Fh]
cmp eax, 181h
ja short loc_33D2D
mov eax, eax
lea rsi, tab_uni_gb23128; "qD/p&<0pyC"
jmp short loc_33D43
loc_33D2D:
lea eax, [rsi-0FF01h]
cmp eax, 0E4h
ja short loc_33D79
mov eax, eax
lea rsi, tab_uni_gb23129; "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#"...
loc_33D43:
lea rax, [rsi+rax*2]
push rbp
mov rbp, rsp
movzx esi, word ptr [rax]
test si, si
jz short loc_33D75
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_33D77
or esi, 8080h
rol si, 8
mov [rdx], si
mov eax, 2
jmp short loc_33D77
loc_33D75:
xor eax, eax
loc_33D77:
pop rbp
retn
loc_33D79:
xor eax, eax
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
const char *v6; // rsi
__int16 v7; // si
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 > 0x7F )
{
LODWORD(v5) = a2 - 164;
if ( a2 - 164 > 0x138 )
{
LODWORD(v5) = a2 - 711;
if ( a2 - 711 > 0x18A )
{
LODWORD(v5) = a2 - 8213;
if ( a2 - 8213 > 0x2FD )
{
LODWORD(v5) = a2 - 9312;
if ( a2 - 9312 > 0x1E2 )
{
LODWORD(v5) = a2 - 12288;
if ( a2 - 12288 > 0x129 )
{
LODWORD(v5) = a2 - 12832;
if ( a2 - 12832 > 9 )
{
LODWORD(v5) = a2 - 19968;
if ( a2 - 19968 > 0x4D54 )
{
LODWORD(v5) = a2 - 40060;
if ( a2 - 40060 > 0x66 )
{
LODWORD(v5) = a2 - 40479;
if ( a2 - 40479 > 0x181 )
{
LODWORD(v5) = a2 - 65281;
if ( a2 - 65281 > 0xE4 )
return 0LL;
v5 = (unsigned int)v5;
v6 = "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I#J#K#L#M#"
"N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#+!";
}
else
{
v5 = (unsigned int)v5;
v6 = "qD/p&<0pyC";
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23127;
}
}
else
{
v5 = (unsigned int)v5;
v6 = ";R!6";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\"";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "!!\"!#!(!";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\"";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "*!,!";
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23121;
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23120;
}
v7 = *(_WORD *)&v6[2 * v5];
if ( v7 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = __ROL2__(v7 | 0x8080, 8);
return 2LL;
}
}
else
{
return 0LL;
}
}
else
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00133c4c
CMP ESI,0x7f
JA 0x00133c4d
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_00133c4c:
RET
LAB_00133c4d:
LEA EAX,[RSI + -0xa4]
CMP EAX,0x138
JA 0x00133c68
MOV EAX,EAX
LEA RSI,[0x26dba0]
JMP 0x00133d43
LAB_00133c68:
LEA EAX,[RSI + -0x2c7]
CMP EAX,0x18a
JA 0x00133c83
MOV EAX,EAX
LEA RSI,[0x26de20]
JMP 0x00133d43
LAB_00133c83:
LEA EAX,[RSI + -0x2015]
CMP EAX,0x2fd
JA 0x00133c9e
MOV EAX,EAX
LEA RSI,[0x26e140]
JMP 0x00133d43
LAB_00133c9e:
LEA EAX,[RSI + -0x2460]
CMP EAX,0x1e2
JA 0x00133cb9
MOV EAX,EAX
LEA RSI,[0x26e740]
JMP 0x00133d43
LAB_00133cb9:
LEA EAX,[RSI + -0x3000]
CMP EAX,0x129
JA 0x00133cd1
MOV EAX,EAX
LEA RSI,[0x26eb10]
JMP 0x00133d43
LAB_00133cd1:
LEA EAX,[RSI + -0x3220]
CMP EAX,0x9
JA 0x00133ce7
MOV EAX,EAX
LEA RSI,[0x26ed70]
JMP 0x00133d43
LAB_00133ce7:
LEA EAX,[RSI + -0x4e00]
CMP EAX,0x4d54
JA 0x00133cff
MOV EAX,EAX
LEA RSI,[0x26ed90]
JMP 0x00133d43
LAB_00133cff:
LEA EAX,[RSI + -0x9c7c]
CMP EAX,0x66
JA 0x00133d15
MOV EAX,EAX
LEA RSI,[0x278840]
JMP 0x00133d43
LAB_00133d15:
LEA EAX,[RSI + -0x9e1f]
CMP EAX,0x181
JA 0x00133d2d
MOV EAX,EAX
LEA RSI,[0x278910]
JMP 0x00133d43
LAB_00133d2d:
LEA EAX,[RSI + -0xff01]
CMP EAX,0xe4
JA 0x00133d79
MOV EAX,EAX
LEA RSI,[0x278c20]
LAB_00133d43:
LEA RAX,[RSI + RAX*0x2]
PUSH RBP
MOV RBP,RSP
MOVZX ESI,word ptr [RAX]
TEST SI,SI
JZ 0x00133d75
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00133d77
OR ESI,0x8080
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
JMP 0x00133d77
LAB_00133d75:
XOR EAX,EAX
LAB_00133d77:
POP RBP
RET
LAB_00133d79:
XOR EAX,EAX
RET
|
int8 my_wc_mb_gb2312(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
ulong uVar2;
ushort uVar3;
int1 *puVar4;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
if (0x7f < param_2) {
if (param_2 - 0xa4 < 0x139) {
uVar2 = (ulong)(param_2 - 0xa4);
puVar4 = tab_uni_gb23120;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar2 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_gb23121;
}
else if (param_2 - 0x2015 < 0x2fe) {
uVar2 = (ulong)(param_2 - 0x2015);
puVar4 = tab_uni_gb23122;
}
else if (param_2 - 0x2460 < 0x1e3) {
uVar2 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_gb23123;
}
else if (param_2 - 0x3000 < 0x12a) {
uVar2 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_gb23124;
}
else if (param_2 - 0x3220 < 10) {
uVar2 = (ulong)(param_2 - 0x3220);
puVar4 = tab_uni_gb23125;
}
else if (param_2 - 0x4e00 < 0x4d55) {
uVar2 = (ulong)(param_2 - 0x4e00);
puVar4 = &tab_uni_gb23126;
}
else if (param_2 - 0x9c7c < 0x67) {
uVar2 = (ulong)(param_2 - 0x9c7c);
puVar4 = tab_uni_gb23127;
}
else if (param_2 - 0x9e1f < 0x182) {
uVar2 = (ulong)(param_2 - 0x9e1f);
puVar4 = tab_uni_gb23128;
}
else {
uVar2 = (ulong)(param_2 - 0xff01);
if (0xe4 < param_2 - 0xff01) {
return 0;
}
puVar4 = tab_uni_gb23129;
}
if (*(ushort *)(puVar4 + uVar2 * 2) == 0) {
uVar1 = 0;
}
else {
uVar1 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
uVar3 = *(ushort *)(puVar4 + uVar2 * 2) | 0x8080;
*param_3 = uVar3 << 8 | uVar3 >> 8;
uVar1 = 2;
}
}
return uVar1;
}
*(char *)param_3 = (char)param_2;
uVar1 = 1;
}
return uVar1;
}
| |
23,803 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0xb7595
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x397a0(%rip), %rsi # 0xf0d27
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0xb77d9
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_B7595
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_B7595:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x001b7595
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1f0d27]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_001b7595:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001b77d9
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::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> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001b7593. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x001b75bf. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
23,804 | my_coll_rule_parse | eloqsql/strings/ctype-uca.c | static int
my_coll_rule_parse(MY_COLL_RULES *rules,
const char *str, const char *str_end)
{
MY_COLL_RULE_PARSER p;
my_coll_parser_init(&p, rules, str, str_end);
if (!my_coll_parser_exec(&p))
{
my_coll_lexem_print_error(my_coll_parser_curr(&p),
rules->loader->error,
sizeof(rules->loader->error) - 1,
p.errstr);
return 1;
}
return 0;
} | O0 | c | my_coll_rule_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp # imm = 0x1B0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x190(%rbp)
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq -0x190(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
leaq -0x180(%rbp), %rdi
callq 0x55460
leaq -0x180(%rbp), %rdi
callq 0x55510
cmpl $0x0, %eax
jne 0x5510d
leaq -0x180(%rbp), %rdi
callq 0x55690
movq %rax, %rdi
movq -0x190(%rbp), %rax
movq 0x28(%rax), %rsi
leaq -0x180(%rbp), %rcx
addq $0xf8, %rcx
movl $0x7f, %edx
callq 0x55580
movl $0x1, -0x184(%rbp)
jmp 0x55117
movl $0x0, -0x184(%rbp)
movl -0x184(%rbp), %eax
movl %eax, -0x1a4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x55144
movl -0x1a4(%rbp), %eax
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbp
retq
callq 0x242e0
nopl (%rax)
| my_coll_rule_parse:
push rbp
mov rbp, rsp
sub rsp, 1B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_190], rdi
mov [rbp+var_198], rsi
mov [rbp+var_1A0], rdx
mov rsi, [rbp+var_190]
mov rdx, [rbp+var_198]
mov rcx, [rbp+var_1A0]
lea rdi, [rbp+var_180]
call my_coll_parser_init
lea rdi, [rbp+var_180]
call my_coll_parser_exec
cmp eax, 0
jnz short loc_5510D
lea rdi, [rbp+var_180]
call my_coll_parser_curr
mov rdi, rax
mov rax, [rbp+var_190]
mov rsi, [rax+28h]
lea rcx, [rbp+var_180]
add rcx, 0F8h
mov edx, 7Fh
call my_coll_lexem_print_error
mov [rbp+var_184], 1
jmp short loc_55117
loc_5510D:
mov [rbp+var_184], 0
loc_55117:
mov eax, [rbp+var_184]
mov [rbp+var_1A4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_55144
mov eax, [rbp+var_1A4]
add rsp, 1B0h
pop rbp
retn
loc_55144:
call ___stack_chk_fail
| long long my_coll_rule_parse(long long a1, long long a2, long long a3)
{
long long v3; // rax
_BYTE v6[248]; // [rsp+30h] [rbp-180h] BYREF
_QWORD v7[17]; // [rsp+128h] [rbp-88h] BYREF
v7[16] = __readfsqword(0x28u);
my_coll_parser_init(v6, a1, a2, a3);
if ( (unsigned int)my_coll_parser_exec(v6) )
{
return 0;
}
else
{
v3 = my_coll_parser_curr(v6);
my_coll_lexem_print_error(v3, *(_QWORD *)(a1 + 40), 127LL, v7);
return 1;
}
}
| my_coll_rule_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1b0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x190],RDI
MOV qword ptr [RBP + -0x198],RSI
MOV qword ptr [RBP + -0x1a0],RDX
MOV RSI,qword ptr [RBP + -0x190]
MOV RDX,qword ptr [RBP + -0x198]
MOV RCX,qword ptr [RBP + -0x1a0]
LEA RDI,[RBP + -0x180]
CALL 0x00155460
LEA RDI,[RBP + -0x180]
CALL 0x00155510
CMP EAX,0x0
JNZ 0x0015510d
LEA RDI,[RBP + -0x180]
CALL 0x00155690
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x190]
MOV RSI,qword ptr [RAX + 0x28]
LEA RCX,[RBP + -0x180]
ADD RCX,0xf8
MOV EDX,0x7f
CALL 0x00155580
MOV dword ptr [RBP + -0x184],0x1
JMP 0x00155117
LAB_0015510d:
MOV dword ptr [RBP + -0x184],0x0
LAB_00155117:
MOV EAX,dword ptr [RBP + -0x184]
MOV dword ptr [RBP + -0x1a4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00155144
MOV EAX,dword ptr [RBP + -0x1a4]
ADD RSP,0x1b0
POP RBP
RET
LAB_00155144:
CALL 0x001242e0
|
bool my_coll_rule_parse(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_188 [248];
int1 auStack_90 [128];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_coll_parser_init(local_188,param_1,param_2,param_3);
iVar1 = my_coll_parser_exec(local_188);
if (iVar1 == 0) {
uVar2 = my_coll_parser_curr(local_188);
my_coll_lexem_print_error(uVar2,*(int8 *)(param_1 + 0x28),0x7f,auStack_90);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1 == 0;
}
| |
23,805 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O3 | c | my_wc_mb_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x6d9b8
cmpl $0x7f, %esi
ja 0x6d9b9
movb %sil, (%rdx)
movl $0x1, %eax
retq
leal -0xa4(%rsi), %eax
cmpl $0x138, %eax # imm = 0x138
ja 0x6d9d4
movl %eax, %eax
leaq 0x13eae1(%rip), %rsi # 0x1ac4b0
jmp 0x6daaf
leal -0x2c7(%rsi), %eax
cmpl $0x18a, %eax # imm = 0x18A
ja 0x6d9ef
movl %eax, %eax
leaq 0x13ed46(%rip), %rsi # 0x1ac730
jmp 0x6daaf
leal -0x2015(%rsi), %eax
cmpl $0x2fd, %eax # imm = 0x2FD
ja 0x6da0a
movl %eax, %eax
leaq 0x13f04b(%rip), %rsi # 0x1aca50
jmp 0x6daaf
leal -0x2460(%rsi), %eax
cmpl $0x1e2, %eax # imm = 0x1E2
ja 0x6da25
movl %eax, %eax
leaq 0x13f630(%rip), %rsi # 0x1ad050
jmp 0x6daaf
leal -0x3000(%rsi), %eax
cmpl $0x129, %eax # imm = 0x129
ja 0x6da3d
movl %eax, %eax
leaq 0x13f9e5(%rip), %rsi # 0x1ad420
jmp 0x6daaf
leal -0x3220(%rsi), %eax
cmpl $0x9, %eax
ja 0x6da53
movl %eax, %eax
leaq 0x13fc2f(%rip), %rsi # 0x1ad680
jmp 0x6daaf
leal -0x4e00(%rsi), %eax
cmpl $0x4d54, %eax # imm = 0x4D54
ja 0x6da6b
movl %eax, %eax
leaq 0x13fc37(%rip), %rsi # 0x1ad6a0
jmp 0x6daaf
leal -0x9c7c(%rsi), %eax
cmpl $0x66, %eax
ja 0x6da81
movl %eax, %eax
leaq 0x1496d1(%rip), %rsi # 0x1b7150
jmp 0x6daaf
leal -0x9e1f(%rsi), %eax
cmpl $0x181, %eax # imm = 0x181
ja 0x6da99
movl %eax, %eax
leaq 0x149789(%rip), %rsi # 0x1b7220
jmp 0x6daaf
leal -0xff01(%rsi), %eax
cmpl $0xe4, %eax
ja 0x6dae5
movl %eax, %eax
leaq 0x149a81(%rip), %rsi # 0x1b7530
leaq (%rsi,%rax,2), %rax
pushq %rbp
movq %rsp, %rbp
movzwl (%rax), %esi
testw %si, %si
je 0x6dae1
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x6dae3
orl $0x8080, %esi # imm = 0x8080
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
jmp 0x6dae3
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| my_wc_mb_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_6D9B8
cmp esi, 7Fh
ja short loc_6D9B9
mov [rdx], sil
mov eax, 1
locret_6D9B8:
retn
loc_6D9B9:
lea eax, [rsi-0A4h]
cmp eax, 138h
ja short loc_6D9D4
mov eax, eax
lea rsi, tab_uni_gb23120
jmp loc_6DAAF
loc_6D9D4:
lea eax, [rsi-2C7h]
cmp eax, 18Ah
ja short loc_6D9EF
mov eax, eax
lea rsi, tab_uni_gb23121
jmp loc_6DAAF
loc_6D9EF:
lea eax, [rsi-2015h]
cmp eax, 2FDh
ja short loc_6DA0A
mov eax, eax
lea rsi, tab_uni_gb23122; "*!,!"
jmp loc_6DAAF
loc_6DA0A:
lea eax, [rsi-2460h]
cmp eax, 1E2h
ja short loc_6DA25
mov eax, eax
lea rsi, tab_uni_gb23123; "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\""
jmp loc_6DAAF
loc_6DA25:
lea eax, [rsi-3000h]
cmp eax, 129h
ja short loc_6DA3D
mov eax, eax
lea rsi, tab_uni_gb23124; "!!\"!#!(!"
jmp short loc_6DAAF
loc_6DA3D:
lea eax, [rsi-3220h]
cmp eax, 9
ja short loc_6DA53
mov eax, eax
lea rsi, tab_uni_gb23125; "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\""
jmp short loc_6DAAF
loc_6DA53:
lea eax, [rsi-4E00h]
cmp eax, 4D54h
ja short loc_6DA6B
mov eax, eax
lea rsi, tab_uni_gb23126; ";R!6"
jmp short loc_6DAAF
loc_6DA6B:
lea eax, [rsi-9C7Ch]
cmp eax, 66h ; 'f'
ja short loc_6DA81
mov eax, eax
lea rsi, tab_uni_gb23127
jmp short loc_6DAAF
loc_6DA81:
lea eax, [rsi-9E1Fh]
cmp eax, 181h
ja short loc_6DA99
mov eax, eax
lea rsi, tab_uni_gb23128; "qD/p&<0pyC"
jmp short loc_6DAAF
loc_6DA99:
lea eax, [rsi-0FF01h]
cmp eax, 0E4h
ja short loc_6DAE5
mov eax, eax
lea rsi, tab_uni_gb23129; "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#"...
loc_6DAAF:
lea rax, [rsi+rax*2]
push rbp
mov rbp, rsp
movzx esi, word ptr [rax]
test si, si
jz short loc_6DAE1
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_6DAE3
or esi, 8080h
rol si, 8
mov [rdx], si
mov eax, 2
jmp short loc_6DAE3
loc_6DAE1:
xor eax, eax
loc_6DAE3:
pop rbp
retn
loc_6DAE5:
xor eax, eax
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
const char *v6; // rsi
__int16 v7; // si
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 > 0x7F )
{
LODWORD(v5) = a2 - 164;
if ( a2 - 164 > 0x138 )
{
LODWORD(v5) = a2 - 711;
if ( a2 - 711 > 0x18A )
{
LODWORD(v5) = a2 - 8213;
if ( a2 - 8213 > 0x2FD )
{
LODWORD(v5) = a2 - 9312;
if ( a2 - 9312 > 0x1E2 )
{
LODWORD(v5) = a2 - 12288;
if ( a2 - 12288 > 0x129 )
{
LODWORD(v5) = a2 - 12832;
if ( a2 - 12832 > 9 )
{
LODWORD(v5) = a2 - 19968;
if ( a2 - 19968 > 0x4D54 )
{
LODWORD(v5) = a2 - 40060;
if ( a2 - 40060 > 0x66 )
{
LODWORD(v5) = a2 - 40479;
if ( a2 - 40479 > 0x181 )
{
LODWORD(v5) = a2 - 65281;
if ( a2 - 65281 > 0xE4 )
return 0LL;
v5 = (unsigned int)v5;
v6 = "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I#J#K#L#M#"
"N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#+!";
}
else
{
v5 = (unsigned int)v5;
v6 = "qD/p&<0pyC";
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23127;
}
}
else
{
v5 = (unsigned int)v5;
v6 = ";R!6";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\"";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "!!\"!#!(!";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\"";
}
}
else
{
v5 = (unsigned int)v5;
v6 = "*!,!";
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23121;
}
}
else
{
v5 = (unsigned int)v5;
v6 = (const char *)&tab_uni_gb23120;
}
v7 = *(_WORD *)&v6[2 * v5];
if ( v7 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = __ROL2__(v7 | 0x8080, 8);
return 2LL;
}
}
else
{
return 0LL;
}
}
else
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0016d9b8
CMP ESI,0x7f
JA 0x0016d9b9
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_0016d9b8:
RET
LAB_0016d9b9:
LEA EAX,[RSI + -0xa4]
CMP EAX,0x138
JA 0x0016d9d4
MOV EAX,EAX
LEA RSI,[0x2ac4b0]
JMP 0x0016daaf
LAB_0016d9d4:
LEA EAX,[RSI + -0x2c7]
CMP EAX,0x18a
JA 0x0016d9ef
MOV EAX,EAX
LEA RSI,[0x2ac730]
JMP 0x0016daaf
LAB_0016d9ef:
LEA EAX,[RSI + -0x2015]
CMP EAX,0x2fd
JA 0x0016da0a
MOV EAX,EAX
LEA RSI,[0x2aca50]
JMP 0x0016daaf
LAB_0016da0a:
LEA EAX,[RSI + -0x2460]
CMP EAX,0x1e2
JA 0x0016da25
MOV EAX,EAX
LEA RSI,[0x2ad050]
JMP 0x0016daaf
LAB_0016da25:
LEA EAX,[RSI + -0x3000]
CMP EAX,0x129
JA 0x0016da3d
MOV EAX,EAX
LEA RSI,[0x2ad420]
JMP 0x0016daaf
LAB_0016da3d:
LEA EAX,[RSI + -0x3220]
CMP EAX,0x9
JA 0x0016da53
MOV EAX,EAX
LEA RSI,[0x2ad680]
JMP 0x0016daaf
LAB_0016da53:
LEA EAX,[RSI + -0x4e00]
CMP EAX,0x4d54
JA 0x0016da6b
MOV EAX,EAX
LEA RSI,[0x2ad6a0]
JMP 0x0016daaf
LAB_0016da6b:
LEA EAX,[RSI + -0x9c7c]
CMP EAX,0x66
JA 0x0016da81
MOV EAX,EAX
LEA RSI,[0x2b7150]
JMP 0x0016daaf
LAB_0016da81:
LEA EAX,[RSI + -0x9e1f]
CMP EAX,0x181
JA 0x0016da99
MOV EAX,EAX
LEA RSI,[0x2b7220]
JMP 0x0016daaf
LAB_0016da99:
LEA EAX,[RSI + -0xff01]
CMP EAX,0xe4
JA 0x0016dae5
MOV EAX,EAX
LEA RSI,[0x2b7530]
LAB_0016daaf:
LEA RAX,[RSI + RAX*0x2]
PUSH RBP
MOV RBP,RSP
MOVZX ESI,word ptr [RAX]
TEST SI,SI
JZ 0x0016dae1
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x0016dae3
OR ESI,0x8080
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
JMP 0x0016dae3
LAB_0016dae1:
XOR EAX,EAX
LAB_0016dae3:
POP RBP
RET
LAB_0016dae5:
XOR EAX,EAX
RET
|
int8 my_wc_mb_gb2312(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
ulong uVar2;
ushort uVar3;
int1 *puVar4;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
if (0x7f < param_2) {
if (param_2 - 0xa4 < 0x139) {
uVar2 = (ulong)(param_2 - 0xa4);
puVar4 = tab_uni_gb23120;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar2 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_gb23121;
}
else if (param_2 - 0x2015 < 0x2fe) {
uVar2 = (ulong)(param_2 - 0x2015);
puVar4 = tab_uni_gb23122;
}
else if (param_2 - 0x2460 < 0x1e3) {
uVar2 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_gb23123;
}
else if (param_2 - 0x3000 < 0x12a) {
uVar2 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_gb23124;
}
else if (param_2 - 0x3220 < 10) {
uVar2 = (ulong)(param_2 - 0x3220);
puVar4 = tab_uni_gb23125;
}
else if (param_2 - 0x4e00 < 0x4d55) {
uVar2 = (ulong)(param_2 - 0x4e00);
puVar4 = &tab_uni_gb23126;
}
else if (param_2 - 0x9c7c < 0x67) {
uVar2 = (ulong)(param_2 - 0x9c7c);
puVar4 = tab_uni_gb23127;
}
else if (param_2 - 0x9e1f < 0x182) {
uVar2 = (ulong)(param_2 - 0x9e1f);
puVar4 = tab_uni_gb23128;
}
else {
uVar2 = (ulong)(param_2 - 0xff01);
if (0xe4 < param_2 - 0xff01) {
return 0;
}
puVar4 = tab_uni_gb23129;
}
if (*(ushort *)(puVar4 + uVar2 * 2) == 0) {
uVar1 = 0;
}
else {
uVar1 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
uVar3 = *(ushort *)(puVar4 + uVar2 * 2) | 0x8080;
*param_3 = uVar3 << 8 | uVar3 >> 8;
uVar1 = 2;
}
}
return uVar1;
}
*(char *)param_3 = (char)param_2;
uVar1 = 1;
}
return uVar1;
}
| |
23,806 | my_charset_get_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *
my_charset_get_by_name(MY_CHARSET_LOADER *loader,
const char *cs_name, uint cs_flags, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
DBUG_ENTER("get_charset_by_csname");
DBUG_PRINT("enter",("name: '%s'", cs_name));
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_charset_number(cs_name, cs_flags, flags);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file);
}
DBUG_RETURN(cs);
} | O3 | c | my_charset_get_by_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq 0x3d5986(%rip), %rdi # 0x468270
leaq -0x9ae(%rip), %rsi # 0x91f43
callq 0x5f2f0
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x9212e
testl %eax, %eax
je 0x9291a
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x923d2
movq %rax, %r14
jmp 0x9291d
xorl %r14d, %r14d
testq %r14, %r14
setne %al
testb $0x10, %r15b
sete %cl
orb %al, %cl
jne 0x92967
leaq -0x240(%rbp), %r15
movq %r15, %rdi
callq 0x91d03
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movl $0x4, %esi
movl $0x16, %edi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x98ed3
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x92989
movq %r14, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x5f320
| my_charset_get_by_name:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r15, rcx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
mov esi, r12d
mov rdx, r15
call get_charset_number
test eax, eax
jz short loc_9291A
mov rdi, r14
mov esi, eax
mov rdx, r15
call get_internal_charset
mov r14, rax
jmp short loc_9291D
loc_9291A:
xor r14d, r14d
loc_9291D:
test r14, r14
setnz al
test r15b, 10h
setz cl
or cl, al
jnz short loc_92967
lea r15, [rbp+var_240]
mov rdi, r15
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov esi, 4
mov edi, 16h
mov rdx, rbx
mov rcx, r15
xor eax, eax
call my_error
loc_92967:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_92989
mov rax, r14
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_92989:
call ___stack_chk_fail
| long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int charset_number; // eax
long long internal_charset; // r14
int v8; // r8d
int v9; // r9d
_BYTE v11[536]; // [rsp+0h] [rbp-240h] BYREF
unsigned long long v12; // [rsp+218h] [rbp-28h]
v12 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
charset_number = get_charset_number(a2, a3, a4);
if ( charset_number )
internal_charset = get_internal_charset(a1, charset_number, a4);
else
internal_charset = 0LL;
if ( internal_charset == 0 && (a4 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v11), "Index.xml");
my_error(22, 4, a2, (unsigned int)v11, v8, v9);
}
return internal_charset;
}
| my_charset_get_by_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R15,RCX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x568270]
LEA RSI,[0x191f43]
CALL 0x0015f2f0
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
CALL 0x0019212e
TEST EAX,EAX
JZ 0x0019291a
MOV RDI,R14
MOV ESI,EAX
MOV RDX,R15
CALL 0x001923d2
MOV R14,RAX
JMP 0x0019291d
LAB_0019291a:
XOR R14D,R14D
LAB_0019291d:
TEST R14,R14
SETNZ AL
TEST R15B,0x10
SETZ CL
OR CL,AL
JNZ 0x00192967
LEA R15,[RBP + -0x240]
MOV RDI,R15
CALL 0x00191d03
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV ESI,0x4
MOV EDI,0x16
MOV RDX,RBX
MOV RCX,R15
XOR EAX,EAX
CALL 0x00198ed3
LAB_00192967:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00192989
MOV RAX,R14
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00192989:
CALL 0x0015f320
|
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4)
{
int iVar1;
long lVar2;
int8 *puVar3;
long in_FS_OFFSET;
int1 local_248 [536];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_charset_number(param_2,param_3,param_4);
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = get_internal_charset(param_1,iVar1,param_4);
}
if ((param_4 & 0x10) != 0 && lVar2 == 0) {
puVar3 = (int8 *)get_charsets_dir(local_248);
*puVar3 = 0x6d782e7865646e49;
*(int2 *)(puVar3 + 1) = 0x6c;
my_error(0x16,4,param_2,local_248);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,807 | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _add_primitive(const std::string & name, const BuiltinRule & rule) {
auto n = _add_rule(name, rule.content);
for (const auto & dep : rule.deps) {
BuiltinRule dep_rule;
auto it = PRIMITIVE_RULES.find(dep);
if (it == PRIMITIVE_RULES.end()) {
it = STRING_FORMAT_RULES.find(dep);
if (it == STRING_FORMAT_RULES.end()) {
_errors.push_back("Rule " + dep + " not known");
continue;
}
}
if (_rules.find(dep) == _rules.end()) {
_add_primitive(dep, it->second);
}
}
return n;
} | O2 | cpp | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, (%rsp)
callq 0x8a13c
movq 0x20(%r14), %r15
movq 0x28(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x40(%rsp), %rbp
leaq 0x28(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0xc8(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x88(%rsp), %r13
leaq 0xa8(%rsp), %r12
cmpq 0x28(%rsp), %r15
je 0x8d582
movq %rbp, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbp)
andq $0x0, 0x20(%rbp)
leaq 0x4e0bb(%rip), %rdi # 0xdb588
movq %r15, %rsi
callq 0x91570
movq %rax, %rbx
testq %rax, %rax
jne 0x8d4f4
leaq 0x4e0dc(%rip), %rdi # 0xdb5c0
movq %r15, %rsi
callq 0x91570
movq %rax, %rbx
testq %rax, %rax
je 0x8d528
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x8a422
cmpq 0x18(%rsp), %rax
jne 0x8d56f
addq $0x28, %rbx
leaq 0x68(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x8d43a
leaq 0x68(%rsp), %rdi
jmp 0x8d56a
movq %r13, %rbx
movq %r13, %rdi
leaq 0x1161b(%rip), %rsi # 0x9eb50
movq %r15, %rdx
callq 0x27584
movq %r12, %r14
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x11609(%rip), %rdx # 0x9eb56
callq 0x27565
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x74334
movq %r14, %rdi
callq 0x22078
movq %rbx, %rdi
callq 0x22078
leaq 0x30(%rsp), %rdi
callq 0x886b2
addq $0x20, %r15
jmp 0x8d49f
movq (%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x22078
jmp 0x8d5ad
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x22078
jmp 0x8d5c5
jmp 0x8d5c2
jmp 0x8d5c2
jmp 0x8d5c2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x886b2
movq (%rsp), %rdi
callq 0x22078
movq %rbx, %rdi
callq 0x21e50
| _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r14, rcx
mov rbx, rsi
mov [rsp+0F8h+var_F8], rdi
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov r15, [r14+20h]
mov rax, [r14+28h]
mov [rsp+0F8h+var_D0], rax
lea rbp, [rsp+0F8h+var_B8]
lea rax, [rbx+28h]
mov [rsp+0F8h+var_D8], rax
lea rax, [rbx+30h]
mov [rsp+0F8h+var_E0], rax
mov [rsp+0F8h+var_E8], rbx
lea rax, [rbx+0C8h]
mov [rsp+0F8h+var_F0], rax
lea r13, [rsp+0F8h+var_70]
lea r12, [rsp+0F8h+var_50]
loc_8D49F:
cmp r15, [rsp+0F8h+var_D0]
jz loc_8D582
mov [rsp+0F8h+var_C8], rbp
and [rsp+0F8h+var_C0], 0
mov [rsp+0F8h+var_B8], 0
xorps xmm0, xmm0
movups xmmword ptr [rbp+10h], xmm0
and qword ptr [rbp+20h], 0
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbx, rax
test rax, rax
jnz short loc_8D4F4
lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbx, rax
test rax, rax
jz short loc_8D528
loc_8D4F4:
mov rdi, [rsp+0F8h+var_D8]
mov rsi, r15
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
cmp rax, [rsp+0F8h+var_E0]
jnz short loc_8D56F
add rbx, 28h ; '('
lea rdi, [rsp+0F8h+var_90]
mov rsi, [rsp+0F8h+var_E8]
mov rdx, r15
mov rcx, rbx
call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&)
lea rdi, [rsp+0F8h+var_90]
jmp short loc_8D56A
loc_8D528:
mov rbx, r13
mov rdi, r13
lea rsi, aRule; "Rule "
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov r14, r12
mov rdi, r12
mov rsi, rbx
lea rdx, aNotKnown; " not known"
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, [rsp+0F8h+var_F0]
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx; void *
loc_8D56A:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8D56F:
lea rdi, [rsp+0F8h+var_C8]; this
call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule()
add r15, 20h ; ' '
jmp loc_8D49F
loc_8D582:
mov rax, [rsp+0F8h+var_F8]
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5AD
mov rbx, rax
loc_8D5AD:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5C5
jmp short loc_8D5C2
jmp short loc_8D5C2
jmp short $+2
loc_8D5C2:
mov rbx, rax
loc_8D5C5:
lea rdi, [rsp+arg_28]; this
call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule()
mov rdi, [rsp+0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_add_primitive(long long a1, long long a2, _QWORD *a3, long long *a4)
{
long long v5; // r15
long long v6; // rax
int v7; // ebx
long long v8; // rax
int v9; // r8d
int v10; // r9d
_DWORD *v11; // rdi
long long v13; // [rsp+0h] [rbp-F8h]
long long v14; // [rsp+8h] [rbp-F0h]
int v15; // [rsp+10h] [rbp-E8h]
long long v16; // [rsp+18h] [rbp-E0h]
long long v17; // [rsp+20h] [rbp-D8h]
long long v18; // [rsp+28h] [rbp-D0h]
_DWORD *v19; // [rsp+30h] [rbp-C8h] BYREF
long long v20; // [rsp+38h] [rbp-C0h]
_DWORD v21[4]; // [rsp+40h] [rbp-B8h] BYREF
__int128 v22; // [rsp+50h] [rbp-A8h]
long long v23; // [rsp+60h] [rbp-98h]
_DWORD v24[6]; // [rsp+68h] [rbp-90h] BYREF
char v25; // [rsp+80h] [rbp-78h]
_DWORD v26[6]; // [rsp+88h] [rbp-70h] BYREF
char v27; // [rsp+A0h] [rbp-58h]
_BYTE v28[80]; // [rsp+A8h] [rbp-50h] BYREF
v13 = a1;
SchemaConverter::_add_rule(a1, a2, a3, a4);
v5 = a4[4];
v18 = a4[5];
v17 = a2 + 40;
v16 = a2 + 48;
v15 = a2;
v14 = a2 + 200;
while ( v5 != v18 )
{
v19 = v21;
v20 = 0LL;
LOBYTE(v21[0]) = 0;
v22 = 0LL;
v23 = 0LL;
v6 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
&PRIMITIVE_RULES[abi:cxx11],
v5);
v7 = v6;
if ( v6
|| (v8 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
&STRING_FORMAT_RULES[abi:cxx11],
v5),
v7 = v8,
v8) )
{
if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
v17,
v5) != v16 )
goto LABEL_9;
SchemaConverter::_add_primitive(
(unsigned int)v24,
v15,
v5,
v7 + 40,
v9,
v10,
v13,
v14,
v15,
v16,
v17,
v18,
(_DWORD)v19,
v20,
v21[0],
v21[2],
v22,
DWORD2(v22),
v23,
v24[0],
v24[2],
v24[4],
v25,
v26[0],
v26[2],
v26[4],
v27);
v11 = v24;
}
else
{
std::operator+<char>((long long)v26, (long long)"Rule ", v5);
std::operator+<char>((long long)v28, (long long)v26, (long long)" not known");
std::vector<std::string>::emplace_back<std::string>(v14, (long long)v28);
std::string::~string(v28);
v11 = v26;
}
std::string::~string(v11);
LABEL_9:
BuiltinRule::~BuiltinRule((BuiltinRule *)&v19);
v5 += 32LL;
}
return v13;
}
| _add_primitive:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R14,RCX
MOV RBX,RSI
MOV qword ptr [RSP],RDI
CALL 0x0018a13c
MOV R15,qword ptr [R14 + 0x20]
MOV RAX,qword ptr [R14 + 0x28]
MOV qword ptr [RSP + 0x28],RAX
LEA RBP,[RSP + 0x40]
LEA RAX,[RBX + 0x28]
MOV qword ptr [RSP + 0x20],RAX
LEA RAX,[RBX + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],RBX
LEA RAX,[RBX + 0xc8]
MOV qword ptr [RSP + 0x8],RAX
LEA R13,[RSP + 0x88]
LEA R12,[RSP + 0xa8]
LAB_0018d49f:
CMP R15,qword ptr [RSP + 0x28]
JZ 0x0018d582
MOV qword ptr [RSP + 0x30],RBP
AND qword ptr [RSP + 0x38],0x0
MOV byte ptr [RSP + 0x40],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x10],XMM0
AND qword ptr [RBP + 0x20],0x0
LAB_0018d4c6:
LEA RDI,[0x1db588]
MOV RSI,R15
CALL 0x00191570
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x0018d4f4
LAB_0018d4dd:
LEA RDI,[0x1db5c0]
MOV RSI,R15
CALL 0x00191570
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0018d528
LAB_0018d4f4:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,R15
CALL 0x0018a422
CMP RAX,qword ptr [RSP + 0x18]
JNZ 0x0018d56f
ADD RBX,0x28
LAB_0018d50c:
LEA RDI,[RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV RCX,RBX
CALL 0x0018d43a
LEA RDI,[RSP + 0x68]
JMP 0x0018d56a
LAB_0018d528:
MOV RBX,R13
MOV RDI,R13
LEA RSI,[0x19eb50]
MOV RDX,R15
CALL 0x00127584
LAB_0018d53d:
MOV R14,R12
MOV RDI,R12
MOV RSI,RBX
LEA RDX,[0x19eb56]
CALL 0x00127565
LAB_0018d552:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x00174334
LAB_0018d55f:
MOV RDI,R14
CALL 0x00122078
MOV RDI,RBX
LAB_0018d56a:
CALL 0x00122078
LAB_0018d56f:
LEA RDI,[RSP + 0x30]
CALL 0x001886b2
ADD R15,0x20
JMP 0x0018d49f
LAB_0018d582:
MOV RAX,qword ptr [RSP]
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_add_primitive(std::__cxx11::string const&, BuiltinRule const&) */
string * SchemaConverter::_add_primitive(string *param_1,BuiltinRule *param_2)
{
string *psVar1;
long lVar2;
BuiltinRule *pBVar3;
long in_RCX;
string *this;
string *psVar4;
int1 *local_c8;
int8 local_c0;
int1 local_b8 [16];
int8 local_a8;
int8 uStack_a0;
int8 local_98;
string local_90 [32];
string local_70 [32];
string local_50 [32];
_add_rule(param_1,(string *)param_2);
psVar4 = *(string **)(in_RCX + 0x20);
psVar1 = *(string **)(in_RCX + 0x28);
do {
if (psVar4 == psVar1) {
return param_1;
}
local_c0 = 0;
local_b8[0] = 0;
local_a8 = 0;
uStack_a0 = 0;
local_98 = 0;
local_c8 = local_b8;
/* try { // try from 0018d4c6 to 0018d4d4 has its CatchHandler @ 0018d5c2 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)PRIMITIVE_RULES_abi_cxx11_,psVar4);
if (lVar2 == 0) {
/* try { // try from 0018d4dd to 0018d4eb has its CatchHandler @ 0018d5be */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)STRING_FORMAT_RULES_abi_cxx11_,psVar4);
if (lVar2 != 0) goto LAB_0018d4f4;
/* try { // try from 0018d528 to 0018d53c has its CatchHandler @ 0018d5bc */
std::operator+((char *)local_70,(string *)"Rule ");
/* try { // try from 0018d53d to 0018d551 has its CatchHandler @ 0018d5aa */
std::operator+(local_50,(char *)local_70);
/* try { // try from 0018d552 to 0018d55e has its CatchHandler @ 0018d598 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
(param_2 + 200),local_50);
std::__cxx11::string::~string(local_50);
this = local_70;
LAB_0018d56a:
std::__cxx11::string::~string(this);
}
else {
LAB_0018d4f4:
/* try { // try from 0018d4f4 to 0018d500 has its CatchHandler @ 0018d5c0 */
pBVar3 = (BuiltinRule *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(param_2 + 0x28),psVar4);
if (pBVar3 == param_2 + 0x30) {
/* try { // try from 0018d50c to 0018d520 has its CatchHandler @ 0018d5c2 */
_add_primitive(local_90,param_2);
this = local_90;
goto LAB_0018d56a;
}
}
BuiltinRule::~BuiltinRule((BuiltinRule *)&local_c8);
psVar4 = psVar4 + 0x20;
} while( true );
}
| |
23,808 | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _add_primitive(const std::string & name, const BuiltinRule & rule) {
auto n = _add_rule(name, rule.content);
for (const auto & dep : rule.deps) {
BuiltinRule dep_rule;
auto it = PRIMITIVE_RULES.find(dep);
if (it == PRIMITIVE_RULES.end()) {
it = STRING_FORMAT_RULES.find(dep);
if (it == STRING_FORMAT_RULES.end()) {
_errors.push_back("Rule " + dep + " not known");
continue;
}
}
if (_rules.find(dep) == _rules.end()) {
_add_primitive(dep, it->second);
}
}
return n;
} | O3 | cpp | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
callq 0xa301c
movq 0x20(%rbx), %r15
movq 0x28(%rbx), %r14
cmpq %r14, %r15
je 0xa8466
leaq 0x80(%rsp), %rbx
leaq 0x90(%rsp), %r12
movq 0x10(%rsp), %rax
leaq 0x28(%rax), %rcx
movq %rcx, 0x48(%rsp)
leaq 0x30(%rax), %rcx
movq %rcx, 0x40(%rsp)
addq $0xc8, %rax
movq %rax, 0x38(%rsp)
xorl %r13d, %r13d
movq %rbx, 0x70(%rsp)
movq %r13, 0x78(%rsp)
movb $0x0, 0x80(%rsp)
movq %r13, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
leaq 0x41241(%rip), %rdi # 0xe9548
movq %r15, %rsi
callq 0xad79e
movq %rax, %rbp
testq %rax, %rax
jne 0xa832e
leaq 0x41262(%rip), %rdi # 0xe9580
movq %r15, %rsi
callq 0xad79e
movq %rax, %rbp
testq %rax, %rax
je 0xa8388
movq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0xa36bc
cmpq 0x40(%rsp), %rax
jne 0xa8437
addq $0x28, %rbp
leaq 0xa8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
callq 0xa8278
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xa8437
movq 0xb8(%rsp), %rsi
jmp 0xa842f
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x12797(%rip), %rsi # 0xbab2e
movq %r15, %rdx
callq 0x23662
movq %rbp, %rdi
leaq 0x1278b(%rip), %rsi # 0xbab34
callq 0x19f70
leaq 0x28(%rsp), %rbp
movq %rbp, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa83d6
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0xa83dd
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x84da2
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa841b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x197b0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa8437
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x197b0
movq %r12, %rdi
callq 0x20b60
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa8459
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x197b0
addq $0x20, %r15
cmpq %r14, %r15
jne 0xa82e1
movq 0x8(%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa849c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x197b0
jmp 0xa849c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa84c3
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x197b0
jmp 0xa84c3
jmp 0xa84c0
jmp 0xa84c0
jmp 0xa84c0
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xa1386
movq 0x8(%rsp), %rcx
movq (%rcx), %rdi
addq $0x10, %rcx
cmpq %rcx, %rdi
je 0xa84e9
movq (%rcx), %rsi
incq %rsi
callq 0x197b0
movq %rbx, %rdi
callq 0x19e10
nop
| _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rcx
mov [rsp+0F8h+var_F0], rdi; int
mov [rsp+0F8h+var_E8], rsi; void *
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov r15, [rbx+20h]
mov r14, [rbx+28h]
cmp r15, r14
jz loc_A8466
lea rbx, [rsp+0F8h+var_78]
lea r12, [rsp+0F8h+var_68]
mov rax, [rsp+0F8h+var_E8]
lea rcx, [rax+28h]
mov [rsp+0F8h+var_B0], rcx; void *
lea rcx, [rax+30h]
mov qword ptr [rsp+0F8h+var_B8], rcx; int
add rax, 0C8h
mov [rsp+0F8h+var_C0], rax; int
xor r13d, r13d
loc_A82E1:
mov [rsp+0F8h+var_88], rbx; int
mov [rsp+0F8h+var_80], r13; __int64
mov byte ptr [rsp+0F8h+var_78], 0; int
mov [r12+10h], r13
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbp, rax
test rax, rax
jnz short loc_A832E
lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbp, rax
test rax, rax
jz short loc_A8388
loc_A832E:
mov rdi, [rsp+0F8h+var_B0]
mov rsi, r15
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
cmp rax, qword ptr [rsp+0F8h+var_B8]
jnz loc_A8437
add rbp, 28h ; '('
lea rdi, [rsp+0F8h+var_50]; int
mov rsi, [rsp+0F8h+var_E8]; int
mov rdx, r15; int
mov rcx, rbp; int
call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&)
mov rdi, qword ptr [rsp+0F8h+var_50]
lea rax, [rsp+0F8h+var_40]
cmp rdi, rax
jz loc_A8437
mov rsi, [rsp+0F8h+var_40]
jmp loc_A842F
loc_A8388:
lea rbp, [rsp+0F8h+var_A8]
mov rdi, rbp
lea rsi, aRule; "Rule "
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rbp
lea rsi, aNotKnown; " not known"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_E0], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_A83D6
mov [rsp+0F8h+var_E0], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_D0], rdx
jmp short loc_A83DD
loc_A83D6:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_A83DD:
mov rdx, [rax+8]
mov [rsp+0F8h+var_D8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0F8h+var_C0]
lea rsi, [rsp+0F8h+var_E0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+0F8h+var_E0]; void *
cmp rdi, rbp
jz short loc_A841B
mov rsi, [rsp+0F8h+var_D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A841B:
mov rdi, [rsp+0F8h+var_A8]; void *
lea rax, [rsp+0F8h+var_98]
cmp rdi, rax
jz short loc_A8437
mov rsi, [rsp+0F8h+var_98]
loc_A842F:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8437:
mov rdi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_88]; void *
cmp rdi, rbx
jz short loc_A8459
mov rsi, qword ptr [rsp+0F8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8459:
add r15, 20h ; ' '
cmp r15, r14
jnz loc_A82E1
loc_A8466:
mov rax, [rsp+0F8h+var_F0]
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, rbp
jz short loc_A849C
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A849C
mov rbx, rax
loc_A849C:
mov rdi, [rsp+arg_48]; void *
lea rax, [rsp+arg_58]
cmp rdi, rax
jz short loc_A84C3
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A84C3
jmp short loc_A84C0
jmp short loc_A84C0
jmp short $+2
loc_A84C0:
mov rbx, rax
loc_A84C3:
lea rdi, [rsp+arg_68]; this
call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule()
mov rcx, [rsp+arg_0]
mov rdi, [rcx]; void *
add rcx, 10h
cmp rdi, rcx
jz short loc_A84E9
mov rsi, [rcx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A84E9:
mov rdi, rbx
call __Unwind_Resume
| void * SchemaConverter::_add_primitive(long long a1, long long a2, long long a3, _QWORD *a4)
{
_QWORD *v5; // r15
_QWORD *v6; // r14
long long v7; // rax
int v8; // ebp
long long v9; // rax
long long v10; // rax
int v11; // r8d
int v12; // r9d
void *v13; // rdi
long long v14; // rsi
long long v15; // rax
__int128 *v16; // rcx
long long v18; // [rsp+0h] [rbp-F8h]
void *v19; // [rsp+8h] [rbp-F0h]
void *v20; // [rsp+10h] [rbp-E8h]
void *v21; // [rsp+18h] [rbp-E0h] BYREF
long long v22; // [rsp+20h] [rbp-D8h]
__int128 v23; // [rsp+28h] [rbp-D0h] BYREF
long long v24; // [rsp+38h] [rbp-C0h]
int v25[2]; // [rsp+40h] [rbp-B8h]
void *v26; // [rsp+48h] [rbp-B0h]
void *v27[2]; // [rsp+50h] [rbp-A8h] BYREF
long long v28; // [rsp+60h] [rbp-98h] BYREF
char v29; // [rsp+68h] [rbp-90h]
void *v30; // [rsp+70h] [rbp-88h]
long long v31; // [rsp+78h] [rbp-80h]
int v32[2]; // [rsp+80h] [rbp-78h] BYREF
__int128 v33; // [rsp+90h] [rbp-68h] BYREF
long long v34; // [rsp+A0h] [rbp-58h]
int v35[2]; // [rsp+A8h] [rbp-50h] BYREF
long long v36; // [rsp+B8h] [rbp-40h] BYREF
v19 = (void *)a1;
v20 = (void *)a2;
SchemaConverter::_add_rule(a1, a2, a3, a4);
v5 = (_QWORD *)a4[4];
v6 = (_QWORD *)a4[5];
if ( v5 != v6 )
{
v26 = (void *)(a2 + 40);
*(_QWORD *)v25 = a2 + 48;
v24 = a2 + 200;
do
{
v30 = v32;
v31 = 0LL;
LOBYTE(v32[0]) = 0;
v34 = 0LL;
v33 = 0LL;
v7 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
PRIMITIVE_RULES[abi:cxx11],
v5);
v8 = v7;
if ( v7
|| (v9 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
STRING_FORMAT_RULES[abi:cxx11],
v5),
v8 = v9,
v9) )
{
v10 = std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
(long long)v26,
(long long)v5);
if ( v10 != *(_QWORD *)v25 )
goto LABEL_16;
SchemaConverter::_add_primitive(
(int)v35,
(int)v20,
(int)v5,
v8 + 40,
v11,
v12,
v18,
(int)v19,
v20,
(int)v21,
v22,
v23,
SDWORD2(v23),
v24,
v25[0],
v26,
(int)v27[0],
(long long)v27[1],
v28,
v29);
v13 = *(void **)v35;
if ( *(long long **)v35 == &v36 )
goto LABEL_16;
v14 = v36;
}
else
{
std::operator+<char>((long long)v27, (long long)"Rule ", v5);
v15 = std::string::append(v27, " not known");
v21 = &v23;
v16 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v23 = *v16;
}
else
{
v21 = *(void **)v15;
*(_QWORD *)&v23 = *(_QWORD *)v16;
}
v22 = *(_QWORD *)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
std::vector<std::string>::emplace_back<std::string>(v24, (long long)&v21);
if ( v21 != &v23 )
operator delete(v21, v23 + 1);
v13 = v27[0];
if ( v27[0] == &v28 )
goto LABEL_16;
v14 = v28;
}
operator delete(v13, v14 + 1);
LABEL_16:
std::vector<std::string>::~vector((long long)&v33);
if ( v30 != v32 )
operator delete(v30, *(_QWORD *)v32 + 1LL);
v5 += 4;
}
while ( v5 != v6 );
}
return v19;
}
| _add_primitive:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RCX
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x10],RSI
CALL 0x001a301c
MOV R15,qword ptr [RBX + 0x20]
MOV R14,qword ptr [RBX + 0x28]
CMP R15,R14
JZ 0x001a8466
LEA RBX,[RSP + 0x80]
LEA R12,[RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[RAX + 0x28]
MOV qword ptr [RSP + 0x48],RCX
LEA RCX,[RAX + 0x30]
MOV qword ptr [RSP + 0x40],RCX
ADD RAX,0xc8
MOV qword ptr [RSP + 0x38],RAX
XOR R13D,R13D
LAB_001a82e1:
MOV qword ptr [RSP + 0x70],RBX
MOV qword ptr [RSP + 0x78],R13
MOV byte ptr [RSP + 0x80],0x0
MOV qword ptr [R12 + 0x10],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
LAB_001a8300:
LEA RDI,[0x1e9548]
MOV RSI,R15
CALL 0x001ad79e
MOV RBP,RAX
TEST RAX,RAX
JNZ 0x001a832e
LAB_001a8317:
LEA RDI,[0x1e9580]
MOV RSI,R15
CALL 0x001ad79e
MOV RBP,RAX
TEST RAX,RAX
JZ 0x001a8388
LAB_001a832e:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,R15
CALL 0x001a36bc
CMP RAX,qword ptr [RSP + 0x40]
JNZ 0x001a8437
ADD RBP,0x28
LAB_001a834a:
LEA RDI,[RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV RCX,RBP
CALL 0x001a8278
MOV RDI,qword ptr [RSP + 0xa8]
LEA RAX,[RSP + 0xb8]
CMP RDI,RAX
JZ 0x001a8437
MOV RSI,qword ptr [RSP + 0xb8]
JMP 0x001a842f
LAB_001a8388:
LEA RBP,[RSP + 0x50]
MOV RDI,RBP
LEA RSI,[0x1bab2e]
MOV RDX,R15
CALL 0x00123662
LAB_001a839f:
MOV RDI,RBP
LEA RSI,[0x1bab34]
CALL 0x00119f70
LEA RBP,[RSP + 0x28]
MOV qword ptr [RSP + 0x18],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001a83d6
MOV qword ptr [RSP + 0x18],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x28],RDX
JMP 0x001a83dd
LAB_001a83d6:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_001a83dd:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a83f5:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x18]
CALL 0x00184da2
LAB_001a8404:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,RBP
JZ 0x001a841b
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x001197b0
LAB_001a841b:
MOV RDI,qword ptr [RSP + 0x50]
LEA RAX,[RSP + 0x60]
CMP RDI,RAX
JZ 0x001a8437
MOV RSI,qword ptr [RSP + 0x60]
LAB_001a842f:
INC RSI
CALL 0x001197b0
LAB_001a8437:
MOV RDI,R12
CALL 0x00120b60
MOV RDI,qword ptr [RSP + 0x70]
CMP RDI,RBX
JZ 0x001a8459
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x001197b0
LAB_001a8459:
ADD R15,0x20
CMP R15,R14
JNZ 0x001a82e1
LAB_001a8466:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_add_primitive(std::__cxx11::string const&, BuiltinRule const&) */
string * SchemaConverter::_add_primitive(string *param_1,BuiltinRule *param_2)
{
string *psVar1;
long lVar2;
BuiltinRule *pBVar3;
long *plVar4;
long in_RCX;
long *plVar5;
string *psVar6;
long *local_e0;
long local_d8;
long local_d0;
long lStack_c8;
BuiltinRule *local_c0;
BuiltinRule *local_b8;
BuiltinRule *local_b0;
long *local_a8 [2];
long local_98 [2];
int1 *local_88;
int8 local_80;
int1 local_78;
int7 uStack_77;
int8 local_68;
int8 uStack_60;
int8 local_58;
long *local_50 [2];
long local_40 [2];
_add_rule(param_1,(string *)param_2);
psVar6 = *(string **)(in_RCX + 0x20);
psVar1 = *(string **)(in_RCX + 0x28);
if (psVar6 != psVar1) {
local_b0 = param_2 + 0x28;
local_b8 = param_2 + 0x30;
local_c0 = param_2 + 200;
do {
local_80 = 0;
local_78 = 0;
local_58 = 0;
local_68 = 0;
uStack_60 = 0;
local_88 = &local_78;
/* try { // try from 001a8300 to 001a830e has its CatchHandler @ 001a84c0 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)PRIMITIVE_RULES_abi_cxx11_,psVar6);
/* try { // try from 001a8317 to 001a8325 has its CatchHandler @ 001a84bc */
if ((lVar2 == 0) &&
(lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)STRING_FORMAT_RULES_abi_cxx11_,psVar6), lVar2 == 0)) {
/* try { // try from 001a8388 to 001a839e has its CatchHandler @ 001a84ba */
std::operator+((char *)local_a8,(string *)"Rule ");
/* try { // try from 001a839f to 001a83ad has its CatchHandler @ 001a8499 */
plVar4 = (long *)std::__cxx11::string::append((char *)local_a8);
plVar5 = plVar4 + 2;
if ((long *)*plVar4 == plVar5) {
local_d0 = *plVar5;
lStack_c8 = plVar4[3];
local_e0 = &local_d0;
}
else {
local_d0 = *plVar5;
local_e0 = (long *)*plVar4;
}
local_d8 = plVar4[1];
*plVar4 = (long)plVar5;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 001a83f5 to 001a8403 has its CatchHandler @ 001a847d */
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_c0,
(string *)&local_e0);
if (local_e0 != &local_d0) {
operator_delete(local_e0,local_d0 + 1);
}
lVar2 = local_98[0];
plVar4 = local_a8[0];
if (local_a8[0] != local_98) {
LAB_001a842f:
operator_delete(plVar4,lVar2 + 1);
}
}
else {
/* try { // try from 001a832e to 001a833a has its CatchHandler @ 001a84be */
pBVar3 = (BuiltinRule *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)local_b0,psVar6);
/* try { // try from 001a834a to 001a8361 has its CatchHandler @ 001a84c0 */
if ((pBVar3 == local_b8) &&
(_add_primitive((string *)local_50,param_2), lVar2 = local_40[0], plVar4 = local_50[0],
local_50[0] != local_40)) goto LAB_001a842f;
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
if (local_88 != &local_78) {
operator_delete(local_88,CONCAT71(uStack_77,local_78) + 1);
}
psVar6 = psVar6 + 0x20;
} while (psVar6 != psVar1);
}
return param_1;
}
| |
23,809 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x86b56
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5d76e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x69f75(%rip), %rsi # 0xf0aef
leaq 0x10(%rsp), %rdi
callq 0x86bef
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x85d12
xorl %ebp, %ebp
leaq 0xa3363(%rip), %rsi # 0x129f08
leaq -0x2d2fc(%rip), %rdx # 0x598b0
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86bda
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x86bda
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x86be7
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_86B56
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_86B56:
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, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; 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_86BDA
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_86BDA
mov r14, rax
mov bpl, 1
loc_86BDA:
test bpl, bpl
jz short loc_86BE7
mov rdi, rbx; void *
call ___cxa_free_exception
loc_86BE7:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
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);
}
result = a1[8];
*a2 = result;
return result;
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x00186b56
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00186b56:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015d76e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00186b73:
LEA RSI,[0x1f0aef]
LEA RDI,[RSP + 0x10]
CALL 0x00186bef
MOV BPL,0x1
LAB_00186b87:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00185d12
XOR EBP,EBP
LEA RSI,[0x229f08]
LEA RDX,[0x1598b0]
MOV RDI,RBX
CALL 0x0011aea0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 00186b73 to 00186b83 has its CatchHandler @ 00186bd4 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 00186b87 to 00186bb3 has its CatchHandler @ 00186bb4 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
| |
23,810 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x630b4
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x425be
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4f9f9(%rip), %rsi # 0xb2acf
leaq 0x10(%rsp), %rdi
callq 0x63137
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x6263e
xorl %ebp, %ebp
leaq 0x96e47(%rip), %rsi # 0xf9f48
leaq -0x23fba(%rip), %rdx # 0x3f14e
movq %rbx, %rdi
callq 0x23e90
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x63127
jmp 0x6312f
movq %rax, %r14
movq %rbx, %rdi
callq 0x23660
movq %r14, %rdi
callq 0x23f10
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_630B4
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_630B4:
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, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; 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_63127
jmp short loc_6312F
mov r14, rax
loc_63127:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6312F:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(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);
}
result = a1[8];
*a2 = result;
return result;
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x001630b4
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001630b4:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001425be
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001630cf:
LEA RSI,[0x1b2acf]
LEA RDI,[RSP + 0x10]
CALL 0x00163137
MOV BPL,0x1
LAB_001630e3:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0016263e
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13f14e]
MOV RDI,RBX
CALL 0x00123e90
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == '\x04') {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001630cf to 001630df has its CatchHandler @ 00163124 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 001630e3 to 0016310f has its CatchHandler @ 00163110 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
| |
23,811 | YAML::IsNullString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/yaml-cpp-src/src/null.cpp | bool IsNullString(const std::string& str) {
return str.empty() || str == "~" || str == "null" || str == "Null" ||
str == "NULL";
} | O3 | cpp | YAML::IsNullString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
cmpq $0x0, 0x8(%rdi)
je 0x6f0de
movq %rdi, %r14
leaq 0xf6271(%rip), %rsi # 0x16530c
callq 0x2d380
testl %eax, %eax
je 0x6f0de
leaq 0xf2732(%rip), %rsi # 0x1617dd
movq %r14, %rdi
callq 0x2d380
testl %eax, %eax
je 0x6f0de
leaq 0xf6250(%rip), %rsi # 0x16530e
movq %r14, %rdi
callq 0x2d380
testl %eax, %eax
je 0x6f0de
leaq 0xf6242(%rip), %rsi # 0x165313
movq %r14, %rdi
callq 0x2d380
testl %eax, %eax
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN4YAML12IsNullStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov bl, 1
cmp qword ptr [rdi+8], 0
jz short loc_6F0DE
mov r14, rdi
lea rsi, asc_16530C; "~"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6F0DE
lea rsi, aStringPointerI+12h; "null"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6F0DE
lea rsi, aNull; "Null"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6F0DE
lea rsi, aNull_0; "NULL"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
setz bl
loc_6F0DE:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
| long long YAML::IsNullString(long long a1)
{
unsigned int v1; // ebx
LOBYTE(v1) = 1;
if ( *(_QWORD *)(a1 + 8)
&& (unsigned int)std::string::compare(a1, "~")
&& (unsigned int)std::string::compare(a1, "null")
&& (unsigned int)std::string::compare(a1, "Null") )
{
LOBYTE(v1) = (unsigned int)std::string::compare(a1, "NULL") == 0;
}
return v1;
}
| IsNullString:
PUSH R14
PUSH RBX
PUSH RAX
MOV BL,0x1
CMP qword ptr [RDI + 0x8],0x0
JZ 0x0016f0de
MOV R14,RDI
LEA RSI,[0x26530c]
CALL 0x0012d380
TEST EAX,EAX
JZ 0x0016f0de
LEA RSI,[0x2617dd]
MOV RDI,R14
CALL 0x0012d380
TEST EAX,EAX
JZ 0x0016f0de
LEA RSI,[0x26530e]
MOV RDI,R14
CALL 0x0012d380
TEST EAX,EAX
JZ 0x0016f0de
LEA RSI,[0x265313]
MOV RDI,R14
CALL 0x0012d380
TEST EAX,EAX
SETZ BL
LAB_0016f0de:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* YAML::IsNullString(std::__cxx11::string const&) */
ulong YAML::IsNullString(string *param_1)
{
int iVar1;
int8 unaff_RBX;
ulong uVar2;
int7 uVar3;
uVar3 = (int7)((ulong)unaff_RBX >> 8);
uVar2 = CONCAT71(uVar3,1);
if (*(long *)(param_1 + 8) != 0) {
iVar1 = std::__cxx11::string::compare(param_1,"~");
if (iVar1 != 0) {
iVar1 = std::__cxx11::string::compare(param_1,"null");
if (iVar1 != 0) {
iVar1 = std::__cxx11::string::compare(param_1,"Null");
if (iVar1 != 0) {
iVar1 = std::__cxx11::string::compare(param_1,"NULL");
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
}
}
return uVar2 & 0xffffffff;
}
| |
23,812 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) | llama.cpp/common/json.hpp | inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0x8f5cb
testl %r8d, %r8d
jle 0x8f5e7
movq %rdi, %rbx
leal (%rdx,%rsi), %r15d
testl %edx, %edx
sets %al
cmpl %r8d, %r15d
setg %dil
orb %al, %dil
je 0x8f474
cmpl %r8d, %r15d
setg %al
testl %r15d, %r15d
setle %dil
orb %al, %dil
je 0x8f4a1
testl %r15d, %r15d
setg %al
cmpl %ecx, %r15d
setle %cl
orb %al, %cl
jne 0x8f4dc
negl %r15d
leaq (%rbx,%r15), %r14
addq $0x2, %r14
movslq %esi, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21230
movw $0x2e30, (%rbx) # imm = 0x2E30
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x30, %esi
movq %r15, %rdx
callq 0x21500
addq %r12, %r14
jmp 0x8f5bc
movslq %esi, %rax
leaq (%rbx,%rax), %rdi
movslq %r15d, %r14
movq %r14, %rdx
subq %rax, %rdx
movl $0x30, %esi
callq 0x21500
addq %rbx, %r14
addq $0x2, %r14
movw $0x302e, -0x2(%r14) # imm = 0x302E
jmp 0x8f5bc
testl %edx, %edx
jns 0x8f608
movl %r15d, %ecx
leaq (%rbx,%rcx), %rax
leaq (%rbx,%rcx), %r14
incq %r14
movl %esi, %r15d
movq %r15, %rdx
subq %rcx, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x21230
movb $0x2e, -0x1(%r14)
leaq (%rbx,%r15), %r14
incq %r14
jmp 0x8f5bc
cmpl $0x1, %esi
je 0x8f4ff
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rax
movslq %esi, %r14
leaq -0x1(%r14), %rdx
movq %rax, %rsi
callq 0x21230
movb $0x2e, 0x1(%rbx)
addq %r14, %rbx
movb $0x65, 0x1(%rbx)
cmpl $0xfffffc19, %r15d # imm = 0xFFFFFC19
jle 0x8f624
cmpl $0x3e9, %r15d # imm = 0x3E9
jge 0x8f640
leaq 0x2(%rbx), %r14
leal -0x1(%r15), %ecx
testl %r15d, %r15d
setle %dl
addb %dl, %dl
addb $0x2b, %dl
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movb %dl, 0x2(%rbx)
cmpl $0x9, %eax
ja 0x8f549
movb $0x30, 0x3(%rbx)
addq $0x4, %rbx
jmp 0x8f56d
cmpl $0x63, %eax
ja 0x8f574
movzbl %al, %eax
imull $0xcd, %eax, %ecx
shrl $0xb, %ecx
movl %ecx, %edx
orb $0x30, %dl
movb %dl, 0x3(%rbx)
addq $0x4, %rbx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
movl $0x3, %ecx
jmp 0x8f5b5
movl $0xffff, %ecx # imm = 0xFFFF
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %edx
imull $0x147b, %edx, %edx # imm = 0x147B
shrl $0x11, %edx
leal 0x30(%rdx), %esi
movb %sil, 0x3(%rbx)
imull $0x64, %edx, %edx
subl %edx, %eax
imull $0x67, %eax, %edx
andl %ecx, %edx
shrl $0xa, %edx
movl %edx, %ecx
orb $0x30, %cl
movb %cl, 0x4(%rbx)
addq $0x5, %rbx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subb %cl, %al
movl $0x4, %ecx
addq %rcx, %r14
orb $0x30, %al
movb %al, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x95cd4(%rip), %rdi # 0x1252a6
leaq 0x8ce27(%rip), %rdx # 0x11c400
leaq 0x964e4(%rip), %rcx # 0x125ac4
movl $0x45e3, %esi # imm = 0x45E3
jmp 0x8f601
leaq 0x95cb8(%rip), %rdi # 0x1252a6
leaq 0x8ce0b(%rip), %rdx # 0x11c400
leaq 0x964d4(%rip), %rcx # 0x125ad0
movl $0x45e4, %esi # imm = 0x45E4
xorl %eax, %eax
callq 0x21ec0
leaq 0x95c97(%rip), %rdi # 0x1252a6
leaq 0x8cdea(%rip), %rdx # 0x11c400
leaq 0x964bf(%rip), %rcx # 0x125adc
movl $0x45fe, %esi # imm = 0x45FE
jmp 0x8f601
leaq 0x95c7b(%rip), %rdi # 0x1252a6
leaq 0x8cdce(%rip), %rdx # 0x11c400
leaq 0x964a9(%rip), %rcx # 0x125ae2
movl $0x45ae, %esi # imm = 0x45AE
jmp 0x8f601
leaq 0x95c5f(%rip), %rdi # 0x1252a6
leaq 0x8cdb2(%rip), %rdx # 0x11c400
leaq 0x96497(%rip), %rcx # 0x125aec
movl $0x45af, %esi # imm = 0x45AF
jmp 0x8f601
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
push r15
push r14
push r12
push rbx
push rax
test ecx, ecx
jns loc_8F5CB
test r8d, r8d
jle loc_8F5E7
mov rbx, rdi
lea r15d, [rdx+rsi]
test edx, edx
sets al
cmp r15d, r8d
setnle dil
or dil, al
jz short loc_8F474
cmp r15d, r8d
setnle al
test r15d, r15d
setle dil
or dil, al
jz short loc_8F4A1
test r15d, r15d
setnle al
cmp r15d, ecx
setle cl
or cl, al
jnz loc_8F4DC
neg r15d
lea r14, [rbx+r15]
add r14, 2
movsxd r12, esi
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call _memmove
mov word ptr [rbx], 2E30h
add rbx, 2
mov rdi, rbx
mov esi, 30h ; '0'
mov rdx, r15
call _memset
add r14, r12
jmp loc_8F5BC
loc_8F474:
movsxd rax, esi
lea rdi, [rbx+rax]
movsxd r14, r15d
mov rdx, r14
sub rdx, rax
mov esi, 30h ; '0'
call _memset
add r14, rbx
add r14, 2
mov word ptr [r14-2], 302Eh
jmp loc_8F5BC
loc_8F4A1:
test edx, edx
jns loc_8F608
mov ecx, r15d
lea rax, [rbx+rcx]
lea r14, [rbx+rcx]
inc r14
mov r15d, esi
mov rdx, r15
sub rdx, rcx
mov rdi, r14
mov rsi, rax
call _memmove
mov byte ptr [r14-1], 2Eh ; '.'
lea r14, [rbx+r15]
inc r14
jmp loc_8F5BC
loc_8F4DC:
cmp esi, 1
jz short loc_8F4FF
lea rdi, [rbx+2]
lea rax, [rbx+1]
movsxd r14, esi
lea rdx, [r14-1]
mov rsi, rax
call _memmove
mov byte ptr [rbx+1], 2Eh ; '.'
add rbx, r14
loc_8F4FF:
mov byte ptr [rbx+1], 65h ; 'e'
cmp r15d, 0FFFFFC19h
jle loc_8F624
cmp r15d, 3E9h
jge loc_8F640
lea r14, [rbx+2]
lea ecx, [r15-1]
test r15d, r15d
setle dl
add dl, dl
add dl, 2Bh ; '+'
mov eax, ecx
neg eax
cmovs eax, ecx
mov [rbx+2], dl
cmp eax, 9
ja short loc_8F549
mov byte ptr [rbx+3], 30h ; '0'
add rbx, 4
jmp short loc_8F56D
loc_8F549:
cmp eax, 63h ; 'c'
ja short loc_8F574
movzx eax, al
imul ecx, eax, 0CDh
shr ecx, 0Bh
mov edx, ecx
or dl, 30h
mov [rbx+3], dl
add rbx, 4
add ecx, ecx
lea ecx, [rcx+rcx*4]
sub al, cl
loc_8F56D:
mov ecx, 3
jmp short loc_8F5B5
loc_8F574:
mov ecx, 0FFFFh
mov edx, eax
and edx, ecx
shr edx, 2
imul edx, 147Bh
shr edx, 11h
lea esi, [rdx+30h]
mov [rbx+3], sil
imul edx, 64h ; 'd'
sub eax, edx
imul edx, eax, 67h ; 'g'
and edx, ecx
shr edx, 0Ah
mov ecx, edx
or cl, 30h
mov [rbx+4], cl
add rbx, 5
add edx, edx
lea ecx, [rdx+rdx*4]
sub al, cl
mov ecx, 4
loc_8F5B5:
add r14, rcx
or al, 30h
mov [rbx], al
loc_8F5BC:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_8F5CB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMinExp0; "min_exp < 0"
mov esi, 45E3h
jmp short loc_8F601
loc_8F5E7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaxExp0; "max_exp > 0"
mov esi, 45E4h
loc_8F601:
xor eax, eax
call _ggml_abort
loc_8F608:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKN; "k > n"
mov esi, 45FEh
jmp short loc_8F601
loc_8F624:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_8F601
loc_8F640:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
jmp short loc_8F601
| char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx
int v6; // r15d
long long v7; // r15
char *v8; // r14
char *v9; // r14
char *v10; // r14
unsigned int v11; // eax
_BYTE *v12; // rbx
long long v13; // rcx
if ( a4 >= 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17891LL,
"GGML_ASSERT(%s) failed",
"min_exp < 0");
goto LABEL_26;
}
if ( a5 <= 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17892LL,
"GGML_ASSERT(%s) failed",
"max_exp > 0");
goto LABEL_26;
}
v5 = this;
v6 = a3 + (_DWORD)a2;
if ( a3 >= 0 && a3 + (int)a2 <= a5 )
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
v8 = (char *)this + v6 + 2;
*(_WORD *)((char *)this + v6) = 12334;
return v8;
}
if ( v6 <= a5 && v6 > 0 )
{
if ( a3 < 0 )
{
v9 = (char *)this + (unsigned int)v6 + 1;
memmove(v9, (char *)this + (unsigned int)v6, (unsigned int)a2 - (unsigned long long)(unsigned int)v6);
*(v9 - 1) = 46;
return (char *)this + (unsigned int)a2 + 1;
}
goto LABEL_26;
}
if ( v6 > 0 || v6 <= a4 )
{
if ( (_DWORD)a2 != 1 )
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2);
}
*((_BYTE *)v5 + 1) = 101;
if ( v6 <= -999 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( v6 < 1001 )
{
v10 = (char *)v5 + 2;
v11 = 1 - v6;
if ( 1 - v6 < 0 )
v11 = v6 - 1;
*((_BYTE *)v5 + 2) = 2 * (v6 <= 0) + 43;
if ( v11 > 9 )
{
if ( v11 > 0x63 )
{
*((_BYTE *)v5 + 3) = ((unsigned int)(5243 * ((unsigned __int16)v11 >> 2)) >> 17) + 48;
LOWORD(v11) = (unsigned __int16)v11 % 0x64u;
*((_BYTE *)v5 + 4) = ((unsigned __int16)(103 * v11) >> 10) | 0x30;
v12 = (char *)v5 + 5;
LOBYTE(v11) = v11 - 10 * ((unsigned __int16)(103 * v11) >> 10);
v13 = 4LL;
goto LABEL_22;
}
*((_BYTE *)v5 + 3) = ((unsigned __int8)v11 / 0xAu) | 0x30;
v12 = (char *)v5 + 4;
LOBYTE(v11) = (unsigned __int8)v11 % 0xAu;
}
else
{
*((_BYTE *)v5 + 3) = 48;
v12 = (char *)v5 + 4;
}
v13 = 3LL;
LABEL_22:
v8 = &v10[v13];
*v12 = v11 | 0x30;
return v8;
}
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
while ( 1 )
LABEL_26:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17918LL,
"GGML_ASSERT(%s) failed",
"k > n");
}
v7 = (unsigned int)-v6;
memmove((char *)this + v7 + 2, this, (int)a2);
*(_WORD *)this = 11824;
memset((char *)this + 2, 48LL, v7);
return (char *)this + v7 + (int)a2 + 2;
}
| format_buffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
JNS 0x0018f5cb
TEST R8D,R8D
JLE 0x0018f5e7
MOV RBX,RDI
LEA R15D,[RDX + RSI*0x1]
TEST EDX,EDX
SETS AL
CMP R15D,R8D
SETG DIL
OR DIL,AL
JZ 0x0018f474
CMP R15D,R8D
SETG AL
TEST R15D,R15D
SETLE DIL
OR DIL,AL
JZ 0x0018f4a1
TEST R15D,R15D
SETG AL
CMP R15D,ECX
SETLE CL
OR CL,AL
JNZ 0x0018f4dc
NEG R15D
LEA R14,[RBX + R15*0x1]
ADD R14,0x2
MOVSXD R12,ESI
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
CALL 0x00121230
MOV word ptr [RBX],0x2e30
ADD RBX,0x2
MOV RDI,RBX
MOV ESI,0x30
MOV RDX,R15
CALL 0x00121500
ADD R14,R12
JMP 0x0018f5bc
LAB_0018f474:
MOVSXD RAX,ESI
LEA RDI,[RBX + RAX*0x1]
MOVSXD R14,R15D
MOV RDX,R14
SUB RDX,RAX
MOV ESI,0x30
CALL 0x00121500
ADD R14,RBX
ADD R14,0x2
MOV word ptr [R14 + -0x2],0x302e
JMP 0x0018f5bc
LAB_0018f4a1:
TEST EDX,EDX
JNS 0x0018f608
MOV ECX,R15D
LEA RAX,[RBX + RCX*0x1]
LEA R14,[RBX + RCX*0x1]
INC R14
MOV R15D,ESI
MOV RDX,R15
SUB RDX,RCX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00121230
MOV byte ptr [R14 + -0x1],0x2e
LEA R14,[RBX + R15*0x1]
INC R14
JMP 0x0018f5bc
LAB_0018f4dc:
CMP ESI,0x1
JZ 0x0018f4ff
LEA RDI,[RBX + 0x2]
LEA RAX,[RBX + 0x1]
MOVSXD R14,ESI
LEA RDX,[R14 + -0x1]
MOV RSI,RAX
CALL 0x00121230
MOV byte ptr [RBX + 0x1],0x2e
ADD RBX,R14
LAB_0018f4ff:
MOV byte ptr [RBX + 0x1],0x65
CMP R15D,0xfffffc19
JLE 0x0018f624
CMP R15D,0x3e9
JGE 0x0018f640
LEA R14,[RBX + 0x2]
LEA ECX,[R15 + -0x1]
TEST R15D,R15D
SETLE DL
ADD DL,DL
ADD DL,0x2b
MOV EAX,ECX
NEG EAX
CMOVS EAX,ECX
MOV byte ptr [RBX + 0x2],DL
CMP EAX,0x9
JA 0x0018f549
MOV byte ptr [RBX + 0x3],0x30
ADD RBX,0x4
JMP 0x0018f56d
LAB_0018f549:
CMP EAX,0x63
JA 0x0018f574
MOVZX EAX,AL
IMUL ECX,EAX,0xcd
SHR ECX,0xb
MOV EDX,ECX
OR DL,0x30
MOV byte ptr [RBX + 0x3],DL
ADD RBX,0x4
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x4]
SUB AL,CL
LAB_0018f56d:
MOV ECX,0x3
JMP 0x0018f5b5
LAB_0018f574:
MOV ECX,0xffff
MOV EDX,EAX
AND EDX,ECX
SHR EDX,0x2
IMUL EDX,EDX,0x147b
SHR EDX,0x11
LEA ESI,[RDX + 0x30]
MOV byte ptr [RBX + 0x3],SIL
IMUL EDX,EDX,0x64
SUB EAX,EDX
IMUL EDX,EAX,0x67
AND EDX,ECX
SHR EDX,0xa
MOV ECX,EDX
OR CL,0x30
MOV byte ptr [RBX + 0x4],CL
ADD RBX,0x5
ADD EDX,EDX
LEA ECX,[RDX + RDX*0x4]
SUB AL,CL
MOV ECX,0x4
LAB_0018f5b5:
ADD R14,RCX
OR AL,0x30
MOV byte ptr [RBX],AL
LAB_0018f5bc:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0018f5cb:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225ac4]
MOV ESI,0x45e3
JMP 0x0018f601
LAB_0018f5e7:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225ad0]
MOV ESI,0x45e4
LAB_0018f601:
XOR EAX,EAX
CALL 0x00121ec0
LAB_0018f608:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225adc]
MOV ESI,0x45fe
JMP 0x0018f601
LAB_0018f624:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225ae2]
MOV ESI,0x45ae
JMP 0x0018f601
LAB_0018f640:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225aec]
MOV ESI,0x45af
JMP 0x0018f601
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
byte bVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
byte *pbVar8;
int8 uVar9;
uint uVar10;
if (-1 < param_4) {
pcVar7 = "min_exp < 0";
uVar9 = 0x45e3;
LAB_0018f601:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar9,
"GGML_ASSERT(%s) failed",pcVar7);
}
if (param_5 < 1) {
pcVar7 = "max_exp > 0";
uVar9 = 0x45e4;
goto LAB_0018f601;
}
uVar10 = param_3 + param_2;
if ((int)uVar10 <= param_5 && -1 < param_3) {
memset(param_1 + param_2,0x30,(long)(int)uVar10 - (long)param_2);
pcVar7 = param_1 + (int)uVar10;
pcVar7[0] = '.';
pcVar7[1] = '0';
return pcVar7 + 2;
}
if (0 < (int)uVar10 && (int)uVar10 <= param_5) {
if (param_3 < 0) {
uVar5 = (ulong)uVar10;
memmove(param_1 + uVar5 + 1,param_1 + uVar5,(uint)param_2 - uVar5);
param_1[uVar5] = '.';
return param_1 + (ulong)(uint)param_2 + 1;
}
pcVar7 = "k > n";
uVar9 = 0x45fe;
goto LAB_0018f601;
}
if (param_4 < (int)uVar10 && (int)uVar10 < 1) {
memmove(param_1 + (ulong)-uVar10 + 2,param_1,(long)param_2);
param_1[0] = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(ulong)-uVar10);
return param_1 + (ulong)-uVar10 + 2 + param_2;
}
if (param_2 != 1) {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
param_1 = param_1 + param_2;
}
param_1[1] = 'e';
if ((int)uVar10 < -0x3e6) {
pcVar7 = "e > -1000";
uVar9 = 0x45ae;
goto LAB_0018f601;
}
if (1000 < (int)uVar10) {
pcVar7 = "e < 1000";
uVar9 = 0x45af;
goto LAB_0018f601;
}
uVar1 = uVar10 - 1;
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
param_1[2] = ((int)uVar10 < 1) * '\x02' + '+';
if (uVar3 < 10) {
param_1[3] = '0';
}
else {
if (99 < uVar3) {
uVar10 = (uVar3 & 0xffff) / 100;
param_1[3] = (char)uVar10 + '0';
iVar4 = uVar3 + uVar10 * -100;
bVar2 = (byte)((iVar4 * 0x67 & 0xffffU) >> 10);
param_1[4] = bVar2 | 0x30;
pbVar8 = (byte *)(param_1 + 5);
bVar2 = (char)iVar4 + bVar2 * -10;
lVar6 = 4;
goto LAB_0018f5b5;
}
bVar2 = (byte)((uVar3 & 0xff) / 10);
param_1[3] = bVar2 | 0x30;
uVar3 = (uint)(byte)((char)uVar3 + bVar2 * -10);
}
bVar2 = (byte)uVar3;
pbVar8 = (byte *)(param_1 + 4);
lVar6 = 3;
LAB_0018f5b5:
*pbVar8 = bVar2 | 0x30;
return param_1 + lVar6 + 2;
}
| |
23,813 | maria_collect_stats_nonulls_first | eloqsql/storage/maria/ma_check.c | static
void maria_collect_stats_nonulls_first(HA_KEYSEG *keyseg, ulonglong *notnull,
const uchar *key)
{
size_t first_null, kp;
first_null= ha_find_null(keyseg, key) - keyseg;
/*
All prefix tuples that don't include keypart_{first_null} are not-null
tuples (and all others aren't), increment counters for them.
*/
for (kp= 0; kp < first_null; kp++)
notnull[kp]++;
} | O3 | c | maria_collect_stats_nonulls_first:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rsi
callq 0xbe819
subq %r14, %rax
je 0x81b6e
sarq $0x5, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
incq (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x81b62
popq %rbx
popq %r14
popq %rbp
retq
| maria_collect_stats_nonulls_first:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rsi, rdx
call ha_find_null
sub rax, r14
jz short loc_81B6E
sar rax, 5
cmp rax, 1
adc rax, 0
xor ecx, ecx
loc_81B62:
inc qword ptr [rbx+rcx*8]
inc rcx
cmp rax, rcx
jnz short loc_81B62
loc_81B6E:
pop rbx
pop r14
pop rbp
retn
| long long maria_collect_stats_nonulls_first(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rcx
result = ha_find_null(a1, a3) - a1;
if ( result )
{
result = (result >> 5 == 0) + (result >> 5);
v4 = 0LL;
do
++*(_QWORD *)(a2 + 8 * v4++);
while ( result != v4 );
}
return result;
}
| maria_collect_stats_nonulls_first:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RSI,RDX
CALL 0x001be819
SUB RAX,R14
JZ 0x00181b6e
SAR RAX,0x5
CMP RAX,0x1
ADC RAX,0x0
XOR ECX,ECX
LAB_00181b62:
INC qword ptr [RBX + RCX*0x8]
INC RCX
CMP RAX,RCX
JNZ 0x00181b62
LAB_00181b6e:
POP RBX
POP R14
POP RBP
RET
|
void maria_collect_stats_nonulls_first(long param_1,long param_2,int8 param_3)
{
long *plVar1;
long lVar2;
long lVar3;
lVar2 = ha_find_null(param_1,param_3);
if (lVar2 - param_1 != 0) {
lVar2 = lVar2 - param_1 >> 5;
lVar3 = 0;
do {
plVar1 = (long *)(param_2 + lVar3 * 8);
*plVar1 = *plVar1 + 1;
lVar3 = lVar3 + 1;
} while (lVar2 + (ulong)(lVar2 == 0) != lVar3);
}
return;
}
| |
23,814 | testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*) | seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc | XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)
: output_file_(output_file) {
if (output_file_.empty()) {
GTEST_LOG_(FATAL) << "XML output file may not be null";
}
} | O0 | cpp | testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x514d0
movq -0x48(%rbp), %rax
leaq 0x6b750(%rip), %rcx # 0xa2d08
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x11(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0xbce0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x13a30
jmp 0x375eb
leaq -0x11(%rbp), %rdi
callq 0xb730
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
callq 0xbc60
testb $0x1, %al
jne 0x3760a
jmp 0x3768e
leaq 0x3ca16(%rip), %rdx # 0x74027
leaq -0x28(%rbp), %rdi
movl $0x3, %esi
movl $0xf92, %ecx # imm = 0xF92
callq 0x27170
jmp 0x37626
leaq -0x28(%rbp), %rdi
callq 0x18810
movq %rax, -0x50(%rbp)
jmp 0x37635
movq -0x50(%rbp), %rdi
leaq 0x3d701(%rip), %rsi # 0x74d41
callq 0xb640
jmp 0x37647
leaq -0x28(%rbp), %rdi
callq 0x272b0
jmp 0x3768e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0xb730
jmp 0x3769d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x37694
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x272b0
jmp 0x37694
addq $0x50, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xbe58
movq -0x48(%rbp), %rdi
callq 0x5de50
movq -0x20(%rbp), %rdi
callq 0xbcd0
nop
| _ZN7testing8internal24XmlUnitTestResultPrinterC2EPKc:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_48], rdi
call _ZN7testing22EmptyTestEventListenerC2Ev; testing::EmptyTestEventListener::EmptyTestEventListener(void)
mov rax, [rbp+var_48]
lea rcx, off_A2D08
mov [rax], rcx
add rax, 8
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
lea rdi, [rbp+var_11]
mov [rbp+var_30], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_375EB:
lea rdi, [rbp+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_48]
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_3760A
jmp loc_3768E
loc_3760A:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_28]
mov esi, 3
mov ecx, 0F92h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_37626:
lea rdi, [rbp+var_28]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rbp+var_50], rax
jmp short $+2
loc_37635:
mov rdi, [rbp+var_50]
lea rsi, aXmlOutputFileM; "XML output file may not be null"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_37647:
lea rdi, [rbp+var_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_3768E
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_3769D
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_37694
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_37694
loc_3768E:
add rsp, 50h
pop rbp
retn
loc_37694:
mov rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3769D:
mov rdi, [rbp+var_48]; this
call _ZN7testing22EmptyTestEventListenerD2Ev; testing::EmptyTestEventListener::~EmptyTestEventListener()
mov rdi, [rbp+var_20]
call __Unwind_Resume
| void testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(
testing::internal::XmlUnitTestResultPrinter *this,
const char *a2)
{
void *Stream; // [rsp+0h] [rbp-50h]
long long v3; // [rsp+18h] [rbp-38h]
_BYTE v4[4]; // [rsp+28h] [rbp-28h] BYREF
char v5; // [rsp+3Fh] [rbp-11h] BYREF
const char *v6; // [rsp+40h] [rbp-10h]
testing::EmptyTestEventListener *v7; // [rsp+48h] [rbp-8h]
v7 = this;
v6 = a2;
testing::EmptyTestEventListener::EmptyTestEventListener(this);
*(_QWORD *)this = off_A2D08;
v3 = (long long)v6;
std::allocator<char>::allocator(&v5, a2);
std::string::basic_string<std::allocator<char>>((long long)this + 8, v3, (long long)&v5);
std::allocator<char>::~allocator(&v5);
if ( (std::string::empty((char *)this + 8) & 1) != 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)v4,
3,
"/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
3986);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v4);
std::operator<<<std::char_traits<char>>(Stream, "XML output file may not be null");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v4);
}
}
| XmlUnitTestResultPrinter:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x001514d0
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[0x1a2d08]
MOV qword ptr [RAX],RCX
ADD RAX,0x8
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x11]
MOV qword ptr [RBP + -0x30],RDI
CALL 0x0010bce0
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x30]
LAB_001375e4:
CALL 0x00113a30
JMP 0x001375eb
LAB_001375eb:
LEA RDI,[RBP + -0x11]
CALL 0x0010b730
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x8
CALL 0x0010bc60
TEST AL,0x1
JNZ 0x0013760a
JMP 0x0013768e
LAB_0013760a:
LEA RDX,[0x174027]
LEA RDI,[RBP + -0x28]
MOV ESI,0x3
MOV ECX,0xf92
CALL 0x00127170
JMP 0x00137626
LAB_00137626:
LEA RDI,[RBP + -0x28]
CALL 0x00118810
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00137635
LAB_00137635:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x174d41]
CALL 0x0010b640
LAB_00137645:
JMP 0x00137647
LAB_00137647:
LEA RDI,[RBP + -0x28]
CALL 0x001272b0
JMP 0x0013768e
LAB_0013768e:
ADD RSP,0x50
POP RBP
RET
|
/* testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*) */
void __thiscall
testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter
(XmlUnitTestResultPrinter *this,char *param_1)
{
char *pcVar1;
ulong uVar2;
ostream *poVar3;
GTestLog local_30 [23];
allocator local_19;
char *local_18;
XmlUnitTestResultPrinter *local_10;
local_18 = param_1;
local_10 = this;
EmptyTestEventListener::EmptyTestEventListener((EmptyTestEventListener *)this);
pcVar1 = local_18;
*(int ***)this = &PTR__XmlUnitTestResultPrinter_001a2d08;
std::allocator<char>::allocator();
/* try { // try from 001375e4 to 001375e8 has its CatchHandler @ 00137652 */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 8),pcVar1,&local_19);
std::allocator<char>::~allocator((allocator<char> *)&local_19);
uVar2 = std::__cxx11::string::empty();
if ((uVar2 & 1) != 0) {
/* try { // try from 0013760a to 00137623 has its CatchHandler @ 00137669 */
GTestLog::GTestLog(local_30,3,
"/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0xf92);
/* try { // try from 00137626 to 00137644 has its CatchHandler @ 00137677 */
poVar3 = (ostream *)GTestLog::GetStream();
std::operator<<(poVar3,"XML output file may not be null");
GTestLog::~GTestLog(local_30);
}
return;
}
| |
23,815 | ma_feof | eloqsql/libmariadb/libmariadb/ma_io.c | int ma_feof(MA_FILE *file)
{
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
return feof((FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mfeof(file);
break;
#endif
default:
return -1;
}
} | O0 | c | ma_feof:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3ad0c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ad5c
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x3ad26
jmp 0x3ad1c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x3ad38
jmp 0x3ad55
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x136b0
movl %eax, -0x4(%rbp)
jmp 0x3ad5c
leaq 0x2c271(%rip), %rax # 0x66fb0
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x3ad5c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_feof:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_3AD0C
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3AD5C
loc_3AD0C:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_14], eax
sub eax, 1
jz short loc_3AD26
jmp short $+2
loc_3AD1C:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_3AD38
jmp short loc_3AD55
loc_3AD26:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _feof
mov [rbp+var_4], eax
jmp short loc_3AD5C
loc_3AD38:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp short loc_3AD5C
loc_3AD55:
mov [rbp+var_4], 0FFFFFFFFh
loc_3AD5C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_feof(long long a1)
{
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
return (unsigned int)feof(*(_QWORD *)(a1 + 8));
}
else if ( *(_DWORD *)a1 == 2 )
{
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 16LL))(a1);
}
else
{
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
| ma_feof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0013ad0c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013ad5c
LAB_0013ad0c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
SUB EAX,0x1
JZ 0x0013ad26
JMP 0x0013ad1c
LAB_0013ad1c:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x0013ad38
JMP 0x0013ad55
LAB_0013ad26:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001136b0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ad5c
LAB_0013ad38:
LEA RAX,[0x166fb0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ad5c
LAB_0013ad55:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_0013ad5c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_feof(int *param_1)
{
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else if (*param_1 == 1) {
local_c = feof(*(FILE **)(param_1 + 2));
}
else if (*param_1 == 2) {
local_c = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x10))(param_1);
}
else {
local_c = -1;
}
return local_c;
}
| |
23,816 | ma_feof | eloqsql/libmariadb/libmariadb/ma_io.c | int ma_feof(MA_FILE *file)
{
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
return feof((FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mfeof(file);
break;
#endif
default:
return -1;
}
} | O3 | c | ma_feof:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x2aa4d
movl (%rdi), %eax
cmpl $0x2, %eax
je 0x2aa54
cmpl $0x1, %eax
jne 0x2aa4d
movq 0x8(%rdi), %rdi
popq %rbp
jmp 0x136f0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
leaq 0x24065(%rip), %rax # 0x4eac0
movq (%rax), %rax
movq 0x58(%rax), %rax
popq %rbp
jmpq *0x10(%rax)
| ma_feof:
push rbp
mov rbp, rsp
test rdi, rdi
jz short loc_2AA4D
mov eax, [rdi]
cmp eax, 2
jz short loc_2AA54
cmp eax, 1
jnz short loc_2AA4D
mov rdi, [rdi+8]
pop rbp
jmp _feof
loc_2AA4D:
mov eax, 0FFFFFFFFh
pop rbp
retn
loc_2AA54:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
pop rbp
jmp qword ptr [rax+10h]
| long long ma_feof(long long a1)
{
if ( !a1 )
return 0xFFFFFFFFLL;
if ( *(_DWORD *)a1 != 2 )
{
if ( *(_DWORD *)a1 == 1 )
return feof(*(_QWORD *)(a1 + 8));
return 0xFFFFFFFFLL;
}
return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 16LL))();
}
| ma_feof:
PUSH RBP
MOV RBP,RSP
TEST RDI,RDI
JZ 0x0012aa4d
MOV EAX,dword ptr [RDI]
CMP EAX,0x2
JZ 0x0012aa54
CMP EAX,0x1
JNZ 0x0012aa4d
MOV RDI,qword ptr [RDI + 0x8]
POP RBP
JMP 0x001136f0
LAB_0012aa4d:
MOV EAX,0xffffffff
POP RBP
RET
LAB_0012aa54:
LEA RAX,[0x14eac0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
POP RBP
JMP qword ptr [RAX + 0x10]
|
int ma_feof(int *param_1)
{
int iVar1;
if (param_1 != (int *)0x0) {
if (*param_1 == 2) {
/* WARNING: Could not recover jumptable at 0x0012aa63. Too many branches */
/* WARNING: Treating indirect jump as call */
iVar1 = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x10))();
return iVar1;
}
if (*param_1 == 1) {
iVar1 = feof(*(FILE **)(param_1 + 2));
return iVar1;
}
}
return -1;
}
| |
23,817 | mj_defaultLROpt | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_io.c | void mj_defaultLROpt(mjLROpt* opt) {
opt->mode = mjLRMODE_MUSCLE;
opt->useexisting = 1;
opt->uselimit = 0;
opt->accel = 20;
opt->maxforce = 0;
opt->timeconst = 1;
opt->timestep = 0.01;
opt->inttotal = 10;
opt->interval = 2;
opt->tolrange = 0.05;
} | O0 | c | mj_defaultLROpt:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x1, (%rax)
movq -0x8(%rsp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x48386b(%rip), %xmm0 # 0x517c50
vmovsd %xmm0, 0x10(%rax)
movq -0x8(%rsp), %rax
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x18(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x483753(%rip), %xmm0 # 0x517b58
vmovsd %xmm0, 0x20(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x483899(%rip), %xmm0 # 0x517cb0
vmovsd %xmm0, 0x28(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x4837cf(%rip), %xmm0 # 0x517bf8
vmovsd %xmm0, 0x30(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x483705(%rip), %xmm0 # 0x517b40
vmovsd %xmm0, 0x38(%rax)
movq -0x8(%rsp), %rax
vmovsd 0x48385b(%rip), %xmm0 # 0x517ca8
vmovsd %xmm0, 0x40(%rax)
retq
nopw %cs:(%rax,%rax)
| mj_defaultLROpt:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov dword ptr [rax], 1
mov rax, [rsp+var_8]
mov dword ptr [rax+4], 1
mov rax, [rsp+var_8]
mov dword ptr [rax+8], 0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517C50
vmovsd qword ptr [rax+10h], xmm0
mov rax, [rsp+var_8]
vxorps xmm0, xmm0, xmm0
vmovsd qword ptr [rax+18h], xmm0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517B58
vmovsd qword ptr [rax+20h], xmm0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517CB0
vmovsd qword ptr [rax+28h], xmm0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517BF8
vmovsd qword ptr [rax+30h], xmm0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517B40
vmovsd qword ptr [rax+38h], xmm0
mov rax, [rsp+var_8]
vmovsd xmm0, cs:qword_517CA8
vmovsd qword ptr [rax+40h], xmm0
retn
| _DWORD * mj_defaultLROpt(_DWORD *a1)
{
_DWORD *result; // rax
*a1 = 1;
a1[1] = 1;
a1[2] = 0;
_RAX = a1;
__asm
{
vmovsd xmm0, cs:qword_517C50
vmovsd qword ptr [rax+10h], xmm0
vxorps xmm0, xmm0, xmm0
vmovsd qword ptr [rax+18h], xmm0
}
_RAX = a1;
__asm
{
vmovsd xmm0, cs:qword_517B58
vmovsd qword ptr [rax+20h], xmm0
vmovsd xmm0, cs:qword_517CB0
vmovsd qword ptr [rax+28h], xmm0
}
_RAX = a1;
__asm
{
vmovsd xmm0, cs:qword_517BF8
vmovsd qword ptr [rax+30h], xmm0
vmovsd xmm0, cs:qword_517B40
vmovsd qword ptr [rax+38h], xmm0
}
result = a1;
__asm
{
vmovsd xmm0, cs:qword_517CA8
vmovsd qword ptr [rax+40h], xmm0
}
return result;
}
| mj_defaultLROpt:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x4],0x1
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617c50]
VMOVSD qword ptr [RAX + 0x10],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RAX + 0x18],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617b58]
VMOVSD qword ptr [RAX + 0x20],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617cb0]
VMOVSD qword ptr [RAX + 0x28],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617bf8]
VMOVSD qword ptr [RAX + 0x30],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617b40]
VMOVSD qword ptr [RAX + 0x38],XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSD XMM0,qword ptr [0x00617ca8]
VMOVSD qword ptr [RAX + 0x40],XMM0
RET
|
void mj_defaultLROpt(int4 *param_1)
{
*param_1 = 1;
param_1[1] = 1;
param_1[2] = 0;
*(int8 *)(param_1 + 4) = DAT_00617c50;
*(int8 *)(param_1 + 6) = 0;
*(int8 *)(param_1 + 8) = DAT_00617b58;
*(int8 *)(param_1 + 10) = DAT_00617cb0;
*(int8 *)(param_1 + 0xc) = DAT_00617bf8;
*(int8 *)(param_1 + 0xe) = DAT_00617b40;
*(int8 *)(param_1 + 0x10) = DAT_00617ca8;
return;
}
| |
23,818 | add_pc2line_info | bluesky950520[P]quickjs/quickjs.c | static void add_pc2line_info(JSFunctionDef *s, uint32_t pc,
int line_num, int col_num)
{
if (s->source_loc_slots == NULL)
return;
if (s->source_loc_count >= s->source_loc_size)
return;
if (pc < s->line_number_last_pc)
return;
if (line_num == s->line_number_last)
if (col_num == s->col_number_last)
return;
s->source_loc_slots[s->source_loc_count].pc = pc;
s->source_loc_slots[s->source_loc_count].line_num = line_num;
s->source_loc_slots[s->source_loc_count].col_num = col_num;
s->source_loc_count++;
s->line_number_last_pc = pc;
s->line_number_last = line_num;
s->col_number_last = col_num;
} | O1 | c | add_pc2line_info:
movq 0x1b8(%rdi), %rax
testq %rax, %rax
je 0x6e9c2
movslq 0x1c4(%rdi), %r8
cmpl 0x1c0(%rdi), %r8d
jge 0x6e9c2
cmpl %esi, 0x1cc(%rdi)
ja 0x6e9c2
cmpl %edx, 0x1c8(%rdi)
jne 0x6e994
cmpl %ecx, 0x1d0(%rdi)
je 0x6e9c2
leaq (%r8,%r8,2), %r9
movl %esi, (%rax,%r9,4)
movl %edx, 0x4(%rax,%r9,4)
movl %ecx, 0x8(%rax,%r9,4)
leal 0x1(%r8), %eax
movl %eax, 0x1c4(%rdi)
movl %esi, 0x1cc(%rdi)
movl %edx, 0x1c8(%rdi)
movl %ecx, 0x1d0(%rdi)
retq
| add_pc2line_info:
mov rax, [rdi+1B8h]
test rax, rax
jz short locret_6E9C2
movsxd r8, dword ptr [rdi+1C4h]
cmp r8d, [rdi+1C0h]
jge short locret_6E9C2
cmp [rdi+1CCh], esi
ja short locret_6E9C2
cmp [rdi+1C8h], edx
jnz short loc_6E994
cmp [rdi+1D0h], ecx
jz short locret_6E9C2
loc_6E994:
lea r9, [r8+r8*2]
mov [rax+r9*4], esi
mov [rax+r9*4+4], edx
mov [rax+r9*4+8], ecx
lea eax, [r8+1]
mov [rdi+1C4h], eax
mov [rdi+1CCh], esi
mov [rdi+1C8h], edx
mov [rdi+1D0h], ecx
locret_6E9C2:
retn
| long long add_pc2line_info(long long a1, unsigned int a2, int a3, int a4)
{
long long result; // rax
long long v5; // r8
long long v6; // r9
result = *(_QWORD *)(a1 + 440);
if ( result )
{
v5 = *(int *)(a1 + 452);
if ( (int)v5 < *(_DWORD *)(a1 + 448)
&& *(_DWORD *)(a1 + 460) <= a2
&& (*(_DWORD *)(a1 + 456) != a3 || *(_DWORD *)(a1 + 464) != a4) )
{
v6 = 3 * v5;
*(_DWORD *)(result + 4 * v6) = a2;
*(_DWORD *)(result + 4 * v6 + 4) = a3;
*(_DWORD *)(result + 4 * v6 + 8) = a4;
result = (unsigned int)(v5 + 1);
*(_DWORD *)(a1 + 452) = result;
*(_DWORD *)(a1 + 460) = a2;
*(_DWORD *)(a1 + 456) = a3;
*(_DWORD *)(a1 + 464) = a4;
}
}
return result;
}
| add_pc2line_info:
MOV RAX,qword ptr [RDI + 0x1b8]
TEST RAX,RAX
JZ 0x0016e9c2
MOVSXD R8,dword ptr [RDI + 0x1c4]
CMP R8D,dword ptr [RDI + 0x1c0]
JGE 0x0016e9c2
CMP dword ptr [RDI + 0x1cc],ESI
JA 0x0016e9c2
CMP dword ptr [RDI + 0x1c8],EDX
JNZ 0x0016e994
CMP dword ptr [RDI + 0x1d0],ECX
JZ 0x0016e9c2
LAB_0016e994:
LEA R9,[R8 + R8*0x2]
MOV dword ptr [RAX + R9*0x4],ESI
MOV dword ptr [RAX + R9*0x4 + 0x4],EDX
MOV dword ptr [RAX + R9*0x4 + 0x8],ECX
LEA EAX,[R8 + 0x1]
MOV dword ptr [RDI + 0x1c4],EAX
MOV dword ptr [RDI + 0x1cc],ESI
MOV dword ptr [RDI + 0x1c8],EDX
MOV dword ptr [RDI + 0x1d0],ECX
LAB_0016e9c2:
RET
|
void add_pc2line_info(long param_1,uint param_2,int param_3,int param_4)
{
int iVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(param_1 + 0x1b8);
if (lVar2 != 0) {
iVar1 = *(int *)(param_1 + 0x1c4);
lVar3 = (long)iVar1;
if (((iVar1 < *(int *)(param_1 + 0x1c0)) && (*(uint *)(param_1 + 0x1cc) <= param_2)) &&
((*(int *)(param_1 + 0x1c8) != param_3 || (*(int *)(param_1 + 0x1d0) != param_4)))) {
*(uint *)(lVar2 + lVar3 * 0xc) = param_2;
*(int *)(lVar2 + 4 + lVar3 * 0xc) = param_3;
*(int *)(lVar2 + 8 + lVar3 * 0xc) = param_4;
*(int *)(param_1 + 0x1c4) = iVar1 + 1;
*(uint *)(param_1 + 0x1cc) = param_2;
*(int *)(param_1 + 0x1c8) = param_3;
*(int *)(param_1 + 0x1d0) = param_4;
}
}
return;
}
| |
23,819 | mysql_stmt_attr_get | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value)
{
switch (attr_type) {
case STMT_ATTR_STATE:
*(enum mysql_stmt_state *)value= stmt->state;
break;
case STMT_ATTR_UPDATE_MAX_LENGTH:
*(my_bool *)value= stmt->update_max_length;
break;
case STMT_ATTR_CURSOR_TYPE:
*(unsigned long *)value= stmt->flags;
break;
case STMT_ATTR_PREFETCH_ROWS:
*(unsigned long *)value= stmt->prefetch_rows;
break;
case STMT_ATTR_PREBIND_PARAMS:
*(unsigned int *)value= stmt->prebind_params;
break;
case STMT_ATTR_ARRAY_SIZE:
*(unsigned int *)value= stmt->array_size;
break;
case STMT_ATTR_ROW_SIZE:
*(size_t *)value= stmt->row_size;
break;
case STMT_ATTR_CB_USER_DATA:
*((void **)value) = stmt->user_data;
break;
default:
return(1);
}
return(0);
} | O3 | c | mysql_stmt_attr_get:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpl $0xc7, %esi
jle 0x22b75
addl $0xffffff38, %esi # imm = 0xFFFFFF38
cmpl $0x4, %esi
ja 0x22bc0
leaq 0x19d38(%rip), %rax # 0x3c89c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x378(%rdi), %eax
jmp 0x22bbc
testl %esi, %esi
je 0x22b8c
cmpl $0x1, %esi
je 0x22ba8
cmpl $0x2, %esi
jne 0x22bc0
movq 0x318(%rdi), %rax
jmp 0x22bac
movb 0x313(%rdi), %al
movb %al, (%rdx)
jmp 0x22bbe
movq 0x380(%rdi), %rax
jmp 0x22bac
movq 0x370(%rdi), %rax
jmp 0x22bac
movq 0x48(%rdi), %rax
movq %rax, (%rdx)
jmp 0x22bbe
movl 0x50(%rdi), %eax
jmp 0x22bbc
movl 0x368(%rdi), %eax
movl %eax, (%rdx)
xorl %eax, %eax
popq %rbp
retq
| mysql_stmt_attr_get:
push rbp
mov rbp, rsp
mov al, 1
cmp esi, 0C7h
jle short loc_22B75
add esi, 0FFFFFF38h; switch 5 cases
cmp esi, 4
ja short def_22B6B; jumptable 0000000000022B6B default case
lea rax, jpt_22B6B
movsxd rcx, ds:(jpt_22B6B - 3C89Ch)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_22B6D:
mov eax, [rdi+378h]; jumptable 0000000000022B6B case 200
jmp short loc_22BBC
loc_22B75:
test esi, esi
jz short loc_22B8C
cmp esi, 1
jz short loc_22BA8
cmp esi, 2
jnz short def_22B6B; jumptable 0000000000022B6B default case
mov rax, [rdi+318h]
jmp short loc_22BAC
loc_22B8C:
mov al, [rdi+313h]
mov [rdx], al
jmp short loc_22BBE
loc_22B96:
mov rax, [rdi+380h]; jumptable 0000000000022B6B case 204
jmp short loc_22BAC
loc_22B9F:
mov rax, [rdi+370h]; jumptable 0000000000022B6B case 202
jmp short loc_22BAC
loc_22BA8:
mov rax, [rdi+48h]
loc_22BAC:
mov [rdx], rax
jmp short loc_22BBE
loc_22BB1:
mov eax, [rdi+50h]; jumptable 0000000000022B6B case 203
jmp short loc_22BBC
loc_22BB6:
mov eax, [rdi+368h]; jumptable 0000000000022B6B case 201
loc_22BBC:
mov [rdx], eax
loc_22BBE:
xor eax, eax
def_22B6B:
pop rbp; jumptable 0000000000022B6B default case
retn
| char mysql_stmt_attr_get(long long a1, int a2, _DWORD *a3)
{
char result; // al
int v4; // eax
long long v5; // rax
result = 1;
if ( a2 > 199 )
{
switch ( a2 )
{
case 200:
v4 = *(_DWORD *)(a1 + 888);
goto LABEL_15;
case 201:
v4 = *(_DWORD *)(a1 + 872);
goto LABEL_15;
case 202:
v5 = *(_QWORD *)(a1 + 880);
goto LABEL_12;
case 203:
v4 = *(_DWORD *)(a1 + 80);
LABEL_15:
*a3 = v4;
return 0;
case 204:
v5 = *(_QWORD *)(a1 + 896);
goto LABEL_12;
default:
return result;
}
}
if ( a2 )
{
if ( a2 == 1 )
{
v5 = *(_QWORD *)(a1 + 72);
}
else
{
if ( a2 != 2 )
return result;
v5 = *(_QWORD *)(a1 + 792);
}
LABEL_12:
*(_QWORD *)a3 = v5;
}
else
{
*(_BYTE *)a3 = *(_BYTE *)(a1 + 787);
}
return 0;
}
| mysql_stmt_attr_get:
PUSH RBP
MOV RBP,RSP
MOV AL,0x1
CMP ESI,0xc7
JLE 0x00122b75
ADD ESI,0xffffff38
CMP ESI,0x4
JA 0x00122bc0
LEA RAX,[0x13c89c]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_c8:
MOV EAX,dword ptr [RDI + 0x378]
JMP 0x00122bbc
LAB_00122b75:
TEST ESI,ESI
JZ 0x00122b8c
CMP ESI,0x1
JZ 0x00122ba8
CMP ESI,0x2
JNZ 0x00122bc0
MOV RAX,qword ptr [RDI + 0x318]
JMP 0x00122bac
LAB_00122b8c:
MOV AL,byte ptr [RDI + 0x313]
MOV byte ptr [RDX],AL
JMP 0x00122bbe
caseD_cc:
MOV RAX,qword ptr [RDI + 0x380]
JMP 0x00122bac
caseD_ca:
MOV RAX,qword ptr [RDI + 0x370]
JMP 0x00122bac
LAB_00122ba8:
MOV RAX,qword ptr [RDI + 0x48]
LAB_00122bac:
MOV qword ptr [RDX],RAX
JMP 0x00122bbe
caseD_cb:
MOV EAX,dword ptr [RDI + 0x50]
JMP 0x00122bbc
caseD_c9:
MOV EAX,dword ptr [RDI + 0x368]
LAB_00122bbc:
MOV dword ptr [RDX],EAX
LAB_00122bbe:
XOR EAX,EAX
default:
POP RBP
RET
|
int8 mysql_stmt_attr_get(long param_1,int param_2,int8 *param_3)
{
int4 uVar1;
int8 uVar2;
uVar2 = 1;
if (param_2 < 200) {
if (param_2 != 0) {
if (param_2 == 1) {
uVar2 = *(int8 *)(param_1 + 0x48);
}
else {
if (param_2 != 2) {
return 1;
}
uVar2 = *(int8 *)(param_1 + 0x318);
}
goto LAB_00122bac;
}
*(int1 *)param_3 = *(int1 *)(param_1 + 0x313);
goto LAB_00122bbe;
}
switch(param_2) {
case 200:
uVar1 = *(int4 *)(param_1 + 0x378);
break;
case 0xc9:
uVar1 = *(int4 *)(param_1 + 0x368);
break;
case 0xca:
uVar2 = *(int8 *)(param_1 + 0x370);
goto LAB_00122bac;
case 0xcb:
uVar1 = *(int4 *)(param_1 + 0x50);
break;
case 0xcc:
uVar2 = *(int8 *)(param_1 + 0x380);
LAB_00122bac:
*param_3 = uVar2;
goto LAB_00122bbe;
default:
goto switchD_00122b6b_default;
}
*(int4 *)param_3 = uVar1;
LAB_00122bbe:
uVar2 = 0;
switchD_00122b6b_default:
return uVar2;
}
| |
23,820 | my_b_write | eloqsql/include/my_sys.h | static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
MEM_CHECK_DEFINED(Buffer, Count);
if (info->write_pos + Count <= info->write_end)
{
if (Count)
{
memcpy(info->write_pos, Buffer, Count);
info->write_pos+= Count;
}
return 0;
}
return _my_b_write(info, Buffer, Count);
} | O0 | c | my_b_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
ja 0xac1ef
cmpq $0x0, -0x20(%rbp)
je 0xac1e6
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xac203
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe2630
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| my_b_write_1:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+40h]
add rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+48h]
ja short loc_AC1EF
cmp [rbp+var_20], 0
jz short loc_AC1E6
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
loc_AC1E6:
mov [rbp+var_4], 0
jmp short loc_AC203
loc_AC1EF:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _my_b_write
mov [rbp+var_4], eax
loc_AC203:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_b_write_1(long long a1, long long a2, long long a3)
{
if ( (unsigned long long)(a3 + *(_QWORD *)(a1 + 64)) > *(_QWORD *)(a1 + 72) )
{
return (unsigned int)my_b_write(a1, a2, a3);
}
else
{
if ( a3 )
{
memcpy(*(_QWORD *)(a1 + 64), a2, a3);
*(_QWORD *)(a1 + 64) += a3;
}
return 0;
}
}
| my_b_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
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 + 0x40]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x48]
JA 0x001ac1ef
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001ac1e6
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
LAB_001ac1e6:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ac203
LAB_001ac1ef:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e2630
MOV dword ptr [RBP + -0x4],EAX
LAB_001ac203:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_b_write(long param_1,void *param_2,size_t param_3)
{
int4 local_c;
if (*(ulong *)(param_1 + 0x48) < *(long *)(param_1 + 0x40) + param_3) {
local_c = _my_b_write(param_1,param_2,param_3);
}
else {
if (param_3 != 0) {
memcpy(*(void **)(param_1 + 0x40),param_2,param_3);
*(size_t *)(param_1 + 0x40) = param_3 + *(long *)(param_1 + 0x40);
}
local_c = 0;
}
return local_c;
}
| |
23,821 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O0 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x9380
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x98f0
movl $0x6, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9900
leaq 0x26(%rip), %rax # 0x4ea30
cmpq %rax, -0xa0(%rbp)
jne 0x4ea19
movb $0x1, -0x1(%rbp)
jmp 0x4ea1d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push rbp
mov rbp, rsp
sub rsp, 0A0h
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 98h
call _memset
lea rdi, [rbp+var_A0]
add rdi, 8
call _sigemptyset
mov edi, 6
xor eax, eax
mov esi, eax
lea rdx, [rbp+var_A0]
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [rbp+var_A0], rax
jnz short loc_4EA19
mov [rbp+var_1], 1
jmp short loc_4EA1D
loc_4EA19:
mov [rbp+var_1], 0
loc_4EA1D:
mov al, [rbp+var_1]
and al, 1
add rsp, 0A0h
pop rbp
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A0h] BYREF
long long v3; // [rsp+8h] [rbp-98h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(&v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x98
CALL 0x00109380
LEA RDI,[RBP + -0xa0]
ADD RDI,0x8
CALL 0x001098f0
MOV EDI,0x6
XOR EAX,EAX
MOV ESI,EAX
LEA RDX,[RBP + -0xa0]
CALL 0x00109900
LEA RAX,[0x14ea30]
CMP qword ptr [RBP + -0xa0],RAX
JNZ 0x0014ea19
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014ea1d
LAB_0014ea19:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014ea1d:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t sStack_a0;
memset(&local_a8,0,0x98);
sigemptyset(&sStack_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x14ea,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
| |
23,822 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O3 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsp, %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7290
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x7680
movl $0x6, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x7690
leaq 0x12(%rip), %rax # 0x21369
cmpq %rax, -0x8(%r14)
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rsp
mov edx, 98h
mov rdi, rbx
xor esi, esi
call _memset
lea r14, [rsp+0A8h+var_A0]
mov rdi, r14
call _sigemptyset
mov edi, 6
xor esi, esi
mov rdx, rbx
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [r14-8], rax
setz al
add rsp, 98h
pop rbx
pop r14
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A8h] BYREF
_BYTE v3[160]; // [rsp+8h] [rbp-A0h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RSP
MOV EDX,0x98
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00107290
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00107680
MOV EDI,0x6
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00107690
LEA RAX,[0x121369]
CMP qword ptr [R14 + -0x8],RAX
SETZ AL
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t local_a0;
memset(&local_a8,0,0x98);
sigemptyset(&local_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x1213,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
| |
23,823 | my_xml_parse | eloqsql/strings/xml.c | int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
} | O3 | c | my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0xd76ed
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0xd742f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
cmpl $0x43, %eax
je 0xd76cf
cmpl $0x44, %eax
jne 0xd7494
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd76cf
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0xd748a
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0xd7455
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0xd7455
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0xd7441
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0xd746e
movq %r15, %rdi
callq 0xd7def
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0xd76cf
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd76cf
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0xd76cf
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
cmpl $0x2f, %eax
jne 0xd74e6
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
cmpl $0x49, %eax
jne 0xd774d
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd7ab5
testl %eax, %eax
jne 0xd779f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
movl %eax, %r13d
jmp 0xd76c9
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0xd74fb
cmpl $0x21, %r14d
jne 0xd7508
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
jmp 0xd750e
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0xd7739
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd7c78
testl %eax, %eax
jne 0xd779f
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0xd7569
testb %al, %al
je 0xd7652
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd77b7
cmpl $0x49, %eax
je 0xd75f7
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0xd7636
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd77b7
cmpl $0x53, %eax
je 0xd75a0
cmpl $0x49, %eax
jne 0xd7761
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xd7c78
testl %eax, %eax
jne 0xd779f
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd75ec
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0xd779f
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0xd7628
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd7c78
testl %eax, %eax
jne 0xd779f
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd7ab5
testl %eax, %eax
je 0xd7642
jmp 0xd779f
cmpl $0x21, %r14d
jne 0xd764e
cmpl $0x53, %r13d
jne 0xd764e
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0xd7547
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0xd767e
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd7ab5
testl %eax, %eax
jne 0xd779f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
movl %eax, %r13d
testb %r12b, %r12b
jne 0xd76af
cmpl $0x3f, %r13d
jne 0xd7775
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd7ab5
testl %eax, %eax
jne 0xd779f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd77b7
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0xd76c9
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd7ab5
testl %eax, %eax
jne 0xd779f
cmpl $0x3e, %r13d
jne 0xd7724
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0xd73e8
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0xd771c
addq $0x8, %rbx
leaq 0x9510(%rip), %rcx # 0xe0c0d
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x29970
jmp 0xd77a5
xorl %r14d, %r14d
jmp 0xd77a5
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd7a1a
leaq 0x94bb(%rip), %rcx # 0xe0bf2
jmp 0xd7788
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7a1a
leaq 0x9441(%rip), %rcx # 0xe0b8c
jmp 0xd7788
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7a1a
leaq 0x9410(%rip), %rcx # 0xe0b6f
jmp 0xd7788
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7a1a
leaq 0x943d(%rip), %rcx # 0xe0bb0
jmp 0xd7788
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd7a1a
leaq 0x944f(%rip), %rcx # 0xe0bd7
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x29970
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_D76ED
lea r15, [rbp+var_40]
loc_D73E8:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_D742F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_D76CF
cmp eax, 44h ; 'D'
jnz loc_D7494
mov rax, [rbx+150h]
test rax, rax
jz loc_D76CF
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_D748A
loc_D742F:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_D7455
sub rax, rsi
mov rdx, rsi
loc_D7441:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_D7455
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_D7441
loc_D7455:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_D746E
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_D746E:
cmp rsi, rdx
jz loc_D76CF
mov rax, [rbx+150h]
test rax, rax
jz loc_D76CF
sub rdx, rsi
loc_D748A:
mov rdi, rbx
call rax
jmp loc_D76CF
loc_D7494:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_D74E6
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_D774D
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_D779F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_D76C9
loc_D74E6:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_D74FB
cmp r14d, 21h ; '!'
jnz short loc_D7508
loc_D74FB:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_D750E
loc_D7508:
mov r12b, 1
mov eax, r14d
loc_D750E:
cmp eax, 49h ; 'I'
jnz loc_D7739
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_D779F
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_D7547:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_D7569
test al, al
jz loc_D7652
loc_D7569:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_D75F7
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_D7636
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_D75A0
cmp eax, 49h ; 'I'
jnz loc_D7761
loc_D75A0:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_D779F
mov rax, [rbx+150h]
test rax, rax
jz short loc_D75EC
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_D779F
loc_D75EC:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_D7628
loc_D75F7:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_D779F
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_D7628:
call my_xml_leave
test eax, eax
jz short loc_D7642
jmp loc_D779F
loc_D7636:
cmp r14d, 21h ; '!'
jnz short loc_D764E
cmp r13d, 53h ; 'S'
jnz short loc_D764E
loc_D7642:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_D7547
loc_D764E:
lea r15, [rbp+var_40]
loc_D7652:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_D767E
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D779F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D767E:
test r12b, r12b
jnz short loc_D76AF
cmp r13d, 3Fh ; '?'
jnz loc_D7775
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D779F
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D76AF:
cmp r14d, 21h ; '!'
jnz short loc_D76C9
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D779F
loc_D76C9:
cmp r13d, 3Eh ; '>'
jnz short loc_D7724
loc_D76CF:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_D73E8
mov rcx, [rbx+118h]
loc_D76ED:
cmp byte ptr [rcx], 0
jz short loc_D771C
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_D77A5
loc_D771C:
xor r14d, r14d
jmp loc_D77A5
loc_D7724:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_D7788
loc_D7739:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_D7788
loc_D774D:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_D7788
loc_D7761:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_D7788
loc_D7775:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_D7788:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_D779F:
mov r14d, 1
loc_D77A5:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
| my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x001d76ed
LEA R15,[RBP + -0x40]
LAB_001d73e8:
CMP byte ptr [RSI],0x3c
JNZ 0x001d742f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
CMP EAX,0x43
JZ 0x001d76cf
CMP EAX,0x44
JNZ 0x001d7494
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d76cf
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x001d748a
LAB_001d742f:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x001d7455
SUB RAX,RSI
MOV RDX,RSI
LAB_001d7441:
CMP byte ptr [RDX],0x3c
JZ 0x001d7455
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x001d7441
LAB_001d7455:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x001d746e
MOV RDI,R15
CALL 0x001d7def
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_001d746e:
CMP RSI,RDX
JZ 0x001d76cf
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d76cf
SUB RDX,RSI
LAB_001d748a:
MOV RDI,RBX
CALL RAX
JMP 0x001d76cf
LAB_001d7494:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
CMP EAX,0x2f
JNZ 0x001d74e6
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
CMP EAX,0x49
JNZ 0x001d774d
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d7ab5
TEST EAX,EAX
JNZ 0x001d779f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
MOV R13D,EAX
JMP 0x001d76c9
LAB_001d74e6:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x001d74fb
CMP R14D,0x21
JNZ 0x001d7508
LAB_001d74fb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
JMP 0x001d750e
LAB_001d7508:
MOV R12B,0x1
MOV EAX,R14D
LAB_001d750e:
CMP EAX,0x49
JNZ 0x001d7739
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d7c78
TEST EAX,EAX
JNZ 0x001d779f
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_001d7547:
MOV RSI,R15
CALL 0x001d77b7
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x001d7569
TEST AL,AL
JZ 0x001d7652
LAB_001d7569:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d77b7
CMP EAX,0x49
JZ 0x001d75f7
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x001d7636
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d77b7
CMP EAX,0x53
JZ 0x001d75a0
CMP EAX,0x49
JNZ 0x001d7761
LAB_001d75a0:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x001d7c78
TEST EAX,EAX
JNZ 0x001d779f
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d75ec
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001d779f
LAB_001d75ec:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x001d7628
LAB_001d75f7:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x001d7c78
TEST EAX,EAX
JNZ 0x001d779f
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_001d7628:
CALL 0x001d7ab5
TEST EAX,EAX
JZ 0x001d7642
JMP 0x001d779f
LAB_001d7636:
CMP R14D,0x21
JNZ 0x001d764e
CMP R13D,0x53
JNZ 0x001d764e
LAB_001d7642:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x001d7547
LAB_001d764e:
LEA R15,[RBP + -0x40]
LAB_001d7652:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x001d767e
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d7ab5
TEST EAX,EAX
JNZ 0x001d779f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
MOV R13D,EAX
LAB_001d767e:
TEST R12B,R12B
JNZ 0x001d76af
CMP R13D,0x3f
JNZ 0x001d7775
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d7ab5
TEST EAX,EAX
JNZ 0x001d779f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d77b7
MOV R13D,EAX
LAB_001d76af:
CMP R14D,0x21
JNZ 0x001d76c9
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d7ab5
TEST EAX,EAX
JNZ 0x001d779f
LAB_001d76c9:
CMP R13D,0x3e
JNZ 0x001d7724
LAB_001d76cf:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x001d73e8
MOV RCX,qword ptr [RBX + 0x118]
LAB_001d76ed:
CMP byte ptr [RCX],0x0
JZ 0x001d771c
ADD RBX,0x8
LEA RCX,[0x1e0c0d]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00129970
JMP 0x001d77a5
LAB_001d771c:
XOR R14D,R14D
JMP 0x001d77a5
LAB_001d7724:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d7a1a
LEA RCX,[0x1e0bf2]
JMP 0x001d7788
LAB_001d7739:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7a1a
LEA RCX,[0x1e0b8c]
JMP 0x001d7788
LAB_001d774d:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7a1a
LEA RCX,[0x1e0b6f]
JMP 0x001d7788
LAB_001d7761:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7a1a
LEA RCX,[0x1e0bb0]
JMP 0x001d7788
LAB_001d7775:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d7a1a
LEA RCX,[0x1e0bd7]
LAB_001d7788:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x00129970
LAB_001d779f:
MOV R14D,0x1
LAB_001d77a5:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_001d748a;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_001d7547:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001d7652;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x001d7619;
}
if (iVar3 != 0x3d) goto LAB_001d7636;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_001d7788;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x001d7619:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_001d7788:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_001d7788;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_001d76c9:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_001d7788;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_001d748a:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_001d7636:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_001d7652:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_001d7788;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_001d76c9;
}
goto LAB_001d7547;
}
| |
23,824 | vemit_tap | eloqsql/libmariadb/unittest/mytap/tap.c | static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
} | O3 | c | vemit_tap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
movq 0x34994(%rip), %r15 # 0x4bfb0
movq (%r15), %rdi
testl %eax, %eax
leaq 0x218f8(%rip), %rcx # 0x38f20
leaq 0x20044(%rip), %rax # 0x37673
cmovneq %rax, %rcx
movl 0x36a4e(%rip), %r8d # 0x4e088
incl %r8d
movl %r8d, 0x36a44(%rip) # 0x4e088
testq %rsi, %rsi
je 0x17693
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, (%rsi)
leaq 0x218cc(%rip), %r9 # 0x38f25
cmoveq %rax, %r9
leaq 0x218b2(%rip), %rdx # 0x38f16
movl $0x1, %esi
xorl %eax, %eax
callq 0x13740
cmpb $0x0, (%r14)
je 0x176b7
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13150
leaq 0x2187c(%rip), %rdx # 0x38f16
leaq 0x1ffd2(%rip), %r9 # 0x37673
movl $0x1, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13740
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| vemit_tap:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov eax, edi
mov r15, cs:stdout_ptr
mov rdi, [r15]
test eax, eax
lea rcx, aNot; "not "
lea rax, aExecuteTestWit+29h; ""
cmovnz rcx, rax
mov r8d, cs:dword_4E088
inc r8d
mov cs:dword_4E088, r8d
test rsi, rsi
jz short loc_17693
mov rbx, rdx
mov r14, rsi
cmp byte ptr [rsi], 0
lea r9, asc_38F25; " - "
cmovz r9, rax
lea rdx, aSokDS; "%sok %d%s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
cmp byte ptr [r14], 0
jz short loc_176B7
mov rdi, [r15]
mov esi, 1
mov rdx, r14
mov rcx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp ___vfprintf_chk
loc_17693:
lea rdx, aSokDS; "%sok %d%s"
lea r9, aExecuteTestWit+29h; ""
mov esi, 1
xor eax, eax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp ___fprintf_chk
loc_176B7:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rcx
int v4; // r8d
const char *v6; // r9
long long result; // rax
v3 = "not ";
if ( a1 )
v3 = "";
v4 = ++dword_4E088;
if ( !a2 )
return __fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, "");
v6 = " - ";
if ( !*a2 )
v6 = "";
result = __fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, v6);
if ( *a2 )
return __vfprintf_chk(stdout, 1LL, a2, a3);
return result;
}
| vemit_tap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,EDI
MOV R15,qword ptr [0x0014bfb0]
MOV RDI,qword ptr [R15]
TEST EAX,EAX
LEA RCX,[0x138f20]
LEA RAX,[0x137673]
CMOVNZ RCX,RAX
MOV R8D,dword ptr [0x0014e088]
INC R8D
MOV dword ptr [0x0014e088],R8D
TEST RSI,RSI
JZ 0x00117693
MOV RBX,RDX
MOV R14,RSI
CMP byte ptr [RSI],0x0
LEA R9,[0x138f25]
CMOVZ R9,RAX
LEA RDX,[0x138f16]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00113740
CMP byte ptr [R14],0x0
JZ 0x001176b7
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,R14
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00113150
LAB_00117693:
LEA RDX,[0x138f16]
LEA R9,[0x137673]
MOV ESI,0x1
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00113740
LAB_001176b7:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void vemit_tap(int param_1,char *param_2,int8 param_3)
{
int *puVar1;
char *pcVar2;
char *pcVar3;
puVar1 = PTR_stdout_0014bfb0;
pcVar2 = "not ";
if (param_1 != 0) {
pcVar2 = "";
}
DAT_0014e088 = DAT_0014e088 + 1;
if (param_2 == (char *)0x0) {
__fprintf_chk(*(int8 *)PTR_stdout_0014bfb0,1,"%sok %d%s",pcVar2,DAT_0014e088,"");
return;
}
pcVar3 = " - ";
if (*param_2 == '\0') {
pcVar3 = "";
}
__fprintf_chk(*(int8 *)PTR_stdout_0014bfb0,1,"%sok %d%s",pcVar2,DAT_0014e088,pcVar3);
if (*param_2 != '\0') {
__vfprintf_chk(*(int8 *)puVar1,1,param_2,param_3);
return;
}
return;
}
| |
23,825 | test_vector_dot | tsotchke[P]eshkol/tests/unit/test_vector.c | static void test_vector_dot(void) {
printf("Testing vector dot product...\n");
// Create an arena
Arena* arena = arena_create(1024);
assert(arena != NULL);
// Create vectors
VectorF* a = vector_f_create(arena, 3);
assert(a != NULL);
VectorF* b = vector_f_create(arena, 3);
assert(b != NULL);
// Set vectors
float a_data[3] = {1.0f, 2.0f, 3.0f};
assert(vector_f_set(a, a_data, 3));
float b_data[3] = {4.0f, 5.0f, 6.0f};
assert(vector_f_set(b, b_data, 3));
// Compute dot product
float dot = vector_f_dot(a, b);
assert(dot == 32.0f); // 1*4 + 2*5 + 3*6 = 4 + 10 + 18 = 32
// Destroy the arena
arena_destroy(arena);
printf("PASS: vector_dot\n");
} | O0 | c | test_vector_dot:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x8705(%rip), %rdi # 0xa674
movb $0x0, %al
callq 0x1080
movl $0x400, %edi # imm = 0x400
callq 0x42a0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1f8d
jmp 0x1fac
leaq 0x8241(%rip), %rdi # 0xa1d5
leaq 0x8196(%rip), %rsi # 0xa131
movl $0xc3, %edx
leaq 0x86ec(%rip), %rcx # 0xa693
callq 0x1090
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x49a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1fc7
jmp 0x1fe6
leaq 0x820b(%rip), %rdi # 0xa1d9
leaq 0x815c(%rip), %rsi # 0xa131
movl $0xc7, %edx
leaq 0x86b2(%rip), %rcx # 0xa693
callq 0x1090
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x49a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2001
jmp 0x2020
leaq 0x84a1(%rip), %rdi # 0xa4a9
leaq 0x8122(%rip), %rsi # 0xa131
movl $0xca, %edx
leaq 0x8678(%rip), %rcx # 0xa693
callq 0x1090
movq 0x93c1(%rip), %rax # 0xb3e8
movq %rax, -0x24(%rbp)
movl 0x93bf(%rip), %eax # 0xb3f0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl $0x3, %edx
callq 0x4d80
testb $0x1, %al
jne 0x204c
jmp 0x204e
jmp 0x206d
leaq 0x845e(%rip), %rdi # 0xa4b3
leaq 0x80d5(%rip), %rsi # 0xa131
movl $0xce, %edx
leaq 0x862b(%rip), %rcx # 0xa693
callq 0x1090
movq 0x9380(%rip), %rax # 0xb3f4
movq %rax, -0x30(%rbp)
movl 0x937e(%rip), %eax # 0xb3fc
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x3, %edx
callq 0x4d80
testb $0x1, %al
jne 0x2099
jmp 0x209b
jmp 0x20ba
leaq 0x842c(%rip), %rdi # 0xa4ce
leaq 0x8088(%rip), %rsi # 0xa131
movl $0xd1, %edx
leaq 0x85de(%rip), %rcx # 0xa693
callq 0x1090
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5b50
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm0
movss 0x7f4b(%rip), %xmm1 # 0xa024
ucomiss %xmm1, %xmm0
jne 0x20e2
jp 0x20e2
jmp 0x2101
leaq 0x85c5(%rip), %rdi # 0xa6ae
leaq 0x8041(%rip), %rsi # 0xa131
movl $0xd5, %edx
leaq 0x8597(%rip), %rcx # 0xa693
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x4880
leaq 0x85aa(%rip), %rdi # 0xa6bb
movb $0x0, %al
callq 0x1080
addq $0x40, %rsp
popq %rbp
retq
nop
| test_vector_dot:
push rbp
mov rbp, rsp
sub rsp, 40h
lea rdi, aTestingVectorD; "Testing vector dot product...\n"
mov al, 0
call _printf
mov edi, 400h
call arena_create
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jz short loc_1F8D
jmp short loc_1FAC
loc_1F8D:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0C3h
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_1FAC:
mov rdi, [rbp+var_8]
mov esi, 3
call vector_f_create
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_1FC7
jmp short loc_1FE6
loc_1FC7:
lea rdi, aArenaNull+4; "a != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0C7h
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_1FE6:
mov rdi, [rbp+var_8]
mov esi, 3
call vector_f_create
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_2001
jmp short loc_2020
loc_2001:
lea rdi, aBNull; "b != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0CAh
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_2020:
mov rax, cs:qword_B3E8
mov [rbp+var_24], rax
mov eax, cs:dword_B3F0
mov [rbp+var_1C], eax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_24]
mov edx, 3
call vector_f_set
test al, 1
jnz short loc_204C
jmp short loc_204E
loc_204C:
jmp short loc_206D
loc_204E:
lea rdi, aVectorFSetAADa; "vector_f_set(a, a_data, 3)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0CEh
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_206D:
mov rax, cs:qword_B3F4
mov [rbp+var_30], rax
mov eax, cs:dword_B3FC
mov [rbp+var_28], eax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_30]
mov edx, 3
call vector_f_set
test al, 1
jnz short loc_2099
jmp short loc_209B
loc_2099:
jmp short loc_20BA
loc_209B:
lea rdi, aVectorFSetBBDa; "vector_f_set(b, b_data, 3)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0D1h
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_20BA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call vector_f_dot
movss [rbp+var_34], xmm0
movss xmm0, [rbp+var_34]
movss xmm1, cs:dword_A024
ucomiss xmm0, xmm1
jnz short loc_20E2
jp short loc_20E2
jmp short loc_2101
loc_20E2:
lea rdi, aDot320f; "dot == 32.0f"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0D5h
lea rcx, aVoidTestVector_4; "void test_vector_dot(void)"
call ___assert_fail
loc_2101:
mov rdi, [rbp+var_8]
call arena_destroy
lea rdi, aPassVectorDot; "PASS: vector_dot\n"
mov al, 0
call _printf
add rsp, 40h
pop rbp
retn
| long long test_vector_dot(long long a1, long long a2, long long a3)
{
long long v3; // rsi
long long v4; // rdx
long long v6; // [rsp+10h] [rbp-30h] BYREF
int v7; // [rsp+18h] [rbp-28h]
long long v8; // [rsp+1Ch] [rbp-24h] BYREF
int v9; // [rsp+24h] [rbp-1Ch]
long long v10; // [rsp+28h] [rbp-18h]
long long v11; // [rsp+30h] [rbp-10h]
long long v12; // [rsp+38h] [rbp-8h]
printf("Testing vector dot product...\n", a2, a3);
v12 = arena_create(1024LL);
if ( !v12 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
195LL,
"void test_vector_dot(void)");
v11 = vector_f_create(v12, 3LL);
if ( !v11 )
__assert_fail(
"a != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
199LL,
"void test_vector_dot(void)");
v10 = vector_f_create(v12, 3LL);
if ( !v10 )
__assert_fail(
"b != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
202LL,
"void test_vector_dot(void)");
v8 = 0x400000003F800000LL;
v9 = 1077936128;
if ( (vector_f_set(v11, &v8, 3LL) & 1) == 0 )
__assert_fail(
"vector_f_set(a, a_data, 3)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
206LL,
"void test_vector_dot(void)");
v6 = 0x40A0000040800000LL;
v7 = 1086324736;
if ( (vector_f_set(v10, &v6, 3LL) & 1) == 0 )
__assert_fail(
"vector_f_set(b, b_data, 3)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
209LL,
"void test_vector_dot(void)");
v3 = v10;
if ( vector_f_dot(v11, v10) != 32.0 )
__assert_fail(
"dot == 32.0f",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
213LL,
"void test_vector_dot(void)");
arena_destroy(v12);
return printf("PASS: vector_dot\n", v3, v4);
}
| test_vector_dot:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RDI,[0x10a662]
MOV AL,0x0
CALL 0x00101080
MOV EDI,0x400
CALL 0x001042a0
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00101f8d
JMP 0x00101fac
LAB_00101f8d:
LEA RDI,[0x10a1c3]
LEA RSI,[0x10a131]
MOV EDX,0xc3
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_00101fac:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x3
CALL 0x001049a0
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00101fc7
JMP 0x00101fe6
LAB_00101fc7:
LEA RDI,[0x10a1c7]
LEA RSI,[0x10a131]
MOV EDX,0xc7
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_00101fe6:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x3
CALL 0x001049a0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00102001
JMP 0x00102020
LAB_00102001:
LEA RDI,[0x10a497]
LEA RSI,[0x10a131]
MOV EDX,0xca
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_00102020:
MOV RAX,qword ptr [0x0010b3c8]
MOV qword ptr [RBP + -0x24],RAX
MOV EAX,dword ptr [0x0010b3d0]
MOV dword ptr [RBP + -0x1c],EAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x24]
MOV EDX,0x3
CALL 0x00104d80
TEST AL,0x1
JNZ 0x0010204c
JMP 0x0010204e
LAB_0010204c:
JMP 0x0010206d
LAB_0010204e:
LEA RDI,[0x10a4a1]
LEA RSI,[0x10a131]
MOV EDX,0xce
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_0010206d:
MOV RAX,qword ptr [0x0010b3d4]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [0x0010b3dc]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
MOV EDX,0x3
CALL 0x00104d80
TEST AL,0x1
JNZ 0x00102099
JMP 0x0010209b
LAB_00102099:
JMP 0x001020ba
LAB_0010209b:
LEA RDI,[0x10a4bc]
LEA RSI,[0x10a131]
MOV EDX,0xd1
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_001020ba:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00105b50
MOVSS dword ptr [RBP + -0x34],XMM0
MOVSS XMM0,dword ptr [RBP + -0x34]
MOVSS XMM1,dword ptr [0x0010a024]
UCOMISS XMM0,XMM1
JNZ 0x001020e2
JP 0x001020e2
JMP 0x00102101
LAB_001020e2:
LEA RDI,[0x10a69c]
LEA RSI,[0x10a131]
MOV EDX,0xd5
LEA RCX,[0x10a681]
CALL 0x00101090
LAB_00102101:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104880
LEA RDI,[0x10a6a9]
MOV AL,0x0
CALL 0x00101080
ADD RSP,0x40
POP RBP
RET
|
void test_vector_dot(void)
{
ulong uVar1;
float fVar2;
int8 local_38;
int4 local_30;
int8 local_2c;
int4 local_24;
long local_20;
long local_18;
long local_10;
printf("Testing vector dot product...\n");
local_10 = arena_create(0x400);
if (local_10 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c"
,0xc3,"void test_vector_dot(void)");
}
local_18 = vector_f_create(local_10,3);
if (local_18 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("a != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",199
,"void test_vector_dot(void)");
}
local_20 = vector_f_create(local_10,3);
if (local_20 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("b != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",
0xca,"void test_vector_dot(void)");
}
local_2c = DAT_0010b3c8;
local_24 = DAT_0010b3d0;
uVar1 = vector_f_set(local_18,&local_2c,3);
if ((uVar1 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("vector_f_set(a, a_data, 3)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0xce,
"void test_vector_dot(void)");
}
local_38 = DAT_0010b3d4;
local_30 = DAT_0010b3dc;
uVar1 = vector_f_set(local_20,&local_38,3);
if ((uVar1 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("vector_f_set(b, b_data, 3)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0xd1,
"void test_vector_dot(void)");
}
fVar2 = (float)vector_f_dot(local_18,local_20);
if ((fVar2 == DAT_0010a024) && (!NAN(fVar2) && !NAN(DAT_0010a024))) {
arena_destroy(local_10);
printf("PASS: vector_dot\n");
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("dot == 32.0f","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",
0xd5,"void test_vector_dot(void)");
}
| |
23,826 | LefDefParser::defiNonDefault::hasLayerWireExt(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::hasLayerWireExt(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return hasWireExt_[index];
} | O0 | cpp | LefDefParser::defiNonDefault::hasLayerWireExt(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x4828e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0xc(%rcx), %eax
jl 0x482da
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0xc(%rax), %ecx
leaq 0x2d8d6(%rip), %rsi # 0x75b7f
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
callq 0x2a600
movl $0x0, 0xc4(%rsp)
jmp 0x482f6
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser14defiNonDefault15hasLayerWireExtEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_4828E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+0Ch]
jl short loc_482DA
loc_4828E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CAh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_482F6
loc_482DA:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+48h]
movsxd rcx, [rsp+0C8h+var_14]
movsx eax, byte ptr [rax+rcx]
mov [rsp+0C8h+var_4], eax
loc_482F6:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| long long LefDefParser::defiNonDefault::hasLayerWireExt(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) )
{
return (unsigned int)*((char *)this[9] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v4, this[23], v2);
return 0;
}
}
| hasLayerWireExt:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x0014828e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x001482da
LAB_0014828e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0xc]
LEA RSI,[0x175b7f]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
CALL 0x0012a600
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x001482f6
LAB_001482da:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x48]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0xc4],EAX
LAB_001482f6:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::hasLayerWireExt(int) const */
int __thiscall LefDefParser::defiNonDefault::hasLayerWireExt(defiNonDefault *this,int param_1)
{
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8));
local_4 = 0;
}
else {
local_4 = (int)*(char *)(*(long *)(this + 0x48) + (long)param_1);
}
return local_4;
}
| |
23,827 | LefDefParser::defiNonDefault::hasLayerWireExt(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::hasLayerWireExt(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return hasWireExt_[index];
} | O3 | cpp | LefDefParser::defiNonDefault::hasLayerWireExt(int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0xc(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2bd33
movq 0x48(%rbx), %rax
movl %edx, %ecx
movsbl (%rax,%rcx), %ebp
jmp 0x2bd5f
leaq 0x19c73(%rip), %rsi # 0x459ad
xorl %ebp, %ebp
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%rbx), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
movq %r14, %rdx
callq 0x1bb18
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZNK12LefDefParser14defiNonDefault15hasLayerWireExtEi:
push rbp
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+0Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2BD33
mov rax, [rbx+48h]
mov ecx, edx
movsx ebp, byte ptr [rax+rcx]
jmp short loc_2BD5F
loc_2BD33:
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
xor ebp, ebp
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CAh; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2BD5F:
mov eax, ebp
add rsp, 0A0h
pop rbx
pop r14
pop rbp
retn
| long long LefDefParser::defiNonDefault::hasLayerWireExt(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
unsigned int v3; // ebp
LefDefParser::defrData *v4; // r8
char v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 3);
if ( v2 > a2 && a2 >= 0 )
{
return (unsigned int)*(char *)(*((_QWORD *)this + 9) + (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6090, v6, *((LefDefParser::defrData **)this + 23), v4);
}
return v3;
}
| hasLayerWireExt:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0xc]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012bd33
MOV RAX,qword ptr [RBX + 0x48]
MOV ECX,EDX
MOVSX EBP,byte ptr [RAX + RCX*0x1]
JMP 0x0012bd5f
LAB_0012bd33:
LEA RSI,[0x1459ad]
XOR EBP,EBP
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [RBX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
MOV RDX,R14
CALL 0x0011bb18
LAB_0012bd5f:
MOV EAX,EBP
ADD RSP,0xa0
POP RBX
POP R14
POP RBP
RET
|
/* LefDefParser::defiNonDefault::hasLayerWireExt(int) const */
int __thiscall LefDefParser::defiNonDefault::hasLayerWireExt(defiNonDefault *this,int param_1)
{
int iVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0xc) <= param_1) {
iVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
iVar1 = (int)*(char *)(*(long *)(this + 0x48) + (ulong)(uint)param_1);
}
return iVar1;
}
| |
23,828 | int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long) | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | static int repack_iq4_nl_to_iq4_nl_4_bl(struct ggml_tensor * t, int interleave_block, const void * GGML_RESTRICT data, size_t data_size) {
GGML_ASSERT(t->type == GGML_TYPE_IQ4_NL);
//GGML_ASSERT(interleave_block == 4 || interleave_block == 8);
GGML_ASSERT(interleave_block == 4);
block_iq4_nlx4 * dst = (block_iq4_nlx4 *)t->data;
const block_iq4_nl * src = (const block_iq4_nl *)data;
block_iq4_nl dst_tmp[4];
int nrow = ggml_nrows(t);
int nrows_interleaved = 4;
int nblocks = t->ne[0] / QK4_0;
GGML_ASSERT(data_size == nrow * nblocks * sizeof(block_iq4_nl));
if (t->ne[1] % nrows_interleaved != 0 || t->ne[0] % 8 != 0) {
return -1;
}
for (int b = 0; b < nrow; b += nrows_interleaved) {
for (int64_t x = 0; x < nblocks; x++) {
for (int i = 0; i < nrows_interleaved; i++) {
dst_tmp[i] = src[x + i * nblocks];
}
*dst++ = make_block_iq4_nlx4(dst_tmp, interleave_block);
}
src += nrows_interleaved * nblocks;
}
return 0;
GGML_UNUSED(data_size);
} | O2 | cpp | int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
cmpl $0x14, (%rdi)
jne 0x25f3a
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0xf8(%rdi), %r12
callq 0x8710
movq %rax, %rcx
movq 0x10(%r14), %rsi
pushq $0x20
popq %rdi
movq %rsi, %rax
cqto
idivq %rdi
movl %ecx, %edx
imull %eax, %edx
movslq %edx, %rdx
imulq $0x12, %rdx, %rdx
cmpq %r15, %rdx
jne 0x25f56
movq 0x18(%r14), %rdx
andl $0x3, %edx
andl $0x7, %esi
orq %rdx, %rsi
je 0x25e41
pushq $-0x1
popq %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movslq %eax, %rdi
leal (,%rax,4), %eax
cltq
movq %rdi, %rdx
sarq $0x3f, %rdx
andnq %rdi, %rdx, %rdx
imulq $0x12, %rax, %rsi
imulq $0x12, %rdi, %rdi
xorl %eax, %eax
leaq 0x50(%rsp), %r8
xorl %r9d, %r9d
cmpl %ecx, %r9d
jge 0x25e2c
movq %rbx, %r10
xorl %r11d, %r11d
cmpq %rdx, %r11
je 0x25f2e
movq %r10, %r14
xorl %r15d, %r15d
cmpq $0x48, %r15
je 0x25eab
movzwl 0x10(%r14), %ebp
movw %bp, 0x60(%rsp,%r15)
vmovups (%r14), %xmm0
vmovups %xmm0, 0x50(%rsp,%r15)
addq $0x12, %r15
addq %rdi, %r14
jmp 0x25e85
movq %r8, %r14
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x25eca
movzwl (%r14), %ebp
movw %bp, 0x8(%rsp,%r15,2)
incq %r15
addq $0x12, %r14
jmp 0x25eb1
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x25efb
movl %r14d, %r15d
andl $0x3, %r15d
movl %r14d, %r13d
andl $0xc, %r13d
imulq $0x12, %r15, %r15
addq %rsp, %r15
addq $0x50, %r15
movl 0x2(%r13,%r15), %ebp
movl %ebp, 0x10(%rsp,%r14,4)
incq %r14
jmp 0x25ecd
movq 0x48(%rsp), %r14
movq %r14, 0x40(%r12)
vmovups 0x8(%rsp), %ymm0
vmovups 0x28(%rsp), %ymm1
vmovups %ymm1, 0x20(%r12)
vmovups %ymm0, (%r12)
addq $0x48, %r12
incq %r11
addq $0x12, %r10
jmp 0x25e76
addl $0x4, %r9d
addq %rsi, %rbx
jmp 0x25e6b
leaq 0x22095(%rip), %rdi # 0x47fd6
leaq 0x20869(%rip), %rdx # 0x467b1
leaq 0x22162(%rip), %rcx # 0x480b1
movl $0xeb1, %esi # imm = 0xEB1
jmp 0x25f70
leaq 0x22079(%rip), %rdi # 0x47fd6
leaq 0x2084d(%rip), %rdx # 0x467b1
leaq 0x22162(%rip), %rcx # 0x480cd
movl $0xebc, %esi # imm = 0xEBC
xorl %eax, %eax
callq 0x8a30
| _ZN4ggml3cpu7aarch646repackI12block_iq4_nlLl4ELl4EEEiP11ggml_tensorPKvm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
cmp dword ptr [rdi], 14h
jnz loc_25F3A
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov r12, [rdi+0F8h]
call _ggml_nrows
mov rcx, rax
mov rsi, [r14+10h]
push 20h ; ' '
pop rdi
mov rax, rsi
cqo
idiv rdi
mov edx, ecx
imul edx, eax
movsxd rdx, edx
imul rdx, 12h
cmp rdx, r15
jnz loc_25F56
mov rdx, [r14+18h]
and edx, 3
and esi, 7
or rsi, rdx
jz short loc_25E41
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_25E2C:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_25E41:
movsxd rdi, eax
lea eax, ds:0[rax*4]
cdqe
mov rdx, rdi
sar rdx, 3Fh
andn rdx, rdx, rdi
imul rsi, rax, 12h
imul rdi, 12h
xor eax, eax
lea r8, [rsp+0C8h+var_78]
xor r9d, r9d
loc_25E6B:
cmp r9d, ecx
jge short loc_25E2C
mov r10, rbx
xor r11d, r11d
loc_25E76:
cmp r11, rdx
jz loc_25F2E
mov r14, r10
xor r15d, r15d
loc_25E85:
cmp r15, 48h ; 'H'
jz short loc_25EAB
movzx ebp, word ptr [r14+10h]
mov [rsp+r15+0C8h+var_68], bp
vmovups xmm0, xmmword ptr [r14]
vmovups [rsp+r15+0C8h+var_78], xmm0
add r15, 12h
add r14, rdi
jmp short loc_25E85
loc_25EAB:
mov r14, r8
xor r15d, r15d
loc_25EB1:
cmp r15, 4
jz short loc_25ECA
movzx ebp, word ptr [r14]
mov word ptr [rsp+r15*2+0C8h+var_C0], bp
inc r15
add r14, 12h
jmp short loc_25EB1
loc_25ECA:
xor r14d, r14d
loc_25ECD:
cmp r14, 10h
jz short loc_25EFB
mov r15d, r14d
and r15d, 3
mov r13d, r14d
and r13d, 0Ch
imul r15, 12h
add r15, rsp
add r15, 50h ; 'P'
mov ebp, [r13+r15+2]
mov dword ptr [rsp+r14*4+0C8h+var_C0+8], ebp
inc r14
jmp short loc_25ECD
loc_25EFB:
mov r14, [rsp+0C8h+var_80]
mov [r12+40h], r14
vmovups ymm0, [rsp+0C8h+var_C0]
vmovups ymm1, [rsp+0C8h+var_A0]
vmovups ymmword ptr [r12+20h], ymm1
vmovups ymmword ptr [r12], ymm0
add r12, 48h ; 'H'
inc r11
add r10, 12h
jmp loc_25E76
loc_25F2E:
add r9d, 4
add rbx, rsi
jmp loc_25E6B
loc_25F3A:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTTypeGgmlTypeI; "t->type == GGML_TYPE_IQ4_NL"
mov esi, 0EB1h
jmp short loc_25F70
loc_25F56:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataSizeNrowNb_0; "data_size == nrow * nblocks * sizeof(bl"...
mov esi, 0EBCh
loc_25F70:
xor eax, eax
call _ggml_abort
| long long ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
int a7)
{
int v10; // ecx
long long v11; // rsi
long long v12; // rax
long long result; // rax
unsigned long long v14; // rdx
long long v15; // rsi
long long v16; // rdi
int i; // r9d
long long v18; // r10
long long j; // r11
_WORD *v23; // r14
long long k; // r15
long long m; // r14
int v28; // esi
int v29; // edx
int v30; // ecx
int v31; // r8d
int v32; // r9d
__m256 v33; // [rsp+8h] [rbp-C0h]
long long v35; // [rsp+48h] [rbp-80h]
_OWORD v36[7]; // [rsp+50h] [rbp-78h] BYREF
if ( *(_DWORD *)a1 != 20 )
{
v28 = 3761;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3761LL,
"GGML_ASSERT(%s) failed",
"t->type == GGML_TYPE_IQ4_NL");
return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l>(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
v28,
v29,
v30,
v31,
v32,
a7);
}
_R12 = *(_QWORD *)(a1 + 248);
v10 = ggml_nrows(a1);
v11 = *(_QWORD *)(a1 + 16);
v12 = v11 / 32;
if ( 18LL * (int)(v11 / 32 * v10) != a3 )
{
v28 = 3772;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3772LL,
"GGML_ASSERT(%s) failed",
"data_size == nrow * nblocks * sizeof(block_iq4_nl)");
return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l>(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
v28,
v29,
v30,
v31,
v32,
a7);
}
if ( *(_QWORD *)(a1 + 24) & 3LL | v11 & 7 )
{
result = -1LL;
}
else
{
v14 = (int)v12 & (unsigned long long)~((long long)(int)v12 >> 63);
v15 = 72LL * (_DWORD)v12;
v16 = 18LL * (int)v12;
result = 0LL;
for ( i = 0; i < v10; i += 4 )
{
v18 = a2;
for ( j = 0LL; j != v14; ++j )
{
_R14 = v18;
for ( _R15 = 0LL; _R15 != 72; _R15 += 18LL )
{
*(_WORD *)((char *)&v36[1] + _R15) = *(_WORD *)(_R14 + 16);
__asm
{
vmovups xmm0, xmmword ptr [r14]
vmovups [rsp+r15+0C8h+var_78], xmm0
}
_R14 += v16;
}
v23 = v36;
for ( k = 0LL; k != 4; ++k )
{
*((_WORD *)v33.m256_f32 + k) = *v23;
v23 += 9;
}
for ( m = 0LL; m != 16; ++m )
v33.m256_f32[m + 2] = *(float *)((char *)v36 + 18 * (m & 3) + (m & 0xC) + 2);
*(_QWORD *)(_R12 + 64) = v35;
__asm
{
vmovups ymm0, [rsp+0C8h+var_C0]
vmovups ymm1, [rsp+0C8h+var_A0]
vmovups ymmword ptr [r12+20h], ymm1
vmovups ymmword ptr [r12], ymm0
}
_R12 += 72LL;
v18 += 18LL;
}
a2 += v15;
}
}
__asm { vzeroupper }
return result;
}
| repack<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
CMP dword ptr [RDI],0x14
JNZ 0x00125f3a
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RDI + 0xf8]
CALL 0x00108710
MOV RCX,RAX
MOV RSI,qword ptr [R14 + 0x10]
PUSH 0x20
POP RDI
MOV RAX,RSI
CQO
IDIV RDI
MOV EDX,ECX
IMUL EDX,EAX
MOVSXD RDX,EDX
IMUL RDX,RDX,0x12
CMP RDX,R15
JNZ 0x00125f56
MOV RDX,qword ptr [R14 + 0x18]
AND EDX,0x3
AND ESI,0x7
OR RSI,RDX
JZ 0x00125e41
PUSH -0x1
POP RAX
LAB_00125e2c:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_00125e41:
MOVSXD RDI,EAX
LEA EAX,[RAX*0x4]
CDQE
MOV RDX,RDI
SAR RDX,0x3f
ANDN RDX,RDX,RDI
IMUL RSI,RAX,0x12
IMUL RDI,RDI,0x12
XOR EAX,EAX
LEA R8,[RSP + 0x50]
XOR R9D,R9D
LAB_00125e6b:
CMP R9D,ECX
JGE 0x00125e2c
MOV R10,RBX
XOR R11D,R11D
LAB_00125e76:
CMP R11,RDX
JZ 0x00125f2e
MOV R14,R10
XOR R15D,R15D
LAB_00125e85:
CMP R15,0x48
JZ 0x00125eab
MOVZX EBP,word ptr [R14 + 0x10]
MOV word ptr [RSP + R15*0x1 + 0x60],BP
VMOVUPS XMM0,xmmword ptr [R14]
VMOVUPS xmmword ptr [RSP + R15*0x1 + 0x50],XMM0
ADD R15,0x12
ADD R14,RDI
JMP 0x00125e85
LAB_00125eab:
MOV R14,R8
XOR R15D,R15D
LAB_00125eb1:
CMP R15,0x4
JZ 0x00125eca
MOVZX EBP,word ptr [R14]
MOV word ptr [RSP + R15*0x2 + 0x8],BP
INC R15
ADD R14,0x12
JMP 0x00125eb1
LAB_00125eca:
XOR R14D,R14D
LAB_00125ecd:
CMP R14,0x10
JZ 0x00125efb
MOV R15D,R14D
AND R15D,0x3
MOV R13D,R14D
AND R13D,0xc
IMUL R15,R15,0x12
ADD R15,RSP
ADD R15,0x50
MOV EBP,dword ptr [R13 + R15*0x1 + 0x2]
MOV dword ptr [RSP + R14*0x4 + 0x10],EBP
INC R14
JMP 0x00125ecd
LAB_00125efb:
MOV R14,qword ptr [RSP + 0x48]
MOV qword ptr [R12 + 0x40],R14
VMOVUPS YMM0,ymmword ptr [RSP + 0x8]
VMOVUPS YMM1,ymmword ptr [RSP + 0x28]
VMOVUPS ymmword ptr [R12 + 0x20],YMM1
VMOVUPS ymmword ptr [R12],YMM0
ADD R12,0x48
INC R11
ADD R10,0x12
JMP 0x00125e76
LAB_00125f2e:
ADD R9D,0x4
ADD RBX,RSI
JMP 0x00125e6b
LAB_00125f3a:
LEA RDI,[0x147fd6]
LEA RDX,[0x1467b1]
LEA RCX,[0x1480b1]
MOV ESI,0xeb1
JMP 0x00125f70
LAB_00125f56:
LEA RDI,[0x147fd6]
LEA RDX,[0x1467b1]
LEA RCX,[0x1480cd]
MOV ESI,0xebc
LAB_00125f70:
XOR EAX,EAX
CALL 0x00108a30
|
/* int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long) */
int ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>(ggml_tensor *param_1,void *param_2,ulong param_3)
{
int iVar1;
int iVar2;
int iVar3;
char *pcVar4;
int8 uVar5;
ulong uVar6;
int iVar7;
int8 *puVar8;
ulong uVar9;
int8 *puVar10;
int8 *puVar11;
long lVar12;
int8 local_c0;
int8 uStack_b8;
int8 uStack_b0;
int8 uStack_a8;
int8 local_a0;
int8 uStack_98;
int8 uStack_90;
int8 uStack_88;
int8 local_80;
int8 local_78;
int8 uStack_70;
int2 auStack_68 [28];
if (*(int *)param_1 == 0x14) {
puVar10 = *(int8 **)(param_1 + 0xf8);
iVar1 = ggml_nrows();
iVar2 = (int)((long)*(ulong *)(param_1 + 0x10) / 0x20);
if ((long)(iVar1 * iVar2) * 0x12 - param_3 == 0) {
if ((*(ulong *)(param_1 + 0x10) & 7) == 0 && (*(ulong *)(param_1 + 0x18) & 3) == 0) {
uVar6 = (ulong)iVar2;
iVar3 = 0;
for (iVar7 = 0; iVar7 < iVar1; iVar7 = iVar7 + 4) {
puVar8 = (int8 *)param_2;
for (uVar9 = 0; uVar9 != (~((long)uVar6 >> 0x3f) & uVar6); uVar9 = uVar9 + 1) {
puVar11 = puVar8;
for (lVar12 = 0; lVar12 != 0x48; lVar12 = lVar12 + 0x12) {
*(int2 *)((long)auStack_68 + lVar12) = *(int2 *)(puVar11 + 2);
uVar5 = puVar11[1];
*(int8 *)((long)&local_78 + lVar12) = *puVar11;
*(int8 *)((long)&uStack_70 + lVar12) = uVar5;
puVar11 = (int8 *)((long)puVar11 + uVar6 * 0x12);
}
puVar11 = &local_78;
for (lVar12 = 0; lVar12 != 4; lVar12 = lVar12 + 1) {
*(int2 *)((long)&local_c0 + lVar12 * 2) = *(int2 *)puVar11;
puVar11 = (int8 *)((long)puVar11 + 0x12);
}
for (lVar12 = 0; lVar12 != 0x10; lVar12 = lVar12 + 1) {
*(int4 *)((long)&uStack_b8 + lVar12 * 4) =
*(int4 *)
((long)&local_78 +
(ulong)((uint)lVar12 & 0xc) + (ulong)((uint)lVar12 & 3) * 0x12 + 2);
}
puVar10[8] = local_80;
puVar10[4] = local_a0;
puVar10[5] = uStack_98;
puVar10[6] = uStack_90;
puVar10[7] = uStack_88;
*puVar10 = local_c0;
puVar10[1] = uStack_b8;
puVar10[2] = uStack_b0;
puVar10[3] = uStack_a8;
puVar10 = puVar10 + 9;
puVar8 = (int8 *)((long)puVar8 + 0x12);
}
param_2 = (void *)((long)param_2 + (long)(iVar2 * 4) * 0x12);
}
}
else {
iVar3 = -1;
}
return iVar3;
}
pcVar4 = "data_size == nrow * nblocks * sizeof(block_iq4_nl)";
uVar5 = 0xebc;
}
else {
pcVar4 = "t->type == GGML_TYPE_IQ4_NL";
uVar5 = 0xeb1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,uVar5,"GGML_ASSERT(%s) failed",pcVar4);
}
| |
23,829 | int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long) | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | static int repack_iq4_nl_to_iq4_nl_4_bl(struct ggml_tensor * t, int interleave_block, const void * GGML_RESTRICT data, size_t data_size) {
GGML_ASSERT(t->type == GGML_TYPE_IQ4_NL);
//GGML_ASSERT(interleave_block == 4 || interleave_block == 8);
GGML_ASSERT(interleave_block == 4);
block_iq4_nlx4 * dst = (block_iq4_nlx4 *)t->data;
const block_iq4_nl * src = (const block_iq4_nl *)data;
block_iq4_nl dst_tmp[4];
int nrow = ggml_nrows(t);
int nrows_interleaved = 4;
int nblocks = t->ne[0] / QK4_0;
GGML_ASSERT(data_size == nrow * nblocks * sizeof(block_iq4_nl));
if (t->ne[1] % nrows_interleaved != 0 || t->ne[0] % 8 != 0) {
return -1;
}
for (int b = 0; b < nrow; b += nrows_interleaved) {
for (int64_t x = 0; x < nblocks; x++) {
for (int i = 0; i < nrows_interleaved; i++) {
dst_tmp[i] = src[x + i * nblocks];
}
*dst++ = make_block_iq4_nlx4(dst_tmp, interleave_block);
}
src += nrows_interleaved * nblocks;
}
return 0;
GGML_UNUSED(data_size);
} | O3 | cpp | int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
cmpl $0x14, (%rdi)
jne 0x28c3e
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0xf8(%rdi), %r12
callq 0x8660
movq 0x10(%r14), %rsi
leaq 0x1f(%rsi), %rdx
testq %rsi, %rsi
cmovnsq %rsi, %rdx
sarq $0x5, %rdx
movl %eax, %ecx
imull %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rcx
leaq (%rcx,%rcx,8), %rcx
cmpq %r15, %rcx
jne 0x28c5a
movq 0x18(%r14), %rdi
andl $0x3, %edi
andl $0x7, %esi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
orq %rdi, %rsi
jne 0x28c29
testl %eax, %eax
jle 0x28c27
movslq %edx, %rcx
leal (,%rdx,4), %edx
movslq %edx, %rdx
addq %rdx, %rdx
leaq (%rdx,%rdx,8), %rdx
leaq (%rcx,%rcx), %rsi
leaq (%rsi,%rsi,8), %rsi
xorl %edi, %edi
vpmovsxbq 0x2a5fa(%rip), %ymm0 # 0x530c0
vpmovsxbq 0x2a5f5(%rip), %ymm1 # 0x530c4
vpbroadcastq 0x2c3b0(%rip), %ymm2 # 0x54e88
vpbroadcastq 0x2c387(%rip), %ymm3 # 0x54e68
leaq 0x50(%rsp), %r8
vpbroadcastq 0x2c381(%rip), %ymm4 # 0x54e70
vpbroadcastq %r8, %ymm5
vpbroadcastq 0x2ad0a(%rip), %ymm6 # 0x53808
testq %rcx, %rcx
jle 0x28c13
movq %rbx, %r9
xorl %r10d, %r10d
movq %r9, %r11
xorl %r14d, %r14d
movzwl 0x10(%r11), %ebp
movw %bp, 0x60(%rsp,%r14)
vmovdqu (%r11), %xmm7
vmovdqu %xmm7, 0x50(%rsp,%r14)
addq $0x12, %r14
addq %rsi, %r11
cmpq $0x48, %r14
jne 0x28b13
movq %r8, %r11
xorl %r14d, %r14d
movzwl (%r11), %ebp
movw %bp, 0x8(%rsp,%r14,2)
incq %r14
addq $0x12, %r11
cmpq $0x4, %r14
jne 0x28b3d
movl $0x2, %r11d
vmovdqa %ymm1, %ymm7
vmovdqa %ymm0, %ymm8
vpand %ymm2, %ymm7, %ymm9
vpand %ymm2, %ymm8, %ymm10
vpand %ymm3, %ymm8, %ymm11
vpmuldq %ymm4, %ymm11, %ymm11
vpaddq %ymm5, %ymm10, %ymm10
vpaddq %ymm11, %ymm10, %ymm10
vpand %ymm3, %ymm7, %ymm11
vpmuldq %ymm4, %ymm11, %ymm11
vpaddq %ymm5, %ymm9, %ymm9
vpaddq %ymm11, %ymm9, %ymm9
vpxor %xmm11, %xmm11, %xmm11
kxnorw %k0, %k0, %k1
vpgatherqd 0x2(,%ymm9), %xmm11 {%k1}
vpxor %xmm9, %xmm9, %xmm9
kxnorw %k0, %k0, %k1
vpgatherqd 0x2(,%ymm10), %xmm9 {%k1}
vmovdqu %xmm9, 0x18(%rsp,%r11,4)
vmovdqu %xmm11, 0x8(%rsp,%r11,4)
vpaddq %ymm6, %ymm7, %ymm7
vpaddq %ymm6, %ymm8, %ymm8
addq $0x8, %r11
cmpq $0x12, %r11
jne 0x28b62
movq 0x48(%rsp), %r11
movq %r11, 0x40(%r12)
vmovdqu 0x8(%rsp), %ymm7
vmovdqu 0x28(%rsp), %ymm8
vmovdqu %ymm8, 0x20(%r12)
leaq 0x48(%r12), %r11
vmovdqu %ymm7, (%r12)
incq %r10
addq $0x12, %r9
movq %r11, %r12
cmpq %rcx, %r10
jne 0x28b0d
jmp 0x28c16
movq %r12, %r11
addl $0x4, %edi
addq %rdx, %rbx
movq %r11, %r12
cmpl %eax, %edi
jl 0x28afe
xorl %ecx, %ecx
movl %ecx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0x2c48b(%rip), %rdi # 0x550d0
leaq 0x2ac75(%rip), %rdx # 0x538c1
leaq 0x2c558(%rip), %rcx # 0x551ab
movl $0xeb1, %esi # imm = 0xEB1
jmp 0x28c74
leaq 0x2c46f(%rip), %rdi # 0x550d0
leaq 0x2ac59(%rip), %rdx # 0x538c1
leaq 0x2c558(%rip), %rcx # 0x551c7
movl $0xebc, %esi # imm = 0xEBC
xorl %eax, %eax
callq 0x8950
| _ZN4ggml3cpu7aarch646repackI12block_iq4_nlLl4ELl4EEEiP11ggml_tensorPKvm:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
cmp dword ptr [rdi], 14h
jnz loc_28C3E
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov r12, [rdi+0F8h]
call _ggml_nrows
mov rsi, [r14+10h]
lea rdx, [rsi+1Fh]
test rsi, rsi
cmovns rdx, rsi
sar rdx, 5
mov ecx, eax
imul ecx, edx
movsxd rcx, ecx
add rcx, rcx
lea rcx, [rcx+rcx*8]
cmp rcx, r15
jnz loc_28C5A
mov rdi, [r14+18h]
and edi, 3
and esi, 7
mov ecx, 0FFFFFFFFh
or rsi, rdi
jnz loc_28C29
test eax, eax
jle loc_28C27
movsxd rcx, edx
lea edx, ds:0[rdx*4]
movsxd rdx, edx
add rdx, rdx
lea rdx, [rdx+rdx*8]
lea rsi, [rcx+rcx]
lea rsi, [rsi+rsi*8]
xor edi, edi
vpmovsxbq ymm0, cs:dword_530C0
vpmovsxbq ymm1, cs:dword_530C4
vpbroadcastq ymm2, cs:qword_54E88
vpbroadcastq ymm3, cs:qword_54E68
lea r8, [rsp+0C8h+var_78]
vpbroadcastq ymm4, cs:qword_54E70
vpbroadcastq ymm5, r8
vpbroadcastq ymm6, qword ptr cs:ymmword_537F0+18h
loc_28AFE:
test rcx, rcx
jle loc_28C13
mov r9, rbx
xor r10d, r10d
loc_28B0D:
mov r11, r9
xor r14d, r14d
loc_28B13:
movzx ebp, word ptr [r11+10h]
mov [rsp+r14+0C8h+var_68], bp
vmovdqu xmm7, xmmword ptr [r11]
vmovdqu [rsp+r14+0C8h+var_78], xmm7
add r14, 12h
add r11, rsi
cmp r14, 48h ; 'H'
jnz short loc_28B13
mov r11, r8
xor r14d, r14d
loc_28B3D:
movzx ebp, word ptr [r11]
mov word ptr [rsp+r14*2+0C8h+var_C0], bp
inc r14
add r11, 12h
cmp r14, 4
jnz short loc_28B3D
mov r11d, 2
vmovdqa ymm7, ymm1
vmovdqa ymm8, ymm0
loc_28B62:
vpand ymm9, ymm7, ymm2
vpand ymm10, ymm8, ymm2
vpand ymm11, ymm8, ymm3
vpmuldq ymm11, ymm11, ymm4
vpaddq ymm10, ymm10, ymm5
vpaddq ymm10, ymm10, ymm11
vpand ymm11, ymm7, ymm3
vpmuldq ymm11, ymm11, ymm4
vpaddq ymm9, ymm9, ymm5
vpaddq ymm9, ymm9, ymm11
vpxor xmm11, xmm11, xmm11
kxnorw k1, k0, k0
vpgatherqd xmm11{k1}, xmmword ptr ds:dword_0+2[ymm9]
vpxor xmm9, xmm9, xmm9
kxnorw k1, k0, k0
vpgatherqd xmm9{k1}, xmmword ptr ds:dword_0+2[ymm10]
vmovdqu xmmword ptr [rsp+r11*4+0C8h+var_C0+10h], xmm9
vmovdqu xmmword ptr [rsp+r11*4+0C8h+var_C0], xmm11
vpaddq ymm7, ymm7, ymm6
vpaddq ymm8, ymm8, ymm6
add r11, 8
cmp r11, 12h
jnz short loc_28B62
mov r11, [rsp+0C8h+var_80]
mov [r12+40h], r11
vmovdqu ymm7, [rsp+0C8h+var_C0]
vmovdqu ymm8, [rsp+0C8h+var_A0]
vmovdqu ymmword ptr [r12+20h], ymm8
lea r11, [r12+48h]
vmovdqu ymmword ptr [r12], ymm7
inc r10
add r9, 12h
mov r12, r11
cmp r10, rcx
jnz loc_28B0D
jmp short loc_28C16
loc_28C13:
mov r11, r12
loc_28C16:
add edi, 4
add rbx, rdx
mov r12, r11
cmp edi, eax
jl loc_28AFE
loc_28C27:
xor ecx, ecx
loc_28C29:
mov eax, ecx
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_28C3E:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTTypeGgmlTypeI; "t->type == GGML_TYPE_IQ4_NL"
mov esi, 0EB1h
jmp short loc_28C74
loc_28C5A:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataSizeNrowNb_0; "data_size == nrow * nblocks * sizeof(bl"...
mov esi, 0EBCh
loc_28C74:
xor eax, eax
call _ggml_abort
| long long ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
int a7)
{
int v12; // eax
long long v13; // rsi
long long v14; // rdx
long long v15; // rdx
unsigned int v16; // ecx
long long v17; // rcx
long long v18; // rdx
int v19; // edi
long long v28; // r9
long long i; // r10
_WORD *v33; // r11
long long j; // r14
long long v52; // r11
long long result; // rax
int v54; // esi
int v55; // edx
int v56; // ecx
int v57; // r8d
int v58; // r9d
__m256 v59; // [rsp+8h] [rbp-C0h] BYREF
long long v61; // [rsp+48h] [rbp-80h]
_OWORD v62[7]; // [rsp+50h] [rbp-78h] BYREF
if ( *(_DWORD *)a1 != 20 )
{
v54 = 3761;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3761LL,
"GGML_ASSERT(%s) failed",
"t->type == GGML_TYPE_IQ4_NL");
return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l>(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
v54,
v55,
v56,
v57,
v58,
a7);
}
_R12 = *(_QWORD *)(a1 + 248);
v12 = ggml_nrows(a1);
v13 = *(_QWORD *)(a1 + 16);
v14 = v13 + 31;
if ( v13 >= 0 )
v14 = *(_QWORD *)(a1 + 16);
v15 = v14 >> 5;
if ( 18LL * (int)v15 * v12 != a3 )
{
v54 = 3772;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3772LL,
"GGML_ASSERT(%s) failed",
"data_size == nrow * nblocks * sizeof(block_iq4_nl)");
return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l>(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
v54,
v55,
v56,
v57,
v58,
a7);
}
v16 = -1;
if ( !(*(_QWORD *)(a1 + 24) & 3LL | *(_QWORD *)(a1 + 16) & 7LL) )
{
if ( v12 > 0 )
{
v17 = (int)v15;
v18 = 72LL * (_DWORD)v15;
v19 = 0;
__asm
{
vpmovsxbq ymm0, cs:dword_530C0
vpmovsxbq ymm1, cs:dword_530C4
vpbroadcastq ymm2, cs:qword_54E88
vpbroadcastq ymm3, cs:qword_54E68
}
_R8 = v62;
__asm
{
vpbroadcastq ymm4, cs:qword_54E70
vpbroadcastq ymm5, r8
vpbroadcastq ymm6, qword ptr cs:ymmword_537F0+18h
}
do
{
if ( v17 <= 0 )
{
v52 = _R12;
}
else
{
v28 = a2;
for ( i = 0LL; i != v17; ++i )
{
_R11 = v28;
for ( _R14 = 0LL; _R14 != 72; _R14 += 18LL )
{
*(_WORD *)((char *)&v62[1] + _R14) = *(_WORD *)(_R11 + 16);
__asm
{
vmovdqu xmm7, xmmword ptr [r11]
vmovdqu [rsp+r14+0C8h+var_78], xmm7
}
_R11 += 18 * v17;
}
v33 = v62;
for ( j = 0LL; j != 4; ++j )
{
*((_WORD *)v59.m256_f32 + j) = *v33;
v33 += 9;
}
_R11 = 2LL;
__asm
{
vmovdqa ymm7, ymm1
vmovdqa ymm8, ymm0
}
do
{
__asm
{
vpand ymm9, ymm7, ymm2
vpand ymm10, ymm8, ymm2
vpand ymm11, ymm8, ymm3
vpmuldq ymm11, ymm11, ymm4
vpaddq ymm10, ymm10, ymm5
vpaddq ymm10, ymm10, ymm11
vpand ymm11, ymm7, ymm3
vpmuldq ymm11, ymm11, ymm4
vpaddq ymm9, ymm9, ymm5
vpaddq ymm9, ymm9, ymm11
vpxor xmm11, xmm11, xmm11
kxnorw k1, k0, k0
vpgatherqd xmm11{k1}, xmmword ptr ds:dword_0+2[ymm9]
vpxor xmm9, xmm9, xmm9
kxnorw k1, k0, k0
vpgatherqd xmm9{k1}, xmmword ptr ds:dword_0+2[ymm10]
vmovdqu xmmword ptr [rsp+r11*4+0C8h+var_C0+10h], xmm9
vmovdqu xmmword ptr [rsp+r11*4+0C8h+var_C0], xmm11
vpaddq ymm7, ymm7, ymm6
vpaddq ymm8, ymm8, ymm6
}
_R11 += 8LL;
}
while ( _R11 != 18 );
*(_QWORD *)(_R12 + 64) = v61;
__asm
{
vmovdqu ymm7, [rsp+0C8h+var_C0]
vmovdqu ymm8, [rsp+0C8h+var_A0]
vmovdqu ymmword ptr [r12+20h], ymm8
}
v52 = _R12 + 72;
__asm { vmovdqu ymmword ptr [r12], ymm7 }
v28 += 18LL;
_R12 += 72LL;
}
}
v19 += 4;
a2 += v18;
_R12 = v52;
}
while ( v19 < v12 );
}
v16 = 0;
}
result = v16;
__asm { vzeroupper }
return result;
}
| repack<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
CMP dword ptr [RDI],0x14
JNZ 0x00128c3e
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RDI + 0xf8]
CALL 0x00108660
MOV RSI,qword ptr [R14 + 0x10]
LEA RDX,[RSI + 0x1f]
TEST RSI,RSI
CMOVNS RDX,RSI
SAR RDX,0x5
MOV ECX,EAX
IMUL ECX,EDX
MOVSXD RCX,ECX
ADD RCX,RCX
LEA RCX,[RCX + RCX*0x8]
CMP RCX,R15
JNZ 0x00128c5a
MOV RDI,qword ptr [R14 + 0x18]
AND EDI,0x3
AND ESI,0x7
MOV ECX,0xffffffff
OR RSI,RDI
JNZ 0x00128c29
TEST EAX,EAX
JLE 0x00128c27
MOVSXD RCX,EDX
LEA EDX,[RDX*0x4]
MOVSXD RDX,EDX
ADD RDX,RDX
LEA RDX,[RDX + RDX*0x8]
LEA RSI,[RCX + RCX*0x1]
LEA RSI,[RSI + RSI*0x8]
XOR EDI,EDI
VPMOVSXBQ YMM0,dword ptr [0x001530c0]
VPMOVSXBQ YMM1,dword ptr [0x001530c4]
VPBROADCASTQ YMM2,qword ptr [0x00154e88]
VPBROADCASTQ YMM3,qword ptr [0x00154e68]
LEA R8,[RSP + 0x50]
VPBROADCASTQ YMM4,qword ptr [0x00154e70]
VPBROADCASTQ YMM5
VPBROADCASTQ YMM6,qword ptr [0x00153808]
LAB_00128afe:
TEST RCX,RCX
JLE 0x00128c13
MOV R9,RBX
XOR R10D,R10D
MOV R11,R9
XOR R14D,R14D
LAB_00128b13:
MOVZX EBP,word ptr [R11 + 0x10]
MOV word ptr [RSP + R14*0x1 + 0x60],BP
VMOVDQU XMM7,xmmword ptr [R11]
VMOVDQU xmmword ptr [RSP + R14*0x1 + 0x50],XMM7
ADD R14,0x12
ADD R11,RSI
CMP R14,0x48
JNZ 0x00128b13
MOV R11,R8
XOR R14D,R14D
LAB_00128b3d:
MOVZX EBP,word ptr [R11]
MOV word ptr [RSP + R14*0x2 + 0x8],BP
INC R14
ADD R11,0x12
CMP R14,0x4
JNZ 0x00128b3d
MOV R11D,0x2
VMOVDQA YMM7,YMM1
VMOVDQA YMM8,YMM0
VPAND YMM9,YMM7,YMM2
VPAND YMM10,YMM8,YMM2
VPAND YMM11,YMM8,YMM3
VPMULDQ YMM11,YMM11,YMM4
VPADDQ YMM10,YMM10,YMM5
VPADDQ YMM10,YMM10,YMM11
VPAND YMM11,YMM7,YMM3
VPMULDQ YMM11,YMM11,YMM4
VPADDQ YMM9,YMM9,YMM5
VPADDQ YMM9,YMM9,YMM11
VPXOR XMM11,XMM11,XMM11
LAB_00128c13:
MOV R11,R12
ADD EDI,0x4
ADD RBX,RDX
MOV R12,R11
CMP EDI,EAX
JL 0x00128afe
LAB_00128c27:
XOR ECX,ECX
LAB_00128c29:
MOV EAX,ECX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_00128c3e:
LEA RDI,[0x1550d0]
LEA RDX,[0x1538c1]
LEA RCX,[0x1551ab]
MOV ESI,0xeb1
JMP 0x00128c74
LAB_00128c5a:
LEA RDI,[0x1550d0]
LEA RDX,[0x1538c1]
LEA RCX,[0x1551c7]
MOV ESI,0xebc
LAB_00128c74:
XOR EAX,EAX
CALL 0x00108950
|
/* WARNING: Control flow encountered bad instruction data */
/* int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long) */
int ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>(ggml_tensor *param_1,void *param_2,ulong param_3)
{
ulong uVar1;
int1 auVar2 [32];
int1 auVar3 [32];
int1 auVar4 [32];
int1 auVar5 [32];
int iVar6;
char *pcVar7;
int iVar8;
ulong uVar9;
int8 uVar10;
int iVar11;
int8 *puVar12;
long lVar13;
int1 auVar14 [32];
int1 auVar15 [32];
int1 auVar16 [32];
int1 auVar17 [32];
int2 auStack_c0 [36];
int8 local_78 [2];
int2 auStack_68 [32];
if (*(int *)param_1 == 0x14) {
iVar6 = ggml_nrows();
uVar1 = *(ulong *)(param_1 + 0x10);
uVar9 = uVar1 + 0x1f;
if (-1 < (long)uVar1) {
uVar9 = uVar1;
}
iVar8 = (int)((long)uVar9 >> 5);
if ((long)(iVar6 * iVar8) * 0x12 == param_3) {
iVar11 = -1;
if ((uVar1 & 7) == 0 && (*(ulong *)(param_1 + 0x18) & 3) == 0) {
if (0 < iVar6) {
iVar11 = 0;
auVar3 = vpmovsxbq_avx2(ZEXT416(DAT_001530c0));
auVar4 = vpmovsxbq_avx2(ZEXT416(DAT_001530c4));
auVar15._8_8_ = DAT_00154e88;
auVar15._0_8_ = DAT_00154e88;
auVar15._16_8_ = DAT_00154e88;
auVar15._24_8_ = DAT_00154e88;
auVar16._8_8_ = DAT_00154e68;
auVar16._0_8_ = DAT_00154e68;
auVar16._16_8_ = DAT_00154e68;
auVar16._24_8_ = DAT_00154e68;
puVar12 = local_78;
auVar17._8_8_ = DAT_00154e70;
auVar17._0_8_ = DAT_00154e70;
auVar17._16_8_ = DAT_00154e70;
auVar17._24_8_ = DAT_00154e70;
auVar14 = vpbroadcastq_avx512vl();
do {
if (0 < (long)iVar8) {
lVar13 = 0;
do {
*(int2 *)((long)auStack_68 + lVar13) = *(int2 *)((long)param_2 + 0x10);
/* WARNING: Load size is inaccurate */
uVar10 = *(int8 *)((long)param_2 + 8);
*(int8 *)((long)local_78 + lVar13) = *param_2;
*(int8 *)((long)local_78 + lVar13 + 8) = uVar10;
lVar13 = lVar13 + 0x12;
param_2 = (void *)((long)param_2 + (long)iVar8 * 0x12);
} while (lVar13 != 0x48);
lVar13 = 0;
do {
auStack_c0[lVar13] = *(int2 *)puVar12;
lVar13 = lVar13 + 1;
puVar12 = (int8 *)((long)puVar12 + 0x12);
} while (lVar13 != 4);
auVar2 = vpand_avx2(auVar4,auVar15);
auVar15 = vpand_avx2(auVar3,auVar15);
auVar3 = vpand_avx2(auVar3,auVar16);
auVar5 = vpmuldq_avx2(auVar3,auVar17);
auVar3 = vpaddq_avx2(auVar15,auVar14);
vpaddq_avx2(auVar3,auVar5);
auVar3 = vpand_avx2(auVar4,auVar16);
auVar4 = vpmuldq_avx2(auVar3,auVar17);
auVar3 = vpaddq_avx2(auVar2,auVar14);
vpaddq_avx2(auVar3,auVar4);
/* WARNING: Bad instruction - Truncating control flow here */
halt_baddata();
}
iVar11 = iVar11 + 4;
param_2 = (void *)((long)param_2 + (long)(iVar8 * 4) * 0x12);
} while (iVar11 < iVar6);
}
iVar11 = 0;
}
return iVar11;
}
pcVar7 = "data_size == nrow * nblocks * sizeof(block_iq4_nl)";
uVar10 = 0xebc;
}
else {
pcVar7 = "t->type == GGML_TYPE_IQ4_NL";
uVar10 = 0xeb1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,uVar10,"GGML_ASSERT(%s) failed",pcVar7);
}
| |
23,830 | list_free | eloqsql/mysys/list.c | void list_free(LIST *root, uint free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
my_free(root->data);
my_free(root);
root=next;
}
} | O0 | c | list_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xae588
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xae575
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xbe980
movq -0x8(%rbp), %rdi
callq 0xbe980
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xae54f
addq $0x20, %rsp
popq %rbp
retq
nop
| list_free_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
loc_AE54F:
cmp [rbp+var_8], 0
jz short loc_AE588
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jz short loc_AE575
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call my_free
loc_AE575:
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_AE54F
loc_AE588:
add rsp, 20h
pop rbp
retn
| long long list_free_0(long long a1, int a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
while ( a1 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( a2 )
my_free(*(_QWORD *)(a1 + 16));
my_free(a1);
result = v3;
a1 = v3;
}
return result;
}
| list_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LAB_001ae54f:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001ae588
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001ae575
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001be980
LAB_001ae575:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001be980
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ae54f
LAB_001ae588:
ADD RSP,0x20
POP RBP
RET
|
void list_free(long param_1,int param_2)
{
long lVar1;
int8 local_10;
local_10 = param_1;
while (local_10 != 0) {
lVar1 = *(long *)(local_10 + 8);
if (param_2 != 0) {
my_free(*(int8 *)(local_10 + 0x10));
}
my_free(local_10);
local_10 = lVar1;
}
return;
}
| |
23,831 | js_string_indexOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_indexOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int lastIndexOf)
{
JSValue str, v;
int i, len, v_len, pos, start, stop, ret, inc;
JSString *p;
JSString *p1;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
v = JS_ToString(ctx, argv[0]);
if (JS_IsException(v))
goto fail;
p = JS_VALUE_GET_STRING(str);
p1 = JS_VALUE_GET_STRING(v);
len = p->len;
v_len = p1->len;
if (lastIndexOf) {
pos = len - v_len;
if (argc > 1) {
double d;
if (JS_ToFloat64(ctx, &d, argv[1]))
goto fail;
if (!isnan(d)) {
if (d <= 0)
pos = 0;
else if (d < pos)
pos = d;
}
}
start = pos;
stop = 0;
inc = -1;
} else {
pos = 0;
if (argc > 1) {
if (JS_ToInt32Clamp(ctx, &pos, argv[1], 0, len, 0))
goto fail;
}
start = pos;
stop = len - v_len;
inc = 1;
}
ret = -1;
if (len >= v_len && inc * (stop - start) >= 0) {
for (i = start;; i += inc) {
if (!string_cmp(p, p1, i, 0, v_len)) {
ret = i;
break;
}
if (i == stop)
break;
}
}
JS_FreeValue(ctx, str);
JS_FreeValue(ctx, v);
return js_int32(ret);
fail:
JS_FreeValue(ctx, str);
JS_FreeValue(ctx, v);
return JS_EXCEPTION;
} | O3 | c | js_string_indexOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movq %r8, %r15
movl %ecx, %r14d
movq %rdi, %r13
callq 0x4350b
movq %rax, %r12
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x7d3ab
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r13, %rdi
xorl %ecx, %ecx
callq 0x27518
movq %rax, 0x20(%rsp)
cmpl $0x6, %edx
jne 0x7d209
movq 0x18(%r13), %rdi
cmpl $-0x9, %ebx
jb 0x7d280
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
movq 0x20(%rsp), %r15
jg 0x7d285
movq %r12, %rsi
movq %rdx, %r14
movq %rbx, %rdx
callq 0x20d90
movq %r14, %rdx
movq 0x18(%r13), %rdi
jmp 0x7d285
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movl 0x4(%r12), %r9d
andl %r8d, %r9d
movq 0x20(%rsp), %rax
andl 0x4(%rax), %r8d
testl %ebp, %ebp
movq %rdx, 0x18(%rsp)
je 0x7d2ad
movl %r9d, %ebp
subl %r8d, %ebp
movl %ebp, 0xc(%rsp)
movl $0x0, 0x14(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
cmpl $0x2, %r14d
jl 0x7d306
movl %r9d, 0x2c(%rsp)
movl %r8d, %r14d
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x2712e
testl %eax, %eax
je 0x7d3c0
movq 0x18(%rsp), %rdx
jmp 0x7d1cc
movq 0x20(%rsp), %r15
movl $0x6, %ebx
cmpl $-0x9, %edx
jb 0x7d2a5
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x7d2a5
movq %r15, %rsi
callq 0x20d90
xorl %r12d, %r12d
jmp 0x7d3ab
movl $0x0, 0xc(%rsp)
cmpl $0x2, %r14d
jl 0x7d2f4
movq %rdx, %r14
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
movl $0x0, (%rsp)
leaq 0xc(%rsp), %rsi
movq %r13, %rdi
movl %r8d, %ebp
xorl %r8d, %r8d
movl %r9d, %r15d
callq 0x271f4
movl %r15d, %r9d
movl %ebp, %r8d
movq %r14, %rdx
testl %eax, %eax
jne 0x7d1cc
movl %r9d, %eax
subl %r8d, %eax
movl %eax, 0x14(%rsp)
movl $0x1, 0x10(%rsp)
cmpl %r8d, %r9d
movq 0x20(%rsp), %rbp
jb 0x7d358
movl 0xc(%rsp), %r14d
movl 0x14(%rsp), %eax
subl %r14d, %eax
imull 0x10(%rsp), %eax
testl %eax, %eax
js 0x7d358
movq %r12, %rdi
movq %rbp, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
movl %r8d, %r15d
callq 0x7f707
testl %eax, %eax
je 0x7d35e
cmpl %r14d, 0x14(%rsp)
je 0x7d358
addl 0x10(%rsp), %r14d
movq %r12, %rdi
movq %rbp, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
jmp 0x7d333
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq 0x18(%r13), %rdi
cmpl $-0x9, %ebx
jb 0x7d386
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x7d386
movq %r12, %rsi
movq %rbx, %rdx
callq 0x20d90
movq 0x18(%r13), %rdi
movq 0x18(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x7d3a6
movl (%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbp)
cmpl $0x1, %eax
jg 0x7d3a6
movq %rbp, %rsi
callq 0x20d90
movl %r14d, %r12d
xorl %ebx, %ebx
movq %r12, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
movl %r14d, %r8d
movl 0x2c(%rsp), %r9d
jp 0x7d306
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x7d400
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7d306
cvttsd2si %xmm0, %eax
movl %eax, 0xc(%rsp)
jmp 0x7d306
movl $0x0, 0xc(%rsp)
jmp 0x7d306
| js_string_indexOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, r9d
mov r15, r8
mov r14d, ecx
mov r13, rdi
call JS_ToStringCheckObject
mov r12, rax
mov rbx, rdx
cmp ebx, 6
jz loc_7D3AB
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r13
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+68h+var_48], rax
cmp edx, 6
jnz short loc_7D209
loc_7D1CC:
mov rdi, [r13+18h]
cmp ebx, 0FFFFFFF7h
jb loc_7D280
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
mov r15, [rsp+68h+var_48]
jg loc_7D285
mov rsi, r12
mov r14, rdx
mov rdx, rbx
call js_free_value_rt
mov rdx, r14
mov rdi, [r13+18h]
jmp short loc_7D285
loc_7D209:
mov r8d, 7FFFFFFFh
mov r9d, [r12+4]
and r9d, r8d
mov rax, [rsp+68h+var_48]
and r8d, [rax+4]
test ebp, ebp
mov [rsp+68h+var_50], rdx
jz loc_7D2AD
mov ebp, r9d
sub ebp, r8d
mov [rsp+68h+var_5C], ebp
mov [rsp+68h+var_54], 0
mov [rsp+68h+var_58], 0FFFFFFFFh
cmp r14d, 2
jl loc_7D306
mov [rsp+68h+var_3C], r9d
mov r14d, r8d
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+68h+var_38]
mov rdi, r13
call JS_ToFloat64
test eax, eax
jz loc_7D3C0
mov rdx, [rsp+68h+var_50]
jmp loc_7D1CC
loc_7D280:
mov r15, [rsp+68h+var_48]
loc_7D285:
mov ebx, 6
cmp edx, 0FFFFFFF7h
jb short loc_7D2A5
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_7D2A5
mov rsi, r15
call js_free_value_rt
loc_7D2A5:
xor r12d, r12d
jmp loc_7D3AB
loc_7D2AD:
mov [rsp+68h+var_5C], 0
cmp r14d, 2
jl short loc_7D2F4
mov r14, rdx
mov rdx, [r15+10h]
mov rcx, [r15+18h]
mov [rsp+68h+var_68], 0
lea rsi, [rsp+68h+var_5C]
mov rdi, r13
mov ebp, r8d
xor r8d, r8d
mov r15d, r9d
call JS_ToInt32Clamp
mov r9d, r15d
mov r8d, ebp
mov rdx, r14
test eax, eax
jnz loc_7D1CC
loc_7D2F4:
mov eax, r9d
sub eax, r8d
mov [rsp+68h+var_54], eax
mov [rsp+68h+var_58], 1
loc_7D306:
cmp r9d, r8d
mov rbp, [rsp+68h+var_48]
jb short loc_7D358
mov r14d, [rsp+68h+var_5C]
mov eax, [rsp+68h+var_54]
sub eax, r14d
imul eax, [rsp+68h+var_58]
test eax, eax
js short loc_7D358
mov rdi, r12
mov rsi, rbp
mov edx, r14d
xor ecx, ecx
mov r15d, r8d
loc_7D333:
call string_cmp
test eax, eax
jz short loc_7D35E
cmp [rsp+68h+var_54], r14d
jz short loc_7D358
add r14d, [rsp+68h+var_58]
mov rdi, r12
mov rsi, rbp
mov edx, r14d
xor ecx, ecx
mov r8d, r15d
jmp short loc_7D333
loc_7D358:
mov r14d, 0FFFFFFFFh
loc_7D35E:
mov rdi, [r13+18h]
cmp ebx, 0FFFFFFF7h
jb short loc_7D386
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_7D386
mov rsi, r12
mov rdx, rbx
call js_free_value_rt
mov rdi, [r13+18h]
loc_7D386:
mov rdx, [rsp+68h+var_50]
cmp edx, 0FFFFFFF7h
jb short loc_7D3A6
mov eax, [rbp+0]
lea ecx, [rax-1]
mov [rbp+0], ecx
cmp eax, 1
jg short loc_7D3A6
mov rsi, rbp
call js_free_value_rt
loc_7D3A6:
mov r12d, r14d
xor ebx, ebx
loc_7D3AB:
mov rax, r12
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7D3C0:
movsd xmm0, [rsp+68h+var_38]
ucomisd xmm0, xmm0
mov r8d, r14d
mov r9d, [rsp+68h+var_3C]
jp loc_7D306
xorpd xmm1, xmm1
ucomisd xmm1, xmm0
jnb short loc_7D400
xorps xmm1, xmm1
cvtsi2sd xmm1, ebp
ucomisd xmm1, xmm0
jbe loc_7D306
cvttsd2si eax, xmm0
mov [rsp+68h+var_5C], eax
jmp loc_7D306
loc_7D400:
mov [rsp+68h+var_5C], 0
jmp loc_7D306
| unsigned long long js_string_indexOf(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // ebp
int v16; // r14d
long long v18; // r8
long long v19; // r9
unsigned long long v20; // r12
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rdx
long long v24; // rbx
long long v25; // rdx
long long v26; // r8
long long v27; // r9
long long v28; // rdi
int v29; // eax
long long v30; // rcx
_QWORD *v31; // r15
long long v32; // r14
int v33; // ebp
unsigned int v34; // r14d
int v35; // eax
long long v36; // rcx
long long v37; // r14
_DWORD *v38; // rdx
long long v39; // rcx
unsigned int v40; // ebp
unsigned int v41; // r15d
int v42; // eax
_QWORD *v43; // rbp
unsigned int v44; // r14d
unsigned long long v45; // rdi
_QWORD *v46; // rsi
long long i; // rdx
long long v48; // rdi
int v49; // eax
long long v50; // rcx
long long v51; // rdx
int v52; // eax
long long v53; // rcx
unsigned int v55; // [rsp+Ch] [rbp-5Ch] BYREF
int v56; // [rsp+10h] [rbp-58h]
int v57; // [rsp+14h] [rbp-54h]
long long v58; // [rsp+18h] [rbp-50h]
unsigned long long v59; // [rsp+20h] [rbp-48h]
unsigned int v60; // [rsp+2Ch] [rbp-3Ch]
double v61[7]; // [rsp+30h] [rbp-38h] BYREF
v14 = a6;
v16 = a4;
v20 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v24 = v23;
if ( (_DWORD)v23 == 6 )
return v20;
v59 = JS_ToStringInternal(a1, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0LL, v18, v19, a7, a8, a9, a10, v21, v22, a13, a14);
if ( (_DWORD)v25 == 6 )
goto LABEL_3;
v27 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF;
v26 = *(_DWORD *)(v59 + 4) & 0x7FFFFFFF;
v58 = v25;
if ( v14 )
{
v33 = v27 - v26;
v55 = v27 - v26;
v57 = 0;
v56 = -1;
if ( v16 >= 2 )
{
v60 = v27;
v34 = v26;
if ( (unsigned int)JS_ToFloat64(a1, v61, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24)) )
{
v25 = v58;
LABEL_3:
v28 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v24 < 0xFFFFFFF7 )
{
v31 = (_QWORD *)v59;
}
else
{
v29 = *(_DWORD *)v20;
v30 = (unsigned int)(*(_DWORD *)v20 - 1);
*(_DWORD *)v20 = v30;
v31 = (_QWORD *)v59;
if ( v29 <= 1 )
{
v32 = v25;
js_free_value_rt(v28, (_QWORD *)v20, v24, v30, v26, v27);
v25 = v32;
v28 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v25 >= 0xFFFFFFF7 )
{
v35 = *(_DWORD *)v31;
v36 = (unsigned int)(*(_DWORD *)v31 - 1);
*(_DWORD *)v31 = v36;
if ( v35 <= 1 )
js_free_value_rt(v28, v31, v25, v36, v26, v27);
}
return 0LL;
}
v26 = v34;
v27 = v60;
if ( v61[0] <= 0.0 )
{
v55 = 0;
}
else if ( (double)v33 > v61[0] )
{
v55 = (int)v61[0];
}
}
}
else
{
v55 = 0;
if ( v16 >= 2 )
{
v37 = v25;
v38 = *(_DWORD **)(a5 + 16);
v39 = *(_QWORD *)(a5 + 24);
v40 = v26;
v41 = v27;
v42 = JS_ToInt32Clamp(a1, (int *)&v55, v38, v39, 0, v27, 0);
v27 = v41;
v26 = v40;
v25 = v37;
if ( v42 )
goto LABEL_3;
}
v57 = v27 - v26;
v56 = 1;
}
v43 = (_QWORD *)v59;
if ( (unsigned int)v27 < (unsigned int)v26 || (v44 = v55, ((v56 * (v57 - v55)) & 0x80000000) != 0) )
{
LABEL_24:
v44 = -1;
}
else
{
v45 = v20;
v46 = (_QWORD *)v59;
for ( i = v55; (unsigned int)string_cmp(v45, v46, i, 0LL); i = v44 )
{
if ( v57 == v44 )
goto LABEL_24;
v44 += v56;
v45 = v20;
v46 = v43;
}
}
v48 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
{
v49 = *(_DWORD *)v20;
v50 = (unsigned int)(*(_DWORD *)v20 - 1);
*(_DWORD *)v20 = v50;
if ( v49 <= 1 )
{
js_free_value_rt(v48, (_QWORD *)v20, v24, v50, v26, v27);
v48 = *(_QWORD *)(a1 + 24);
}
}
v51 = v58;
if ( (unsigned int)v58 >= 0xFFFFFFF7 )
{
v52 = *(_DWORD *)v43;
v53 = (unsigned int)(*(_DWORD *)v43 - 1);
*(_DWORD *)v43 = v53;
if ( v52 <= 1 )
js_free_value_rt(v48, v43, v51, v53, v26, v27);
}
return v44;
}
| js_string_indexOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,R9D
MOV R15,R8
MOV R14D,ECX
MOV R13,RDI
CALL 0x0014350b
MOV R12,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0017d3ab
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R13
XOR ECX,ECX
CALL 0x00127518
MOV qword ptr [RSP + 0x20],RAX
CMP EDX,0x6
JNZ 0x0017d209
LAB_0017d1cc:
MOV RDI,qword ptr [R13 + 0x18]
CMP EBX,-0x9
JC 0x0017d280
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
MOV R15,qword ptr [RSP + 0x20]
JG 0x0017d285
MOV RSI,R12
MOV R14,RDX
MOV RDX,RBX
CALL 0x00120d90
MOV RDX,R14
MOV RDI,qword ptr [R13 + 0x18]
JMP 0x0017d285
LAB_0017d209:
MOV R8D,0x7fffffff
MOV R9D,dword ptr [R12 + 0x4]
AND R9D,R8D
MOV RAX,qword ptr [RSP + 0x20]
AND R8D,dword ptr [RAX + 0x4]
TEST EBP,EBP
MOV qword ptr [RSP + 0x18],RDX
JZ 0x0017d2ad
MOV EBP,R9D
SUB EBP,R8D
MOV dword ptr [RSP + 0xc],EBP
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x10],0xffffffff
CMP R14D,0x2
JL 0x0017d306
MOV dword ptr [RSP + 0x2c],R9D
MOV R14D,R8D
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0x30]
MOV RDI,R13
CALL 0x0012712e
TEST EAX,EAX
JZ 0x0017d3c0
MOV RDX,qword ptr [RSP + 0x18]
JMP 0x0017d1cc
LAB_0017d280:
MOV R15,qword ptr [RSP + 0x20]
LAB_0017d285:
MOV EBX,0x6
CMP EDX,-0x9
JC 0x0017d2a5
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0017d2a5
MOV RSI,R15
CALL 0x00120d90
LAB_0017d2a5:
XOR R12D,R12D
JMP 0x0017d3ab
LAB_0017d2ad:
MOV dword ptr [RSP + 0xc],0x0
CMP R14D,0x2
JL 0x0017d2f4
MOV R14,RDX
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
MOV dword ptr [RSP],0x0
LEA RSI,[RSP + 0xc]
MOV RDI,R13
MOV EBP,R8D
XOR R8D,R8D
MOV R15D,R9D
CALL 0x001271f4
MOV R9D,R15D
MOV R8D,EBP
MOV RDX,R14
TEST EAX,EAX
JNZ 0x0017d1cc
LAB_0017d2f4:
MOV EAX,R9D
SUB EAX,R8D
MOV dword ptr [RSP + 0x14],EAX
MOV dword ptr [RSP + 0x10],0x1
LAB_0017d306:
CMP R9D,R8D
MOV RBP,qword ptr [RSP + 0x20]
JC 0x0017d358
MOV R14D,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,R14D
IMUL EAX,dword ptr [RSP + 0x10]
TEST EAX,EAX
JS 0x0017d358
MOV RDI,R12
MOV RSI,RBP
MOV EDX,R14D
XOR ECX,ECX
MOV R15D,R8D
LAB_0017d333:
CALL 0x0017f707
TEST EAX,EAX
JZ 0x0017d35e
CMP dword ptr [RSP + 0x14],R14D
JZ 0x0017d358
ADD R14D,dword ptr [RSP + 0x10]
MOV RDI,R12
MOV RSI,RBP
MOV EDX,R14D
XOR ECX,ECX
MOV R8D,R15D
JMP 0x0017d333
LAB_0017d358:
MOV R14D,0xffffffff
LAB_0017d35e:
MOV RDI,qword ptr [R13 + 0x18]
CMP EBX,-0x9
JC 0x0017d386
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0017d386
MOV RSI,R12
MOV RDX,RBX
CALL 0x00120d90
MOV RDI,qword ptr [R13 + 0x18]
LAB_0017d386:
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,-0x9
JC 0x0017d3a6
MOV EAX,dword ptr [RBP]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBP],ECX
CMP EAX,0x1
JG 0x0017d3a6
MOV RSI,RBP
CALL 0x00120d90
LAB_0017d3a6:
MOV R12D,R14D
XOR EBX,EBX
LAB_0017d3ab:
MOV RAX,R12
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017d3c0:
MOVSD XMM0,qword ptr [RSP + 0x30]
UCOMISD XMM0,XMM0
MOV R8D,R14D
MOV R9D,dword ptr [RSP + 0x2c]
JP 0x0017d306
XORPD XMM1,XMM1
UCOMISD XMM1,XMM0
JNC 0x0017d400
XORPS XMM1,XMM1
CVTSI2SD XMM1,EBP
UCOMISD XMM1,XMM0
JBE 0x0017d306
CVTTSD2SI EAX,XMM0
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0017d306
LAB_0017d400:
MOV dword ptr [RSP + 0xc],0x0
JMP 0x0017d306
|
int1 [16]
js_string_indexOf(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5
,int param_6)
{
int1 auVar1 [16];
int1 auVar2 [12];
int *piVar3;
int iVar4;
int *piVar5;
uint uVar6;
uint uVar7;
int8 uVar8;
uint uVar9;
uint uVar10;
int1 auVar11 [16];
int1 auVar12 [16];
uint local_5c;
int local_58;
uint local_54;
int8 local_50;
int *local_48;
uint local_3c;
double local_38;
auVar11 = JS_ToStringCheckObject();
piVar5 = auVar11._0_8_;
uVar6 = auVar11._8_4_;
if (uVar6 == 6) {
return auVar11;
}
auVar12 = JS_ToStringInternal(param_1,*param_5,param_5[1],0);
auVar2 = auVar12._0_12_;
uVar8 = auVar12._8_8_;
local_48 = auVar12._0_8_;
if (auVar12._8_4_ == 6) {
LAB_0017d1cc:
local_48 = auVar2._0_8_;
piVar3 = local_48;
uVar8 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < uVar6) && (iVar4 = *piVar5, *piVar5 = iVar4 + -1, iVar4 < 2)) {
js_free_value_rt(uVar8,piVar5,auVar11._8_8_);
uVar8 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < auVar2._8_4_) && (iVar4 = *piVar3, *piVar3 = iVar4 + -1, iVar4 < 2)) {
js_free_value_rt(uVar8,piVar3);
}
auVar11 = ZEXT816(6) << 0x40;
}
else {
uVar10 = piVar5[1] & 0x7fffffff;
uVar9 = *(uint *)((long)local_48 + 4) & 0x7fffffff;
local_50 = uVar8;
if (param_6 == 0) {
local_5c = 0;
if (1 < param_4) {
iVar4 = JS_ToInt32Clamp(param_1,&local_5c,param_5[2],param_5[3],0,uVar10,0);
auVar12._8_8_ = local_50;
auVar12._0_8_ = local_48;
auVar1._8_8_ = uVar8;
auVar1._0_8_ = local_48;
auVar2 = auVar1._0_12_;
if (iVar4 != 0) goto LAB_0017d1cc;
}
local_54 = uVar10 - uVar9;
local_58 = 1;
}
else {
uVar7 = uVar10 - uVar9;
local_54 = 0;
local_58 = -1;
local_5c = uVar7;
if (1 < param_4) {
local_3c = uVar10;
iVar4 = JS_ToFloat64(param_1,&local_38,param_5[2],param_5[3]);
auVar12._8_8_ = local_50;
auVar12._0_8_ = local_48;
auVar2 = auVar12._0_12_;
if (iVar4 != 0) goto LAB_0017d1cc;
uVar10 = local_3c;
if (!NAN(local_38)) {
if (local_38 <= 0.0) {
local_5c = 0;
}
else if (local_38 < (double)(int)uVar7) {
local_5c = (uint)local_38;
}
}
}
}
local_48 = auVar12._0_8_;
piVar3 = local_48;
if ((uVar10 < uVar9) || (uVar10 = local_5c, (int)((local_54 - local_5c) * local_58) < 0)) {
LAB_0017d358:
uVar10 = 0xffffffff;
}
else {
while( true ) {
local_50 = auVar12._8_8_;
local_48 = auVar12._0_8_;
iVar4 = string_cmp(piVar5,piVar3,uVar10,0,uVar9);
auVar12._8_8_ = local_50;
auVar12._0_8_ = local_48;
if (iVar4 == 0) break;
if (local_54 == uVar10) goto LAB_0017d358;
uVar10 = uVar10 + local_58;
}
}
local_50 = auVar12._8_8_;
local_48 = auVar12._0_8_;
uVar8 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < uVar6) && (iVar4 = *piVar5, *piVar5 = iVar4 + -1, iVar4 < 2)) {
js_free_value_rt(uVar8,piVar5,auVar11._8_8_);
auVar12._8_8_ = local_50;
auVar12._0_8_ = local_48;
uVar8 = *(int8 *)(param_1 + 0x18);
}
local_50 = auVar12._8_8_;
local_48 = auVar12._0_8_;
if ((0xfffffff6 < auVar12._8_4_) && (iVar4 = *piVar3, *piVar3 = iVar4 + -1, iVar4 < 2)) {
js_free_value_rt(uVar8,piVar3);
}
auVar11 = ZEXT416(uVar10);
}
return auVar11;
}
| |
23,832 | JS_FlattenIntoArray | bluesky950520[P]quickjs/quickjs.c | static int64_t JS_FlattenIntoArray(JSContext *ctx, JSValue target,
JSValue source, int64_t sourceLen,
int64_t targetIndex, int depth,
JSValue mapperFunction,
JSValue thisArg)
{
JSValue element;
int64_t sourceIndex, elementLen;
int present, is_array;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
return -1;
}
for (sourceIndex = 0; sourceIndex < sourceLen; sourceIndex++) {
present = JS_TryGetPropertyInt64(ctx, source, sourceIndex, &element);
if (present < 0)
return -1;
if (!present)
continue;
if (!JS_IsUndefined(mapperFunction)) {
JSValue args[3] = { element, js_int64(sourceIndex), source };
element = JS_Call(ctx, mapperFunction, thisArg, 3, args);
JS_FreeValue(ctx, args[0]);
JS_FreeValue(ctx, args[1]);
if (JS_IsException(element))
return -1;
}
if (depth > 0) {
is_array = JS_IsArray(ctx, element);
if (is_array < 0)
goto fail;
if (is_array) {
if (js_get_length64(ctx, &elementLen, element) < 0)
goto fail;
targetIndex = JS_FlattenIntoArray(ctx, target, element,
elementLen, targetIndex,
depth - 1,
JS_UNDEFINED, JS_UNDEFINED);
if (targetIndex < 0)
goto fail;
JS_FreeValue(ctx, element);
continue;
}
}
if (targetIndex >= MAX_SAFE_INTEGER) {
JS_ThrowTypeError(ctx, "Array too long");
goto fail;
}
if (JS_DefinePropertyValueInt64(ctx, target, targetIndex, element,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
return -1;
targetIndex++;
}
return targetIndex;
fail:
JS_FreeValue(ctx, element);
return -1;
} | O0 | c | JS_FlattenIntoArray:
pushq %rbx
subq $0x120, %rsp # imm = 0x120
leaq 0x150(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x138(%rsp), %eax
movq 0x130(%rsp), %rax
movq %rsi, 0x108(%rsp)
movq %rdx, 0x110(%rsp)
movq %rcx, 0xf8(%rsp)
movq %r8, 0x100(%rsp)
movq %rdi, 0xf0(%rsp)
movq %r9, 0xe8(%rsp)
movq 0xf0(%rsp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4dce0
cmpl $0x0, %eax
je 0xcecc9
movq 0xf0(%rsp), %rdi
callq 0x601e0
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movq $-0x1, 0x118(%rsp)
jmp 0xcf0cc
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
cmpq 0xe8(%rsp), %rax
jge 0xcf091
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rcx
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
leaq 0xd8(%rsp), %r8
callq 0x87ba0
movl %eax, 0xc4(%rsp)
cmpl $0x0, 0xc4(%rsp)
jge 0xced3a
movq $-0x1, 0x118(%rsp)
jmp 0xcf0cc
cmpl $0x0, 0xc4(%rsp)
jne 0xced49
jmp 0xcf078
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2e260
cmpl $0x0, %eax
jne 0xcee82
movq 0xd8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x37480
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xf0(%rsp), %rdi
leaq 0x80(%rsp), %rax
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq (%r8), %rcx
movq 0x8(%r8), %r8
movl $0x3, %r9d
movq %rax, (%rsp)
callq 0x3a050
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xf0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x23c90
movq 0xf0(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x23c90
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xcee80
movq $-0x1, 0x118(%rsp)
jmp 0xcf0cc
jmp 0xcee82
cmpl $0x0, 0x138(%rsp)
jle 0xcefdc
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x39ba0
movl %eax, 0xc0(%rsp)
cmpl $0x0, 0xc0(%rsp)
jge 0xceec3
jmp 0xcf0a3
cmpl $0x0, 0xc0(%rsp)
je 0xcefda
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
leaq 0xc8(%rsp), %rsi
callq 0x2df60
cmpl $0x0, %eax
jge 0xcef00
jmp 0xcf0a3
movq 0xf0(%rsp), %rdi
movq 0xc8(%rsp), %r9
movq 0x130(%rsp), %rbx
movl 0x138(%rsp), %r11d
subl $0x1, %r11d
movl $0x0, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movl $0x0, 0x50(%rsp)
movq $0x3, 0x58(%rsp)
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0xd8(%rsp), %rcx
movq 0xe0(%rsp), %r8
leaq 0x60(%rsp), %r10
leaq 0x50(%rsp), %rax
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movq (%r10), %r11
movq %r11, 0x10(%rsp)
movq 0x8(%r10), %r10
movq %r10, 0x18(%rsp)
movq (%rax), %r10
movq %r10, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xcec20
movq %rax, 0x130(%rsp)
cmpq $0x0, 0x130(%rsp)
jge 0xcefb8
jmp 0xcf0a3
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
jmp 0xcf078
jmp 0xcefdc
movabsq $0x1fffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFF
cmpq %rax, 0x130(%rsp)
jl 0xcf015
movq 0xf0(%rsp), %rdi
leaq 0x41e44(%rip), %rsi # 0x110e43
movb $0x0, %al
callq 0x2d300
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
jmp 0xcf0a3
movq 0xf0(%rsp), %rdi
movq 0x130(%rsp), %rcx
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0xd8(%rsp), %r8
movq 0xe0(%rsp), %r9
movl $0x4007, (%rsp) # imm = 0x4007
callq 0x373f0
cmpl $0x0, %eax
jge 0xcf064
movq $-0x1, 0x118(%rsp)
jmp 0xcf0cc
movq 0x130(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x130(%rsp)
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0xcecd5
movq 0x130(%rsp), %rax
movq %rax, 0x118(%rsp)
jmp 0xcf0cc
movq 0xf0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movq $-0x1, 0x118(%rsp)
movq 0x118(%rsp), %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
retq
nopl (%rax)
| JS_FlattenIntoArray:
push rbx
sub rsp, 120h
lea rax, [rsp+128h+arg_20]
mov [rsp+128h+var_F8], rax
lea rax, [rsp+128h+arg_10]
mov [rsp+128h+var_F0], rax
mov eax, [rsp+128h+arg_8]
mov rax, [rsp+128h+arg_0]
mov [rsp+128h+var_20], rsi
mov [rsp+128h+var_18], rdx
mov [rsp+128h+var_30], rcx
mov [rsp+128h+var_28], r8
mov [rsp+128h+var_38], rdi
mov [rsp+128h+var_40], r9
mov rax, [rsp+128h+var_38]
mov rdi, [rax+18h]
xor eax, eax
mov esi, eax
call js_check_stack_overflow
cmp eax, 0
jz short loc_CECC9
mov rdi, [rsp+128h+var_38]
call JS_ThrowStackOverflow
mov [rsp+128h+var_78], rax
mov [rsp+128h+var_70], rdx
mov [rsp+128h+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CF0CC
loc_CECC9:
mov [rsp+128h+var_58], 0
loc_CECD5:
mov rax, [rsp+128h+var_58]
cmp rax, [rsp+128h+var_40]
jge loc_CF091
mov rdi, [rsp+128h+var_38]
mov rcx, [rsp+128h+var_58]
mov rsi, [rsp+128h+var_30]
mov rdx, [rsp+128h+var_28]
lea r8, [rsp+128h+var_50]
call JS_TryGetPropertyInt64
mov [rsp+128h+var_64], eax
cmp [rsp+128h+var_64], 0
jge short loc_CED3A
mov [rsp+128h+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CF0CC
loc_CED3A:
cmp [rsp+128h+var_64], 0
jnz short loc_CED49
jmp loc_CF078
loc_CED49:
mov rax, [rsp+128h+var_F0]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUndefined_0
cmp eax, 0
jnz loc_CEE82
mov rax, [rsp+128h+var_50]
mov [rsp+128h+var_A8], rax
mov rax, [rsp+128h+var_48]
mov [rsp+128h+var_A0], rax
mov rdi, [rsp+128h+var_58]
call js_int64
mov rcx, [rsp+128h+var_F0]
mov r8, [rsp+128h+var_F8]
mov [rsp+128h+var_98], rax
mov [rsp+128h+var_90], rdx
mov rax, [rsp+128h+var_30]
mov [rsp+128h+var_88], rax
mov rax, [rsp+128h+var_28]
mov [rsp+128h+var_80], rax
mov rdi, [rsp+128h+var_38]
lea rax, [rsp+128h+var_A8]
mov rsi, [rcx]
mov rdx, [rcx+8]
mov rcx, [r8]
mov r8, [r8+8]
mov r9d, 3
mov [rsp+128h+var_128], rax
call JS_Call
mov [rsp+128h+var_B8], rax
mov [rsp+128h+var_B0], rdx
mov rax, [rsp+128h+var_B8]
mov [rsp+128h+var_50], rax
mov rax, [rsp+128h+var_B0]
mov [rsp+128h+var_48], rax
mov rdi, [rsp+128h+var_38]
mov rsi, [rsp+128h+var_A8]
mov rdx, [rsp+128h+var_A0]
call JS_FreeValue
mov rdi, [rsp+128h+var_38]
mov rsi, [rsp+128h+var_98]
mov rdx, [rsp+128h+var_90]
call JS_FreeValue
mov rdi, [rsp+128h+var_50]
mov rsi, [rsp+128h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_CEE80
mov [rsp+128h+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CF0CC
loc_CEE80:
jmp short $+2
loc_CEE82:
cmp [rsp+128h+arg_8], 0
jle loc_CEFDC
mov rdi, [rsp+128h+var_38]
mov rsi, [rsp+128h+var_50]
mov rdx, [rsp+128h+var_48]
call JS_IsArray
mov [rsp+128h+var_68], eax
cmp [rsp+128h+var_68], 0
jge short loc_CEEC3
jmp loc_CF0A3
loc_CEEC3:
cmp [rsp+128h+var_68], 0
jz loc_CEFDA
mov rdi, [rsp+128h+var_38]
mov rdx, [rsp+128h+var_50]
mov rcx, [rsp+128h+var_48]
lea rsi, [rsp+128h+var_60]
call js_get_length64
cmp eax, 0
jge short loc_CEF00
jmp loc_CF0A3
loc_CEF00:
mov rdi, [rsp+128h+var_38]
mov r9, [rsp+128h+var_60]
mov rbx, [rsp+128h+arg_0]
mov r11d, [rsp+128h+arg_8]
sub r11d, 1
mov [rsp+128h+var_C8], 0
mov [rsp+128h+var_C0], 3
mov [rsp+128h+var_D8], 0
mov [rsp+128h+var_D0], 3
mov rsi, [rsp+128h+var_20]
mov rdx, [rsp+128h+var_18]
mov rcx, [rsp+128h+var_50]
mov r8, [rsp+128h+var_48]
lea r10, [rsp+128h+var_C8]
lea rax, [rsp+128h+var_D8]
mov [rsp+128h+var_128], rbx
mov [rsp+128h+var_120], r11d
mov r11, [r10]
mov [rsp+128h+var_118], r11
mov r10, [r10+8]
mov [rsp+128h+var_110], r10
mov r10, [rax]
mov [rsp+128h+var_108], r10
mov rax, [rax+8]
mov [rsp+128h+var_100], rax
call JS_FlattenIntoArray
mov [rsp+128h+arg_0], rax
cmp [rsp+128h+arg_0], 0
jge short loc_CEFB8
jmp loc_CF0A3
loc_CEFB8:
mov rdi, [rsp+128h+var_38]
mov rsi, [rsp+128h+var_50]
mov rdx, [rsp+128h+var_48]
call JS_FreeValue
jmp loc_CF078
loc_CEFDA:
jmp short $+2
loc_CEFDC:
mov rax, 1FFFFFFFFFFFFFh
cmp [rsp+128h+arg_0], rax
jl short loc_CF015
mov rdi, [rsp+128h+var_38]
lea rsi, aArrayTooLong; "Array too long"
mov al, 0
call JS_ThrowTypeError
mov [rsp+128h+var_E8], rax
mov [rsp+128h+var_E0], rdx
jmp loc_CF0A3
loc_CF015:
mov rdi, [rsp+128h+var_38]
mov rcx, [rsp+128h+arg_0]
mov rsi, [rsp+128h+var_20]
mov rdx, [rsp+128h+var_18]
mov r8, [rsp+128h+var_50]
mov r9, [rsp+128h+var_48]
mov dword ptr [rsp+128h+var_128], 4007h
call JS_DefinePropertyValueInt64
cmp eax, 0
jge short loc_CF064
mov [rsp+128h+var_10], 0FFFFFFFFFFFFFFFFh
jmp short loc_CF0CC
loc_CF064:
mov rax, [rsp+128h+arg_0]
add rax, 1
mov [rsp+128h+arg_0], rax
loc_CF078:
mov rax, [rsp+128h+var_58]
add rax, 1
mov [rsp+128h+var_58], rax
jmp loc_CECD5
loc_CF091:
mov rax, [rsp+128h+arg_0]
mov [rsp+128h+var_10], rax
jmp short loc_CF0CC
loc_CF0A3:
mov rdi, [rsp+128h+var_38]
mov rsi, [rsp+128h+var_50]
mov rdx, [rsp+128h+var_48]
call JS_FreeValue
mov [rsp+128h+var_10], 0FFFFFFFFFFFFFFFFh
loc_CF0CC:
mov rax, [rsp+128h+var_10]
add rsp, 120h
pop rbx
retn
| long long JS_FlattenIntoArray(
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,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15,
int a16,
long long a17,
int a18,
int a19,
int a20)
{
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rdx
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rdx
long long v34; // rdx
char v36; // [rsp+0h] [rbp-128h]
_DWORD *v37; // [rsp+80h] [rbp-A8h] BYREF
long long v38; // [rsp+88h] [rbp-A0h]
long long v39; // [rsp+90h] [rbp-98h]
long long v40; // [rsp+98h] [rbp-90h]
long long v41; // [rsp+A0h] [rbp-88h]
long long v42; // [rsp+A8h] [rbp-80h]
long long v43; // [rsp+B0h] [rbp-78h]
long long v44; // [rsp+B8h] [rbp-70h]
int IsArray; // [rsp+C0h] [rbp-68h]
int PropertyInt64; // [rsp+C4h] [rbp-64h]
long long v47; // [rsp+C8h] [rbp-60h] BYREF
long long i; // [rsp+D0h] [rbp-58h]
_DWORD *v49; // [rsp+D8h] [rbp-50h] BYREF
long long v50; // [rsp+E0h] [rbp-48h]
long long v51; // [rsp+E8h] [rbp-40h]
long long v52; // [rsp+F0h] [rbp-38h]
long long v53; // [rsp+F8h] [rbp-30h]
long long v54; // [rsp+100h] [rbp-28h]
long long v55; // [rsp+108h] [rbp-20h]
long long v56; // [rsp+110h] [rbp-18h]
v55 = a2;
v56 = a3;
v53 = a4;
v54 = a5;
v52 = a1;
v51 = a6;
if ( js_check_stack_overflow(*(_QWORD *)(a1 + 24), 0LL) )
{
v43 = JS_ThrowStackOverflow(v52, a7, a8, a9, a10, v24, v25, a13, a14, 0LL, v20, v21, v22, v23);
v44 = v26;
return -1LL;
}
for ( i = 0LL; ; ++i )
{
if ( i >= v51 )
return a15;
PropertyInt64 = JS_TryGetPropertyInt64(v52, v53, v54, i, (long long *)&v49);
if ( PropertyInt64 < 0 )
return -1LL;
if ( !PropertyInt64 )
continue;
if ( !JS_IsUndefined_0(a17, a18) )
{
v37 = v49;
v38 = v50;
v39 = js_int64(i);
v40 = v33;
v41 = v53;
v42 = v54;
v49 = (_DWORD *)JS_Call(v52, a17, a18, a19, a20, 3, (long long)&v37);
v50 = v34;
JS_FreeValue(v52, (long long)v37, v38);
JS_FreeValue(v52, v39, v40);
if ( JS_IsException_1((long long)v49, v50) )
return -1LL;
}
if ( a16 <= 0 )
break;
IsArray = JS_IsArray(v52, (long long)v49, v50);
if ( IsArray < 0 )
goto LABEL_24;
if ( !IsArray )
break;
if ( (int)js_get_length64(v52, &v47, (int)v49, v50) < 0 )
goto LABEL_24;
a15 = JS_FlattenIntoArray(v52, v55, v56, (_DWORD)v49, v50, v47, a15, a16 - 1, 0, 3);
if ( a15 < 0 )
goto LABEL_24;
JS_FreeValue(v52, (long long)v49, v50);
LABEL_22:
;
}
if ( a15 < 0x1FFFFFFFFFFFFFLL )
{
if ( (int)JS_DefinePropertyValueInt64(
v52,
v55,
v56,
a15,
v49,
v50,
a7,
a8,
a9,
a10,
*(double *)v31.m128_u64,
*(double *)v32.m128_u64,
a13,
a14,
16391) < 0 )
return -1LL;
++a15;
goto LABEL_22;
}
JS_ThrowTypeError(v52, (long long)"Array too long", v27, v28, v29, v30, a7, a8, a9, a10, v31, v32, a13, a14, v36);
LABEL_24:
JS_FreeValue(v52, (long long)v49, v50);
return -1LL;
}
| JS_FlattenIntoArray:
PUSH RBX
SUB RSP,0x120
LEA RAX,[RSP + 0x150]
MOV qword ptr [RSP + 0x30],RAX
LEA RAX,[RSP + 0x140]
MOV qword ptr [RSP + 0x38],RAX
MOV EAX,dword ptr [RSP + 0x138]
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x108],RSI
MOV qword ptr [RSP + 0x110],RDX
MOV qword ptr [RSP + 0xf8],RCX
MOV qword ptr [RSP + 0x100],R8
MOV qword ptr [RSP + 0xf0],RDI
MOV qword ptr [RSP + 0xe8],R9
MOV RAX,qword ptr [RSP + 0xf0]
MOV RDI,qword ptr [RAX + 0x18]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0014dce0
CMP EAX,0x0
JZ 0x001cecc9
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x001601e0
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xb8],RDX
MOV qword ptr [RSP + 0x118],-0x1
JMP 0x001cf0cc
LAB_001cecc9:
MOV qword ptr [RSP + 0xd0],0x0
LAB_001cecd5:
MOV RAX,qword ptr [RSP + 0xd0]
CMP RAX,qword ptr [RSP + 0xe8]
JGE 0x001cf091
MOV RDI,qword ptr [RSP + 0xf0]
MOV RCX,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x100]
LEA R8,[RSP + 0xd8]
CALL 0x00187ba0
MOV dword ptr [RSP + 0xc4],EAX
CMP dword ptr [RSP + 0xc4],0x0
JGE 0x001ced3a
MOV qword ptr [RSP + 0x118],-0x1
JMP 0x001cf0cc
LAB_001ced3a:
CMP dword ptr [RSP + 0xc4],0x0
JNZ 0x001ced49
JMP 0x001cf078
LAB_001ced49:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012e260
CMP EAX,0x0
JNZ 0x001cee82
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00137480
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x98],RDX
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xf0]
LEA RAX,[RSP + 0x80]
MOV RSI,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x8]
MOV R9D,0x3
MOV qword ptr [RSP],RAX
CALL 0x0013a050
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],RDX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xe0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001cee80
MOV qword ptr [RSP + 0x118],-0x1
JMP 0x001cf0cc
LAB_001cee80:
JMP 0x001cee82
LAB_001cee82:
CMP dword ptr [RSP + 0x138],0x0
JLE 0x001cefdc
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00139ba0
MOV dword ptr [RSP + 0xc0],EAX
CMP dword ptr [RSP + 0xc0],0x0
JGE 0x001ceec3
JMP 0x001cf0a3
LAB_001ceec3:
CMP dword ptr [RSP + 0xc0],0x0
JZ 0x001cefda
MOV RDI,qword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xe0]
LEA RSI,[RSP + 0xc8]
CALL 0x0012df60
CMP EAX,0x0
JGE 0x001cef00
JMP 0x001cf0a3
LAB_001cef00:
MOV RDI,qword ptr [RSP + 0xf0]
MOV R9,qword ptr [RSP + 0xc8]
MOV RBX,qword ptr [RSP + 0x130]
MOV R11D,dword ptr [RSP + 0x138]
SUB R11D,0x1
MOV dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x3
MOV dword ptr [RSP + 0x50],0x0
MOV qword ptr [RSP + 0x58],0x3
MOV RSI,qword ptr [RSP + 0x108]
MOV RDX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RSP + 0xd8]
MOV R8,qword ptr [RSP + 0xe0]
LEA R10,[RSP + 0x60]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP],RBX
MOV dword ptr [RSP + 0x8],R11D
MOV R11,qword ptr [R10]
MOV qword ptr [RSP + 0x10],R11
MOV R10,qword ptr [R10 + 0x8]
MOV qword ptr [RSP + 0x18],R10
MOV R10,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],R10
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x001cec20
MOV qword ptr [RSP + 0x130],RAX
CMP qword ptr [RSP + 0x130],0x0
JGE 0x001cefb8
JMP 0x001cf0a3
LAB_001cefb8:
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
JMP 0x001cf078
LAB_001cefda:
JMP 0x001cefdc
LAB_001cefdc:
MOV RAX,0x1fffffffffffff
CMP qword ptr [RSP + 0x130],RAX
JL 0x001cf015
MOV RDI,qword ptr [RSP + 0xf0]
LEA RSI,[0x210e43]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
JMP 0x001cf0a3
LAB_001cf015:
MOV RDI,qword ptr [RSP + 0xf0]
MOV RCX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RSP + 0x108]
MOV RDX,qword ptr [RSP + 0x110]
MOV R8,qword ptr [RSP + 0xd8]
MOV R9,qword ptr [RSP + 0xe0]
MOV dword ptr [RSP],0x4007
CALL 0x001373f0
CMP EAX,0x0
JGE 0x001cf064
MOV qword ptr [RSP + 0x118],-0x1
JMP 0x001cf0cc
LAB_001cf064:
MOV RAX,qword ptr [RSP + 0x130]
ADD RAX,0x1
MOV qword ptr [RSP + 0x130],RAX
LAB_001cf078:
MOV RAX,qword ptr [RSP + 0xd0]
ADD RAX,0x1
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x001cecd5
LAB_001cf091:
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x118],RAX
JMP 0x001cf0cc
LAB_001cf0a3:
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV qword ptr [RSP + 0x118],-0x1
LAB_001cf0cc:
MOV RAX,qword ptr [RSP + 0x118]
ADD RSP,0x120
POP RBX
RET
|
long JS_FlattenIntoArray(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,long param_6,long param_7,int param_8,int8 param_9,
int8 param_10,int8 param_11,int8 param_12)
{
int iVar1;
int1 auVar2 [16];
long in_stack_fffffffffffffed8;
int1 *puVar3;
int4 uVar4;
uint uStack_d4;
uint uStack_c4;
int1 local_a8 [16];
int1 local_98 [16];
int8 local_88;
int8 local_80;
int local_68;
int local_64;
int8 local_60;
long local_58;
int1 local_50 [16];
long local_40;
long local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
long local_10;
local_40 = param_6;
local_38 = param_1;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
iVar1 = js_check_stack_overflow(*(int8 *)(param_1 + 0x18),0);
if (iVar1 == 0) {
for (local_58 = 0; local_58 < local_40; local_58 = local_58 + 1) {
local_64 = JS_TryGetPropertyInt64(local_38,local_30,local_28,local_58,local_50);
uVar4 = (int4)((ulong)in_stack_fffffffffffffed8 >> 0x20);
if (local_64 < 0) {
return -1;
}
if (local_64 != 0) {
iVar1 = JS_IsUndefined(param_9,param_10);
if (iVar1 == 0) {
local_a8 = local_50;
auVar2 = js_int64(local_58);
local_88 = local_30;
local_80 = local_28;
puVar3 = local_a8;
local_98 = auVar2;
auVar2 = JS_Call(local_38,param_9,param_10,param_11,param_12,3,puVar3);
uVar4 = (int4)((ulong)puVar3 >> 0x20);
local_50 = auVar2;
JS_FreeValue(local_38,local_a8._0_8_,local_a8._8_8_);
JS_FreeValue(local_38,local_98._0_8_,local_98._8_8_);
iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_);
if (iVar1 != 0) {
return -1;
}
}
if (0 < param_8) {
local_68 = JS_IsArray(local_38,local_50._0_8_,local_50._8_8_);
if (local_68 < 0) goto LAB_001cf0a3;
if (local_68 != 0) {
iVar1 = js_get_length64(local_38,&local_60,local_50._0_8_,local_50._8_8_);
if (iVar1 < 0) goto LAB_001cf0a3;
in_stack_fffffffffffffed8 = param_7;
param_7 = JS_FlattenIntoArray(local_38,local_20,local_18,local_50._0_8_,local_50._8_8_,
local_60,param_7,param_8 + -1,(ulong)uStack_c4 << 0x20,3,
(ulong)uStack_d4 << 0x20,3);
if (param_7 < 0) goto LAB_001cf0a3;
JS_FreeValue(local_38,local_50._0_8_,local_50._8_8_);
goto LAB_001cf078;
}
}
if (0x1ffffffffffffe < param_7) {
JS_ThrowTypeError(local_38,"Array too long");
LAB_001cf0a3:
JS_FreeValue(local_38,local_50._0_8_,local_50._8_8_);
return -1;
}
in_stack_fffffffffffffed8 = CONCAT44(uVar4,0x4007);
iVar1 = JS_DefinePropertyValueInt64
(local_38,local_20,local_18,param_7,local_50._0_8_,local_50._8_8_,
in_stack_fffffffffffffed8);
if (iVar1 < 0) {
return -1;
}
param_7 = param_7 + 1;
}
LAB_001cf078:
}
local_10 = param_7;
}
else {
JS_ThrowStackOverflow(local_38);
local_10 = -1;
}
return local_10;
}
| |
23,833 | JS_FlattenIntoArray | bluesky950520[P]quickjs/quickjs.c | static int64_t JS_FlattenIntoArray(JSContext *ctx, JSValue target,
JSValue source, int64_t sourceLen,
int64_t targetIndex, int depth,
JSValue mapperFunction,
JSValue thisArg)
{
JSValue element;
int64_t sourceIndex, elementLen;
int present, is_array;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
return -1;
}
for (sourceIndex = 0; sourceIndex < sourceLen; sourceIndex++) {
present = JS_TryGetPropertyInt64(ctx, source, sourceIndex, &element);
if (present < 0)
return -1;
if (!present)
continue;
if (!JS_IsUndefined(mapperFunction)) {
JSValue args[3] = { element, js_int64(sourceIndex), source };
element = JS_Call(ctx, mapperFunction, thisArg, 3, args);
JS_FreeValue(ctx, args[0]);
JS_FreeValue(ctx, args[1]);
if (JS_IsException(element))
return -1;
}
if (depth > 0) {
is_array = JS_IsArray(ctx, element);
if (is_array < 0)
goto fail;
if (is_array) {
if (js_get_length64(ctx, &elementLen, element) < 0)
goto fail;
targetIndex = JS_FlattenIntoArray(ctx, target, element,
elementLen, targetIndex,
depth - 1,
JS_UNDEFINED, JS_UNDEFINED);
if (targetIndex < 0)
goto fail;
JS_FreeValue(ctx, element);
continue;
}
}
if (targetIndex >= MAX_SAFE_INTEGER) {
JS_ThrowTypeError(ctx, "Array too long");
goto fail;
}
if (JS_DefinePropertyValueInt64(ctx, target, targetIndex, element,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
return -1;
targetIndex++;
}
return targetIndex;
fail:
JS_FreeValue(ctx, element);
return -1;
} | O1 | c | JS_FlattenIntoArray:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, -0x80(%rbp)
movq %rcx, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdi, %r12
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x7848c
leaq 0x26b60(%rip), %rsi # 0x9efd6
movq %r12, %rdi
xorl %eax, %eax
callq 0x20add
movq $-0x1, %r13
jmp 0x787b0
movq %r9, %r15
movq 0x10(%rbp), %rbx
testq %r9, %r9
jle 0x78784
leaq 0x30(%rbp), %rax
leaq 0x20(%rbp), %rcx
movl 0x18(%rbp), %edx
movq (%rcx), %rsi
movq %rsi, -0xd0(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0xc8(%rbp)
movl %ecx, %ecx
movq %rcx, -0xd8(%rbp)
movq (%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
leal -0x1(%rdx), %eax
movl %eax, -0x54(%rbp)
xorl %r14d, %r14d
movq %r12, -0x30(%rbp)
movq %r15, -0x60(%rbp)
movq %r12, %rdi
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %r14, %rcx
leaq -0x50(%rbp), %r8
callq 0x4d6d1
movq $-0x1, %r13
testl %eax, %eax
js 0x787b0
je 0x78773
movq %rbx, -0x38(%rbp)
cmpl $0x3, -0xd8(%rbp)
je 0x7861d
movaps -0x50(%rbp), %xmm0
movaps %xmm0, -0xb0(%rbp)
movq %r14, %rax
shrq $0x1f, %rax
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movl %r14d, %ecx
movq %xmm0, %rdx
cmoveq %rcx, %rdx
movl $0x7, %ecx
cmovneq %rcx, %rax
movq %rdx, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x110(%rbp)
movq $0x3, -0x108(%rbp)
movups -0x110(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0xb0(%rbp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %r12, %rdi
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq -0xb8(%rbp), %r8
movl $0x3, %r9d
callq 0x284ca
movq %rdx, %rbx
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq 0x18(%r12), %rdi
callq 0x1d8c6
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq 0x18(%r12), %rdi
callq 0x1d8c6
cmpl $0x6, %ebx
je 0x787b0
movl 0x18(%rbp), %eax
testl %eax, %eax
jle 0x786fd
movq -0x50(%rbp), %r15
movq -0x48(%rbp), %rbx
movq -0x30(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x282d2
testl %eax, %eax
js 0x7879e
je 0x786fd
movq -0x30(%rbp), %r12
movq %r12, %rdi
leaq -0xe0(%rbp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22adc
testl %eax, %eax
js 0x7879e
movq -0xe0(%rbp), %r9
xorl %eax, %eax
movl %eax, -0x100(%rbp)
movl $0x3, %ecx
movq %rcx, -0xf8(%rbp)
movl %eax, -0xf0(%rbp)
movq %rcx, -0xe8(%rbp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x20(%rsp)
movups -0x100(%rbp), %xmm0
movups %xmm0, 0x10(%rsp)
movl -0x54(%rbp), %eax
movl %eax, 0x8(%rsp)
movq -0x38(%rbp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x7843b
movq %rax, -0x38(%rbp)
testq %rax, %rax
js 0x7879e
movq 0x18(%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1d8c6
movq -0x60(%rbp), %r15
movq -0x38(%rbp), %rbx
jmp 0x78773
movq -0x38(%rbp), %rbx
movabsq $0x1fffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFF
cmpq %rax, %rbx
jge 0x78789
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
movq %xmm0, %rcx
movaps -0x50(%rbp), %xmm0
movslq %ebx, %rax
cmpq %rbx, %rax
movl %eax, %eax
cmoveq %rax, %rcx
movaps %xmm0, -0xb0(%rbp)
movl $0x7, %r8d
movl $0x0, %eax
cmoveq %rax, %r8
movaps -0xb0(%rbp), %xmm0
movups %xmm0, (%rsp)
movq -0x30(%rbp), %r12
movq %r12, %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl $0x4007, %r9d # imm = 0x4007
callq 0x26b2d
testl %eax, %eax
movq -0x60(%rbp), %r15
js 0x787b0
incq %rbx
incq %r14
movq %rbx, %r13
cmpq %r14, %r15
jne 0x784eb
jmp 0x787b0
movq %rbx, %r13
jmp 0x787b0
leaq 0x29638(%rip), %rsi # 0xa1dc8
movq -0x30(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x22567
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x18(%r12), %rdi
callq 0x1d8c6
movq %r13, %rax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_FlattenIntoArray:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov [rbp+var_80], r8
mov [rbp+var_78], rcx
mov [rbp+var_70], rdx
mov [rbp+var_68], rsi
mov r12, rdi
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_7848C
lea rsi, aMaximumCallSta; "Maximum call stack size exceeded"
mov rdi, r12
xor eax, eax
call JS_ThrowRangeError
mov r13, 0FFFFFFFFFFFFFFFFh
jmp loc_787B0
loc_7848C:
mov r15, r9
mov rbx, [rbp+arg_0]
test r9, r9
jle loc_78784
lea rax, [rbp+arg_20]
lea rcx, [rbp+arg_10]
mov edx, [rbp+arg_8]
mov rsi, [rcx]
mov [rbp+var_D0], rsi
mov rcx, [rcx+8]
mov [rbp+var_C8], rcx
mov ecx, ecx
mov [rbp+var_D8], rcx
mov rcx, [rax]
mov [rbp+var_C0], rcx
mov rax, [rax+8]
mov [rbp+var_B8], rax
lea eax, [rdx-1]
mov [rbp+var_54], eax
xor r14d, r14d
mov [rbp+var_30], r12
mov [rbp+var_60], r15
loc_784EB:
mov rdi, r12
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_80]
mov rcx, r14
lea r8, [rbp+var_50]
call JS_TryGetPropertyInt64
mov r13, 0FFFFFFFFFFFFFFFFh
test eax, eax
js loc_787B0
jz loc_78773
mov [rbp+var_38], rbx
cmp dword ptr [rbp+var_D8], 3
jz loc_7861D
movaps xmm0, [rbp+var_50]
movaps [rbp+var_B0], xmm0
mov rax, r14
shr rax, 1Fh
xorps xmm0, xmm0
cvtsi2sd xmm0, r14
mov ecx, r14d
movq rdx, xmm0
cmovz rdx, rcx
mov ecx, 7
cmovnz rax, rcx
mov [rbp+var_A0], rdx
mov [rbp+var_98], rax
mov rax, [rbp+var_78]
mov [rbp+var_90], rax
mov rax, [rbp+var_80]
mov [rbp+var_88], rax
mov dword ptr [rbp+var_110], 0
mov qword ptr [rbp+var_110+8], 3
movups xmm0, [rbp+var_110]
movups [rsp+140h+var_140], xmm0
lea rax, [rbp+var_B0]
mov qword ptr [rsp+140h+var_130], rax
mov dword ptr [rsp+140h+var_130+8], 2
mov rdi, r12
mov rsi, [rbp+var_D0]
mov rdx, [rbp+var_C8]
mov rcx, [rbp+var_C0]
mov r8, [rbp+var_B8]
mov r9d, 3
call JS_CallInternal
mov rbx, rdx
mov qword ptr [rbp+var_50], rax
mov qword ptr [rbp+var_50+8], rdx
mov rsi, qword ptr [rbp+var_B0]
mov rdx, qword ptr [rbp+var_B0+8]
mov rdi, [r12+18h]
call JS_FreeValueRT
mov rsi, [rbp+var_A0]
mov rdx, [rbp+var_98]
mov rdi, [r12+18h]
call JS_FreeValueRT
cmp ebx, 6
jz loc_787B0
loc_7861D:
mov eax, [rbp+arg_8]
test eax, eax
jle loc_786FD
mov r15, qword ptr [rbp+var_50]
mov rbx, qword ptr [rbp+var_50+8]
mov r12, [rbp+var_30]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call JS_IsArray
test eax, eax
js loc_7879E
jz loc_786FD
mov r12, [rbp+var_30]
mov rdi, r12
lea rsi, [rbp+var_E0]
mov rdx, r15
mov rcx, rbx
call js_get_length64
test eax, eax
js loc_7879E
mov r9, [rbp+var_E0]
xor eax, eax
mov dword ptr [rbp+var_100], eax
mov ecx, 3
mov qword ptr [rbp+var_100+8], rcx
mov dword ptr [rbp+var_F0], eax
mov qword ptr [rbp+var_F0+8], rcx
movups xmm0, [rbp+var_F0]
movups [rsp+140h+var_120], xmm0
movups xmm0, [rbp+var_100]
movups [rsp+140h+var_130], xmm0
mov eax, [rbp+var_54]
mov dword ptr [rsp+140h+var_140+8], eax
mov rax, [rbp+var_38]
mov qword ptr [rsp+140h+var_140], rax
mov rdi, r12
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_70]
mov rcx, r15
mov r8, rbx
call JS_FlattenIntoArray
mov [rbp+var_38], rax
test rax, rax
js loc_7879E
mov rdi, [r12+18h]
mov rsi, r15
mov rdx, rbx
call JS_FreeValueRT
mov r15, [rbp+var_60]
mov rbx, [rbp+var_38]
jmp short loc_78773
loc_786FD:
mov rbx, [rbp+var_38]
mov rax, 1FFFFFFFFFFFFFh
cmp rbx, rax
jge short loc_78789
xorps xmm0, xmm0
cvtsi2sd xmm0, rbx
movq rcx, xmm0
movaps xmm0, [rbp+var_50]
movsxd rax, ebx
cmp rax, rbx
mov eax, eax
cmovz rcx, rax
movaps [rbp+var_B0], xmm0
mov r8d, 7
mov eax, 0
cmovz r8, rax
movaps xmm0, [rbp+var_B0]
movups [rsp+140h+var_140], xmm0
mov r12, [rbp+var_30]
mov rdi, r12
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_70]
mov r9d, 4007h
call JS_DefinePropertyValueValue
test eax, eax
mov r15, [rbp+var_60]
js short loc_787B0
inc rbx
loc_78773:
inc r14
mov r13, rbx
cmp r15, r14
jnz loc_784EB
jmp short loc_787B0
loc_78784:
mov r13, rbx
jmp short loc_787B0
loc_78789:
lea rsi, aArrayTooLong; "Array too long"
mov r12, [rbp+var_30]
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
loc_7879E:
mov rsi, qword ptr [rbp+var_50]
mov rdx, qword ptr [rbp+var_50+8]
mov rdi, [r12+18h]
call JS_FreeValueRT
loc_787B0:
mov rax, r13
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_FlattenIntoArray(
long long a1,
unsigned long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long a15,
int a16,
long long a17,
long long a18,
long long a19,
long long a20)
{
long long v20; // r12
long long v21; // r13
long long v22; // r15
long long v23; // rbx
unsigned long long v24; // r14
int PropertyInt64; // eax
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
long long v29; // r9
__m128 v30; // xmm4
__m128 v31; // xmm5
long long v32; // rax
double v33; // rdx
__int128 v34; // rax
int v35; // ebx
__int128 v36; // kr00_16
int IsArray; // eax
long long v38; // rbx
double v39; // rcx
long long v40; // r8
int v41; // eax
char v43; // [rsp+0h] [rbp-140h]
__m128 v44; // [rsp+30h] [rbp-110h]
__m128 v45; // [rsp+40h] [rbp-100h]
long long v46; // [rsp+60h] [rbp-E0h] BYREF
long long v47; // [rsp+68h] [rbp-D8h]
long long v48; // [rsp+70h] [rbp-D0h]
long long v49; // [rsp+78h] [rbp-C8h]
long long v50; // [rsp+80h] [rbp-C0h]
long long v51; // [rsp+88h] [rbp-B8h]
__m128 v52; // [rsp+90h] [rbp-B0h] BYREF
double v53; // [rsp+A0h] [rbp-A0h]
long long v54; // [rsp+A8h] [rbp-98h]
long long v55; // [rsp+B0h] [rbp-90h]
long long v56; // [rsp+B8h] [rbp-88h]
long long v57; // [rsp+C0h] [rbp-80h]
long long v58; // [rsp+C8h] [rbp-78h]
long long v59; // [rsp+D0h] [rbp-70h]
unsigned long long v60; // [rsp+D8h] [rbp-68h]
long long v61; // [rsp+E0h] [rbp-60h]
int v62; // [rsp+ECh] [rbp-54h]
__int128 v63; // [rsp+F0h] [rbp-50h] BYREF
long long v64; // [rsp+108h] [rbp-38h]
long long v65; // [rsp+110h] [rbp-30h]
long long savedregs; // [rsp+140h] [rbp+0h] BYREF
v57 = a5;
v58 = a4;
v59 = a3;
v60 = a2;
v20 = a1;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs )
{
v22 = a6;
v23 = a15;
if ( a6 <= 0 )
{
return a15;
}
else
{
v48 = a17;
v49 = a18;
v47 = (unsigned int)a18;
v50 = a19;
v51 = a20;
v62 = a16 - 1;
v24 = 0LL;
v65 = a1;
v61 = a6;
do
{
PropertyInt64 = JS_TryGetPropertyInt64(v20, v58, v57, v24, (long long)&v63);
v21 = -1LL;
if ( PropertyInt64 < 0 )
break;
if ( PropertyInt64 )
{
v64 = v23;
if ( (_DWORD)v47 != 3 )
{
v52 = (__m128)v63;
v32 = v24 >> 31;
v33 = (double)(int)v24;
if ( v24 >> 31 )
v32 = 7LL;
else
*(_QWORD *)&v33 = (unsigned int)v24;
v53 = v33;
v54 = v32;
v55 = v58;
v56 = v57;
v44.m128_i32[0] = 0;
v44.m128_u64[1] = 3LL;
a7 = v44;
*(_QWORD *)&v34 = JS_CallInternal(
v20,
v48,
v49,
v50,
v51,
3LL,
v44,
a8,
a9,
a10,
v30,
v31,
a13,
a14,
v44.m128_i8[0],
3,
(long long)&v52,
2u);
v35 = DWORD2(v34);
v63 = v34;
JS_FreeValueRT(*(_QWORD *)(v20 + 24), v52.m128_u64[0], v52.m128_i64[1]);
JS_FreeValueRT(*(_QWORD *)(v20 + 24), *(_DWORD **)&v53, v54);
if ( v35 == 6 )
return v21;
}
if ( a16 <= 0 )
goto LABEL_18;
v36 = v63;
v20 = v65;
IsArray = JS_IsArray(v65, v63, SDWORD2(v63));
if ( IsArray < 0 )
goto LABEL_29;
if ( IsArray )
{
v20 = v65;
if ( (int)js_get_length64(v65, &v46, v36, SDWORD2(v36)) < 0 )
goto LABEL_29;
v45.m128_i32[0] = 0;
v45.m128_u64[1] = 3LL;
a7 = v45;
v64 = JS_FlattenIntoArray(v20, v60, v59, v36, DWORD2(v36), v46, v64, v62, 0, 3);
if ( v64 < 0 )
goto LABEL_29;
JS_FreeValueRT(*(_QWORD *)(v20 + 24), (_DWORD *)v36, *((long long *)&v36 + 1));
v22 = v61;
v23 = v64;
}
else
{
LABEL_18:
v38 = v64;
if ( v64 >= 0x1FFFFFFFFFFFFFLL )
{
v20 = v65;
JS_ThrowTypeError(
v65,
(long long)"Array too long",
v26,
v27,
v28,
v29,
a7,
a8,
a9,
a10,
v30,
v31,
a13,
a14,
v43);
LABEL_29:
JS_FreeValueRT(*(_QWORD *)(v20 + 24), (_DWORD *)v63, *((long long *)&v63 + 1));
return v21;
}
v39 = (double)(int)v64;
if ( (int)v64 == v64 )
*(_QWORD *)&v39 = (unsigned int)v64;
v52 = (__m128)v63;
v40 = 7LL;
if ( (int)v64 == v64 )
v40 = 0LL;
a7 = v52;
v20 = v65;
v41 = JS_DefinePropertyValueValue(
v65,
v60,
v59,
*(_DWORD **)&v39,
v40,
16391,
*(double *)v52.m128_u64,
a8,
a9,
a10,
*(double *)v30.m128_u64,
*(double *)v31.m128_u64,
a13,
a14,
v52.m128_u64[0],
v52.m128_i64[1]);
v22 = v61;
if ( v41 < 0 )
return v21;
v23 = v38 + 1;
}
}
++v24;
v21 = v23;
}
while ( v22 != v24 );
}
}
else
{
JS_ThrowRangeError(
a1,
(long long)"Maximum call stack size exceeded",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v43);
return -1LL;
}
return v21;
}
| JS_FlattenIntoArray:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV qword ptr [RBP + -0x80],R8
MOV qword ptr [RBP + -0x78],RCX
MOV qword ptr [RBP + -0x70],RDX
MOV qword ptr [RBP + -0x68],RSI
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x0017848c
LEA RSI,[0x19efd6]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00120add
MOV R13,-0x1
JMP 0x001787b0
LAB_0017848c:
MOV R15,R9
MOV RBX,qword ptr [RBP + 0x10]
TEST R9,R9
JLE 0x00178784
LEA RAX,[RBP + 0x30]
LEA RCX,[RBP + 0x20]
MOV EDX,dword ptr [RBP + 0x18]
MOV RSI,qword ptr [RCX]
MOV qword ptr [RBP + -0xd0],RSI
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0xc8],RCX
MOV ECX,ECX
MOV qword ptr [RBP + -0xd8],RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc0],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xb8],RAX
LEA EAX,[RDX + -0x1]
MOV dword ptr [RBP + -0x54],EAX
XOR R14D,R14D
MOV qword ptr [RBP + -0x30],R12
MOV qword ptr [RBP + -0x60],R15
LAB_001784eb:
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x80]
MOV RCX,R14
LEA R8,[RBP + -0x50]
CALL 0x0014d6d1
MOV R13,-0x1
TEST EAX,EAX
JS 0x001787b0
JZ 0x00178773
MOV qword ptr [RBP + -0x38],RBX
CMP dword ptr [RBP + -0xd8],0x3
JZ 0x0017861d
MOVAPS XMM0,xmmword ptr [RBP + -0x50]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOV RAX,R14
SHR RAX,0x1f
XORPS XMM0,XMM0
CVTSI2SD XMM0,R14
MOV ECX,R14D
MOVQ RDX,XMM0
CMOVZ RDX,RCX
MOV ECX,0x7
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0xa0],RDX
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x110],0x0
MOV qword ptr [RBP + -0x108],0x3
MOVUPS XMM0,xmmword ptr [RBP + -0x110]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RBP + -0xb0]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RBP + -0xc0]
MOV R8,qword ptr [RBP + -0xb8]
MOV R9D,0x3
CALL 0x001284ca
MOV RBX,RDX
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],RDX
MOV RSI,qword ptr [RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0xa8]
MOV RDI,qword ptr [R12 + 0x18]
CALL 0x0011d8c6
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [R12 + 0x18]
CALL 0x0011d8c6
CMP EBX,0x6
JZ 0x001787b0
LAB_0017861d:
MOV EAX,dword ptr [RBP + 0x18]
TEST EAX,EAX
JLE 0x001786fd
MOV R15,qword ptr [RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0x30]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL 0x001282d2
TEST EAX,EAX
JS 0x0017879e
JZ 0x001786fd
MOV R12,qword ptr [RBP + -0x30]
MOV RDI,R12
LEA RSI,[RBP + -0xe0]
MOV RDX,R15
MOV RCX,RBX
CALL 0x00122adc
TEST EAX,EAX
JS 0x0017879e
MOV R9,qword ptr [RBP + -0xe0]
XOR EAX,EAX
MOV dword ptr [RBP + -0x100],EAX
MOV ECX,0x3
MOV qword ptr [RBP + -0xf8],RCX
MOV dword ptr [RBP + -0xf0],EAX
MOV qword ptr [RBP + -0xe8],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0xf0]
MOVUPS xmmword ptr [RSP + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [RBP + -0x100]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RSP + 0x8],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RSP],RAX
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,R15
MOV R8,RBX
CALL 0x0017843b
MOV qword ptr [RBP + -0x38],RAX
TEST RAX,RAX
JS 0x0017879e
MOV RDI,qword ptr [R12 + 0x18]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011d8c6
MOV R15,qword ptr [RBP + -0x60]
MOV RBX,qword ptr [RBP + -0x38]
JMP 0x00178773
LAB_001786fd:
MOV RBX,qword ptr [RBP + -0x38]
MOV RAX,0x1fffffffffffff
CMP RBX,RAX
JGE 0x00178789
XORPS XMM0,XMM0
CVTSI2SD XMM0,RBX
MOVQ RCX,XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0x50]
MOVSXD RAX,EBX
CMP RAX,RBX
MOV EAX,EAX
CMOVZ RCX,RAX
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOV R8D,0x7
MOV EAX,0x0
CMOVZ R8,RAX
MOVAPS XMM0,xmmword ptr [RBP + -0xb0]
MOVUPS xmmword ptr [RSP],XMM0
MOV R12,qword ptr [RBP + -0x30]
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
MOV R9D,0x4007
CALL 0x00126b2d
TEST EAX,EAX
MOV R15,qword ptr [RBP + -0x60]
JS 0x001787b0
INC RBX
LAB_00178773:
INC R14
MOV R13,RBX
CMP R15,R14
JNZ 0x001784eb
JMP 0x001787b0
LAB_00178784:
MOV R13,RBX
JMP 0x001787b0
LAB_00178789:
LEA RSI,[0x1a1dc8]
MOV R12,qword ptr [RBP + -0x30]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00122567
LAB_0017879e:
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [R12 + 0x18]
CALL 0x0011d8c6
LAB_001787b0:
MOV RAX,R13
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong JS_FlattenIntoArray(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,ulong param_6,ulong param_7,int param_8,
int8 param_9,ulong param_10,int8 param_11,int8 param_12)
{
int8 uVar1;
int iVar2;
double dVar3;
int8 uVar4;
long lVar5;
ulong uVar6;
bool bVar7;
int1 auVar8 [16];
uint uStack_114;
uint uStack_104;
uint uStack_f4;
int8 local_e8;
ulong local_e0;
int8 local_d8;
ulong local_d0;
int8 local_c8;
int8 local_c0;
int1 local_b8 [16];
double local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
ulong local_68;
int local_5c;
int1 local_58 [16];
ulong local_40;
long local_38;
local_88 = param_5;
local_80 = param_4;
local_78 = param_3;
local_70 = param_2;
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowRangeError(param_1,"Maximum call stack size exceeded");
param_7 = 0xffffffffffffffff;
}
else if (0 < (long)param_6) {
local_d8 = param_9;
local_d0 = param_10;
local_e0 = param_10 & 0xffffffff;
local_c8 = param_11;
local_c0 = param_12;
local_5c = param_8 + -1;
uVar6 = 0;
local_68 = param_6;
local_38 = param_1;
do {
iVar2 = JS_TryGetPropertyInt64(param_1,local_80,local_88,uVar6,local_58);
if (iVar2 < 0) {
return 0xffffffffffffffff;
}
if (iVar2 != 0) {
local_40 = param_7;
if ((int)local_e0 != 3) {
local_a8 = (double)(long)uVar6;
if (uVar6 >> 0x1f == 0) {
local_a0 = 0;
local_a8 = (double)(uVar6 & 0xffffffff);
}
else {
local_a0 = 7;
}
local_98 = local_80;
local_90 = local_88;
local_b8 = local_58;
auVar8 = JS_CallInternal(param_1,local_d8,local_d0,local_c8,local_c0,3,
(ulong)uStack_114 << 0x20,3,local_b8,2);
local_58 = auVar8;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_b8._0_8_,local_b8._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_a8,local_a0);
if (auVar8._8_4_ == 6) {
return 0xffffffffffffffff;
}
}
lVar5 = local_38;
uVar1 = local_58._8_8_;
uVar4 = local_58._0_8_;
if (0 < param_8) {
iVar2 = JS_IsArray(local_38,local_58._0_8_,local_58._8_8_);
param_1 = local_38;
if (iVar2 < 0) goto LAB_0017879e;
if (iVar2 != 0) {
iVar2 = js_get_length64(local_38,&local_e8,uVar4,uVar1);
lVar5 = param_1;
if (iVar2 < 0) goto LAB_0017879e;
local_40 = JS_FlattenIntoArray(param_1,local_70,local_78,uVar4,uVar1,local_e8,local_40,
local_5c,(ulong)uStack_104 << 0x20,3,
(ulong)uStack_f4 << 0x20,3);
if ((long)local_40 < 0) goto LAB_0017879e;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar1);
param_7 = local_40;
param_6 = local_68;
goto LAB_00178773;
}
}
param_1 = local_38;
param_7 = local_40;
if (0x1ffffffffffffe < (long)local_40) {
JS_ThrowTypeError(local_38,"Array too long");
lVar5 = param_1;
LAB_0017879e:
JS_FreeValueRT(*(int8 *)(lVar5 + 0x18),local_58._0_8_,local_58._8_8_);
return 0xffffffffffffffff;
}
bVar7 = (long)(int)local_40 == local_40;
dVar3 = (double)(long)local_40;
if (bVar7) {
dVar3 = (double)(local_40 & 0xffffffff);
}
uVar4 = 7;
if (bVar7) {
uVar4 = 0;
}
local_b8._8_4_ = local_58._8_4_;
auVar8 = local_58;
iVar2 = JS_DefinePropertyValueValue
(local_38,local_70,local_78,dVar3,uVar4,0x4007,local_58._0_8_,
local_b8._8_4_);
local_b8 = auVar8;
if (iVar2 < 0) {
return 0xffffffffffffffff;
}
param_7 = param_7 + 1;
param_6 = local_68;
}
LAB_00178773:
uVar6 = uVar6 + 1;
} while (param_6 != uVar6);
}
return param_7;
}
| |
23,834 | JS_FlattenIntoArray | bluesky950520[P]quickjs/quickjs.c | static int64_t JS_FlattenIntoArray(JSContext *ctx, JSValue target,
JSValue source, int64_t sourceLen,
int64_t targetIndex, int depth,
JSValue mapperFunction,
JSValue thisArg)
{
JSValue element;
int64_t sourceIndex, elementLen;
int present, is_array;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
return -1;
}
for (sourceIndex = 0; sourceIndex < sourceLen; sourceIndex++) {
present = JS_TryGetPropertyInt64(ctx, source, sourceIndex, &element);
if (present < 0)
return -1;
if (!present)
continue;
if (!JS_IsUndefined(mapperFunction)) {
JSValue args[3] = { element, js_int64(sourceIndex), source };
element = JS_Call(ctx, mapperFunction, thisArg, 3, args);
JS_FreeValue(ctx, args[0]);
JS_FreeValue(ctx, args[1]);
if (JS_IsException(element))
return -1;
}
if (depth > 0) {
is_array = JS_IsArray(ctx, element);
if (is_array < 0)
goto fail;
if (is_array) {
if (js_get_length64(ctx, &elementLen, element) < 0)
goto fail;
targetIndex = JS_FlattenIntoArray(ctx, target, element,
elementLen, targetIndex,
depth - 1,
JS_UNDEFINED, JS_UNDEFINED);
if (targetIndex < 0)
goto fail;
JS_FreeValue(ctx, element);
continue;
}
}
if (targetIndex >= MAX_SAFE_INTEGER) {
JS_ThrowTypeError(ctx, "Array too long");
goto fail;
}
if (JS_DefinePropertyValueInt64(ctx, target, targetIndex, element,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
return -1;
targetIndex++;
}
return targetIndex;
fail:
JS_FreeValue(ctx, element);
return -1;
} | O2 | c | JS_FlattenIntoArray:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, -0x68(%rbp)
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x651f3
movq %rbx, %rdi
callq 0x35d91
jmp 0x65453
movq %r9, %r13
leaq 0x30(%rbp), %rax
leaq 0x20(%rbp), %rcx
movl 0x18(%rbp), %edx
movq 0x10(%rbp), %r14
movq (%rcx), %rsi
movq %rsi, -0x88(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0x80(%rbp)
movl %ecx, %ecx
movq %rcx, -0x90(%rbp)
movq (%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
xorl %r12d, %r12d
testq %r9, %r9
cmovleq %r12, %r13
leal -0x1(%rdx), %eax
movl %eax, -0x3c(%rbp)
movq %r13, -0x48(%rbp)
cmpq %r12, %r13
je 0x65427
movq %rbx, %rdi
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %r12, %rcx
leaq -0x38(%rbp), %r8
callq 0x42688
testl %eax, %eax
js 0x65453
je 0x6541f
cmpl $0x3, -0x90(%rbp)
je 0x65320
movups -0x38(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movq %r12, %rdi
callq 0x20a0b
movq %rax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq -0x70(%rbp), %r8
pushq $0x3
popq %r9
callq 0x21eb6
movq %rdx, %r15
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq %rbx, %rdi
callq 0x1801e
cmpl $0x6, %r15d
je 0x65453
movl 0x18(%rbp), %eax
testl %eax, %eax
jle 0x653e3
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21d01
testl %eax, %eax
js 0x65445
je 0x653e3
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x1cc43
testl %eax, %eax
js 0x65445
movq -0x98(%rbp), %r9
andl $0x0, -0xf0(%rbp)
pushq $0x3
popq %rax
movq %rax, -0xe8(%rbp)
andl $0x0, -0xe0(%rbp)
movq %rax, -0xd8(%rbp)
movups -0xe0(%rbp), %xmm0
movups %xmm0, 0x20(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x10(%rsp)
movl -0x3c(%rbp), %eax
movl %eax, 0x8(%rsp)
movq %r14, (%rsp)
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r15, %rcx
movq %r13, %r8
callq 0x651b2
testq %rax, %rax
js 0x65445
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0x6541b
movabsq $0x1fffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFF
cmpq %rax, %r14
jge 0x6542c
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
movl $0x4007, (%rsp) # imm = 0x4007
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r14, %rcx
callq 0x209b7
testl %eax, %eax
js 0x65453
incq %r14
movq -0x48(%rbp), %r13
incq %r12
jmp 0x65243
movq %r14, %rax
jmp 0x65456
leaq 0x238cf(%rip), %rsi # 0x88d02
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1801e
pushq $-0x1
popq %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_FlattenIntoArray:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov [rbp+var_68], r8
mov [rbp+var_60], rcx
mov [rbp+var_58], rdx
mov [rbp+var_50], rsi
mov rbx, rdi
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_651F3
mov rdi, rbx
call JS_ThrowStackOverflow
jmp loc_65453
loc_651F3:
mov r13, r9
lea rax, [rbp+arg_20]
lea rcx, [rbp+arg_10]
mov edx, [rbp+arg_8]
mov r14, [rbp+arg_0]
mov rsi, [rcx]
mov [rbp+var_88], rsi
mov rcx, [rcx+8]
mov [rbp+var_80], rcx
mov ecx, ecx
mov [rbp+var_90], rcx
mov rcx, [rax]
mov [rbp+var_78], rcx
mov rax, [rax+8]
mov [rbp+var_70], rax
xor r12d, r12d
test r9, r9
cmovle r13, r12
lea eax, [rdx-1]
mov [rbp+var_3C], eax
mov [rbp+var_48], r13
loc_65243:
cmp r13, r12
jz loc_65427
mov rdi, rbx
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_68]
mov rcx, r12
lea r8, [rbp+var_38]
call JS_TryGetPropertyInt64
test eax, eax
js loc_65453
jz loc_6541F
cmp dword ptr [rbp+var_90], 3
jz loc_65320
movups xmm0, [rbp+var_38]
movaps [rbp+var_D0], xmm0
mov rdi, r12
call js_int64
mov [rbp+var_C0], rax
mov [rbp+var_B8], rdx
mov rax, [rbp+var_60]
mov [rbp+var_B0], rax
mov rax, [rbp+var_68]
mov [rbp+var_A8], rax
lea rax, [rbp+var_D0]
mov [rsp+120h+var_120], rax
mov rdi, rbx
mov rsi, [rbp+var_88]
mov rdx, [rbp+var_80]
mov rcx, [rbp+var_78]
mov r8, [rbp+var_70]
push 3
pop r9
call JS_Call
mov r15, rdx
mov qword ptr [rbp+var_38], rax
mov qword ptr [rbp+var_38+8], rdx
mov rsi, qword ptr [rbp+var_D0]
mov rdx, qword ptr [rbp+var_D0+8]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rbp+var_C0]
mov rdx, [rbp+var_B8]
mov rdi, rbx
call JS_FreeValue
cmp r15d, 6
jz loc_65453
loc_65320:
mov eax, [rbp+arg_8]
test eax, eax
jle loc_653E3
mov r15, qword ptr [rbp+var_38]
mov r13, qword ptr [rbp+var_38+8]
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_IsArray
test eax, eax
js loc_65445
jz loc_653E3
mov rdi, rbx
lea rsi, [rbp+var_98]
mov rdx, r15
mov rcx, r13
call js_get_length64
test eax, eax
js loc_65445
mov r9, [rbp+var_98]
and dword ptr [rbp+var_F0], 0
push 3
pop rax
mov qword ptr [rbp+var_F0+8], rax
and dword ptr [rbp+var_E0], 0
mov qword ptr [rbp+var_E0+8], rax
movups xmm0, [rbp+var_E0]
movups [rsp+120h+var_100], xmm0
movups xmm0, [rbp+var_F0]
movups [rsp+120h+var_110], xmm0
mov eax, [rbp+var_3C]
mov [rsp+120h+var_118], eax
mov [rsp+120h+var_120], r14
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
mov rcx, r15
mov r8, r13
call JS_FlattenIntoArray
test rax, rax
js short loc_65445
mov r14, rax
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_FreeValue
jmp short loc_6541B
loc_653E3:
mov rax, 1FFFFFFFFFFFFFh
cmp r14, rax
jge short loc_6542C
mov r8, qword ptr [rbp+var_38]
mov r9, qword ptr [rbp+var_38+8]
mov dword ptr [rsp+120h+var_120], 4007h
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
mov rcx, r14
call JS_DefinePropertyValueInt64
test eax, eax
js short loc_65453
inc r14
loc_6541B:
mov r13, [rbp+var_48]
loc_6541F:
inc r12
jmp loc_65243
loc_65427:
mov rax, r14
jmp short loc_65456
loc_6542C:
lea rsi, aArrayTooLong; "Array too long"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r15, qword ptr [rbp+var_38]
mov r13, qword ptr [rbp+var_38+8]
loc_65445:
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_FreeValue
loc_65453:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_65456:
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_FlattenIntoArray(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long a15,
int a16,
long long a17,
long long a18,
long long a19,
long long a20)
{
long long v20; // r13
unsigned long long v22; // r12
int PropertyInt64; // eax
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rdx
__m128 v31; // rax
__int32 v32; // r15d
__m128 v33; // kr00_16
int IsArray; // eax
long long v35; // rax
char v37; // [rsp+0h] [rbp-120h]
__m128 v38; // [rsp+30h] [rbp-F0h]
__m128 v39; // [rsp+50h] [rbp-D0h] BYREF
long long v40; // [rsp+60h] [rbp-C0h]
long long v41; // [rsp+68h] [rbp-B8h]
long long v42; // [rsp+70h] [rbp-B0h]
long long v43; // [rsp+78h] [rbp-A8h]
long long v44; // [rsp+88h] [rbp-98h] BYREF
long long v45; // [rsp+90h] [rbp-90h]
long long v46; // [rsp+98h] [rbp-88h]
long long v47; // [rsp+A0h] [rbp-80h]
long long v48; // [rsp+A8h] [rbp-78h]
long long v49; // [rsp+B0h] [rbp-70h]
long long v50; // [rsp+B8h] [rbp-68h]
long long v51; // [rsp+C0h] [rbp-60h]
long long v52; // [rsp+C8h] [rbp-58h]
long long v53; // [rsp+D0h] [rbp-50h]
long long v54; // [rsp+D8h] [rbp-48h]
int v55; // [rsp+E4h] [rbp-3Ch]
__m128 v56; // [rsp+E8h] [rbp-38h] BYREF
long long savedregs; // [rsp+120h] [rbp+0h] BYREF
v50 = a5;
v51 = a4;
v52 = a3;
v53 = a2;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) > (unsigned long long)&savedregs )
{
JS_ThrowStackOverflow(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v37);
return -1LL;
}
v20 = a6;
v46 = a17;
v47 = a18;
v45 = (unsigned int)a18;
v48 = a19;
v49 = a20;
v22 = 0LL;
if ( a6 <= 0 )
v20 = 0LL;
v55 = a16 - 1;
v54 = v20;
while ( 1 )
{
if ( v20 == v22 )
return a15;
PropertyInt64 = JS_TryGetPropertyInt64(a1, v51, v50, v22, (long long)&v56);
if ( PropertyInt64 < 0 )
return -1LL;
if ( PropertyInt64 )
break;
LABEL_21:
++v22;
}
if ( (_DWORD)v45 != 3 )
{
a7 = v56;
v39 = v56;
v40 = js_int64(v22);
v41 = v30;
v42 = v51;
v43 = v50;
v31.m128_u64[0] = JS_Call(a1, v46, v47, v48, v49, 3, (long long)&v39);
v32 = v31.m128_i32[2];
v56 = v31;
JS_FreeValue(a1, v39.m128_i64[0], v39.m128_i64[1]);
JS_FreeValue(a1, v40, v41);
if ( v32 == 6 )
return -1LL;
}
if ( a16 > 0 )
{
v33 = v56;
IsArray = JS_IsArray(a1, v56.m128_i64[0], v56.m128_i32[2]);
if ( IsArray < 0 )
goto LABEL_24;
if ( IsArray )
{
if ( (int)js_get_length64(a1, &v44, v33.m128_i32[0], v33.m128_i32[2]) < 0 )
goto LABEL_24;
v38.m128_i32[0] = 0;
v38.m128_u64[1] = 3LL;
a7 = v38;
v35 = JS_FlattenIntoArray(a1, v53, v52, v33.m128_i32[0], v33.m128_i32[2], v44, a15, v55, 0, 3);
if ( v35 < 0 )
goto LABEL_24;
a15 = v35;
JS_FreeValue(a1, v33.m128_i64[0], v33.m128_i64[1]);
goto LABEL_20;
}
}
if ( a15 < 0x1FFFFFFFFFFFFFLL )
{
if ( (int)JS_DefinePropertyValueInt64(
a1,
v53,
v52,
a15,
v56.m128_u64[0],
v56.m128_i64[1],
*(double *)a7.m128_u64,
a8,
a9,
a10,
*(double *)v28.m128_u64,
*(double *)v29.m128_u64,
a13,
a14,
16391) < 0 )
return -1LL;
++a15;
LABEL_20:
v20 = v54;
goto LABEL_21;
}
JS_ThrowTypeError(a1, (long long)"Array too long", v24, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v37);
v33 = v56;
LABEL_24:
JS_FreeValue(a1, v33.m128_i64[0], v33.m128_i64[1]);
return -1LL;
}
| JS_FlattenIntoArray:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV qword ptr [RBP + -0x68],R8
MOV qword ptr [RBP + -0x60],RCX
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x50],RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x001651f3
MOV RDI,RBX
CALL 0x00135d91
JMP 0x00165453
LAB_001651f3:
MOV R13,R9
LEA RAX,[RBP + 0x30]
LEA RCX,[RBP + 0x20]
MOV EDX,dword ptr [RBP + 0x18]
MOV R14,qword ptr [RBP + 0x10]
MOV RSI,qword ptr [RCX]
MOV qword ptr [RBP + -0x88],RSI
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0x80],RCX
MOV ECX,ECX
MOV qword ptr [RBP + -0x90],RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x78],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x70],RAX
XOR R12D,R12D
TEST R9,R9
CMOVLE R13,R12
LEA EAX,[RDX + -0x1]
MOV dword ptr [RBP + -0x3c],EAX
MOV qword ptr [RBP + -0x48],R13
LAB_00165243:
CMP R13,R12
JZ 0x00165427
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,R12
LEA R8,[RBP + -0x38]
CALL 0x00142688
TEST EAX,EAX
JS 0x00165453
JZ 0x0016541f
CMP dword ptr [RBP + -0x90],0x3
JZ 0x00165320
MOVUPS XMM0,xmmword ptr [RBP + -0x38]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOV RDI,R12
CALL 0x00120a0b
MOV qword ptr [RBP + -0xc0],RAX
MOV qword ptr [RBP + -0xb8],RDX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0xa8],RAX
LEA RAX,[RBP + -0xd0]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x78]
MOV R8,qword ptr [RBP + -0x70]
PUSH 0x3
POP R9
CALL 0x00121eb6
MOV R15,RDX
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],RDX
MOV RSI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc8]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RBP + -0xb8]
MOV RDI,RBX
CALL 0x0011801e
CMP R15D,0x6
JZ 0x00165453
LAB_00165320:
MOV EAX,dword ptr [RBP + 0x18]
TEST EAX,EAX
JLE 0x001653e3
MOV R15,qword ptr [RBP + -0x38]
MOV R13,qword ptr [RBP + -0x30]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00121d01
TEST EAX,EAX
JS 0x00165445
JZ 0x001653e3
MOV RDI,RBX
LEA RSI,[RBP + -0x98]
MOV RDX,R15
MOV RCX,R13
CALL 0x0011cc43
TEST EAX,EAX
JS 0x00165445
MOV R9,qword ptr [RBP + -0x98]
AND dword ptr [RBP + -0xf0],0x0
PUSH 0x3
POP RAX
MOV qword ptr [RBP + -0xe8],RAX
AND dword ptr [RBP + -0xe0],0x0
MOV qword ptr [RBP + -0xd8],RAX
MOVUPS XMM0,xmmword ptr [RBP + -0xe0]
MOVUPS xmmword ptr [RSP + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [RBP + -0xf0]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RSP + 0x8],EAX
MOV qword ptr [RSP],R14
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,R15
MOV R8,R13
CALL 0x001651b2
TEST RAX,RAX
JS 0x00165445
MOV R14,RAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0011801e
JMP 0x0016541b
LAB_001653e3:
MOV RAX,0x1fffffffffffff
CMP R14,RAX
JGE 0x0016542c
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x30]
MOV dword ptr [RSP],0x4007
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,R14
CALL 0x001209b7
TEST EAX,EAX
JS 0x00165453
INC R14
LAB_0016541b:
MOV R13,qword ptr [RBP + -0x48]
LAB_0016541f:
INC R12
JMP 0x00165243
LAB_00165427:
MOV RAX,R14
JMP 0x00165456
LAB_0016542c:
LEA RSI,[0x188d02]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
MOV R15,qword ptr [RBP + -0x38]
MOV R13,qword ptr [RBP + -0x30]
LAB_00165445:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0011801e
LAB_00165453:
PUSH -0x1
POP RAX
LAB_00165456:
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long JS_FlattenIntoArray(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,long param_6,long param_7,int param_8,int8 param_9,
ulong param_10,int8 param_11,int8 param_12)
{
int8 uVar1;
int8 uVar2;
int iVar3;
long lVar4;
int1 auVar5 [16];
int1 auVar6 [16];
long in_stack_fffffffffffffed8;
int4 *puVar7;
int4 uVar8;
uint uStack_e4;
int4 local_d8;
int4 uStack_d4;
int4 uStack_d0;
int4 uStack_cc;
int1 local_c8 [16];
int8 local_b8;
int8 local_b0;
int8 local_a0;
ulong local_98;
int8 local_90;
ulong local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
long local_50;
int local_44;
int1 local_40 [16];
local_70 = param_5;
local_68 = param_4;
local_60 = param_3;
local_58 = param_2;
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowStackOverflow(param_1);
LAB_00165453:
param_7 = -1;
}
else {
local_90 = param_9;
local_88 = param_10;
local_98 = param_10 & 0xffffffff;
local_80 = param_11;
local_78 = param_12;
lVar4 = 0;
if (param_6 < 1) {
param_6 = lVar4;
}
local_44 = param_8 + -1;
local_50 = param_6;
for (; param_6 != lVar4; lVar4 = lVar4 + 1) {
iVar3 = JS_TryGetPropertyInt64(param_1,local_68,local_70,lVar4,local_40);
uVar8 = (int4)((ulong)in_stack_fffffffffffffed8 >> 0x20);
if (iVar3 < 0) goto LAB_00165453;
if (iVar3 != 0) {
auVar5 = local_40;
if ((int)local_98 != 3) {
local_d8 = local_40._0_4_;
uStack_d4 = local_40._4_4_;
uStack_d0 = local_40._8_4_;
uStack_cc = local_40._12_4_;
auVar5 = js_int64(lVar4);
local_b8 = local_68;
local_b0 = local_70;
puVar7 = &local_d8;
local_c8 = auVar5;
auVar6 = JS_Call(param_1,local_90,local_88,local_80,local_78,3,puVar7);
uVar8 = (int4)((ulong)puVar7 >> 0x20);
local_40 = auVar6;
JS_FreeValue(param_1,CONCAT44(uStack_d4,local_d8),CONCAT44(uStack_cc,uStack_d0));
JS_FreeValue(param_1,local_c8._0_8_,local_c8._8_8_);
auVar5 = local_40;
if (auVar6._8_4_ == 6) goto LAB_00165453;
}
local_40._8_8_ = auVar5._8_8_;
uVar2 = local_40._8_8_;
local_40._0_8_ = auVar5._0_8_;
uVar1 = local_40._0_8_;
auVar6 = auVar5;
if (param_8 < 1) {
LAB_001653e3:
local_40._8_8_ = auVar6._8_8_;
local_40._0_8_ = auVar6._0_8_;
if (param_7 < 0x1fffffffffffff) {
in_stack_fffffffffffffed8 = CONCAT44(uVar8,0x4007);
iVar3 = JS_DefinePropertyValueInt64
(param_1,local_58,local_60,param_7,local_40._0_8_,local_40._8_8_,
in_stack_fffffffffffffed8);
local_40 = auVar6;
if (-1 < iVar3) {
param_7 = param_7 + 1;
param_6 = local_50;
goto LAB_0016541f;
}
goto LAB_00165453;
}
local_40 = auVar6;
JS_ThrowTypeError(param_1,"Array too long");
auVar5 = local_40;
}
else {
iVar3 = JS_IsArray(param_1,local_40._0_8_,local_40._8_8_);
local_40 = auVar6;
if (-1 < iVar3) {
auVar6 = local_40;
if (iVar3 == 0) goto LAB_001653e3;
iVar3 = js_get_length64(param_1,&local_a0,uVar1,uVar2);
if (-1 < iVar3) {
in_stack_fffffffffffffed8 = param_7;
param_7 = JS_FlattenIntoArray(param_1,local_58,local_60,uVar1,uVar2,local_a0,param_7,
local_44,0,3,(ulong)uStack_e4 << 0x20,3);
if (-1 < param_7) {
JS_FreeValue(param_1,uVar1,uVar2);
param_6 = local_50;
goto LAB_0016541f;
}
}
}
}
JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_);
goto LAB_00165453;
}
LAB_0016541f:
}
}
return param_7;
}
| |
23,835 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) | llama.cpp/common/json.hpp | inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0x87174
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0x87193
xorl %eax, %eax
movl %edi, %ecx
subl $-0x3d, %ecx
setl %al
negl %ecx
imull $0x13441, %ecx, %ecx # imm = 0x13441
leal 0x3ffff(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x12, %edx
addl %edx, %eax
cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5
jle 0x871af
leal 0x133(%rax), %ecx
addl $0x13a, %eax # imm = 0x13A
testw %cx, %cx
cmovnsl %ecx, %eax
cwtl
shrl $0x3, %eax
cmpw $0x4f, %ax
jae 0x871cb
movzwl %ax, %eax
shll $0x4, %eax
leaq 0x41fbb(%rip), %rcx # 0xc9110
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0x871e7
cmpl $-0x5f, %edi
jge 0x87203
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x44ac0(%rip), %rdi # 0xcbc3b
leaq 0x40f0e(%rip), %rdx # 0xc8090
leaq 0x46518(%rip), %rcx # 0xcd6a1
movl $0x43e4, %esi # imm = 0x43E4
jmp 0x8721d
leaq 0x44aa1(%rip), %rdi # 0xcbc3b
leaq 0x40eef(%rip), %rdx # 0xc8090
leaq 0x46504(%rip), %rcx # 0xcd6ac
movl $0x43e5, %esi # imm = 0x43E5
jmp 0x8721d
leaq 0x44a85(%rip), %rdi # 0xcbc3b
leaq 0x40ed3(%rip), %rdx # 0xc8090
leaq 0x464f2(%rip), %rcx # 0xcd6b6
movl $0x43ea, %esi # imm = 0x43EA
jmp 0x8721d
leaq 0x44a69(%rip), %rdi # 0xcbc3b
leaq 0x40eb7(%rip), %rdx # 0xc8090
leaq 0x464e1(%rip), %rcx # 0xcd6c1
movl $0x43eb, %esi # imm = 0x43EB
jmp 0x8721d
leaq 0x44a4d(%rip), %rdi # 0xcbc3b
leaq 0x40e9b(%rip), %rdx # 0xc8090
leaq 0x464fc(%rip), %rcx # 0xcd6f8
movl $0x43ee, %esi # imm = 0x43EE
jmp 0x8721d
leaq 0x44a31(%rip), %rdi # 0xcbc3b
leaq 0x40e7f(%rip), %rdx # 0xc8090
leaq 0x464fc(%rip), %rcx # 0xcd714
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x1ca40
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle loc_87174
cmp edi, 5DDh
jge loc_87193
xor eax, eax
mov ecx, edi
sub ecx, 0FFFFFFC3h
setl al
neg ecx
imul ecx, 13441h
lea edx, [rcx+3FFFFh]
test ecx, ecx
cmovns edx, ecx
sar edx, 12h
add eax, edx
cmp eax, 0FFFFFEC5h
jle loc_871AF
lea ecx, [rax+133h]
add eax, 13Ah
test cx, cx
cmovns eax, ecx
cwde
shr eax, 3
cmp ax, 4Fh ; 'O'
jnb loc_871CB
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_871E7
cmp edi, 0FFFFFFA1h
jge loc_87203
mov rax, [rcx+rax]
pop rcx
retn
loc_87174:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_8721D
loc_87193:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_8721D
loc_871AF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_8721D
loc_871CB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_8721D
loc_871E7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_8721D
loc_87203:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_8721D:
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // eax
__int16 v2; // cx
__int16 v3; // ax
unsigned int v4; // eax
long long v5; // rax
int v6; // edi
if ( (int)this <= -1501 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = v1 + 307;
v3 = v1 + 314;
if ( v2 >= 0 )
v3 = v2;
v4 = (unsigned int)v3 >> 3;
if ( (unsigned __int16)v4 >= 0x4Fu )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v5 = 16 * (unsigned int)(unsigned __int16)v4;
v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5
+ 8)
+ (_DWORD)this;
if ( v6 <= -125 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v6 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5);
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub();
}
| get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x00187174
CMP EDI,0x5dd
JGE 0x00187193
XOR EAX,EAX
MOV ECX,EDI
SUB ECX,-0x3d
SETL AL
NEG ECX
IMUL ECX,ECX,0x13441
LEA EDX,[RCX + 0x3ffff]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x12
ADD EAX,EDX
CMP EAX,0xfffffec5
JLE 0x001871af
LEA ECX,[RAX + 0x133]
ADD EAX,0x13a
TEST CX,CX
CMOVNS EAX,ECX
CWDE
SHR EAX,0x3
CMP AX,0x4f
JNC 0x001871cb
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x1c9110]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x001871e7
CMP EDI,-0x5f
JGE 0x00187203
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_00187174:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd6a1]
MOV ESI,0x43e4
JMP 0x0018721d
LAB_00187193:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd6ac]
MOV ESI,0x43e5
JMP 0x0018721d
LAB_001871af:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd6b6]
MOV ESI,0x43ea
JMP 0x0018721d
LAB_001871cb:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd6c1]
MOV ESI,0x43eb
JMP 0x0018721d
LAB_001871e7:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd6f8]
MOV ESI,0x43ee
JMP 0x0018721d
LAB_00187203:
LEA RDI,[0x1cbc3b]
LEA RDX,[0x1c8090]
LEA RCX,[0x1cd714]
MOV ESI,0x43ef
LAB_0018721d:
XOR EAX,EAX
CALL 0x0011ca40
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
short sVar1;
int iVar2;
ulong uVar3;
short sVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
if (param_1 < -0x5dc) {
pcVar6 = "e >= -1500";
uVar7 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar5 = (param_1 + 0x3d) * -0x13441;
iVar2 = iVar5 + 0x3ffff;
if (-1 < iVar5) {
iVar2 = iVar5;
}
iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12);
if (iVar2 < -0x13a) {
pcVar6 = "index >= 0";
uVar7 = 0x43ea;
}
else {
sVar1 = (short)iVar2;
sVar4 = sVar1 + 0x133;
sVar1 = sVar1 + 0x13a;
if (-1 < sVar4) {
sVar1 = sVar4;
}
if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) {
uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar3 + 8);
if (iVar2 < -0x7c) {
pcVar6 = "kAlpha <= cached.e + e + 64";
uVar7 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3)
;
}
pcVar6 = "kGamma >= cached.e + e + 64";
uVar7 = 0x43ef;
}
}
else {
pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar7 = 0x43eb;
}
}
}
else {
pcVar6 = "e <= 1500";
uVar7 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
| |
23,836 | nglog::LogMessage::SendToLog() | ng-log[P]ng-log/src/logging.cc | EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
static bool already_warned_before_init = false;
RAW_DCHECK(data_->num_chars_to_log_ > 0 &&
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n',
"");
// Messages of a given severity get logged to lower severity logs, too
if (!already_warned_before_init && !IsLoggingInitialized()) {
const char w[] =
"WARNING: Logging before InitializeLogging() is "
"written to STDERR\n";
WriteToStderr(w, strlen(w));
already_warned_before_init = true;
}
// global flag: never log to file if set. Also -- don't log to a
// file if we haven't parsed the command line flags to get the
// program name.
if (FLAGS_logtostderr || FLAGS_logtostdout || !IsLoggingInitialized()) {
if (FLAGS_logtostdout) {
ColoredWriteToStdout(data_->severity_, data_->message_text_,
data_->num_chars_to_log_);
} else {
ColoredWriteToStderr(data_->severity_, data_->message_text_,
data_->num_chars_to_log_);
}
// this could be protected by a flag if necessary.
LogDestination::LogToSinks(
data_->severity_, data_->fullname_, data_->basename_, data_->line_,
time_, data_->message_text_ + data_->num_prefix_chars_,
(data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1));
} else {
// log this message to all log files of severity <= severity_
LogDestination::LogToAllLogfiles(data_->severity_, time_.when(),
data_->message_text_,
data_->num_chars_to_log_);
LogDestination::MaybeLogToStderr(data_->severity_, data_->message_text_,
data_->num_chars_to_log_,
data_->num_prefix_chars_);
LogDestination::MaybeLogToEmail(data_->severity_, data_->message_text_,
data_->num_chars_to_log_);
LogDestination::LogToSinks(
data_->severity_, data_->fullname_, data_->basename_, data_->line_,
time_, data_->message_text_ + data_->num_prefix_chars_,
(data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1));
// NOTE: -1 removes trailing \n
}
// If we log a FATAL message, flush all the log destinations, then toss
// a signal for others to catch. We leave the logs in a state that
// someone else can use them (as long as they flush afterwards)
if (data_->severity_ == NGLOG_FATAL && exit_on_dfatal) {
if (data_->first_fatal_) {
// Store crash information so that it is accessible from within signal
// handlers that may be invoked later.
RecordCrashReason(&crash_reason);
SetCrashReason(&crash_reason);
// Store shortened fatal message for other logs and GWQ status
const size_t copy =
min(data_->num_chars_to_log_, sizeof(fatal_message) - 1);
memcpy(fatal_message, data_->message_text_, copy);
fatal_message[copy] = '\0';
fatal_time = time_.when();
}
if (!FLAGS_logtostderr && !FLAGS_logtostdout) {
for (auto& log_destination : LogDestination::log_destinations_) {
if (log_destination) {
log_destination->logger_->Write(
true, std::chrono::system_clock::time_point{}, "", 0);
}
}
}
LogDestination::WaitForSinks(data_);
}
} | O0 | cpp | nglog::LogMessage::SendToLog():
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x76c0(%rax)
jbe 0x144c3
movq -0x90(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x8(%rcx), %rcx
movq 0x76c0(%rcx), %rcx
subq $0x1, %rcx
movsbl 0x4(%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x144f4
jmp 0x144c5
movl $0x3, %edi
leaq 0x3d4f9(%rip), %rsi # 0x519ca
movl $0x6f6, %edx # imm = 0x6F6
leaq 0x3d534(%rip), %rcx # 0x51a11
leaq 0x3d541(%rip), %r8 # 0x51a25
leaq 0x3da5c(%rip), %r9 # 0x51f47
movb $0x0, %al
callq 0x4c090
jmp 0x144f4
jmp 0x144f6
testb $0x1, 0x729fb(%rip) # 0x86ef8
jne 0x14532
callq 0x4f700
testb $0x1, %al
jne 0x14532
leaq -0x50(%rbp), %rdi
leaq 0x3e49d(%rip), %rsi # 0x529b0
movl $0x42, %edx
callq 0x95a0
leaq -0x50(%rbp), %rdi
movl $0x41, %esi
callq 0x15450
movb $0x1, 0x729c6(%rip) # 0x86ef8
leaq 0x63759(%rip), %rax # 0x77c92
testb $0x1, (%rax)
jne 0x14557
leaq 0x63755(%rip), %rax # 0x77c9a
testb $0x1, (%rax)
jne 0x14557
callq 0x4f700
testb $0x1, %al
jne 0x1462a
leaq 0x6373c(%rip), %rax # 0x77c9a
testb $0x1, (%rax)
je 0x1458e
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rcx
movl 0x7698(%rcx), %edi
movq 0x8(%rax), %rsi
addq $0x4, %rsi
movq 0x8(%rax), %rax
movq 0x76c0(%rax), %rdx
callq 0x15490
jmp 0x145b7
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rcx
movl 0x7698(%rcx), %edi
movq 0x8(%rax), %rsi
addq $0x4, %rsi
movq 0x8(%rax), %rax
movq 0x76c0(%rax), %rdx
callq 0x154f0
movq -0x90(%rbp), %r10
movq 0x8(%r10), %rax
movl 0x7698(%rax), %edi
movq 0x8(%r10), %rax
movq 0x76d8(%rax), %rsi
movq 0x8(%r10), %rax
movq 0x76d0(%rax), %rdx
movq 0x8(%r10), %rax
movl 0x769c(%rax), %ecx
movq %r10, %r8
addq $0x10, %r8
movq 0x8(%r10), %r9
addq $0x4, %r9
movq 0x8(%r10), %rax
addq 0x76b8(%rax), %r9
movq 0x8(%r10), %rax
movq 0x76c0(%rax), %rax
movq 0x8(%r10), %r10
subq 0x76b8(%r10), %rax
subq $0x1, %rax
movq %rax, (%rsp)
callq 0x1db20
jmp 0x1473d
movq -0x90(%rbp), %rdi
movq 0x8(%rdi), %rax
movl 0x7698(%rax), %eax
movl %eax, -0x94(%rbp)
addq $0x10, %rdi
callq 0x1dc20
movl -0x94(%rbp), %edi
movq %rax, %rsi
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdx
addq $0x4, %rdx
movq 0x8(%rax), %rax
movq 0x76c0(%rax), %rcx
callq 0x1da90
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rcx
movl 0x7698(%rcx), %edi
movq 0x8(%rax), %rsi
addq $0x4, %rsi
movq 0x8(%rax), %rcx
movq 0x76c0(%rcx), %rdx
movq 0x8(%rax), %rax
movq 0x76b8(%rax), %rcx
callq 0x1dc40
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rcx
movl 0x7698(%rcx), %edi
movq 0x8(%rax), %rsi
addq $0x4, %rsi
movq 0x8(%rax), %rax
movq 0x76c0(%rax), %rdx
callq 0x1dcb0
movq -0x90(%rbp), %r10
movq 0x8(%r10), %rax
movl 0x7698(%rax), %edi
movq 0x8(%r10), %rax
movq 0x76d8(%rax), %rsi
movq 0x8(%r10), %rax
movq 0x76d0(%rax), %rdx
movq 0x8(%r10), %rax
movl 0x769c(%rax), %ecx
movq %r10, %r8
addq $0x10, %r8
movq 0x8(%r10), %r9
addq $0x4, %r9
movq 0x8(%r10), %rax
addq 0x76b8(%rax), %r9
movq 0x8(%r10), %rax
movq 0x76c0(%rax), %rax
movq 0x8(%r10), %r10
subq 0x76b8(%r10), %rax
subq $0x1, %rax
movq %rax, (%rsp)
callq 0x1db20
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x3, 0x7698(%rax)
jne 0x148dc
testb $0x1, 0x63038(%rip) # 0x77794
je 0x148dc
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
testb $0x1, 0x76e1(%rax)
je 0x1480e
movq -0x90(%rbp), %rdi
leaq 0x63768(%rip), %rsi # 0x77ef0
callq 0x15530
leaq 0x6375c(%rip), %rdi # 0x77ef0
callq 0x4f830
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x76c0, %rdi # imm = 0x76C0
movq $0xff, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0xe6f0
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rsi
addq $0x4, %rsi
movq -0x58(%rbp), %rdx
leaq 0x72610(%rip), %rdi # 0x86df0
callq 0x95a0
movq -0x90(%rbp), %rdi
movq -0x58(%rbp), %rcx
leaq 0x725f9(%rip), %rax # 0x86df0
movb $0x0, (%rax,%rcx)
addq $0x10, %rdi
callq 0x1dc20
movq (%rax), %rax
movq %rax, 0x726e2(%rip) # 0x86ef0
leaq 0x6347d(%rip), %rax # 0x77c92
testb $0x1, (%rax)
jne 0x148cc
leaq 0x63475(%rip), %rax # 0x77c9a
testb $0x1, (%rax)
jne 0x148cc
leaq 0x6367b(%rip), %rax # 0x77eb0
movq %rax, -0x68(%rbp)
leaq 0x63670(%rip), %rax # 0x77eb0
movq %rax, -0x70(%rbp)
leaq 0x63665(%rip), %rax # 0x77eb0
addq $0x20, %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x78(%rbp), %rax
je 0x148ca
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0x1df80
testb $0x1, %al
jne 0x14874
jmp 0x148ba
movq -0x80(%rbp), %rdi
callq 0x1dfb0
movq 0xc8(%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x1dfd0
movq -0xa0(%rbp), %rdi
movq (%rdi), %rax
movl $0x1, %esi
leaq -0x88(%rbp), %rdx
leaq 0x3d693(%rip), %rcx # 0x51f47
xorl %r8d, %r8d
callq *0x10(%rax)
jmp 0x148bc
movq -0x70(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x70(%rbp)
jmp 0x14853
jmp 0x148cc
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1d920
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN5nglog10LogMessage9SendToLogEv:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
mov rax, [rax+8]
cmp qword ptr [rax+76C0h], 0
jbe short loc_144C3
mov rcx, [rbp+var_90]
mov rax, [rcx+8]
mov rcx, [rcx+8]
mov rcx, [rcx+76C0h]
sub rcx, 1
movsx eax, byte ptr [rax+rcx+4]
cmp eax, 0Ah
jz short loc_144F4
loc_144C3:
jmp short $+2
loc_144C5:
mov edi, (offset dword_0+3); this
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 6F6h
lea rcx, aCheckSFailedS; "Check %s failed: %s"
lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"...
lea r9, asc_51F45+2; ""
mov al, 0
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
jmp short $+2
loc_144F4:
jmp short $+2
loc_144F6:
test cs:_ZZN5nglog10LogMessage9SendToLogEvE26already_warned_before_init, 1; nglog::LogMessage::SendToLog(void)::already_warned_before_init
jnz short loc_14532
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, 1
jnz short loc_14532
lea rdi, [rbp+var_50]
lea rsi, aWarningLogging; "WARNING: Logging before InitializeLoggi"...
mov edx, 42h ; 'B'
call _memcpy
lea rdi, [rbp+var_50]; this
mov esi, (offset dword_40+1); char *
call _ZN5nglogL13WriteToStderrEPKcm; nglog::WriteToStderr(char const*,ulong)
mov cs:_ZZN5nglog10LogMessage9SendToLogEvE26already_warned_before_init, 1; nglog::LogMessage::SendToLog(void)::already_warned_before_init
loc_14532:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
test byte ptr [rax], 1
jnz short loc_14557
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
test byte ptr [rax], 1
jnz short loc_14557
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, 1
jnz loc_1462A
loc_14557:
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
test byte ptr [rax], 1
jz short loc_1458E
mov rax, [rbp+var_90]
mov rcx, [rax+8]
mov edi, [rcx+7698h]
mov rsi, [rax+8]
add rsi, 4
mov rax, [rax+8]
mov rdx, [rax+76C0h]
call _ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm; nglog::ColoredWriteToStdout(nglog::LogSeverity,char const*,ulong)
jmp short loc_145B7
loc_1458E:
mov rax, [rbp+var_90]
mov rcx, [rax+8]
mov edi, [rcx+7698h]
mov rsi, [rax+8]
add rsi, 4
mov rax, [rax+8]
mov rdx, [rax+76C0h]
call _ZN5nglogL20ColoredWriteToStderrENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderr(nglog::LogSeverity,char const*,ulong)
loc_145B7:
mov r10, [rbp+var_90]
mov rax, [r10+8]
mov edi, [rax+7698h]
mov rax, [r10+8]
mov rsi, [rax+76D8h]
mov rax, [r10+8]
mov rdx, [rax+76D0h]
mov rax, [r10+8]
mov ecx, [rax+769Ch]
mov r8, r10
add r8, 10h
mov r9, [r10+8]
add r9, 4
mov rax, [r10+8]
add r9, [rax+76B8h]
mov rax, [r10+8]
mov rax, [rax+76C0h]
mov r10, [r10+8]
sub rax, [r10+76B8h]
sub rax, 1
mov [rsp+0B0h+var_B0], rax
call _ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m; nglog::LogDestination::LogToSinks(nglog::LogSeverity,char const*,char const*,int,nglog::LogMessageTime const&,char const*,ulong)
jmp loc_1473D
loc_1462A:
mov rdi, [rbp+var_90]
mov rax, [rdi+8]
mov eax, [rax+7698h]
mov [rbp+var_94], eax
add rdi, 10h; this
call _ZNK5nglog14LogMessageTime4whenEv; nglog::LogMessageTime::when(void)
mov edi, [rbp+var_94]
mov rsi, rax
mov rax, [rbp+var_90]
mov rdx, [rax+8]
add rdx, 4
mov rax, [rax+8]
mov rcx, [rax+76C0h]
call _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)
mov rax, [rbp+var_90]
mov rcx, [rax+8]
mov edi, [rcx+7698h]
mov rsi, [rax+8]
add rsi, 4
mov rcx, [rax+8]
mov rdx, [rcx+76C0h]
mov rax, [rax+8]
mov rcx, [rax+76B8h]
call _ZN5nglog14LogDestination16MaybeLogToStderrENS_11LogSeverityEPKcmm; nglog::LogDestination::MaybeLogToStderr(nglog::LogSeverity,char const*,ulong,ulong)
mov rax, [rbp+var_90]
mov rcx, [rax+8]
mov edi, [rcx+7698h]
mov rsi, [rax+8]
add rsi, 4
mov rax, [rax+8]
mov rdx, [rax+76C0h]
call _ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm; nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity,char const*,ulong)
mov r10, [rbp+var_90]
mov rax, [r10+8]
mov edi, [rax+7698h]
mov rax, [r10+8]
mov rsi, [rax+76D8h]
mov rax, [r10+8]
mov rdx, [rax+76D0h]
mov rax, [r10+8]
mov ecx, [rax+769Ch]
mov r8, r10
add r8, 10h
mov r9, [r10+8]
add r9, 4
mov rax, [r10+8]
add r9, [rax+76B8h]
mov rax, [r10+8]
mov rax, [rax+76C0h]
mov r10, [r10+8]
sub rax, [r10+76B8h]
sub rax, 1
mov [rsp+0B0h+var_B0], rax
call _ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m; nglog::LogDestination::LogToSinks(nglog::LogSeverity,char const*,char const*,int,nglog::LogMessageTime const&,char const*,ulong)
loc_1473D:
mov rax, [rbp+var_90]
mov rax, [rax+8]
cmp dword ptr [rax+7698h], 3
jnz loc_148DC
test cs:_ZN5nglogL14exit_on_dfatalE, 1; nglog::exit_on_dfatal
jz loc_148DC
mov rax, [rbp+var_90]
mov rax, [rax+8]
test byte ptr [rax+76E1h], 1
jz loc_1480E
mov rdi, [rbp+var_90]; this
lea rsi, _ZN5nglogL12crash_reasonE; nglog::internal::CrashReason *
call _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE; nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason *)
lea rdi, _ZN5nglogL12crash_reasonE; this
call _ZN5nglog5tools14SetCrashReasonEPKNS_8internal11CrashReasonE; nglog::tools::SetCrashReason(nglog::internal::CrashReason const*)
mov rax, [rbp+var_90]
mov rdi, [rax+8]
add rdi, 76C0h
mov [rbp+var_60], 0FFh
lea rsi, [rbp+var_60]
call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rcx, rax
mov rax, [rbp+var_90]
mov rcx, [rcx]
mov [rbp+var_58], rcx
mov rsi, [rax+8]
add rsi, 4; nglog::internal::LogMessageData *
mov rdx, [rbp+var_58]
lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message
call _memcpy
mov rdi, [rbp+var_90]
mov rcx, [rbp+var_58]
lea rax, _ZN5nglogL13fatal_messageE; nglog::fatal_message
mov byte ptr [rax+rcx], 0
add rdi, 10h; this
call _ZNK5nglog14LogMessageTime4whenEv; nglog::LogMessageTime::when(void)
mov rax, [rax]
mov cs:_ZN5nglogL10fatal_timeE, rax; nglog::fatal_time
loc_1480E:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
test byte ptr [rax], 1
jnz loc_148CC
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
test byte ptr [rax], 1
jnz loc_148CC
lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
mov [rbp+var_68], rax
lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
mov [rbp+var_70], rax
lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
add rax, 20h ; ' '
mov [rbp+var_78], rax
loc_14853:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_78]
jz short loc_148CA
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov rdi, [rbp+var_80]
call _ZNKSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EEcvbEv; std::unique_ptr<nglog::LogDestination>::operator bool(void)
test al, 1
jnz short loc_14874
jmp short loc_148BA
loc_14874:
mov rdi, [rbp+var_80]
call _ZNKSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EEptEv; std::unique_ptr<nglog::LogDestination>::operator->(void)
mov rax, [rax+0C8h]
mov [rbp+var_A0], rax
lea rdi, [rbp+var_88]
call _ZNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEC2Ev; std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_point(void)
mov rdi, [rbp+var_A0]
mov rax, [rdi]
mov esi, 1
lea rdx, [rbp+var_88]
lea rcx, asc_51F45+2; ""
xor r8d, r8d
call qword ptr [rax+10h]
loc_148BA:
jmp short $+2
loc_148BC:
mov rax, [rbp+var_70]
add rax, 8
mov [rbp+var_70], rax
jmp short loc_14853
loc_148CA:
jmp short $+2
loc_148CC:
mov rax, [rbp+var_90]
mov rdi, [rax+8]; this
call _ZN5nglog14LogDestination12WaitForSinksEPNS_8internal14LogMessageDataE; nglog::LogDestination::WaitForSinks(nglog::internal::LogMessageData *)
loc_148DC:
add rsp, 0B0h
pop rbp
retn
| nglog::LogDestination * nglog::LogMessage::SendToLog(nglog::LogMessage *this)
{
unsigned long long v1; // rdx
nglog::LogDestination *v2; // rax
nglog::internal::LogMessageData *v3; // rsi
long long v4; // rax
nglog::LogDestination *v5; // rax
nglog::LogDestination *result; // rax
_QWORD *v7; // rdi
long long v8; // [rsp+10h] [rbp-A0h]
unsigned int v9; // [rsp+1Ch] [rbp-94h]
nglog::LogDestination **v10; // [rsp+20h] [rbp-90h]
char v11[8]; // [rsp+28h] [rbp-88h] BYREF
char *v12; // [rsp+30h] [rbp-80h]
char *v13; // [rsp+38h] [rbp-78h]
char *v14; // [rsp+40h] [rbp-70h]
void *v15; // [rsp+48h] [rbp-68h]
long long v16; // [rsp+50h] [rbp-60h] BYREF
long long v17; // [rsp+58h] [rbp-58h]
_BYTE v18[72]; // [rsp+60h] [rbp-50h] BYREF
nglog::LogMessage *v19; // [rsp+A8h] [rbp-8h]
v19 = this;
v10 = (nglog::LogDestination **)this;
if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL)
|| *(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - 1LL + 4) != 10 )
{
this = (nglog::LogMessage *)((char *)&dword_0 + 3);
nglog::RawLog(
(unsigned int)&dword_0 + 3,
(unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1782,
(unsigned int)"Check %s failed: %s",
(unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'",
(unsigned int)"");
}
if ( (nglog::LogMessage::SendToLog(void)::already_warned_before_init & 1) == 0
&& (nglog::IsLoggingInitialized(this) & 1) == 0 )
{
memcpy(v18, "WARNING: Logging before InitializeLogging() is written to STDERR\n", 66LL);
this = (nglog::LogMessage *)v18;
nglog::WriteToStderr((nglog *)v18, (const char *)&dword_40 + 1, v1);
nglog::LogMessage::SendToLog(void)::already_warned_before_init = 1;
}
if ( (fLB::FLAGS_logtostderr & 1) != 0
|| (fLB::FLAGS_logtostdout & 1) != 0
|| (nglog::IsLoggingInitialized(this) & 1) == 0 )
{
if ( (fLB::FLAGS_logtostdout & 1) != 0 )
nglog::ColoredWriteToStdout(*((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800));
else
nglog::ColoredWriteToStderr(*((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800));
v2 = v10[1];
v3 = (nglog::internal::LogMessageData *)*((_QWORD *)v2 + 3803);
nglog::LogDestination::LogToSinks(
*((_DWORD *)v2 + 7590),
(_DWORD)v3,
*((_QWORD *)v2 + 3802),
*((_DWORD *)v2 + 7591),
(_DWORD)v10 + 16,
*((_DWORD *)v2 + 7598) + *((_DWORD *)v10 + 2) + 4,
*((_QWORD *)v2 + 3800) - *((_QWORD *)v2 + 3799) - 1LL);
}
else
{
v9 = *((_DWORD *)v10[1] + 7590);
v4 = nglog::LogMessageTime::when((nglog::LogMessageTime *)(v10 + 2));
nglog::LogDestination::LogToAllLogfiles(v9, v4, (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800));
nglog::LogDestination::MaybeLogToStderr(
*((unsigned int *)v10[1] + 7590),
(char *)v10[1] + 4,
*((_QWORD *)v10[1] + 3800),
*((_QWORD *)v10[1] + 3799));
nglog::LogDestination::MaybeLogToEmail(
*((unsigned int *)v10[1] + 7590),
(char *)v10[1] + 4,
*((_QWORD *)v10[1] + 3800));
v5 = v10[1];
v3 = (nglog::internal::LogMessageData *)*((_QWORD *)v5 + 3803);
nglog::LogDestination::LogToSinks(
*((_DWORD *)v5 + 7590),
(_DWORD)v3,
*((_QWORD *)v5 + 3802),
*((_DWORD *)v5 + 7591),
(_DWORD)v10 + 16,
*((_DWORD *)v5 + 7598) + *((_DWORD *)v10 + 2) + 4,
*((_QWORD *)v5 + 3800) - *((_QWORD *)v5 + 3799) - 1LL);
}
result = v10[1];
if ( *((_DWORD *)result + 7590) == 3 && (nglog::exit_on_dfatal & 1) != 0 )
{
if ( (*((_BYTE *)v10[1] + 30433) & 1) != 0 )
{
nglog::LogMessage::RecordCrashReason(
(nglog::LogMessage *)v10,
(nglog::internal::CrashReason *)&nglog::crash_reason);
nglog::tools::SetCrashReason(
(nglog::tools *)&nglog::crash_reason,
(const nglog::internal::CrashReason *)&nglog::crash_reason);
v7 = (_QWORD *)((char *)v10[1] + 30400);
v16 = 255LL;
v17 = *std::min<unsigned long>(v7, &v16);
v3 = (nglog::LogDestination *)((char *)v10[1] + 4);
memcpy(nglog::fatal_message, v3, v17);
nglog::fatal_message[v17] = 0;
nglog::fatal_time = *(_QWORD *)nglog::LogMessageTime::when((nglog::LogMessageTime *)(v10 + 2));
}
if ( (fLB::FLAGS_logtostderr & 1) == 0 && (fLB::FLAGS_logtostdout & 1) == 0 )
{
v15 = &nglog::LogDestination::log_destinations_;
v14 = (char *)&nglog::LogDestination::log_destinations_;
v13 = (char *)&nglog::LogDestination::log_destinations_ + 32;
while ( v14 != v13 )
{
v12 = v14;
if ( (std::unique_ptr<nglog::LogDestination>::operator bool(v14) & 1) != 0 )
{
v8 = *(_QWORD *)(std::unique_ptr<nglog::LogDestination>::operator->(v12) + 200);
std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_point(v11);
v3 = (nglog::internal::LogMessageData *)(&dword_0 + 1);
(*(void ( **)(long long, long long, char *, char *, _QWORD))(*(_QWORD *)v8 + 16LL))(
v8,
1LL,
v11,
"",
0LL);
}
v14 += 8;
}
}
return (nglog::LogDestination *)nglog::LogDestination::WaitForSinks(v10[1], v3);
}
return result;
}
| SendToLog:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x8]
CMP qword ptr [RAX + 0x76c0],0x0
JBE 0x001144c3
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x76c0]
SUB RCX,0x1
MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4]
CMP EAX,0xa
JZ 0x001144f4
LAB_001144c3:
JMP 0x001144c5
LAB_001144c5:
MOV EDI,0x3
LEA RSI,[0x1519ca]
MOV EDX,0x6f6
LEA RCX,[0x151a11]
LEA R8,[0x151a25]
LEA R9,[0x151f47]
MOV AL,0x0
CALL 0x0014c090
JMP 0x001144f4
LAB_001144f4:
JMP 0x001144f6
LAB_001144f6:
TEST byte ptr [0x00186ef8],0x1
JNZ 0x00114532
CALL 0x0014f700
TEST AL,0x1
JNZ 0x00114532
LEA RDI,[RBP + -0x50]
LEA RSI,[0x1529b0]
MOV EDX,0x42
CALL 0x001095a0
LEA RDI,[RBP + -0x50]
MOV ESI,0x41
CALL 0x00115450
MOV byte ptr [0x00186ef8],0x1
LAB_00114532:
LEA RAX,[0x177c92]
TEST byte ptr [RAX],0x1
JNZ 0x00114557
LEA RAX,[0x177c9a]
TEST byte ptr [RAX],0x1
JNZ 0x00114557
CALL 0x0014f700
TEST AL,0x1
JNZ 0x0011462a
LAB_00114557:
LEA RAX,[0x177c9a]
TEST byte ptr [RAX],0x1
JZ 0x0011458e
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RCX + 0x7698]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x4
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x76c0]
CALL 0x00115490
JMP 0x001145b7
LAB_0011458e:
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RCX + 0x7698]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x4
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x76c0]
CALL 0x001154f0
LAB_001145b7:
MOV R10,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [R10 + 0x8]
MOV EDI,dword ptr [RAX + 0x7698]
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + 0x76d8]
MOV RAX,qword ptr [R10 + 0x8]
MOV RDX,qword ptr [RAX + 0x76d0]
MOV RAX,qword ptr [R10 + 0x8]
MOV ECX,dword ptr [RAX + 0x769c]
MOV R8,R10
ADD R8,0x10
MOV R9,qword ptr [R10 + 0x8]
ADD R9,0x4
MOV RAX,qword ptr [R10 + 0x8]
ADD R9,qword ptr [RAX + 0x76b8]
MOV RAX,qword ptr [R10 + 0x8]
MOV RAX,qword ptr [RAX + 0x76c0]
MOV R10,qword ptr [R10 + 0x8]
SUB RAX,qword ptr [R10 + 0x76b8]
SUB RAX,0x1
MOV qword ptr [RSP],RAX
CALL 0x0011db20
JMP 0x0011473d
LAB_0011462a:
MOV RDI,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RAX + 0x7698]
MOV dword ptr [RBP + -0x94],EAX
ADD RDI,0x10
CALL 0x0011dc20
MOV EDI,dword ptr [RBP + -0x94]
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,0x4
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x76c0]
CALL 0x0011da90
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RCX + 0x7698]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x4
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RCX + 0x76c0]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x76b8]
CALL 0x0011dc40
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RCX + 0x7698]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x4
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x76c0]
CALL 0x0011dcb0
MOV R10,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [R10 + 0x8]
MOV EDI,dword ptr [RAX + 0x7698]
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + 0x76d8]
MOV RAX,qword ptr [R10 + 0x8]
MOV RDX,qword ptr [RAX + 0x76d0]
MOV RAX,qword ptr [R10 + 0x8]
MOV ECX,dword ptr [RAX + 0x769c]
MOV R8,R10
ADD R8,0x10
MOV R9,qword ptr [R10 + 0x8]
ADD R9,0x4
MOV RAX,qword ptr [R10 + 0x8]
ADD R9,qword ptr [RAX + 0x76b8]
MOV RAX,qword ptr [R10 + 0x8]
MOV RAX,qword ptr [RAX + 0x76c0]
MOV R10,qword ptr [R10 + 0x8]
SUB RAX,qword ptr [R10 + 0x76b8]
SUB RAX,0x1
MOV qword ptr [RSP],RAX
CALL 0x0011db20
LAB_0011473d:
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX + 0x7698],0x3
JNZ 0x001148dc
TEST byte ptr [0x00177794],0x1
JZ 0x001148dc
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x8]
TEST byte ptr [RAX + 0x76e1],0x1
JZ 0x0011480e
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[0x177ef0]
CALL 0x00115530
LEA RDI,[0x177ef0]
CALL 0x0014f830
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,0x76c0
MOV qword ptr [RBP + -0x60],0xff
LEA RSI,[RBP + -0x60]
CALL 0x0010e6f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RBP + -0x58],RCX
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,0x4
MOV RDX,qword ptr [RBP + -0x58]
LEA RDI,[0x186df0]
CALL 0x001095a0
MOV RDI,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x58]
LEA RAX,[0x186df0]
MOV byte ptr [RAX + RCX*0x1],0x0
ADD RDI,0x10
CALL 0x0011dc20
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00186ef0],RAX
LAB_0011480e:
LEA RAX,[0x177c92]
TEST byte ptr [RAX],0x1
JNZ 0x001148cc
LEA RAX,[0x177c9a]
TEST byte ptr [RAX],0x1
JNZ 0x001148cc
LEA RAX,[0x177eb0]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0x177eb0]
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[0x177eb0]
ADD RAX,0x20
MOV qword ptr [RBP + -0x78],RAX
LAB_00114853:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x78]
JZ 0x001148ca
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0011df80
TEST AL,0x1
JNZ 0x00114874
JMP 0x001148ba
LAB_00114874:
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0011dfb0
MOV RAX,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0xa0],RAX
LEA RDI,[RBP + -0x88]
CALL 0x0011dfd0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RDI]
MOV ESI,0x1
LEA RDX,[RBP + -0x88]
LEA RCX,[0x151f47]
XOR R8D,R8D
CALL qword ptr [RAX + 0x10]
LAB_001148ba:
JMP 0x001148bc
LAB_001148bc:
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x8
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00114853
LAB_001148ca:
JMP 0x001148cc
LAB_001148cc:
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0011d920
LAB_001148dc:
ADD RSP,0xb0
POP RBP
RET
|
/* nglog::LogMessage::SendToLog() */
void __thiscall nglog::LogMessage::SendToLog(LogMessage *this)
{
int4 uVar1;
long *plVar2;
bool bVar3;
ulong uVar4;
int8 uVar5;
ulong *puVar6;
int8 *puVar7;
long lVar8;
time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>
local_90 [8];
unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *local_88;
unique_ptr *local_80;
unique_ptr *local_78;
int1 *local_70;
ulong local_68;
size_t local_60;
char local_58 [72];
LogMessage *local_10;
local_10 = this;
if ((*(long *)(*(long *)(this + 8) + 0x76c0) == 0) ||
(*(char *)(*(long *)(this + 8) + *(long *)(*(long *)(this + 8) + 0x76c0) + 3) != '\n')) {
RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x6f6,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'"
,&DAT_00151f47);
}
if (((SendToLog()::already_warned_before_init & 1) == 0) &&
(uVar4 = IsLoggingInitialized(), (uVar4 & 1) == 0)) {
memcpy(local_58,"WARNING: Logging before InitializeLogging() is written to STDERR\n",0x42);
WriteToStderr(local_58,0x41);
SendToLog()::already_warned_before_init = 1;
}
if ((((fLB::FLAGS_logtostderr & 1) == 0) && ((fLB::FLAGS_logtostdout & 1) == 0)) &&
(uVar4 = IsLoggingInitialized(), (uVar4 & 1) != 0)) {
uVar1 = *(int4 *)(*(long *)(this + 8) + 0x7698);
uVar5 = LogMessageTime::when((LogMessageTime *)(this + 0x10));
LogDestination::LogToAllLogfiles
(uVar1,uVar5,*(long *)(this + 8) + 4,*(int8 *)(*(long *)(this + 8) + 0x76c0));
LogDestination::MaybeLogToStderr
(*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4,
*(int8 *)(*(long *)(this + 8) + 0x76c0),
*(int8 *)(*(long *)(this + 8) + 0x76b8));
LogDestination::MaybeLogToEmail
(*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4,
*(int8 *)(*(long *)(this + 8) + 0x76c0));
LogDestination::LogToSinks
(*(int4 *)(*(long *)(this + 8) + 0x7698),
*(int8 *)(*(long *)(this + 8) + 0x76d8),
*(int8 *)(*(long *)(this + 8) + 0x76d0),
*(int4 *)(*(long *)(this + 8) + 0x769c),this + 0x10,
*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8),
(*(long *)(*(long *)(this + 8) + 0x76c0) - *(long *)(*(long *)(this + 8) + 0x76b8)) +
-1);
}
else {
if ((fLB::FLAGS_logtostdout & 1) == 0) {
ColoredWriteToStderr
(*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4,
*(int8 *)(*(long *)(this + 8) + 0x76c0));
}
else {
ColoredWriteToStdout
(*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4,
*(int8 *)(*(long *)(this + 8) + 0x76c0));
}
LogDestination::LogToSinks
(*(int4 *)(*(long *)(this + 8) + 0x7698),
*(int8 *)(*(long *)(this + 8) + 0x76d8),
*(int8 *)(*(long *)(this + 8) + 0x76d0),
*(int4 *)(*(long *)(this + 8) + 0x769c),this + 0x10,
*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8),
(*(long *)(*(long *)(this + 8) + 0x76c0) - *(long *)(*(long *)(this + 8) + 0x76b8)) +
-1);
}
if ((*(int *)(*(long *)(this + 8) + 0x7698) == 3) && ((exit_on_dfatal & 1) != 0)) {
if ((*(byte *)(*(long *)(this + 8) + 0x76e1) & 1) != 0) {
RecordCrashReason(this,(CrashReason *)crash_reason);
tools::SetCrashReason((CrashReason *)crash_reason);
local_68 = 0xff;
puVar6 = std::min<unsigned_long>((ulong *)(*(long *)(this + 8) + 0x76c0),&local_68);
local_60 = *puVar6;
memcpy(&fatal_message,(void *)(*(long *)(this + 8) + 4),local_60);
(&fatal_message)[local_60] = 0;
puVar7 = (int8 *)LogMessageTime::when((LogMessageTime *)(this + 0x10));
fatal_time = *puVar7;
}
if (((fLB::FLAGS_logtostderr & 1) == 0) && ((fLB::FLAGS_logtostdout & 1) == 0)) {
local_70 = LogDestination::log_destinations_;
local_80 = (unique_ptr *)(anonymous_namespace)::g_application_fingerprint_abi_cxx11_;
for (local_78 = (unique_ptr *)LogDestination::log_destinations_; local_78 != local_80;
local_78 = local_78 + 8) {
local_88 = (unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
local_78;
bVar3 = std::unique_ptr::operator_cast_to_bool(local_78);
if (bVar3) {
lVar8 = std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>
::operator->(local_88);
plVar2 = *(long **)(lVar8 + 200);
std::chrono::
time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>
::time_point(local_90);
(**(code **)(*plVar2 + 0x10))(plVar2,1,local_90,&DAT_00151f47,0);
}
}
}
LogDestination::WaitForSinks(*(LogMessageData **)(this + 8));
}
return;
}
| |
23,837 | CLI::OptionBase<CLI::Option>::group(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Option.hpp | CRTP *group(const std::string &name) {
if(!detail::valid_alias_name_string(name)) {
throw IncorrectConstruction("Group names may not contain newlines or null characters");
}
group_ = name;
return static_cast<CRTP *>(this);
} | O1 | cpp | CLI::OptionBase<CLI::Option>::group(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1d5c0
testb %al, %al
je 0x1d35b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7210
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x38, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a3a1(%rip), %rsi # 0x37719
leaq 0x1a3d1(%rip), %rdx # 0x37750
leaq 0x8(%rsp), %rdi
callq 0x12040
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d6b4
xorl %ebp, %ebp
leaq 0x2c0c6(%rip), %rsi # 0x49468
leaq 0xc65b(%rip), %rdx # 0x29a04
movq %rbx, %rdi
callq 0x7750
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d3d3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1d3d3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1d3e0
movq %rbx, %rdi
callq 0x7310
movq %r14, %rdi
callq 0x7780
| _ZN3CLI10OptionBaseINS_6OptionEE5groupERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi; int
call _ZN3CLI6detail23valid_alias_name_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::detail::valid_alias_name_string(std::string const&)
test al, al
jz short loc_1D35B
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1D35B:
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aGroupNamesMayN; "Group names may not contain newlines or"...
lea rdx, aGroupNamesMayN+37h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx; int
call _ZN3CLI21IncorrectConstructionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::IncorrectConstruction::IncorrectConstruction(std::string)
xor ebp, ebp
lea rsi, _ZTIN3CLI21IncorrectConstructionE; lptinfo
lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_1D3D3
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1D3D3
mov r14, rax
mov bpl, 1
loc_1D3D3:
test bpl, bpl
jz short loc_1D3E0
mov rdi, rbx; void *
call ___cxa_free_exception
loc_1D3E0:
mov rdi, r14
call __Unwind_Resume
| long long CLI::OptionBase<CLI::Option>::group(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
void *exception; // rbx
void *v8; // [rsp+0h] [rbp-48h]
void *v9; // [rsp+0h] [rbp-48h]
void *v10; // [rsp+8h] [rbp-40h] BYREF
long long v11; // [rsp+10h] [rbp-38h]
_QWORD v12[2]; // [rsp+18h] [rbp-30h] BYREF
int v13; // [rsp+28h] [rbp-20h]
long long v14; // [rsp+30h] [rbp-18h]
if ( !(unsigned __int8)CLI::detail::valid_alias_name_string(a2, a2, a3, a4, a5, a6, v8, (int)v10, v11) )
{
exception = __cxa_allocate_exception(0x38uLL);
v10 = v12;
std::string::_M_construct<char const*>(&v10, "Group names may not contain newlines or null characters", (long long)"");
CLI::IncorrectConstruction::IncorrectConstruction(
(int)exception,
v9,
(int)v10,
v11,
v12[0],
(void *)v12[1],
v13,
v14);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::IncorrectConstruction, CLI::Error::~Error);
}
std::string::_M_assign(a1, a2);
return a1;
}
| group:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0011d5c0
TEST AL,AL
JZ 0x0011d35b
MOV RDI,RBX
MOV RSI,R14
CALL 0x00107210
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011d35b:
MOV EDI,0x38
CALL 0x001071d0
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0011d371:
LEA RSI,[0x137719]
LEA RDX,[0x137750]
LEA RDI,[RSP + 0x8]
CALL 0x00112040
MOV BPL,0x1
LAB_0011d38c:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011d6b4
XOR EBP,EBP
LEA RSI,[0x149468]
LEA RDX,[0x129a04]
MOV RDI,RBX
CALL 0x00107750
|
/* CLI::OptionBase<CLI::Option>::group(std::__cxx11::string const&) */
OptionBase<CLI::Option> * __thiscall
CLI::OptionBase<CLI::Option>::group(OptionBase<CLI::Option> *this,string *param_1)
{
char cVar1;
IncorrectConstruction *pIVar2;
int1 *local_40 [2];
int1 local_30 [16];
cVar1 = detail::valid_alias_name_string(param_1);
if (cVar1 != '\0') {
std::__cxx11::string::_M_assign((string *)this);
return this;
}
pIVar2 = (IncorrectConstruction *)__cxa_allocate_exception(0x38);
local_40[0] = local_30;
/* try { // try from 0011d371 to 0011d388 has its CatchHandler @ 0011d3cd */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"Group names may not contain newlines or null characters","");
/* try { // try from 0011d38c to 0011d3b0 has its CatchHandler @ 0011d3b1 */
IncorrectConstruction::IncorrectConstruction(pIVar2,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(pIVar2,&IncorrectConstruction::typeinfo,Error::~Error);
}
| |
23,838 | spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &, memory_buf_t &dest) override {
auto &mdc_map = mdc::get_context();
if (mdc_map.empty()) {
ScopedPadder p(0, padinfo_, dest);
return;
} else {
format_mdc(mdc_map, dest);
}
} | O3 | c | spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
callq 0x34940
cmpq $0x0, 0x28(%rax)
je 0x34937
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x34970
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN6spdlog7details13mdc_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
push r14
push rbx
push rax
mov rbx, rcx
mov r14, rdi
call _ZN6spdlog3mdc11get_contextB5cxx11Ev; spdlog::mdc::get_context(void)
cmp qword ptr [rax+28h], 0
jz short loc_34937
mov rdi, r14
mov rsi, rax
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
jmp _ZN6spdlog7details13mdc_formatterINS0_18null_scoped_padderEE10format_mdcERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4lessISA_ESaISt4pairIKSA_SA_EEERN3fmt3v1019basic_memory_bufferIcLm250ES9_EE; spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format_mdc(std::map<std::string,std::string> const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
loc_34937:
add rsp, 8
pop rbx
pop r14
retn
| long long spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long result; // rax
result = spdlog::mdc::get_context[abi:cxx11](a1);
if ( *(_QWORD *)(result + 40) )
return spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format_mdc(a1, result, a4);
return result;
}
| format:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDI
CALL 0x00134940
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00134937
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00134970
LAB_00134937:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::mdc_formatter<spdlog::details::null_scoped_padder>::format
(mdc_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
map *pmVar1;
pmVar1 = (map *)mdc::get_context_abi_cxx11_();
if (*(long *)(pmVar1 + 0x28) != 0) {
format_mdc(this,pmVar1,param_3);
return;
}
return;
}
| |
23,839 | LefDefParser::defwNetFixedbump() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwNetFixedbump()
{
defwFunc = DEFW_NET; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwNetOptions())
return DEFW_BAD_ORDER;
fprintf(defwFile, "\n + FIXEDBUMP");
defwLines++;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwNetFixedbump():
pushq %rax
leaq 0x11560(%rip), %rax # 0x2b168
movl $0x3a, (%rax)
leaq 0x11543(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x19c25
movl $0x1, 0x4(%rsp)
jmp 0x19c6e
callq 0x198f0
cmpl $0x0, %eax
jne 0x19c39
movl $0x2, 0x4(%rsp)
jmp 0x19c6e
leaq 0x11518(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0xadcf(%rip), %rsi # 0x24a19
movb $0x0, %al
callq 0x10f0
leaq 0x11508(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x114fc(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser16defwNetFixedbumpEv:
push rax
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 3Ah ; ':'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_19C25
mov [rsp+8+var_4], 1
jmp short loc_19C6E
loc_19C25:
call _ZN12LefDefParser14defwNetOptionsEv; LefDefParser::defwNetOptions(void)
cmp eax, 0
jnz short loc_19C39
mov [rsp+8+var_4], 2
jmp short loc_19C6E
loc_19C39:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aFixedbump; "\n + FIXEDBUMP"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov [rsp+8+var_4], 0
loc_19C6E:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwNetFixedbump(LefDefParser *this)
{
LefDefParser::defwFunc = 58;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwNetOptions(this) )
{
fprintf(LefDefParser::defwFile, "\n + FIXEDBUMP");
++LefDefParser::defwLines;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwNetFixedbump:
PUSH RAX
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x3a
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00119c25
MOV dword ptr [RSP + 0x4],0x1
JMP 0x00119c6e
LAB_00119c25:
CALL 0x001198f0
CMP EAX,0x0
JNZ 0x00119c39
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00119c6e
LAB_00119c39:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x124a19]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x4],0x0
LAB_00119c6e:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwNetFixedbump() */
int4 LefDefParser::defwNetFixedbump(void)
{
int iVar1;
int4 local_4;
defwFunc = 0x3a;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else {
iVar1 = defwNetOptions();
if (iVar1 == 0) {
local_4 = 2;
}
else {
fprintf(defwFile,"\n + FIXEDBUMP");
defwLines = defwLines + 1;
local_4 = 0;
}
}
return local_4;
}
| |
23,840 | check_mb_gb18030_valid | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_gb18030_valid(const char * start, const char * end)
{
if (end - start <= 1 || !is_gb18030_odd(start[0])) {
return 0;
}
if (is_gb18030_even_2(start[1])) {
return 2;
} else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) {
return 4;
}
return 0;
} | O3 | c | check_mb_gb18030_valid:
pushq %rbp
movq %rsp, %rbp
subq %rdi, %rsi
xorl %eax, %eax
cmpq $0x2, %rsi
jl 0xa0e9c
movb (%rdi), %cl
incb %cl
cmpb $-0x7e, %cl
jb 0xa0e9c
movb 0x1(%rdi), %cl
leal -0x7f(%rcx), %eax
cmpb $-0x3f, %al
setae %dl
cmpb $-0x1, %cl
setl %r8b
movl $0x2, %eax
orb %dl, %r8b
jne 0xa0e9c
cmpq $0x4, %rsi
setb %al
addb $-0x30, %cl
cmpb $0xa, %cl
setae %cl
orb %al, %cl
jne 0xa0e9a
movb 0x2(%rdi), %al
incb %al
cmpb $-0x7e, %al
jb 0xa0e9a
movb 0x3(%rdi), %cl
addb $-0x30, %cl
movl $0x4, %eax
cmpb $0xa, %cl
jb 0xa0e9c
xorl %eax, %eax
popq %rbp
retq
| check_mb_gb18030_valid:
push rbp
mov rbp, rsp
sub rsi, rdi
xor eax, eax
cmp rsi, 2
jl short loc_A0E9C
mov cl, [rdi]
inc cl
cmp cl, 82h
jb short loc_A0E9C
mov cl, [rdi+1]
lea eax, [rcx-7Fh]
cmp al, 0C1h
setnb dl
cmp cl, 0FFh
setl r8b
mov eax, 2
or r8b, dl
jnz short loc_A0E9C
cmp rsi, 4
setb al
add cl, 0D0h
cmp cl, 0Ah
setnb cl
or cl, al
jnz short loc_A0E9A
mov al, [rdi+2]
inc al
cmp al, 82h
jb short loc_A0E9A
mov cl, [rdi+3]
add cl, 0D0h
mov eax, 4
cmp cl, 0Ah
jb short loc_A0E9C
loc_A0E9A:
xor eax, eax
loc_A0E9C:
pop rbp
retn
| long long check_mb_gb18030_valid(_BYTE *a1, long long a2)
{
long long v2; // rsi
long long result; // rax
char v4; // cl
v2 = a2 - (_QWORD)a1;
result = 0LL;
if ( v2 >= 2 && (unsigned __int8)(*a1 + 1) >= 0x82u )
{
v4 = a1[1];
result = 2LL;
if ( (unsigned __int8)(v4 - 127) < 0xC1u && v4 >= -1 )
{
if ( (unsigned long long)v2 < 4 || (unsigned __int8)(v4 - 48) >= 0xAu )
return 0LL;
if ( (unsigned __int8)(a1[2] + 1) < 0x82u )
return 0LL;
result = 4LL;
if ( (unsigned __int8)(a1[3] - 48) >= 0xAu )
return 0LL;
}
}
return result;
}
| check_mb_gb18030_valid:
PUSH RBP
MOV RBP,RSP
SUB RSI,RDI
XOR EAX,EAX
CMP RSI,0x2
JL 0x001a0e9c
MOV CL,byte ptr [RDI]
INC CL
CMP CL,0x82
JC 0x001a0e9c
MOV CL,byte ptr [RDI + 0x1]
LEA EAX,[RCX + -0x7f]
CMP AL,0xc1
SETNC DL
CMP CL,0xff
SETL R8B
MOV EAX,0x2
OR R8B,DL
JNZ 0x001a0e9c
CMP RSI,0x4
SETC AL
ADD CL,0xd0
CMP CL,0xa
SETNC CL
OR CL,AL
JNZ 0x001a0e9a
MOV AL,byte ptr [RDI + 0x2]
INC AL
CMP AL,0x82
JC 0x001a0e9a
MOV CL,byte ptr [RDI + 0x3]
ADD CL,0xd0
MOV EAX,0x4
CMP CL,0xa
JC 0x001a0e9c
LAB_001a0e9a:
XOR EAX,EAX
LAB_001a0e9c:
POP RBP
RET
|
int8 check_mb_gb18030_valid(char *param_1,long param_2)
{
char cVar1;
int8 uVar2;
uVar2 = 0;
if ((1 < param_2 - (long)param_1) && (0x81 < (byte)(*param_1 + 1U))) {
cVar1 = param_1[1];
uVar2 = 2;
if ((-2 < cVar1 && (byte)(cVar1 + 0x81U) < 0xc1) &&
(((9 < (byte)(cVar1 - 0x30U) || (ulong)(param_2 - (long)param_1) < 4 ||
((byte)(param_1[2] + 1U) < 0x82)) || (uVar2 = 4, 9 < (byte)(param_1[3] - 0x30U))))) {
uVar2 = 0;
}
}
return uVar2;
}
| |
23,841 | LefDefParser::defiFPC::setName(char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiFPC.cpp | void defiFPC::setName(const char* name, const char* direction) {
int len = strlen(name) + 1;
clear();
if (len > nameLength_) {
if (name_) free(name_);
nameLength_ = len;
name_ = (char*)malloc(len);
}
strcpy(name_, defData->DEFCASE(name));
if (*direction == 'H')
direction_ = 'H';
else if (*direction == 'V')
direction_ = 'V';
else
defiError(0, 6030, "ERROR (DEFPARS-6030): Invalid direction specified with FPC name. The valid direction is either 'H' or 'V'. Specify a valid value and then try again.", defData);
} | O3 | cpp | LefDefParser::defiFPC::setName(char const*, char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x60d0
movq %rax, %r13
incl %r13d
movq %rbx, %rdi
callq 0x1f8a4
movq (%rbx), %r12
cmpl 0x8(%rbx), %r13d
jle 0x1f988
testq %r12, %r12
je 0x1f976
movq %r12, %rdi
callq 0x6220
movl %r13d, 0x8(%rbx)
movslq %r13d, %rdi
callq 0x6270
movq %rax, %r12
movq %rax, (%rbx)
movq 0x38(%rbx), %rdi
movq %r15, %rsi
callq 0x18aa0
movq %r12, %rdi
movq %rax, %rsi
callq 0x6190
movzbl (%r14), %eax
cmpl $0x56, %eax
je 0x1f9b3
cmpl $0x48, %eax
jne 0x1f9c1
movb $0x48, 0xc(%rbx)
jmp 0x1f9b7
movb $0x56, 0xc(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x38(%rbx), %rcx
leaq 0x22e19(%rip), %rdx # 0x427e5
xorl %edi, %edi
movl $0x178e, %esi # imm = 0x178E
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x18f80
nop
| _ZN12LefDefParser7defiFPC7setNameEPKcS2_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
mov r13, rax
inc r13d
mov rdi, rbx; this
call _ZN12LefDefParser7defiFPC5clearEv; LefDefParser::defiFPC::clear(void)
mov r12, [rbx]
cmp r13d, [rbx+8]
jle short loc_1F988
test r12, r12
jz short loc_1F976
mov rdi, r12
call _free
loc_1F976:
mov [rbx+8], r13d
movsxd rdi, r13d
call _malloc
mov r12, rax
mov [rbx], rax
loc_1F988:
mov rdi, [rbx+38h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
movzx eax, byte ptr [r14]
cmp eax, 56h ; 'V'
jz short loc_1F9B3
cmp eax, 48h ; 'H'
jnz short loc_1F9C1
mov byte ptr [rbx+0Ch], 48h ; 'H'
jmp short loc_1F9B7
loc_1F9B3:
mov byte ptr [rbx+0Ch], 56h ; 'V'
loc_1F9B7:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_1F9C1:
mov rcx, [rbx+38h]; LefDefParser::defrData *
lea rdx, aErrorDefpars60_0; "ERROR (DEFPARS-6030): Invalid direction"...
xor edi, edi; this
mov esi, 178Eh; int
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
| long long LefDefParser::defiFPC::setName(LefDefParser::defrData **this, const char *a2, const char *a3)
{
int v4; // r13d
long long v5; // r12
const char *v6; // rax
LefDefParser::defrData *v7; // r8
long long result; // rax
v4 = strlen(a2) + 1;
LefDefParser::defiFPC::clear((LefDefParser::defiFPC *)this);
v5 = (long long)*this;
if ( v4 > *((_DWORD *)this + 2) )
{
if ( v5 )
free(*this);
*((_DWORD *)this + 2) = v4;
v5 = malloc(v4);
*this = (LefDefParser::defrData *)v5;
}
v6 = LefDefParser::defrData::DEFCASE(this[7], a2);
strcpy(v5, v6);
result = *(unsigned __int8 *)a3;
if ( (_DWORD)result == 86 )
{
*((_BYTE *)this + 12) = 86;
}
else if ( (_DWORD)result == 72 )
{
*((_BYTE *)this + 12) = 72;
}
else
{
return LefDefParser::defiError(
0LL,
6030,
"ERROR (DEFPARS-6030): Invalid direction specified with FPC name. The valid direction is either 'H' or 'V'. "
"Specify a valid value and then try again.",
this[7],
v7);
}
return result;
}
| setName:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001060d0
MOV R13,RAX
INC R13D
MOV RDI,RBX
CALL 0x0011f8a4
MOV R12,qword ptr [RBX]
CMP R13D,dword ptr [RBX + 0x8]
JLE 0x0011f988
TEST R12,R12
JZ 0x0011f976
MOV RDI,R12
CALL 0x00106220
LAB_0011f976:
MOV dword ptr [RBX + 0x8],R13D
MOVSXD RDI,R13D
CALL 0x00106270
MOV R12,RAX
MOV qword ptr [RBX],RAX
LAB_0011f988:
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,R15
CALL 0x00118aa0
MOV RDI,R12
MOV RSI,RAX
CALL 0x00106190
MOVZX EAX,byte ptr [R14]
CMP EAX,0x56
JZ 0x0011f9b3
CMP EAX,0x48
JNZ 0x0011f9c1
MOV byte ptr [RBX + 0xc],0x48
JMP 0x0011f9b7
LAB_0011f9b3:
MOV byte ptr [RBX + 0xc],0x56
LAB_0011f9b7:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0011f9c1:
MOV RCX,qword ptr [RBX + 0x38]
LEA RDX,[0x1427e5]
XOR EDI,EDI
MOV ESI,0x178e
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00118f80
|
/* LefDefParser::defiFPC::setName(char const*, char const*) */
void __thiscall LefDefParser::defiFPC::setName(defiFPC *this,char *param_1,char *param_2)
{
size_t sVar1;
char *__dest;
char *__src;
int iVar2;
sVar1 = strlen(param_1);
iVar2 = (int)sVar1 + 1;
clear(this);
__dest = *(char **)this;
if (*(int *)(this + 8) < iVar2) {
if (__dest != (char *)0x0) {
free(__dest);
}
*(int *)(this + 8) = iVar2;
__dest = (char *)malloc((long)iVar2);
*(char **)this = __dest;
}
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x38),param_1);
strcpy(__dest,__src);
if (*param_2 == 'V') {
this[0xc] = (defiFPC)0x56;
}
else {
if (*param_2 != 'H') {
defiError(0,0x178e,
"ERROR (DEFPARS-6030): Invalid direction specified with FPC name. The valid direction is either \'H\' or \'V\'. Specify a valid value and then try again."
,*(defrData **)(this + 0x38));
return;
}
this[0xc] = (defiFPC)0x48;
}
return;
}
| |
23,842 | my_copy_8bit | eloqsql/strings/ctype-simple.c | size_t
my_copy_8bit(CHARSET_INFO *cs __attribute__((unused)),
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
set_if_smaller(src_length, dst_length);
set_if_smaller(src_length, nchars);
if (src_length)
memmove(dst, src, src_length);
status->m_source_end_pos= src + src_length;
status->m_well_formed_error_pos= NULL;
return src_length;
} | O3 | c | my_copy_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq 0x10(%rbp), %r15
cmpq %rdx, %r8
cmovbq %r8, %rbx
cmpq %r9, %rbx
cmovaeq %r9, %rbx
testq %rbx, %rbx
je 0x38099
movq %rsi, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x244b0
addq %rbx, %r14
movq %r14, (%r15)
movq $0x0, 0x8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_copy_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rcx
mov rbx, rdx
mov r15, [rbp+arg_0]
cmp r8, rdx
cmovb rbx, r8
cmp rbx, r9
cmovnb rbx, r9
test rbx, rbx
jz short loc_38099
mov rdi, rsi
mov rsi, r14
mov rdx, rbx
call _memmove
loc_38099:
add r14, rbx
mov [r15], r14
mov qword ptr [r15+8], 0
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| unsigned long long my_copy_8bit(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
unsigned long long a6,
_QWORD *a7)
{
unsigned long long v8; // rbx
v8 = a3;
if ( a5 < a3 )
v8 = a5;
if ( v8 >= a6 )
v8 = a6;
if ( v8 )
memmove(a2, a4, v8);
*a7 = v8 + a4;
a7[1] = 0LL;
return v8;
}
| my_copy_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV RBX,RDX
MOV R15,qword ptr [RBP + 0x10]
CMP R8,RDX
CMOVC RBX,R8
CMP RBX,R9
CMOVNC RBX,R9
TEST RBX,RBX
JZ 0x00138099
MOV RDI,RSI
MOV RSI,R14
MOV RDX,RBX
CALL 0x001244b0
LAB_00138099:
ADD R14,RBX
MOV qword ptr [R15],R14
MOV qword ptr [R15 + 0x8],0x0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
size_t my_copy_8bit(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
ulong param_6,long *param_7)
{
if (param_5 < param_3) {
param_3 = param_5;
}
if (param_6 <= param_3) {
param_3 = param_6;
}
if (param_3 != 0) {
memmove(param_2,param_4,param_3);
}
*param_7 = (long)param_4 + param_3;
param_7[1] = 0;
return param_3;
}
| |
23,843 | ma_init_dynamic_array | eloqsql/libmariadb/libmariadb/ma_array.c | my_bool ma_init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
uint init_alloc, uint alloc_increment CALLER_INFO_PROTO)
{
if (!alloc_increment)
{
alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
if (!init_alloc)
init_alloc=alloc_increment;
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
if (!(array->buffer=(char*) malloc(element_size*init_alloc)))
{
array->max_element=0;
return(TRUE);
}
return(FALSE);
} | O3 | c | ma_init_dynamic_array:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %r8d
movq %rdi, %rbx
testl %ecx, %ecx
jne 0xa05b4
movl $0x10, %ecx
cmpl $0x1e1, %esi # imm = 0x1E1
ja 0xa05a5
movw $0x1ff8, %ax # imm = 0x1FF8
xorl %edx, %edx
divw %si
movzwl %ax, %ecx
cmpl $0x9, %r8d
jb 0xa05b4
leal (%r8,%r8), %eax
cmpl %eax, %ecx
cmovael %eax, %ecx
testl %r8d, %r8d
cmovel %ecx, %r8d
movl $0x0, 0x8(%rbx)
movl %r8d, 0xc(%rbx)
movl %ecx, 0x10(%rbx)
movl %esi, 0x14(%rbx)
imull %esi, %r8d
movq %r8, %rdi
callq 0x39930
movq %rax, (%rbx)
testq %rax, %rax
je 0xa05e4
xorl %eax, %eax
jmp 0xa05ed
movl $0x0, 0xc(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ma_init_dynamic_array:
push rbp
mov rbp, rsp
push rbx
push rax
mov r8d, edx
mov rbx, rdi
test ecx, ecx
jnz short loc_A05B4
mov ecx, 10h
cmp esi, 1E1h
ja short loc_A05A5
mov ax, 1FF8h
xor edx, edx
div si
movzx ecx, ax
loc_A05A5:
cmp r8d, 9
jb short loc_A05B4
lea eax, [r8+r8]
cmp ecx, eax
cmovnb ecx, eax
loc_A05B4:
test r8d, r8d
cmovz r8d, ecx
mov dword ptr [rbx+8], 0
mov [rbx+0Ch], r8d
mov [rbx+10h], ecx
mov [rbx+14h], esi
imul r8d, esi
mov rdi, r8
call _malloc
mov [rbx], rax
test rax, rax
jz short loc_A05E4
xor eax, eax
jmp short loc_A05ED
loc_A05E4:
mov dword ptr [rbx+0Ch], 0
mov al, 1
loc_A05ED:
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_init_dynamic_array(long long a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
unsigned int v4; // r8d
long long v5; // rax
v4 = a3;
if ( !a4 )
{
a4 = 16;
if ( a2 <= 0x1E1 )
a4 = 0x1FF8u / (unsigned __int16)a2;
if ( a3 >= 9 && a4 >= 2 * a3 )
a4 = 2 * a3;
}
if ( !a3 )
v4 = a4;
*(_DWORD *)(a1 + 8) = 0;
*(_DWORD *)(a1 + 12) = v4;
*(_DWORD *)(a1 + 16) = a4;
*(_DWORD *)(a1 + 20) = a2;
v5 = malloc(a2 * v4);
*(_QWORD *)a1 = v5;
if ( v5 )
return 0LL;
*(_DWORD *)(a1 + 12) = 0;
return 1LL;
}
| ma_init_dynamic_array:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV R8D,EDX
MOV RBX,RDI
TEST ECX,ECX
JNZ 0x001a05b4
MOV ECX,0x10
CMP ESI,0x1e1
JA 0x001a05a5
MOV AX,0x1ff8
XOR EDX,EDX
DIV SI
MOVZX ECX,AX
LAB_001a05a5:
CMP R8D,0x9
JC 0x001a05b4
LEA EAX,[R8 + R8*0x1]
CMP ECX,EAX
CMOVNC ECX,EAX
LAB_001a05b4:
TEST R8D,R8D
CMOVZ R8D,ECX
MOV dword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0xc],R8D
MOV dword ptr [RBX + 0x10],ECX
MOV dword ptr [RBX + 0x14],ESI
IMUL R8D,ESI
MOV RDI,R8
CALL 0x00139930
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x001a05e4
XOR EAX,EAX
JMP 0x001a05ed
LAB_001a05e4:
MOV dword ptr [RBX + 0xc],0x0
MOV AL,0x1
LAB_001a05ed:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool ma_init_dynamic_array(int8 *param_1,uint param_2,uint param_3,uint param_4)
{
void *pvVar1;
if (param_4 == 0) {
param_4 = 0x10;
if (param_2 < 0x1e2) {
param_4 = 0x1ff8 / (param_2 & 0xffff);
}
if ((8 < param_3) && (param_3 * 2 <= param_4)) {
param_4 = param_3 * 2;
}
}
if (param_3 == 0) {
param_3 = param_4;
}
*(int4 *)(param_1 + 1) = 0;
*(uint *)((long)param_1 + 0xc) = param_3;
*(uint *)(param_1 + 2) = param_4;
*(uint *)((long)param_1 + 0x14) = param_2;
pvVar1 = malloc((ulong)(param_3 * param_2));
*param_1 = pvVar1;
if (pvVar1 == (void *)0x0) {
*(int4 *)((long)param_1 + 0xc) = 0;
}
return pvVar1 == (void *)0x0;
}
| |
23,844 | aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_thread_stats(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (likely(safe_account != NULL))
{
safe_account->m_disconnected_count++;
}
if (safe_user != NULL)
{
safe_user->m_disconnected_count++;
}
if (safe_host != NULL)
{
safe_host->m_disconnected_count++;
}
/* There is no global table for connections statistics. */
return;
} | O3 | cpp | aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x271c3
incq 0xaa0(%rsi)
testq %rdx, %rdx
je 0x271cf
incq 0x980(%rdx)
testq %rcx, %rcx
je 0x271db
incq 0x8f8(%rcx)
popq %rbp
retq
| _Z22aggregate_thread_statsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
test rsi, rsi
jz short loc_271C3
inc qword ptr [rsi+0AA0h]
loc_271C3:
test rdx, rdx
jz short loc_271CF
inc qword ptr [rdx+980h]
loc_271CF:
test rcx, rcx
jz short loc_271DB
inc qword ptr [rcx+8F8h]
loc_271DB:
pop rbp
retn
| void aggregate_thread_stats(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
if ( a2 )
++*((_QWORD *)a2 + 340);
if ( a3 )
++*((_QWORD *)a3 + 304);
if ( a4 )
++*((_QWORD *)a4 + 287);
}
| aggregate_thread_stats:
PUSH RBP
MOV RBP,RSP
TEST RSI,RSI
JZ 0x001271c3
INC qword ptr [RSI + 0xaa0]
LAB_001271c3:
TEST RDX,RDX
JZ 0x001271cf
INC qword ptr [RDX + 0x980]
LAB_001271cf:
TEST RCX,RCX
JZ 0x001271db
INC qword ptr [RCX + 0x8f8]
LAB_001271db:
POP RBP
RET
|
/* aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_stats
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
if (param_2 != (PFS_account *)0x0) {
*(long *)(param_2 + 0xaa0) = *(long *)(param_2 + 0xaa0) + 1;
}
if (param_3 != (PFS_user *)0x0) {
*(long *)(param_3 + 0x980) = *(long *)(param_3 + 0x980) + 1;
}
if (param_4 != (PFS_host *)0x0) {
*(long *)(param_4 + 0x8f8) = *(long *)(param_4 + 0x8f8) + 1;
}
return;
}
| |
23,845 | ma_bitmap_unlock | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_unlock(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
uint send_signal;
DBUG_ENTER("_ma_bitmap_unlock");
if (!share->now_transactional)
DBUG_VOID_RETURN;
DBUG_ASSERT(bitmap->flush_all_requested > 0 && bitmap->non_flushable == 1);
mysql_mutex_lock(&bitmap->bitmap_lock);
bitmap->non_flushable= 0;
_ma_bitmap_unpin_all(share);
send_signal= bitmap->waiting_for_non_flushable;
if (!--bitmap->flush_all_requested)
send_signal|= bitmap->waiting_for_flush_all_requested;
mysql_mutex_unlock(&bitmap->bitmap_lock);
if (send_signal)
mysql_cond_broadcast(&bitmap->bitmap_cond);
DBUG_VOID_RETURN;
} | O3 | c | ma_bitmap_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x7e7(%rdi)
je 0x55b89
movq %rdi, %rbx
leaq 0xa98(%rdi), %r14
cmpq $0x0, 0xad8(%rdi)
jne 0x55b94
movq %r14, %rdi
callq 0x2a220
movl $0x0, 0xa48(%rbx)
movq %rbx, %rdi
callq 0x55bd1
movl 0xa4c(%rbx), %r15d
decl 0xa40(%rbx)
jne 0x55b4b
orl 0xa44(%rbx), %r15d
movq 0xad8(%rbx), %rdi
testq %rdi, %rdi
jne 0x55bad
movq %r14, %rdi
callq 0x2a1e0
testl %r15d, %r15d
je 0x55b89
movq 0xb10(%rbx), %rdi
addq $0xae0, %rbx # imm = 0xAE0
testq %rdi, %rdi
jne 0x55bbf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a760
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c2c0(%rip), %rsi # 0xe1e5b
movq %r14, %rdi
movl $0x279, %edx # imm = 0x279
callq 0x30603
jmp 0x55b23
leaq 0x3396a4(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x55b57
leaq 0x339692(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x55b77
| _ma_bitmap_unlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi+7E7h], 0
jz loc_55B89
mov rbx, rdi
lea r14, [rdi+0A98h]
cmp qword ptr [rdi+0AD8h], 0
jnz short loc_55B94
mov rdi, r14
call _pthread_mutex_lock
loc_55B23:
mov dword ptr [rbx+0A48h], 0
mov rdi, rbx
call _ma_bitmap_unpin_all
mov r15d, [rbx+0A4Ch]
dec dword ptr [rbx+0A40h]
jnz short loc_55B4B
or r15d, [rbx+0A44h]
loc_55B4B:
mov rdi, [rbx+0AD8h]
test rdi, rdi
jnz short loc_55BAD
loc_55B57:
mov rdi, r14
call _pthread_mutex_unlock
test r15d, r15d
jz short loc_55B89
mov rdi, [rbx+0B10h]
add rbx, 0AE0h
test rdi, rdi
jnz short loc_55BBF
loc_55B77:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_cond_broadcast
loc_55B89:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_55B94:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 279h
call psi_mutex_lock
jmp loc_55B23
loc_55BAD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_55B57
loc_55BBF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp short loc_55B77
| long long ma_bitmap_unlock(long long a1)
{
long long v2; // r14
int v3; // r15d
long long v5; // rdi
long long result; // rax
long long v7; // rdi
long long v8; // rbx
if ( *(_BYTE *)(a1 + 2023) )
{
v2 = a1 + 2712;
if ( *(_QWORD *)(a1 + 2776) )
psi_mutex_lock(a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x279u);
else
pthread_mutex_lock(a1 + 2712);
*(_DWORD *)(a1 + 2632) = 0;
ma_bitmap_unpin_all(a1);
v3 = *(_DWORD *)(a1 + 2636);
if ( (*(_DWORD *)(a1 + 2624))-- == 1 )
v3 |= *(_DWORD *)(a1 + 2628);
v5 = *(_QWORD *)(a1 + 2776);
if ( v5 )
((void ( *)(long long))PSI_server[44])(v5);
result = pthread_mutex_unlock(v2);
if ( v3 )
{
v7 = *(_QWORD *)(a1 + 2832);
v8 = a1 + 2784;
if ( v7 )
((void ( *)(long long))PSI_server[47])(v7);
return pthread_cond_broadcast(v8);
}
}
return result;
}
| _ma_bitmap_unlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI + 0x7e7],0x0
JZ 0x00155b89
MOV RBX,RDI
LEA R14,[RDI + 0xa98]
CMP qword ptr [RDI + 0xad8],0x0
JNZ 0x00155b94
MOV RDI,R14
CALL 0x0012a220
LAB_00155b23:
MOV dword ptr [RBX + 0xa48],0x0
MOV RDI,RBX
CALL 0x00155bd1
MOV R15D,dword ptr [RBX + 0xa4c]
DEC dword ptr [RBX + 0xa40]
JNZ 0x00155b4b
OR R15D,dword ptr [RBX + 0xa44]
LAB_00155b4b:
MOV RDI,qword ptr [RBX + 0xad8]
TEST RDI,RDI
JNZ 0x00155bad
LAB_00155b57:
MOV RDI,R14
CALL 0x0012a1e0
TEST R15D,R15D
JZ 0x00155b89
MOV RDI,qword ptr [RBX + 0xb10]
ADD RBX,0xae0
TEST RDI,RDI
JNZ 0x00155bbf
LAB_00155b77:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0012a760
LAB_00155b89:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00155b94:
LEA RSI,[0x1e1e5b]
MOV RDI,R14
MOV EDX,0x279
CALL 0x00130603
JMP 0x00155b23
LAB_00155bad:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00155b57
LAB_00155bbf:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00155b77
|
void _ma_bitmap_unlock(long param_1)
{
pthread_mutex_t *__mutex;
int *piVar1;
uint uVar2;
if (*(char *)(param_1 + 0x7e7) != '\0') {
__mutex = (pthread_mutex_t *)(param_1 + 0xa98);
if (*(long *)(param_1 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x279);
}
*(int4 *)(param_1 + 0xa48) = 0;
_ma_bitmap_unpin_all(param_1);
uVar2 = *(uint *)(param_1 + 0xa4c);
piVar1 = (int *)(param_1 + 0xa40);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
uVar2 = uVar2 | *(uint *)(param_1 + 0xa44);
}
if (*(long *)(param_1 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (uVar2 != 0) {
if (*(long *)(param_1 + 0xb10) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xae0));
return;
}
}
return;
}
| |
23,846 | my_wc_to_printable_8bit | eloqsql/strings/ctype.c | int
my_wc_to_printable_8bit(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end)
{
/*
Special case: swe7 does not have the backslash character.
Use dot instead of backslash for escaping.
*/
uint bs= cs->tab_to_uni && cs->tab_to_uni['\\'] != '\\' ? '.' : '\\';
DBUG_ASSERT(cs->mbminlen == 1);
/*
Additionally, if the original swe7 string contains backslashes,
replace them to dots, so this error message:
Invalid swe7 character string: '\xEF\xBC\xB4'
is displayed as:
Invalid swe7 character string: '.xEF.xBC.xB4'
which is more readable than what would happen without '\'-to-dot mapping:
Invalid swe7 character string: '.005CxEF.005CxBC.005CxB4'
*/
if (bs == '.' && wc == '\\')
wc= '.';
return my_wc_to_printable_ex(cs, wc, str, end, bs, 1, 1);
} | O3 | c | my_wc_to_printable_8bit:
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0xd1a65
cmpw $0x5c, 0xb8(%rax)
setne %al
movl $0x2e, %r9d
movl $0x5c, %r8d
cmovnel %r9d, %r8d
jmp 0xd1a6d
movl $0x5c, %r8d
xorl %eax, %eax
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb %al, %al
movl $0x2e, %eax
cmoveq %rsi, %rax
cmpq $0x5c, %rsi
cmovneq %rsi, %rax
movl $0x1, (%rsp)
movq %rax, %rsi
movl $0x1, %r9d
callq 0xd1898
addq $0x10, %rsp
popq %rbp
retq
| my_wc_to_printable_8bit:
mov rax, [rdi+68h]
test rax, rax
jz short loc_D1A65
cmp word ptr [rax+0B8h], 5Ch ; '\'
setnz al
mov r9d, 2Eh ; '.'
mov r8d, 5Ch ; '\'
cmovnz r8d, r9d
jmp short loc_D1A6D
loc_D1A65:
mov r8d, 5Ch ; '\'
xor eax, eax
loc_D1A6D:
push rbp
mov rbp, rsp
sub rsp, 10h
test al, al
mov eax, 2Eh ; '.'
cmovz rax, rsi
cmp rsi, 5Ch ; '\'
cmovnz rax, rsi
mov [rsp+18h+var_18], 1
mov rsi, rax
mov r9d, 1
call my_wc_to_printable_ex
add rsp, 10h
pop rbp
retn
| long long my_wc_to_printable_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long v4; // rax
bool v5; // zf
bool v6; // al
char v7; // r8
unsigned long long v8; // rax
v4 = *(_QWORD *)(a1 + 104);
if ( v4 )
{
v5 = *(_WORD *)(v4 + 184) == 92;
v6 = *(_WORD *)(v4 + 184) != 92;
v7 = 92;
if ( !v5 )
v7 = 46;
}
else
{
v7 = 92;
v6 = 0;
}
v5 = !v6;
v8 = 46LL;
if ( v5 )
v8 = a2;
if ( a2 != 92 )
v8 = a2;
return my_wc_to_printable_ex(a1, v8, a3, a4, v7, 1u, 1u);
}
| my_wc_to_printable_8bit:
MOV RAX,qword ptr [RDI + 0x68]
TEST RAX,RAX
JZ 0x001d1a65
CMP word ptr [RAX + 0xb8],0x5c
SETNZ AL
MOV R9D,0x2e
MOV R8D,0x5c
CMOVNZ R8D,R9D
JMP 0x001d1a6d
LAB_001d1a65:
MOV R8D,0x5c
XOR EAX,EAX
LAB_001d1a6d:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
TEST AL,AL
MOV EAX,0x2e
CMOVZ RAX,RSI
CMP RSI,0x5c
CMOVNZ RAX,RSI
MOV dword ptr [RSP],0x1
MOV RSI,RAX
MOV R9D,0x1
CALL 0x001d1898
ADD RSP,0x10
POP RBP
RET
|
void my_wc_to_printable_8bit(long param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int8 uVar2;
bool bVar3;
if (*(long *)(param_1 + 0x68) == 0) {
uVar2 = 0x5c;
bVar3 = false;
}
else {
bVar3 = *(short *)(*(long *)(param_1 + 0x68) + 0xb8) != 0x5c;
uVar2 = 0x5c;
if (bVar3) {
uVar2 = 0x2e;
}
}
lVar1 = 0x2e;
if (!bVar3) {
lVar1 = param_2;
}
if (param_2 != 0x5c) {
lVar1 = param_2;
}
my_wc_to_printable_ex(param_1,lVar1,param_3,param_4,uVar2,1,1);
return;
}
| |
23,847 | js_map_iterator_next | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSMapIteratorData *it;
JSMapState *s;
JSMapRecord *mr;
struct list_head *el;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP_ITERATOR + magic);
if (!it) {
*pdone = FALSE;
return JS_EXCEPTION;
}
if (JS_IsUndefined(it->obj))
goto done;
s = JS_GetOpaque(it->obj, JS_CLASS_MAP + magic);
assert(s != NULL);
if (!it->cur_record) {
el = s->records.next;
} else {
mr = it->cur_record;
el = mr->link.next;
map_decref_record(ctx->rt, mr); /* the record can be freed here */
}
for(;;) {
if (el == &s->records) {
/* no more record */
it->cur_record = NULL;
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
/* end of enumeration */
*pdone = TRUE;
return JS_UNDEFINED;
}
mr = list_entry(el, JSMapRecord, link);
if (!mr->empty)
break;
/* get the next record */
el = mr->link.next;
}
/* lock the record so that it won't be freed */
mr->ref_count++;
it->cur_record = mr;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_dup(mr->key);
} else {
JSValue args[2];
args[0] = mr->key;
if (magic)
args[1] = mr->key;
else
args[1] = mr->value;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return js_dup(args[1]);
} else {
return js_create_array(ctx, 2, args);
}
}
} | O0 | c | js_map_iterator_next:
subq $0x98, %rsp
movl 0xa0(%rsp), %eax
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movq 0x70(%rsp), %rdi
movl 0xa0(%rsp), %ecx
addl $0x2a, %ecx
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x370f0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x8f613
movq 0x58(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x8f842
movq 0x50(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0x8f62e
jmp 0x8f6f8
movq 0x50(%rsp), %rax
movl 0xa0(%rsp), %edx
addl $0x23, %edx
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x37090
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x8f66a
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x8f699
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x5aec0
jmp 0x8f69b
movq 0x38(%rsp), %rax
movq 0x48(%rsp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x8f71f
movq 0x50(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x229d0
movq 0x50(%rsp), %rax
movl $0x0, 0x28(%rsp)
movq $0x3, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rax
movl $0x1, (%rax)
movl $0x0, 0x88(%rsp)
movq $0x3, 0x90(%rsp)
jmp 0x8f842
movq 0x38(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x8f73a
jmp 0x8f74d
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x8f69b
movq 0x40(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x58(%rsp), %rax
movl $0x0, (%rax)
movq 0x50(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x8f7a4
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x20410
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
jmp 0x8f842
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rcx
movq %rcx, (%rsp)
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xa0(%rsp)
je 0x8f7dd
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x38(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x8f7f4
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x48(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x8f820
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x20410
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
jmp 0x8f842
movq 0x70(%rsp), %rdi
movq %rsp, %rdx
movl $0x2, %esi
callq 0x6f590
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw (%rax,%rax)
| js_map_iterator_next:
sub rsp, 98h
mov eax, [rsp+98h+arg_0]
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov [rsp+98h+var_40], r9
mov rdi, [rsp+98h+var_28]
mov ecx, [rsp+98h+arg_0]
add ecx, 2Ah ; '*'
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
call JS_GetOpaque2
mov [rsp+98h+var_48], rax
cmp [rsp+98h+var_48], 0
jnz short loc_8F613
mov rax, [rsp+98h+var_40]
mov dword ptr [rax], 0
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_8F842
loc_8F613:
mov rax, [rsp+98h+var_48]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_8F62E
jmp loc_8F6F8
loc_8F62E:
mov rax, [rsp+98h+var_48]
mov edx, [rsp+98h+arg_0]
add edx, 23h ; '#'
mov rdi, [rax]
mov rsi, [rax+8]
call JS_GetOpaque
mov [rsp+98h+var_50], rax
mov rax, [rsp+98h+var_48]
cmp qword ptr [rax+18h], 0
jnz short loc_8F66A
mov rax, [rsp+98h+var_50]
mov rax, [rax+10h]
mov [rsp+98h+var_60], rax
jmp short loc_8F699
loc_8F66A:
mov rax, [rsp+98h+var_48]
mov rax, [rax+18h]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_58]
mov rax, [rax+18h]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_28]
mov rdi, [rax+18h]
mov rsi, [rsp+98h+var_58]
call map_decref_record
loc_8F699:
jmp short $+2
loc_8F69B:
mov rax, [rsp+98h+var_60]
mov rcx, [rsp+98h+var_50]
add rcx, 8
cmp rax, rcx
jnz short loc_8F71F
mov rax, [rsp+98h+var_48]
mov qword ptr [rax+18h], 0
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_48]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov rax, [rsp+98h+var_48]
mov dword ptr [rsp+98h+var_70], 0
mov [rsp+98h+var_68], 3
mov rcx, [rsp+98h+var_70]
mov [rax], rcx
mov rcx, [rsp+98h+var_68]
mov [rax+8], rcx
loc_8F6F8:
mov rax, [rsp+98h+var_40]
mov dword ptr [rax], 1
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 3
jmp loc_8F842
loc_8F71F:
mov rax, [rsp+98h+var_60]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_58]
cmp dword ptr [rax+4], 0
jnz short loc_8F73A
jmp short loc_8F74D
loc_8F73A:
mov rax, [rsp+98h+var_58]
mov rax, [rax+18h]
mov [rsp+98h+var_60], rax
jmp loc_8F69B
loc_8F74D:
mov rax, [rsp+98h+var_58]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
mov rcx, [rsp+98h+var_58]
mov rax, [rsp+98h+var_48]
mov [rax+18h], rcx
mov rax, [rsp+98h+var_40]
mov dword ptr [rax], 0
mov rax, [rsp+98h+var_48]
cmp dword ptr [rax+10h], 0
jnz short loc_8F7A4
mov rax, [rsp+98h+var_58]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call js_dup
mov [rsp+98h+var_10], rax
mov [rsp+98h+var_8], rdx
jmp loc_8F842
loc_8F7A4:
mov rax, [rsp+98h+var_58]
mov rcx, [rax+30h]
mov [rsp+98h+var_98], rcx
mov rax, [rax+38h]
mov [rsp+98h+var_90], rax
cmp [rsp+98h+arg_0], 0
jz short loc_8F7DD
mov rax, [rsp+98h+var_58]
mov rcx, [rax+30h]
mov [rsp+98h+var_88], rcx
mov rax, [rax+38h]
mov [rsp+98h+var_80], rax
jmp short loc_8F7F4
loc_8F7DD:
mov rax, [rsp+98h+var_58]
mov rcx, [rax+40h]
mov [rsp+98h+var_88], rcx
mov rax, [rax+48h]
mov [rsp+98h+var_80], rax
loc_8F7F4:
mov rax, [rsp+98h+var_48]
cmp dword ptr [rax+10h], 1
jnz short loc_8F820
mov rdi, [rsp+98h+var_88]
mov rsi, [rsp+98h+var_80]
call js_dup
mov [rsp+98h+var_10], rax
mov [rsp+98h+var_8], rdx
jmp short loc_8F842
loc_8F820:
mov rdi, [rsp+98h+var_28]
mov rdx, rsp
mov esi, 2
call js_create_array
mov [rsp+98h+var_10], rax
mov [rsp+98h+var_8], rdx
loc_8F842:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long js_map_iterator_next(long long a1, long long a2, long long a3, int a4, long long a5, _DWORD *a6, int a7)
{
long long v7; // rax
long long v8; // rdx
long long v9; // rdx
_QWORD v11[2]; // [rsp+0h] [rbp-98h] BYREF
_DWORD *v12; // [rsp+10h] [rbp-88h]
long long v13; // [rsp+18h] [rbp-80h]
long long v14; // [rsp+28h] [rbp-70h]
long long v15; // [rsp+30h] [rbp-68h]
long long v16; // [rsp+38h] [rbp-60h]
long long v17; // [rsp+40h] [rbp-58h]
long long Opaque; // [rsp+48h] [rbp-50h]
long long Opaque2; // [rsp+50h] [rbp-48h]
_DWORD *v20; // [rsp+58h] [rbp-40h]
long long v21; // [rsp+60h] [rbp-38h]
int v22; // [rsp+6Ch] [rbp-2Ch]
long long v23; // [rsp+70h] [rbp-28h]
long long v24; // [rsp+78h] [rbp-20h]
long long v25; // [rsp+80h] [rbp-18h]
long long array; // [rsp+88h] [rbp-10h]
long long v27; // [rsp+90h] [rbp-8h]
v24 = a2;
v25 = a3;
v23 = a1;
v22 = a4;
v21 = a5;
v20 = a6;
Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 42);
if ( Opaque2 )
{
if ( JS_IsUndefined_0(*(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8)) )
{
LABEL_9:
*v20 = 1;
LODWORD(array) = 0;
v27 = 3LL;
}
else
{
Opaque = JS_GetOpaque(*(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8), a7 + 35);
if ( *(_QWORD *)(Opaque2 + 24) )
{
v17 = *(_QWORD *)(Opaque2 + 24);
v16 = *(_QWORD *)(v17 + 24);
map_decref_record(*(_QWORD *)(v23 + 24), v17);
}
else
{
v16 = *(_QWORD *)(Opaque + 16);
}
while ( 1 )
{
if ( v16 == Opaque + 8 )
{
*(_QWORD *)(Opaque2 + 24) = 0LL;
JS_FreeValue(v23, *(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8));
v7 = Opaque2;
LODWORD(v14) = 0;
v15 = 3LL;
*(_QWORD *)Opaque2 = v14;
*(_QWORD *)(v7 + 8) = v15;
goto LABEL_9;
}
v17 = v16 - 16;
if ( !*(_DWORD *)(v16 - 16 + 4) )
break;
v16 = *(_QWORD *)(v17 + 24);
}
++*(_DWORD *)v17;
*(_QWORD *)(Opaque2 + 24) = v17;
*v20 = 0;
if ( *(_DWORD *)(Opaque2 + 16) )
{
v11[0] = *(_QWORD *)(v17 + 48);
v11[1] = *(_QWORD *)(v17 + 56);
if ( a7 )
{
v12 = *(_DWORD **)(v17 + 48);
v13 = *(_QWORD *)(v17 + 56);
}
else
{
v12 = *(_DWORD **)(v17 + 64);
v13 = *(_QWORD *)(v17 + 72);
}
if ( *(_DWORD *)(Opaque2 + 16) == 1 )
array = (long long)js_dup(v12, v13);
else
array = js_create_array(v23, 2, (long long)v11);
v27 = v9;
}
else
{
array = (long long)js_dup(*(_DWORD **)(v17 + 48), *(_QWORD *)(v17 + 56));
v27 = v8;
}
}
}
else
{
*v20 = 0;
LODWORD(array) = 0;
v27 = 6LL;
}
return array;
}
| js_map_iterator_next:
SUB RSP,0x98
MOV EAX,dword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV qword ptr [RSP + 0x58],R9
MOV RDI,qword ptr [RSP + 0x70]
MOV ECX,dword ptr [RSP + 0xa0]
ADD ECX,0x2a
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x001370f0
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x0018f613
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX],0x0
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x0018f842
LAB_0018f613:
MOV RAX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x0018f62e
JMP 0x0018f6f8
LAB_0018f62e:
MOV RAX,qword ptr [RSP + 0x50]
MOV EDX,dword ptr [RSP + 0xa0]
ADD EDX,0x23
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00137090
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x50]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x0018f66a
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0018f699
LAB_0018f66a:
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0015aec0
LAB_0018f699:
JMP 0x0018f69b
LAB_0018f69b:
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x48]
ADD RCX,0x8
CMP RAX,RCX
JNZ 0x0018f71f
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x18],0x0
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x3
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
LAB_0018f6f8:
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX],0x1
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x3
JMP 0x0018f842
LAB_0018f71f:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,-0x10
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x0018f73a
JMP 0x0018f74d
LAB_0018f73a:
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0018f69b
LAB_0018f74d:
MOV RAX,qword ptr [RSP + 0x40]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x0018f7a4
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x00120410
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
JMP 0x0018f842
LAB_0018f7a4:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP],RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xa0],0x0
JZ 0x0018f7dd
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0018f7f4
LAB_0018f7dd:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x18],RAX
LAB_0018f7f4:
MOV RAX,qword ptr [RSP + 0x50]
CMP dword ptr [RAX + 0x10],0x1
JNZ 0x0018f820
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00120410
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
JMP 0x0018f842
LAB_0018f820:
MOV RDI,qword ptr [RSP + 0x70]
MOV RDX,RSP
MOV ESI,0x2
CALL 0x0016f590
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
LAB_0018f842:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_map_iterator_next
(long param_1,int8 param_2,int8 param_3,int4 param_4,int8 param_5,
int4 *param_6,int param_7)
{
int iVar1;
int1 auVar2 [16];
int8 local_98;
int8 local_90;
int8 local_88;
int8 local_80;
uint uStack_6c;
long local_60;
int *local_58;
long local_50;
long *local_48;
int4 *local_40;
int8 local_38;
int4 local_2c;
long local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = (long *)JS_GetOpaque2(param_1,param_2,param_3,param_7 + 0x2a);
if (local_48 == (long *)0x0) {
*local_40 = 0;
local_10 = 0;
local_8 = 6;
}
else {
iVar1 = JS_IsUndefined(*local_48,local_48[1]);
if (iVar1 == 0) {
local_50 = JS_GetOpaque(*local_48,local_48[1],param_7 + 0x23);
if (local_48[3] == 0) {
local_60 = *(long *)(local_50 + 0x10);
}
else {
local_58 = (int *)local_48[3];
local_60 = *(long *)(local_58 + 6);
map_decref_record(*(int8 *)(local_28 + 0x18),local_58);
}
for (; local_60 != local_50 + 8; local_60 = *(long *)(local_60 + 8)) {
local_58 = (int *)(local_60 + -0x10);
if (*(int *)(local_60 + -0xc) == 0) {
*local_58 = *local_58 + 1;
local_48[3] = (long)local_58;
*local_40 = 0;
if ((int)local_48[2] == 0) {
auVar2 = js_dup(*(int8 *)(local_60 + 0x20),*(int8 *)(local_60 + 0x28));
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else {
local_98 = *(int8 *)(local_60 + 0x20);
local_90 = *(int8 *)(local_60 + 0x28);
if (param_7 == 0) {
local_88 = *(int8 *)(local_60 + 0x30);
local_80 = *(int8 *)(local_60 + 0x38);
}
else {
local_88 = *(int8 *)(local_60 + 0x20);
local_80 = *(int8 *)(local_60 + 0x28);
}
if ((int)local_48[2] == 1) {
auVar2 = js_dup(local_88,local_80);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else {
auVar2 = js_create_array(local_28,2,&local_98);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
}
goto LAB_0018f842;
}
}
local_48[3] = 0;
JS_FreeValue(local_28,*local_48,local_48[1]);
*local_48 = (ulong)uStack_6c << 0x20;
local_48[1] = 3;
}
*local_40 = 1;
local_10 = 0;
local_8 = 3;
}
LAB_0018f842:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
23,848 | js_map_iterator_next | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSMapIteratorData *it;
JSMapState *s;
JSMapRecord *mr;
struct list_head *el;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP_ITERATOR + magic);
if (!it) {
*pdone = FALSE;
return JS_EXCEPTION;
}
if (JS_IsUndefined(it->obj))
goto done;
s = JS_GetOpaque(it->obj, JS_CLASS_MAP + magic);
assert(s != NULL);
if (!it->cur_record) {
el = s->records.next;
} else {
mr = it->cur_record;
el = mr->link.next;
map_decref_record(ctx->rt, mr); /* the record can be freed here */
}
for(;;) {
if (el == &s->records) {
/* no more record */
it->cur_record = NULL;
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
/* end of enumeration */
*pdone = TRUE;
return JS_UNDEFINED;
}
mr = list_entry(el, JSMapRecord, link);
if (!mr->empty)
break;
/* get the next record */
el = mr->link.next;
}
/* lock the record so that it won't be freed */
mr->ref_count++;
it->cur_record = mr;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_dup(mr->key);
} else {
JSValue args[2];
args[0] = mr->key;
if (magic)
args[1] = mr->key;
else
args[1] = mr->value;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return js_dup(args[1]);
} else {
return js_create_array(ctx, 2, args);
}
}
} | O1 | c | js_map_iterator_next:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %rdi, %rbx
movl 0x60(%rsp), %r12d
leal 0x2a(%r12), %ecx
callq 0x269a1
testq %rax, %rax
je 0x5143b
movq %rax, %r15
movl 0x8(%rax), %eax
cmpq $0x3, %rax
je 0x514a4
movsd (%r15), %xmm0
movsd %xmm0, (%rsp)
cmpl $-0x1, %eax
jne 0x51449
leal 0x23(%r12), %ecx
movq (%rsp), %rax
movzwl 0x6(%rax), %edx
cmpl %edx, %ecx
jne 0x51449
movq 0x30(%rax), %r13
jmp 0x5144c
movl $0x0, (%r14)
movl $0x6, %edx
jmp 0x514b0
xorl %r13d, %r13d
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x51464
movq 0x18(%rsi), %rbp
movq 0x18(%rbx), %rdi
callq 0x3a863
jmp 0x51468
movq 0x10(%r13), %rbp
addq $0x8, %r13
cmpq %r13, %rbp
je 0x5147d
cmpl $0x0, -0xc(%rbp)
je 0x514c9
movq 0x8(%rbp), %rbp
jmp 0x5146c
movq $0x0, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movl $0x0, (%r15)
movq $0x3, 0x8(%r15)
movl $0x1, (%r14)
movl $0x3, %edx
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
leaq -0x10(%rbp), %rax
incl -0x10(%rbp)
movq %rax, 0x18(%r15)
movl $0x0, (%r14)
movl 0x10(%r15), %eax
testl %eax, %eax
je 0x5152d
leaq 0x20(%rbp), %rcx
movups 0x20(%rbp), %xmm0
addq $0x30, %rbp
testl %r12d, %r12d
cmovneq %rcx, %rbp
movaps %xmm0, (%rsp)
movups (%rbp), %xmm0
movaps %xmm0, 0x10(%rsp)
cmpl $0x1, %eax
jne 0x5154c
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
movq %rax, 0x20(%rsp)
cmpl $-0x9, %edx
jb 0x51544
movq 0x20(%rsp), %rcx
jmp 0x51542
movq 0x20(%rbp), %rax
movq 0x28(%rbp), %rdx
movq %rax, (%rsp)
cmpl $-0x9, %edx
jb 0x51544
movq (%rsp), %rcx
incl (%rcx)
andq %rax, %r13
jmp 0x514b5
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10a79
jmp 0x51544
| js_map_iterator_next:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov rbx, rdi
mov r12d, [rsp+58h+arg_0]
lea ecx, [r12+2Ah]
call JS_GetOpaque2
test rax, rax
jz short loc_5143B
mov r15, rax
mov eax, [rax+8]
cmp rax, 3
jz loc_514A4
movsd xmm0, qword ptr [r15]
movsd qword ptr [rsp+58h+var_58], xmm0
cmp eax, 0FFFFFFFFh
jnz short loc_51449
lea ecx, [r12+23h]
mov rax, qword ptr [rsp+58h+var_58]
movzx edx, word ptr [rax+6]
cmp ecx, edx
jnz short loc_51449
mov r13, [rax+30h]
jmp short loc_5144C
loc_5143B:
mov dword ptr [r14], 0
mov edx, 6
jmp short loc_514B0
loc_51449:
xor r13d, r13d
loc_5144C:
mov rsi, [r15+18h]
test rsi, rsi
jz short loc_51464
mov rbp, [rsi+18h]
mov rdi, [rbx+18h]
call map_decref_record
jmp short loc_51468
loc_51464:
mov rbp, [r13+10h]
loc_51468:
add r13, 8
loc_5146C:
cmp rbp, r13
jz short loc_5147D
cmp dword ptr [rbp-0Ch], 0
jz short loc_514C9
mov rbp, [rbp+8]
jmp short loc_5146C
loc_5147D:
mov qword ptr [r15+18h], 0
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov dword ptr [r15], 0
mov qword ptr [r15+8], 3
loc_514A4:
mov dword ptr [r14], 1
mov edx, 3
loc_514B0:
xor eax, eax
xor r13d, r13d
loc_514B5:
mov eax, eax
or rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_514C9:
mov r13, 0FFFFFFFF00000000h
lea rax, [rbp-10h]
inc dword ptr [rbp-10h]
mov [r15+18h], rax
mov dword ptr [r14], 0
mov eax, [r15+10h]
test eax, eax
jz short loc_5152D
lea rcx, [rbp+20h]
movups xmm0, xmmword ptr [rbp+20h]
add rbp, 30h ; '0'
test r12d, r12d
cmovnz rbp, rcx
movaps [rsp+58h+var_58], xmm0
movups xmm0, xmmword ptr [rbp+0]
movaps [rsp+58h+var_48], xmm0
cmp eax, 1
jnz short loc_5154C
mov rax, qword ptr [rsp+58h+var_48]
mov rdx, qword ptr [rsp+58h+var_48+8]
mov [rsp+58h+var_38], rax
cmp edx, 0FFFFFFF7h
jb short loc_51544
mov rcx, [rsp+58h+var_38]
jmp short loc_51542
loc_5152D:
mov rax, [rbp+20h]
mov rdx, [rbp+28h]
mov qword ptr [rsp+58h+var_58], rax
cmp edx, 0FFFFFFF7h
jb short loc_51544
mov rcx, qword ptr [rsp+58h+var_58]
loc_51542:
inc dword ptr [rcx]
loc_51544:
and r13, rax
jmp loc_514B5
loc_5154C:
mov rdx, rsp
mov rdi, rbx
mov esi, 2
call js_create_array
jmp short loc_51544
| unsigned long long js_map_iterator_next(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
_DWORD *a6,
int a7)
{
long long Opaque2; // rax
long long v9; // r15
long long v10; // rax
long long v11; // r13
long long v12; // rsi
long long v13; // rbp
long long v14; // r13
unsigned long long array; // rax
unsigned long long v16; // r13
int v18; // eax
__int128 *v19; // rcx
__int128 v20; // xmm0
__int128 *v21; // rbp
_DWORD *v22; // rcx
long long v23; // rdx
__int128 v24; // [rsp+0h] [rbp-58h] BYREF
__int128 v25; // [rsp+10h] [rbp-48h]
_DWORD *v26; // [rsp+20h] [rbp-38h]
Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 42);
if ( Opaque2 )
{
v9 = Opaque2;
v10 = *(unsigned int *)(Opaque2 + 8);
if ( v10 != 3 )
{
*(_QWORD *)&v24 = *(_QWORD *)v9;
if ( (_DWORD)v10 == -1 && a7 + 35 == *(unsigned __int16 *)(v24 + 6) )
v11 = *(_QWORD *)(v24 + 48);
else
v11 = 0LL;
v12 = *(_QWORD *)(v9 + 24);
if ( v12 )
{
v13 = *(_QWORD *)(v12 + 24);
map_decref_record(*(_QWORD *)(a1 + 24), v12);
}
else
{
v13 = *(_QWORD *)(v11 + 16);
}
v14 = v11 + 8;
while ( 1 )
{
if ( v13 == v14 )
{
*(_QWORD *)(v9 + 24) = 0LL;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)v9, *(_QWORD *)(v9 + 8));
*(_DWORD *)v9 = 0;
*(_QWORD *)(v9 + 8) = 3LL;
goto LABEL_16;
}
if ( !*(_DWORD *)(v13 - 12) )
break;
v13 = *(_QWORD *)(v13 + 8);
}
++*(_DWORD *)(v13 - 16);
*(_QWORD *)(v9 + 24) = v13 - 16;
*a6 = 0;
v18 = *(_DWORD *)(v9 + 16);
if ( v18 )
{
v19 = (__int128 *)(v13 + 32);
v20 = *(_OWORD *)(v13 + 32);
v21 = (__int128 *)(v13 + 48);
if ( a7 )
v21 = v19;
v24 = v20;
v25 = *v21;
if ( v18 != 1 )
{
array = js_create_array(a1, 2, (long long)&v24);
goto LABEL_28;
}
array = v25;
v26 = (_DWORD *)v25;
if ( DWORD2(v25) >= 0xFFFFFFF7 )
{
v22 = v26;
LABEL_27:
++*v22;
}
}
else
{
array = *(_QWORD *)(v13 + 32);
v23 = *(_QWORD *)(v13 + 40);
*(_QWORD *)&v24 = array;
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
{
v22 = (_DWORD *)v24;
goto LABEL_27;
}
}
LABEL_28:
v16 = array & 0xFFFFFFFF00000000LL;
return v16 | (unsigned int)array;
}
LABEL_16:
*a6 = 1;
}
else
{
*a6 = 0;
}
LODWORD(array) = 0;
v16 = 0LL;
return v16 | (unsigned int)array;
}
| js_map_iterator_next:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV RBX,RDI
MOV R12D,dword ptr [RSP + 0x60]
LEA ECX,[R12 + 0x2a]
CALL 0x001269a1
TEST RAX,RAX
JZ 0x0015143b
MOV R15,RAX
MOV EAX,dword ptr [RAX + 0x8]
CMP RAX,0x3
JZ 0x001514a4
MOVSD XMM0,qword ptr [R15]
MOVSD qword ptr [RSP],XMM0
CMP EAX,-0x1
JNZ 0x00151449
LEA ECX,[R12 + 0x23]
MOV RAX,qword ptr [RSP]
MOVZX EDX,word ptr [RAX + 0x6]
CMP ECX,EDX
JNZ 0x00151449
MOV R13,qword ptr [RAX + 0x30]
JMP 0x0015144c
LAB_0015143b:
MOV dword ptr [R14],0x0
MOV EDX,0x6
JMP 0x001514b0
LAB_00151449:
XOR R13D,R13D
LAB_0015144c:
MOV RSI,qword ptr [R15 + 0x18]
TEST RSI,RSI
JZ 0x00151464
MOV RBP,qword ptr [RSI + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0013a863
JMP 0x00151468
LAB_00151464:
MOV RBP,qword ptr [R13 + 0x10]
LAB_00151468:
ADD R13,0x8
LAB_0015146c:
CMP RBP,R13
JZ 0x0015147d
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001514c9
MOV RBP,qword ptr [RBP + 0x8]
JMP 0x0015146c
LAB_0015147d:
MOV qword ptr [R15 + 0x18],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV dword ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x3
LAB_001514a4:
MOV dword ptr [R14],0x1
MOV EDX,0x3
LAB_001514b0:
XOR EAX,EAX
XOR R13D,R13D
LAB_001514b5:
MOV EAX,EAX
OR RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001514c9:
MOV R13,-0x100000000
LEA RAX,[RBP + -0x10]
INC dword ptr [RBP + -0x10]
MOV qword ptr [R15 + 0x18],RAX
MOV dword ptr [R14],0x0
MOV EAX,dword ptr [R15 + 0x10]
TEST EAX,EAX
JZ 0x0015152d
LEA RCX,[RBP + 0x20]
MOVUPS XMM0,xmmword ptr [RBP + 0x20]
ADD RBP,0x30
TEST R12D,R12D
CMOVNZ RBP,RCX
MOVAPS xmmword ptr [RSP],XMM0
MOVUPS XMM0,xmmword ptr [RBP]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
CMP EAX,0x1
JNZ 0x0015154c
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CMP EDX,-0x9
JC 0x00151544
MOV RCX,qword ptr [RSP + 0x20]
JMP 0x00151542
LAB_0015152d:
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RSP],RAX
CMP EDX,-0x9
JC 0x00151544
MOV RCX,qword ptr [RSP]
LAB_00151542:
INC dword ptr [RCX]
LAB_00151544:
AND R13,RAX
JMP 0x001514b5
LAB_0015154c:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x2
CALL 0x00110a79
JMP 0x00151544
|
ulong js_map_iterator_next(long param_1)
{
long *plVar1;
int *piVar2;
long lVar3;
int8 *puVar4;
int4 *in_R9;
long lVar5;
ulong uVar6;
int in_stack_00000008;
long local_58;
int8 uStack_50;
int4 local_48;
int4 uStack_44;
uint uStack_40;
int4 uStack_3c;
plVar1 = (long *)JS_GetOpaque2();
if (plVar1 == (long *)0x0) {
*in_R9 = 0;
}
else {
if ((int)plVar1[1] != 3) {
local_58 = *plVar1;
if (((int)plVar1[1] == -1) && (in_stack_00000008 + 0x23U == (uint)*(ushort *)(local_58 + 6)))
{
lVar5 = *(long *)(local_58 + 0x30);
}
else {
lVar5 = 0;
}
if (plVar1[3] == 0) {
lVar3 = *(long *)(lVar5 + 0x10);
}
else {
lVar3 = *(long *)(plVar1[3] + 0x18);
map_decref_record(*(int8 *)(param_1 + 0x18));
}
for (; lVar3 != lVar5 + 8; lVar3 = *(long *)(lVar3 + 8)) {
if (*(int *)(lVar3 + -0xc) == 0) {
*(int *)(lVar3 + -0x10) = *(int *)(lVar3 + -0x10) + 1;
plVar1[3] = lVar3 + -0x10;
*in_R9 = 0;
if ((int)plVar1[2] == 0) {
piVar2 = *(int **)(lVar3 + 0x20);
uStack_40 = (uint)*(int8 *)(lVar3 + 0x28);
joined_r0x0015153c:
if (0xfffffff6 < uStack_40) {
*piVar2 = *piVar2 + 1;
}
}
else {
local_58 = *(long *)(lVar3 + 0x20);
uStack_50 = *(int8 *)(lVar3 + 0x28);
puVar4 = (int8 *)(lVar3 + 0x30);
if (in_stack_00000008 != 0) {
puVar4 = (int8 *)(lVar3 + 0x20);
}
local_48 = *(int4 *)puVar4;
uStack_44 = *(int4 *)((long)puVar4 + 4);
piVar2 = (int *)*puVar4;
uStack_40 = *(uint *)(puVar4 + 1);
uStack_3c = *(int4 *)((long)puVar4 + 0xc);
if ((int)plVar1[2] == 1) goto joined_r0x0015153c;
piVar2 = (int *)js_create_array(param_1,2,&local_58);
}
uVar6 = (ulong)piVar2 & 0xffffffff00000000;
goto LAB_001514b5;
}
}
plVar1[3] = 0;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*plVar1,plVar1[1]);
*(int4 *)plVar1 = 0;
plVar1[1] = 3;
}
*in_R9 = 1;
}
piVar2 = (int *)0x0;
uVar6 = 0;
LAB_001514b5:
return (ulong)piVar2 & 0xffffffff | uVar6;
}
| |
23,849 | google::protobuf::internal::ShutdownData::~ShutdownData() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc | ~ShutdownData() {
std::reverse(functions.begin(), functions.end());
for (auto pair : functions) pair.first(pair.second);
} | O3 | cpp | google::protobuf::internal::ShutdownData::~ShutdownData():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
cmpq %r15, %rbx
setne %cl
movq %r15, %rax
addq $-0x10, %rax
cmpq %rbx, %rax
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xfe143
movq (%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rbx)
movq %rcx, (%rax)
movq 0x8(%rbx), %rcx
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, 0x8(%rax)
addq $0x10, %rbx
addq $-0x10, %rax
cmpq %rax, %rbx
jb 0xfe113
movq (%r14), %rbx
movq 0x8(%r14), %r15
cmpq %r15, %rbx
je 0xfe15a
movq 0x8(%rbx), %rdi
callq *(%rbx)
addq $0x10, %rbx
cmpq %r15, %rbx
jne 0xfe148
movq (%r14), %rbx
testq %rbx, %rbx
je 0xfe16c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1f4a0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x2585f
| _ZN6google8protobuf8internal12ShutdownDataD2Ev:
push r15
push r14
push rbx
mov r14, rdi
mov rbx, [rdi]
mov r15, [rdi+8]
cmp rbx, r15
setnz cl
mov rax, r15
add rax, 0FFFFFFFFFFFFFFF0h
cmp rax, rbx
setnbe dl
and dl, cl
cmp dl, 1
jnz short loc_FE143
loc_FE113:
mov rcx, [rbx]
mov rdx, [rax]
mov [rbx], rdx
mov [rax], rcx
mov rcx, [rbx+8]
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax+8], rcx
add rbx, 10h
add rax, 0FFFFFFFFFFFFFFF0h
cmp rbx, rax
jb short loc_FE113
mov rbx, [r14]
mov r15, [r14+8]
loc_FE143:
cmp rbx, r15
jz short loc_FE15A
loc_FE148:
mov rdi, [rbx+8]
call qword ptr [rbx]
add rbx, 10h
cmp rbx, r15
jnz short loc_FE148
mov rbx, [r14]
loc_FE15A:
test rbx, rbx
jz short loc_FE16C
mov rdi, rbx; void *
pop rbx
pop r14
pop r15
jmp __ZdlPv; operator delete(void *)
loc_FE16C:
pop rbx
pop r14
pop r15
retn
mov rdi, rax
call __clang_call_terminate
| void google::protobuf::internal::ShutdownData::~ShutdownData(google::protobuf::internal::ShutdownData *this)
{
_QWORD *v1; // rbx
_QWORD *v2; // r15
_QWORD *v3; // rax
void ( *v4)(_QWORD); // rcx
long long v5; // rcx
v1 = *(_QWORD **)this;
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2 - 2;
if ( *(_QWORD *)this != (_QWORD)v2 && (unsigned long long)(v2 - 2) > *(_QWORD *)this )
{
do
{
v4 = (void ( *)(_QWORD))*v1;
*v1 = *v3;
*v3 = v4;
v5 = v1[1];
v1[1] = v3[1];
v3[1] = v5;
v1 += 2;
v3 -= 2;
}
while ( v1 < v3 );
v1 = *(_QWORD **)this;
v2 = (_QWORD *)*((_QWORD *)this + 1);
}
if ( v1 != v2 )
{
do
{
((void ( *)(_QWORD))*v1)(v1[1]);
v1 += 2;
}
while ( v1 != v2 );
v1 = *(_QWORD **)this;
}
if ( v1 )
operator delete(v1);
}
| ~ShutdownData:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
CMP RBX,R15
SETNZ CL
MOV RAX,R15
ADD RAX,-0x10
CMP RAX,RBX
SETA DL
AND DL,CL
CMP DL,0x1
JNZ 0x001fe143
LAB_001fe113:
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RAX]
MOV qword ptr [RBX],RDX
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX + 0x8],RCX
ADD RBX,0x10
ADD RAX,-0x10
CMP RBX,RAX
JC 0x001fe113
MOV RBX,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
LAB_001fe143:
CMP RBX,R15
JZ 0x001fe15a
LAB_001fe148:
MOV RDI,qword ptr [RBX + 0x8]
LAB_001fe14c:
CALL qword ptr [RBX]
ADD RBX,0x10
CMP RBX,R15
JNZ 0x001fe148
MOV RBX,qword ptr [R14]
LAB_001fe15a:
TEST RBX,RBX
JZ 0x001fe16c
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x0011f4a0
LAB_001fe16c:
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::internal::ShutdownData::~ShutdownData() */
void __thiscall google::protobuf::internal::ShutdownData::~ShutdownData(ShutdownData *this)
{
int8 uVar1;
int8 *puVar2;
int8 *puVar3;
int8 *puVar4;
puVar3 = *(int8 **)this;
puVar4 = *(int8 **)(this + 8);
puVar2 = puVar4 + -2;
if (puVar3 < puVar2 && puVar3 != puVar4) {
do {
uVar1 = *puVar3;
*puVar3 = *puVar2;
*puVar2 = uVar1;
uVar1 = puVar3[1];
puVar3[1] = puVar2[1];
puVar2[1] = uVar1;
puVar3 = puVar3 + 2;
puVar2 = puVar2 + -2;
} while (puVar3 < puVar2);
puVar3 = *(int8 **)this;
puVar4 = *(int8 **)(this + 8);
}
if (puVar3 != puVar4) {
do {
/* try { // try from 001fe14c to 001fe14d has its CatchHandler @ 001fe172 */
(*(code *)*puVar3)(puVar3[1]);
puVar3 = puVar3 + 2;
} while (puVar3 != puVar4);
puVar3 = *(int8 **)this;
}
if (puVar3 != (int8 *)0x0) {
operator_delete(puVar3);
return;
}
return;
}
| |
23,850 | google::protobuf::compiler::CommandLineInterface::RegisterGenerator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::compiler::CodeGenerator*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/command_line_interface.cc | void CommandLineInterface::RegisterGenerator(const std::string& flag_name,
CodeGenerator* generator,
const std::string& help_text) {
GeneratorInfo info;
info.flag_name = flag_name;
info.generator = generator;
info.help_text = help_text;
generators_by_flag_name_[flag_name] = info;
} | O3 | cpp | google::protobuf::compiler::CommandLineInterface::RegisterGenerator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::compiler::CodeGenerator*, 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 $0x68, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x30(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
movq %rsp, %rdi
callq 0x1f260
leaq 0x48(%rsp), %rbx
movq %r13, -0x8(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1f260
addq $0x40, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2dee4
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1f260
leaq 0x20(%rsp), %rsi
leaq 0x20(%r14), %rdi
callq 0x1f260
movq 0x40(%rsp), %rax
movq %rax, 0x40(%r14)
addq $0x48, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1f260
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x27902
callq 0x1f4a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x27916
callq 0x1f4a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x27929
callq 0x1f4a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2df78
movq %rbx, %rdi
callq 0x1f860
nop
| _ZN6google8protobuf8compiler20CommandLineInterface17RegisterGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS1_13CodeGeneratorESA_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov r15, rdi
lea rcx, [rsp+98h+var_88]
mov [rcx-10h], rcx
xor eax, eax
mov [rcx-8], rax
mov [rcx], al
lea rcx, [rsp+98h+var_68]
mov [rcx-10h], rcx
mov [rcx-8], rax
mov [rcx], al
lea rbp, [rsp+98h+var_40]
mov [rbp-10h], rbp
mov [rbp-8], rax
mov [rbp+0], al
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rbx, [rsp+98h+var_50]
mov [rbx-8], r13
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add r15, 40h ; '@'
mov rdi, r15
mov rsi, r14
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6google8protobuf8compiler20CommandLineInterface13GeneratorInfoESt4lessIS5_ESaISt4pairIKS5_SA_EEEixERSE_; std::map<std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>::operator[](std::string const&)
mov r14, rax
mov rsi, rsp
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, [rsp+98h+var_78]
lea rdi, [r14+20h]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rax, [rsp+98h+var_58]
mov [r14+40h], rax
add r14, 48h ; 'H'
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, [rsp+98h+var_50]; void *
cmp rdi, rbp
jz short loc_27902
call __ZdlPv; operator delete(void *)
loc_27902:
mov rdi, [rsp+98h+var_78]; void *
lea rax, [rsp+98h+var_68]
cmp rdi, rax
jz short loc_27916
call __ZdlPv; operator delete(void *)
loc_27916:
mov rdi, [rsp+98h+var_98]; void *
lea rax, [rsp+98h+var_88]
cmp rdi, rax
jz short loc_27929
call __ZdlPv; operator delete(void *)
loc_27929:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN6google8protobuf8compiler20CommandLineInterface13GeneratorInfoD2Ev; google::protobuf::compiler::CommandLineInterface::GeneratorInfo::~GeneratorInfo()
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::compiler::CommandLineInterface::RegisterGenerator(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v6; // r14
void *v7[2]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v8[16]; // [rsp+10h] [rbp-88h] BYREF
void *v9[2]; // [rsp+20h] [rbp-78h] BYREF
_BYTE v10[16]; // [rsp+30h] [rbp-68h] BYREF
long long v11; // [rsp+40h] [rbp-58h]
void *v12[2]; // [rsp+48h] [rbp-50h] BYREF
_BYTE v13[64]; // [rsp+58h] [rbp-40h] BYREF
v7[0] = v8;
v7[1] = 0LL;
v8[0] = 0;
v9[0] = v10;
v9[1] = 0LL;
v10[0] = 0;
v12[0] = v13;
v12[1] = 0LL;
v13[0] = 0;
std::string::_M_assign(v7, a2);
v11 = a3;
std::string::_M_assign(v12, a4);
v6 = std::map<std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>::operator[](a1 + 64, a2);
std::string::_M_assign(v6, v7);
std::string::_M_assign(v6 + 32, v9);
*(_QWORD *)(v6 + 64) = v11;
std::string::_M_assign(v6 + 72, v12);
if ( v12[0] != v13 )
operator delete(v12[0]);
if ( v9[0] != v10 )
operator delete(v9[0]);
if ( v7[0] != v8 )
operator delete(v7[0]);
}
| RegisterGenerator:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV R15,RDI
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX + -0x10],RCX
XOR EAX,EAX
MOV qword ptr [RCX + -0x8],RAX
MOV byte ptr [RCX],AL
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + -0x10],RCX
MOV qword ptr [RCX + -0x8],RAX
MOV byte ptr [RCX],AL
LEA RBP,[RSP + 0x58]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],RAX
MOV byte ptr [RBP],AL
LAB_00127894:
MOV RDI,RSP
CALL 0x0011f260
LEA RBX,[RSP + 0x48]
MOV qword ptr [RBX + -0x8],R13
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011f260
ADD R15,0x40
MOV RDI,R15
MOV RSI,R14
CALL 0x0012dee4
MOV R14,RAX
MOV RSI,RSP
MOV RDI,RAX
CALL 0x0011f260
LEA RSI,[RSP + 0x20]
LEA RDI,[R14 + 0x20]
CALL 0x0011f260
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [R14 + 0x40],RAX
ADD R14,0x48
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011f260
LAB_001278f3:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBP
JZ 0x00127902
CALL 0x0011f4a0
LAB_00127902:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x00127916
CALL 0x0011f4a0
LAB_00127916:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00127929
CALL 0x0011f4a0
LAB_00127929:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::CommandLineInterface::RegisterGenerator(std::__cxx11::string const&,
google::protobuf::compiler::CodeGenerator*, std::__cxx11::string const&) */
void google::protobuf::compiler::CommandLineInterface::RegisterGenerator
(string *param_1,CodeGenerator *param_2,string *param_3)
{
string *psVar1;
int1 *local_98;
int8 local_90;
int1 local_88 [16];
int1 *local_78;
int8 local_70;
int1 local_68 [16];
string *local_58;
int1 *local_50;
int8 local_48;
int1 local_40 [16];
local_98 = local_88;
local_90 = 0;
local_88[0] = 0;
local_78 = local_68;
local_70 = 0;
local_68[0] = 0;
local_48 = 0;
local_40[0] = 0;
local_50 = local_40;
/* try { // try from 00127894 to 001278f2 has its CatchHandler @ 00127938 */
std::__cxx11::string::_M_assign((string *)&local_98);
local_58 = param_3;
std::__cxx11::string::_M_assign((string *)&local_50);
psVar1 = (string *)
std::
map<std::__cxx11::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>>>
::operator[]((map<std::__cxx11::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>>>
*)(param_1 + 0x40),(string *)param_2);
std::__cxx11::string::_M_assign(psVar1);
std::__cxx11::string::_M_assign(psVar1 + 0x20);
*(string **)(psVar1 + 0x40) = local_58;
std::__cxx11::string::_M_assign(psVar1 + 0x48);
if (local_50 != local_40) {
operator_delete(local_50);
}
if (local_78 != local_68) {
operator_delete(local_78);
}
if (local_98 != local_88) {
operator_delete(local_98);
}
return;
}
| |
23,851 | my_coll_parser_scan_character_list | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p,
my_wc_t *pwc, size_t limit,
const char *name)
{
if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR)
return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR);
if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code))
return my_coll_parser_too_long_error(p, name);
if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR))
return 0;
while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR)
{
if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code))
return my_coll_parser_too_long_error(p, name);
my_coll_parser_scan(p);
}
return 1;
} | O0 | c | my_coll_parser_scan_character_list:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9da90
cmpl $0x5, (%rax)
je 0x9ea8c
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x9e3d0
movl %eax, -0x4(%rbp)
jmp 0x9eb4c
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9da90
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq 0x24(%rax), %rdx
callq 0x9eb60
cmpl $0x0, %eax
jne 0x9eacd
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9ebd0
movl %eax, -0x4(%rbp)
jmp 0x9eb4c
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x9e060
cmpl $0x0, %eax
jne 0x9eae9
movl $0x0, -0x4(%rbp)
jmp 0x9eb4c
jmp 0x9eaeb
movq -0x10(%rbp), %rdi
callq 0x9da90
cmpl $0x5, (%rax)
jne 0x9eb45
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9da90
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movslq 0x24(%rax), %rdx
callq 0x9eb60
cmpl $0x0, %eax
jne 0x9eb3a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9ebd0
movl %eax, -0x4(%rbp)
jmp 0x9eb4c
movq -0x10(%rbp), %rdi
callq 0x9e270
jmp 0x9eaeb
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_character_list:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 5
jz short loc_9EA8C
mov rdi, [rbp+var_10]
mov esi, 5
call my_coll_parser_expected_error
mov [rbp+var_4], eax
jmp loc_9EB4C
loc_9EA8C:
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
movsxd rdx, dword ptr [rax+24h]
call my_coll_rule_expand
cmp eax, 0
jnz short loc_9EACD
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call my_coll_parser_too_long_error
mov [rbp+var_4], eax
jmp short loc_9EB4C
loc_9EACD:
mov rdi, [rbp+var_10]
mov esi, 5
call my_coll_parser_scan_term
cmp eax, 0
jnz short loc_9EAE9
mov [rbp+var_4], 0
jmp short loc_9EB4C
loc_9EAE9:
jmp short $+2
loc_9EAEB:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 5
jnz short loc_9EB45
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
movsxd rdx, dword ptr [rax+24h]
call my_coll_rule_expand
cmp eax, 0
jnz short loc_9EB3A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call my_coll_parser_too_long_error
mov [rbp+var_4], eax
jmp short loc_9EB4C
loc_9EB3A:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
jmp short loc_9EAEB
loc_9EB45:
mov [rbp+var_4], 1
loc_9EB4C:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
if ( *(_DWORD *)my_coll_parser_curr(a1) == 5 )
{
v4 = my_coll_parser_curr(a1);
if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) )
{
if ( (unsigned int)my_coll_parser_scan_term(a1, 5u) )
{
while ( *(_DWORD *)my_coll_parser_curr(a1) == 5 )
{
v5 = my_coll_parser_curr(a1);
if ( !(unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v5 + 36)) )
return (unsigned int)my_coll_parser_too_long_error(a1, a4);
my_coll_parser_scan(a1);
}
return 1;
}
else
{
return 0;
}
}
else
{
return (unsigned int)my_coll_parser_too_long_error(a1, a4);
}
}
else
{
return (unsigned int)my_coll_parser_expected_error(a1, 5u);
}
}
| my_coll_parser_scan_character_list:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019da90
CMP dword ptr [RAX],0x5
JZ 0x0019ea8c
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x5
CALL 0x0019e3d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0019eb4c
LAB_0019ea8c:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019da90
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOVSXD RDX,dword ptr [RAX + 0x24]
CALL 0x0019eb60
CMP EAX,0x0
JNZ 0x0019eacd
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0019ebd0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0019eb4c
LAB_0019eacd:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x5
CALL 0x0019e060
CMP EAX,0x0
JNZ 0x0019eae9
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019eb4c
LAB_0019eae9:
JMP 0x0019eaeb
LAB_0019eaeb:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019da90
CMP dword ptr [RAX],0x5
JNZ 0x0019eb45
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019da90
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOVSXD RDX,dword ptr [RAX + 0x24]
CALL 0x0019eb60
CMP EAX,0x0
JNZ 0x0019eb3a
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0019ebd0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0019eb4c
LAB_0019eb3a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019e270
JMP 0x0019eaeb
LAB_0019eb45:
MOV dword ptr [RBP + -0x4],0x1
LAB_0019eb4c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
my_coll_parser_scan_character_list
(int8 param_1,int8 param_2,int8 param_3,int8 param_4)
{
int iVar1;
int4 uVar2;
int *piVar3;
long lVar4;
int4 local_c;
piVar3 = (int *)my_coll_parser_curr(param_1);
if (*piVar3 == 5) {
lVar4 = my_coll_parser_curr(param_1);
iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24));
if (iVar1 == 0) {
local_c = my_coll_parser_too_long_error(param_1,param_4);
}
else {
iVar1 = my_coll_parser_scan_term(param_1,5);
if (iVar1 == 0) {
local_c = 0;
}
else {
while (piVar3 = (int *)my_coll_parser_curr(param_1), *piVar3 == 5) {
lVar4 = my_coll_parser_curr(param_1);
iVar1 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar4 + 0x24));
if (iVar1 == 0) {
uVar2 = my_coll_parser_too_long_error(param_1,param_4);
return uVar2;
}
my_coll_parser_scan(param_1);
}
local_c = 1;
}
}
}
else {
local_c = my_coll_parser_expected_error(param_1,5);
}
return local_c;
}
| |
23,852 | js_setlike_get_size | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_size(JSContext *ctx, JSValue setlike, int64_t *pout)
{
JSMapState *s;
JSValue v;
double d;
s = JS_GetOpaque(setlike, JS_CLASS_SET);
if (s) {
*pout = s->record_count;
} else {
v = JS_GetProperty(ctx, setlike, JS_ATOM_size);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".size is undefined");
return -1;
}
if (JS_ToFloat64Free(ctx, &d, v) < 0)
return -1;
if (isnan(d)) {
JS_ThrowTypeError(ctx, ".size is not a number");
return -1;
}
*pout = d;
}
return 0;
} | O0 | c | js_setlike_get_size:
subq $0x78, %rsp
movq %rsi, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq %rdi, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl $0x24, %edx
callq 0x37090
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x8f210
movq 0x48(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, %ecx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
jmp 0x8f313
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movl $0x31, %ecx
callq 0x28ac0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8f268
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8f31b
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0x8f2a3
movq 0x58(%rsp), %rdi
leaq 0x7e89a(%rip), %rsi # 0x10db22
movb $0x0, %al
callq 0x2c040
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8f31b
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x30(%rsp), %rsi
callq 0x37330
cmpl $0x0, %eax
jge 0x8f2cb
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8f31b
movsd 0x30(%rsp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x8f2de
jmp 0x8f304
movq 0x58(%rsp), %rdi
leaq 0x7e84b(%rip), %rsi # 0x10db35
movb $0x0, %al
callq 0x2c040
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8f31b
cvttsd2si 0x30(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| js_setlike_get_size:
sub rsp, 78h
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_10], rdx
mov [rsp+78h+var_20], rdi
mov [rsp+78h+var_28], rcx
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_10]
mov edx, 24h ; '$'
call JS_GetOpaque
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
jz short loc_8F210
mov rax, [rsp+78h+var_30]
mov eax, [rax+18h]
mov ecx, eax
mov rax, [rsp+78h+var_28]
mov [rax], rcx
jmp loc_8F313
loc_8F210:
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_18]
mov rdx, [rsp+78h+var_10]
mov ecx, 31h ; '1'
call JS_GetProperty
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], rdx
mov rax, [rsp+78h+var_58]
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_8F268
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp loc_8F31B
loc_8F268:
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_38]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_8F2A3
mov rdi, [rsp+78h+var_20]
lea rsi, aSizeIsUndefine; ".size is undefined"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp short loc_8F31B
loc_8F2A3:
mov rdi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_40]
mov rcx, [rsp+78h+var_38]
lea rsi, [rsp+78h+var_48]
call JS_ToFloat64Free
cmp eax, 0
jge short loc_8F2CB
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp short loc_8F31B
loc_8F2CB:
movsd xmm0, [rsp+78h+var_48]
ucomisd xmm0, xmm0
setp al
test al, 1
jnz short loc_8F2DE
jmp short loc_8F304
loc_8F2DE:
mov rdi, [rsp+78h+var_20]
lea rsi, aSizeIsNotANumb; ".size is not a number"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_78], rax
mov [rsp+78h+var_70], rdx
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp short loc_8F31B
loc_8F304:
cvttsd2si rcx, [rsp+78h+var_48]
mov rax, [rsp+78h+var_28]
mov [rax], rcx
loc_8F313:
mov [rsp+78h+var_4], 0
loc_8F31B:
mov eax, [rsp+78h+var_4]
add rsp, 78h
retn
| long long js_setlike_get_size(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
char v20; // [rsp+0h] [rbp-78h]
double v21; // [rsp+30h] [rbp-48h] BYREF
long long Property; // [rsp+38h] [rbp-40h]
long long v23; // [rsp+40h] [rbp-38h]
long long Opaque; // [rsp+48h] [rbp-30h]
_QWORD *v25; // [rsp+50h] [rbp-28h]
long long v26; // [rsp+58h] [rbp-20h]
long long v27; // [rsp+60h] [rbp-18h]
long long v28; // [rsp+68h] [rbp-10h]
v27 = a2;
v28 = a3;
v26 = a1;
v25 = a4;
Opaque = JS_GetOpaque(a2, a3, 36);
if ( Opaque )
{
*v25 = *(unsigned int *)(Opaque + 24);
return 0;
}
Property = JS_GetProperty(v26, v27, v28, 49);
v23 = v12;
if ( JS_IsException_1(Property, v12) )
{
return (unsigned int)-1;
}
else if ( JS_IsUndefined_0(Property, v23) )
{
JS_ThrowTypeError(v26, (long long)".size is undefined", v13, v14, v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v20);
return (unsigned int)-1;
}
else
{
if ( (int)JS_ToFloat64Free(v26, &v21, Property, v23) >= 0 )
{
*v25 = (unsigned int)(int)v21;
return 0;
}
return (unsigned int)-1;
}
}
| js_setlike_get_size:
SUB RSP,0x78
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x68],RDX
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RCX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
MOV EDX,0x24
CALL 0x00137090
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0018f210
MOV RAX,qword ptr [RSP + 0x48]
MOV EAX,dword ptr [RAX + 0x18]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],RCX
JMP 0x0018f313
LAB_0018f210:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOV ECX,0x31
CALL 0x00128ac0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018f268
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x0018f31b
LAB_0018f268:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x0018f2a3
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[0x20db22]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x0018f31b
LAB_0018f2a3:
MOV RDI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x30]
CALL 0x00137330
CMP EAX,0x0
JGE 0x0018f2cb
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x0018f31b
LAB_0018f2cb:
MOVSD XMM0,qword ptr [RSP + 0x30]
UCOMISD XMM0,XMM0
SETP AL
TEST AL,0x1
JNZ 0x0018f2de
JMP 0x0018f304
LAB_0018f2de:
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[0x20db35]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x0018f31b
LAB_0018f304:
CVTTSD2SI RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],RCX
LAB_0018f313:
MOV dword ptr [RSP + 0x74],0x0
LAB_0018f31b:
MOV EAX,dword ptr [RSP + 0x74]
ADD RSP,0x78
RET
|
int4
js_setlike_get_size(int8 param_1,int8 param_2,int8 param_3,ulong *param_4)
{
int iVar1;
double local_48;
int1 local_40 [16];
long local_30;
ulong *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_28 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
local_30 = JS_GetOpaque(param_2,param_3,0x24);
if (local_30 == 0) {
local_40 = JS_GetProperty(local_20,local_18,local_10,0x31);
iVar1 = JS_IsException(local_40._0_8_,local_40._8_8_);
if (iVar1 != 0) {
return 0xffffffff;
}
iVar1 = JS_IsUndefined(local_40._0_8_,local_40._8_8_);
if (iVar1 != 0) {
JS_ThrowTypeError(local_20,".size is int");
return 0xffffffff;
}
iVar1 = JS_ToFloat64Free(local_20,&local_48,local_40._0_8_,local_40._8_8_);
if (iVar1 < 0) {
return 0xffffffff;
}
if (NAN(local_48)) {
JS_ThrowTypeError(local_20,".size is not a number");
return 0xffffffff;
}
*local_28 = (long)local_48;
}
else {
*local_28 = (ulong)*(uint *)(local_30 + 0x18);
}
return 0;
}
| |
23,853 | js_setlike_get_size | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_size(JSContext *ctx, JSValue setlike, int64_t *pout)
{
JSMapState *s;
JSValue v;
double d;
s = JS_GetOpaque(setlike, JS_CLASS_SET);
if (s) {
*pout = s->record_count;
} else {
v = JS_GetProperty(ctx, setlike, JS_ATOM_size);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".size is undefined");
return -1;
}
if (JS_ToFloat64Free(ctx, &d, v) < 0)
return -1;
if (isnan(d)) {
JS_ThrowTypeError(ctx, ".size is not a number");
return -1;
}
*pout = d;
}
return 0;
} | O1 | c | js_setlike_get_size:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x511ff
movq 0x8(%rsp), %rax
cmpw $0x24, 0x6(%rax)
jne 0x511ff
movq 0x30(%rax), %rax
jmp 0x51201
xorl %eax, %eax
testq %rax, %rax
je 0x51219
movl 0x18(%rax), %eax
movq %rax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl $0x31, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rdx, %rcx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $0x6, %ecx
je 0x5120e
cmpl $0x3, %ecx
jne 0x51259
leaq 0x4d8d9(%rip), %rsi # 0x9eb26
movq %r14, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x5120e
cmpl $0x2, %ecx
ja 0x5126a
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x5128a
cmpl $0x7, %ecx
jne 0x51276
movq %rax, 0x8(%rsp)
jmp 0x5128a
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x3d31b
testl %eax, %eax
js 0x5120e
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x512a0
cvttsd2si %xmm0, %rax
jmp 0x51209
leaq 0x4d892(%rip), %rsi # 0x9eb39
jmp 0x5124d
| js_setlike_get_size:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rcx
mov r14, rdi
mov [rsp+28h+var_20], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_511FF
mov rax, [rsp+28h+var_20]
cmp word ptr [rax+6], 24h ; '$'
jnz short loc_511FF
mov rax, [rax+30h]
jmp short loc_51201
loc_511FF:
xor eax, eax
loc_51201:
test rax, rax
jz short loc_51219
mov eax, [rax+18h]
loc_51209:
mov [rbx], rax
xor ebp, ebp
loc_5120E:
mov eax, ebp
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_51219:
mov rdi, r14
mov ecx, 31h ; '1'
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rcx, rdx
mov ebp, 0FFFFFFFFh
cmp ecx, 6
jz short loc_5120E
cmp ecx, 3
jnz short loc_51259
lea rsi, aSizeIsUndefine; ".size is undefined"
loc_5124D:
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_5120E
loc_51259:
cmp ecx, 2
ja short loc_5126A
cvtsi2sd xmm0, eax
movsd [rsp+28h+var_20], xmm0
jmp short loc_5128A
loc_5126A:
cmp ecx, 7
jnz short loc_51276
mov [rsp+28h+var_20], rax
jmp short loc_5128A
loc_51276:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
mov rdx, rax
call __JS_ToFloat64Free
test eax, eax
js short loc_5120E
loc_5128A:
movsd xmm0, [rsp+28h+var_20]
ucomisd xmm0, xmm0
jp short loc_512A0
cvttsd2si rax, xmm0
jmp loc_51209
loc_512A0:
lea rsi, aSizeIsNotANumb; ".size is not a number"
jmp short loc_5124D
| long long js_setlike_get_size(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rax
long long v14; // rax
unsigned int v15; // ebp
unsigned long long PropertyInternal2; // rax
long long v18; // rdx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
char v23; // [rsp+0h] [rbp-28h]
double v24[4]; // [rsp+8h] [rbp-20h] BYREF
v24[0] = *(double *)&a2;
if ( (_DWORD)a3 == -1 && *(_WORD *)(*(_QWORD *)&v24[0] + 6LL) == 36 )
v13 = *(_QWORD *)(*(_QWORD *)&v24[0] + 48LL);
else
v13 = 0LL;
if ( v13 )
{
v14 = *(unsigned int *)(v13 + 24);
}
else
{
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x31u, a2, a3, 0LL, 0);
v15 = -1;
if ( (_DWORD)v18 == 6 )
return v15;
if ( (_DWORD)v18 == 3 )
{
JS_ThrowTypeError(a1, (long long)".size is undefined", v18, v18, v19, v20, a5, a6, a7, a8, v21, v22, a11, a12, v23);
return v15;
}
if ( (unsigned int)v18 > 2 )
{
if ( (_DWORD)v18 == 7 )
{
v24[0] = *(double *)&PropertyInternal2;
}
else if ( (int)_JS_ToFloat64Free(a1, (long long *)v24, PropertyInternal2, v18) < 0 )
{
return v15;
}
}
else
{
v24[0] = (double)(int)PropertyInternal2;
}
v14 = (unsigned int)(int)v24[0];
}
*a4 = v14;
return 0;
}
| js_setlike_get_size:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x001511ff
MOV RAX,qword ptr [RSP + 0x8]
CMP word ptr [RAX + 0x6],0x24
JNZ 0x001511ff
MOV RAX,qword ptr [RAX + 0x30]
JMP 0x00151201
LAB_001511ff:
XOR EAX,EAX
LAB_00151201:
TEST RAX,RAX
JZ 0x00151219
MOV EAX,dword ptr [RAX + 0x18]
LAB_00151209:
MOV qword ptr [RBX],RAX
XOR EBP,EBP
LAB_0015120e:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_00151219:
MOV RDI,R14
MOV ECX,0x31
MOV R8,RSI
MOV R9,RDX
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV RCX,RDX
MOV EBP,0xffffffff
CMP ECX,0x6
JZ 0x0015120e
CMP ECX,0x3
JNZ 0x00151259
LEA RSI,[0x19eb26]
LAB_0015124d:
MOV RDI,R14
XOR EAX,EAX
CALL 0x00121953
JMP 0x0015120e
LAB_00151259:
CMP ECX,0x2
JA 0x0015126a
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x0015128a
LAB_0015126a:
CMP ECX,0x7
JNZ 0x00151276
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0015128a
LAB_00151276:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
MOV RDX,RAX
CALL 0x0013d31b
TEST EAX,EAX
JS 0x0015120e
LAB_0015128a:
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x001512a0
CVTTSD2SI RAX,XMM0
JMP 0x00151209
LAB_001512a0:
LEA RSI,[0x19eb39]
JMP 0x0015124d
|
int8 js_setlike_get_size(int8 param_1,double param_2,int8 param_3,ulong *param_4)
{
double dVar1;
int iVar2;
long lVar3;
ulong uVar4;
uint uVar5;
int8 uVar6;
char *pcVar7;
int1 auVar8 [12];
double local_20;
if (((int)param_3 == -1) && (*(short *)((long)param_2 + 6) == 0x24)) {
lVar3 = *(long *)((long)param_2 + 0x30);
}
else {
lVar3 = 0;
}
if (lVar3 == 0) {
local_20 = param_2;
auVar8 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x31,param_2,param_3,0,0);
uVar5 = auVar8._8_4_;
uVar6 = 0xffffffff;
if (uVar5 == 6) {
return 0xffffffff;
}
if (uVar5 == 3) {
pcVar7 = ".size is int";
}
else {
if (uVar5 < 3) {
dVar1 = (double)auVar8._0_4_;
}
else {
dVar1 = auVar8._0_8_;
if ((uVar5 != 7) &&
(iVar2 = __JS_ToFloat64Free(param_1,&local_20,auVar8._0_8_), dVar1 = local_20, iVar2 < 0)
) {
return 0xffffffff;
}
}
local_20 = dVar1;
if (!NAN(local_20)) {
uVar4 = (ulong)local_20;
goto LAB_00151209;
}
pcVar7 = ".size is not a number";
}
JS_ThrowTypeError(param_1,pcVar7);
}
else {
uVar4 = (ulong)*(uint *)(lVar3 + 0x18);
LAB_00151209:
*param_4 = uVar4;
uVar6 = 0;
}
return uVar6;
}
| |
23,854 | mysql_set_character_set | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname)
{
const MARIADB_CHARSET_INFO *cs;
if (!csname)
goto error;
if ((cs= mysql_find_charset_name(csname)))
{
char buff[64];
snprintf(buff, 63, "SET NAMES %s", cs->csname);
if (!mysql_real_query(mysql, buff, (unsigned long)strlen(buff)))
{
mysql->charset= cs;
return(0);
}
return(mysql->net.last_errno);
}
error:
my_set_error(mysql, CR_CANT_READ_CHARSET, SQLSTATE_UNKNOWN,
0, csname, "compiled_in");
return(mysql->net.last_errno);
} | O0 | c | mysql_set_character_set:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x380fc
jmp 0x38185
movq -0x68(%rbp), %rdi
callq 0x5e740
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x38183
leaq -0x50(%rbp), %rdi
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x3f, %esi
leaq 0x32eb5(%rip), %rdx # 0x6afdc
movb $0x0, %al
callq 0x146e0
movq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x141a0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x377f0
cmpl $0x0, %eax
jne 0x38174
movq -0x70(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x2f0(%rax)
movl $0x0, -0x54(%rbp)
jmp 0x381bb
movq -0x60(%rbp), %rax
movl 0x90(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x381bb
jmp 0x38185
movq -0x60(%rbp), %rdi
leaq 0x48d10(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movq -0x68(%rbp), %r8
movl $0x7e3, %esi # imm = 0x7E3
xorl %eax, %eax
movl %eax, %ecx
leaq 0x32d69(%rip), %r9 # 0x6af10
movb $0x0, %al
callq 0x307d0
movq -0x60(%rbp), %rax
movl 0x90(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x84(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x381e5
movl -0x84(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
callq 0x144c0
nopw (%rax,%rax)
| mysql_set_character_set:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
cmp [rbp+var_68], 0
jnz short loc_380FC
jmp loc_38185
loc_380FC:
mov rdi, [rbp+var_68]
call mysql_find_charset_name
mov [rbp+var_70], rax
cmp rax, 0
jz short loc_38183
lea rdi, [rbp+var_50]
mov rax, [rbp+var_70]
mov rcx, [rax+8]
mov esi, 3Fh ; '?'
lea rdx, aSetNamesS; "SET NAMES %s"
mov al, 0
call _snprintf
mov rax, [rbp+var_60]
mov [rbp+var_80], rax
lea rax, [rbp+var_50]
mov [rbp+var_78], rax
lea rdi, [rbp+var_50]
call _strlen
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_78]
mov rdx, rax
call mysql_real_query
cmp eax, 0
jnz short loc_38174
mov rcx, [rbp+var_70]
mov rax, [rbp+var_60]
mov [rax+2F0h], rcx
mov [rbp+var_54], 0
jmp short loc_381BB
loc_38174:
mov rax, [rbp+var_60]
mov eax, [rax+90h]
mov [rbp+var_54], eax
jmp short loc_381BB
loc_38183:
jmp short $+2
loc_38185:
mov rdi, [rbp+var_60]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov r8, [rbp+var_68]
mov esi, 7E3h
xor eax, eax
mov ecx, eax
lea r9, aCompiledIn; "compiled_in"
mov al, 0
call my_set_error
mov rax, [rbp+var_60]
mov eax, [rax+90h]
mov [rbp+var_54], eax
loc_381BB:
mov eax, [rbp+var_54]
mov [rbp+var_84], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_381E5
mov eax, [rbp+var_84]
add rsp, 90h
pop rbp
retn
loc_381E5:
call ___stack_chk_fail
| long long mysql_set_character_set(long long a1, long long a2)
{
long long v2; // rax
long long charset_name; // [rsp+20h] [rbp-70h]
_BYTE v6[72]; // [rsp+40h] [rbp-50h] BYREF
unsigned long long v7; // [rsp+88h] [rbp-8h]
v7 = __readfsqword(0x28u);
if ( a2 && (charset_name = mysql_find_charset_name(a2)) != 0 )
{
snprintf(v6, 63LL, "SET NAMES %s", *(const char **)(charset_name + 8));
v2 = strlen(v6);
if ( (unsigned int)mysql_real_query(a1, (long long)v6, v2) )
{
return *(unsigned int *)(a1 + 144);
}
else
{
*(_QWORD *)(a1 + 752) = charset_name;
return 0;
}
}
else
{
my_set_error(a1, 0x7E3u, (long long)SQLSTATE_UNKNOWN, 0LL, a2, "compiled_in");
return *(unsigned int *)(a1 + 144);
}
}
| mysql_set_character_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
CMP qword ptr [RBP + -0x68],0x0
JNZ 0x001380fc
JMP 0x00138185
LAB_001380fc:
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0015e740
MOV qword ptr [RBP + -0x70],RAX
CMP RAX,0x0
JZ 0x00138183
LEA RDI,[RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RAX + 0x8]
MOV ESI,0x3f
LEA RDX,[0x16afdc]
MOV AL,0x0
CALL 0x001146e0
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x80],RAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0x50]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,RAX
CALL 0x001377f0
CMP EAX,0x0
JNZ 0x00138174
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x2f0],RCX
MOV dword ptr [RBP + -0x54],0x0
JMP 0x001381bb
LAB_00138174:
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x90]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001381bb
LAB_00138183:
JMP 0x00138185
LAB_00138185:
MOV RDI,qword ptr [RBP + -0x60]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0x68]
MOV ESI,0x7e3
XOR EAX,EAX
MOV ECX,EAX
LEA R9,[0x16af10]
MOV AL,0x0
CALL 0x001307d0
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX + 0x90]
MOV dword ptr [RBP + -0x54],EAX
LAB_001381bb:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x84],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001381e5
MOV EAX,dword ptr [RBP + -0x84]
ADD RSP,0x90
POP RBP
RET
LAB_001381e5:
CALL 0x001144c0
|
int4 mysql_set_character_set(long param_1,long param_2)
{
int iVar1;
long lVar2;
size_t sVar3;
long in_FS_OFFSET;
int4 local_5c;
char local_58 [72];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((param_2 == 0) || (lVar2 = mysql_find_charset_name(param_2), lVar2 == 0)) {
my_set_error(param_1,0x7e3,SQLSTATE_UNKNOWN,0,param_2,"compiled_in");
local_5c = *(int4 *)(param_1 + 0x90);
}
else {
snprintf(local_58,0x3f,"SET NAMES %s",*(int8 *)(lVar2 + 8));
sVar3 = strlen(local_58);
iVar1 = mysql_real_query(param_1,local_58,sVar3);
if (iVar1 == 0) {
*(long *)(param_1 + 0x2f0) = lVar2;
local_5c = 0;
}
else {
local_5c = *(int4 *)(param_1 + 0x90);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_5c;
}
| |
23,855 | fmt::v10::detail::bigint::multiply(unsigned int) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 void multiply(uint32_t value) {
const double_bigit wide_value = value;
bigit carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
double_bigit result = bigits_[i] * wide_value + carry;
bigits_[i] = static_cast<bigit>(result);
carry = static_cast<bigit>(result >> bigit_bits);
}
if (carry != 0) bigits_.push_back(carry);
} | O0 | c | fmt::v10::detail::bigint::multiply(unsigned int):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x3c(%rsp), %eax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
callq 0xb5dd0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0xb6ff5
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb6210
movq 0x8(%rsp), %rdi
movl (%rax), %eax
imulq 0x30(%rsp), %rax
movl 0x2c(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rsi
callq 0xb6210
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
shrq $0x20, %rax
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xb6f8b
cmpl $0x0, 0x2c(%rsp)
je 0xb700b
movq 0x8(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0xb6300
addq $0x48, %rsp
retq
| _ZN3fmt3v106detail6bigint8multiplyEj:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_40], rdi
mov eax, [rsp+48h+var_C]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_1C], 0
mov [rsp+48h+var_28], 0
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+48h+var_30], rax
loc_B6F8B:
mov rax, [rsp+48h+var_28]
cmp rax, [rsp+48h+var_30]
jnb short loc_B6FF5
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rdi, [rsp+48h+var_40]
mov eax, [rax]
imul rax, [rsp+48h+var_18]
mov ecx, [rsp+48h+var_1C]
add rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_44], eax
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+48h+var_44]
mov [rax], ecx
mov rax, [rsp+48h+var_38]
shr rax, 20h
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_28]
add rax, 1
mov [rsp+48h+var_28], rax
jmp short loc_B6F8B
loc_B6FF5:
cmp [rsp+48h+var_1C], 0
jz short loc_B700B
mov rdi, [rsp+48h+var_40]
lea rsi, [rsp+48h+var_1C]
call _ZN3fmt3v106detail6bufferIjE9push_backERKj; fmt::v10::detail::buffer<uint>::push_back(uint const&)
loc_B700B:
add rsp, 48h
retn
| unsigned long long fmt::v10::detail::bigint::multiply(fmt::v10::detail::bigint *this, unsigned int a2)
{
unsigned long long result; // rax
long long v3; // rax
long long v4; // [rsp+10h] [rbp-38h]
unsigned long long v5; // [rsp+18h] [rbp-30h]
unsigned long long v6; // [rsp+20h] [rbp-28h]
unsigned int v7; // [rsp+2Ch] [rbp-1Ch] BYREF
long long v8; // [rsp+30h] [rbp-18h]
unsigned int v9; // [rsp+3Ch] [rbp-Ch]
fmt::v10::detail::bigint *v10; // [rsp+40h] [rbp-8h]
v10 = this;
v9 = a2;
v8 = a2;
v7 = 0;
v6 = 0LL;
v5 = fmt::v10::detail::buffer<unsigned int>::size((long long)this);
while ( 1 )
{
result = v6;
if ( v6 >= v5 )
break;
v3 = v8 * *(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>((long long)this, v6);
v4 = v7 + v3;
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>((long long)this, v6) = v7 + v3;
v7 = HIDWORD(v4);
++v6;
}
if ( v7 )
return fmt::v10::detail::buffer<unsigned int>::push_back((long long)this, (int *)&v7);
return result;
}
| multiply:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RDI
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
MOV qword ptr [RSP + 0x20],0x0
CALL 0x001b5dd0
MOV qword ptr [RSP + 0x18],RAX
LAB_001b6f8b:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JNC 0x001b6ff5
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001b6210
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
IMUL RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x2c]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001b6210
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x10]
SHR RAX,0x20
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001b6f8b
LAB_001b6ff5:
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x001b700b
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x2c]
CALL 0x001b6300
LAB_001b700b:
ADD RSP,0x48
RET
|
/* fmt::v10::detail::bigint::multiply(unsigned int) */
void __thiscall fmt::v10::detail::bigint::multiply(bigint *this,uint param_1)
{
ulong uVar1;
uint *puVar2;
long lVar3;
ulong local_28;
uint local_1c;
ulong local_18;
uint local_c;
bigint *local_8;
local_18 = (ulong)param_1;
local_1c = 0;
local_28 = 0;
local_c = param_1;
local_8 = this;
uVar1 = buffer<unsigned_int>::size((buffer<unsigned_int> *)this);
for (; local_28 < uVar1; local_28 = local_28 + 1) {
puVar2 = buffer<unsigned_int>::operator[]<unsigned_long>((buffer<unsigned_int> *)this,local_28);
lVar3 = *puVar2 * local_18 + (ulong)local_1c;
puVar2 = buffer<unsigned_int>::operator[]<unsigned_long>((buffer<unsigned_int> *)this,local_28);
*puVar2 = (uint)lVar3;
local_1c = (uint)((ulong)lVar3 >> 0x20);
}
if (local_1c != 0) {
buffer<unsigned_int>::push_back((buffer<unsigned_int> *)this,&local_1c);
}
return;
}
| |
23,856 | intx::uint<2 * 256u> intx::umul<256u>(intx::uint<256u> const&, intx::uint<256u> const&) | corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp | inline constexpr uint<2 * N> umul(const uint<N>& x, const uint<N>& y) noexcept
{
constexpr auto num_words = uint<N>::num_words;
uint<2 * N> p;
for (size_t j = 0; j < num_words; ++j)
{
uint64_t k = 0;
for (size_t i = 0; i < num_words; ++i)
{
auto a = addc(p[i + j], k);
auto t = umul(x[i], y[j]) + uint128{a.value, a.carry};
p[i + j] = t[0];
k = t[1];
}
p[j + num_words] = k;
}
return p;
} | O0 | cpp | intx::uint<2 * 256u> intx::umul<256u>(intx::uint<256u> const&, intx::uint<256u> const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq $0x4, -0x18(%rbp)
callq 0x65470
movq $0x0, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jae 0x6531d
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x4, -0x30(%rbp)
jae 0x652e6
movq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x65630
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x5fd80
movq %rax, -0x40(%rbp)
movb %dl, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x5fde0
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5fde0
movq -0x90(%rbp), %rdi
movq (%rax), %rsi
callq 0x600d0
movq %rax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x40(%rbp), %rsi
movb -0x38(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %edx
leaq -0x70(%rbp), %rdi
callq 0x60120
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x60080
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x60150
movq -0x80(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x65630
movq -0x88(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x60150
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x651ee
movq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x65630
movq -0x98(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x651d3
movq -0x78(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_80], rdi
mov rax, rdi
mov [rbp+var_78], rax
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], 4
call _ZN4intx4uintILj512EEC2Ev; intx::uint<512u>::uint(void)
mov [rbp+var_20], 0
loc_651D3:
cmp [rbp+var_20], 4
jnb loc_6531D
mov [rbp+var_28], 0
mov [rbp+var_30], 0
loc_651EE:
cmp [rbp+var_30], 4
jnb loc_652E6
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_30]
add rsi, [rbp+var_20]
call _ZN4intx4uintILj512EEixEm; intx::uint<512u>::operator[](ulong)
mov rdi, [rax]; this
mov rsi, [rbp+var_28]; unsigned __int64
xor edx, edx; unsigned __int64
call _ZN4intx4addcEmmb; intx::addc(ulong,ulong,bool)
mov [rbp+var_40], rax
mov [rbp+var_38], dl
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_90], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong)
mov rdi, [rbp+var_90]; this
mov rsi, [rax]; unsigned __int64
call _ZN4intx4umulEmm; intx::umul(ulong,ulong)
mov [rbp+var_60], rax
mov [rbp+var_58], rdx
mov rsi, [rbp+var_40]
mov al, [rbp+var_38]
and al, 1
movzx eax, al
mov edx, eax
lea rdi, [rbp+var_70]
call _ZN4intx4uintILj128EEC2Emm; intx::uint<128u>::uint(ulong,ulong)
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_68]
call _ZN4intxplENS_4uintILj128EEES1_; intx::operator+(intx::uint<128u>,intx::uint<128u>)
mov [rbp+var_50], rax
mov [rbp+var_48], rdx
lea rdi, [rbp+var_50]
xor eax, eax
mov esi, eax
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rdi, [rbp+var_80]
mov rax, [rax]
mov [rbp+var_88], rax
mov rsi, [rbp+var_30]
add rsi, [rbp+var_20]
call _ZN4intx4uintILj512EEixEm; intx::uint<512u>::operator[](ulong)
mov rcx, [rbp+var_88]
mov [rax], rcx
lea rdi, [rbp+var_50]
mov esi, 1
call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp loc_651EE
loc_652E6:
mov rdi, [rbp+var_80]
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
mov rsi, [rbp+var_20]
add rsi, 4
call _ZN4intx4uintILj512EEixEm; intx::uint<512u>::operator[](ulong)
mov rcx, [rbp+var_98]
mov [rax], rcx
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_651D3
loc_6531D:
mov rax, [rbp+var_78]
add rsp, 0A0h
pop rbp
retn
| long long intx::umul<256u>(long long a1, long long a2, long long a3)
{
intx **v3; // rax
char v4; // dl
unsigned long long *v5; // rax
long long v6; // rdx
long long v7; // rdx
unsigned long long v9; // [rsp+8h] [rbp-98h]
intx *v10; // [rsp+10h] [rbp-90h]
long long v11; // [rsp+18h] [rbp-88h]
long long v12[2]; // [rsp+30h] [rbp-70h] BYREF
long long v13; // [rsp+40h] [rbp-60h]
long long v14; // [rsp+48h] [rbp-58h]
_QWORD v15[2]; // [rsp+50h] [rbp-50h] BYREF
long long v16; // [rsp+60h] [rbp-40h]
char v17; // [rsp+68h] [rbp-38h]
unsigned long long j; // [rsp+70h] [rbp-30h]
unsigned long long v19; // [rsp+78h] [rbp-28h]
unsigned long long i; // [rsp+80h] [rbp-20h]
long long v21; // [rsp+88h] [rbp-18h]
long long v22; // [rsp+90h] [rbp-10h]
long long v23; // [rsp+98h] [rbp-8h]
v23 = a2;
v22 = a3;
v21 = 4LL;
intx::uint<512u>::uint(a1);
for ( i = 0LL; i < 4; ++i )
{
v19 = 0LL;
for ( j = 0LL; j < 4; ++j )
{
v3 = (intx **)intx::uint<512u>::operator[](a1, i + j);
v16 = intx::addc(*v3, v19, 0);
v17 = v4;
v10 = *(intx **)intx::uint<256u>::operator[](v23, j);
v5 = (unsigned long long *)intx::uint<256u>::operator[](v22, i);
v13 = intx::umul((unsigned long long)v10, *v5);
v14 = v6;
intx::uint<128u>::uint(v12, v16, v17 & 1);
v15[0] = intx::operator+(v13, v14, v12[0], v12[1]);
v15[1] = v7;
v11 = *(_QWORD *)intx::uint<128u>::operator[]((long long)v15, 0LL);
*(_QWORD *)intx::uint<512u>::operator[](a1, i + j) = v11;
v19 = *(_QWORD *)intx::uint<128u>::operator[]((long long)v15, 1LL);
}
v9 = v19;
*(_QWORD *)intx::uint<512u>::operator[](a1, i + 4) = v9;
}
return a1;
}
| _ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x80],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],0x4
CALL 0x00165470
MOV qword ptr [RBP + -0x20],0x0
LAB_001651d3:
CMP qword ptr [RBP + -0x20],0x4
JNC 0x0016531d
MOV qword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x30],0x0
LAB_001651ee:
CMP qword ptr [RBP + -0x30],0x4
JNC 0x001652e6
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x30]
ADD RSI,qword ptr [RBP + -0x20]
CALL 0x00165630
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x28]
XOR EDX,EDX
CALL 0x0015fd80
MOV qword ptr [RBP + -0x40],RAX
MOV byte ptr [RBP + -0x38],DL
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0015fde0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0015fde0
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RAX]
CALL 0x001600d0
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x58],RDX
MOV RSI,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RBP + -0x38]
AND AL,0x1
MOVZX EAX,AL
MOV EDX,EAX
LEA RDI,[RBP + -0x70]
CALL 0x00160120
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x68]
CALL 0x00160080
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],RDX
LEA RDI,[RBP + -0x50]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00160150
MOV RDI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
MOV RSI,qword ptr [RBP + -0x30]
ADD RSI,qword ptr [RBP + -0x20]
CALL 0x00165630
MOV RCX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
LEA RDI,[RBP + -0x50]
MOV ESI,0x1
CALL 0x00160150
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001651ee
LAB_001652e6:
MOV RDI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x4
CALL 0x00165630
MOV RCX,qword ptr [RBP + -0x98]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001651d3
LAB_0016531d:
MOV RAX,qword ptr [RBP + -0x78]
ADD RSP,0xa0
POP RBP
RET
|
uint<512u> *
_ZN4intx4umulILj256EEENS_4uintIXmlLi2ET_EEERKNS1_IXT_EEES5_
(uint<512u> *param_1,uint<256u> *param_2,uint<256u> *param_3)
{
ulong uVar1;
int8 uVar2;
ulong *puVar3;
int8 *puVar4;
byte extraout_DL;
int1 auVar5 [16];
int8 local_78;
int8 local_70;
int1 local_68 [16];
int1 local_58 [16];
ulong local_48;
byte local_40;
ulong local_38;
ulong local_30;
ulong local_28;
int8 local_20;
uint<256u> *local_18;
uint<256u> *local_10;
local_20 = 4;
local_18 = param_3;
local_10 = param_2;
intx::uint<512u>::uint(param_1);
for (local_28 = 0; local_28 < 4; local_28 = local_28 + 1) {
local_30 = 0;
for (local_38 = 0; uVar1 = local_30, local_38 < 4; local_38 = local_38 + 1) {
puVar3 = (ulong *)intx::uint<512u>::operator[](param_1,local_38 + local_28);
local_48 = intx::addc(*puVar3,local_30,false);
local_40 = extraout_DL;
puVar3 = (ulong *)intx::uint<256u>::operator[](local_10,local_38);
uVar1 = *puVar3;
puVar3 = (ulong *)intx::uint<256u>::operator[](local_18,local_28);
auVar5 = intx::umul(uVar1,*puVar3);
local_68 = auVar5;
intx::uint<128u>::uint((uint<128u> *)&local_78,local_48,(ulong)(local_40 & 1));
auVar5 = intx::operator+(local_68._0_8_,local_68._8_8_,local_78,local_70);
local_58 = auVar5;
puVar4 = (int8 *)intx::uint<128u>::operator[]((uint<128u> *)local_58,0);
uVar2 = *puVar4;
puVar4 = (int8 *)intx::uint<512u>::operator[](param_1,local_38 + local_28);
*puVar4 = uVar2;
puVar3 = (ulong *)intx::uint<128u>::operator[]((uint<128u> *)local_58,1);
local_30 = *puVar3;
}
puVar3 = (ulong *)intx::uint<512u>::operator[](param_1,local_28 + 4);
*puVar3 = uVar1;
}
return param_1;
}
| |
23,857 | my_like_range_win1250ch | eloqsql/strings/ctype-win1250ch.c | static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
} | O3 | c | my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x20(%rbp), %r10
movq 0x18(%rbp), %r13
movq 0x10(%rbp), %r8
leaq (%r8,%r13), %r11
testq %rdx, %rdx
sete %al
testq %r8, %r8
sete %dil
orb %al, %dil
movb $0x1, %al
jne 0xd6aea
addq %rsi, %rdx
leaq -0x1(%r8), %rbx
movb $0x1, %al
leaq 0x28abbd(%rip), %r12 # 0x361630
leaq 0x28acb6(%rip), %rdi # 0x361730
movb (%rsi), %r14b
cmpb %cl, %r14b
setne %r9b
leaq 0x1(%rsi), %r15
cmpq %rdx, %r15
sete %r8b
orb %r9b, %r8b
cmpb $0x1, %r8b
jne 0xd6aa7
cmpb -0x30(%rbp), %r14b
je 0xd6aea
movq %rsi, %r15
cmpb -0x2c(%rbp), %r14b
je 0xd6aea
movzbl (%r15), %esi
cmpq $0x20, %rsi
movb (%rsi,%r12), %sil
movb %sil, (%r13)
movzbl %al, %eax
movl $0x0, %esi
cmovnel %esi, %eax
incq %r13
movzbl (%r15), %esi
movb (%rsi,%rdi), %sil
movb %sil, (%r10)
incq %r10
movq %r15, %rsi
incq %rsi
cmpq %rdx, %rsi
je 0xd6aea
leaq -0x1(%rbx), %r8
testq %rbx, %rbx
movq %r8, %rbx
jne 0xd6a7a
movq %r13, %rcx
subq 0x18(%rbp), %rcx
movq -0x38(%rbp), %rdx
testb $0x10, 0xc(%rdx)
movq 0x10(%rbp), %rsi
cmoveq %rsi, %rcx
movq 0x28(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rbp), %rcx
movq %rsi, (%rcx)
cmpq %r11, %r13
je 0xd6b25
movb $0x20, (%r13)
incq %r13
movb $-0x1, (%r10)
incq %r10
jmp 0xd6b0f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_like_range_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov [rbp+var_2C], r9d
mov [rbp+var_30], r8d
mov [rbp+var_38], rdi
mov r10, [rbp+arg_10]
mov r13, [rbp+arg_8]
mov r8, [rbp+arg_0]
lea r11, [r8+r13]
test rdx, rdx
setz al
test r8, r8
setz dil
or dil, al
mov al, 1
jnz loc_D6AEA
add rdx, rsi
lea rbx, [r8-1]
mov al, 1
lea r12, like_range_prefix_min_win1250ch
lea rdi, like_range_prefix_max_win1250ch
loc_D6A7A:
mov r14b, [rsi]
cmp r14b, cl
setnz r9b
lea r15, [rsi+1]
cmp r15, rdx
setz r8b
or r8b, r9b
cmp r8b, 1
jnz short loc_D6AA7
cmp r14b, byte ptr [rbp+var_30]
jz short loc_D6AEA
mov r15, rsi
cmp r14b, byte ptr [rbp+var_2C]
jz short loc_D6AEA
loc_D6AA7:
movzx esi, byte ptr [r15]
cmp rsi, 20h ; ' '
mov sil, [rsi+r12]
mov [r13+0], sil
movzx eax, al
mov esi, 0
cmovnz eax, esi
inc r13
movzx esi, byte ptr [r15]
mov sil, [rsi+rdi]
mov [r10], sil
inc r10
mov rsi, r15
inc rsi
cmp rsi, rdx
jz short loc_D6AEA
lea r8, [rbx-1]
test rbx, rbx
mov rbx, r8
jnz short loc_D6A7A
loc_D6AEA:
mov rcx, r13
sub rcx, [rbp+arg_8]
mov rdx, [rbp+var_38]
test byte ptr [rdx+0Ch], 10h
mov rsi, [rbp+arg_0]
cmovz rcx, rsi
mov rdx, [rbp+arg_18]
mov [rdx], rcx
mov rcx, [rbp+arg_20]
mov [rcx], rsi
loc_D6B0F:
cmp r13, r11
jz short loc_D6B25
mov byte ptr [r13+0], 20h ; ' '
inc r13
mov byte ptr [r10], 0FFh
inc r10
jmp short loc_D6B0F
loc_D6B25:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 a4,
char a5,
char a6,
long long a7,
long long a8,
_BYTE *a9,
long long *a10,
_QWORD *a11)
{
_BYTE *v12; // r13
char result; // al
unsigned __int8 *v14; // rdx
long long v15; // rbx
unsigned __int8 v16; // r14
unsigned __int8 *v17; // r15
long long v18; // rsi
long long v20; // rcx
v12 = (_BYTE *)a8;
result = 1;
if ( a3 != 0 && a7 != 0 )
{
v14 = &a2[a3];
v15 = a7 - 1;
result = 1;
do
{
v16 = *a2;
v17 = a2 + 1;
if ( *a2 != a4 || a2 + 1 == v14 )
{
if ( v16 == a5 )
break;
v17 = a2;
if ( v16 == a6 )
break;
}
v18 = *v17;
*v12 = like_range_prefix_min_win1250ch[v18];
if ( v18 != 32 )
result = 0;
++v12;
*a9++ = like_range_prefix_max_win1250ch[*v17];
a2 = v17 + 1;
if ( v17 + 1 == v14 )
break;
}
while ( v15-- != 0 );
}
v20 = (long long)&v12[-a8];
if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
v20 = a7;
*a10 = v20;
*a11 = a7;
while ( v12 != (_BYTE *)(a7 + a8) )
{
*v12++ = 32;
*a9++ = -1;
}
return result;
}
| my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RDI
MOV R10,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x18]
MOV R8,qword ptr [RBP + 0x10]
LEA R11,[R8 + R13*0x1]
TEST RDX,RDX
SETZ AL
TEST R8,R8
SETZ DIL
OR DIL,AL
MOV AL,0x1
JNZ 0x001d6aea
ADD RDX,RSI
LEA RBX,[R8 + -0x1]
MOV AL,0x1
LEA R12,[0x461630]
LEA RDI,[0x461730]
LAB_001d6a7a:
MOV R14B,byte ptr [RSI]
CMP R14B,CL
SETNZ R9B
LEA R15,[RSI + 0x1]
CMP R15,RDX
SETZ R8B
OR R8B,R9B
CMP R8B,0x1
JNZ 0x001d6aa7
CMP R14B,byte ptr [RBP + -0x30]
JZ 0x001d6aea
MOV R15,RSI
CMP R14B,byte ptr [RBP + -0x2c]
JZ 0x001d6aea
LAB_001d6aa7:
MOVZX ESI,byte ptr [R15]
CMP RSI,0x20
MOV SIL,byte ptr [RSI + R12*0x1]
MOV byte ptr [R13],SIL
MOVZX EAX,AL
MOV ESI,0x0
CMOVNZ EAX,ESI
INC R13
MOVZX ESI,byte ptr [R15]
MOV SIL,byte ptr [RSI + RDI*0x1]
MOV byte ptr [R10],SIL
INC R10
MOV RSI,R15
INC RSI
CMP RSI,RDX
JZ 0x001d6aea
LEA R8,[RBX + -0x1]
TEST RBX,RBX
MOV RBX,R8
JNZ 0x001d6a7a
LAB_001d6aea:
MOV RCX,R13
SUB RCX,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x38]
TEST byte ptr [RDX + 0xc],0x10
MOV RSI,qword ptr [RBP + 0x10]
CMOVZ RCX,RSI
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RDX],RCX
MOV RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RCX],RSI
LAB_001d6b0f:
CMP R13,R11
JZ 0x001d6b25
MOV byte ptr [R13],0x20
INC R13
MOV byte ptr [R10],0xff
INC R10
JMP 0x001d6b0f
LAB_001d6b25:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,int1 *param_8,int1 *param_9,long *param_10,long *param_11)
{
byte bVar1;
int8 uVar2;
byte *pbVar3;
long lVar4;
int1 *puVar5;
byte *pbVar6;
uVar2 = 1;
puVar5 = param_8;
if (param_7 != 0 && param_3 != 0) {
pbVar3 = param_2 + param_3;
uVar2 = 1;
lVar4 = param_7;
while( true ) {
lVar4 = lVar4 + -1;
bVar1 = *param_2;
pbVar6 = param_2 + 1;
if ((param_2 + 1 == pbVar3 || bVar1 != param_4) &&
((bVar1 == param_5 || (pbVar6 = param_2, bVar1 == param_6)))) break;
bVar1 = *pbVar6;
*puVar5 = like_range_prefix_min_win1250ch[bVar1];
if ((ulong)bVar1 != 0x20) {
uVar2 = 0;
}
puVar5 = puVar5 + 1;
*param_9 = like_range_prefix_max_win1250ch[*pbVar6];
param_9 = param_9 + 1;
param_2 = pbVar6 + 1;
if ((param_2 == pbVar3) || (lVar4 == 0)) break;
}
}
lVar4 = (long)puVar5 - (long)param_8;
if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) {
lVar4 = param_7;
}
*param_10 = lVar4;
*param_11 = param_7;
for (; puVar5 != param_8 + param_7; puVar5 = puVar5 + 1) {
*puVar5 = 0x20;
*param_9 = 0xff;
param_9 = param_9 + 1;
}
return uVar2;
}
| |
23,858 | run_plugin_auth | eloqsql/libmariadb/plugins/auth/my_auth.c | int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
const char *data_plugin, const char *db)
{
const char *auth_plugin_name= NULL;
auth_plugin_t *auth_plugin;
MCPVIO_EXT mpvio;
ulong pkt_length;
int res;
/* determine the default/initial plugin to use */
if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH)
{
if (mysql->options.extension && mysql->options.extension->default_auth)
auth_plugin_name= mysql->options.extension->default_auth;
else if (data_plugin)
auth_plugin_name= data_plugin;
}
if (!auth_plugin_name)
{
if (mysql->server_capabilities & CLIENT_PROTOCOL_41)
auth_plugin_name= native_password_plugin_name;
else
auth_plugin_name= "mysql_old_password";
}
if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
mysql->net.last_errno= 0; /* just in case */
if (data_plugin && strcmp(data_plugin, auth_plugin_name))
{
/* data was prepared for a different plugin, so we don't
send any data */
data= 0;
data_len= 0;
}
mpvio.mysql_change_user= data_plugin == 0;
mpvio.cached_server_reply.pkt= (uchar*)data;
mpvio.cached_server_reply.pkt_len= data_len;
mpvio.read_packet= client_mpvio_read_packet;
mpvio.write_packet= client_mpvio_write_packet;
mpvio.info= client_mpvio_info;
mpvio.mysql= mysql;
mpvio.packets_read= mpvio.packets_written= 0;
mpvio.db= db;
retry:
mpvio.plugin= auth_plugin;
if (auth_plugin_name &&
mysql->options.extension &&
mysql->options.extension->restricted_auth)
{
if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name))
{
my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin);
return 1;
}
}
mysql->net.read_pos[0]= 0;
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
if ((res == CR_ERROR && !mysql->net.buff) ||
(res > CR_OK && mysql->net.read_pos[0] != 254))
{
/*
the plugin returned an error. write it down in mysql,
unless the error code is CR_ERROR and mysql->net.last_errno
is already set (the plugin has done it)
*/
if (res > CR_ERROR)
my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0);
else
if (!mysql->net.last_errno) {
my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0);
}
return 1;
}
/* read the OK packet (or use the cached value in mysql->net.read_pos */
if (res == CR_OK)
pkt_length= ma_net_safe_read(mysql);
else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */
pkt_length= mpvio.last_read_packet_len;
if (pkt_length == packet_error)
{
if (mysql->net.last_errno == CR_SERVER_LOST)
my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN,
ER(CR_SERVER_LOST_EXTENDED),
"reading authorization packet",
errno);
return 1;
}
if (mysql->net.read_pos[0] == 254)
{
/* The server asked to use a different authentication plugin */
if (pkt_length == 1)
{
/* old "use short scramble" packet */
auth_plugin_name= old_password_plugin_name;
mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff;
mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1;
}
else
{
/* new "use different plugin" packet */
uint len;
auth_plugin_name= (char*)mysql->net.read_pos + 1;
len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */
mpvio.cached_server_reply.pkt_len= pkt_length - len - 2;
mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2;
}
if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
goto retry;
}
/*
net->read_pos[0] should always be 0 here if the server implements
the protocol correctly
*/
if (mysql->net.read_pos[0] == 0)
return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length);
return 1;
} | O0 | c | run_plugin_auth:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x80000, %rax # imm = 0x80000
cmpq $0x0, %rax
je 0x5a105
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x5a0f2
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x5a0f2
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x5a103
cmpq $0x0, -0x28(%rbp)
je 0x5a101
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x5a103
jmp 0x5a105
cmpq $0x0, -0x38(%rbp)
jne 0x5a13d
movq -0x10(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x5a130
leaq 0x10dd0(%rip), %rax # 0x6aefa
movq %rax, -0x38(%rbp)
jmp 0x5a13b
leaq 0x10db0(%rip), %rax # 0x6aee7
movq %rax, -0x38(%rbp)
jmp 0x5a13d
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x2, %edx
callq 0x50a10
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x5a164
leaq 0x25d08(%rip), %rax # 0x7fe68
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x90(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x5a19a
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x14600
cmpl $0x0, %eax
je 0x5a19a
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x58(%rbp)
leaq 0x331(%rip), %rax # 0x5a4f0
movq %rax, -0x90(%rbp)
leaq 0x463(%rip), %rax # 0x5a630
movq %rax, -0x88(%rbp)
leaq 0x5a5(%rip), %rax # 0x5a780
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x5a280
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x5a280
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x150(%rax)
je 0x5a280
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x150(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x14100
cmpq $0x0, %rax
jne 0x5a27e
movq -0x10(%rbp), %rdi
leaq 0x26c45(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movq -0x28(%rbp), %r8
movl $0x1392, %esi # imm = 0x1392
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x307d0
movl $0x1, -0x4(%rbp)
jmp 0x5a4de
jmp 0x5a280
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq *%rax
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
jne 0x5a2ba
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5a2d5
cmpl $-0x1, -0x9c(%rbp)
jle 0x5a338
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
je 0x5a338
cmpl $0x0, -0x9c(%rbp)
jle 0x5a2ff
movq -0x10(%rbp), %rdi
movl -0x9c(%rbp), %esi
leaq 0x26bb1(%rip), %rax # 0x80ea0
movq (%rax), %rdx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x307d0
jmp 0x5a32c
movq -0x10(%rbp), %rax
cmpl $0x0, 0x90(%rax)
jne 0x5a32a
movq -0x10(%rbp), %rdi
leaq 0x26b89(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x307d0
jmp 0x5a32c
movl $0x1, -0x4(%rbp)
jmp 0x5a4de
cmpl $-0x1, -0x9c(%rbp)
jne 0x5a353
movq -0x10(%rbp), %rdi
callq 0x304c0
movq %rax, -0x98(%rbp)
jmp 0x5a35e
movslq -0x44(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x98(%rbp)
jne 0x5a3e9
movq -0x10(%rbp), %rax
cmpl $0x7dd, 0x90(%rax) # imm = 0x7DD
jne 0x5a3dd
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x26b12(%rip), %rax # 0x80ea0
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
leaq 0x26b11(%rip), %rax # 0x80eb0
movq 0x1b8(%rax), %rax
movq %rax, -0xa8(%rbp)
callq 0x14050
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movl (%rax), %r9d
movl $0x7dd, %esi # imm = 0x7DD
leaq 0x11083(%rip), %r8 # 0x6b459
movb $0x0, %al
callq 0x307d0
movl $0x1, -0x4(%rbp)
jmp 0x5a4de
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x5a4a6
cmpq $0x1, -0x98(%rbp)
jne 0x5a42b
leaq 0x10ad7(%rip), %rax # 0x6aee7
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x48e, %rax # imm = 0x48E
movq %rax, -0x60(%rbp)
movl $0x15, -0x58(%rbp)
jmp 0x5a47a
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x141a0
movl %eax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movl -0xa0(%rbp), %ecx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xa0(%rbp), %ecx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x2, %edx
callq 0x50a10
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x5a4a1
leaq 0x259cb(%rip), %rax # 0x7fe68
movq %rax, -0x40(%rbp)
jmp 0x5a1fd
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x5a4d7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x1, %rsi
movq -0x98(%rbp), %rdx
callq 0x38ef0
movl %eax, -0x4(%rbp)
jmp 0x5a4de
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| run_plugin_auth:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], 0
mov rax, [rbp+var_10]
mov rax, [rax+370h]
and rax, 80000h
cmp rax, 0
jz short loc_5A105
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_5A0F2
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+8], 0
jz short loc_5A0F2
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+8]
mov [rbp+var_38], rax
jmp short loc_5A103
loc_5A0F2:
cmp [rbp+var_28], 0
jz short loc_5A101
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
loc_5A101:
jmp short $+2
loc_5A103:
jmp short $+2
loc_5A105:
cmp [rbp+var_38], 0
jnz short loc_5A13D
mov rax, [rbp+var_10]
mov rax, [rax+370h]
and rax, 200h
cmp rax, 0
jz short loc_5A130
lea rax, aMysqlNativePas; "mysql_native_password"
mov [rbp+var_38], rax
jmp short loc_5A13B
loc_5A130:
lea rax, aMysqlOldPasswo; "mysql_old_password"
mov [rbp+var_38], rax
loc_5A13B:
jmp short $+2
loc_5A13D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 2
call mysql_client_find_plugin
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_5A164
lea rax, dummy_fallback_client_plugin
mov [rbp+var_40], rax
loc_5A164:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 0
cmp [rbp+var_28], 0
jz short loc_5A19A
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_38]
call _strcmp
cmp eax, 0
jz short loc_5A19A
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_5A19A:
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_48], al
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov eax, [rbp+var_1C]
mov [rbp+var_58], eax
lea rax, client_mpvio_read_packet
mov [rbp+var_90], rax
lea rax, client_mpvio_write_packet
mov [rbp+var_88], rax
lea rax, client_mpvio_info
mov [rbp+var_80], rax
mov rax, [rbp+var_10]
mov [rbp+var_78], rax
mov [rbp+var_4C], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_30]
mov [rbp+var_68], rax
loc_5A1FD:
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
cmp [rbp+var_38], 0
jz short loc_5A280
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_5A280
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+150h], 0
jz short loc_5A280
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rdi, [rax+150h]
mov rsi, [rbp+var_38]
call _strstr
cmp rax, 0
jnz short loc_5A27E
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov r8, [rbp+var_28]
mov esi, 1392h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov [rbp+var_4], 1
jmp loc_5A4DE
loc_5A27E:
jmp short $+2
loc_5A280:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov byte ptr [rax], 0
mov rax, [rbp+var_40]
mov rax, [rax+58h]
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_90]
call rax
mov [rbp+var_9C], eax
cmp [rbp+var_9C], 0
jnz short loc_5A2BA
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_5A2D5
loc_5A2BA:
cmp [rbp+var_9C], 0FFFFFFFFh
jle short loc_5A338
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jz short loc_5A338
loc_5A2D5:
cmp [rbp+var_9C], 0
jle short loc_5A2FF
mov rdi, [rbp+var_10]
mov esi, [rbp+var_9C]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp short loc_5A32C
loc_5A2FF:
mov rax, [rbp+var_10]
cmp dword ptr [rax+90h], 0
jnz short loc_5A32A
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
loc_5A32A:
jmp short $+2
loc_5A32C:
mov [rbp+var_4], 1
jmp loc_5A4DE
loc_5A338:
cmp [rbp+var_9C], 0FFFFFFFFh
jnz short loc_5A353
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov [rbp+var_98], rax
jmp short loc_5A35E
loc_5A353:
movsxd rax, [rbp+var_44]
mov [rbp+var_98], rax
loc_5A35E:
mov eax, 0FFFFFFFFh
cmp [rbp+var_98], rax
jnz short loc_5A3E9
mov rax, [rbp+var_10]
cmp dword ptr [rax+90h], 7DDh
jnz short loc_5A3DD
mov rax, [rbp+var_10]
mov [rbp+var_B8], rax
lea rax, SQLSTATE_UNKNOWN
mov rax, [rax]
mov [rbp+var_B0], rax
lea rax, client_errors
mov rax, [rax+1B8h]
mov [rbp+var_A8], rax
call ___errno_location
mov rdi, [rbp+var_B8]
mov rdx, [rbp+var_B0]
mov rcx, [rbp+var_A8]
mov r9d, [rax]
mov esi, 7DDh
lea r8, aReadingAuthori; "reading authorization packet"
mov al, 0
call my_set_error
loc_5A3DD:
mov [rbp+var_4], 1
jmp loc_5A4DE
loc_5A3E9:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz loc_5A4A6
cmp [rbp+var_98], 1
jnz short loc_5A42B
lea rax, aMysqlOldPasswo; "mysql_old_password"
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, 48Eh
mov [rbp+var_60], rax
mov [rbp+var_58], 15h
jmp short loc_5A47A
loc_5A42B:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
add rax, 1
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _strlen
mov [rbp+var_A0], eax
mov rax, [rbp+var_98]
mov ecx, [rbp+var_A0]
sub rax, rcx
sub rax, 2
mov [rbp+var_58], eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov ecx, [rbp+var_A0]
add rax, rcx
add rax, 2
mov [rbp+var_60], rax
loc_5A47A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 2
call mysql_client_find_plugin
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_5A4A1
lea rax, dummy_fallback_client_plugin
mov [rbp+var_40], rax
loc_5A4A1:
jmp loc_5A1FD
loc_5A4A6:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_5A4D7
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
add rsi, 1
mov rdx, [rbp+var_98]
call ma_read_ok_packet
mov [rbp+var_4], eax
jmp short loc_5A4DE
loc_5A4D7:
mov [rbp+var_4], 1
loc_5A4DE:
mov eax, [rbp+var_4]
add rsp, 0C0h
pop rbp
retn
| long long run_plugin_auth(long long a1, long long a2, int a3, const char *a4, long long a5)
{
long long v5; // rsi
long long v6; // rdx
long long v7; // rcx
int v8; // r8d
int v9; // r9d
unsigned int *v10; // rax
long long v12; // [rsp+8h] [rbp-B8h]
char *v13; // [rsp+10h] [rbp-B0h]
char *v14; // [rsp+18h] [rbp-A8h]
unsigned int v15; // [rsp+20h] [rbp-A0h]
signed int v16; // [rsp+24h] [rbp-9Ch]
long long v17; // [rsp+28h] [rbp-98h]
_QWORD v18[6]; // [rsp+30h] [rbp-90h] BYREF
long long v19; // [rsp+60h] [rbp-60h]
int v20; // [rsp+68h] [rbp-58h]
int v21; // [rsp+70h] [rbp-50h]
int v22; // [rsp+74h] [rbp-4Ch]
bool v23; // [rsp+78h] [rbp-48h]
int v24; // [rsp+7Ch] [rbp-44h]
void (**plugin)(void); // [rsp+80h] [rbp-40h]
const char *v26; // [rsp+88h] [rbp-38h]
long long v27; // [rsp+90h] [rbp-30h]
const char *v28; // [rsp+98h] [rbp-28h]
int v29; // [rsp+A4h] [rbp-1Ch]
long long v30; // [rsp+A8h] [rbp-18h]
long long v31; // [rsp+B0h] [rbp-10h]
v31 = a1;
v30 = a2;
v29 = a3;
v28 = a4;
v27 = a5;
v26 = 0LL;
if ( (*(_QWORD *)(a1 + 880) & 0x80000LL) != 0 )
{
if ( *(_QWORD *)(v31 + 1152) && *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 8LL) )
{
v26 = *(const char **)(*(_QWORD *)(v31 + 1152) + 8LL);
}
else if ( v28 )
{
v26 = v28;
}
}
if ( !v26 )
{
if ( (*(_QWORD *)(v31 + 880) & 0x200LL) != 0 )
v26 = "mysql_native_password";
else
v26 = "mysql_old_password";
}
plugin = mysql_client_find_plugin(v31, v26, 2u);
if ( !plugin )
plugin = (void (**)(void))&dummy_fallback_client_plugin;
*(_DWORD *)(v31 + 144) = 0;
if ( v28 && (unsigned int)strcmp(v28, v26) )
{
v30 = 0LL;
v29 = 0;
}
v23 = v28 == 0LL;
v19 = v30;
v20 = v29;
v18[0] = client_mpvio_read_packet;
v18[1] = client_mpvio_write_packet;
v18[2] = client_mpvio_info;
v18[3] = v31;
v22 = 0;
v21 = 0;
v18[5] = v27;
while ( 1 )
{
v18[4] = plugin;
if ( v26
&& *(_QWORD *)(v31 + 1152)
&& *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL)
&& !strstr(*(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL), v26) )
{
my_set_error(v31, 0x1392u, (long long)SQLSTATE_UNKNOWN, 0LL, v28);
return 1;
}
**(_BYTE **)(v31 + 32) = 0;
v5 = v31;
v16 = ((long long ( *)(_QWORD *, long long))plugin[11])(v18, v31);
if ( !v16 && !*(_QWORD *)(v31 + 8) || v16 > -1 && **(unsigned __int8 **)(v31 + 32) != 254 )
{
if ( v16 <= 0 )
{
if ( !*(_DWORD *)(v31 + 144) )
my_set_error(v31, 0x7D0u, (long long)SQLSTATE_UNKNOWN, 0LL);
}
else
{
my_set_error(v31, v16, (long long)SQLSTATE_UNKNOWN, 0LL);
}
return 1;
}
v17 = v16 == -1 ? ma_net_safe_read(v31, v5, v6, v7, v8, v9) : v24;
if ( v17 == 0xFFFFFFFFLL )
break;
if ( **(unsigned __int8 **)(v31 + 32) != 254 )
{
if ( **(_BYTE **)(v31 + 32) )
return 1;
else
return (unsigned int)ma_read_ok_packet(v31, (unsigned __int8 *)(*(_QWORD *)(v31 + 32) + 1LL), v17);
}
if ( v17 == 1 )
{
v26 = "mysql_old_password";
v19 = v31 + 1166;
v20 = 21;
}
else
{
v26 = (const char *)(*(_QWORD *)(v31 + 32) + 1LL);
v15 = strlen(v26);
v20 = v17 - v15 - 2;
v19 = v15 + *(_QWORD *)(v31 + 32) + 2LL;
}
plugin = mysql_client_find_plugin(v31, v26, 2u);
if ( !plugin )
plugin = (void (**)(void))&dummy_fallback_client_plugin;
}
if ( *(_DWORD *)(v31 + 144) == 2013 )
{
v12 = v31;
v13 = SQLSTATE_UNKNOWN;
v14 = client_errors[55];
v10 = (unsigned int *)__errno_location();
my_set_error(v12, 0x7DDu, (long long)v13, (long long)v14, "reading authorization packet", *v10);
}
return 1;
}
| run_plugin_auth:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x80000
CMP RAX,0x0
JZ 0x0015a105
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0015a0f2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0015a0f2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015a103
LAB_0015a0f2:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0015a101
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LAB_0015a101:
JMP 0x0015a103
LAB_0015a103:
JMP 0x0015a105
LAB_0015a105:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0015a13d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0015a130
LEA RAX,[0x16aefa]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015a13b
LAB_0015a130:
LEA RAX,[0x16aee7]
MOV qword ptr [RBP + -0x38],RAX
LAB_0015a13b:
JMP 0x0015a13d
LAB_0015a13d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x2
CALL 0x00150a10
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0015a164
LEA RAX,[0x17fe68]
MOV qword ptr [RBP + -0x40],RAX
LAB_0015a164:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x0
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0015a19a
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00114600
CMP EAX,0x0
JZ 0x0015a19a
MOV qword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_0015a19a:
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x48],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x58],EAX
LEA RAX,[0x15a4f0]
MOV qword ptr [RBP + -0x90],RAX
LEA RAX,[0x15a630]
MOV qword ptr [RBP + -0x88],RAX
LEA RAX,[0x15a780]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0x4c],0x0
MOV dword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
LAB_0015a1fd:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0015a280
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0015a280
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x150],0x0
JZ 0x0015a280
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x150]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00114100
CMP RAX,0x0
JNZ 0x0015a27e
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0x28]
MOV ESI,0x1392
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x001307d0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015a4de
LAB_0015a27e:
JMP 0x0015a280
LAB_0015a280:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x58]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x90]
CALL RAX
MOV dword ptr [RBP + -0x9c],EAX
CMP dword ptr [RBP + -0x9c],0x0
JNZ 0x0015a2ba
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0015a2d5
LAB_0015a2ba:
CMP dword ptr [RBP + -0x9c],-0x1
JLE 0x0015a338
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JZ 0x0015a338
LAB_0015a2d5:
CMP dword ptr [RBP + -0x9c],0x0
JLE 0x0015a2ff
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x9c]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x001307d0
JMP 0x0015a32c
LAB_0015a2ff:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x90],0x0
JNZ 0x0015a32a
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x001307d0
LAB_0015a32a:
JMP 0x0015a32c
LAB_0015a32c:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015a4de
LAB_0015a338:
CMP dword ptr [RBP + -0x9c],-0x1
JNZ 0x0015a353
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001304c0
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0015a35e
LAB_0015a353:
MOVSXD RAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0x98],RAX
LAB_0015a35e:
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x98],RAX
JNZ 0x0015a3e9
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x90],0x7dd
JNZ 0x0015a3dd
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xb8],RAX
LEA RAX,[0x180ea0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb0],RAX
LEA RAX,[0x180eb0]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV qword ptr [RBP + -0xa8],RAX
CALL 0x00114050
MOV RDI,qword ptr [RBP + -0xb8]
MOV RDX,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0xa8]
MOV R9D,dword ptr [RAX]
MOV ESI,0x7dd
LEA R8,[0x16b459]
MOV AL,0x0
CALL 0x001307d0
LAB_0015a3dd:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015a4de
LAB_0015a3e9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x0015a4a6
CMP qword ptr [RBP + -0x98],0x1
JNZ 0x0015a42b
LEA RAX,[0x16aee7]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x48e
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x58],0x15
JMP 0x0015a47a
LAB_0015a42b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001141a0
MOV dword ptr [RBP + -0xa0],EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + -0xa0]
SUB RAX,RCX
SUB RAX,0x2
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RBP + -0xa0]
ADD RAX,RCX
ADD RAX,0x2
MOV qword ptr [RBP + -0x60],RAX
LAB_0015a47a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x2
CALL 0x00150a10
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0015a4a1
LEA RAX,[0x17fe68]
MOV qword ptr [RBP + -0x40],RAX
LAB_0015a4a1:
JMP 0x0015a1fd
LAB_0015a4a6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0015a4d7
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x98]
CALL 0x00138ef0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015a4de
LAB_0015a4d7:
MOV dword ptr [RBP + -0x4],0x1
LAB_0015a4de:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int4 run_plugin_auth(long param_1,long param_2,int param_3,char *param_4,int8 param_5)
{
int *puVar1;
int *puVar2;
long lVar3;
int iVar4;
char *pcVar5;
int *piVar6;
size_t sVar7;
long local_a0;
code *local_98;
code *local_90;
code *local_88;
long local_80;
int1 *local_78;
int8 local_70;
long local_68;
int local_60;
int4 local_58;
int4 local_54;
int1 local_50;
int local_4c;
int1 *local_48;
char *local_40;
int8 local_38;
char *local_30;
int local_24;
long local_20;
long local_18;
int4 local_c;
local_40 = (char *)0x0;
if ((*(ulong *)(param_1 + 0x370) & 0x80000) != 0) {
if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 8) == 0)) {
if (param_4 != (char *)0x0) {
local_40 = param_4;
}
}
else {
local_40 = *(char **)(*(long *)(param_1 + 0x480) + 8);
}
}
if (local_40 == (char *)0x0) {
if ((*(ulong *)(param_1 + 0x370) & 0x200) == 0) {
local_40 = "mysql_old_password";
}
else {
local_40 = "mysql_native_password";
}
}
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
local_48 = (int1 *)mysql_client_find_plugin(param_1,local_40,2);
if (local_48 == (int1 *)0x0) {
local_48 = dummy_fallback_client_plugin;
}
*(int4 *)(local_18 + 0x90) = 0;
if ((local_30 != (char *)0x0) && (iVar4 = strcmp(local_30,local_40), iVar4 != 0)) {
local_20 = 0;
local_24 = 0;
}
local_50 = local_30 == (char *)0x0;
local_68 = local_20;
local_60 = local_24;
local_98 = client_mpvio_read_packet;
local_90 = client_mpvio_write_packet;
local_88 = client_mpvio_info;
local_80 = local_18;
local_54 = 0;
local_58 = 0;
local_70 = local_38;
while( true ) {
local_78 = local_48;
if ((((local_40 != (char *)0x0) && (*(long *)(local_18 + 0x480) != 0)) &&
(*(long *)(*(long *)(local_18 + 0x480) + 0x150) != 0)) &&
(pcVar5 = strstr(*(char **)(*(long *)(local_18 + 0x480) + 0x150),local_40),
pcVar5 == (char *)0x0)) {
my_set_error(local_18,0x1392,SQLSTATE_UNKNOWN,0,local_30);
return 1;
}
**(int1 **)(local_18 + 0x20) = 0;
iVar4 = (**(code **)(local_48 + 0x58))(&local_98,local_18);
if (((iVar4 == 0) && (*(long *)(local_18 + 8) == 0)) ||
((-1 < iVar4 && (**(char **)(local_18 + 0x20) != -2)))) {
if (iVar4 < 1) {
if (*(int *)(local_18 + 0x90) == 0) {
my_set_error(local_18,2000,SQLSTATE_UNKNOWN,0);
}
}
else {
my_set_error(local_18,iVar4,SQLSTATE_UNKNOWN,0);
}
return 1;
}
if (iVar4 == -1) {
local_a0 = ma_net_safe_read(local_18);
}
else {
local_a0 = (long)local_4c;
}
lVar3 = local_18;
puVar2 = PTR_s_Lost_connection_to_server_at___s_00181068;
puVar1 = SQLSTATE_UNKNOWN;
if (local_a0 == 0xffffffff) break;
if (**(char **)(local_18 + 0x20) != -2) {
if (**(char **)(local_18 + 0x20) == '\0') {
local_c = ma_read_ok_packet(local_18,*(long *)(local_18 + 0x20) + 1,local_a0);
}
else {
local_c = 1;
}
return local_c;
}
if (local_a0 == 1) {
local_40 = "mysql_old_password";
local_68 = local_18 + 0x48e;
local_60 = 0x15;
}
else {
local_40 = (char *)(*(long *)(local_18 + 0x20) + 1);
sVar7 = strlen(local_40);
local_60 = ((int)local_a0 - (int)sVar7) + -2;
local_68 = *(long *)(local_18 + 0x20) + (sVar7 & 0xffffffff) + 2;
}
local_48 = (int1 *)mysql_client_find_plugin(local_18,local_40,2);
if (local_48 == (int1 *)0x0) {
local_48 = dummy_fallback_client_plugin;
}
}
if (*(int *)(local_18 + 0x90) == 0x7dd) {
piVar6 = __errno_location();
my_set_error(lVar3,0x7dd,puVar1,puVar2,"reading authorization packet",*piVar6);
}
return 1;
}
| |
23,859 | Catch::(anonymous namespace)::SummaryColumn::~SummaryColumn() | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | SummaryColumn( std::string suffix, Colour::Code colour ):
m_suffix( CATCH_MOVE( suffix ) ), m_colour( colour ) {} | O3 | cpp | Catch::(anonymous namespace)::SummaryColumn::~SummaryColumn():
pushq %rbx
movq %rdi, %rbx
addq $0x30, %rdi
callq 0x783e8
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x6b405
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x17150
popq %rbx
retq
| _ZN5Catch12_GLOBAL__N_113SummaryColumnD2Ev:
push rbx
mov rbx, rdi
add rdi, 30h ; '0'
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_6B405
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_6B405:
pop rbx
retn
| void Catch::`anonymous namespace'::SummaryColumn::~SummaryColumn(void **this)
{
_QWORD *v2; // rdi
_QWORD *v3; // rbx
std::vector<std::string>::~vector(this + 6);
v2 = *this;
v3 = this + 2;
if ( v2 != v3 )
operator delete(v2, *v3 + 1LL);
}
| ~SummaryColumn:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x30
CALL 0x001783e8
MOV RDI,qword ptr [RBX]
ADD RBX,0x10
CMP RDI,RBX
JZ 0x0016b405
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00117150
LAB_0016b405:
POP RBX
RET
|
/* Catch::(anonymous namespace)::SummaryColumn::~SummaryColumn() */
void __thiscall Catch::(anonymous_namespace)::SummaryColumn::~SummaryColumn(SummaryColumn *this)
{
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30));
if (*(SummaryColumn **)this != this + 0x10) {
operator_delete(*(SummaryColumn **)this,*(long *)(this + 0x10) + 1);
return;
}
return;
}
| |
23,860 | google::protobuf::compiler::StripProto(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/code_generator.cc | std::string StripProto(const std::string& filename) {
if (HasSuffixString(filename, ".protodevel")) {
return StripSuffixString(filename, ".protodevel");
} else {
return StripSuffixString(filename, ".proto");
}
} | O0 | cpp | google::protobuf::compiler::StripProto(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xc8, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xb8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x30550
leaq 0x98(%rsp), %rdi
leaq 0x1e6dd(%rip), %rsi # 0x1fa7d5
callq 0x30720
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq 0x17f500
testb $0x1, %al
jne 0x1dc12b
jmp 0x1dc1c5
movq 0xb8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x77(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x13760
movq 0x20(%rsp), %rdx
leaq 0x1e682(%rip), %rsi # 0x1fa7d5
leaq 0x78(%rsp), %rdi
callq 0x135f0
jmp 0x1dc15f
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x1dc3c0
jmp 0x1dc175
leaq 0x78(%rsp), %rdi
callq 0x13290
leaq 0x77(%rsp), %rdi
callq 0x134d0
jmp 0x1dc259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0x1dc1b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x13290
leaq 0x77(%rsp), %rdi
callq 0x134d0
jmp 0x1dc266
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x13760
movq 0x10(%rsp), %rdx
leaq 0x1e8b7(%rip), %rsi # 0x1faaa4
leaq 0x40(%rsp), %rdi
callq 0x135f0
jmp 0x1dc1f9
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x1dc3c0
jmp 0x1dc20f
leaq 0x40(%rsp), %rdi
callq 0x13290
leaq 0x3f(%rsp), %rdi
callq 0x134d0
jmp 0x1dc259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0x1dc24d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x13290
leaq 0x3f(%rsp), %rdi
callq 0x134d0
jmp 0x1dc266
movq 0x30(%rsp), %rax
addq $0xc8, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0x13750
| _ZN6google8protobuf8compiler10StripProtoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0C8h
mov [rsp+0C8h+var_A0], rdi
mov rax, rdi
mov [rsp+0C8h+var_98], rax
mov [rsp+0C8h+var_8], rdi
mov [rsp+0C8h+var_10], rsi
mov rsi, [rsp+0C8h+var_10]
lea rdi, [rsp+0C8h+var_20]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
lea rdi, [rsp+0C8h+var_30]; this
lea rsi, aProtodevel; ".protodevel"
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2EPKc; google::protobuf::stringpiece_internal::StringPiece::StringPiece(char const*)
mov rdi, [rsp+0C8h+var_20]
mov rsi, [rsp+0C8h+var_18]
mov rdx, [rsp+0C8h+var_30]
mov rcx, [rsp+0C8h+var_28]
call _ZN6google8protobuf15HasSuffixStringENS0_20stringpiece_internal11StringPieceES2_; google::protobuf::HasSuffixString(google::protobuf::stringpiece_internal::StringPiece,google::protobuf::stringpiece_internal::StringPiece)
test al, 1
jnz short loc_1DC12B
jmp loc_1DC1C5
loc_1DC12B:
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_B0], rax
lea rdi, [rsp+0C8h+var_51]
mov [rsp+0C8h+var_A8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0C8h+var_A8]
lea rsi, aProtodevel; ".protodevel"
lea rdi, [rsp+0C8h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_1DC15F:
mov rsi, [rsp+0C8h+var_B0]
mov rdi, [rsp+0C8h+var_A0]
lea rdx, [rsp+0C8h+var_50]
call _ZN6google8protobuf17StripSuffixStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; google::protobuf::StripSuffixString(std::string const&,std::string const&)
jmp short $+2
loc_1DC175:
lea rdi, [rsp+0C8h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1DC259
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
jmp short loc_1DC1B6
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
lea rdi, [rsp+arg_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1DC1B6:
lea rdi, [rsp+arg_6F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1DC266
loc_1DC1C5:
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
lea rdi, [rsp+0C8h+var_89]
mov [rsp+0C8h+var_B8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0C8h+var_B8]
lea rsi, aGoogleProtobuf_71+1Fh; ".proto"
lea rdi, [rsp+0C8h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_1DC1F9:
mov rsi, [rsp+0C8h+var_C0]
mov rdi, [rsp+0C8h+var_A0]
lea rdx, [rsp+0C8h+var_88]
call _ZN6google8protobuf17StripSuffixStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; google::protobuf::StripSuffixString(std::string const&,std::string const&)
jmp short $+2
loc_1DC20F:
lea rdi, [rsp+0C8h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_1DC259
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
jmp short loc_1DC24D
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1DC24D:
lea rdi, [rsp+arg_37]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_1DC266
loc_1DC259:
mov rax, [rsp+0C8h+var_98]
add rsp, 0C8h
retn
loc_1DC266:
mov rdi, [rsp+arg_60]
call __Unwind_Resume
| long long google::protobuf::compiler::StripProto(long long a1, long long a2)
{
long long v2; // rsi
long long v4; // [rsp+8h] [rbp-C0h]
long long v5; // [rsp+18h] [rbp-B0h]
char v6; // [rsp+3Fh] [rbp-89h] BYREF
_BYTE v7[55]; // [rsp+40h] [rbp-88h] BYREF
char v8; // [rsp+77h] [rbp-51h] BYREF
_BYTE v9[32]; // [rsp+78h] [rbp-50h] BYREF
long long v10[2]; // [rsp+98h] [rbp-30h] BYREF
long long v11; // [rsp+A8h] [rbp-20h] BYREF
long long v12; // [rsp+B0h] [rbp-18h]
long long v13; // [rsp+B8h] [rbp-10h]
long long v14; // [rsp+C0h] [rbp-8h]
v14 = a1;
v13 = a2;
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(&v11, a2);
google::protobuf::stringpiece_internal::StringPiece::StringPiece(
(google::protobuf::stringpiece_internal::StringPiece *)v10,
".protodevel");
v2 = v12;
if ( google::protobuf::HasSuffixString(v11, v12, v10[0], v10[1]) )
{
v5 = v13;
std::allocator<char>::allocator(&v8, v2);
std::string::basic_string(v9, ".protodevel", &v8);
google::protobuf::StripSuffixString(a1, v5, v9);
std::string::~string(v9);
std::allocator<char>::~allocator(&v8);
}
else
{
v4 = v13;
std::allocator<char>::allocator(&v6, v2);
std::string::basic_string(v7, ".proto", &v6);
google::protobuf::StripSuffixString(a1, v4, v7);
std::string::~string(v7);
std::allocator<char>::~allocator(&v6);
}
return a1;
}
| operator*:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
RET
|
/* google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart
const>::TEMPNAMEPLACEHOLDERVALUE() const */
int8 __thiscall
google::protobuf::internal::
RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart_const>::operator*
(RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart_const> *this)
{
return **(int8 **)this;
}
| |
23,861 | js_typed_array_copyWithin | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_copyWithin(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int len, to, from, final, count, shift, space;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = p->u.array.count;
if (JS_ToInt32Clamp(ctx, &to, argv[0], 0, len, len))
return JS_EXCEPTION;
if (JS_ToInt32Clamp(ctx, &from, argv[1], 0, len, len))
return JS_EXCEPTION;
final = len;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32Clamp(ctx, &final, argv[2], 0, len, len))
return JS_EXCEPTION;
}
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
// RAB may have been resized by evil .valueOf method
space = p->u.array.count - max_int(to, from);
count = min_int(final - from, len - to);
count = min_int(count, space);
if (count > 0) {
shift = typed_array_size_log2(p->class_id);
memmove(p->u.array.u.uint8_ptr + (to << shift),
p->u.array.u.uint8_ptr + (from << shift),
count << shift);
}
return js_dup(this_val);
} | O1 | c | js_typed_array_copyWithin:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, 0x18(%rsp)
cmpl $-0x1, %ebx
jne 0x80e2b
movq 0x18(%rsp), %r15
movzwl 0x6(%r15), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x80e3f
leaq 0x215df(%rip), %rsi # 0xa2411
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x22567
testq %r15, %r15
je 0x80e65
movq %r15, %rdi
callq 0x396c4
testl %eax, %eax
je 0x80e69
leaq 0x215cb(%rip), %rsi # 0xa2422
xorl %ebp, %ebp
movq %r12, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x80ec0
xorl %ebp, %ebp
jmp 0x80ec0
movl %ebp, 0x24(%rsp)
movq %r14, 0x30(%rsp)
movl 0x40(%r15), %r14d
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movl %r14d, (%rsp)
leaq 0x2c(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
movl %r14d, %r9d
callq 0x27756
testl %eax, %eax
jne 0x80ec0
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movl %r14d, (%rsp)
leaq 0x28(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
movl %r14d, %r9d
callq 0x27756
testl %eax, %eax
je 0x80edf
xorl %eax, %eax
movl $0x6, %ebx
orq %rax, %rbp
movq %rbp, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, 0x14(%rsp)
cmpl $0x3, 0x24(%rsp)
jl 0x80f15
movq 0x28(%r13), %rcx
cmpl $0x3, %ecx
je 0x80f15
movq 0x20(%r13), %rdx
movl %r14d, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
movl %r14d, %r9d
callq 0x27756
testl %eax, %eax
jne 0x80ec0
movq %r15, %rdi
callq 0x396c4
testl %eax, %eax
jne 0x80e50
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %eax
cmpl %eax, %edx
movl %eax, %ecx
cmovgl %edx, %ecx
movl 0x40(%r15), %esi
subl %ecx, %esi
movl 0x14(%rsp), %ecx
subl %eax, %ecx
subl %edx, %r14d
cmpl %r14d, %ecx
cmovll %ecx, %r14d
cmpl %esi, %r14d
cmovgel %esi, %r14d
testl %r14d, %r14d
jle 0x80f85
movzwl 0x6(%r15), %ecx
leaq 0x1c97d(%rip), %rsi # 0x9d8df
movb -0x15(%rcx,%rsi), %cl
movq 0x38(%r15), %r8
shll %cl, %edx
movslq %edx, %rdi
shll %cl, %eax
addq %r8, %rdi
movslq %eax, %rsi
addq %r8, %rsi
shll %cl, %r14d
movslq %r14d, %rdx
callq 0xe720
movq 0x30(%rsp), %rcx
movq %rcx, 0x18(%rsp)
cmpl $-0x9, %ebx
jb 0x80f9b
movq 0x18(%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl %ecx, %ebp
jmp 0x80ec7
| js_typed_array_copyWithin:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r12, rdi
mov [rsp+68h+var_50], rsi
cmp ebx, 0FFFFFFFFh
jnz short loc_80E2B
mov r15, [rsp+68h+var_50]
movzx eax, word ptr [r15+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_80E3F
loc_80E2B:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r15d, r15d
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
loc_80E3F:
test r15, r15
jz short loc_80E65
mov rdi, r15
call typed_array_is_oob
test eax, eax
jz short loc_80E69
loc_80E50:
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor ebp, ebp
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
jmp short loc_80EC0
loc_80E65:
xor ebp, ebp
jmp short loc_80EC0
loc_80E69:
mov [rsp+68h+var_44], ebp
mov [rsp+68h+var_38], r14
mov r14d, [r15+40h]
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_68], r14d
lea rsi, [rsp+68h+var_3C]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
mov r9d, r14d
call JS_ToInt32Clamp
test eax, eax
jnz short loc_80EC0
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov [rsp+68h+var_68], r14d
lea rsi, [rsp+68h+var_40]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
mov r9d, r14d
call JS_ToInt32Clamp
test eax, eax
jz short loc_80EDF
loc_80EC0:
xor eax, eax
mov ebx, 6
loc_80EC7:
or rbp, rax
mov rax, rbp
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_80EDF:
mov [rsp+68h+var_54], r14d
cmp [rsp+68h+var_44], 3
jl short loc_80F15
mov rcx, [r13+28h]
cmp ecx, 3
jz short loc_80F15
mov rdx, [r13+20h]
mov [rsp+68h+var_68], r14d
lea rsi, [rsp+68h+var_54]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
mov r9d, r14d
call JS_ToInt32Clamp
test eax, eax
jnz short loc_80EC0
loc_80F15:
mov rdi, r15
call typed_array_is_oob
test eax, eax
jnz loc_80E50
mov edx, [rsp+68h+var_3C]
mov eax, [rsp+68h+var_40]
cmp edx, eax
mov ecx, eax
cmovg ecx, edx
mov esi, [r15+40h]
sub esi, ecx
mov ecx, [rsp+68h+var_54]
sub ecx, eax
sub r14d, edx
cmp ecx, r14d
cmovl r14d, ecx
cmp r14d, esi
cmovge r14d, esi
test r14d, r14d
jle short loc_80F85
movzx ecx, word ptr [r15+6]
lea rsi, typed_array_size_log2
mov cl, [rcx+rsi-15h]
mov r8, [r15+38h]
shl edx, cl
movsxd rdi, edx
shl eax, cl
add rdi, r8
movsxd rsi, eax
add rsi, r8
shl r14d, cl
movsxd rdx, r14d
call _memmove
loc_80F85:
mov rcx, [rsp+68h+var_38]
mov [rsp+68h+var_50], rcx
cmp ebx, 0FFFFFFF7h
jb short loc_80F9B
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_80F9B:
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ebp, ecx
jmp loc_80EC7
| unsigned long long js_typed_array_copyWithin(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebp
unsigned int v16; // ebx
long long v17; // r15
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rbp
int v25; // r14d
unsigned long long v26; // rax
long long v28; // rcx
int v29; // ecx
int v30; // r14d
char v31; // cl
long long v32; // rcx
char v33; // [rsp+0h] [rbp-68h]
int v34; // [rsp+14h] [rbp-54h] BYREF
long long v35; // [rsp+18h] [rbp-50h]
int v36; // [rsp+24h] [rbp-44h]
int v37; // [rsp+28h] [rbp-40h] BYREF
int v38; // [rsp+2Ch] [rbp-3Ch] BYREF
long long v39; // [rsp+30h] [rbp-38h]
v15 = a4;
v16 = a3;
v35 = a2;
if ( (_DWORD)a3 != -1 || (v17 = v35, (unsigned __int16)(*(_WORD *)(v35 + 6) - 21) >= 0xCu) )
{
v17 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v33);
}
if ( !v17 )
{
v24 = 0LL;
goto LABEL_10;
}
if ( typed_array_is_oob(v17) )
goto LABEL_6;
v36 = v15;
v39 = a2;
v25 = *(_DWORD *)(v17 + 64);
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v38, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v25, v25) )
goto LABEL_10;
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v37, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0, v25, v25) )
goto LABEL_10;
v34 = v25;
if ( v36 >= 3 )
{
v28 = *(_QWORD *)(a5 + 40);
if ( (_DWORD)v28 != 3 )
{
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v34, *(_DWORD **)(a5 + 32), v28, 0, v25, v25) )
goto LABEL_10;
}
}
if ( typed_array_is_oob(v17) )
{
LABEL_6:
v24 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v18,
v19,
v20,
v21,
a7,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
v33);
LABEL_10:
v26 = 0LL;
return v26 | v24;
}
v29 = v37;
if ( v38 > v37 )
v29 = v38;
v30 = v25 - v38;
if ( v34 - v37 < v30 )
v30 = v34 - v37;
if ( v30 >= *(_DWORD *)(v17 + 64) - v29 )
v30 = *(_DWORD *)(v17 + 64) - v29;
if ( v30 > 0 )
{
v31 = typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21];
memmove(*(_QWORD *)(v17 + 56) + (v38 << v31), *(_QWORD *)(v17 + 56) + (v37 << v31), v30 << v31);
}
v32 = v39;
v35 = v39;
if ( v16 >= 0xFFFFFFF7 )
++*(_DWORD *)v35;
v26 = v32 & 0xFFFFFFFF00000000LL;
v24 = (unsigned int)v32;
return v26 | v24;
}
| js_typed_array_copyWithin:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x18],RSI
CMP EBX,-0x1
JNZ 0x00180e2b
MOV R15,qword ptr [RSP + 0x18]
MOVZX EAX,word ptr [R15 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x00180e3f
LAB_00180e2b:
LEA RSI,[0x1a2411]
XOR R15D,R15D
MOV RDI,R12
XOR EAX,EAX
CALL 0x00122567
LAB_00180e3f:
TEST R15,R15
JZ 0x00180e65
MOV RDI,R15
CALL 0x001396c4
TEST EAX,EAX
JZ 0x00180e69
LAB_00180e50:
LEA RSI,[0x1a2422]
XOR EBP,EBP
MOV RDI,R12
XOR EAX,EAX
CALL 0x00122567
JMP 0x00180ec0
LAB_00180e65:
XOR EBP,EBP
JMP 0x00180ec0
LAB_00180e69:
MOV dword ptr [RSP + 0x24],EBP
MOV qword ptr [RSP + 0x30],R14
MOV R14D,dword ptr [R15 + 0x40]
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV dword ptr [RSP],R14D
LEA RSI,[RSP + 0x2c]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
MOV R9D,R14D
CALL 0x00127756
TEST EAX,EAX
JNZ 0x00180ec0
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV dword ptr [RSP],R14D
LEA RSI,[RSP + 0x28]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
MOV R9D,R14D
CALL 0x00127756
TEST EAX,EAX
JZ 0x00180edf
LAB_00180ec0:
XOR EAX,EAX
MOV EBX,0x6
LAB_00180ec7:
OR RBP,RAX
MOV RAX,RBP
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00180edf:
MOV dword ptr [RSP + 0x14],R14D
CMP dword ptr [RSP + 0x24],0x3
JL 0x00180f15
MOV RCX,qword ptr [R13 + 0x28]
CMP ECX,0x3
JZ 0x00180f15
MOV RDX,qword ptr [R13 + 0x20]
MOV dword ptr [RSP],R14D
LEA RSI,[RSP + 0x14]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
MOV R9D,R14D
CALL 0x00127756
TEST EAX,EAX
JNZ 0x00180ec0
LAB_00180f15:
MOV RDI,R15
CALL 0x001396c4
TEST EAX,EAX
JNZ 0x00180e50
MOV EDX,dword ptr [RSP + 0x2c]
MOV EAX,dword ptr [RSP + 0x28]
CMP EDX,EAX
MOV ECX,EAX
CMOVG ECX,EDX
MOV ESI,dword ptr [R15 + 0x40]
SUB ESI,ECX
MOV ECX,dword ptr [RSP + 0x14]
SUB ECX,EAX
SUB R14D,EDX
CMP ECX,R14D
CMOVL R14D,ECX
CMP R14D,ESI
CMOVGE R14D,ESI
TEST R14D,R14D
JLE 0x00180f85
MOVZX ECX,word ptr [R15 + 0x6]
LEA RSI,[0x19d8df]
MOV CL,byte ptr [RCX + RSI*0x1 + -0x15]
MOV R8,qword ptr [R15 + 0x38]
SHL EDX,CL
MOVSXD RDI,EDX
SHL EAX,CL
ADD RDI,R8
MOVSXD RSI,EAX
ADD RSI,R8
SHL R14D,CL
MOVSXD RDX,R14D
CALL 0x0010e720
LAB_00180f85:
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RCX
CMP EBX,-0x9
JC 0x00180f9b
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_00180f9b:
MOV RAX,-0x100000000
AND RAX,RCX
MOV EBP,ECX
JMP 0x00180ec7
|
int1 [16]
js_typed_array_copyWithin
(int8 param_1,int *param_2,int8 param_3,int param_4,int8 *param_5)
{
byte bVar1;
int iVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
int iVar6;
int *piVar7;
int1 auVar8 [16];
int local_54;
int *local_50;
int local_44;
int local_40;
int local_3c;
int *local_38;
local_50 = param_2;
if (((uint)param_3 != 0xffffffff) ||
(piVar7 = param_2, 0xb < (ushort)(*(short *)((long)param_2 + 6) - 0x15U))) {
piVar7 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
if (piVar7 != (int *)0x0) {
iVar2 = typed_array_is_oob(piVar7);
if (iVar2 == 0) {
iVar2 = piVar7[0x10];
local_44 = param_4;
local_38 = param_2;
iVar3 = JS_ToInt32Clamp(param_1,&local_3c,*param_5,param_5[1],0,iVar2,iVar2);
if (((iVar3 != 0) ||
(iVar3 = JS_ToInt32Clamp(param_1,&local_40,param_5[2],param_5[3],0,iVar2,iVar2),
iVar3 != 0)) ||
((local_54 = iVar2, 2 < local_44 &&
(((int)param_5[5] != 3 &&
(iVar3 = JS_ToInt32Clamp(param_1,&local_54,param_5[4],param_5[5],0,iVar2,iVar2),
iVar3 != 0)))))) goto LAB_00180ec0;
iVar3 = typed_array_is_oob(piVar7);
if (iVar3 == 0) {
iVar3 = local_40;
if (local_40 < local_3c) {
iVar3 = local_3c;
}
iVar6 = iVar2 - local_3c;
if (local_54 - local_40 < iVar2 - local_3c) {
iVar6 = local_54 - local_40;
}
if (piVar7[0x10] - iVar3 <= iVar6) {
iVar6 = piVar7[0x10] - iVar3;
}
if (0 < iVar6) {
bVar1 = "toSorted"[(ulong)*(ushort *)((long)piVar7 + 6) + 6];
memmove((void *)((long)(local_3c << (bVar1 & 0x1f)) + *(long *)(piVar7 + 0xe)),
(void *)((long)(local_40 << (bVar1 & 0x1f)) + *(long *)(piVar7 + 0xe)),
(long)(iVar6 << (bVar1 & 0x1f)));
}
if (0xfffffff6 < (uint)param_3) {
*local_38 = *local_38 + 1;
}
uVar4 = (ulong)local_38 & 0xffffffff00000000;
uVar5 = (ulong)local_38 & 0xffffffff;
goto LAB_00180ec7;
}
}
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
}
LAB_00180ec0:
uVar5 = 0;
uVar4 = 0;
param_3 = 6;
LAB_00180ec7:
auVar8._8_8_ = param_3;
auVar8._0_8_ = uVar5 | uVar4;
return auVar8;
}
| |
23,862 | ratio | eloqsql/strings/dtoa.c | static double ratio(Bigint *a, Bigint *b)
{
U da, db;
int k, ka, kb;
dval(&da)= b2d(a, &ka);
dval(&db)= b2d(b, &kb);
k= ka - kb + 32*(a->wds - b->wds);
if (k > 0)
word0(&da)+= (ULong)(k*Exp_msk1 * 1.0);
else
{
k= -k;
word0(&db)+= k*Exp_msk1;
}
return dval(&da) / dval(&db);
} | O0 | c | ratio:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x72fc0
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x72fc0
movsd %xmm0, -0x20(%rbp)
movl -0x28(%rbp), %eax
subl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x10(%rbp), %rdx
subl 0x14(%rdx), %ecx
shll $0x5, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x72c64
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x72c78
xorl %eax, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movsd -0x18(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ratio:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_28]
call b2d
movsd [rbp+var_18], xmm0
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_2C]
call b2d
movsd [rbp+var_20], xmm0
mov eax, [rbp+var_28]
sub eax, [rbp+var_2C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+14h]
mov rdx, [rbp+var_10]
sub ecx, [rdx+14h]
shl ecx, 5
add eax, ecx
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_72C64
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_18+4]
mov dword ptr [rbp+var_18+4], eax
jmp short loc_72C78
loc_72C64:
xor eax, eax
sub eax, [rbp+var_24]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_20+4]
mov dword ptr [rbp+var_20+4], eax
loc_72C78:
movsd xmm0, [rbp+var_18]
divsd xmm0, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| double ratio(long long a1, long long a2)
{
int v3; // [rsp+4h] [rbp-2Ch] BYREF
int v4; // [rsp+8h] [rbp-28h] BYREF
int v5; // [rsp+Ch] [rbp-24h]
double v6; // [rsp+10h] [rbp-20h]
double v7; // [rsp+18h] [rbp-18h]
long long v8; // [rsp+20h] [rbp-10h]
long long v9; // [rsp+28h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = b2d(a1, &v4);
v6 = b2d(v8, &v3);
v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3;
if ( v5 <= 0 )
{
v5 = -v5;
HIDWORD(v6) += v5 << 20;
}
else
{
HIDWORD(v7) += v5 << 20;
}
return v7 / v6;
}
| ratio:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x28]
CALL 0x00172fc0
MOVSD qword ptr [RBP + -0x18],XMM0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x2c]
CALL 0x00172fc0
MOVSD qword ptr [RBP + -0x20],XMM0
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x14]
MOV RDX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RDX + 0x14]
SHL ECX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x00172c64
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00172c78
LAB_00172c64:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x1c],EAX
LAB_00172c78:
MOVSD XMM0,qword ptr [RBP + -0x18]
DIVSD XMM0,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
double ratio(long param_1,long param_2)
{
int iVar1;
double dVar2;
int local_34;
int local_30 [2];
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = (double)b2d(param_1,local_30);
dVar2 = (double)b2d(local_18,&local_34);
iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20;
if (iVar1 < 1) {
local_28._4_4_ = (int)((ulong)dVar2 >> 0x20);
local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0));
}
else {
local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20);
local_28 = dVar2;
}
return local_20 / local_28;
}
| |
23,863 | lf_pinbox_real_free | eloqsql/mysys/lf_alloc-pin.c | static void lf_pinbox_real_free(LF_PINS *pins)
{
int npins;
void *list;
void **addr= NULL;
void *first= NULL, *last= NULL;
struct st_my_thread_var *var= my_thread_var;
void *stack_ends_here= var ? var->stack_ends_here : NULL;
LF_PINBOX *pinbox= pins->pinbox;
npins= pinbox->pins_in_array+1;
#ifdef HAVE_ALLOCA
if (stack_ends_here != NULL)
{
int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins;
/* create a sorted list of pinned addresses, to speed up searches */
if (available_stack_size(&pinbox, stack_ends_here) >
alloca_size + ALLOCA_SAFETY_MARGIN)
{
struct st_harvester hv;
addr= (void **) alloca(alloca_size);
hv.granary= addr;
hv.npins= npins;
/* scan the dynarray and accumulate all pinned addresses */
lf_dynarray_iterate(&pinbox->pinarray,
(lf_dynarray_func)harvest_pins, &hv);
npins= (int)(hv.granary-addr);
/* and sort them */
if (npins)
qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp);
}
}
#endif
list= pins->purgatory;
pins->purgatory= 0;
pins->purgatory_count= 0;
while (list)
{
void *cur= list;
list= *(void **)((char *)cur+pinbox->free_ptr_offset);
if (npins)
{
if (addr) /* use binary search */
{
void **a, **b, **c;
for (a= addr, b= addr+npins-1, c= a+(b-a)/2; (b-a) > 1; c= a+(b-a)/2)
if (cur == *c)
a= b= c;
else if (cur > *c)
a= c;
else
b= c;
if (cur == *a || cur == *b)
goto found;
}
else /* no alloca - no cookie. linear search here */
{
if (lf_dynarray_iterate(&pinbox->pinarray,
(lf_dynarray_func)match_pins, cur))
goto found;
}
}
/* not pinned - freeing */
if (last)
last= next_node(pinbox, last)= (uchar *)cur;
else
first= last= (uchar *)cur;
continue;
found:
/* pinned - keeping */
add_to_purgatory(pins, cur);
}
if (last)
pinbox->free_func(first, last, pinbox->free_func_arg);
} | O3 | c | lf_pinbox_real_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x49666
testq %rax, %rax
je 0x4a07e
movq 0xb8(%rax), %rax
movq 0x20(%rbx), %rdi
movq %rdi, -0x38(%rbp)
movl 0x40(%rdi), %r8d
incl %r8d
testq %rax, %rax
je 0x4a08d
movl %r8d, %ecx
shll $0x5, %ecx
leaq -0x38(%rbp), %rdx
subq %rdx, %rax
leal 0x2000(%rcx), %edx
movslq %edx, %rdx
cmpq %rdx, %rax
jle 0x4a08d
movslq %ecx, %rax
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
leaq -0x70(%rbp), %r12
movq %r14, (%r12)
movl %r8d, 0x8(%r12)
leaq 0x38d(%rip), %rsi # 0x4a3d4
movq %r12, %rdx
callq 0x4a59d
movq (%r12), %r8
subq %r14, %r8
shrq $0x3, %r8
testl %r8d, %r8d
je 0x4a090
movslq %r8d, %rsi
leaq 0x3c3(%rip), %rcx # 0x4a42c
movl $0x8, %edx
movq %r14, %rdi
movq %r8, %r15
callq 0x26650
movq %r15, %r8
jmp 0x4a090
movq 0x20(%rbx), %rax
movq %rax, -0x38(%rbp)
movl 0x40(%rax), %r8d
incl %r8d
xorl %r14d, %r14d
movq 0x28(%rbx), %r15
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
testq %r15, %r15
je 0x4a1d8
movslq %r8d, %rax
leaq (%r14,%rax,8), %r13
addq $-0x8, %r13
leaq -0x8(,%rax,8), %rcx
movq %rcx, %rax
sarq $0x3, %rax
movq %rcx, -0x60(%rbp)
shrq $0x3f, %rcx
addq %rax, %rcx
andq $-0x2, %rcx
leaq (%r14,%rcx,4), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
xorl %r10d, %r10d
movq %rbx, -0x58(%rbp)
movq %r14, -0x50(%rbp)
movq %r15, %r12
movq -0x38(%rbp), %rdi
movl 0x38(%rdi), %eax
movq (%r15,%rax), %r15
testl %r8d, %r8d
je 0x4a15d
testq %r14, %r14
je 0x4a172
movq %r14, %rcx
movq %r13, %rax
cmpq $0x9, -0x60(%rbp)
jl 0x4a153
movq -0x48(%rbp), %rdx
movq %r13, %rax
movq %r14, %rcx
cmpq (%rdx), %r12
cmovbeq %rdx, %rax
cmovaeq %rdx, %rcx
cmoveq %rdx, %rax
movq %rax, %rsi
subq %rcx, %rsi
movq %rsi, %rdx
sarq $0x3, %rdx
movq %rsi, %rdi
shrq $0x3f, %rdi
addq %rdx, %rdi
andq $-0x2, %rdi
leaq (%rcx,%rdi,4), %rdx
cmpq $0x8, %rsi
jg 0x4a11f
cmpq (%rcx), %r12
je 0x4a199
cmpq (%rax), %r12
je 0x4a199
testq %r10, %r10
je 0x4a1b1
movq -0x38(%rbp), %rax
movl 0x38(%rax), %eax
movq %r12, (%r10,%rax)
movq %r12, %r10
jmp 0x4a1b8
leaq 0x2cc(%rip), %rsi # 0x4a445
movq %r12, %rdx
movq %r8, %r14
movq %r10, %rbx
callq 0x4a59d
movq %rbx, %r10
movq %r14, %r8
movq -0x50(%rbp), %r14
movq -0x58(%rbp), %rbx
testl %eax, %eax
je 0x4a15d
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movl 0x38(%rax), %eax
movq %rcx, (%r12,%rax)
movq %r12, 0x28(%rbx)
incl 0x30(%rbx)
jmp 0x4a1b8
movq %r12, %r10
movq %r12, -0x40(%rbp)
testq %r15, %r15
jne 0x4a0f0
testq %r10, %r10
je 0x4a1d8
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x40(%rbp), %rdi
movq %r10, %rsi
callq *0x28(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4a1f6
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
| lf_pinbox_real_free:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call _my_thread_var
test rax, rax
jz loc_4A07E
mov rax, [rax+0B8h]
mov rdi, [rbx+20h]
mov [rbp+var_38], rdi
mov r8d, [rdi+40h]
inc r8d
test rax, rax
jz loc_4A08D
mov ecx, r8d
shl ecx, 5
lea rdx, [rbp+var_38]
sub rax, rdx
lea edx, [rcx+2000h]
movsxd rdx, edx
cmp rax, rdx
jle short loc_4A08D
movsxd rax, ecx
mov r14, rsp
add rax, 0Fh
and rax, 0FFFFFFFFFFFFFFF0h
sub r14, rax
mov rsp, r14
lea r12, [rbp+var_70]
mov [r12], r14
mov [r12+8], r8d
lea rsi, harvest_pins
mov rdx, r12
call lf_dynarray_iterate
mov r8, [r12]
sub r8, r14
shr r8, 3
test r8d, r8d
jz short loc_4A090
movsxd rsi, r8d
lea rcx, ptr_cmp
mov edx, 8
mov rdi, r14
mov r15, r8
call _qsort
mov r8, r15
jmp short loc_4A090
loc_4A07E:
mov rax, [rbx+20h]
mov [rbp+var_38], rax
mov r8d, [rax+40h]
inc r8d
loc_4A08D:
xor r14d, r14d
loc_4A090:
mov r15, [rbx+28h]
mov qword ptr [rbx+28h], 0
mov dword ptr [rbx+30h], 0
test r15, r15
jz loc_4A1D8
movsxd rax, r8d
lea r13, [r14+rax*8]
add r13, 0FFFFFFFFFFFFFFF8h
lea rcx, ds:0FFFFFFFFFFFFFFF8h[rax*8]
mov rax, rcx
sar rax, 3
mov [rbp+var_60], rcx
shr rcx, 3Fh
add rcx, rax
and rcx, 0FFFFFFFFFFFFFFFEh
lea rax, [r14+rcx*4]
mov [rbp+var_48], rax
mov [rbp+var_40], 0
xor r10d, r10d
mov [rbp+var_58], rbx
mov [rbp+var_50], r14
loc_4A0F0:
mov r12, r15
mov rdi, [rbp+var_38]
mov eax, [rdi+38h]
mov r15, [r15+rax]
test r8d, r8d
jz short loc_4A15D
test r14, r14
jz short loc_4A172
mov rcx, r14
mov rax, r13
cmp [rbp+var_60], 9
jl short loc_4A153
mov rdx, [rbp+var_48]
mov rax, r13
mov rcx, r14
loc_4A11F:
cmp r12, [rdx]
cmovbe rax, rdx
cmovnb rcx, rdx
cmovz rax, rdx
mov rsi, rax
sub rsi, rcx
mov rdx, rsi
sar rdx, 3
mov rdi, rsi
shr rdi, 3Fh
add rdi, rdx
and rdi, 0FFFFFFFFFFFFFFFEh
lea rdx, [rcx+rdi*4]
cmp rsi, 8
jg short loc_4A11F
loc_4A153:
cmp r12, [rcx]
jz short loc_4A199
cmp r12, [rax]
jz short loc_4A199
loc_4A15D:
test r10, r10
jz short loc_4A1B1
mov rax, [rbp+var_38]
mov eax, [rax+38h]
mov [r10+rax], r12
mov r10, r12
jmp short loc_4A1B8
loc_4A172:
lea rsi, match_pins
mov rdx, r12
mov r14, r8
mov rbx, r10
call lf_dynarray_iterate
mov r10, rbx
mov r8, r14
mov r14, [rbp+var_50]
mov rbx, [rbp+var_58]
test eax, eax
jz short loc_4A15D
loc_4A199:
mov rax, [rbx+20h]
mov rcx, [rbx+28h]
mov eax, [rax+38h]
mov [r12+rax], rcx
mov [rbx+28h], r12
inc dword ptr [rbx+30h]
jmp short loc_4A1B8
loc_4A1B1:
mov r10, r12
mov [rbp+var_40], r12
loc_4A1B8:
test r15, r15
jnz loc_4A0F0
test r10, r10
jz short loc_4A1D8
mov rax, [rbp+var_38]
mov rdx, [rax+30h]
mov rdi, [rbp+var_40]
mov rsi, r10
call qword ptr [rax+28h]
loc_4A1D8:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4A1F6
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4A1F6:
call ___stack_chk_fail
| unsigned long long lf_pinbox_real_free(long long a1)
{
long long v1; // rbx
long long v2; // rax
long long v3; // rax
long long v4; // rdi
unsigned long long v5; // r8
char *v6; // r14
unsigned long long v7; // r15
unsigned long long v8; // r15
long long v9; // r13
unsigned long long v10; // rcx
unsigned long long v11; // r10
unsigned long long v12; // r12
_QWORD *v13; // rax
char *v14; // rdx
unsigned long long v15; // r14
unsigned long long v16; // rbx
int v17; // eax
char *v19; // [rsp+0h] [rbp-70h] BYREF
int v20; // [rsp+8h] [rbp-68h]
long long v21; // [rsp+10h] [rbp-60h]
long long v22; // [rsp+18h] [rbp-58h]
char *v23; // [rsp+20h] [rbp-50h]
char *v24; // [rsp+28h] [rbp-48h]
unsigned long long v25; // [rsp+30h] [rbp-40h]
_QWORD v26[7]; // [rsp+38h] [rbp-38h] BYREF
v1 = a1;
v26[1] = __readfsqword(0x28u);
v2 = my_thread_var();
if ( v2 )
{
v3 = *(_QWORD *)(v2 + 184);
v4 = *(_QWORD *)(a1 + 32);
v26[0] = v4;
v5 = (unsigned int)(*(_DWORD *)(v4 + 64) + 1);
if ( v3 && v3 - (long long)v26 > 32 * (int)v5 + 0x2000 )
{
v6 = (char *)&v19 - ((32 * (int)v5 + 15LL) & 0xFFFFFFFFFFFFFFF0LL);
v19 = v6;
v20 = v5;
lf_dynarray_iterate(v4, harvest_pins, &v19);
v5 = (unsigned long long)(v19 - v6) >> 3;
if ( (_DWORD)v5 )
{
v7 = (unsigned long long)(v19 - v6) >> 3;
qsort(v6, (int)v5, 8LL, ptr_cmp);
v5 = v7;
}
goto LABEL_8;
}
}
else
{
v26[0] = *(_QWORD *)(a1 + 32);
v5 = (unsigned int)(*(_DWORD *)(v26[0] + 64LL) + 1);
}
v6 = 0LL;
LABEL_8:
v8 = *(_QWORD *)(v1 + 40);
*(_QWORD *)(v1 + 40) = 0LL;
*(_DWORD *)(v1 + 48) = 0;
if ( !v8 )
return __readfsqword(0x28u);
v9 = (long long)&v6[8 * (int)v5 - 8];
v21 = 8LL * (int)v5 - 8;
v10 = ((v21 >> 3) + ((unsigned long long)v21 >> 63)) & 0xFFFFFFFFFFFFFFFELL;
v24 = &v6[4 * v10];
v25 = 0LL;
v11 = 0LL;
v22 = v1;
v23 = v6;
do
{
v12 = v8;
v8 = *(_QWORD *)(v8 + *(unsigned int *)(v26[0] + 56LL));
if ( (_DWORD)v5 )
{
if ( v6 )
{
v10 = (unsigned long long)v6;
v13 = (_QWORD *)v9;
if ( v21 >= 9 )
{
v14 = v24;
v13 = (_QWORD *)v9;
v10 = (unsigned long long)v6;
do
{
if ( v12 <= *(_QWORD *)v14 )
v13 = v14;
if ( v12 >= *(_QWORD *)v14 )
v10 = (unsigned long long)v14;
if ( v12 == *(_QWORD *)v14 )
v13 = v14;
v14 = (char *)(v10
+ 4
* ((((long long)((long long)v13 - v10) >> 3) + (((unsigned long long)v13 - v10) >> 63)) & 0xFFFFFFFFFFFFFFFELL));
}
while ( (long long)((long long)v13 - v10) > 8 );
}
if ( v12 == *(_QWORD *)v10 || v12 == *v13 )
{
LABEL_26:
v10 = *(_QWORD *)(v1 + 40);
*(_QWORD *)(v12 + *(unsigned int *)(*(_QWORD *)(v1 + 32) + 56LL)) = v10;
*(_QWORD *)(v1 + 40) = v12;
++*(_DWORD *)(v1 + 48);
continue;
}
}
else
{
v15 = v5;
v16 = v11;
v17 = lf_dynarray_iterate(v26[0], match_pins, v12);
v11 = v16;
v5 = v15;
v6 = v23;
v1 = v22;
if ( v17 )
goto LABEL_26;
}
}
if ( v11 )
{
*(_QWORD *)(v11 + *(unsigned int *)(v26[0] + 56LL)) = v12;
v11 = v12;
}
else
{
v11 = v12;
v25 = v12;
}
}
while ( v8 );
if ( v11 )
(*(void ( **)(unsigned long long, unsigned long long, _QWORD, unsigned long long, unsigned long long))(v26[0] + 40LL))(
v25,
v11,
*(_QWORD *)(v26[0] + 48LL),
v10,
v5);
return __readfsqword(0x28u);
}
| lf_pinbox_real_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00149666
TEST RAX,RAX
JZ 0x0014a07e
MOV RAX,qword ptr [RAX + 0xb8]
MOV RDI,qword ptr [RBX + 0x20]
MOV qword ptr [RBP + -0x38],RDI
MOV R8D,dword ptr [RDI + 0x40]
INC R8D
TEST RAX,RAX
JZ 0x0014a08d
MOV ECX,R8D
SHL ECX,0x5
LEA RDX,[RBP + -0x38]
SUB RAX,RDX
LEA EDX,[RCX + 0x2000]
MOVSXD RDX,EDX
CMP RAX,RDX
JLE 0x0014a08d
MOVSXD RAX,ECX
MOV R14,RSP
ADD RAX,0xf
AND RAX,-0x10
SUB R14,RAX
MOV RSP,R14
LEA R12,[RBP + -0x70]
MOV qword ptr [R12],R14
MOV dword ptr [R12 + 0x8],R8D
LEA RSI,[0x14a3d4]
MOV RDX,R12
CALL 0x0014a59d
MOV R8,qword ptr [R12]
SUB R8,R14
SHR R8,0x3
TEST R8D,R8D
JZ 0x0014a090
MOVSXD RSI,R8D
LEA RCX,[0x14a42c]
MOV EDX,0x8
MOV RDI,R14
MOV R15,R8
CALL 0x00126650
MOV R8,R15
JMP 0x0014a090
LAB_0014a07e:
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV R8D,dword ptr [RAX + 0x40]
INC R8D
LAB_0014a08d:
XOR R14D,R14D
LAB_0014a090:
MOV R15,qword ptr [RBX + 0x28]
MOV qword ptr [RBX + 0x28],0x0
MOV dword ptr [RBX + 0x30],0x0
TEST R15,R15
JZ 0x0014a1d8
MOVSXD RAX,R8D
LEA R13,[R14 + RAX*0x8]
ADD R13,-0x8
LEA RCX,[-0x8 + RAX*0x8]
MOV RAX,RCX
SAR RAX,0x3
MOV qword ptr [RBP + -0x60],RCX
SHR RCX,0x3f
ADD RCX,RAX
AND RCX,-0x2
LEA RAX,[R14 + RCX*0x4]
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x40],0x0
XOR R10D,R10D
MOV qword ptr [RBP + -0x58],RBX
MOV qword ptr [RBP + -0x50],R14
LAB_0014a0f0:
MOV R12,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RDI + 0x38]
MOV R15,qword ptr [R15 + RAX*0x1]
TEST R8D,R8D
JZ 0x0014a15d
TEST R14,R14
JZ 0x0014a172
MOV RCX,R14
MOV RAX,R13
CMP qword ptr [RBP + -0x60],0x9
JL 0x0014a153
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,R13
MOV RCX,R14
LAB_0014a11f:
CMP R12,qword ptr [RDX]
CMOVBE RAX,RDX
CMOVNC RCX,RDX
CMOVZ RAX,RDX
MOV RSI,RAX
SUB RSI,RCX
MOV RDX,RSI
SAR RDX,0x3
MOV RDI,RSI
SHR RDI,0x3f
ADD RDI,RDX
AND RDI,-0x2
LEA RDX,[RCX + RDI*0x4]
CMP RSI,0x8
JG 0x0014a11f
LAB_0014a153:
CMP R12,qword ptr [RCX]
JZ 0x0014a199
CMP R12,qword ptr [RAX]
JZ 0x0014a199
LAB_0014a15d:
TEST R10,R10
JZ 0x0014a1b1
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x38]
MOV qword ptr [R10 + RAX*0x1],R12
MOV R10,R12
JMP 0x0014a1b8
LAB_0014a172:
LEA RSI,[0x14a445]
MOV RDX,R12
MOV R14,R8
MOV RBX,R10
CALL 0x0014a59d
MOV R10,RBX
MOV R8,R14
MOV R14,qword ptr [RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x58]
TEST EAX,EAX
JZ 0x0014a15d
LAB_0014a199:
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x28]
MOV EAX,dword ptr [RAX + 0x38]
MOV qword ptr [R12 + RAX*0x1],RCX
MOV qword ptr [RBX + 0x28],R12
INC dword ptr [RBX + 0x30]
JMP 0x0014a1b8
LAB_0014a1b1:
MOV R10,R12
MOV qword ptr [RBP + -0x40],R12
LAB_0014a1b8:
TEST R15,R15
JNZ 0x0014a0f0
TEST R10,R10
JZ 0x0014a1d8
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R10
CALL qword ptr [RAX + 0x28]
LAB_0014a1d8:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014a1f6
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014a1f6:
CALL 0x001263a0
|
/* WARNING: Type propagation algorithm not settling */
void lf_pinbox_real_free(long param_1)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
code *pcVar4;
ulong *puVar5;
int iVar6;
long lVar7;
ulong *puVar8;
ulong *puVar9;
ulong **__base;
long lVar10;
int iVar11;
ulong uVar12;
ulong *puVar13;
ulong *puVar14;
ulong uVar15;
long in_FS_OFFSET;
ulong *apuStack_80 [2];
int local_70;
long local_68;
long local_60;
ulong *local_58;
ulong *local_50;
ulong local_48;
long local_40;
long local_38;
__base = apuStack_80 + 1;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
apuStack_80[0] = (ulong *)0x149fdc;
lVar7 = _my_thread_var();
if (lVar7 == 0) {
local_40 = *(long *)(param_1 + 0x20);
iVar11 = *(int *)(*(long *)(param_1 + 0x20) + 0x40) + 1;
}
else {
lVar10 = *(long *)(param_1 + 0x20);
local_40 = lVar10;
iVar11 = *(int *)(lVar10 + 0x40) + 1;
if ((*(long *)(lVar7 + 0xb8) != 0) &&
((long)(iVar11 * 0x20 + 0x2000) < *(long *)(lVar7 + 0xb8) - (long)&local_40)) {
lVar7 = -(long)(iVar11 * 0x20);
__base = (ulong **)((long)apuStack_80 + lVar7 + 8U);
apuStack_80[1] = (ulong *)__base;
local_70 = iVar11;
*(int8 *)((long)apuStack_80 + lVar7) = 0x14a04f;
lf_dynarray_iterate(lVar10,harvest_pins,apuStack_80 + 1);
iVar11 = (int)((ulong)((long)apuStack_80[1] - (long)__base) >> 3);
puVar14 = (ulong *)__base;
if (iVar11 != 0) {
*(int8 *)((long)apuStack_80 + lVar7) = 0x14a079;
qsort(__base,(long)iVar11,8,ptr_cmp);
}
goto LAB_0014a090;
}
}
puVar14 = (ulong *)0x0;
LAB_0014a090:
uVar15 = *(ulong *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int4 *)(param_1 + 0x30) = 0;
if (uVar15 != 0) {
puVar13 = puVar14 + (long)iVar11 + -1;
local_68 = (long)iVar11 * 8 + -8;
local_50 = (ulong *)((long)puVar14 +
((local_68 >> 3) - (local_68 >> 0x3f) & 0xfffffffffffffffeU) * 4);
local_48 = 0;
uVar12 = 0;
local_60 = param_1;
local_58 = puVar14;
do {
lVar7 = local_40;
uVar1 = *(ulong *)(uVar15 + *(uint *)(local_40 + 0x38));
if (iVar11 == 0) {
LAB_0014a15d:
if (uVar12 == 0) {
local_48 = uVar15;
uVar12 = uVar15;
}
else {
*(ulong *)(uVar12 + *(uint *)(local_40 + 0x38)) = uVar15;
uVar12 = uVar15;
}
}
else {
puVar8 = puVar13;
puVar9 = puVar14;
puVar5 = local_50;
lVar10 = local_68;
if (puVar14 == (ulong *)0x0) {
__base[-1] = (ulong *)0x14a187;
iVar6 = lf_dynarray_iterate(lVar7,match_pins,uVar15);
param_1 = local_60;
puVar14 = local_58;
if (iVar6 == 0) goto LAB_0014a15d;
}
else {
while (8 < lVar10) {
uVar2 = *puVar5;
if (uVar2 > uVar15 || uVar15 == uVar2) {
puVar8 = puVar5;
}
if (uVar2 <= uVar15) {
puVar9 = puVar5;
}
if (uVar15 == uVar2) {
puVar8 = puVar5;
}
lVar10 = (long)puVar8 - (long)puVar9;
puVar5 = (ulong *)((long)puVar9 +
((lVar10 >> 3) - (lVar10 >> 0x3f) & 0xfffffffffffffffeU) * 4);
}
if ((uVar15 != *puVar9) && (uVar15 != *puVar8)) goto LAB_0014a15d;
}
*(int8 *)(uVar15 + *(uint *)(*(long *)(param_1 + 0x20) + 0x38)) =
*(int8 *)(param_1 + 0x28);
*(ulong *)(param_1 + 0x28) = uVar15;
*(int *)(param_1 + 0x30) = *(int *)(param_1 + 0x30) + 1;
}
uVar2 = local_48;
uVar15 = uVar1;
} while (uVar1 != 0);
if (uVar12 != 0) {
uVar3 = *(int8 *)(local_40 + 0x30);
pcVar4 = *(code **)(local_40 + 0x28);
__base[-1] = (ulong *)0x14a1d8;
(*pcVar4)(uVar2,uVar12,uVar3);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__base[-1] = (ulong *)lf_pinbox_free;
__stack_chk_fail();
}
return;
}
| |
23,864 | minja::Value::operator<(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | bool operator<(const Value & other) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_number() && other.is_number()) return get<double>() < other.get<double>();
if (is_string() && other.is_string()) return get<std::string>() < other.get<std::string>();
throw std::runtime_error("Cannot compare values: " + dump() + " < " + other.dump());
} | O2 | cpp | minja::Value::operator<(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x66968
testb %al, %al
jne 0x73c1b
movb 0x40(%r15), %al
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x73bb7
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x73c4b
movq %r15, %rdi
callq 0x6629a
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x6629a
ucomisd (%rsp), %xmm0
seta %bl
jmp 0x73c0b
cmpb $0x3, %al
jne 0x73c4b
cmpb $0x3, 0x40(%r14)
jne 0x73c4b
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x66db2
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x66db2
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x740da
movl %eax, %ebx
movq %r15, %rdi
callq 0x24348
movq %r14, %rdi
callq 0x24348
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %rbx
leaq 0x43e21(%rip), %rsi # 0xb7a4e
movq %rax, %rdi
callq 0x23360
movq 0x8e3ac(%rip), %rsi # 0x101fe8
movq 0x8e305(%rip), %rdx # 0x101f48
movq %rbx, %rdi
callq 0x24050
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x6637e
leaq 0x449d4(%rip), %rsi # 0xb8643
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x5bb8a
leaq 0x449d3(%rip), %rdx # 0xb865b
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x3bbb4
leaq 0x48(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x6637e
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x3cc43
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x23f50
xorl %ebp, %ebp
movq 0x8e30f(%rip), %rsi # 0x101fe8
movq 0x8e268(%rip), %rdx # 0x101f48
movq %rbx, %rdi
callq 0x24050
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24348
jmp 0x73cfd
movq %rax, %r14
movb $0x1, %bpl
leaq 0x48(%rsp), %rdi
callq 0x24348
jmp 0x73d0f
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x24348
jmp 0x73d21
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rdi
callq 0x24348
jmp 0x73d36
movq %rax, %r14
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x24348
testb %bpl, %bpl
jne 0x73d5b
jmp 0x73d63
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24348
jmp 0x73d63
jmp 0x73d58
movq %rax, %r14
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x240e0
nop
| _ZNK5minja5ValueltERKS0_:
push rbp
push r15
push r14
push rbx
sub rsp, 0A8h
mov r14, rsi
mov r15, rdi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz loc_73C1B
mov al, [r15+40h]
lea ecx, [rax-5]
cmp cl, 2
ja short loc_73BB7
mov al, [r14+40h]
add al, 0FBh
cmp al, 2
ja loc_73C4B
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+0C8h+var_C8], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
ucomisd xmm0, [rsp+0C8h+var_C8]
setnbe bl
jmp short loc_73C0B
loc_73BB7:
cmp al, 3
jnz loc_73C4B
cmp byte ptr [r14+40h], 3
jnz loc_73C4B
lea rdi, [rsp+0C8h+var_C0]
mov rsi, r15
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rdi, [rsp+0C8h+var_A0]
mov rsi, r14
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea r14, [rsp+0C8h+var_C0]
lea r15, [rsp+0C8h+var_A0]
mov rdi, r14
mov rsi, r15
call _ZStltIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator<<char>(std::string const&,std::string const&)
mov ebx, eax
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_73C0B:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_73C1B:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_73C4B:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r15
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aCannotCompareV; "Cannot compare values: "
lea rdi, [rsp+0C8h+var_40]
lea rdx, [rsp+0C8h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, asc_B865B; " < "
lea rdi, [rsp+0C8h+var_A0]
lea rsi, [rsp+0C8h+var_40]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdi, [rsp+0C8h+var_80]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rdi, [rsp+0C8h+var_C0]
lea rsi, [rsp+0C8h+var_A0]
lea rdx, [rsp+0C8h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
mov bpl, 1
lea rsi, [rsp+0C8h+var_C0]
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 rdi, [rsp+0C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73CFD
mov r14, rax
mov bpl, 1
loc_73CFD:
lea rdi, [rsp+0C8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73D0F
mov r14, rax
mov bpl, 1
loc_73D0F:
lea rdi, [rsp+0C8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73D21
mov r14, rax
mov bpl, 1
loc_73D21:
lea rdi, [rsp+0C8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73D36
mov r14, rax
mov bpl, 1
loc_73D36:
lea rdi, [rsp+0C8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_73D5B
jmp short loc_73D63
mov r14, rax
lea rdi, [rsp+0C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_73D63
jmp short $+2
loc_73D58:
mov r14, rax
loc_73D5B:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_73D63:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::operator<(minja::Value *a1, minja::Value *a2)
{
unsigned int v2; // ebx
char v3; // al
std::runtime_error *exception; // rbx
void *v6; // rbx
_BYTE v7[32]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v8[4]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v9[4]; // [rsp+48h] [rbp-80h] BYREF
_BYTE v10[32]; // [rsp+68h] [rbp-60h] BYREF
_BYTE v11[64]; // [rsp+88h] [rbp-40h] BYREF
if ( minja::Value::is_null(a1) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *((_BYTE *)a1 + 64);
if ( (unsigned __int8)(v3 - 5) > 2u )
{
if ( v3 == 3 && *((_BYTE *)a2 + 64) == 3 )
{
minja::Value::get<std::string>((long long)v7, a1);
minja::Value::get<std::string>((long long)v8, a2);
v2 = std::operator<<char>(v7, v8);
std::string::~string(v8);
std::string::~string(v7);
return v2;
}
LABEL_10:
v6 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Cannot compare values: ", (long long)v10);
std::operator+<char>((long long)v8, (long long)v11, (long long)" < ");
minja::Value::dump[abi:cxx11]((long long)v9, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, v8, v9);
std::runtime_error::runtime_error(v6, v7);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 2u )
goto LABEL_10;
minja::Value::get<double>(a1);
minja::Value::get<double>(a2);
LOBYTE(v2) = 0;
return v2;
}
| operator<:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV R14,RSI
MOV R15,RDI
CALL 0x00166968
TEST AL,AL
JNZ 0x00173c1b
MOV AL,byte ptr [R15 + 0x40]
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x00173bb7
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x2
JA 0x00173c4b
MOV RDI,R15
CALL 0x0016629a
MOVSD qword ptr [RSP],XMM0
MOV RDI,R14
CALL 0x0016629a
UCOMISD XMM0,qword ptr [RSP]
SETA BL
JMP 0x00173c0b
LAB_00173bb7:
CMP AL,0x3
JNZ 0x00173c4b
CMP byte ptr [R14 + 0x40],0x3
JNZ 0x00173c4b
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x00166db2
LAB_00173bd7:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x00166db2
LAB_00173be4:
LEA R14,[RSP + 0x8]
LEA R15,[RSP + 0x28]
MOV RDI,R14
MOV RSI,R15
CALL 0x001740da
MOV EBX,EAX
MOV RDI,R15
CALL 0x00124348
MOV RDI,R14
CALL 0x00124348
LAB_00173c0b:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00173c1b:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV RBX,RAX
LAB_00173c26:
LEA RSI,[0x1b7a4e]
MOV RDI,RAX
CALL 0x00123360
LAB_00173c35:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,RBX
CALL 0x00124050
LAB_00173c4b:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV RBX,RAX
LAB_00173c56:
LEA RDI,[RSP + 0x68]
PUSH -0x1
POP RDX
MOV RSI,R15
XOR ECX,ECX
CALL 0x0016637e
LAB_00173c68:
LEA RSI,[0x1b8643]
LEA RDI,[RSP + 0x88]
LEA RDX,[RSP + 0x68]
CALL 0x0015bb8a
LAB_00173c81:
LEA RDX,[0x1b865b]
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x88]
CALL 0x0013bbb4
LAB_00173c9a:
LEA RDI,[RSP + 0x48]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0016637e
LAB_00173cac:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x48]
CALL 0x0013cc43
MOV BPL,0x1
LAB_00173cc3:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00123f50
XOR EBP,EBP
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,RBX
CALL 0x00124050
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall minja::Value::operator<(Value *this,Value *param_1)
{
char cVar1;
bool bVar2;
int7 extraout_var;
runtime_error *prVar3;
int8 unaff_RBX;
ulong uVar4;
double dVar5;
double dVar6;
string local_c0 [32];
string local_a0 [32];
int1 local_80 [32];
int1 local_60 [32];
char local_40 [32];
cVar1 = is_null(this);
if (cVar1 != '\0') {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00173c26 to 00173c34 has its CatchHandler @ 00173d58 */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
if ((byte)((char)this[0x40] - 5U) < 3) {
if (2 < (byte)((char)param_1[0x40] - 5U)) {
LAB_00173c4b:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00173c56 to 00173c67 has its CatchHandler @ 00173d56 */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00173c68 to 00173c80 has its CatchHandler @ 00173d30 */
std::operator+(local_40,(string *)"Cannot compare values: ");
/* try { // try from 00173c81 to 00173c99 has its CatchHandler @ 00173d1b */
std::operator+(local_a0,local_40);
/* try { // try from 00173c9a to 00173cab has its CatchHandler @ 00173d09 */
dump_abi_cxx11_((int)local_80,SUB81(param_1,0));
/* try { // try from 00173cac to 00173cbf has its CatchHandler @ 00173cf7 */
std::operator+(local_c0,local_a0);
/* try { // try from 00173cc3 to 00173ce7 has its CatchHandler @ 00173ce8 */
std::runtime_error::runtime_error(prVar3,local_c0);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
dVar5 = get<double>(this);
dVar6 = get<double>(param_1);
uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),dVar5 < dVar6);
}
else {
if ((this[0x40] != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_00173c4b;
get<std::__cxx11::string>();
/* try { // try from 00173bd7 to 00173be3 has its CatchHandler @ 00173d47 */
get<std::__cxx11::string>();
bVar2 = std::operator<(local_c0,local_a0);
uVar4 = CONCAT71(extraout_var,bVar2) & 0xffffffff;
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string(local_c0);
}
return uVar4 & 0xffffffff;
}
| |
23,865 | strxmov | eloqsql/strings/strxmov.c | char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
} | O0 | c | strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
testb %al, %al
je 0x784a8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x7859c
jmp 0x784fd
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
je 0x78525
jmp 0x784fd
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x7856c
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x78589
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x784f0
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
| strxmov:
push rbp
mov rbp, rsp
sub rsp, 80h
test al, al
jz short loc_784A8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_784A8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
loc_784F0:
cmp [rbp+var_10], 0
jz loc_7859C
jmp short $+2
loc_784FD:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov al, [rax]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
mov [rcx], al
cmp al, 0
jz short loc_78525
jmp short loc_784FD
loc_78525:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
lea rax, [rbp+var_30]
mov [rbp+var_F0], rax
mov eax, [rbp+var_30]
mov [rbp+var_E4], eax
cmp eax, 28h ; '('
ja short loc_7856C
mov rcx, [rbp+var_F0]
mov edx, [rbp+var_E4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_F8], rax
jmp short loc_78589
loc_7856C:
mov rcx, [rbp+var_F0]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_F8], rax
loc_78589:
mov rax, [rbp+var_F8]
mov rax, [rax]
mov [rbp+var_10], rax
jmp loc_784F0
loc_7859C:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| _BYTE * strxmov(
_BYTE *a1,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_BYTE *v15; // rax
_BYTE *v16; // rcx
char *v17; // rax
char v19; // [rsp+18h] [rbp-E0h] BYREF
long long v20; // [rsp+28h] [rbp-D0h]
long long v21; // [rsp+30h] [rbp-C8h]
long long v22; // [rsp+38h] [rbp-C0h]
long long v23; // [rsp+40h] [rbp-B8h]
__m128 v24; // [rsp+48h] [rbp-B0h]
__m128 v25; // [rsp+58h] [rbp-A0h]
__m128 v26; // [rsp+68h] [rbp-90h]
__m128 v27; // [rsp+78h] [rbp-80h]
__m128 v28; // [rsp+88h] [rbp-70h]
__m128 v29; // [rsp+98h] [rbp-60h]
__m128 v30; // [rsp+A8h] [rbp-50h]
__m128 v31; // [rsp+B8h] [rbp-40h]
int v32; // [rsp+C8h] [rbp-30h]
int v33; // [rsp+CCh] [rbp-2Ch]
char *v34; // [rsp+D0h] [rbp-28h]
char *v35; // [rsp+D8h] [rbp-20h]
_BYTE *v36; // [rsp+E8h] [rbp-10h]
_BYTE *v37; // [rsp+F0h] [rbp-8h]
v24 = a7;
v25 = a8;
v26 = a9;
v27 = a10;
v28 = a11;
v29 = a12;
v30 = a13;
v31 = a14;
v23 = a6;
v22 = a5;
v21 = a4;
v20 = a3;
v37 = a1;
v36 = a2;
v35 = &v19;
v34 = &a15;
v33 = 48;
v32 = 16;
while ( v36 )
{
do
{
v15 = v36++;
LOBYTE(v15) = *v15;
v16 = v37++;
*v16 = (_BYTE)v15;
}
while ( (_BYTE)v15 );
--v37;
if ( (unsigned int)v32 > 0x28 )
{
v17 = v34;
v34 += 8;
}
else
{
v17 = &v35[v32];
v32 += 8;
}
v36 = *(_BYTE **)v17;
}
*v37 = 0;
return v37;
}
| strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
TEST AL,AL
JZ 0x001784a8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001784a8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LAB_001784f0:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0017859c
JMP 0x001784fd
LAB_001784fd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JZ 0x00178525
JMP 0x001784fd
LAB_00178525:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xe4],EAX
CMP EAX,0x28
JA 0x0017856c
MOV RCX,qword ptr [RBP + -0xf0]
MOV EDX,dword ptr [RBP + -0xe4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x00178589
LAB_0017856c:
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0xf8],RAX
LAB_00178589:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001784f0
LAB_0017859c:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
char * strxmov(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
int8 *local_100;
int8 local_e8 [22];
uint local_38;
int8 *local_30;
char *local_18;
char *local_10;
local_30 = (int8 *)&stack0x00000008;
local_38 = 0x10;
local_18 = param_2;
local_10 = param_1;
while (pcVar2 = local_10, local_18 != (char *)0x0) {
do {
local_10 = pcVar2;
cVar1 = *local_18;
*local_10 = cVar1;
local_18 = local_18 + 1;
pcVar2 = local_10 + 1;
} while (cVar1 != '\0');
if (local_38 < 0x29) {
local_100 = (int8 *)((long)local_e8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_100 = local_30;
local_30 = local_30 + 1;
}
local_18 = (char *)*local_100;
}
*local_10 = '\0';
return local_10;
}
| |
23,866 | my_free | eloqsql/mysys/my_malloc.c | void my_free(void *ptr)
{
my_memory_header *mh;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: %p", ptr));
if (ptr == NULL)
DBUG_VOID_RETURN;
mh= USER_TO_HEADER(ptr);
old_size= mh->m_size & ~1;
old_flags= mh->m_size & 1;
PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner);
update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags);
#ifndef SAFEMALLOC
/*
Trash memory if not safemalloc. We don't have to do this if safemalloc
is used as safemalloc will also do trashing
*/
TRASH_FREE(ptr, old_size);
#endif
sf_free(mh);
DBUG_VOID_RETURN;
} | O3 | c | my_free:
testq %rdi, %rdi
je 0xa7227
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x18(%rdi), %rbx
movq -0x18(%rdi), %rdx
movq -0x10(%rdi), %r14
movq %r14, %r15
andq $-0x2, %r15
leaq 0x2e9ce9(%rip), %rax # 0x390ed8
movq (%rax), %rax
movl -0x8(%rdi), %edi
movq %r15, %rsi
callq *0x3f8(%rax)
movq $-0x18, %rdi
subq %r15, %rdi
andl $0x1, %r14d
movl %r14d, %esi
callq *0x2e975b(%rip) # 0x390970
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a160
retq
| my_free:
test rdi, rdi
jz short locret_A7227
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea rbx, [rdi-18h]
mov rdx, [rdi-18h]
mov r14, [rdi-10h]
mov r15, r14
and r15, 0FFFFFFFFFFFFFFFEh
lea rax, PSI_server
mov rax, [rax]
mov edi, [rdi-8]
mov rsi, r15
call qword ptr [rax+3F8h]
mov rdi, 0FFFFFFFFFFFFFFE8h
sub rdi, r15
and r14d, 1
mov esi, r14d
call cs:update_malloc_size
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _free
locret_A7227:
retn
| long long my_free(long long a1)
{
long long result; // rax
if ( a1 )
{
((void ( *)(_QWORD, unsigned long long, _QWORD))PSI_server[127])(
*(unsigned int *)(a1 - 8),
*(_QWORD *)(a1 - 16) & 0xFFFFFFFFFFFFFFFELL,
*(_QWORD *)(a1 - 24));
update_malloc_size();
return free(a1 - 24);
}
return result;
}
| my_free:
TEST RDI,RDI
JZ 0x001a7227
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA RBX,[RDI + -0x18]
MOV RDX,qword ptr [RDI + -0x18]
MOV R14,qword ptr [RDI + -0x10]
MOV R15,R14
AND R15,-0x2
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RDI + -0x8]
MOV RSI,R15
CALL qword ptr [RAX + 0x3f8]
MOV RDI,-0x18
SUB RDI,R15
AND R14D,0x1
MOV ESI,R14D
CALL qword ptr [0x00490970]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0012a160
LAB_001a7227:
RET
|
void my_free(long param_1)
{
ulong uVar1;
ulong uVar2;
if (param_1 != 0) {
uVar1 = *(ulong *)(param_1 + -0x10);
uVar2 = uVar1 & 0xfffffffffffffffe;
(**(code **)(PSI_server + 0x3f8))
(*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18));
(*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1);
free((void *)(param_1 + -0x18));
return;
}
return;
}
| |
23,867 | evmone::ExecutionState::ExecutionState() | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp | ExecutionState() noexcept = default; | O0 | cpp | evmone::ExecutionState::ExecutionState():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq $0x0, (%rdi)
addq $0x8, %rdi
callq 0x3bad0
movq -0x10(%rbp), %rdi
movq $0x0, 0x20(%rdi)
addq $0x28, %rdi
callq 0x3bb10
movq -0x10(%rbp), %rdi
movl $0x0, 0x40(%rdi)
addq $0x48, %rdi
callq 0x3bb60
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
callq 0x3bbd0
movq -0x10(%rbp), %rdi
movl $0x0, 0x78(%rdi)
movq $0x0, 0x80(%rdi)
movq $0x0, 0x88(%rdi)
addq $0x90, %rdi
callq 0x3bbf0
movq -0x10(%rbp), %rdi
addq $0xb8, %rdi
movq %rdi, -0x18(%rbp)
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
addq $0x34, %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq $0x0, 0x100(%rax)
movq $0x0, 0x108(%rax)
movq $0x0, 0x110(%rax)
addq $0x60, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x18(%rbp), %rdi
addq $0xc0, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x10(%rbp), %rdi
movq $0x0, 0x198(%rdi)
movq $0x0, 0x1a0(%rdi)
movq $0x0, 0x1a8(%rdi)
movq $0x0, 0x1b0(%rdi)
addq $0x1b8, %rdi # imm = 0x1B8
callq 0x3bc10
movq -0x10(%rbp), %rdi
movq $0x0, 0x1f8(%rdi)
addq $0x200, %rdi # imm = 0x200
callq 0x3bc30
movq -0x10(%rbp), %rdi
addq $0x218, %rdi # imm = 0x218
callq 0x3bc50
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN6evmone14ExecutionStateC2Ev:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_10], rdi
mov qword ptr [rdi], 0
add rdi, 8; this
call _ZN6evmone6MemoryC2Ev; evmone::Memory::Memory(void)
mov rdi, [rbp+var_10]
mov qword ptr [rdi+20h], 0
add rdi, 28h ; '('; this
call _ZN4evmc11HostContextC2Ev; evmc::HostContext::HostContext(void)
mov rdi, [rbp+var_10]
mov dword ptr [rdi+40h], 0
add rdi, 48h ; 'H'
call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEC2Ev; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::basic_string(void)
mov rdi, [rbp+var_10]
add rdi, 68h ; 'h'
call _ZNSt17basic_string_viewIhN4evmc11byte_traitsIhEEEC2Ev; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::basic_string_view(void)
mov rdi, [rbp+var_10]
mov dword ptr [rdi+78h], 0
mov qword ptr [rdi+80h], 0
mov qword ptr [rdi+88h], 0
add rdi, 90h
call _ZNSt8optionalINSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEEEC2Ev; std::optional<std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>>::optional(void)
mov rdi, [rbp+var_10]
add rdi, 0B8h
mov [rbp+var_18], rdi
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_18]
add rdi, 20h ; ' '
xor esi, esi
mov edx, 14h
call _memset
mov rdi, [rbp+var_18]
add rdi, 34h ; '4'
xor esi, esi
mov edx, 14h
call _memset
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov qword ptr [rax+100h], 0
mov qword ptr [rax+108h], 0
mov qword ptr [rax+110h], 0
add rdi, 60h ; '`'
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_18]
add rdi, 80h
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_18]
add rdi, 0A0h
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_18]
add rdi, 0C0h
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_10]
mov qword ptr [rdi+198h], 0
mov qword ptr [rdi+1A0h], 0
mov qword ptr [rdi+1A8h], 0
mov qword ptr [rdi+1B0h], 0
add rdi, 1B8h
call _ZNSt8optionalISt13unordered_mapIN4evmc7bytes32EN6evmone19TransactionInitcodeESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S4_EEEEC2Ev; std::optional<std::unordered_map<evmc::bytes32,evmone::TransactionInitcode>>::optional(void)
mov rdi, [rbp+var_10]
mov qword ptr [rdi+1F8h], 0
add rdi, 200h
call _ZNSt6vectorIPKhSaIS1_EEC2Ev; std::vector<uchar const*>::vector(void)
mov rdi, [rbp+var_10]
add rdi, 218h; this
call _ZN6evmone10StackSpaceC2Ev; evmone::StackSpace::StackSpace(void)
add rsp, 20h
pop rbp
retn
| long long evmone::ExecutionState::ExecutionState(evmone::ExecutionState *this)
{
*(_QWORD *)this = 0LL;
evmone::Memory::Memory((evmone::ExecutionState *)((char *)this + 8));
*((_QWORD *)this + 4) = 0LL;
evmc::HostContext::HostContext((evmone::ExecutionState *)((char *)this + 40));
*((_DWORD *)this + 16) = 0;
std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::basic_string((char *)this + 72);
std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::basic_string_view((char *)this + 104);
*((_DWORD *)this + 30) = 0;
*((_QWORD *)this + 16) = 0LL;
*((_QWORD *)this + 17) = 0LL;
std::optional<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>::optional((char *)this + 144);
memset((char *)this + 184, 0LL, 32LL);
memset((char *)this + 216, 0LL, 20LL);
memset((char *)this + 236, 0LL, 20LL);
*((_QWORD *)this + 32) = 0LL;
*((_QWORD *)this + 33) = 0LL;
*((_QWORD *)this + 34) = 0LL;
memset((char *)this + 280, 0LL, 32LL);
memset((char *)this + 312, 0LL, 32LL);
memset((char *)this + 344, 0LL, 32LL);
memset((char *)this + 376, 0LL, 32LL);
*((_QWORD *)this + 51) = 0LL;
*((_QWORD *)this + 52) = 0LL;
*((_QWORD *)this + 53) = 0LL;
*((_QWORD *)this + 54) = 0LL;
std::optional<std::unordered_map<evmc::bytes32,evmone::TransactionInitcode>>::optional((char *)this + 440);
*((_QWORD *)this + 63) = 0LL;
std::vector<unsigned char const*>::vector((char *)this + 512);
return evmone::StackSpace::StackSpace((evmone::ExecutionState *)((char *)this + 536));
}
| ExecutionState:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RDI],0x0
ADD RDI,0x8
CALL 0x0013bad0
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RDI + 0x20],0x0
ADD RDI,0x28
CALL 0x0013bb10
MOV RDI,qword ptr [RBP + -0x10]
MOV dword ptr [RDI + 0x40],0x0
ADD RDI,0x48
CALL 0x0013bb60
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x68
CALL 0x0013bbd0
MOV RDI,qword ptr [RBP + -0x10]
MOV dword ptr [RDI + 0x78],0x0
MOV qword ptr [RDI + 0x80],0x0
MOV qword ptr [RDI + 0x88],0x0
ADD RDI,0x90
CALL 0x0013bbf0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xb8
MOV qword ptr [RBP + -0x18],RDI
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x20
XOR ESI,ESI
MOV EDX,0x14
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x34
XOR ESI,ESI
MOV EDX,0x14
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100],0x0
MOV qword ptr [RAX + 0x108],0x0
MOV qword ptr [RAX + 0x110],0x0
ADD RDI,0x60
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x80
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0xa0
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0xc0
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RDI + 0x198],0x0
MOV qword ptr [RDI + 0x1a0],0x0
MOV qword ptr [RDI + 0x1a8],0x0
MOV qword ptr [RDI + 0x1b0],0x0
ADD RDI,0x1b8
CALL 0x0013bc10
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RDI + 0x1f8],0x0
ADD RDI,0x200
CALL 0x0013bc30
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x218
CALL 0x0013bc50
ADD RSP,0x20
POP RBP
RET
|
/* evmone::ExecutionState::ExecutionState() */
void __thiscall evmone::ExecutionState::ExecutionState(ExecutionState *this)
{
*(int8 *)this = 0;
Memory::Memory((Memory *)(this + 8));
*(int8 *)(this + 0x20) = 0;
evmc::HostContext::HostContext((HostContext *)(this + 0x28));
*(int4 *)(this + 0x40) = 0;
std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>::
basic_string((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)(this + 0x48));
std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::basic_string_view
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)(this + 0x68));
*(int4 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
std::
optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
::optional((optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
*)(this + 0x90));
memset(this + 0xb8,0,0x20);
memset(this + 0xd8,0,0x14);
memset(this + 0xec,0,0x14);
*(int8 *)(this + 0x100) = 0;
*(int8 *)(this + 0x108) = 0;
*(int8 *)(this + 0x110) = 0;
memset(this + 0x118,0,0x20);
memset(this + 0x138,0,0x20);
memset(this + 0x158,0,0x20);
memset(this + 0x178,0,0x20);
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 0x1b0) = 0;
std::
optional<std::unordered_map<evmc::bytes32,evmone::TransactionInitcode,std::hash<evmc::bytes32>,std::equal_to<evmc::bytes32>,std::allocator<std::pair<evmc::bytes32_const,evmone::TransactionInitcode>>>>
::optional((optional<std::unordered_map<evmc::bytes32,evmone::TransactionInitcode,std::hash<evmc::bytes32>,std::equal_to<evmc::bytes32>,std::allocator<std::pair<evmc::bytes32_const,evmone::TransactionInitcode>>>>
*)(this + 0x1b8));
*(int8 *)(this + 0x1f8) = 0;
std::vector<unsigned_char_const*,std::allocator<unsigned_char_const*>>::vector
((vector<unsigned_char_const*,std::allocator<unsigned_char_const*>> *)(this + 0x200));
StackSpace::StackSpace((StackSpace *)(this + 0x218));
return;
}
| |
23,868 | LefDefParser::defrCountUnused(LefDefParser::defrCallbackType_e, void*, void*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defrReader.cpp | int
defrCountUnused(defrCallbackType_e e,
void *v,
defiUserData d)
{
DEF_INIT;
int i;
if (defiDebug(23))
printf("Count %d, 0x%p, 0x%p\n", (int) e, v, d);
i = (int) e;
if (i <= 0 || i >= CBMAX) {
return 1;
}
defContext.settings->UnusedCallbacks[i] += 1;
return 0;
} | O0 | cpp | LefDefParser::defrCountUnused(LefDefParser::defrCallbackType_e, void*, void*):
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x53a02(%rip), %rdi # 0x6edfb
callq 0x1b270
movl $0x17, %edi
callq 0x277d0
cmpl $0x0, %eax
je 0x1b429
movl 0x20(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0x539e9(%rip), %rdi # 0x6ee0b
movb $0x0, %al
callq 0x7040
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x1b442
cmpl $0x96, 0xc(%rsp)
jl 0x1b44c
movl $0x1, 0x24(%rsp)
jmp 0x1b474
leaq 0x74e8d(%rip), %rax # 0x902e0
movq (%rax), %rax
movslq 0xc(%rsp), %rcx
movl 0x120(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x120(%rax,%rcx,4)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
| _ZN12LefDefParser15defrCountUnusedENS_18defrCallbackType_eEPvS1_:
sub rsp, 28h
mov [rsp+28h+var_8], edi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
lea rdi, aDefrcountunuse; "defrCountUnused"
call _ZN12LefDefParser8def_initEPKc; LefDefParser::def_init(char const*)
mov edi, (offset dword_14+3); this
call _ZN12LefDefParser9defiDebugEi; LefDefParser::defiDebug(int)
cmp eax, 0
jz short loc_1B429
mov esi, [rsp+28h+var_8]
mov rdx, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
lea rdi, aCountD0xP0xP; "Count %d, 0x%p, 0x%p\n"
mov al, 0
call _printf
loc_1B429:
mov eax, [rsp+28h+var_8]
mov [rsp+28h+var_1C], eax
cmp [rsp+28h+var_1C], 0
jle short loc_1B442
cmp [rsp+28h+var_1C], 96h
jl short loc_1B44C
loc_1B442:
mov [rsp+28h+var_4], 1
jmp short loc_1B474
loc_1B44C:
lea rax, _ZN12LefDefParser10defContextE; LefDefParser::defContext
mov rax, [rax]
movsxd rcx, [rsp+28h+var_1C]
mov edx, [rax+rcx*4+120h]
add edx, 1
mov [rax+rcx*4+120h], edx
mov [rsp+28h+var_4], 0
loc_1B474:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long LefDefParser::defrCountUnused(int a1, const char *a2, const void *a3)
{
LefDefParser::def_init((LefDefParser *)"defrCountUnused", a2);
if ( (unsigned int)LefDefParser::defiDebug((LefDefParser *)((char *)&dword_14 + 3), (int)a2) )
printf("Count %d, 0x%p, 0x%p\n", a1, a2, a3);
if ( a1 > 0 && a1 < 150 )
{
++*(_DWORD *)(LefDefParser::defContext + 4LL * a1 + 288);
return 0;
}
else
{
return 1;
}
}
| defrCountUnused:
SUB RSP,0x28
MOV dword ptr [RSP + 0x20],EDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
LEA RDI,[0x16edfb]
CALL 0x0011b270
MOV EDI,0x17
CALL 0x001277d0
CMP EAX,0x0
JZ 0x0011b429
MOV ESI,dword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
LEA RDI,[0x16ee0b]
MOV AL,0x0
CALL 0x00107040
LAB_0011b429:
MOV EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JLE 0x0011b442
CMP dword ptr [RSP + 0xc],0x96
JL 0x0011b44c
LAB_0011b442:
MOV dword ptr [RSP + 0x24],0x1
JMP 0x0011b474
LAB_0011b44c:
LEA RAX,[0x1902e0]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RAX + RCX*0x4 + 0x120]
ADD EDX,0x1
MOV dword ptr [RAX + RCX*0x4 + 0x120],EDX
MOV dword ptr [RSP + 0x24],0x0
LAB_0011b474:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* LefDefParser::defrCountUnused(LefDefParser::defrCallbackType_e, void*, void*) */
int4 LefDefParser::defrCountUnused(uint param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 local_4;
def_init("defrCountUnused");
iVar1 = defiDebug(0x17);
if (iVar1 != 0) {
printf("Count %d, 0x%p, 0x%p\n",(ulong)param_1,param_2,param_3);
}
if (((int)param_1 < 1) || (0x95 < (int)param_1)) {
local_4 = 1;
}
else {
*(int *)(defContext + 0x120 + (long)(int)param_1 * 4) =
*(int *)(defContext + 0x120 + (long)(int)param_1 * 4) + 1;
local_4 = 0;
}
return local_4;
}
| |
23,869 | aimrt::runtime::core::channel::ChannelRegistry::MTPKey::operator==(aimrt::runtime::core::channel::ChannelRegistry::MTPKey const&) const | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/channel/channel_registry.h | bool operator==(const MTPKey& rhs) const {
return msg_type == rhs.msg_type &&
topic_name == rhs.topic_name &&
pkg_path == rhs.pkg_path;
} | O3 | c | aimrt::runtime::core::channel::ChannelRegistry::MTPKey::operator==(aimrt::runtime::core::channel::ChannelRegistry::MTPKey const&) const:
movq (%rdi), %rdx
cmpq (%rsi), %rdx
jne 0x54c16
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x54bcc
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x1f280
testl %eax, %eax
jne 0x54c0c
movq 0x10(%r14), %rdx
cmpq 0x10(%rbx), %rdx
jne 0x54c0c
testq %rdx, %rdx
je 0x54bec
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x1f280
testl %eax, %eax
jne 0x54c0c
movq 0x20(%r14), %rdx
cmpq 0x20(%rbx), %rdx
jne 0x54c0c
testq %rdx, %rdx
je 0x54c19
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x1f280
testl %eax, %eax
je 0x54c19
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
movb $0x1, %al
jmp 0x54c0e
nop
| _ZNK5aimrt7runtime4core7channel15ChannelRegistry6MTPKeyeqERKS4_:
mov rdx, [rdi]
cmp rdx, [rsi]
jnz short loc_54C16
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
test rdx, rdx
jz short loc_54BCC
mov rdi, [r14+8]
mov rsi, [rbx+8]
call _bcmp
test eax, eax
jnz short loc_54C0C
loc_54BCC:
mov rdx, [r14+10h]
cmp rdx, [rbx+10h]
jnz short loc_54C0C
test rdx, rdx
jz short loc_54BEC
mov rdi, [r14+18h]
mov rsi, [rbx+18h]
call _bcmp
test eax, eax
jnz short loc_54C0C
loc_54BEC:
mov rdx, [r14+20h]
cmp rdx, [rbx+20h]
jnz short loc_54C0C
test rdx, rdx
jz short loc_54C19
mov rdi, [r14+28h]
mov rsi, [rbx+28h]
call _bcmp
test eax, eax
jz short loc_54C19
loc_54C0C:
xor eax, eax
loc_54C0E:
add rsp, 8
pop rbx
pop r14
retn
loc_54C16:
xor eax, eax
retn
loc_54C19:
mov al, 1
jmp short loc_54C0E
| bool aimrt::runtime::core::channel::ChannelRegistry::MTPKey::operator==(_QWORD *a1, _QWORD *a2)
{
long long v2; // rdx
long long v3; // rdx
if ( *a1 != *a2 )
return 0;
if ( *a1 && (unsigned int)bcmp(a1[1], a2[1]) )
return 0;
v2 = a1[2];
if ( v2 != a2[2] || v2 && (unsigned int)bcmp(a1[3], a2[3]) )
return 0;
v3 = a1[4];
return v3 == a2[4] && (!v3 || !(unsigned int)bcmp(a1[5], a2[5]));
}
| operator==:
MOV RDX,qword ptr [RDI]
CMP RDX,qword ptr [RSI]
JNZ 0x00154c16
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
TEST RDX,RDX
JZ 0x00154bcc
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [RBX + 0x8]
CALL 0x0011f280
TEST EAX,EAX
JNZ 0x00154c0c
LAB_00154bcc:
MOV RDX,qword ptr [R14 + 0x10]
CMP RDX,qword ptr [RBX + 0x10]
JNZ 0x00154c0c
TEST RDX,RDX
JZ 0x00154bec
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RBX + 0x18]
CALL 0x0011f280
TEST EAX,EAX
JNZ 0x00154c0c
LAB_00154bec:
MOV RDX,qword ptr [R14 + 0x20]
CMP RDX,qword ptr [RBX + 0x20]
JNZ 0x00154c0c
TEST RDX,RDX
JZ 0x00154c19
MOV RDI,qword ptr [R14 + 0x28]
MOV RSI,qword ptr [RBX + 0x28]
CALL 0x0011f280
TEST EAX,EAX
JZ 0x00154c19
LAB_00154c0c:
XOR EAX,EAX
LAB_00154c0e:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00154c16:
XOR EAX,EAX
RET
LAB_00154c19:
MOV AL,0x1
JMP 0x00154c0e
|
/* aimrt::runtime::core::channel::ChannelRegistry::MTPKey::TEMPNAMEPLACEHOLDERVALUE(aimrt::runtime::core::channel::ChannelRegistry::MTPKey
const&) const */
int8 __thiscall
aimrt::runtime::core::channel::ChannelRegistry::MTPKey::operator==(MTPKey *this,MTPKey *param_1)
{
size_t sVar1;
int iVar2;
sVar1 = *(size_t *)this;
if (sVar1 != *(size_t *)param_1) {
return 0;
}
if (((((sVar1 == 0) ||
(iVar2 = bcmp(*(void **)(this + 8),*(void **)(param_1 + 8),sVar1), iVar2 == 0)) &&
(sVar1 = *(size_t *)(this + 0x10), sVar1 == *(size_t *)(param_1 + 0x10))) &&
((sVar1 == 0 ||
(iVar2 = bcmp(*(void **)(this + 0x18),*(void **)(param_1 + 0x18),sVar1), iVar2 == 0)))) &&
((sVar1 = *(size_t *)(this + 0x20), sVar1 == *(size_t *)(param_1 + 0x20) &&
((sVar1 == 0 ||
(iVar2 = bcmp(*(void **)(this + 0x28),*(void **)(param_1 + 0x28),sVar1), iVar2 == 0)))))) {
return 1;
}
return 0;
}
| |
23,870 | map_to_isogenous_E2 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g2.c | static void map_to_isogenous_E2(POINTonE2 *p, const vec384x u)
{
static const vec384x minus_A = {
{ 0 },
{ TO_LIMB_T(0xd4c4fffffcec5869), TO_LIMB_T(0x1da3f3eed25bfd79),
TO_LIMB_T(0x7fa833c5136fff67), TO_LIMB_T(0x59261433cd540cbd),
TO_LIMB_T(0x48450f5f2b84682c), TO_LIMB_T(0x07e05d00bf959233) }
};
static const vec384x Z = { /* -2 - i */
{ TO_LIMB_T(0x87ebfffffff9555c), TO_LIMB_T(0x656fffe5da8ffffa),
TO_LIMB_T(0x0fd0749345d33ad2), TO_LIMB_T(0xd951e663066576f4),
TO_LIMB_T(0xde291a3d41e980d3), TO_LIMB_T(0x0815664c7dfe040d) },
{ TO_LIMB_T(0x43f5fffffffcaaae), TO_LIMB_T(0x32b7fff2ed47fffd),
TO_LIMB_T(0x07e83a49a2e99d69), TO_LIMB_T(0xeca8f3318332bb7a),
TO_LIMB_T(0xef148d1ea0f4c069), TO_LIMB_T(0x040ab3263eff0206) }
};
static const vec384x recip_ZZZ = { /* 1/(Z^3) */
{ TO_LIMB_T(0x65018f5c28f598eb), TO_LIMB_T(0xe6020417f022d916),
TO_LIMB_T(0xd6327313288369c7), TO_LIMB_T(0x622ded8eb447156f),
TO_LIMB_T(0xe52a2aee72c2a01f), TO_LIMB_T(0x089812fb8481ffe4) },
{ TO_LIMB_T(0x2574eb851eb8619f), TO_LIMB_T(0xdba2e97912925604),
TO_LIMB_T(0x67e495a909e7a18e), TO_LIMB_T(0xdf2da23b8145b8f7),
TO_LIMB_T(0xcf5d3728310ebf6d), TO_LIMB_T(0x11be446236f4c116) }
};
static const vec384x magic_ZZZ = { /* 1/Z^3 = a + b*i */
/* a^2 + b^2 */
{ TO_LIMB_T(0xaa7eb851eb8508e0), TO_LIMB_T(0x1c54fdf360989374),
TO_LIMB_T(0xc87f2fc6e716c62e), TO_LIMB_T(0x0124aefb1f9efea7),
TO_LIMB_T(0xb2f8be63e844865c), TO_LIMB_T(0x08b47f775a7ef35a) },
/* (a^2 + b^2)^((P-3)/4) */
{ TO_LIMB_T(0xe4132bbd838cf70a), TO_LIMB_T(0x01d769ac83772c19),
TO_LIMB_T(0xa83dd6e974c22e45), TO_LIMB_T(0xbc8ec3e777b08dff),
TO_LIMB_T(0xc035c2042ecf5da3), TO_LIMB_T(0x073929e97f0850bf) }
};
static const vec384x ZxA = { /* 240 - 480*i */
{ TO_LIMB_T(0xe53a000003135242), TO_LIMB_T(0x01080c0fdef80285),
TO_LIMB_T(0xe7889edbe340f6bd), TO_LIMB_T(0x0b51375126310601),
TO_LIMB_T(0x02d6985717c744ab), TO_LIMB_T(0x1220b4e979ea5467) },
{ TO_LIMB_T(0xa989fffff9d8b0d2), TO_LIMB_T(0x3b47e7dda4b7faf3),
TO_LIMB_T(0xff50678a26dffece), TO_LIMB_T(0xb24c28679aa8197a),
TO_LIMB_T(0x908a1ebe5708d058), TO_LIMB_T(0x0fc0ba017f2b2466) }
};
vec384x uu, tv2, tv4, x2n, gx1, gxd, y2;
#if 0
vec384x xn, x1n, xd, y, y1, Zuu;
#else
# define xn p->X
# define y p->Y
# define xd p->Z
# define x1n xn
# define y1 y
# define Zuu x2n
#endif
#define sgn0_fp2(a) (sgn0_pty_mont_384x((a), BLS12_381_P, p0) & 1)
bool_t e1, e2;
/*
* as per map_to_curve() from poc/sswu_opt.sage at
* https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve
* with 9mod16 twists...
*/
/* x numerator variants */
sqr_fp2(uu, u); /* uu = u^2 */
mul_fp2(Zuu, Z, uu); /* Zuu = Z * uu */
sqr_fp2(tv2, Zuu); /* tv2 = Zuu^2 */
add_fp2(tv2, tv2, Zuu); /* tv2 = tv2 + Zuu */
add_fp2(x1n, tv2, BLS12_381_Rx.p2); /* x1n = tv2 + 1 */
mul_fp2(x1n, x1n, Bprime_E2); /* x1n = x1n * B */
mul_fp2(x2n, Zuu, x1n); /* x2n = Zuu * x1n */
/* x denumenator */
mul_fp2(xd, minus_A, tv2); /* xd = -A * tv2 */
e1 = vec_is_zero(xd, sizeof(xd)); /* e1 = xd == 0 */
vec_select(xd, ZxA, xd, sizeof(xd), e1); /* # If xd == 0, set xd = Z*A */
/* y numerators variants */
sqr_fp2(tv2, xd); /* tv2 = xd^2 */
mul_fp2(gxd, xd, tv2); /* gxd = xd^3 */
mul_fp2(tv2, Aprime_E2, tv2); /* tv2 = A * tv2 */
sqr_fp2(gx1, x1n); /* gx1 = x1n^2 */
add_fp2(gx1, gx1, tv2); /* gx1 = gx1 + tv2 # x1n^2 + A*xd^2 */
mul_fp2(gx1, gx1, x1n); /* gx1 = gx1 * x1n # x1n^3 + A*x1n*xd^2 */
mul_fp2(tv2, Bprime_E2, gxd); /* tv2 = B * gxd */
add_fp2(gx1, gx1, tv2); /* gx1 = gx1 + tv2 # x1^3 + A*x1*xd^2 + B*xd^3 */
sqr_fp2(tv4, gxd); /* tv4 = gxd^2 */
mul_fp2(tv2, gx1, gxd); /* tv2 = gx1 * gxd */
mul_fp2(tv4, tv4, tv2); /* tv4 = tv4 * tv2 # gx1*gxd^3 */
e2 = recip_sqrt_fp2(y1, tv4, /* y1 = tv4^c1 # (gx1*gxd^3)^((p^2-9)/16) */
recip_ZZZ, magic_ZZZ);
mul_fp2(y1, y1, tv2); /* y1 = y1 * tv2 # gx1*gxd*y1 */
mul_fp2(y2, y1, uu); /* y2 = y1 * uu */
mul_fp2(y2, y2, u); /* y2 = y2 * u */
/* choose numerators */
vec_select(xn, x1n, x2n, sizeof(xn), e2); /* xn = e2 ? x1n : x2n */
vec_select(y, y1, y2, sizeof(y), e2); /* y = e2 ? y1 : y2 */
e1 = sgn0_fp2(u);
e2 = sgn0_fp2(y);
cneg_fp2(y, y, e1^e2); /* fix sign of y */
/* return (xn, xd, y, 1) */
/* convert (xn, xd, y, 1) to Jacobian projective coordinates */
mul_fp2(p->X, xn, xd); /* X = xn * xd */
mul_fp2(p->Y, y, gxd); /* Y = y * xd^3 */
#ifndef xd
vec_copy(p->Z, xd, sizeof(xd)); /* Z = xd */
#else
# undef xn
# undef y
# undef xd
# undef x1n
# undef y1
# undef Zuu
# undef tv4
#endif
#undef sgn0_fp2
} | O0 | c | map_to_isogenous_E2:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x312a0
leaq -0x190(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq 0x1eafe(%rip), %rsi # 0x55db0
callq 0x31230
leaq -0xd0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x312a0
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x31000
movq -0x8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq 0x1da32(%rip), %rdx # 0x54d28
callq 0x31000
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq 0x1ec26(%rip), %rdx # 0x55f30
callq 0x31230
leaq -0x190(%rbp), %rdi
leaq -0x190(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq -0xd0(%rbp), %rdx
leaq 0x1ea11(%rip), %rsi # 0x55d50
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movl $0x60, %esi
callq 0x23820
movq %rax, -0x2b8(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
movq -0x2b8(%rbp), %r8
leaq 0x1eb4c(%rip), %rsi # 0x55ed0
movl $0x60, %ecx
callq 0x23690
leaq -0xd0(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x312a0
leaq -0x250(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31230
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
leaq 0x1e918(%rip), %rsi # 0x55cf0
callq 0x31230
leaq -0x1f0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x312a0
leaq -0x1f0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31000
leaq -0x1f0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x31230
leaq -0xd0(%rbp), %rdi
leaq -0x250(%rbp), %rdx
leaq 0x1eafd(%rip), %rsi # 0x55f30
callq 0x31230
leaq -0x1f0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31000
leaq -0x130(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x312a0
leaq -0xd0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x31230
leaq -0x130(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x130(%rbp), %rsi
leaq 0x1e961(%rip), %rdx # 0x55e10
leaq 0x1e9ba(%rip), %rcx # 0x55e70
callq 0x37a80
movq %rax, -0x2c0(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31230
leaq -0x2b0(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x70(%rbp), %rdx
callq 0x31230
leaq -0x2b0(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x190(%rbp), %rdx
movq -0x2c0(%rbp), %r8
movl $0x60, %ecx
callq 0x23690
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x2b0(%rbp), %rdx
movq -0x2c0(%rbp), %r8
movl $0x60, %ecx
callq 0x23690
movq -0x10(%rbp), %rdi
leaq 0x1d790(%rip), %rsi # 0x54cf0
movabsq $-0x760c000300030003, %rdx # imm = 0x89F3FFFCFFFCFFFD
callq 0x45f20
andq $0x1, %rax
movq %rax, -0x2b8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq 0x1d767(%rip), %rsi # 0x54cf0
movabsq $-0x760c000300030003, %rdx # imm = 0x89F3FFFCFFFCFFFD
callq 0x45f20
andq $0x1, %rax
movq %rax, -0x2c0(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x2b8(%rbp), %rdx
xorq -0x2c0(%rbp), %rdx
callq 0x31330
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0xc0, %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x250(%rbp), %rdx
callq 0x31230
addq $0x2c0, %rsp # imm = 0x2C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| map_to_isogenous_E2:
push rbp
mov rbp, rsp
sub rsp, 2C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_10]
call sqr_fp2
lea rdi, [rbp+var_190]
lea rdx, [rbp+var_70]
lea rsi, map_to_isogenous_E2_Z
call mul_fp2
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_190]
call sqr_fp2
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_D0]
lea rdx, [rbp+var_190]
call add_fp2
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_D0]
lea rdx, BLS12_381_Rx
call add_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, Bprime_E2
call mul_fp2
lea rdi, [rbp+var_190]
lea rsi, [rbp+var_190]
mov rdx, [rbp+var_8]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rdx, [rbp+var_D0]
lea rsi, map_to_isogenous_E2_minus_A
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov esi, 60h ; '`'
call vec_is_zero
mov [rbp+var_2B8], rax
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rdx, [rbp+var_8]
add rdx, 0C0h
mov r8, [rbp+var_2B8]
lea rsi, map_to_isogenous_E2_ZxA
mov ecx, 60h ; '`'
call vec_select
lea rdi, [rbp+var_D0]
mov rsi, [rbp+var_8]
add rsi, 0C0h
call sqr_fp2
lea rdi, [rbp+var_250]
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, [rbp+var_D0]
call mul_fp2
lea rdi, [rbp+var_D0]
lea rdx, [rbp+var_D0]
lea rsi, Aprime_E2
call mul_fp2
lea rdi, [rbp+var_1F0]
mov rsi, [rbp+var_8]
call sqr_fp2
lea rdi, [rbp+var_1F0]
lea rsi, [rbp+var_1F0]
lea rdx, [rbp+var_D0]
call add_fp2
lea rdi, [rbp+var_1F0]
lea rsi, [rbp+var_1F0]
mov rdx, [rbp+var_8]
call mul_fp2
lea rdi, [rbp+var_D0]
lea rdx, [rbp+var_250]
lea rsi, Bprime_E2
call mul_fp2
lea rdi, [rbp+var_1F0]
lea rsi, [rbp+var_1F0]
lea rdx, [rbp+var_D0]
call add_fp2
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_250]
call sqr_fp2
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_1F0]
lea rdx, [rbp+var_250]
call mul_fp2
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_130]
lea rdx, [rbp+var_D0]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, [rbp+var_130]
lea rdx, map_to_isogenous_E2_recip_ZZZ
lea rcx, map_to_isogenous_E2_magic_ZZZ
call recip_sqrt_fp2
mov [rbp+var_2C0], rax
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_D0]
call mul_fp2
lea rdi, [rbp+var_2B0]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_70]
call mul_fp2
lea rdi, [rbp+var_2B0]
lea rsi, [rbp+var_2B0]
mov rdx, [rbp+var_10]
call mul_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_190]
mov r8, [rbp+var_2C0]
mov ecx, 60h ; '`'
call vec_select
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_2B0]
mov r8, [rbp+var_2C0]
mov ecx, 60h ; '`'
call vec_select
mov rdi, [rbp+var_10]
lea rsi, BLS12_381_P
mov rdx, 89F3FFFCFFFCFFFDh
call sgn0_pty_mont_384x
and rax, 1
mov [rbp+var_2B8], rax
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, BLS12_381_P
mov rdx, 89F3FFFCFFFCFFFDh
call sgn0_pty_mont_384x
and rax, 1
mov [rbp+var_2C0], rax
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
mov rdx, [rbp+var_2B8]
xor rdx, [rbp+var_2C0]
call cneg_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_8]
add rdx, 0C0h
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_250]
call mul_fp2
add rsp, 2C0h
pop rbp
retn
| long long map_to_isogenous_E2(long long a1, long long a2)
{
unsigned long long is_zero; // rax
long long v4; // [rsp+0h] [rbp-2C0h]
long long v5; // [rsp+0h] [rbp-2C0h]
long long v6; // [rsp+8h] [rbp-2B8h]
_BYTE v7[96]; // [rsp+10h] [rbp-2B0h] BYREF
_BYTE v8[96]; // [rsp+70h] [rbp-250h] BYREF
_BYTE v9[96]; // [rsp+D0h] [rbp-1F0h] BYREF
_BYTE v10[96]; // [rsp+130h] [rbp-190h] BYREF
_BYTE v11[96]; // [rsp+190h] [rbp-130h] BYREF
_BYTE v12[96]; // [rsp+1F0h] [rbp-D0h] BYREF
_BYTE v13[96]; // [rsp+250h] [rbp-70h] BYREF
long long v14; // [rsp+2B0h] [rbp-10h]
long long v15; // [rsp+2B8h] [rbp-8h]
v15 = a1;
v14 = a2;
sqr_fp2((long long)v13, a2);
mul_fp2((long long)v10, (long long)&map_to_isogenous_E2_Z, (long long)v13);
sqr_fp2((long long)v12, (long long)v10);
add_fp2((long long)v12, (long long)v12, (long long)v10);
add_fp2(v15, (long long)v12, (long long)&BLS12_381_Rx);
mul_fp2(v15, v15, (long long)&Bprime_E2);
mul_fp2((long long)v10, (long long)v10, v15);
mul_fp2(v15 + 192, (long long)&map_to_isogenous_E2_minus_A, (long long)v12);
is_zero = vec_is_zero(v15 + 192, 0x60uLL);
vec_select(v15 + 192, (long long)&map_to_isogenous_E2_ZxA, v15 + 192, 0x60uLL, is_zero);
sqr_fp2((long long)v12, v15 + 192);
mul_fp2((long long)v8, v15 + 192, (long long)v12);
mul_fp2((long long)v12, (long long)&Aprime_E2, (long long)v12);
sqr_fp2((long long)v9, v15);
add_fp2((long long)v9, (long long)v9, (long long)v12);
mul_fp2((long long)v9, (long long)v9, v15);
mul_fp2((long long)v12, (long long)&Bprime_E2, (long long)v8);
add_fp2((long long)v9, (long long)v9, (long long)v12);
sqr_fp2((long long)v11, (long long)v8);
mul_fp2((long long)v12, (long long)v9, (long long)v8);
mul_fp2((long long)v11, (long long)v11, (long long)v12);
v4 = recip_sqrt_fp2(v15 + 96, v11, &map_to_isogenous_E2_recip_ZZZ, &map_to_isogenous_E2_magic_ZZZ);
mul_fp2(v15 + 96, v15 + 96, (long long)v12);
mul_fp2((long long)v7, v15 + 96, (long long)v13);
mul_fp2((long long)v7, (long long)v7, v14);
vec_select(v15, v15, (long long)v10, 0x60uLL, v4);
vec_select(v15 + 96, v15 + 96, (long long)v7, 0x60uLL, v4);
v6 = sgn0_pty_mont_384x(v14, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL) & 1;
v5 = sgn0_pty_mont_384x(v15 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL) & 1;
cneg_fp2(v15 + 96, v15 + 96, v5 ^ v6);
mul_fp2(v15, v15, v15 + 192);
return mul_fp2(v15 + 96, v15 + 96, (long long)v8);
}
| map_to_isogenous_E2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2c0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001312a0
LEA RDI,[RBP + -0x190]
LEA RDX,[RBP + -0x70]
LEA RSI,[0x155db0]
CALL 0x00131230
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0x190]
CALL 0x001312a0
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xd0]
LEA RDX,[RBP + -0x190]
CALL 0x00131000
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xd0]
LEA RDX,[0x154d28]
CALL 0x00131000
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[0x155f30]
CALL 0x00131230
LEA RDI,[RBP + -0x190]
LEA RSI,[RBP + -0x190]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RDX,[RBP + -0xd0]
LEA RSI,[0x155d50]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV ESI,0x60
CALL 0x00123820
MOV qword ptr [RBP + -0x2b8],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0xc0
MOV R8,qword ptr [RBP + -0x2b8]
LEA RSI,[0x155ed0]
MOV ECX,0x60
CALL 0x00123690
LEA RDI,[RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001312a0
LEA RDI,[RBP + -0x250]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[RBP + -0xd0]
CALL 0x00131230
LEA RDI,[RBP + -0xd0]
LEA RDX,[RBP + -0xd0]
LEA RSI,[0x155cf0]
CALL 0x00131230
LEA RDI,[RBP + -0x1f0]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001312a0
LEA RDI,[RBP + -0x1f0]
LEA RSI,[RBP + -0x1f0]
LEA RDX,[RBP + -0xd0]
CALL 0x00131000
LEA RDI,[RBP + -0x1f0]
LEA RSI,[RBP + -0x1f0]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x00131230
LEA RDI,[RBP + -0xd0]
LEA RDX,[RBP + -0x250]
LEA RSI,[0x155f30]
CALL 0x00131230
LEA RDI,[RBP + -0x1f0]
LEA RSI,[RBP + -0x1f0]
LEA RDX,[RBP + -0xd0]
CALL 0x00131000
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x250]
CALL 0x001312a0
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0x1f0]
LEA RDX,[RBP + -0x250]
CALL 0x00131230
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x130]
LEA RDX,[RBP + -0xd0]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[RBP + -0x130]
LEA RDX,[0x155e10]
LEA RCX,[0x155e70]
CALL 0x00137a80
MOV qword ptr [RBP + -0x2c0],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0xd0]
CALL 0x00131230
LEA RDI,[RBP + -0x2b0]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0x70]
CALL 0x00131230
LEA RDI,[RBP + -0x2b0]
LEA RSI,[RBP + -0x2b0]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x190]
MOV R8,qword ptr [RBP + -0x2c0]
MOV ECX,0x60
CALL 0x00123690
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0x2b0]
MOV R8,qword ptr [RBP + -0x2c0]
MOV ECX,0x60
CALL 0x00123690
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x154cf0]
MOV RDX,-0x760c000300030003
CALL 0x00145f20
AND RAX,0x1
MOV qword ptr [RBP + -0x2b8],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[0x154cf0]
MOV RDX,-0x760c000300030003
CALL 0x00145f20
AND RAX,0x1
MOV qword ptr [RBP + -0x2c0],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x2b8]
XOR RDX,qword ptr [RBP + -0x2c0]
CALL 0x00131330
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0xc0
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0x250]
CALL 0x00131230
ADD RSP,0x2c0
POP RBP
RET
|
void map_to_isogenous_E2(long param_1,int8 param_2)
{
int8 uVar1;
ulong uVar2;
ulong uVar3;
int1 local_2b8 [96];
int1 local_258 [96];
int1 local_1f8 [96];
int1 local_198 [96];
int1 local_138 [96];
int1 local_d8 [96];
int1 local_78 [96];
int8 local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
sqr_fp2(local_78,param_2);
mul_fp2(local_198,map_to_isogenous_E2_Z,local_78);
sqr_fp2(local_d8,local_198);
add_fp2(local_d8,local_d8,local_198);
add_fp2(local_10,local_d8,BLS12_381_Rx);
mul_fp2(local_10,local_10,Bprime_E2);
mul_fp2(local_198,local_198,local_10);
mul_fp2(local_10 + 0xc0,map_to_isogenous_E2_minus_A,local_d8);
uVar1 = vec_is_zero(local_10 + 0xc0,0x60);
vec_select(local_10 + 0xc0,map_to_isogenous_E2_ZxA,local_10 + 0xc0,0x60,uVar1);
sqr_fp2(local_d8,local_10 + 0xc0);
mul_fp2(local_258,local_10 + 0xc0,local_d8);
mul_fp2(local_d8,Aprime_E2,local_d8);
sqr_fp2(local_1f8,local_10);
add_fp2(local_1f8,local_1f8,local_d8);
mul_fp2(local_1f8,local_1f8,local_10);
mul_fp2(local_d8,Bprime_E2,local_258);
add_fp2(local_1f8,local_1f8,local_d8);
sqr_fp2(local_138,local_258);
mul_fp2(local_d8,local_1f8,local_258);
mul_fp2(local_138,local_138,local_d8);
uVar1 = recip_sqrt_fp2(local_10 + 0x60,local_138,map_to_isogenous_E2_recip_ZZZ,
map_to_isogenous_E2_magic_ZZZ);
mul_fp2(local_10 + 0x60,local_10 + 0x60,local_d8);
mul_fp2(local_2b8,local_10 + 0x60,local_78);
mul_fp2(local_2b8,local_2b8,local_18);
vec_select(local_10,local_10,local_198,0x60,uVar1);
vec_select(local_10 + 0x60,local_10 + 0x60,local_2b8,0x60,uVar1);
uVar2 = sgn0_pty_mont_384x(local_18,BLS12_381_P,0x89f3fffcfffcfffd);
uVar3 = sgn0_pty_mont_384x(local_10 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd);
cneg_fp2(local_10 + 0x60,local_10 + 0x60,uVar2 & 1 ^ uVar3 & 1);
mul_fp2(local_10,local_10,local_10 + 0xc0);
mul_fp2(local_10 + 0x60,local_10 + 0x60,local_258);
return;
}
| |
23,871 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long) | monkey531[P]llama/common/json.hpp | bool start_object(std::size_t len)
{
ref_stack.push_back(handle_value(BasicJsonType::value_t::object));
if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x8(%rsp), %rsi
movb $0x1, (%rsi)
callq 0x4462a
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x4470a
cmpq $-0x1, %r15
je 0x442cb
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
callq 0x40cf6
cmpq %r15, %rax
jb 0x442d8
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x40e69
leaq 0x6b858(%rip), %rsi # 0xafb4f
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x40e0b
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x40d1e
xorl %ebp, %ebp
leaq 0xb5b9c(%rip), %rsi # 0xf9ec8
leaq -0x51e5(%rip), %rdx # 0x3f14e
movq %rbx, %rdi
callq 0x23e90
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x24158
jmp 0x44350
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x44364
jmp 0x4436c
movq %rax, %r14
movq %rbx, %rdi
callq 0x23660
movq %r14, %rdi
callq 0x23f10
| _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+8]
lea rsi, [rsp+68h+var_60]
mov byte ptr [rsi], 1
call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&)
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
mov rdi, rbx
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE12emplace_backIJSE_EEERSE_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>(nlohmann::json_abi_v3_11_3::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> * &&)
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_442CB
mov rax, [r14+10h]
mov rdi, [rax-8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
cmp rax, r15
jb short loc_442D8
loc_442CB:
mov al, 1
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_442D8:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]; this
mov rsi, r15; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveObjec; "excessive object size: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+68h+var_40]
mov rdi, rbx; this
mov esi, 198h; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_44350
mov r14, rax
mov bpl, 1
loc_44350:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_44364
jmp short loc_4436C
mov r14, rax
loc_44364:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4436C:
mov rdi, r14
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object(
long long a1,
unsigned long long a2)
{
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
_BYTE v4[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v5[8]; // [rsp+28h] [rbp-40h] BYREF
v4[0] = 1;
v5[0] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v4);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::emplace_back<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> *>(a1 + 8);
if ( a2 != -1LL
&& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*(unsigned __int8 **)(*(_QWORD *)(a1 + 16) - 8LL)) < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v4, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(
(long long)v5,
(long long)"excessive object size: ",
(long long)v4);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
(long long)v5,
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL));
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
| start_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x8]
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x1
CALL 0x0014462a
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x0014470a
CMP R15,-0x1
JZ 0x001442cb
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
CALL 0x00140cf6
CMP RAX,R15
JC 0x001442d8
LAB_001442cb:
MOV AL,0x1
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001442d8:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
LAB_001442e3:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x00140e69
LAB_001442f0:
LEA RSI,[0x1afb4f]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00140e0b
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_00144311:
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x00140d1e
XOR EBP,EBP
LEA RSI,[0x1f9ec8]
LEA RDX,[0x13f14e]
MOV RDI,RBX
CALL 0x00123e90
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_object(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_object(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
ulong uVar1;
int8 uVar2;
__cxx11 local_60 [32];
basic_json *local_40 [4];
local_60[0] = (__cxx11)0x1;
local_40[0] = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_60);
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<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>*>>
::
emplace_back<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>*>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),local_40);
if (param_1 != 0xffffffffffffffff) {
uVar1 = 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>
::max_size(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8));
if (uVar1 < param_1) {
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001442e3 to 001442ef has its CatchHandler @ 00144361 */
std::__cxx11::to_string(local_60,param_1);
/* try { // try from 001442f0 to 00144305 has its CatchHandler @ 0014434a */
concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string>
((detail *)local_40,"excessive object size: ",(string *)local_60);
/* try { // try from 00144311 to 0014433a has its CatchHandler @ 0014433b */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x198,local_40,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&out_of_range::typeinfo,exception::~exception);
}
}
return 1;
}
| |
23,872 | my_hash_reset | eloqsql/mysys/hash.c | void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
} | O3 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x28254
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x28254
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0x28244
movl $0x0, 0x30(%rbx)
movq $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_hash_reset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_28254
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_28254
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_28244:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_28244
loc_28254:
mov dword ptr [rbx+30h], 0
mov qword ptr [rbx+10h], 1
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_hash_reset(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
result = (*(long long ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_DWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x00128254
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x00128254
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_00128244:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x00128244
LAB_00128254:
MOV dword ptr [RBX + 0x30],0x0
MOV qword ptr [RBX + 0x10],0x1
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_reset(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
23,873 | mimi_transformer::forward(ggml_context*, ggml_easy::ctx::build_utils&, ggml_tensor*, ggml_tensor*) | ngxson[P]ggml-easy/demo/kyutai-mimi.cpp | ggml_tensor * forward(ggml_context * ctx0, ggml_easy::ctx::build_utils & utils, ggml_tensor * input, ggml_tensor * inp_pos) {
int n_tokens = input->ne[1];
ggml_tensor * x = input;
auto layer_norm = [&](ggml_tensor * x, ggml_tensor * w, ggml_tensor * b) {
x = ggml_norm(ctx0, x, mimi_config.norm_eps);
x = ggml_mul(ctx0, x, w);
x = ggml_add(ctx0, x, b);
return x;
};
// TODO: do this at conversion time, see LlamaModel.permute in convert_hf_to_gguf.py
auto llama_permute = [&](ggml_tensor * w) {
int n_head = mimi_config.n_head;
ggml_tensor * tmp = ggml_reshape_4d(ctx0, w, w->ne[0], w->ne[1] / n_head / 2, 2, n_head);
tmp = ggml_permute(ctx0, tmp, 0, 2, 1, 3);
tmp = ggml_cont(ctx0, tmp);
return ggml_reshape_2d(ctx0, tmp, w->ne[0], w->ne[1]);
};
ggml_tensor * residual = input;
int i = 0; // for debugging
for (auto & layer : layers) {
residual = x;
// input layer norm
x = layer_norm(x, layer.inp_norm_w, layer.inp_norm_b);
// self attention
{
ggml_tensor * q = ggml_mul_mat(ctx0, llama_permute(layer.attn_q), x);
ggml_tensor * k = ggml_mul_mat(ctx0, llama_permute(layer.attn_k), x);
ggml_tensor * v = ggml_mul_mat(ctx0, layer.attn_v, x);
int n_embd_head = mimi_config.n_embd / mimi_config.n_head;
q = ggml_reshape_3d(ctx0, q, n_embd_head, mimi_config.n_head, n_tokens);
k = ggml_reshape_3d(ctx0, k, n_embd_head, mimi_config.n_head_kv, n_tokens);
v = ggml_reshape_3d(ctx0, v, n_embd_head, mimi_config.n_head_kv, n_tokens);
int n_rot = n_embd_head;
q = ggml_rope_inplace(ctx0, q, inp_pos, n_rot, 0);
q = ggml_cont(ctx0, ggml_permute(ctx0, q, 0, 2, 1, 3));
// utils.debug_print(q, "q rope");
k = ggml_rope_inplace(ctx0, k, inp_pos, n_rot, 0);
k = ggml_cont(ctx0, ggml_permute(ctx0, k, 0, 2, 1, 3));
// utils.debug_print(k, "k rope");
ggml_tensor * kq = ggml_mul_mat(ctx0, k, q);
ggml_mul_mat_set_prec(kq, GGML_PREC_F32); // mimic behavior of llama.cpp
kq = ggml_scale_inplace(ctx0, kq, 1.0f / std::sqrt(n_embd_head));
ggml_tensor * kq_masked = ggml_diag_mask_inf_inplace(ctx0, kq, n_tokens);
kq = ggml_soft_max_inplace(ctx0, kq_masked);
// utils.debug_print(kq, "kq softmax");
v = ggml_cont(ctx0, ggml_permute(ctx0, v, 1, 2, 0, 3));
ggml_tensor * kqv = ggml_mul_mat(ctx0, v, kq);
kqv = ggml_reshape_3d(ctx0, kqv, n_embd_head, n_tokens, mimi_config.n_head);
kqv = ggml_permute(ctx0, kqv, 0, 2, 1, 3);
kqv = ggml_cont_2d(ctx0, kqv, mimi_config.n_embd, n_tokens);
// utils.debug_print(kqv, "kqv");
// utils.debug_print(ggml_sum(ctx0, kqv), "kqv_sum");
x = ggml_mul_mat(ctx0, layer.attn_o, kqv);
}
// residual
x = ggml_mul(ctx0, x, layer.attn_layer_scale);
x = ggml_add(ctx0, x, residual);
// utils.debug_print(x, "after_attn_%d", i);
residual = x;
x = layer_norm(x, layer.attn_post_norm_w, layer.attn_post_norm_b);
// mlp
{
x = ggml_mul_mat(ctx0, layer.ffn_up, x);
x = ggml_gelu(ctx0, x);
x = ggml_mul_mat(ctx0, layer.ffn_down, x);
}
// residual
x = ggml_mul(ctx0, x, layer.mlp_layer_scale);
x = ggml_add(ctx0, x, residual);
// utils.debug_print(x, "output_layer_%d", i);
// utils.debug_print(ggml_sum(ctx0, x), "output_layer_%d_sum", i); i++;
}
return x;
} | O3 | cpp | mimi_transformer::forward(ggml_context*, ggml_easy::ctx::build_utils&, ggml_tensor*, ggml_tensor*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x18(%rsp)
movq (%rdi), %r13
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r13
je 0xbc6e
movq %rsi, %r14
movq 0x18(%rcx), %rax
movslq %eax, %rbp
movq %rbp, 0x8(%rsp)
movq (%r13), %rbx
movq 0x8(%r13), %r12
movss 0x6c17(%rip), %xmm0 # 0x12490
movq %r14, %rdi
movq %rcx, 0x28(%rsp)
movq %rcx, %rsi
callq 0x4360
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4630
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x4270
movq %r13, %r15
movq %rax, %r13
movq 0x10(%r15), %rbp
movslq 0x6bce(%rip), %r9 # 0x12484
movq 0x10(%rbp), %r10
movq 0x18(%rbp), %rax
cqto
idivq %r9
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
sarq %rcx
movl $0x2, %r8d
movq %r14, %rdi
movq %rbp, %rsi
movq %r10, %rdx
callq 0x44a0
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x4840
movq %r14, %rdi
movq %rax, %rsi
callq 0x4110
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4770
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x42c0
movq %rax, %rbp
movq 0x18(%r15), %rbx
movslq 0x6b48(%rip), %r9 # 0x12484
movq 0x10(%rbx), %r10
movq 0x18(%rbx), %rax
cqto
idivq %r9
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
sarq %rcx
movl $0x2, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r10, %rdx
callq 0x44a0
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x4840
movq %r14, %rdi
movq %rax, %rsi
callq 0x4110
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4770
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x42c0
movq %rax, %rbx
movq %r15, 0x30(%rsp)
movq 0x20(%r15), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x42c0
movq %rax, %r12
movl 0x6aa8(%rip), %eax # 0x1247c
movslq 0x6aa9(%rip), %rcx # 0x12484
cltd
idivl %ecx
movslq %eax, %r13
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq 0x8(%rsp), %rbp
movq %rbp, %r8
callq 0x4440
movq %rax, %r15
movslq 0x6a87(%rip), %rcx # 0x12488
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %rbp, %r8
callq 0x4440
movq %rax, %rbx
movslq 0x6a6c(%rip), %rcx # 0x12488
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
callq 0x4440
movq %rax, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq 0x18(%rsp), %r12
movq %r12, %rdx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x4660
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x4840
movq %r14, %rdi
movq %rax, %rsi
callq 0x4110
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x4660
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x4840
movq %r14, %rdi
movq %rax, %rsi
callq 0x4110
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x42c0
movq %rax, %rbx
movq %rax, %rdi
movl $0x1, %esi
callq 0x45b0
cvtsi2sd %r13d, %xmm0
ucomisd 0x15a1(%rip), %xmm0 # 0xd080
jb 0xbae7
sqrtsd %xmm0, %xmm0
jmp 0xbaec
callq 0x43a0
movsd 0x1584(%rip), %xmm1 # 0xd078
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4330
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x4560
movq %r14, %rdi
movq %rax, %rsi
callq 0x4830
movq %rax, %rbx
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0x4840
movq %r14, %rdi
movq %rax, %rsi
callq 0x4110
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x42c0
movslq 0x691f(%rip), %r8 # 0x12484
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x4440
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x4840
movslq 0x68e1(%rip), %rdx # 0x1247c
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rcx
callq 0x4160
movq 0x30(%rsp), %r13
movq 0x28(%r13), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x42c0
movq 0x40(%r13), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4630
movq %r14, %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
callq 0x4270
movq %rax, %r12
movq 0x30(%r13), %rbx
movq 0x38(%r13), %r15
movss 0x68a1(%rip), %xmm0 # 0x12490
movq %r14, %rdi
movq %rax, %rsi
callq 0x4360
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4630
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4270
movq 0x48(%r13), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x42c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x43b0
movq 0x50(%r13), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x42c0
movq 0x58(%r13), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4630
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x4270
movq %rax, %rcx
addq $0x60, %r13
cmpq 0x10(%rsp), %r13
jne 0xb869
movq %rcx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN16mimi_transformer7forwardEP12ggml_contextRN9ggml_easy3ctx11build_utilsEP11ggml_tensorS7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_50], r8
mov r13, [rdi]
mov rax, [rdi+8]
mov [rsp+68h+var_58], rax
cmp r13, rax
jz loc_BC6E
mov r14, rsi
mov rax, [rcx+18h]
movsxd rbp, eax
mov [rsp+68h+var_60], rbp
loc_B869:
mov rbx, [r13+0]
mov r12, [r13+8]
movss xmm0, cs:dword_12490
mov rdi, r14
mov [rsp+68h+var_40], rcx
mov rsi, rcx
call _ggml_norm
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _ggml_mul
mov rdi, r14
mov rsi, rax
mov rdx, r12
call _ggml_add
mov r15, r13
mov r13, rax
mov rbp, [r15+10h]
movsxd r9, cs:dword_12484
mov r10, [rbp+10h]
mov rax, [rbp+18h]
cqo
idiv r9
mov rcx, rax
shr rcx, 3Fh
add rcx, rax
sar rcx, 1
mov r8d, 2
mov rdi, r14
mov rsi, rbp
mov rdx, r10
call _ggml_reshape_4d
mov rdi, r14
mov rsi, rax
xor edx, edx
mov ecx, 2
mov r8d, 1
mov r9d, 3
call _ggml_permute
mov rdi, r14
mov rsi, rax
call _ggml_cont
mov rdx, [rbp+10h]
mov rcx, [rbp+18h]
mov rdi, r14
mov rsi, rax
call _ggml_reshape_2d
mov rdi, r14
mov rsi, rax
mov rdx, r13
call _ggml_mul_mat
mov rbp, rax
mov rbx, [r15+18h]
movsxd r9, cs:dword_12484
mov r10, [rbx+10h]
mov rax, [rbx+18h]
cqo
idiv r9
mov rcx, rax
shr rcx, 3Fh
add rcx, rax
sar rcx, 1
mov r8d, 2
mov rdi, r14
mov rsi, rbx
mov rdx, r10
call _ggml_reshape_4d
mov rdi, r14
mov rsi, rax
xor edx, edx
mov ecx, 2
mov r8d, 1
mov r9d, 3
call _ggml_permute
mov rdi, r14
mov rsi, rax
call _ggml_cont
mov rdx, [rbx+10h]
mov rcx, [rbx+18h]
mov rdi, r14
mov rsi, rax
call _ggml_reshape_2d
mov rdi, r14
mov rsi, rax
mov rdx, r13
call _ggml_mul_mat
mov rbx, rax
mov [rsp+68h+var_38], r15
mov rsi, [r15+20h]
mov rdi, r14
mov rdx, r13
call _ggml_mul_mat
mov r12, rax
mov eax, cs:dword_1247C
movsxd rcx, cs:dword_12484
cdq
idiv ecx
movsxd r13, eax
mov rdi, r14
mov rsi, rbp
mov rdx, r13
mov rbp, [rsp+68h+var_60]
mov r8, rbp
call _ggml_reshape_3d
mov r15, rax
movsxd rcx, cs:dword_12488
mov rdi, r14
mov rsi, rbx
mov rdx, r13
mov r8, rbp
call _ggml_reshape_3d
mov rbx, rax
movsxd rcx, cs:dword_12488
mov rdi, r14
mov rsi, r12
mov rdx, r13
mov r8, rbp
call _ggml_reshape_3d
mov [rsp+68h+var_48], rax
mov rdi, r14
mov rsi, r15
mov r12, [rsp+68h+var_50]
mov rdx, r12
mov ecx, r13d
xor r8d, r8d
call _ggml_rope_inplace
mov rdi, r14
mov rsi, rax
xor edx, edx
mov ecx, 2
mov r8d, 1
mov r9d, 3
call _ggml_permute
mov rdi, r14
mov rsi, rax
call _ggml_cont
mov r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov ecx, r13d
xor r8d, r8d
call _ggml_rope_inplace
mov rdi, r14
mov rsi, rax
xor edx, edx
mov ecx, 2
mov r8d, 1
mov r9d, 3
call _ggml_permute
mov rdi, r14
mov rsi, rax
call _ggml_cont
mov rdi, r14
mov rsi, rax
mov rdx, r15
call _ggml_mul_mat
mov rbx, rax
mov rdi, rax
mov esi, 1
call _ggml_mul_mat_set_prec
cvtsi2sd xmm0, r13d
ucomisd xmm0, cs:qword_D080
jb short loc_BAE7
sqrtsd xmm0, xmm0
jmp short loc_BAEC
loc_BAE7:
call _sqrt
loc_BAEC:
movsd xmm1, cs:qword_D078
divsd xmm1, xmm0
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
mov rdi, r14
mov rsi, rbx
call _ggml_scale_inplace
mov rdi, r14
mov rsi, rax
mov edx, ebp
call _ggml_diag_mask_inf_inplace
mov rdi, r14
mov rsi, rax
call _ggml_soft_max_inplace
mov rbx, rax
mov rdi, r14
mov rsi, [rsp+68h+var_48]
mov edx, 1
mov ecx, 2
xor r8d, r8d
mov r9d, 3
call _ggml_permute
mov rdi, r14
mov rsi, rax
call _ggml_cont
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _ggml_mul_mat
movsxd r8, cs:dword_12484
mov rdi, r14
mov rsi, rax
mov rdx, r13
mov rcx, rbp
call _ggml_reshape_3d
mov rdi, r14
mov rsi, rax
xor edx, edx
mov ecx, 2
mov r8d, 1
mov r9d, 3
call _ggml_permute
movsxd rdx, cs:dword_1247C
mov rdi, r14
mov rsi, rax
mov rcx, rbp
call _ggml_cont_2d
mov r13, [rsp+68h+var_38]
mov rsi, [r13+28h]
mov rdi, r14
mov rdx, rax
call _ggml_mul_mat
mov rdx, [r13+40h]
mov rdi, r14
mov rsi, rax
call _ggml_mul
mov rdi, r14
mov rsi, rax
mov rdx, [rsp+68h+var_40]
call _ggml_add
mov r12, rax
mov rbx, [r13+30h]
mov r15, [r13+38h]
movss xmm0, cs:dword_12490
mov rdi, r14
mov rsi, rax
call _ggml_norm
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _ggml_mul
mov rdi, r14
mov rsi, rax
mov rdx, r15
call _ggml_add
mov rsi, [r13+48h]
mov rdi, r14
mov rdx, rax
call _ggml_mul_mat
mov rdi, r14
mov rsi, rax
call _ggml_gelu
mov rsi, [r13+50h]
mov rdi, r14
mov rdx, rax
call _ggml_mul_mat
mov rdx, [r13+58h]
mov rdi, r14
mov rsi, rax
call _ggml_mul
mov rdi, r14
mov rsi, rax
mov rdx, r12
call _ggml_add
mov rcx, rax
add r13, 60h ; '`'
cmp r13, [rsp+68h+var_58]
jnz loc_B869
loc_BC6E:
mov rax, rcx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mimi_transformer::forward(long long a1, long long a2, long long a3, long long a4, long long a5)
{
_QWORD *v5; // r13
long long v6; // rbx
long long v7; // r12
long long v8; // rax
long long v9; // rax
_QWORD *v10; // r15
long long v11; // r13
long long v12; // rbp
long long v13; // rax
long long v14; // rax
long long v15; // rax
long long v16; // rax
long long v17; // rbp
long long v18; // rbx
long long v19; // rax
long long v20; // rax
long long v21; // rax
long long v22; // rax
long long v23; // rbx
long long v24; // r12
long long v25; // r13
long long v26; // r15
long long v27; // rbx
long long v28; // rax
long long v29; // rax
long long v30; // r15
long long v31; // rax
long long v32; // rax
long long v33; // rax
long long v34; // rbx
double v35; // xmm0_8
double v36; // xmm0_8
float v37; // xmm0_4
long long v38; // rax
long long v39; // rax
long long v40; // rbx
long long v41; // rax
long long v42; // rax
long long v43; // rax
long long v44; // rax
long long v45; // rax
long long v46; // rax
long long v47; // rax
long long v48; // rax
long long v49; // r12
long long v50; // rbx
long long v51; // r15
long long v52; // rax
long long v53; // rax
long long v54; // rax
long long v55; // rax
long long v56; // rax
long long v57; // rax
long long v58; // rax
long long v60; // [rsp+8h] [rbp-60h]
_QWORD *v61; // [rsp+10h] [rbp-58h]
long long v63; // [rsp+20h] [rbp-48h]
long long v64; // [rsp+28h] [rbp-40h]
_QWORD *v65; // [rsp+30h] [rbp-38h]
v5 = *(_QWORD **)a1;
v61 = *(_QWORD **)(a1 + 8);
if ( *(_QWORD **)a1 != v61 )
{
v60 = (int)*(_QWORD *)(a4 + 24);
do
{
v6 = *v5;
v7 = v5[1];
v64 = a4;
v8 = ggml_norm(a2, a4, *(float *)&dword_12490);
v9 = ggml_mul(a2, v8, v6);
v10 = v5;
v11 = ggml_add(a2, v9, v7);
v12 = v10[2];
v13 = ggml_reshape_4d(a2, v12, *(_QWORD *)(v12 + 16), *(_QWORD *)(v12 + 24) / dword_12484 / 2LL, 2LL);
v14 = ggml_permute(a2, v13, 0LL, 2LL, 1LL, 3LL);
v15 = ggml_cont(a2, v14);
v16 = ggml_reshape_2d(a2, v15, *(_QWORD *)(v12 + 16), *(_QWORD *)(v12 + 24));
v17 = ggml_mul_mat(a2, v16, v11);
v18 = v10[3];
v19 = ggml_reshape_4d(a2, v18, *(_QWORD *)(v18 + 16), *(_QWORD *)(v18 + 24) / dword_12484 / 2LL, 2LL);
v20 = ggml_permute(a2, v19, 0LL, 2LL, 1LL, 3LL);
v21 = ggml_cont(a2, v20);
v22 = ggml_reshape_2d(a2, v21, *(_QWORD *)(v18 + 16), *(_QWORD *)(v18 + 24));
v23 = ggml_mul_mat(a2, v22, v11);
v65 = v10;
v24 = ggml_mul_mat(a2, v10[4], v11);
v25 = dword_1247C / dword_12484;
v26 = ggml_reshape_3d(a2, v17, v25, dword_12484, v60);
v27 = ggml_reshape_3d(a2, v23, v25, dword_12488, v60);
v63 = ggml_reshape_3d(a2, v24, v25, dword_12488, v60);
v28 = ggml_rope_inplace(a2, v26, a5, (unsigned int)v25, 0LL);
v29 = ggml_permute(a2, v28, 0LL, 2LL, 1LL, 3LL);
v30 = ggml_cont(a2, v29);
v31 = ggml_rope_inplace(a2, v27, a5, (unsigned int)v25, 0LL);
v32 = ggml_permute(a2, v31, 0LL, 2LL, 1LL, 3LL);
v33 = ggml_cont(a2, v32);
v34 = ggml_mul_mat(a2, v33, v30);
ggml_mul_mat_set_prec(v34, 1LL);
v35 = (double)(int)v25;
if ( (double)(int)v25 < 0.0 )
v36 = sqrt(v35);
else
v36 = sqrt(v35);
v37 = 1.0 / v36;
v38 = ggml_scale_inplace(a2, v34, v37);
v39 = ggml_diag_mask_inf_inplace(a2, v38, (unsigned int)v60);
v40 = ggml_soft_max_inplace(a2, v39);
v41 = ggml_permute(a2, v63, 1LL, 2LL, 0LL, 3LL);
v42 = ggml_cont(a2, v41);
v43 = ggml_mul_mat(a2, v42, v40);
v44 = ggml_reshape_3d(a2, v43, v25, v60, dword_12484);
v45 = ggml_permute(a2, v44, 0LL, 2LL, 1LL, 3LL);
v46 = ggml_cont_2d(a2, v45, dword_1247C, v60);
v47 = ggml_mul_mat(a2, v65[5], v46);
v48 = ggml_mul(a2, v47, v65[8]);
v49 = ggml_add(a2, v48, v64);
v50 = v65[6];
v51 = v65[7];
v52 = ggml_norm(a2, v49, *(float *)&dword_12490);
v53 = ggml_mul(a2, v52, v50);
v54 = ggml_add(a2, v53, v51);
v55 = ggml_mul_mat(a2, v65[9], v54);
v56 = ggml_gelu(a2, v55);
v57 = ggml_mul_mat(a2, v65[10], v56);
v58 = ggml_mul(a2, v57, v65[11]);
a4 = ggml_add(a2, v58, v49);
v5 = v65 + 12;
}
while ( v65 + 12 != v61 );
}
return a4;
}
| forward:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],R8
MOV R13,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + 0x10],RAX
CMP R13,RAX
JZ 0x0010bc6e
MOV R14,RSI
MOV RAX,qword ptr [RCX + 0x18]
MOVSXD RBP,EAX
MOV qword ptr [RSP + 0x8],RBP
LAB_0010b869:
MOV RBX,qword ptr [R13]
MOV R12,qword ptr [R13 + 0x8]
MOVSS XMM0,dword ptr [0x00112490]
MOV RDI,R14
MOV qword ptr [RSP + 0x28],RCX
MOV RSI,RCX
CALL 0x00104360
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00104630
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R12
CALL 0x00104270
MOV R15,R13
MOV R13,RAX
MOV RBP,qword ptr [R15 + 0x10]
MOVSXD R9,dword ptr [0x00112484]
MOV R10,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x18]
CQO
IDIV R9
MOV RCX,RAX
SHR RCX,0x3f
ADD RCX,RAX
SAR RCX,0x1
MOV R8D,0x2
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R10
CALL 0x001044a0
MOV RDI,R14
MOV RSI,RAX
XOR EDX,EDX
MOV ECX,0x2
MOV R8D,0x1
MOV R9D,0x3
CALL 0x00104840
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104110
MOV RDX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RBP + 0x18]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104770
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R13
CALL 0x001042c0
MOV RBP,RAX
MOV RBX,qword ptr [R15 + 0x18]
MOVSXD R9,dword ptr [0x00112484]
MOV R10,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RBX + 0x18]
CQO
IDIV R9
MOV RCX,RAX
SHR RCX,0x3f
ADD RCX,RAX
SAR RCX,0x1
MOV R8D,0x2
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R10
CALL 0x001044a0
MOV RDI,R14
MOV RSI,RAX
XOR EDX,EDX
MOV ECX,0x2
MOV R8D,0x1
MOV R9D,0x3
CALL 0x00104840
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104110
MOV RDX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBX + 0x18]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104770
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R13
CALL 0x001042c0
MOV RBX,RAX
MOV qword ptr [RSP + 0x30],R15
MOV RSI,qword ptr [R15 + 0x20]
MOV RDI,R14
MOV RDX,R13
CALL 0x001042c0
MOV R12,RAX
MOV EAX,dword ptr [0x0011247c]
MOVSXD RCX,dword ptr [0x00112484]
CDQ
IDIV ECX
MOVSXD R13,EAX
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R13
MOV RBP,qword ptr [RSP + 0x8]
MOV R8,RBP
CALL 0x00104440
MOV R15,RAX
MOVSXD RCX,dword ptr [0x00112488]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
MOV R8,RBP
CALL 0x00104440
MOV RBX,RAX
MOVSXD RCX,dword ptr [0x00112488]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
MOV R8,RBP
CALL 0x00104440
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R14
MOV RSI,R15
MOV R12,qword ptr [RSP + 0x18]
MOV RDX,R12
MOV ECX,R13D
XOR R8D,R8D
CALL 0x00104660
MOV RDI,R14
MOV RSI,RAX
XOR EDX,EDX
MOV ECX,0x2
MOV R8D,0x1
MOV R9D,0x3
CALL 0x00104840
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104110
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV ECX,R13D
XOR R8D,R8D
CALL 0x00104660
MOV RDI,R14
MOV RSI,RAX
XOR EDX,EDX
MOV ECX,0x2
MOV R8D,0x1
MOV R9D,0x3
CALL 0x00104840
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104110
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
CALL 0x001042c0
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,0x1
CALL 0x001045b0
CVTSI2SD XMM0,R13D
UCOMISD XMM0,qword ptr [0x0010d080]
JC 0x0010bae7
SQRTSD XMM0,XMM0
JMP 0x0010baec
LAB_0010bae7:
CALL 0x001043a0
LAB_0010baec:
MOVSD XMM1,qword ptr [0x0010d078]
DIVSD XMM1,XMM0
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
MOV RDI,R14
MOV RSI,RBX
CALL 0x00104330
MOV RDI,R14
MOV RSI,RAX
MOV EDX,EBP
CALL 0x00104560
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104830
MOV RBX,RAX
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,0x1
MOV ECX,0x2
XOR R8D,R8D
MOV R9D,0x3
CALL 0x00104840
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104110
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x001042c0
MOVSXD R8,dword ptr [0x00112484]
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R13
MOV RCX,RBP
CALL 0x00104440
MOV RDI,R14
MOV RSI,RAX
XOR EDX,EDX
MOV ECX,0x2
MOV R8D,0x1
MOV R9D,0x3
CALL 0x00104840
MOVSXD RDX,dword ptr [0x0011247c]
MOV RDI,R14
MOV RSI,RAX
MOV RCX,RBP
CALL 0x00104160
MOV R13,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [R13 + 0x28]
MOV RDI,R14
MOV RDX,RAX
CALL 0x001042c0
MOV RDX,qword ptr [R13 + 0x40]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104630
MOV RDI,R14
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00104270
MOV R12,RAX
MOV RBX,qword ptr [R13 + 0x30]
MOV R15,qword ptr [R13 + 0x38]
MOVSS XMM0,dword ptr [0x00112490]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104360
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00104630
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
CALL 0x00104270
MOV RSI,qword ptr [R13 + 0x48]
MOV RDI,R14
MOV RDX,RAX
CALL 0x001042c0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001043b0
MOV RSI,qword ptr [R13 + 0x50]
MOV RDI,R14
MOV RDX,RAX
CALL 0x001042c0
MOV RDX,qword ptr [R13 + 0x58]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00104630
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R12
CALL 0x00104270
MOV RCX,RAX
ADD R13,0x60
CMP R13,qword ptr [RSP + 0x10]
JNZ 0x0010b869
LAB_0010bc6e:
MOV RAX,RCX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* mimi_transformer::forward(ggml_context*, ggml_easy::ctx::build_utils&, ggml_tensor*,
ggml_tensor*) */
ggml_tensor * __thiscall
mimi_transformer::forward
(mimi_transformer *this,ggml_context *param_1,build_utils *param_2,ggml_tensor *param_3,
ggml_tensor *param_4)
{
int8 *puVar1;
ulong uVar2;
ulong uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
long lVar8;
int8 *puVar9;
long lVar10;
double dVar11;
int1 auVar12 [16];
auVar12._8_8_ = param_2;
auVar12._0_8_ = param_3;
puVar9 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar9 != puVar1) {
uVar2 = *(ulong *)(param_3 + 0x18);
lVar8 = (long)(int)uVar2;
do {
uVar5 = *puVar9;
uVar6 = puVar9[1];
uVar4 = ggml_norm(_DAT_00112490,param_1,auVar12._0_8_,auVar12._8_8_);
uVar5 = ggml_mul(param_1,uVar4,uVar5);
uVar5 = ggml_add(param_1,uVar5,uVar6);
lVar10 = puVar9[2];
uVar6 = ggml_reshape_4d(param_1,lVar10,*(int8 *)(lVar10 + 0x10),
(*(long *)(lVar10 + 0x18) / (long)_DAT_00112484) / 2,2);
uVar6 = ggml_permute(param_1,uVar6,0,2,1,3);
uVar6 = ggml_cont(param_1,uVar6);
uVar6 = ggml_reshape_2d(param_1,uVar6,*(int8 *)(lVar10 + 0x10),
*(int8 *)(lVar10 + 0x18));
uVar6 = ggml_mul_mat(param_1,uVar6,uVar5);
lVar10 = puVar9[3];
uVar4 = ggml_reshape_4d(param_1,lVar10,*(int8 *)(lVar10 + 0x10),
(*(long *)(lVar10 + 0x18) / (long)_DAT_00112484) / 2,2);
uVar4 = ggml_permute(param_1,uVar4,0,2,1,3);
uVar4 = ggml_cont(param_1,uVar4);
uVar4 = ggml_reshape_2d(param_1,uVar4,*(int8 *)(lVar10 + 0x10),
*(int8 *)(lVar10 + 0x18));
uVar4 = ggml_mul_mat(param_1,uVar4,uVar5);
uVar5 = ggml_mul_mat(param_1,puVar9[4],uVar5);
uVar3 = (long)_DAT_0011247c / (long)_DAT_00112484;
lVar10 = (long)(int)uVar3;
uVar6 = ggml_reshape_3d(param_1,uVar6,lVar10,(long)_DAT_00112484,lVar8);
uVar4 = ggml_reshape_3d(param_1,uVar4,lVar10,(long)_DAT_00112488,lVar8);
uVar5 = ggml_reshape_3d(param_1,uVar5,lVar10,(long)_DAT_00112488,lVar8);
uVar6 = ggml_rope_inplace(param_1,uVar6,param_4,uVar3 & 0xffffffff,0);
uVar6 = ggml_permute(param_1,uVar6,0,2,1,3);
uVar6 = ggml_cont(param_1,uVar6);
uVar4 = ggml_rope_inplace(param_1,uVar4,param_4,uVar3 & 0xffffffff,0);
uVar4 = ggml_permute(param_1,uVar4,0,2,1,3);
uVar4 = ggml_cont(param_1,uVar4);
uVar6 = ggml_mul_mat(param_1,uVar4,uVar6);
ggml_mul_mat_set_prec(uVar6,1);
dVar11 = (double)(int)uVar3;
if (dVar11 < _DAT_0010d080) {
dVar11 = sqrt(dVar11);
}
else {
dVar11 = SQRT(dVar11);
}
uVar6 = ggml_scale_inplace((float)(DAT_0010d078 / dVar11),param_1,uVar6);
uVar6 = ggml_diag_mask_inf_inplace(param_1,uVar6,uVar2 & 0xffffffff);
uVar6 = ggml_soft_max_inplace(param_1,uVar6);
uVar5 = ggml_permute(param_1,uVar5,1,2,0,3);
uVar5 = ggml_cont(param_1,uVar5);
uVar5 = ggml_mul_mat(param_1,uVar5,uVar6);
uVar5 = ggml_reshape_3d(param_1,uVar5,lVar10,lVar8,(long)_DAT_00112484);
uVar5 = ggml_permute(param_1,uVar5,0,2,1,3);
uVar5 = ggml_cont_2d(param_1,uVar5,(long)_DAT_0011247c,lVar8);
uVar5 = ggml_mul_mat(param_1,puVar9[5],uVar5);
uVar5 = ggml_mul(param_1,uVar5,puVar9[8]);
uVar4 = ggml_add(param_1,uVar5,auVar12._0_8_);
uVar5 = puVar9[6];
uVar6 = puVar9[7];
uVar7 = ggml_norm(_DAT_00112490,param_1,uVar4);
uVar5 = ggml_mul(param_1,uVar7,uVar5);
uVar5 = ggml_add(param_1,uVar5,uVar6);
uVar5 = ggml_mul_mat(param_1,puVar9[9],uVar5);
uVar5 = ggml_gelu(param_1,uVar5);
uVar5 = ggml_mul_mat(param_1,puVar9[10],uVar5);
uVar5 = ggml_mul(param_1,uVar5,puVar9[0xb]);
auVar12 = ggml_add(param_1,uVar5,uVar4);
param_3 = auVar12._0_8_;
puVar9 = puVar9 + 0xc;
} while (puVar9 != puVar1);
}
return param_3;
}
| |
23,874 | my_strnncoll_czech | eloqsql/strings/ctype-czech.c | static int my_strnncoll_czech(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
int v1, v2;
const uchar *p1, * p2, * store1, * store2;
int pass1 = 0, pass2 = 0;
if (s2_is_prefix && len1 > len2)
len1=len2;
p1 = s1; p2 = s2;
store1 = s1; store2 = s2;
do
{
int diff;
NEXT_CMP_VALUE(s1, p1, store1, pass1, v1, (int)len1);
NEXT_CMP_VALUE(s2, p2, store2, pass2, v2, (int)len2);
if ((diff = v1 - v2))
return diff;
}
while (v1);
return 0;
} | O3 | c | my_strnncoll_czech:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rsi, %r14
cmpq %r8, %rdx
movslq %r8d, %rdi
cmovbq %rdx, %r8
testb %r9b, %r9b
cmoveq %rdx, %r8
movslq %r8d, %rdx
movl $0x1, %ecx
movl $0x1, %esi
subq %r14, %rsi
movq %rsi, -0x68(%rbp)
subq %r12, %rcx
movq %rcx, -0x70(%rbp)
xorl %r15d, %r15d
movq %r12, %rcx
movq %r14, %r13
movq %r12, -0x58(%rbp)
movq $0x0, -0x30(%rbp)
movq %r14, %rsi
movq %r12, -0x50(%rbp)
movq %r13, -0x38(%rbp)
movq %rsi, %r9
subq %r14, %r9
cmpq %rdx, %r9
jge 0x5201a
movslq %r15d, %rax
leaq 0x2bf640(%rip), %r8 # 0x3115e0
movq (%r8,%rax,8), %r9
movzbl (%rsi), %r10d
movzbl (%r9,%r10), %r10d
testl %r10d, %r10d
je 0x51fe8
cmpl $0x2, %r10d
jne 0x52057
incq %rsi
movq %rsi, %r10
subq %r14, %r10
movq %rsi, %rbx
cmpq %rdx, %r10
jge 0x51ff6
movzbl (%rbx), %r11d
cmpb $0x2, (%r9,%r11)
jne 0x51ff6
incq %rbx
incq %r10
movq %rbx, %r11
cmpq %rdx, %r10
jl 0x51fcd
jmp 0x51ff9
incq %rsi
movq %rsi, %r10
subq %r14, %r10
movq %rsi, %rbx
jmp 0x52013
movq %rsi, %r11
cmpl $0x3, %r15d
cmovgeq %r11, %rbx
movq %rbx, %r10
subq %r14, %r10
cmpq %rdx, %r10
jl 0x520df
movq %rbx, %rsi
cmpq %rdx, %r10
jl 0x51fa4
jmp 0x5201d
movq %rsi, %rbx
cmpl $0x3, %r15d
jne 0x52034
xorl %eax, %eax
movl $0x3, %r15d
movq -0x38(%rbp), %r13
movq %rbx, %rsi
jmp 0x5204e
testl %r15d, %r15d
movq %r14, %rsi
movq -0x38(%rbp), %r13
cmoveq %r13, %rsi
leal 0x1(%r15), %r9d
movl $0x1, %eax
movl %r9d, %r15d
movq -0x30(%rbp), %r11
jmp 0x5213a
cmpl $0xff, %r10d
jne 0x520d9
movq %r15, -0x40(%rbp)
movq %rsi, %r9
subq %r14, %r9
movq -0x68(%rbp), %r8
addq %rsi, %r8
movq %r8, -0x60(%rbp)
xorl %r10d, %r10d
movq %r10, %r11
shlq $0x4, %r11
leaq 0x2bf57a(%rip), %r8 # 0x311600
movq (%r11,%r8), %rbx
movb (%rbx), %r12b
testb %r12b, %r12b
je 0x520c3
cmpq %rdx, %r9
jge 0x520c3
incq %rbx
movq -0x60(%rbp), %r15
movq %rsi, %r13
cmpb %r12b, (%r13)
jne 0x520cb
incq %r13
movb (%rbx), %r12b
testb %r12b, %r12b
je 0x520c6
incq %rbx
leaq 0x1(%r15), %r8
cmpq %rdx, %r15
movq %r8, %r15
jl 0x520a1
jmp 0x520c6
movq %rsi, %r13
testb %r12b, %r12b
je 0x5210b
incq %r10
cmpq $0x50, %r10
jne 0x52078
movb $-0x1, %r10b
jmp 0x52123
movq -0x30(%rbp), %r11
jmp 0x5212f
movl $0x2, %eax
cmpl $0x1, %r15d
movq -0x30(%rbp), %r11
jle 0x520f7
movq -0x38(%rbp), %r13
movq %rbx, %rsi
jmp 0x5213a
movl $0x1, %esi
subl %r15d, %esi
movq %rbx, %r13
movl %esi, %r15d
movq -0x38(%rbp), %rsi
jmp 0x5213a
leaq 0x2bf4ee(%rip), %rsi # 0x311600
addq %rsi, %r11
movq 0x8(%r11), %rsi
movb (%rsi,%rax), %r10b
decq %r13
movq %r13, %rsi
movq -0x40(%rbp), %r15
movq -0x30(%rbp), %r11
movq -0x50(%rbp), %r12
movq -0x38(%rbp), %r13
movzbl %r10b, %eax
incq %rsi
movq %rcx, %r8
subq %r12, %r8
cmpq %rdi, %r8
jge 0x521d1
movslq %r11d, %r9
leaq 0x2bf48d(%rip), %r8 # 0x3115e0
movq %r9, -0x60(%rbp)
movq (%r8,%r9,8), %rbx
movzbl (%rcx), %r8d
movzbl (%rbx,%r8), %r8d
testl %r8d, %r8d
je 0x5219f
cmpl $0x2, %r8d
jne 0x5220c
incq %rcx
movq %rcx, %r8
subq %r12, %r8
movq %rcx, %r10
cmpq %rdi, %r8
jge 0x521ad
movzbl (%r10), %r9d
cmpb $0x2, (%rbx,%r9)
jne 0x521ad
incq %r10
incq %r8
movq %r10, %r9
cmpq %rdi, %r8
jl 0x52184
jmp 0x521b0
incq %rcx
movq %rcx, %r8
subq %r12, %r8
movq %rcx, %r10
jmp 0x521ca
movq %rcx, %r9
cmpl $0x3, %r11d
cmovgeq %r9, %r10
movq %r10, %r8
subq %r12, %r8
cmpq %rdi, %r8
jl 0x522a4
movq %r10, %rcx
cmpq %rdi, %r8
jl 0x5215b
jmp 0x521d4
movq %rcx, %r10
cmpl $0x3, %r11d
jne 0x521ee
xorl %r11d, %r11d
movl $0x3, %ecx
movq %rcx, -0x30(%rbp)
movq %r10, %rcx
jmp 0x522fd
testl %r11d, %r11d
leal 0x1(%r11), %r8d
movq %r12, %rcx
cmoveq -0x58(%rbp), %rcx
movl $0x1, %r11d
movq %r8, -0x30(%rbp)
jmp 0x522fd
cmpl $0xff, %r8d
jne 0x522f6
movq %r13, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movq %rcx, %rax
subq %r12, %rax
movq -0x70(%rbp), %r8
addq %rcx, %r8
movq %r8, -0x38(%rbp)
xorl %r11d, %r11d
movq %r15, %rbx
movq %r11, %r8
shlq $0x4, %r8
leaq 0x2bf3bb(%rip), %r9 # 0x311600
movq (%r8,%r9), %r13
movb (%r13), %r9b
testb %r9b, %r9b
je 0x52284
cmpq %rdi, %rax
jge 0x52284
incq %r13
movq -0x38(%rbp), %r15
movq %rcx, %r12
cmpb %r9b, (%r12)
jne 0x5228c
incq %r12
movb (%r13), %r9b
testb %r9b, %r9b
je 0x52287
incq %r13
leaq 0x1(%r15), %r10
cmpq %rdi, %r15
movq %r10, %r15
jl 0x52261
jmp 0x52287
movq %rcx, %r12
testb %r9b, %r9b
je 0x522cc
incq %r11
cmpq $0x50, %r11
movq -0x50(%rbp), %r12
jne 0x52237
movq %rbx, %r15
movb $-0x1, %r8b
movl -0x44(%rbp), %eax
jmp 0x522f2
movq %r11, %rcx
movl $0x2, %r11d
cmpl $0x1, %ecx
jg 0x521e6
movl $0x1, %r8d
subl %ecx, %r8d
movq -0x58(%rbp), %rcx
movq %r10, -0x58(%rbp)
jmp 0x52203
leaq 0x2bf32d(%rip), %rcx # 0x311600
addq %rcx, %r8
movq 0x8(%r8), %rcx
movq -0x60(%rbp), %r8
movb (%rcx,%r8), %r8b
decq %r12
movq %r12, %rcx
movq %rbx, %r15
movl -0x44(%rbp), %eax
movq -0x50(%rbp), %r12
movq -0x40(%rbp), %r13
movzbl %r8b, %r11d
incq %rcx
testl %eax, %eax
je 0x5230a
cmpl %r11d, %eax
je 0x51f83
subl %r11d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnncoll_czech:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r12, rcx
mov r14, rsi
cmp rdx, r8
movsxd rdi, r8d
cmovb r8, rdx
test r9b, r9b
cmovz r8, rdx
movsxd rdx, r8d
mov ecx, 1
mov esi, 1
sub rsi, r14
mov [rbp+var_68], rsi
sub rcx, r12
mov [rbp+var_70], rcx
xor r15d, r15d
mov rcx, r12
mov r13, r14
mov [rbp+var_58], r12
mov [rbp+var_30], 0
mov rsi, r14
mov [rbp+var_50], r12
loc_51F83:
mov [rbp+var_38], r13
mov r9, rsi
sub r9, r14
cmp r9, rdx
jge loc_5201A
movsxd rax, r15d
lea r8, CZ_SORT_TABLE
mov r9, [r8+rax*8]
loc_51FA4:
movzx r10d, byte ptr [rsi]
movzx r10d, byte ptr [r9+r10]
test r10d, r10d
jz short loc_51FE8
cmp r10d, 2
jnz loc_52057
inc rsi
mov r10, rsi
sub r10, r14
mov rbx, rsi
cmp r10, rdx
jge short loc_51FF6
loc_51FCD:
movzx r11d, byte ptr [rbx]
cmp byte ptr [r9+r11], 2
jnz short loc_51FF6
inc rbx
inc r10
mov r11, rbx
cmp r10, rdx
jl short loc_51FCD
jmp short loc_51FF9
loc_51FE8:
inc rsi
mov r10, rsi
sub r10, r14
mov rbx, rsi
jmp short loc_52013
loc_51FF6:
mov r11, rsi
loc_51FF9:
cmp r15d, 3
cmovge rbx, r11
mov r10, rbx
sub r10, r14
cmp r10, rdx
jl loc_520DF
mov rsi, rbx
loc_52013:
cmp r10, rdx
jl short loc_51FA4
jmp short loc_5201D
loc_5201A:
mov rbx, rsi
loc_5201D:
cmp r15d, 3
jnz short loc_52034
xor eax, eax
mov r15d, 3
mov r13, [rbp+var_38]
mov rsi, rbx
jmp short loc_5204E
loc_52034:
test r15d, r15d
mov rsi, r14
mov r13, [rbp+var_38]
cmovz rsi, r13
lea r9d, [r15+1]
mov eax, 1
mov r15d, r9d
loc_5204E:
mov r11, [rbp+var_30]
jmp loc_5213A
loc_52057:
cmp r10d, 0FFh
jnz short loc_520D9
mov [rbp+var_40], r15
mov r9, rsi
sub r9, r14
mov r8, [rbp+var_68]
add r8, rsi
mov [rbp+var_60], r8
xor r10d, r10d
loc_52078:
mov r11, r10
shl r11, 4
lea r8, doubles
mov rbx, [r11+r8]
mov r12b, [rbx]
test r12b, r12b
jz short loc_520C3
cmp r9, rdx
jge short loc_520C3
inc rbx
mov r15, [rbp+var_60]
mov r13, rsi
loc_520A1:
cmp [r13+0], r12b
jnz short loc_520CB
inc r13
mov r12b, [rbx]
test r12b, r12b
jz short loc_520C6
inc rbx
lea r8, [r15+1]
cmp r15, rdx
mov r15, r8
jl short loc_520A1
jmp short loc_520C6
loc_520C3:
mov r13, rsi
loc_520C6:
test r12b, r12b
jz short loc_5210B
loc_520CB:
inc r10
cmp r10, 50h ; 'P'
jnz short loc_52078
mov r10b, 0FFh
jmp short loc_52123
loc_520D9:
mov r11, [rbp+var_30]
jmp short loc_5212F
loc_520DF:
mov eax, 2
cmp r15d, 1
mov r11, [rbp+var_30]
jle short loc_520F7
mov r13, [rbp+var_38]
mov rsi, rbx
jmp short loc_5213A
loc_520F7:
mov esi, 1
sub esi, r15d
mov r13, rbx
mov r15d, esi
mov rsi, [rbp+var_38]
jmp short loc_5213A
loc_5210B:
lea rsi, doubles
add r11, rsi
mov rsi, [r11+8]
mov r10b, [rsi+rax]
dec r13
mov rsi, r13
loc_52123:
mov r15, [rbp+var_40]
mov r11, [rbp+var_30]
mov r12, [rbp+var_50]
loc_5212F:
mov r13, [rbp+var_38]
movzx eax, r10b
inc rsi
loc_5213A:
mov r8, rcx
sub r8, r12
cmp r8, rdi
jge loc_521D1
movsxd r9, r11d
lea r8, CZ_SORT_TABLE
mov [rbp+var_60], r9
mov rbx, [r8+r9*8]
loc_5215B:
movzx r8d, byte ptr [rcx]
movzx r8d, byte ptr [rbx+r8]
test r8d, r8d
jz short loc_5219F
cmp r8d, 2
jnz loc_5220C
inc rcx
mov r8, rcx
sub r8, r12
mov r10, rcx
cmp r8, rdi
jge short loc_521AD
loc_52184:
movzx r9d, byte ptr [r10]
cmp byte ptr [rbx+r9], 2
jnz short loc_521AD
inc r10
inc r8
mov r9, r10
cmp r8, rdi
jl short loc_52184
jmp short loc_521B0
loc_5219F:
inc rcx
mov r8, rcx
sub r8, r12
mov r10, rcx
jmp short loc_521CA
loc_521AD:
mov r9, rcx
loc_521B0:
cmp r11d, 3
cmovge r10, r9
mov r8, r10
sub r8, r12
cmp r8, rdi
jl loc_522A4
mov rcx, r10
loc_521CA:
cmp r8, rdi
jl short loc_5215B
jmp short loc_521D4
loc_521D1:
mov r10, rcx
loc_521D4:
cmp r11d, 3
jnz short loc_521EE
xor r11d, r11d
mov ecx, 3
mov [rbp+var_30], rcx
loc_521E6:
mov rcx, r10
jmp loc_522FD
loc_521EE:
test r11d, r11d
lea r8d, [r11+1]
mov rcx, r12
cmovz rcx, [rbp+var_58]
mov r11d, 1
loc_52203:
mov [rbp+var_30], r8
jmp loc_522FD
loc_5220C:
cmp r8d, 0FFh
jnz loc_522F6
mov [rbp+var_40], r13
mov [rbp+var_44], eax
mov rax, rcx
sub rax, r12
mov r8, [rbp+var_70]
add r8, rcx
mov [rbp+var_38], r8
xor r11d, r11d
mov rbx, r15
loc_52237:
mov r8, r11
shl r8, 4
lea r9, doubles
mov r13, [r8+r9]
mov r9b, [r13+0]
test r9b, r9b
jz short loc_52284
cmp rax, rdi
jge short loc_52284
inc r13
mov r15, [rbp+var_38]
mov r12, rcx
loc_52261:
cmp [r12], r9b
jnz short loc_5228C
inc r12
mov r9b, [r13+0]
test r9b, r9b
jz short loc_52287
inc r13
lea r10, [r15+1]
cmp r15, rdi
mov r15, r10
jl short loc_52261
jmp short loc_52287
loc_52284:
mov r12, rcx
loc_52287:
test r9b, r9b
jz short loc_522CC
loc_5228C:
inc r11
cmp r11, 50h ; 'P'
mov r12, [rbp+var_50]
jnz short loc_52237
mov r15, rbx
mov r8b, 0FFh
mov eax, [rbp+var_44]
jmp short loc_522F2
loc_522A4:
mov rcx, r11
mov r11d, 2
cmp ecx, 1
jg loc_521E6
mov r8d, 1
sub r8d, ecx
mov rcx, [rbp+var_58]
mov [rbp+var_58], r10
jmp loc_52203
loc_522CC:
lea rcx, doubles
add r8, rcx
mov rcx, [r8+8]
mov r8, [rbp+var_60]
mov r8b, [rcx+r8]
dec r12
mov rcx, r12
mov r15, rbx
mov eax, [rbp+var_44]
mov r12, [rbp+var_50]
loc_522F2:
mov r13, [rbp+var_40]
loc_522F6:
movzx r11d, r8b
inc rcx
loc_522FD:
test eax, eax
jz short loc_5230A
cmp eax, r11d
jz loc_51F83
loc_5230A:
sub eax, r11d
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnncoll_czech(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
unsigned __int8 *v6; // r12
unsigned __int8 *v7; // r14
long long v8; // rdi
long long v9; // rdx
long long v10; // r15
unsigned __int8 *v11; // r13
long long v12; // rax
long long v13; // r9
long long v14; // r10
unsigned __int8 *v15; // rsi
long long v16; // r10
unsigned __int8 *v17; // rbx
unsigned __int8 *v18; // r11
unsigned __int8 *v19; // r10
int v20; // eax
int v21; // r11d
char *v22; // rbx
char v23; // r12
char *v24; // rbx
unsigned __int8 *v25; // r15
_BYTE *v26; // r13
bool v27; // cc
long long v28; // rbx
int v29; // r8d
unsigned __int8 *v30; // rcx
long long v31; // r8
unsigned __int8 *v32; // r10
unsigned __int8 *v33; // r9
unsigned __int8 *v34; // r8
int v35; // r11d
int v36; // r8d
unsigned __int8 *v37; // rax
long long v38; // r11
long long v39; // rbx
char *v40; // r13
char v41; // r9
char *v42; // r13
unsigned __int8 *v43; // r15
_BYTE *v44; // r12
int v45; // ecx
long long v47; // [rsp+0h] [rbp-70h]
long long v48; // [rsp+8h] [rbp-68h]
long long v49; // [rsp+10h] [rbp-60h]
unsigned __int8 *v50; // [rsp+18h] [rbp-58h]
unsigned __int8 *v51; // [rsp+20h] [rbp-50h]
int v52; // [rsp+2Ch] [rbp-44h]
long long v53; // [rsp+30h] [rbp-40h]
unsigned __int8 *v54; // [rsp+30h] [rbp-40h]
unsigned __int8 *v55; // [rsp+38h] [rbp-38h]
int v56; // [rsp+40h] [rbp-30h]
v6 = a4;
v7 = a2;
v8 = (int)a5;
if ( a3 < a5 )
LODWORD(a5) = a3;
if ( !a6 )
LODWORD(a5) = a3;
v9 = (int)a5;
v48 = 1LL - (_QWORD)a2;
v47 = 1LL - (_QWORD)a4;
v10 = 0LL;
v11 = a2;
v50 = a4;
v56 = 0;
v51 = a4;
do
{
v55 = v11;
if ( a2 - v7 >= v9 )
{
v17 = a2;
LABEL_23:
if ( (_DWORD)v10 == 3 )
{
v20 = 0;
v10 = 3LL;
a2 = v17;
}
else
{
a2 = v7;
if ( !(_DWORD)v10 )
a2 = v11;
v20 = 1;
v10 = (unsigned int)(v10 + 1);
}
v21 = v56;
goto LABEL_49;
}
v12 = (int)v10;
v13 = (long long)*(&CZ_SORT_TABLE + (int)v10);
while ( 1 )
{
LODWORD(v14) = *(unsigned __int8 *)(v13 + *a2);
if ( *(_BYTE *)(v13 + *a2) )
break;
v19 = (unsigned __int8 *)(++a2 - v7);
v17 = a2;
LABEL_20:
if ( (long long)v19 >= v9 )
goto LABEL_23;
}
if ( (_DWORD)v14 == 2 )
{
v15 = a2 + 1;
v16 = v15 - v7;
v17 = v15;
if ( v15 - v7 < v9 )
{
while ( *(_BYTE *)(v13 + *v17) == 2 )
{
++v17;
++v16;
v18 = v17;
if ( v16 >= v9 )
goto LABEL_16;
}
}
v18 = v15;
LABEL_16:
if ( (int)v10 >= 3 )
v17 = v18;
v19 = (unsigned __int8 *)(v17 - v7);
if ( v17 - v7 < v9 )
{
v20 = 2;
v21 = v56;
if ( (int)v10 <= 1 )
{
v11 = v17;
v10 = (unsigned int)(1 - v10);
a2 = v55;
}
else
{
a2 = v17;
}
goto LABEL_49;
}
a2 = v17;
goto LABEL_20;
}
if ( (_DWORD)v14 != 255 )
{
v21 = v56;
goto LABEL_48;
}
v53 = v10;
v14 = 0LL;
while ( 2 )
{
v22 = (char *)*(&doubles + 2 * v14);
v23 = *v22;
if ( *v22 && a2 - v7 < v9 )
{
v24 = v22 + 1;
v25 = &a2[v48];
v26 = a2;
while ( *v26 == v23 )
{
++v26;
v23 = *v24;
if ( *v24 )
{
++v24;
v27 = (long long)v25++ < v9;
if ( v27 )
continue;
}
goto LABEL_39;
}
goto LABEL_40;
}
v26 = a2;
LABEL_39:
if ( v23 )
{
LABEL_40:
if ( ++v14 == 80 )
{
LOBYTE(v14) = -1;
goto LABEL_47;
}
continue;
}
break;
}
LOBYTE(v14) = *((_BYTE *)*(&doubles + 2 * v14 + 1) + v12);
a2 = v26 - 1;
LABEL_47:
v10 = v53;
v21 = v56;
v6 = v51;
LABEL_48:
v11 = v55;
v20 = (unsigned __int8)v14;
++a2;
LABEL_49:
if ( a4 - v6 >= v8 )
{
v32 = a4;
LABEL_66:
if ( v21 != 3 )
{
v36 = v21 + 1;
a4 = v6;
if ( !v21 )
a4 = v50;
v35 = 1;
goto LABEL_72;
}
v35 = 0;
v56 = 3;
LABEL_68:
a4 = v32;
continue;
}
v49 = v21;
v28 = (long long)*(&CZ_SORT_TABLE + v21);
while ( 2 )
{
v29 = *(unsigned __int8 *)(v28 + *a4);
if ( !*(_BYTE *)(v28 + *a4) )
{
v34 = (unsigned __int8 *)(++a4 - v6);
v32 = a4;
LABEL_63:
if ( (long long)v34 >= v8 )
goto LABEL_66;
continue;
}
break;
}
if ( v29 == 2 )
{
v30 = a4 + 1;
v31 = v30 - v6;
v32 = v30;
if ( v30 - v6 < v8 )
{
while ( *(_BYTE *)(v28 + *v32) == 2 )
{
++v32;
++v31;
v33 = v32;
if ( v31 >= v8 )
goto LABEL_59;
}
}
v33 = v30;
LABEL_59:
if ( v21 >= 3 )
v32 = v33;
v34 = (unsigned __int8 *)(v32 - v6);
if ( v32 - v6 < v8 )
{
v45 = v21;
v35 = 2;
if ( v45 <= 1 )
{
v36 = 1 - v45;
a4 = v50;
v50 = v32;
LABEL_72:
v56 = v36;
continue;
}
goto LABEL_68;
}
a4 = v32;
goto LABEL_63;
}
if ( v29 != 255 )
goto LABEL_90;
v54 = v11;
v52 = v20;
v37 = (unsigned __int8 *)(a4 - v6);
v38 = 0LL;
v39 = v10;
while ( 2 )
{
v40 = (char *)*(&doubles + 2 * v38);
v41 = *v40;
if ( *v40 && (long long)v37 < v8 )
{
v42 = v40 + 1;
v43 = &a4[v47];
v44 = a4;
while ( *v44 == v41 )
{
++v44;
v41 = *v42;
if ( *v42 )
{
++v42;
v27 = (long long)v43++ < v8;
if ( v27 )
continue;
}
goto LABEL_83;
}
goto LABEL_84;
}
v44 = a4;
LABEL_83:
if ( v41 )
{
LABEL_84:
++v38;
v6 = v51;
if ( v38 == 80 )
{
v10 = v39;
LOBYTE(v29) = -1;
v20 = v52;
goto LABEL_89;
}
continue;
}
break;
}
LOBYTE(v29) = *((_BYTE *)*(&doubles + 2 * v38 + 1) + v49);
a4 = v44 - 1;
v10 = v39;
v20 = v52;
v6 = v51;
LABEL_89:
v11 = v54;
LABEL_90:
v35 = (unsigned __int8)v29;
++a4;
}
while ( v20 && v20 == v35 );
return (unsigned int)(v20 - v35);
}
| my_strnncoll_czech:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RCX
MOV R14,RSI
CMP RDX,R8
MOVSXD RDI,R8D
CMOVC R8,RDX
TEST R9B,R9B
CMOVZ R8,RDX
MOVSXD RDX,R8D
MOV ECX,0x1
MOV ESI,0x1
SUB RSI,R14
MOV qword ptr [RBP + -0x68],RSI
SUB RCX,R12
MOV qword ptr [RBP + -0x70],RCX
XOR R15D,R15D
MOV RCX,R12
MOV R13,R14
MOV qword ptr [RBP + -0x58],R12
MOV qword ptr [RBP + -0x30],0x0
MOV RSI,R14
MOV qword ptr [RBP + -0x50],R12
LAB_00151f83:
MOV qword ptr [RBP + -0x38],R13
MOV R9,RSI
SUB R9,R14
CMP R9,RDX
JGE 0x0015201a
MOVSXD RAX,R15D
LEA R8,[0x4115e0]
MOV R9,qword ptr [R8 + RAX*0x8]
LAB_00151fa4:
MOVZX R10D,byte ptr [RSI]
MOVZX R10D,byte ptr [R9 + R10*0x1]
TEST R10D,R10D
JZ 0x00151fe8
CMP R10D,0x2
JNZ 0x00152057
INC RSI
MOV R10,RSI
SUB R10,R14
MOV RBX,RSI
CMP R10,RDX
JGE 0x00151ff6
LAB_00151fcd:
MOVZX R11D,byte ptr [RBX]
CMP byte ptr [R9 + R11*0x1],0x2
JNZ 0x00151ff6
INC RBX
INC R10
MOV R11,RBX
CMP R10,RDX
JL 0x00151fcd
JMP 0x00151ff9
LAB_00151fe8:
INC RSI
MOV R10,RSI
SUB R10,R14
MOV RBX,RSI
JMP 0x00152013
LAB_00151ff6:
MOV R11,RSI
LAB_00151ff9:
CMP R15D,0x3
CMOVGE RBX,R11
MOV R10,RBX
SUB R10,R14
CMP R10,RDX
JL 0x001520df
MOV RSI,RBX
LAB_00152013:
CMP R10,RDX
JL 0x00151fa4
JMP 0x0015201d
LAB_0015201a:
MOV RBX,RSI
LAB_0015201d:
CMP R15D,0x3
JNZ 0x00152034
XOR EAX,EAX
MOV R15D,0x3
MOV R13,qword ptr [RBP + -0x38]
MOV RSI,RBX
JMP 0x0015204e
LAB_00152034:
TEST R15D,R15D
MOV RSI,R14
MOV R13,qword ptr [RBP + -0x38]
CMOVZ RSI,R13
LEA R9D,[R15 + 0x1]
MOV EAX,0x1
MOV R15D,R9D
LAB_0015204e:
MOV R11,qword ptr [RBP + -0x30]
JMP 0x0015213a
LAB_00152057:
CMP R10D,0xff
JNZ 0x001520d9
MOV qword ptr [RBP + -0x40],R15
MOV R9,RSI
SUB R9,R14
MOV R8,qword ptr [RBP + -0x68]
ADD R8,RSI
MOV qword ptr [RBP + -0x60],R8
XOR R10D,R10D
LAB_00152078:
MOV R11,R10
SHL R11,0x4
LEA R8,[0x411600]
MOV RBX,qword ptr [R11 + R8*0x1]
MOV R12B,byte ptr [RBX]
TEST R12B,R12B
JZ 0x001520c3
CMP R9,RDX
JGE 0x001520c3
INC RBX
MOV R15,qword ptr [RBP + -0x60]
MOV R13,RSI
LAB_001520a1:
CMP byte ptr [R13],R12B
JNZ 0x001520cb
INC R13
MOV R12B,byte ptr [RBX]
TEST R12B,R12B
JZ 0x001520c6
INC RBX
LEA R8,[R15 + 0x1]
CMP R15,RDX
MOV R15,R8
JL 0x001520a1
JMP 0x001520c6
LAB_001520c3:
MOV R13,RSI
LAB_001520c6:
TEST R12B,R12B
JZ 0x0015210b
LAB_001520cb:
INC R10
CMP R10,0x50
JNZ 0x00152078
MOV R10B,0xff
JMP 0x00152123
LAB_001520d9:
MOV R11,qword ptr [RBP + -0x30]
JMP 0x0015212f
LAB_001520df:
MOV EAX,0x2
CMP R15D,0x1
MOV R11,qword ptr [RBP + -0x30]
JLE 0x001520f7
MOV R13,qword ptr [RBP + -0x38]
MOV RSI,RBX
JMP 0x0015213a
LAB_001520f7:
MOV ESI,0x1
SUB ESI,R15D
MOV R13,RBX
MOV R15D,ESI
MOV RSI,qword ptr [RBP + -0x38]
JMP 0x0015213a
LAB_0015210b:
LEA RSI,[0x411600]
ADD R11,RSI
MOV RSI,qword ptr [R11 + 0x8]
MOV R10B,byte ptr [RSI + RAX*0x1]
DEC R13
MOV RSI,R13
LAB_00152123:
MOV R15,qword ptr [RBP + -0x40]
MOV R11,qword ptr [RBP + -0x30]
MOV R12,qword ptr [RBP + -0x50]
LAB_0015212f:
MOV R13,qword ptr [RBP + -0x38]
MOVZX EAX,R10B
INC RSI
LAB_0015213a:
MOV R8,RCX
SUB R8,R12
CMP R8,RDI
JGE 0x001521d1
MOVSXD R9,R11D
LEA R8,[0x4115e0]
MOV qword ptr [RBP + -0x60],R9
MOV RBX,qword ptr [R8 + R9*0x8]
LAB_0015215b:
MOVZX R8D,byte ptr [RCX]
MOVZX R8D,byte ptr [RBX + R8*0x1]
TEST R8D,R8D
JZ 0x0015219f
CMP R8D,0x2
JNZ 0x0015220c
INC RCX
MOV R8,RCX
SUB R8,R12
MOV R10,RCX
CMP R8,RDI
JGE 0x001521ad
LAB_00152184:
MOVZX R9D,byte ptr [R10]
CMP byte ptr [RBX + R9*0x1],0x2
JNZ 0x001521ad
INC R10
INC R8
MOV R9,R10
CMP R8,RDI
JL 0x00152184
JMP 0x001521b0
LAB_0015219f:
INC RCX
MOV R8,RCX
SUB R8,R12
MOV R10,RCX
JMP 0x001521ca
LAB_001521ad:
MOV R9,RCX
LAB_001521b0:
CMP R11D,0x3
CMOVGE R10,R9
MOV R8,R10
SUB R8,R12
CMP R8,RDI
JL 0x001522a4
MOV RCX,R10
LAB_001521ca:
CMP R8,RDI
JL 0x0015215b
JMP 0x001521d4
LAB_001521d1:
MOV R10,RCX
LAB_001521d4:
CMP R11D,0x3
JNZ 0x001521ee
XOR R11D,R11D
MOV ECX,0x3
MOV qword ptr [RBP + -0x30],RCX
LAB_001521e6:
MOV RCX,R10
JMP 0x001522fd
LAB_001521ee:
TEST R11D,R11D
LEA R8D,[R11 + 0x1]
MOV RCX,R12
CMOVZ RCX,qword ptr [RBP + -0x58]
MOV R11D,0x1
LAB_00152203:
MOV qword ptr [RBP + -0x30],R8
JMP 0x001522fd
LAB_0015220c:
CMP R8D,0xff
JNZ 0x001522f6
MOV qword ptr [RBP + -0x40],R13
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,RCX
SUB RAX,R12
MOV R8,qword ptr [RBP + -0x70]
ADD R8,RCX
MOV qword ptr [RBP + -0x38],R8
XOR R11D,R11D
MOV RBX,R15
LAB_00152237:
MOV R8,R11
SHL R8,0x4
LEA R9,[0x411600]
MOV R13,qword ptr [R8 + R9*0x1]
MOV R9B,byte ptr [R13]
TEST R9B,R9B
JZ 0x00152284
CMP RAX,RDI
JGE 0x00152284
INC R13
MOV R15,qword ptr [RBP + -0x38]
MOV R12,RCX
LAB_00152261:
CMP byte ptr [R12],R9B
JNZ 0x0015228c
INC R12
MOV R9B,byte ptr [R13]
TEST R9B,R9B
JZ 0x00152287
INC R13
LEA R10,[R15 + 0x1]
CMP R15,RDI
MOV R15,R10
JL 0x00152261
JMP 0x00152287
LAB_00152284:
MOV R12,RCX
LAB_00152287:
TEST R9B,R9B
JZ 0x001522cc
LAB_0015228c:
INC R11
CMP R11,0x50
MOV R12,qword ptr [RBP + -0x50]
JNZ 0x00152237
MOV R15,RBX
MOV R8B,0xff
MOV EAX,dword ptr [RBP + -0x44]
JMP 0x001522f2
LAB_001522a4:
MOV RCX,R11
MOV R11D,0x2
CMP ECX,0x1
JG 0x001521e6
MOV R8D,0x1
SUB R8D,ECX
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],R10
JMP 0x00152203
LAB_001522cc:
LEA RCX,[0x411600]
ADD R8,RCX
MOV RCX,qword ptr [R8 + 0x8]
MOV R8,qword ptr [RBP + -0x60]
MOV R8B,byte ptr [RCX + R8*0x1]
DEC R12
MOV RCX,R12
MOV R15,RBX
MOV EAX,dword ptr [RBP + -0x44]
MOV R12,qword ptr [RBP + -0x50]
LAB_001522f2:
MOV R13,qword ptr [RBP + -0x40]
LAB_001522f6:
MOVZX R11D,R8B
INC RCX
LAB_001522fd:
TEST EAX,EAX
JZ 0x0015230a
CMP EAX,R11D
JZ 0x00151f83
LAB_0015230a:
SUB EAX,R11D
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_strnncoll_czech(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
byte *pbVar1;
byte *pbVar2;
byte *pbVar3;
long lVar4;
byte *pbVar5;
byte *pbVar6;
long lVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
long lVar12;
byte *pbVar13;
byte bVar14;
byte *pbVar15;
byte *pbVar16;
byte *local_60;
lVar7 = (long)(int)param_5;
if (param_3 < param_5) {
param_5 = param_3;
}
iVar8 = (int)param_5;
if (param_6 == '\0') {
iVar8 = (int)param_3;
}
lVar4 = (long)iVar8;
iVar10 = 0;
iVar8 = 0;
pbVar13 = param_4;
pbVar6 = param_2;
pbVar16 = param_2;
local_60 = param_4;
LAB_00151f83:
if ((long)pbVar6 - (long)param_2 < lVar4) {
do {
bVar14 = (&CZ_SORT_TABLE)[iVar10][*pbVar6];
uVar11 = (uint)bVar14;
if (bVar14 == 0) {
lVar12 = (long)(pbVar6 + 1) - (long)param_2;
pbVar6 = pbVar6 + 1;
}
else {
if (bVar14 != 2) {
if (bVar14 != 0xff) goto LAB_0015212f;
lVar12 = 0;
goto LAB_00152078;
}
pbVar6 = pbVar6 + 1;
lVar12 = (long)pbVar6 - (long)param_2;
pbVar5 = pbVar6;
while ((pbVar15 = pbVar5, lVar12 < lVar4 &&
(pbVar15 = pbVar6, (&CZ_SORT_TABLE)[iVar10][*pbVar5] == '\x02'))) {
pbVar5 = pbVar5 + 1;
lVar12 = lVar12 + 1;
}
if (2 < iVar10) {
pbVar5 = pbVar15;
}
lVar12 = (long)pbVar5 - (long)param_2;
pbVar6 = pbVar5;
if (lVar12 < lVar4) {
uVar11 = 2;
if (iVar10 < 2) {
iVar10 = 1 - iVar10;
pbVar6 = pbVar16;
pbVar16 = pbVar5;
}
goto LAB_0015213a;
}
}
} while (lVar12 < lVar4);
}
if (iVar10 == 3) {
uVar11 = 0;
iVar10 = 3;
}
else {
pbVar6 = param_2;
if (iVar10 == 0) {
pbVar6 = pbVar16;
}
iVar10 = iVar10 + 1;
uVar11 = 1;
}
goto LAB_0015213a;
LAB_00152078:
do {
pbVar5 = (&doubles)[lVar12 * 2];
bVar14 = *pbVar5;
pbVar15 = pbVar6;
pbVar3 = pbVar6 + (1 - (long)param_2);
pbVar2 = pbVar6 + -(long)param_2;
if (bVar14 != 0) {
while (pbVar1 = pbVar3, (long)pbVar2 < lVar4) {
pbVar5 = pbVar5 + 1;
if (*pbVar15 != bVar14) goto LAB_001520cb;
pbVar15 = pbVar15 + 1;
bVar14 = *pbVar5;
if (bVar14 == 0) break;
pbVar3 = pbVar1 + 1;
pbVar2 = pbVar1;
}
}
if (bVar14 == 0) {
uVar11 = (uint)(byte)(&PTR_DAT_00411608)[lVar12 * 2][iVar10];
pbVar6 = pbVar15 + -1;
goto LAB_0015212f;
}
LAB_001520cb:
lVar12 = lVar12 + 1;
} while (lVar12 != 0x50);
uVar11 = 0xff;
LAB_0015212f:
pbVar6 = pbVar6 + 1;
LAB_0015213a:
if ((long)pbVar13 - (long)param_4 < lVar7) {
do {
bVar14 = (&CZ_SORT_TABLE)[iVar8][*pbVar13];
uVar9 = (uint)bVar14;
if (bVar14 == 0) {
pbVar13 = pbVar13 + 1;
lVar12 = (long)pbVar13 - (long)param_4;
}
else {
if (bVar14 != 2) {
if (bVar14 != 0xff) goto LAB_001522f6;
lVar12 = 0;
goto LAB_00152237;
}
pbVar5 = pbVar13 + 1;
lVar12 = (long)pbVar5 - (long)param_4;
pbVar13 = pbVar5;
while ((pbVar15 = pbVar13, lVar12 < lVar7 &&
(pbVar15 = pbVar5, (&CZ_SORT_TABLE)[iVar8][*pbVar13] == '\x02'))) {
pbVar13 = pbVar13 + 1;
lVar12 = lVar12 + 1;
}
if (2 < iVar8) {
pbVar13 = pbVar15;
}
lVar12 = (long)pbVar13 - (long)param_4;
if (lVar12 < lVar7) {
uVar9 = 2;
if (1 < iVar8) goto LAB_001522fd;
iVar8 = -iVar8;
pbVar5 = local_60;
local_60 = pbVar13;
goto LAB_00152203;
}
}
} while (lVar12 < lVar7);
}
if (iVar8 == 3) {
uVar9 = 0;
iVar8 = 3;
}
else {
pbVar5 = param_4;
if (iVar8 == 0) {
pbVar5 = local_60;
}
uVar9 = 1;
LAB_00152203:
iVar8 = iVar8 + 1;
pbVar13 = pbVar5;
}
LAB_001522fd:
if ((uVar11 == 0) || (uVar11 != uVar9)) {
return uVar11 - uVar9;
}
goto LAB_00151f83;
LAB_00152237:
do {
pbVar5 = (&doubles)[lVar12 * 2];
bVar14 = *pbVar5;
pbVar15 = pbVar13;
pbVar3 = pbVar13 + (1 - (long)param_4);
pbVar2 = pbVar13 + -(long)param_4;
if (bVar14 != 0) {
while (pbVar1 = pbVar3, (long)pbVar2 < lVar7) {
pbVar5 = pbVar5 + 1;
if (*pbVar15 != bVar14) goto LAB_0015228c;
pbVar15 = pbVar15 + 1;
bVar14 = *pbVar5;
if (bVar14 == 0) break;
pbVar3 = pbVar1 + 1;
pbVar2 = pbVar1;
}
}
if (bVar14 == 0) {
uVar9 = (uint)(byte)(&PTR_DAT_00411608)[lVar12 * 2][iVar8];
pbVar13 = pbVar15 + -1;
goto LAB_001522f6;
}
LAB_0015228c:
lVar12 = lVar12 + 1;
} while (lVar12 != 0x50);
uVar9 = 0xff;
LAB_001522f6:
pbVar13 = pbVar13 + 1;
goto LAB_001522fd;
}
| |
23,875 | String::append(char const*, unsigned long) | eloqsql/sql/sql_string.cc | bool String::append(const char *s,size_t size)
{
DBUG_ASSERT(size <= UINT_MAX32); // cast to uint32 is safe
uint32 arg_length= (uint32) size;
if (!arg_length)
return FALSE;
/*
For an ASCII incompatible string, e.g. UCS-2, we need to convert
*/
if (mbminlen() > 1)
{
uint32 add_length= arg_length * mbmaxlen();
uint dummy_errors;
if (realloc_with_extra_if_needed(str_length+ add_length))
return TRUE;
str_length+= copy_and_convert(Ptr + str_length, add_length, charset(),
s, arg_length, &my_charset_latin1,
&dummy_errors);
return FALSE;
}
/*
For an ASCII compatinble string we can just append.
*/
return Binary_string::append(s, arg_length);
} | O0 | cpp | String::append(char const*, unsigned long):
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, -0x38(%rbp)
jmp 0x7850e
movq -0x20(%rbp), %rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x78524
movb $0x0, -0x1(%rbp)
jmp 0x785ea
movq -0x38(%rbp), %rdi
callq 0x7a160
cmpl $0x1, %eax
jbe 0x785cf
movq -0x38(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
callq 0x7a1a0
movl -0x3c(%rbp), %ecx
movl %eax, %edx
movq -0x38(%rbp), %rax
imull %edx, %ecx
movl %ecx, -0x28(%rbp)
movq %rax, %rdi
addq $0x8, %rdi
movl 0x10(%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x77480
testb $0x1, %al
jne 0x78570
jmp 0x78576
movb $0x1, -0x1(%rbp)
jmp 0x785ea
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rax
movl 0x10(%rdi), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x28(%rbp), %eax
movq %rax, -0x48(%rbp)
callq 0x7a180
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
leaq 0x32fb30(%rip), %r9 # 0x3a80e0
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
callq 0x7a100
movl %eax, %ecx
movq -0x38(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x785ea
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x773e0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN6String6appendEPKcm:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_24+4], rdx
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
jmp short $+2
loc_7850E:
mov rax, [rbp+var_24+4]
mov dword ptr [rbp+var_24], eax
cmp dword ptr [rbp+var_24], 0
jnz short loc_78524
mov [rbp+var_1], 0
jmp loc_785EA
loc_78524:
mov rdi, [rbp+var_38]; this
call _ZNK7Charset8mbminlenEv; Charset::mbminlen(void)
cmp eax, 1
jbe loc_785CF
mov rdi, [rbp+var_38]; this
mov eax, dword ptr [rbp+var_24]
mov [rbp+var_3C], eax
call _ZNK7Charset8mbmaxlenEv; Charset::mbmaxlen(void)
mov ecx, [rbp+var_3C]
mov edx, eax
mov rax, [rbp+var_38]
imul ecx, edx
mov [rbp+var_28], ecx
mov rdi, rax
add rdi, 8; this
mov eax, [rax+10h]
add eax, [rbp+var_28]
mov eax, eax
mov esi, eax; unsigned __int64
call _ZN13Binary_string28realloc_with_extra_if_neededEm; Binary_string::realloc_with_extra_if_needed(ulong)
test al, 1
jnz short loc_78570
jmp short loc_78576
loc_78570:
mov [rbp+var_1], 1
jmp short loc_785EA
loc_78576:
mov rdi, [rbp+var_38]; this
mov rax, [rdi+8]
mov ecx, [rdi+10h]
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_28]
mov [rbp+var_48], rax
call _ZNK7Charset7charsetEv; Charset::charset(void)
mov rdi, [rbp+var_50]; char *
mov rsi, [rbp+var_48]; unsigned __int64
mov rdx, rax; charset_info_st *
mov rcx, [rbp+var_18]; char *
mov eax, dword ptr [rbp+var_24]
mov r8d, eax; unsigned __int64
lea r9, my_charset_latin1; charset_info_st *
lea rax, [rbp+var_2C]
mov [rsp+60h+var_60], rax; unsigned int *
call _Z16copy_and_convertPcmPK15charset_info_stPKcmS2_Pj; copy_and_convert(char *,ulong,charset_info_st const*,char const*,ulong,charset_info_st const*,uint *)
mov ecx, eax
mov rax, [rbp+var_38]
add ecx, [rax+10h]
mov [rax+10h], ecx
mov [rbp+var_1], 0
jmp short loc_785EA
loc_785CF:
mov rdi, [rbp+var_38]
add rdi, 8; this
mov rsi, [rbp+var_18]; char *
mov eax, dword ptr [rbp+var_24]
mov edx, eax; unsigned __int64
call _ZN13Binary_string6appendEPKcm; Binary_string::append(char const*,ulong)
and al, 1
mov [rbp+var_1], al
loc_785EA:
mov al, [rbp+var_1]
and al, 1
add rsp, 60h
pop rbp
retn
| char String::append(String *this, char *a2, long long a3)
{
const charset_info_st *v3; // rax
char *v5; // [rsp+10h] [rbp-50h]
unsigned int v6; // [rsp+34h] [rbp-2Ch] BYREF
unsigned int v7; // [rsp+38h] [rbp-28h]
_DWORD v8[3]; // [rsp+3Ch] [rbp-24h]
char *v9; // [rsp+48h] [rbp-18h]
String *v10; // [rsp+50h] [rbp-10h]
v10 = this;
v9 = a2;
*(_QWORD *)&v8[1] = a3;
v8[0] = a3;
if ( !(_DWORD)a3 )
return 0;
if ( (unsigned int)Charset::mbminlen(this) <= 1 )
return Binary_string::append((String *)((char *)this + 8), v9, v8[0]) & 1;
v7 = Charset::mbmaxlen(this) * v8[0];
if ( (Binary_string::realloc_with_extra_if_needed((String *)((char *)this + 8), v7 + *((_DWORD *)this + 4)) & 1) != 0 )
return 1;
v5 = (char *)(*((unsigned int *)this + 4) + *((_QWORD *)this + 1));
v3 = (const charset_info_st *)Charset::charset(this);
*((_DWORD *)this + 4) += copy_and_convert(v5, v7, v3, v9, v8[0], (const charset_info_st *)&my_charset_latin1, &v6);
return 0;
}
| append:
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 qword ptr [RBP + -0x38],RAX
JMP 0x0017850e
LAB_0017850e:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00178524
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001785ea
LAB_00178524:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0017a160
CMP EAX,0x1
JBE 0x001785cf
MOV RDI,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x3c],EAX
CALL 0x0017a1a0
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x38]
IMUL ECX,EDX
MOV dword ptr [RBP + -0x28],ECX
MOV RDI,RAX
ADD RDI,0x8
MOV EAX,dword ptr [RAX + 0x10]
ADD EAX,dword ptr [RBP + -0x28]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00177480
TEST AL,0x1
JNZ 0x00178570
JMP 0x00178576
LAB_00178570:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001785ea
LAB_00178576:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0x8]
MOV ECX,dword ptr [RDI + 0x10]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
CALL 0x0017a180
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
LEA R9,[0x4a80e0]
LEA RAX,[RBP + -0x2c]
MOV qword ptr [RSP],RAX
CALL 0x0017a100
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
ADD ECX,dword ptr [RAX + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001785ea
LAB_001785cf:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
CALL 0x001773e0
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_001785ea:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x60
POP RBP
RET
|
/* String::append(char const*, unsigned long) */
byte __thiscall String::append(String *this,char *param_1,ulong param_2)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
charset_info_st *pcVar6;
uint local_34;
uint local_30;
uint local_2c;
ulong local_28;
char *local_20;
String *local_18;
byte local_9;
local_2c = (uint)param_2;
if (local_2c == 0) {
local_9 = 0;
}
else {
local_28 = param_2;
local_20 = param_1;
local_18 = this;
uVar3 = Charset::mbminlen((Charset *)this);
uVar1 = local_2c;
if (uVar3 < 2) {
local_9 = Binary_string::append((Binary_string *)(this + 8),local_20,(ulong)local_2c);
local_9 = local_9 & 1;
}
else {
iVar4 = Charset::mbmaxlen((Charset *)this);
local_30 = uVar1 * iVar4;
uVar5 = Binary_string::realloc_with_extra_if_needed
((Binary_string *)(this + 8),(ulong)(*(int *)(this + 0x10) + local_30));
if ((uVar5 & 1) == 0) {
lVar2 = *(long *)(this + 8);
uVar1 = *(uint *)(this + 0x10);
uVar5 = (ulong)local_30;
pcVar6 = (charset_info_st *)Charset::charset((Charset *)this);
iVar4 = copy_and_convert((char *)(lVar2 + (ulong)uVar1),uVar5,pcVar6,local_20,
(ulong)local_2c,(charset_info_st *)&my_charset_latin1,&local_34);
*(int *)(this + 0x10) = iVar4 + *(int *)(this + 0x10);
local_9 = 0;
}
else {
local_9 = 1;
}
}
}
return local_9;
}
| |
23,876 | common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<common_sampler_type> common_sampler_types_from_names(const std::vector<std::string> & names, bool allow_alt_names) {
std::unordered_map<std::string, common_sampler_type> sampler_canonical_name_map {
{ "dry", COMMON_SAMPLER_TYPE_DRY },
{ "top_k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top_p", COMMON_SAMPLER_TYPE_TOP_P },
{ "typ_p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min_p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temperature", COMMON_SAMPLER_TYPE_TEMPERATURE },
{ "xtc", COMMON_SAMPLER_TYPE_XTC },
{ "infill", COMMON_SAMPLER_TYPE_INFILL },
{ "penalties", COMMON_SAMPLER_TYPE_PENALTIES },
};
// since samplers names are written multiple ways
// make it ready for both system names and input names
std::unordered_map<std::string, common_sampler_type> sampler_alt_name_map {
{ "top-k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top-p", COMMON_SAMPLER_TYPE_TOP_P },
{ "nucleus", COMMON_SAMPLER_TYPE_TOP_P },
{ "typical-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typical", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min-p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temp", COMMON_SAMPLER_TYPE_TEMPERATURE },
};
std::vector<common_sampler_type> samplers;
samplers.reserve(names.size());
for (const auto & name : names) {
auto sampler = sampler_canonical_name_map.find(name);
if (sampler != sampler_canonical_name_map.end()) {
samplers.push_back(sampler->second);
} else {
if (allow_alt_names) {
sampler = sampler_alt_name_map.find(name);
if (sampler != sampler_alt_name_map.end()) {
samplers.push_back(sampler->second);
}
}
}
}
return samplers;
} | O2 | cpp | common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x21022(%rip), %rsi # 0xba59b
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x99e5c
leaq 0x90(%rsp), %r12
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x20fff(%rip), %rsi # 0xba59f
movq %r12, %rdi
callq 0x99e7e
leaq 0xb8(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x20fe9(%rip), %rsi # 0xba5ab
movq %r12, %rdi
callq 0x99e7e
leaq 0xe0(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20fc1(%rip), %rsi # 0xba5a5
movq %r12, %rdi
callq 0x99e7e
leaq 0x108(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x20fab(%rip), %rsi # 0xba5b1
movq %r12, %rdi
callq 0x99e7e
leaq 0x130(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x20f8f(%rip), %rsi # 0xba5b7
movq %r12, %rdi
callq 0x99ea0
leaq 0x158(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x8, (%rdx)
leaq 0x20f79(%rip), %rsi # 0xba5c3
movq %r12, %rdi
callq 0x99e5c
leaq 0x180(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x9, (%rdx)
leaq 0x1355d(%rip), %rsi # 0xacbc9
movq %r12, %rdi
callq 0x99ec2
leaq 0x1a8(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0xa, (%rdx)
leaq 0x20f39(%rip), %rsi # 0xba5c7
movq %r12, %rdi
callq 0x99ee4
leaq 0x1d0(%rsp), %rdx
leaq 0x9(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xc(%rsp), %r8
leaq 0xa(%rsp), %r9
xorl %ecx, %ecx
callq 0x9a4f0
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x241c8
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0x996cb
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x136e8(%rip), %rsi # 0xacddc
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x99e7e
leaq 0x90(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x136f4(%rip), %rsi # 0xace0f
movq %r12, %rdi
callq 0x99e7e
leaq 0xb8(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x20e94(%rip), %rsi # 0xba5d1
movq %r12, %rdi
callq 0x99f06
leaq 0xe0(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20e7a(%rip), %rsi # 0xba5d9
movq %r12, %rdi
callq 0x99ee4
leaq 0x108(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x1377c(%rip), %rsi # 0xacefd
movq %r12, %rdi
callq 0x99f06
leaq 0x130(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20e40(%rip), %rsi # 0xba5e3
movq %r12, %rdi
callq 0x99e7e
leaq 0x158(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20e24(%rip), %rsi # 0xba5e9
movq %r12, %rdi
callq 0x99e5c
leaq 0x180(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x1365f(%rip), %rsi # 0xace46
movq %r12, %rdi
callq 0x99e7e
leaq 0x1a8(%rsp), %r12
leaq 0xc(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x135b0(%rip), %rsi # 0xacdb9
movq %r12, %rdi
callq 0x99f28
leaq 0x1d0(%rsp), %rdx
leaq 0xb(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xa(%rsp), %r8
leaq 0x9(%rsp), %r9
xorl %ecx, %ecx
callq 0x9a4f0
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x241c8
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0x99843
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x99f4a
movq (%r14), %r15
movq 0x8(%r14), %r13
leaq 0x1d0(%rsp), %r14
leaq 0x30(%rsp), %r12
cmpq %r13, %r15
je 0x998cd
movq %r14, %rdi
movq %r15, %rsi
callq 0x9a9b8
testq %rax, %rax
je 0x998b2
addq $0x28, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x99fe0
jmp 0x998c7
testb %bpl, %bpl
je 0x998c7
movq %r12, %rdi
movq %r15, %rsi
callq 0x9a9b8
testq %rax, %rax
jne 0x998a1
addq $0x20, %r15
jmp 0x9988c
leaq 0x30(%rsp), %rdi
callq 0x9a264
leaq 0x1d0(%rsp), %rdi
callq 0x9a264
movq %rbx, %rax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x999c0
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x241c8
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x99906
movb $0x1, %al
jmp 0x99934
jmp 0x9992f
jmp 0x9992f
jmp 0x9992f
jmp 0x9992f
jmp 0x9992f
jmp 0x9992f
jmp 0x9992f
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0x999d5
testb %cl, %cl
jne 0x999d5
addq $-0x28, %r12
movq %r12, %rdi
callq 0x241c8
cmpq %r15, %r12
jne 0x9994a
jmp 0x999d5
movq %rax, %r14
jmp 0x999d5
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x241c8
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9996a
movb $0x1, %al
jmp 0x99998
jmp 0x99993
jmp 0x99993
jmp 0x99993
jmp 0x99993
jmp 0x99993
jmp 0x99993
jmp 0x99993
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0x999e2
testb %cl, %cl
jne 0x999e2
addq $-0x28, %r12
movq %r12, %rdi
callq 0x241c8
cmpq %r15, %r12
jne 0x999a6
jmp 0x999e2
movq %rax, %r14
jmp 0x999e2
jmp 0x999c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x28138
leaq 0x30(%rsp), %rdi
callq 0x9a264
leaq 0x1d0(%rsp), %rdi
callq 0x9a264
movq %r14, %rdi
callq 0x23f80
| _Z31common_sampler_types_from_namesRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rdx, [rsp+238h+var_208]
mov dword ptr [rdx], 1
lea rsi, aDry; "dry"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK_0; "top_k"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP_0; "top_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 6
lea rsi, aTypP; "typ_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 4
lea rsi, aMinP_0; "min_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 7
lea rsi, aTemperature; "temperature"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 8
lea rsi, aXtc; "xtc"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 9
lea rsi, aSpmInfill+6; "infill"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 0Ah
lea rsi, aPenalties; "penalties"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22F]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_68]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22C]
lea r9, [rsp+238h+var_22E]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_996CB:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_996CB
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK+2; "top-k"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP+2; "top-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 3
lea rsi, aNucleus; "nucleus"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 6
lea rsi, aTypicalP; "typical-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 6
lea rsi, aTypical+2; "typical"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 6
lea rsi, aTypP_0; "typ-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 6
lea rsi, aTyp; "typ"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 4
lea rsi, aMinP+2; "min-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_22C]
mov dword ptr [rdx], 7
lea rsi, aTemp+2; "temp"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22D]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_208]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22E]
lea r9, [rsp+238h+var_22F]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_99843:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_99843
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
mov rsi, [r14+8]
sub rsi, [r14]
sar rsi, 5
mov rdi, rbx
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong)
mov r15, [r14]
mov r13, [r14+8]
lea r14, [rsp+238h+var_68]
lea r12, [rsp+238h+var_208]
loc_9988C:
cmp r15, r13
jz short loc_998CD
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_998B2
loc_998A1:
add rax, 28h ; '('
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE9push_backERKS0_; std::vector<common_sampler_type>::push_back(common_sampler_type const&)
jmp short loc_998C7
loc_998B2:
test bpl, bpl
jz short loc_998C7
mov rdi, r12
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jnz short loc_998A1
loc_998C7:
add r15, 20h ; ' '
jmp short loc_9988C
loc_998CD:
lea rdi, [rsp+238h+var_208]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+238h+var_68]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rax, rbx
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_999C0
mov r14, rax
mov ebx, 140h
loc_99906:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_99906
mov al, 1
jmp short loc_99934
jmp short loc_9992F
jmp short loc_9992F
jmp short loc_9992F
jmp short loc_9992F
jmp short loc_9992F
jmp short loc_9992F
jmp short $+2
loc_9992F:
mov r14, rax
xor eax, eax
loc_99934:
cmp r15, r12
setz cl
test al, al
jnz loc_999D5
test cl, cl
jnz loc_999D5
loc_9994A:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_9994A
jmp short loc_999D5
mov r14, rax
jmp short loc_999D5
mov r14, rax
mov ebx, 140h
loc_9996A:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_9996A
mov al, 1
jmp short loc_99998
jmp short loc_99993
jmp short loc_99993
jmp short loc_99993
jmp short loc_99993
jmp short loc_99993
jmp short loc_99993
jmp short $+2
loc_99993:
mov r14, rax
xor eax, eax
loc_99998:
cmp r15, r12
setz cl
test al, al
jnz short loc_999E2
test cl, cl
jnz short loc_999E2
loc_999A6:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_999A6
jmp short loc_999E2
mov r14, rax
jmp short loc_999E2
jmp short $+2
loc_999C0:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseI19common_sampler_typeSaIS0_EED2Ev; std::_Vector_base<common_sampler_type>::~_Vector_base()
lea rdi, [rsp+arg_28]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_999D5:
lea rdi, [rsp+arg_1C8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_999E2:
mov rdi, r14
call __Unwind_Resume
| long long common_sampler_types_from_names(long long a1, long long *a2, char a3)
{
long long i; // r15
long long j; // r15
long long v6; // r15
long long v7; // r13
long long v8; // rax
char v10; // [rsp+9h] [rbp-22Fh] BYREF
char v11; // [rsp+Ah] [rbp-22Eh] BYREF
char v12; // [rsp+Bh] [rbp-22Dh] BYREF
int v13; // [rsp+Ch] [rbp-22Ch] BYREF
int v14; // [rsp+10h] [rbp-228h] BYREF
int v15; // [rsp+14h] [rbp-224h] BYREF
int v16; // [rsp+18h] [rbp-220h] BYREF
int v17; // [rsp+1Ch] [rbp-21Ch] BYREF
int v18; // [rsp+20h] [rbp-218h] BYREF
int v19; // [rsp+24h] [rbp-214h] BYREF
int v20; // [rsp+28h] [rbp-210h] BYREF
int v21; // [rsp+2Ch] [rbp-20Ch] BYREF
_DWORD v22[14]; // [rsp+30h] [rbp-208h] BYREF
_BYTE v23[40]; // [rsp+68h] [rbp-1D0h] BYREF
_BYTE v24[40]; // [rsp+90h] [rbp-1A8h] BYREF
_BYTE v25[40]; // [rsp+B8h] [rbp-180h] BYREF
_BYTE v26[40]; // [rsp+E0h] [rbp-158h] BYREF
_BYTE v27[40]; // [rsp+108h] [rbp-130h] BYREF
_BYTE v28[40]; // [rsp+130h] [rbp-108h] BYREF
_BYTE v29[40]; // [rsp+158h] [rbp-E0h] BYREF
_BYTE v30[40]; // [rsp+180h] [rbp-B8h] BYREF
_BYTE v31[40]; // [rsp+1A8h] [rbp-90h] BYREF
_BYTE v32[104]; // [rsp+1D0h] [rbp-68h] BYREF
v22[0] = 1;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"dry",
v22);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top_k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"top_p",
&v20);
v19 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typ_p",
&v19);
v18 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"min_p",
&v18);
v17 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"temperature",
&v17);
v16 = 8;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"xtc",
&v16);
v15 = 9;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"infill",
&v15);
v14 = 10;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"penalties",
&v14);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v32,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v13,
(unsigned int)&v11,
(long long)&v10);
for ( i = 320LL; i != -40; i -= 40LL )
std::string::~string(&v23[i]);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"top-k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top-p",
&v20);
v19 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"nucleus",
&v19);
v18 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typical-p",
&v18);
v17 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"typical",
&v17);
v16 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"typ-p",
&v16);
v15 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"typ",
&v15);
v14 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"min-p",
&v14);
v13 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"temp",
&v13);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v22,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v11,
(unsigned int)&v10,
(long long)&v12);
for ( j = 320LL; j != -40; j -= 40LL )
std::string::~string(&v23[j]);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<common_sampler_type>::reserve(a1, (a2[1] - *a2) >> 5);
v6 = *a2;
v7 = a2[1];
while ( v6 != v7 )
{
v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v32,
v6);
if ( v8
|| a3
&& (v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v22,
v6)) != 0 )
{
std::vector<common_sampler_type>::push_back(a1, v8 + 40);
}
v6 += 32LL;
}
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v22);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v32);
return a1;
}
| common_sampler_types_from_names:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RDX,[RSP + 0x30]
MOV dword ptr [RDX],0x1
LAB_00199572:
LEA RSI,[0x1ba59b]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x00199e5c
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_00199599:
LEA RSI,[0x1ba59f]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_001995bb:
LEA RSI,[0x1ba5ab]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x6
LAB_001995dd:
LEA RSI,[0x1ba5a5]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x4
LAB_001995ff:
LEA RSI,[0x1ba5b1]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x7
LAB_00199621:
LEA RSI,[0x1ba5b7]
MOV RDI,R12
CALL 0x00199ea0
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x8
LAB_00199643:
LEA RSI,[0x1ba5c3]
MOV RDI,R12
CALL 0x00199e5c
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x9
LAB_00199665:
LEA RSI,[0x1acbc9]
MOV RDI,R12
CALL 0x00199ec2
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0xa
LAB_00199687:
LEA RSI,[0x1ba5c7]
MOV RDI,R12
CALL 0x00199ee4
LEA RDX,[RSP + 0x1d0]
LAB_0019969e:
LEA RAX,[RSP + 0x9]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x1d0]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xc]
LEA R9,[RSP + 0xa]
XOR ECX,ECX
CALL 0x0019a4f0
MOV R15D,0x140
LAB_001996cb:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x001241c8
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x001996cb
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_001996ed:
LEA RSI,[0x1acddc]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x00199e7e
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_00199714:
LEA RSI,[0x1ace0f]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x3
LAB_00199736:
LEA RSI,[0x1ba5d1]
MOV RDI,R12
CALL 0x00199f06
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x6
LAB_00199758:
LEA RSI,[0x1ba5d9]
MOV RDI,R12
CALL 0x00199ee4
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x6
LAB_0019977a:
LEA RSI,[0x1acefd]
MOV RDI,R12
CALL 0x00199f06
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x6
LAB_0019979c:
LEA RSI,[0x1ba5e3]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x6
LAB_001997be:
LEA RSI,[0x1ba5e9]
MOV RDI,R12
CALL 0x00199e5c
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0x4
LAB_001997e0:
LEA RSI,[0x1ace46]
MOV RDI,R12
CALL 0x00199e7e
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x7
LAB_00199802:
LEA RSI,[0x1acdb9]
MOV RDI,R12
CALL 0x00199f28
LEA RDX,[RSP + 0x1d0]
LAB_00199819:
LEA RAX,[RSP + 0xb]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xa]
LEA R9,[RSP + 0x9]
XOR ECX,ECX
CALL 0x0019a4f0
MOV R15D,0x140
LAB_00199843:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x001241c8
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x00199843
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x8]
SUB RSI,qword ptr [R14]
SAR RSI,0x5
LAB_00199870:
MOV RDI,RBX
CALL 0x00199f4a
MOV R15,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
LEA R14,[RSP + 0x1d0]
LEA R12,[RSP + 0x30]
LAB_0019988c:
CMP R15,R13
JZ 0x001998cd
LAB_00199891:
MOV RDI,R14
MOV RSI,R15
CALL 0x0019a9b8
TEST RAX,RAX
JZ 0x001998b2
LAB_001998a1:
ADD RAX,0x28
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00199fe0
JMP 0x001998c7
LAB_001998b2:
TEST BPL,BPL
JZ 0x001998c7
LAB_001998b7:
MOV RDI,R12
MOV RSI,R15
CALL 0x0019a9b8
LAB_001998c2:
TEST RAX,RAX
JNZ 0x001998a1
LAB_001998c7:
ADD R15,0x20
JMP 0x0019988c
LAB_001998cd:
LEA RDI,[RSP + 0x30]
CALL 0x0019a264
LEA RDI,[RSP + 0x1d0]
CALL 0x0019a264
MOV RAX,RBX
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_sampler_types_from_names(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, bool) */
vector * common_sampler_types_from_names(vector *param_1,bool param_2)
{
string *psVar1;
char in_DL;
int7 in_register_00000031;
long *plVar2;
long lVar3;
string *psVar4;
int1 local_22f;
int1 local_22e;
int1 local_22d;
int4 local_22c;
int4 local_228;
int4 local_224;
int4 local_220;
int4 local_21c;
int4 local_218;
int4 local_214;
int4 local_210;
int4 local_20c;
int4 local_208 [14];
string local_1d0 [40];
int1 local_1a8 [40];
int1 local_180 [40];
int1 local_158 [40];
int1 local_130 [40];
int1 local_108 [40];
int1 local_e0 [40];
int1 local_b8 [40];
int1 local_90 [40];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_68 [56];
plVar2 = (long *)CONCAT71(in_register_00000031,param_2);
local_208[0] = 1;
/* try { // try from 00199572 to 00199585 has its CatchHandler @ 001999b9 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,&DAT_001ba59b);
local_20c = 2;
/* try { // try from 00199599 to 001995a7 has its CatchHandler @ 00199993 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top_k");
local_210 = 3;
/* try { // try from 001995bb to 001995c9 has its CatchHandler @ 00199991 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"top_p");
local_214 = 6;
/* try { // try from 001995dd to 001995eb has its CatchHandler @ 0019998f */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typ_p");
local_218 = 4;
/* try { // try from 001995ff to 0019960d has its CatchHandler @ 0019998d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"min_p");
local_21c = 7;
/* try { // try from 00199621 to 0019962f has its CatchHandler @ 0019998b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"temperature");
local_220 = 8;
/* try { // try from 00199643 to 00199651 has its CatchHandler @ 00199989 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001ba5c3);
local_224 = 9;
/* try { // try from 00199665 to 00199673 has its CatchHandler @ 00199987 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"infill");
local_228 = 10;
/* try { // try from 00199687 to 00199695 has its CatchHandler @ 00199985 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"penalties");
/* try { // try from 0019969e to 001996c4 has its CatchHandler @ 00199962 */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_68,local_1d0,local_68,0,&local_22c,&local_22e,&local_22f);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
local_20c = 2;
/* try { // try from 001996ed to 00199700 has its CatchHandler @ 0019995d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,"top-k");
local_210 = 3;
/* try { // try from 00199714 to 00199722 has its CatchHandler @ 0019992f */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top-p");
local_214 = 3;
/* try { // try from 00199736 to 00199744 has its CatchHandler @ 0019992d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"nucleus");
local_218 = 6;
/* try { // try from 00199758 to 00199766 has its CatchHandler @ 0019992b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typical-p");
local_21c = 6;
/* try { // try from 0019977a to 00199788 has its CatchHandler @ 00199929 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"typical");
local_220 = 6;
/* try { // try from 0019979c to 001997aa has its CatchHandler @ 00199927 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"typ-p");
local_224 = 6;
/* try { // try from 001997be to 001997cc has its CatchHandler @ 00199925 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001ba5e9);
local_228 = 4;
/* try { // try from 001997e0 to 001997ee has its CatchHandler @ 00199923 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"min-p");
local_22c = 7;
/* try { // try from 00199802 to 00199810 has its CatchHandler @ 00199921 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"temp");
/* try { // try from 00199819 to 0019983c has its CatchHandler @ 001998fe */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_208,local_1d0,local_68,0,&local_22e,&local_22f,&local_22d);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 00199870 to 00199877 has its CatchHandler @ 001998f9 */
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
plVar2[1] - *plVar2 >> 5);
psVar4 = (string *)*plVar2;
psVar1 = (string *)plVar2[1];
do {
if (psVar4 == psVar1) {
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_68);
return param_1;
}
/* try { // try from 00199891 to 001998af has its CatchHandler @ 001999c0 */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find(local_68,psVar4);
if (lVar3 == 0) {
if (in_DL != '\0') {
/* try { // try from 001998b7 to 001998c1 has its CatchHandler @ 001999be */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208,psVar4);
if (lVar3 != 0) goto LAB_001998a1;
}
}
else {
LAB_001998a1:
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::push_back
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
(common_sampler_type *)(lVar3 + 0x28));
}
psVar4 = psVar4 + 0x20;
} while( true );
}
| |
23,877 | llama_grammar_parser::parse_alternates(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, bool) | llama.cpp/src/llama-grammar.cpp | const char * llama_grammar_parser::parse_alternates(
const char * src,
const std::string & rule_name,
uint32_t rule_id,
bool is_nested) {
llama_grammar_rule rule;
const char * pos = parse_sequence(src, rule_name, rule, is_nested);
while (*pos == '|') {
rule.push_back({LLAMA_GRETYPE_ALT, 0});
pos = parse_space(pos + 1, true);
pos = parse_sequence(pos, rule_name, rule, is_nested);
}
rule.push_back({LLAMA_GRETYPE_END, 0});
add_rule(rule_id, rule);
return pos;
} | O3 | cpp | llama_grammar_parser::parse_alternates(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movl %ecx, 0xc(%rsp)
movq %rdx, %r12
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %rdi, 0x10(%rsp)
callq 0x7bff0
movq %rax, %r14
leaq 0x20(%rsp), %r13
movzbl %bl, %ebx
movabsq $0x100002600, %rbp # imm = 0x100002600
movl $0x2401, %r15d # imm = 0x2401
cmpb $0x7c, (%r14)
jne 0x95be4
movq $0x1, 0x18(%rsp)
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x7c620
incq %r14
movzbl (%r14), %eax
cmpq $0x23, %rax
ja 0x95bc9
btq %rax, %rbp
jb 0x95b98
cmpq $0x23, %rax
je 0x95bba
jmp 0x95bc9
movb 0x1(%r14), %al
incq %r14
cmpb $0xd, %al
ja 0x95bb3
movzbl %al, %eax
btl %eax, %r15d
jae 0x95bb3
jmp 0x95b9b
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
movl %ebx, %r8d
callq 0x7bff0
movq %rax, %r14
jmp 0x95b7c
leaq 0x18(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x7c620
leaq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x74cf0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x95c24
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x789c0
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x95c3c
jmp 0x95c3c
jmp 0x95c3c
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x95c56
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x789c0
movq %rbx, %rdi
callq 0x7c350
| _ZN20llama_grammar_parser16parse_alternatesEPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebx, r8d
mov [rsp+68h+var_5C], ecx
mov r12, rdx
xorps xmm0, xmm0
lea rcx, [rsp+68h+var_48]
movaps xmmword ptr [rcx], xmm0
mov qword ptr [rcx+10h], 0
mov [rsp+68h+var_58], rdi
call __ZN20llama_grammar_parser14parse_sequenceEPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorI21llama_grammar_elementSaISB_EEb; llama_grammar_parser::parse_sequence(char const*,std::string const&,std::vector<llama_grammar_element> &,bool)
mov r14, rax
lea r13, [rsp+68h+var_48]
movzx ebx, bl
mov rbp, 100002600h
mov r15d, 2401h
loc_95B7C:
cmp byte ptr [r14], 7Ch ; '|'
jnz short loc_95BE4
mov [rsp+68h+var_50], 1
mov rdi, r13
lea rsi, [rsp+68h+var_50]
call __ZNSt6vectorI21llama_grammar_elementSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_grammar_element>::emplace_back<llama_grammar_element>(llama_grammar_element &&)
loc_95B98:
inc r14
loc_95B9B:
movzx eax, byte ptr [r14]
cmp rax, 23h ; '#'
ja short loc_95BC9
bt rbp, rax
jb short loc_95B98
cmp rax, 23h ; '#'
jz short loc_95BBA
jmp short loc_95BC9
loc_95BB3:
mov al, [r14+1]
inc r14
loc_95BBA:
cmp al, 0Dh
ja short loc_95BB3
movzx eax, al
bt r15d, eax
jnb short loc_95BB3
jmp short loc_95B9B
loc_95BC9:
mov rdi, [rsp+68h+var_58]
mov rsi, r14
mov rdx, r12
mov rcx, r13
mov r8d, ebx
call __ZN20llama_grammar_parser14parse_sequenceEPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorI21llama_grammar_elementSaISB_EEb; llama_grammar_parser::parse_sequence(char const*,std::string const&,std::vector<llama_grammar_element> &,bool)
mov r14, rax
jmp short loc_95B7C
loc_95BE4:
lea rsi, [rsp+68h+var_50]
mov qword ptr [rsi], 0
lea rdi, [rsp+68h+var_48]
call __ZNSt6vectorI21llama_grammar_elementSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_grammar_element>::emplace_back<llama_grammar_element>(llama_grammar_element &&)
lea rdx, [rsp+68h+var_48]
mov rdi, [rsp+68h+var_58]
mov esi, [rsp+68h+var_5C]
call __ZN20llama_grammar_parser8add_ruleEjRKSt6vectorI21llama_grammar_elementSaIS1_EE; llama_grammar_parser::add_rule(uint,std::vector<llama_grammar_element> const&)
mov rdi, [rsp+68h+var_48]; void *
test rdi, rdi
jz short loc_95C24
mov rsi, [rsp+68h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95C24:
mov rax, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_95C3C
jmp short loc_95C3C
jmp short $+2
loc_95C3C:
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
test rdi, rdi
jz short loc_95C56
mov rsi, [rsp+arg_28]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95C56:
mov rdi, rbx
call __Unwind_Resume
| _BYTE * llama_grammar_parser::parse_alternates(long long a1, long long a2, long long a3, unsigned int a4)
{
_BYTE *v5; // r14
long long v6; // rbp
int v7; // r15d
unsigned long long v8; // rax
long long v11; // [rsp+18h] [rbp-50h] BYREF
__int128 v12; // [rsp+20h] [rbp-48h] BYREF
long long v13; // [rsp+30h] [rbp-38h]
v12 = 0LL;
v13 = 0LL;
v5 = (_BYTE *)llama_grammar_parser::parse_sequence(a1, a2, a3, &v12);
v6 = 0x100002600LL;
v7 = 9217;
while ( *v5 == 124 )
{
v11 = 1LL;
std::vector<llama_grammar_element>::emplace_back<llama_grammar_element>(&v12, &v11);
LABEL_4:
++v5;
while ( 1 )
{
v8 = (unsigned __int8)*v5;
if ( v8 > 0x23 )
break;
if ( _bittest64(&v6, v8) )
goto LABEL_4;
if ( v8 != 35 )
break;
while ( (unsigned __int8)v8 > 0xDu || !_bittest(&v7, (unsigned __int8)v8) )
LOBYTE(v8) = *++v5;
}
v5 = (_BYTE *)llama_grammar_parser::parse_sequence(a1, v5, a3, &v12);
}
v11 = 0LL;
std::vector<llama_grammar_element>::emplace_back<llama_grammar_element>(&v12, &v11);
llama_grammar_parser::add_rule(a1, a4, (long long)&v12);
if ( (_QWORD)v12 )
operator delete((void *)v12, v13 - v12);
return v5;
}
| parse_alternates:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBX,R8D
MOV dword ptr [RSP + 0xc],ECX
MOV R12,RDX
XORPS XMM0,XMM0
LEA RCX,[RSP + 0x20]
MOVAPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],0x0
LAB_00195b57:
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0017bff0
MOV R14,RAX
LEA R13,[RSP + 0x20]
MOVZX EBX,BL
MOV RBP,0x100002600
MOV R15D,0x2401
LAB_00195b7c:
CMP byte ptr [R14],0x7c
JNZ 0x00195be4
MOV qword ptr [RSP + 0x18],0x1
LAB_00195b8b:
MOV RDI,R13
LEA RSI,[RSP + 0x18]
CALL 0x0017c620
LAB_00195b98:
INC R14
LAB_00195b9b:
MOVZX EAX,byte ptr [R14]
CMP RAX,0x23
JA 0x00195bc9
BT RBP,RAX
JC 0x00195b98
CMP RAX,0x23
JZ 0x00195bba
JMP 0x00195bc9
LAB_00195bb3:
MOV AL,byte ptr [R14 + 0x1]
INC R14
LAB_00195bba:
CMP AL,0xd
JA 0x00195bb3
MOVZX EAX,AL
BT R15D,EAX
JNC 0x00195bb3
JMP 0x00195b9b
LAB_00195bc9:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,R14
MOV RDX,R12
MOV RCX,R13
MOV R8D,EBX
CALL 0x0017bff0
MOV R14,RAX
JMP 0x00195b7c
LAB_00195be4:
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],0x0
LAB_00195bf0:
LEA RDI,[RSP + 0x20]
CALL 0x0017c620
LAB_00195bfa:
LEA RDX,[RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x00174cf0
LAB_00195c0d:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00195c24
MOV RSI,qword ptr [RSP + 0x30]
SUB RSI,RDI
CALL 0x001789c0
LAB_00195c24:
MOV RAX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* llama_grammar_parser::parse_alternates(char const*, std::__cxx11::string const&, unsigned int,
bool) */
byte * __thiscall
llama_grammar_parser::parse_alternates
(llama_grammar_parser *this,char *param_1,string *param_2,uint param_3,bool param_4)
{
byte *pbVar1;
ulong uVar2;
int8 local_50;
void *local_48;
int8 uStack_40;
long local_38;
local_48 = (void *)0x0;
uStack_40 = 0;
local_38 = 0;
/* try { // try from 00195b57 to 00195b60 has its CatchHandler @ 00195c38 */
pbVar1 = (byte *)parse_sequence(this,param_1,param_2,(vector *)&local_48,param_4);
LAB_00195b7c:
if (*pbVar1 != 0x7c) {
local_50 = 0;
/* try { // try from 00195bf0 to 00195bf9 has its CatchHandler @ 00195c36 */
std::vector<llama_grammar_element,std::allocator<llama_grammar_element>>::
emplace_back<llama_grammar_element>
((vector<llama_grammar_element,std::allocator<llama_grammar_element>> *)&local_48,
(llama_grammar_element *)&local_50);
/* try { // try from 00195bfa to 00195c0c has its CatchHandler @ 00195c38 */
add_rule(this,param_3,(vector *)&local_48);
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return pbVar1;
}
local_50 = 1;
/* try { // try from 00195b8b to 00195b97 has its CatchHandler @ 00195c3c */
std::vector<llama_grammar_element,std::allocator<llama_grammar_element>>::
emplace_back<llama_grammar_element>
((vector<llama_grammar_element,std::allocator<llama_grammar_element>> *)&local_48,
(llama_grammar_element *)&local_50);
LAB_00195b98:
pbVar1 = pbVar1 + 1;
do {
uVar2 = (ulong)*pbVar1;
if (0x23 < uVar2) {
LAB_00195bc9:
/* try { // try from 00195bc9 to 00195be1 has its CatchHandler @ 00195c3a */
pbVar1 = (byte *)parse_sequence(this,(char *)pbVar1,param_2,(vector *)&local_48,param_4);
goto LAB_00195b7c;
}
if ((0x100002600U >> (uVar2 & 0x3f) & 1) != 0) goto LAB_00195b98;
if (uVar2 != 0x23) goto LAB_00195bc9;
while ((0xd < (byte)uVar2 || ((0x2401U >> ((uint)uVar2 & 0x1f) & 1) == 0))) {
uVar2 = (ulong)pbVar1[1];
pbVar1 = pbVar1 + 1;
}
} while( true );
}
| |
23,878 | JS_NewAtomUInt32 | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_NewAtomUInt32(JSContext *ctx, uint32_t n)
{
if (n <= JS_ATOM_MAX_INT) {
return __JS_AtomFromUInt32(n);
} else {
char buf[16];
size_t len = u32toa(buf, n);
JSValue val = js_new_string8_len(ctx, buf, len);
if (JS_IsException(val))
return JS_ATOM_NULL;
return __JS_NewAtom(ctx->rt, JS_VALUE_GET_STRING(val),
JS_ATOM_TYPE_STRING);
}
} | O1 | c | JS_NewAtomUInt32:
testl %esi, %esi
js 0x2018e
orl $0x80000000, %esi # imm = 0x80000000
jmp 0x201da
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1bc8c
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x201dd
movq %rax, 0x8(%rsp)
xorl %esi, %esi
cmpl $0x6, %edx
je 0x201d3
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movl $0x1, %edx
callq 0x2023d
movl %eax, %esi
addq $0x28, %rsp
popq %rbx
popq %r14
movl %esi, %eax
retq
| JS_NewAtomUInt32:
test esi, esi
js short loc_2018E
or esi, 80000000h
jmp short loc_201DA
loc_2018E:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_28]
mov rdi, r14
call u32toa
mov rdi, rbx
mov rsi, r14
mov edx, eax
call js_new_string8_len
mov [rsp+38h+var_30], rax
xor esi, esi
cmp edx, 6
jz short loc_201D3
mov rdi, [rbx+18h]
mov rsi, [rsp+38h+var_30]
mov edx, 1
call __JS_NewAtom
mov esi, eax
loc_201D3:
add rsp, 28h
pop rbx
pop r14
loc_201DA:
mov eax, esi
retn
| long long JS_NewAtomUInt32(long long a1, signed int a2)
{
unsigned int v2; // esi
unsigned int v3; // eax
int v4; // edx
long long v6; // [rsp+0h] [rbp-30h]
_BYTE v7[40]; // [rsp+8h] [rbp-28h] BYREF
if ( a2 < 0 )
{
v3 = u32toa((long long)v7, a2);
v6 = js_new_string8_len(a1, v7, v3);
v2 = 0;
if ( v4 != 6 )
return (unsigned int)_JS_NewAtom(*(_QWORD *)(a1 + 24), v6, 1LL);
}
else
{
return a2 | 0x80000000;
}
return v2;
}
| |||
23,879 | JS_NewAtomUInt32 | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_NewAtomUInt32(JSContext *ctx, uint32_t n)
{
if (n <= JS_ATOM_MAX_INT) {
return __JS_AtomFromUInt32(n);
} else {
char buf[16];
size_t len = u32toa(buf, n);
JSValue val = js_new_string8_len(ctx, buf, len);
if (JS_IsException(val))
return JS_ATOM_NULL;
return __JS_NewAtom(ctx->rt, JS_VALUE_GET_STRING(val),
JS_ATOM_TYPE_STRING);
}
} | O2 | c | JS_NewAtomUInt32:
testl %esi, %esi
js 0x1a4a4
orl $0x80000000, %esi # imm = 0x80000000
jmp 0x1a4e5
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x16482
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x1a4e8
xorl %esi, %esi
cmpl $0x6, %edx
je 0x1a4de
movq 0x18(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rax, %rsi
callq 0x1a53b
movl %eax, %esi
addq $0x18, %rsp
popq %rbx
popq %r14
movl %esi, %eax
retq
| JS_NewAtomUInt32:
test esi, esi
js short loc_1A4A4
or esi, 80000000h
jmp short loc_1A4E5
loc_1A4A4:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14, rsp
mov rdi, r14
call u32toa
mov rdi, rbx
mov rsi, r14
mov edx, eax
call js_new_string8_len
xor esi, esi
cmp edx, 6
jz short loc_1A4DE
mov rdi, [rbx+18h]
push 1
pop rdx
mov rsi, rax
call __JS_NewAtom
mov esi, eax
loc_1A4DE:
add rsp, 18h
pop rbx
pop r14
loc_1A4E5:
mov eax, esi
retn
| long long JS_NewAtomUInt32(long long a1, signed int a2)
{
unsigned int v2; // esi
unsigned int v3; // eax
long long v4; // rax
int v5; // edx
_BYTE v7[40]; // [rsp-28h] [rbp-28h] BYREF
if ( a2 < 0 )
{
v3 = u32toa(v7, a2);
v4 = js_new_string8_len(a1, v7, v3);
v2 = 0;
if ( v5 != 6 )
return (unsigned int)_JS_NewAtom(*(_QWORD *)(a1 + 24), v4, 1LL);
}
else
{
return a2 | 0x80000000;
}
return v2;
}
| JS_NewAtomUInt32:
TEST ESI,ESI
JS 0x0011a4a4
OR ESI,0x80000000
JMP 0x0011a4e5
LAB_0011a4a4:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R14,RSP
MOV RDI,R14
CALL 0x00116482
MOV RDI,RBX
MOV RSI,R14
MOV EDX,EAX
CALL 0x0011a4e8
XOR ESI,ESI
CMP EDX,0x6
JZ 0x0011a4de
MOV RDI,qword ptr [RBX + 0x18]
PUSH 0x1
POP RDX
MOV RSI,RAX
CALL 0x0011a53b
MOV ESI,EAX
LAB_0011a4de:
ADD RSP,0x18
POP RBX
POP R14
LAB_0011a4e5:
MOV EAX,ESI
RET
|
uint JS_NewAtomUInt32(long param_1,uint param_2)
{
int4 uVar1;
int1 auVar2 [12];
int1 auStack_28 [24];
if ((int)param_2 < 0) {
uVar1 = u32toa(auStack_28);
auVar2 = js_new_string8_len(param_1,auStack_28,uVar1);
param_2 = 0;
if (auVar2._8_4_ != 6) {
param_2 = __JS_NewAtom(*(int8 *)(param_1 + 0x18),auVar2._0_8_,1);
}
}
else {
param_2 = param_2 | 0x80000000;
}
return param_2;
}
| |
23,880 | send_change_user_packet | eloqsql/libmariadb/plugins/auth/my_auth.c | static int send_change_user_packet(MCPVIO_EXT *mpvio,
const uchar *data, int data_len)
{
MYSQL *mysql= mpvio->mysql;
char *buff, *end;
int res= 1;
size_t conn_attr_len= (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0;
buff= malloc(USERNAME_LENGTH+1 + data_len+1 + NAME_LEN+1 + 2 + NAME_LEN+1 + 9 + conn_attr_len);
end= ma_strmake(buff, mysql->user, USERNAME_LENGTH) + 1;
if (!data_len)
*end++= 0;
else
{
if (mysql->client_flag & CLIENT_SECURE_CONNECTION)
{
DBUG_ASSERT(data_len <= 255);
if (data_len > 255)
{
my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0);
goto error;
}
*end++= data_len;
}
else
{
DBUG_ASSERT(data_len == SCRAMBLE_LENGTH_323 + 1);
DBUG_ASSERT(data[SCRAMBLE_LENGTH_323] == 0);
}
memcpy(end, data, data_len);
end+= data_len;
}
end= ma_strmake(end, mpvio->db ? mpvio->db : "", NAME_LEN) + 1;
if (mysql->server_capabilities & CLIENT_PROTOCOL_41)
{
int2store(end, (ushort) mysql->charset->nr);
end+= 2;
}
if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH)
end= ma_strmake(end, mpvio->plugin->name, NAME_LEN) + 1;
end= ma_send_connect_attr(mysql, (unsigned char *)end);
res= ma_simple_command(mysql, COM_CHANGE_USER,
buff, (ulong)(end-buff), 1, NULL);
error:
free(buff);
return res;
} | O0 | c | send_change_user_packet:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x34(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x5a809
movq -0x20(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x5a811
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x5a811
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
addl $0x201, %eax # imm = 0x201
addl $0x1, %eax
addl $0x100, %eax # imm = 0x100
addl $0x1, %eax
addl $0x2, %eax
addl $0x100, %eax # imm = 0x100
addl $0x1, %eax
addl $0x9, %eax
movslq %eax, %rdi
addq -0x40(%rbp), %rdi
callq 0x145c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x4c650
addq $0x1, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x5a885
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
jmp 0x5a904
movq -0x20(%rbp), %rax
movq 0x368(%rax), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
je 0x5a8e0
cmpl $0xff, -0x14(%rbp)
jle 0x5a8c8
movq -0x20(%rbp), %rdi
leaq 0x265f0(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movl $0x7eb, %esi # imm = 0x7EB
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x307d0
jmp 0x5aa13
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x5a8e2
jmp 0x5a8e2
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x14370
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x5a925
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x5a932
leaq 0xba44(%rip), %rax # 0x66370
movq %rax, -0x60(%rbp)
jmp 0x5a932
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x100, %edx # imm = 0x100
callq 0x4c650
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x5a99e
jmp 0x5a965
movq -0x20(%rbp), %rax
movq 0x2f0(%rax), %rax
movl (%rax), %eax
movzwl %ax, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movl -0x44(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x80000, %rax # imm = 0x80000
cmpq $0x0, %rax
je 0x5a9d7
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rsi
movl $0x100, %edx # imm = 0x100
callq 0x4c650
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x35470
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movl $0x11, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x31620
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
callq 0x14530
movl -0x34(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| send_change_user_packet:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_20], rax
mov [rbp+var_34], 1
mov rax, [rbp+var_20]
cmp qword ptr [rax+480h], 0
jz short loc_5A809
mov rax, [rbp+var_20]
mov rax, [rax+480h]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short loc_5A811
loc_5A809:
xor eax, eax
mov [rbp+var_50], rax
jmp short $+2
loc_5A811:
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov eax, [rbp+var_14]
add eax, 201h
add eax, 1
add eax, 100h
add eax, 1
add eax, 2
add eax, 100h
add eax, 1
add eax, 9
movsxd rdi, eax
add rdi, [rbp+var_40]
call _malloc
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rsi, [rax+2B8h]
mov edx, 200h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
cmp [rbp+var_14], 0
jnz short loc_5A885
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
jmp short loc_5A904
loc_5A885:
mov rax, [rbp+var_20]
mov rax, [rax+368h]
and rax, 8000h
cmp rax, 0
jz short loc_5A8E0
cmp [rbp+var_14], 0FFh
jle short loc_5A8C8
mov rdi, [rbp+var_20]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7EBh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp loc_5AA13
loc_5A8C8:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
jmp short loc_5A8E2
loc_5A8E0:
jmp short $+2
loc_5A8E2:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_30]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_30], rax
loc_5A904:
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+28h], 0
jz short loc_5A925
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_60], rax
jmp short loc_5A932
loc_5A925:
lea rax, a12+4; ""
mov [rbp+var_60], rax
jmp short $+2
loc_5A932:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_60]
mov edx, 100h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rax, [rax+370h]
and rax, 200h
cmp rax, 0
jz short loc_5A99E
jmp short $+2
loc_5A965:
mov rax, [rbp+var_20]
mov rax, [rax+2F0h]
mov eax, [rax]
movzx eax, ax
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
mov cl, al
mov rax, [rbp+var_30]
mov [rax], cl
mov eax, [rbp+var_44]
shr eax, 8
mov cl, al
mov rax, [rbp+var_30]
mov [rax+1], cl
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
loc_5A99E:
mov rax, [rbp+var_20]
mov rax, [rax+370h]
and rax, 80000h
cmp rax, 0
jz short loc_5A9D7
mov rdi, [rbp+var_30]
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rsi, [rax+8]
mov edx, 100h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
loc_5A9D7:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_30]
call ma_send_connect_attr
mov [rbp+var_30], rax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
sub rcx, rax
mov esi, 11h
mov r8d, 1
xor eax, eax
mov r9d, eax
call ma_simple_command
mov [rbp+var_34], eax
loc_5AA13:
mov rdi, [rbp+var_28]
call _free
mov eax, [rbp+var_34]
add rsp, 60h
pop rbp
retn
| long long send_change_user_packet(long long a1, long long a2, int a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v5; // rax
long long v7; // [rsp+10h] [rbp-50h]
__int16 v8; // [rsp+1Ch] [rbp-44h]
unsigned int v9; // [rsp+2Ch] [rbp-34h]
_BYTE *v10; // [rsp+30h] [rbp-30h]
_BYTE *v11; // [rsp+30h] [rbp-30h]
_BYTE *v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+30h] [rbp-30h]
_BYTE *v14; // [rsp+38h] [rbp-28h]
long long v15; // [rsp+40h] [rbp-20h]
v15 = *(_QWORD *)(a1 + 24);
v9 = 1;
if ( *(_QWORD *)(v15 + 1152) )
v7 = *(_QWORD *)(*(_QWORD *)(v15 + 1152) + 120LL);
else
v7 = 0LL;
v14 = (_BYTE *)malloc(v7 + a3 + 1039);
v10 = ma_strmake(v14, *(_BYTE **)(v15 + 696), 512LL) + 1;
if ( a3 )
{
if ( (*(_QWORD *)(v15 + 872) & 0x8000LL) != 0 )
{
if ( a3 > 255 )
{
my_set_error(v15, 0x7EBu, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_19;
}
v4 = v10++;
*v4 = a3;
}
memcpy(v10, a2, a3);
v11 = &v10[a3];
}
else
{
v3 = v10;
v11 = v10 + 1;
*v3 = 0;
}
if ( *(_QWORD *)(a1 + 40) )
v5 = ma_strmake(v11, *(_BYTE **)(a1 + 40), 256LL);
else
v5 = ma_strmake(v11, "", 256LL);
v12 = v5 + 1;
if ( (*(_QWORD *)(v15 + 880) & 0x200LL) != 0 )
{
v8 = **(_DWORD **)(v15 + 752);
*v12 = **(_DWORD **)(v15 + 752);
v5[2] = HIBYTE(v8);
v12 = v5 + 3;
}
if ( (*(_QWORD *)(v15 + 880) & 0x80000LL) != 0 )
v12 = ma_strmake(v12, *(_BYTE **)(*(_QWORD *)(a1 + 32) + 8LL), 256LL) + 1;
v13 = ma_send_connect_attr(v15, (long long)v12);
v9 = ma_simple_command(v15, 0x11u, (long long)v14, v13 - (_QWORD)v14, 1, 0LL);
LABEL_19:
free(v14);
return v9;
}
| send_change_user_packet:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x34],0x1
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0015a809
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015a811
LAB_0015a809:
XOR EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015a811
LAB_0015a811:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x201
ADD EAX,0x1
ADD EAX,0x100
ADD EAX,0x1
ADD EAX,0x2
ADD EAX,0x100
ADD EAX,0x1
ADD EAX,0x9
MOVSXD RDI,EAX
ADD RDI,qword ptr [RBP + -0x40]
CALL 0x001145c0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x2b8]
MOV EDX,0x200
CALL 0x0014c650
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0015a885
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
JMP 0x0015a904
LAB_0015a885:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x368]
AND RAX,0x8000
CMP RAX,0x0
JZ 0x0015a8e0
CMP dword ptr [RBP + -0x14],0xff
JLE 0x0015a8c8
MOV RDI,qword ptr [RBP + -0x20]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7eb
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x001307d0
JMP 0x0015aa13
LAB_0015a8c8:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
JMP 0x0015a8e2
LAB_0015a8e0:
JMP 0x0015a8e2
LAB_0015a8e2:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
CALL 0x00114370
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_0015a904:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0015a925
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0015a932
LAB_0015a925:
LEA RAX,[0x166370]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0015a932
LAB_0015a932:
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,0x100
CALL 0x0014c650
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0015a99e
JMP 0x0015a965
LAB_0015a965:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV EAX,dword ptr [RAX]
MOVZX EAX,AX
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x44]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
LAB_0015a99e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x80000
CMP RAX,0x0
JZ 0x0015a9d7
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,0x100
CALL 0x0014c650
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0015a9d7:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00135470
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV ESI,0x11
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
CALL 0x00131620
MOV dword ptr [RBP + -0x34],EAX
LAB_0015aa13:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00114530
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x60
POP RBP
RET
|
int4 send_change_user_packet(long param_1,void *param_2,int param_3)
{
long lVar1;
uint uVar2;
void *__ptr;
long lVar3;
int *local_68;
long local_58;
int4 local_3c;
int1 *local_38;
lVar1 = *(long *)(param_1 + 0x18);
local_3c = 1;
if (*(long *)(lVar1 + 0x480) == 0) {
local_58 = 0;
}
else {
local_58 = *(long *)(*(long *)(lVar1 + 0x480) + 0x78);
}
__ptr = malloc((param_3 + 0x40f) + local_58);
lVar3 = ma_strmake(__ptr,*(int8 *)(lVar1 + 0x2b8),0x200);
local_38 = (int1 *)(lVar3 + 1);
if (param_3 == 0) {
*local_38 = 0;
local_38 = (int1 *)(lVar3 + 2);
}
else {
if ((*(ulong *)(lVar1 + 0x368) & 0x8000) != 0) {
if (0xff < param_3) {
my_set_error(lVar1,0x7eb,SQLSTATE_UNKNOWN,0);
goto LAB_0015aa13;
}
*local_38 = (char)param_3;
local_38 = (int1 *)(lVar3 + 2);
}
memcpy(local_38,param_2,(long)param_3);
local_38 = local_38 + param_3;
}
if (*(long *)(param_1 + 0x28) == 0) {
local_68 = &DAT_00166370;
}
else {
local_68 = *(int **)(param_1 + 0x28);
}
lVar3 = ma_strmake(local_38,local_68,0x100);
local_38 = (int1 *)(lVar3 + 1);
if ((*(ulong *)(lVar1 + 0x370) & 0x200) != 0) {
uVar2 = **(uint **)(lVar1 + 0x2f0) & 0xffff;
*local_38 = (char)uVar2;
*(char *)(lVar3 + 2) = (char)(uVar2 >> 8);
local_38 = (int1 *)(lVar3 + 3);
}
if ((*(ulong *)(lVar1 + 0x370) & 0x80000) != 0) {
lVar3 = ma_strmake(local_38,*(int8 *)(*(long *)(param_1 + 0x20) + 8),0x100);
local_38 = (int1 *)(lVar3 + 1);
}
lVar3 = ma_send_connect_attr(lVar1,local_38);
local_3c = ma_simple_command(lVar1,0x11,__ptr,lVar3 - (long)__ptr,1,0);
LAB_0015aa13:
free(__ptr);
return local_3c;
}
| |
23,881 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan() | llama.cpp/common/json.hpp | token_type scan()
{
// initially, skip the BOM
if (position.chars_read_total == 0 && !skip_bom())
{
error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return token_type::parse_error;
}
// read next character and ignore whitespace
skip_whitespace();
// ignore comments
while (ignore_comments && current == '/')
{
if (!scan_comment())
{
return token_type::parse_error;
}
// skip following whitespace
skip_whitespace();
}
switch (current)
{
// structural characters
case '[':
return token_type::begin_array;
case ']':
return token_type::end_array;
case '{':
return token_type::begin_object;
case '}':
return token_type::end_object;
case ':':
return token_type::name_separator;
case ',':
return token_type::value_separator;
// literals
case 't':
{
std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
}
case 'f':
{
std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
}
case 'n':
{
std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
}
// string
case '\"':
return scan_string();
// number
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return scan_number();
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
default:
error_message = "invalid literal";
return token_type::parse_error;
}
} | 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>>>>>::scan():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x854df
movq %rbx, %rdi
callq 0x85676
testb %al, %al
je 0x855a1
movabsq $0x100002600, %r14 # imm = 0x100002600
movq %rbx, %rdi
callq 0x22692
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x85529
btq %rax, %r14
jb 0x854e9
jmp 0x85529
movq %rbx, %rdi
callq 0x856b8
testb %al, %al
je 0x855ac
movq %rbx, %rdi
callq 0x22692
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x85529
btq %rax, %r14
jb 0x85512
cmpl $0x2f, %eax
jne 0x85534
cmpb $0x0, 0x10(%rbx)
jne 0x85502
cmpl $0x5a, %eax
jg 0x85564
leal -0x22(%rax), %ecx
cmpl $0x18, %ecx
ja 0x855ee
leaq 0x8f480(%rip), %rax # 0x1149cc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x85c22
cmpl $0x6d, %eax
jle 0x855b9
cmpl $0x7a, %eax
jg 0x855fc
cmpl $0x6e, %eax
je 0x85636
cmpl $0x74, %eax
jne 0x8560d
leaq 0xc(%rsp), %rsi
movl $0x65757274, (%rsi) # imm = 0x65757274
movl $0x4, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x8564e
leaq 0x96154(%rip), %rax # 0x11b6fc
movq %rax, 0x70(%rbx)
movl $0xe, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
cmpl $0x5b, %eax
je 0x85662
cmpl $0x5d, %eax
je 0x8566c
cmpl $0x66, %eax
jne 0x8560d
leaq 0x10(%rsp), %rsi
movb $0x65, 0x4(%rsi)
movl $0x736c6166, (%rsi) # imm = 0x736C6166
movl $0x5, %edx
movq %rbx, %rdi
movl $0x2, %ecx
jmp 0x8564e
incl %eax
cmpl $0x2, %eax
jae 0x8560d
movl $0xf, %eax
jmp 0x855b1
cmpl $0x7b, %eax
je 0x85658
cmpl $0x7d, %eax
jne 0x8560d
movl $0xb, %eax
jmp 0x855b1
leaq 0x96115(%rip), %rax # 0x11b729
jmp 0x855a8
movl $0xc, %eax
jmp 0x855b1
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x857b0
movl $0xd, %eax
jmp 0x855b1
leaq 0x8(%rsp), %rsi
movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E
movl $0x4, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0x85734
jmp 0x855b1
movl $0x9, %eax
jmp 0x855b1
movl $0x8, %eax
jmp 0x855b1
movl $0xa, %eax
jmp 0x855b1
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
cmp qword ptr [rdi+20h], 0
jnz short loc_854DF
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void)
test al, al
jz loc_855A1
loc_854DF:
mov r14, 100002600h
loc_854E9:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_85529
bt r14, rax
jb short loc_854E9
jmp short loc_85529
loc_85502:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void)
test al, al
jz loc_855AC
loc_85512:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_85529
bt r14, rax
jb short loc_85512
loc_85529:
cmp eax, 2Fh ; '/'
jnz short loc_85534
cmp byte ptr [rbx+10h], 0
jnz short loc_85502
loc_85534:
cmp eax, 5Ah ; 'Z'
jg short loc_85564
lea ecx, [rax-22h]; switch 25 cases
cmp ecx, 18h
ja def_85553; jumptable 0000000000085553 default case
lea rax, jpt_85553
movsxd rcx, ds:(jpt_85553 - 1149CCh)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_85555:
mov rdi, rbx; jumptable 0000000000085553 cases 45,48-57
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void)
loc_85564:
cmp eax, 6Dh ; 'm'
jle short loc_855B9
cmp eax, 7Ah ; 'z'
jg loc_855FC
cmp eax, 6Eh ; 'n'
jz loc_85636
cmp eax, 74h ; 't'
jnz loc_8560D; jumptable 0000000000085553 cases 35-43,46,47
lea rsi, [rsp+28h+var_1C]
mov dword ptr [rsi], 65757274h
mov edx, 4
mov rdi, rbx
mov ecx, 1
jmp loc_8564E
loc_855A1:
lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "...
loc_855A8:
mov [rbx+70h], rax
loc_855AC:
mov eax, 0Eh
loc_855B1:
add rsp, 18h
pop rbx
pop r14
retn
loc_855B9:
cmp eax, 5Bh ; '['
jz loc_85662
cmp eax, 5Dh ; ']'
jz loc_8566C
cmp eax, 66h ; 'f'
jnz short loc_8560D; jumptable 0000000000085553 cases 35-43,46,47
lea rsi, [rsp+28h+var_18]
mov byte ptr [rsi+4], 65h ; 'e'
mov dword ptr [rsi], 736C6166h
mov edx, 5
mov rdi, rbx
mov ecx, 2
jmp short loc_8564E
def_85553:
inc eax; jumptable 0000000000085553 default case
cmp eax, 2
jnb short loc_8560D; jumptable 0000000000085553 cases 35-43,46,47
mov eax, 0Fh
jmp short loc_855B1
loc_855FC:
cmp eax, 7Bh ; '{'
jz short loc_85658
cmp eax, 7Dh ; '}'
jnz short loc_8560D; jumptable 0000000000085553 cases 35-43,46,47
mov eax, 0Bh
jmp short loc_855B1
loc_8560D:
lea rax, aInvalidLiteral; jumptable 0000000000085553 cases 35-43,46,47
jmp short loc_855A8
loc_85616:
mov eax, 0Ch; jumptable 0000000000085553 case 58
jmp short loc_855B1
loc_8561D:
mov rdi, rbx; jumptable 0000000000085553 case 34
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void)
loc_8562C:
mov eax, 0Dh; jumptable 0000000000085553 case 44
jmp loc_855B1
loc_85636:
lea rsi, [rsp+28h+var_20]
mov dword ptr [rsi], 6C6C756Eh
mov edx, 4
mov rdi, rbx
mov ecx, 3
loc_8564E:
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
jmp loc_855B1
loc_85658:
mov eax, 9
jmp loc_855B1
loc_85662:
mov eax, 8
jmp loc_855B1
loc_8566C:
mov eax, 0Ah
jmp loc_855B1
| 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>>>::scan(
__m128i *a1)
{
long long v1; // r14
unsigned long long v2; // rax
long long result; // rax
int *v4; // rsi
long long v5; // rdx
long long v6; // rcx
const char *v7; // rax
int v8; // [rsp+8h] [rbp-20h] BYREF
int v9; // [rsp+Ch] [rbp-1Ch] BYREF
_BYTE v10[24]; // [rsp+10h] [rbp-18h] BYREF
if ( a1[2].m128i_i64[0]
|| (unsigned __int8)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>>>::skip_bom(a1) )
{
v1 = 0x100002600LL;
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v2 = a1[1].m128i_u32[1];
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
while ( (_DWORD)v2 == 47 && a1[1].m128i_i8[0] )
{
if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) )
return 14LL;
do
{
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v2 = a1[1].m128i_u32[1];
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
}
if ( (int)v2 <= 90 )
{
switch ( (int)v2 )
{
case '"':
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(a1);
break;
case '#':
case '$':
case '%':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case '.':
case '/':
goto LABEL_33;
case ',':
result = 13LL;
break;
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1);
break;
case ':':
result = 12LL;
break;
default:
if ( (unsigned int)(v2 + 1) >= 2 )
goto LABEL_33;
result = 15LL;
break;
}
return result;
}
if ( (int)v2 <= 109 )
{
switch ( (_DWORD)v2 )
{
case '[':
return 8LL;
case ']':
return 10LL;
case 'f':
v4 = (int *)v10;
qmemcpy(v10, "false", 5);
v5 = 5LL;
v6 = 2LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v4,
v5,
v6);
}
}
else if ( (int)v2 > 122 )
{
if ( (_DWORD)v2 == 123 )
return 9LL;
if ( (_DWORD)v2 == 125 )
return 11LL;
}
else
{
if ( (_DWORD)v2 == 110 )
{
v4 = &v8;
v8 = 1819047278;
v5 = 4LL;
v6 = 3LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v4,
v5,
v6);
}
if ( (_DWORD)v2 == 116 )
{
v4 = &v9;
v9 = 1702195828;
v5 = 4LL;
v6 = 1LL;
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(
a1,
v4,
v5,
v6);
}
}
LABEL_33:
v7 = "invalid literal";
}
else
{
v7 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
}
a1[7].m128i_i64[0] = (long long)v7;
return 14LL;
}
| scan:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x001854df
MOV RDI,RBX
CALL 0x00185676
TEST AL,AL
JZ 0x001855a1
LAB_001854df:
MOV R14,0x100002600
LAB_001854e9:
MOV RDI,RBX
CALL 0x00122692
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x00185529
BT R14,RAX
JC 0x001854e9
JMP 0x00185529
LAB_00185502:
MOV RDI,RBX
CALL 0x001856b8
TEST AL,AL
JZ 0x001855ac
LAB_00185512:
MOV RDI,RBX
CALL 0x00122692
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x00185529
BT R14,RAX
JC 0x00185512
LAB_00185529:
CMP EAX,0x2f
JNZ 0x00185534
CMP byte ptr [RBX + 0x10],0x0
JNZ 0x00185502
LAB_00185534:
CMP EAX,0x5a
JG 0x00185564
LEA ECX,[RAX + -0x22]
CMP ECX,0x18
JA 0x001855ee
LEA RAX,[0x2149cc]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_2d:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x00185c22
LAB_00185564:
CMP EAX,0x6d
JLE 0x001855b9
CMP EAX,0x7a
JG 0x001855fc
CMP EAX,0x6e
JZ 0x00185636
CMP EAX,0x74
JNZ 0x0018560d
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x65757274
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x1
JMP 0x0018564e
LAB_001855a1:
LEA RAX,[0x21b6fc]
LAB_001855a8:
MOV qword ptr [RBX + 0x70],RAX
LAB_001855ac:
MOV EAX,0xe
LAB_001855b1:
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_001855b9:
CMP EAX,0x5b
JZ 0x00185662
CMP EAX,0x5d
JZ 0x0018566c
CMP EAX,0x66
JNZ 0x0018560d
LEA RSI,[RSP + 0x10]
MOV byte ptr [RSI + 0x4],0x65
MOV dword ptr [RSI],0x736c6166
MOV EDX,0x5
MOV RDI,RBX
MOV ECX,0x2
JMP 0x0018564e
default:
INC EAX
CMP EAX,0x2
JNC 0x0018560d
MOV EAX,0xf
JMP 0x001855b1
LAB_001855fc:
CMP EAX,0x7b
JZ 0x00185658
CMP EAX,0x7d
JNZ 0x0018560d
MOV EAX,0xb
JMP 0x001855b1
caseD_23:
LEA RAX,[0x21b729]
JMP 0x001855a8
caseD_3a:
MOV EAX,0xc
JMP 0x001855b1
caseD_22:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x001857b0
caseD_2c:
MOV EAX,0xd
JMP 0x001855b1
LAB_00185636:
LEA RSI,[RSP + 0x8]
MOV dword ptr [RSI],0x6c6c756e
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x3
LAB_0018564e:
CALL 0x00185734
JMP 0x001855b1
LAB_00185658:
MOV EAX,0x9
JMP 0x001855b1
LAB_00185662:
MOV EAX,0x8
JMP 0x001855b1
LAB_0018566c:
MOV EAX,0xa
JMP 0x001855b1
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan(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)
{
char cVar1;
int iVar2;
ulong uVar3;
int8 uVar4;
char *pcVar5;
int8 uVar6;
int4 *puVar7;
int4 local_20;
int4 local_1c;
int4 local_18;
int1 local_14;
if ((*(long *)(this + 0x20) != 0) || (cVar1 = skip_bom(this), cVar1 != '\0')) {
do {
get(this);
uVar3 = (ulong)*(uint *)(this + 0x14);
if (0x20 < uVar3) break;
} while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0);
do {
iVar2 = (int)uVar3;
if ((iVar2 != 0x2f) ||
(this[0x10] ==
(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>>>
)0x0)) goto LAB_00185534;
cVar1 = scan_comment(this);
if (cVar1 == '\0') goto LAB_001855ac;
do {
get(this);
uVar3 = (ulong)*(uint *)(this + 0x14);
if (0x20 < uVar3) break;
} while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0);
} while( true );
}
pcVar5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LAB_001855a8;
LAB_00185534:
if (0x5a < iVar2) {
if (iVar2 < 0x6e) {
if (iVar2 == 0x5b) {
return 8;
}
if (iVar2 == 0x5d) {
return 10;
}
if (iVar2 == 0x66) {
puVar7 = &local_18;
local_14 = 0x65;
local_18 = 0x736c6166;
uVar6 = 5;
uVar4 = 2;
goto LAB_0018564e;
}
}
else if (iVar2 < 0x7b) {
if (iVar2 == 0x6e) {
puVar7 = &local_20;
local_20 = 0x6c6c756e;
uVar6 = 4;
uVar4 = 3;
LAB_0018564e:
uVar4 = scan_literal(this,puVar7,uVar6,uVar4);
return uVar4;
}
if (iVar2 == 0x74) {
puVar7 = &local_1c;
local_1c = 0x65757274;
uVar6 = 4;
uVar4 = 1;
goto LAB_0018564e;
}
}
else {
if (iVar2 == 0x7b) {
return 9;
}
if (iVar2 == 0x7d) {
return 0xb;
}
}
goto switchD_00185553_caseD_23;
}
switch(iVar2) {
case 0x22:
uVar4 = scan_string(this);
return uVar4;
case 0x2c:
uVar4 = 0xd;
break;
case 0x2d:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar4 = scan_number(this);
return uVar4;
case 0x3a:
uVar4 = 0xc;
break;
default:
if (iVar2 + 1U < 2) {
return 0xf;
}
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2e:
case 0x2f:
switchD_00185553_caseD_23:
pcVar5 = "invalid literal";
LAB_001855a8:
*(char **)(this + 0x70) = pcVar5;
LAB_001855ac:
uVar4 = 0xe;
}
return uVar4;
}
| |
23,882 | Opt::parse(int, char const**) | llama.cpp/examples/run/run.cpp | int parse(int argc, const char ** argv) {
bool options_parsing = true;
for (int i = 1, positional_args_i = 0; i < argc; ++i) {
int ret = parse_options_with_value(argc, argv, i, options_parsing);
if (ret == 0) {
continue;
} else if (ret == 1) {
return ret;
}
ret = parse_options(argv, i, options_parsing);
if (ret == 0) {
continue;
} else if (ret == 1) {
return ret;
}
if (parse_positional_args(argv, i, positional_args_i)) {
return 1;
}
}
if (model_.empty()) {
return 1;
}
return 0;
} | O3 | cpp | Opt::parse(int, char const**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb $0x1, 0xf(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x2, %esi
jl 0x235f4
movq %rdx, %r14
movl %esi, %ebp
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %r12
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x23aa2
testl %eax, %eax
je 0x235e6
cmpl $0x1, %eax
je 0x23603
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x23caa
testl %eax, %eax
je 0x235e6
cmpl $0x1, %eax
je 0x23603
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x23d9a
testl %eax, %eax
jne 0x23603
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
cmpl %ebp, %eax
jl 0x2359b
xorl %eax, %eax
cmpq $0x0, 0xc8(%rbx)
sete %al
jmp 0x23608
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN3Opt5parseEiPPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov [rsp+48h+var_39], 1
mov [rsp+48h+var_38], 1
mov [rsp+48h+var_34], 0
cmp esi, 2
jl short loc_235F4
mov r14, rdx
mov ebp, esi
lea r15, [rsp+48h+var_38]
lea r12, [rsp+48h+var_39]
lea r13, [rsp+48h+var_34]
loc_2359B:
mov rdi, rbx; this
mov esi, ebp; int
mov rdx, r14; char **
mov rcx, r15; int *
mov r8, r12; bool *
call _ZN3Opt24parse_options_with_valueEiPPKcRiRb; Opt::parse_options_with_value(int,char const**,int &,bool &)
test eax, eax
jz short loc_235E6
cmp eax, 1
jz short loc_23603
mov rdi, rbx; this
mov rsi, r14; char **
mov rdx, r15; int *
mov rcx, r12; bool *
call _ZN3Opt13parse_optionsEPPKcRiRb; Opt::parse_options(char const**,int &,bool &)
test eax, eax
jz short loc_235E6
cmp eax, 1
jz short loc_23603
mov rdi, rbx; this
mov rsi, r14; char **
mov rdx, r15; int *
mov rcx, r13; int *
call _ZN3Opt21parse_positional_argsEPPKcRiS3_; Opt::parse_positional_args(char const**,int &,int &)
test eax, eax
jnz short loc_23603
loc_235E6:
mov eax, [rsp+48h+var_38]
inc eax
mov [rsp+48h+var_38], eax
cmp eax, ebp
jl short loc_2359B
loc_235F4:
xor eax, eax
cmp qword ptr [rbx+0C8h], 0
setz al
jmp short loc_23608
loc_23603:
mov eax, 1
loc_23608:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 Opt::parse(Opt *this, int a2, const char **a3)
{
int v4; // eax
int v5; // eax
bool v7; // [rsp+Fh] [rbp-39h] BYREF
int v8; // [rsp+10h] [rbp-38h] BYREF
int v9[13]; // [rsp+14h] [rbp-34h] BYREF
v7 = 1;
v8 = 1;
v9[0] = 0;
if ( a2 < 2 )
return *((_QWORD *)this + 25) == 0LL;
while ( 1 )
{
v4 = Opt::parse_options_with_value(this, a2, a3, &v8, &v7);
if ( v4 )
{
if ( v4 == 1 )
break;
v5 = Opt::parse_options(this, a3, &v8, &v7);
if ( v5 )
{
if ( v5 == 1 || (unsigned int)Opt::parse_positional_args(this, a3, &v8, v9) )
break;
}
}
if ( ++v8 >= a2 )
return *((_QWORD *)this + 25) == 0LL;
}
return 1LL;
}
| parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV byte ptr [RSP + 0xf],0x1
MOV dword ptr [RSP + 0x10],0x1
MOV dword ptr [RSP + 0x14],0x0
CMP ESI,0x2
JL 0x001235f4
MOV R14,RDX
MOV EBP,ESI
LEA R15,[RSP + 0x10]
LEA R12,[RSP + 0xf]
LEA R13,[RSP + 0x14]
LAB_0012359b:
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,R14
MOV RCX,R15
MOV R8,R12
CALL 0x00123aa2
TEST EAX,EAX
JZ 0x001235e6
CMP EAX,0x1
JZ 0x00123603
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00123caa
TEST EAX,EAX
JZ 0x001235e6
CMP EAX,0x1
JZ 0x00123603
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
CALL 0x00123d9a
TEST EAX,EAX
JNZ 0x00123603
LAB_001235e6:
MOV EAX,dword ptr [RSP + 0x10]
INC EAX
MOV dword ptr [RSP + 0x10],EAX
CMP EAX,EBP
JL 0x0012359b
LAB_001235f4:
XOR EAX,EAX
CMP qword ptr [RBX + 0xc8],0x0
SETZ AL
JMP 0x00123608
LAB_00123603:
MOV EAX,0x1
LAB_00123608:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Opt::parse(int, char const**) */
bool __thiscall Opt::parse(Opt *this,int param_1,char **param_2)
{
int iVar1;
bool local_39;
int local_38 [2];
local_39 = true;
local_38[0] = 1;
local_38[1] = 0;
if (1 < param_1) {
do {
iVar1 = parse_options_with_value(this,param_1,param_2,local_38,&local_39);
if ((iVar1 != 0) &&
((iVar1 == 1 ||
((iVar1 = parse_options(this,param_2,local_38,&local_39), iVar1 != 0 &&
((iVar1 == 1 ||
(iVar1 = parse_positional_args(this,param_2,local_38,local_38 + 1), iVar1 != 0)))))))) {
return true;
}
local_38[0] = local_38[0] + 1;
} while (local_38[0] < param_1);
}
return *(long *)(this + 200) == 0;
}
| |
23,883 | mthd_stmt_read_prepare_response | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt)
{
ulong packet_length;
uchar *p;
if ((packet_length= ma_net_safe_read(stmt->mysql)) == packet_error)
return(1);
p= (uchar *)stmt->mysql->net.read_pos;
if (0xFF == p[0]) /* Error occurred */
{
return(1);
}
p++;
stmt->stmt_id= uint4korr(p);
p+= 4;
stmt->field_count= uint2korr(p);
p+= 2;
stmt->param_count= uint2korr(p);
p+= 2;
/* filler */
p++;
/* for backward compatibility we also update mysql->warning_count */
stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p);
/* metadata not supported yet */
if (stmt->param_count &&
stmt->mysql->methods->db_stmt_get_param_metadata(stmt))
{
return 1;
}
/* allocated bind buffer for parameters */
if (stmt->field_count &&
stmt->mysql->methods->db_stmt_get_result_metadata(stmt))
{
return 1;
}
if (stmt->param_count)
{
if (stmt->prebind_params)
{
if (stmt->prebind_params != stmt->param_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0);
stmt->param_count= stmt->prebind_params;
return 1;
}
} else {
if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND));
}
}
/* allocated bind buffer for result */
if (stmt->field_count)
{
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count);
}
stmt->state = MYSQL_STMT_PREPARED;
return(0);
} | O0 | c | mthd_stmt_read_prepare_response:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3cb80
movq %rax, -0x18(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x511e0
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
movl $0xff, %eax
cmpl %ecx, %eax
jne 0x51209
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x388(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x51330
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x51330
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x51364
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x51364
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x514cd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x378(%rax)
je 0x51421
movq -0x10(%rbp), %rax
movl 0x378(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x64(%rcx), %eax
je 0x5141c
jmp 0x5139c
movq -0x10(%rbp), %rax
movl $0x7f2, 0x108(%rax) # imm = 0x7F2
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e6394(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e637a(%rip), %rax # 0x237760
movq 0x110(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movq -0x10(%rbp), %rax
movl 0x378(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x515a0
jmp 0x514cb
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
imulq $0x70, %rax, %rsi
callq 0x4b880
movq -0x10(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x514b1
jmp 0x51445
movq -0x10(%rbp), %rax
movl $0x7d8, 0x108(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e62eb(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e62d1(%rip), %rax # 0x237760
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
imulq $0x70, %rax, %rdx
xorl %esi, %esi
callq 0x37300
jmp 0x514cd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x51591
movq -0x10(%rbp), %rax
movq 0x340(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
imulq $0x70, %rax, %rsi
callq 0x4b880
movq -0x10(%rbp), %rcx
movq %rax, 0x78(%rcx)
cmpq $0x0, %rax
jne 0x51577
jmp 0x5150e
movq -0x10(%rbp), %rax
movl $0x7d8, 0x108(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e6222(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e6208(%rip), %rax # 0x237760
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x515a0
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
imulq $0x70, %rax, %rdx
xorl %esi, %esi
callq 0x37300
movq -0x10(%rbp), %rax
movl $0x1, 0x50(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| mthd_stmt_read_prepare_response:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_18], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_511E0
mov [rbp+var_1], 1
jmp loc_515A0
loc_511E0:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+20h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax]
mov eax, 0FFh
cmp eax, ecx
jnz short loc_51209
mov [rbp+var_1], 1
jmp loc_515A0
loc_51209:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+3]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rax, [rbp+var_20]
add rax, 4
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+60h], ecx
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+64h], ecx
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rax+388h], ecx
mov rax, [rbp+var_10]
cmp dword ptr [rax+64h], 0
jz short loc_51330
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+58h]
mov rdi, [rbp+var_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_51330
mov [rbp+var_1], 1
jmp loc_515A0
loc_51330:
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jz short loc_51364
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+50h]
mov rdi, [rbp+var_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_51364
mov [rbp+var_1], 1
jmp loc_515A0
loc_51364:
mov rax, [rbp+var_10]
cmp dword ptr [rax+64h], 0
jz loc_514CD
mov rax, [rbp+var_10]
cmp dword ptr [rax+378h], 0
jz loc_51421
mov rax, [rbp+var_10]
mov eax, [rax+378h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+64h]
jz loc_5141C
jmp short $+2
loc_5139C:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7F2h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+110h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov rax, [rbp+var_10]
mov ecx, [rax+378h]
mov rax, [rbp+var_10]
mov [rax+64h], ecx
mov [rbp+var_1], 1
jmp loc_515A0
loc_5141C:
jmp loc_514CB
loc_51421:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov eax, [rax+64h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov rcx, [rbp+var_10]
mov [rcx+70h], rax
cmp rax, 0
jnz short loc_514B1
jmp short $+2
loc_51445:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp loc_515A0
loc_514B1:
mov rax, [rbp+var_10]
mov rdi, [rax+70h]
mov rax, [rbp+var_10]
mov eax, [rax+64h]
imul rdx, rax, 70h ; 'p'
xor esi, esi
call _memset
loc_514CB:
jmp short $+2
loc_514CD:
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jz loc_51591
mov rax, [rbp+var_10]
mov rax, [rax+340h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rax, [rbp+var_10]
mov eax, [rax+60h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov rcx, [rbp+var_10]
mov [rcx+78h], rax
cmp rax, 0
jnz short loc_51577
jmp short $+2
loc_5150E:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp short loc_515A0
loc_51577:
mov rax, [rbp+var_10]
mov rdi, [rax+78h]
mov rax, [rbp+var_10]
mov eax, [rax+60h]
imul rdx, rax, 70h ; 'p'
xor esi, esi
call _memset
loc_51591:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 1
mov [rbp+var_1], 0
loc_515A0:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char mthd_stmt_read_prepare_response(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
int v6; // ecx
char *v7; // rax
char *v8; // rax
unsigned __int8 *v10; // [rsp+10h] [rbp-20h]
unsigned __int8 *v11; // [rsp+10h] [rbp-20h]
if ( ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6) != 0xFFFFFFFFLL )
{
v10 = *(unsigned __int8 **)(*(_QWORD *)(a1 + 56) + 32LL);
if ( *v10 == 255 )
return 1;
v11 = v10 + 1;
*(_QWORD *)(a1 + 64) = (v11[3] << 24) + (v11[2] << 16) + (v11[1] << 8) + (unsigned int)*v11;
v11 += 4;
*(_DWORD *)(a1 + 96) = (unsigned __int16)((v11[1] << 8) + *v11);
v11 += 2;
*(_DWORD *)(a1 + 100) = (unsigned __int16)((v11[1] << 8) + *v11);
v6 = (unsigned __int16)((v11[4] << 8) + v11[3]);
*(_DWORD *)(a1 + 240) = v6;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL) = v6;
if ( *(_DWORD *)(a1 + 100)
&& (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 88LL))(a1) )
{
return 1;
}
if ( *(_DWORD *)(a1 + 96)
&& (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 80LL))(a1) )
{
return 1;
}
if ( *(_DWORD *)(a1 + 100) )
{
if ( *(_DWORD *)(a1 + 888) )
{
if ( *(_DWORD *)(a1 + 888) != *(_DWORD *)(a1 + 100) )
{
*(_DWORD *)(a1 + 264) = 2034;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[34], 512LL);
*(_BYTE *)(a1 + 779) = 0;
*(_DWORD *)(a1 + 100) = *(_DWORD *)(a1 + 888);
return 1;
}
}
else
{
v7 = ma_alloc_root((_QWORD **)a1, 112LL * *(unsigned int *)(a1 + 100));
*(_QWORD *)(a1 + 112) = v7;
if ( !v7 )
goto LABEL_17;
memset(*(_QWORD *)(a1 + 112), 0LL, 112LL * *(unsigned int *)(a1 + 100));
}
}
if ( !*(_DWORD *)(a1 + 96) )
{
LABEL_22:
*(_DWORD *)(a1 + 80) = 1;
return 0;
}
v8 = ma_alloc_root(*(_QWORD ***)(a1 + 832), 112LL * *(unsigned int *)(a1 + 96));
*(_QWORD *)(a1 + 120) = v8;
if ( v8 )
{
memset(*(_QWORD *)(a1 + 120), 0LL, 112LL * *(unsigned int *)(a1 + 96));
goto LABEL_22;
}
LABEL_17:
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[8], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
return 1;
}
| mthd_stmt_read_prepare_response:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0013cb80
MOV qword ptr [RBP + -0x18],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x001511e0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_001511e0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX]
MOV EAX,0xff
CMP EAX,ECX
JNZ 0x00151209
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_00151209:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x64],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x388],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x64],0x0
JZ 0x00151330
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00151330
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_00151330:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JZ 0x00151364
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00151364
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_00151364:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x64],0x0
JZ 0x001514cd
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x378],0x0
JZ 0x00151421
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x378]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x64]
JZ 0x0015141c
JMP 0x0015139c
LAB_0015139c:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7f2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x110]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x64],ECX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_0015141c:
JMP 0x001514cb
LAB_00151421:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
IMUL RSI,RAX,0x70
CALL 0x0014b880
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x70],RAX
CMP RAX,0x0
JNZ 0x001514b1
JMP 0x00151445
LAB_00151445:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_001514b1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
IMUL RDX,RAX,0x70
XOR ESI,ESI
CALL 0x00137300
LAB_001514cb:
JMP 0x001514cd
LAB_001514cd:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JZ 0x00151591
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x340]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x60]
IMUL RSI,RAX,0x70
CALL 0x0014b880
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x78],RAX
CMP RAX,0x0
JNZ 0x00151577
JMP 0x0015150e
LAB_0015150e:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001515a0
LAB_00151577:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x60]
IMUL RDX,RAX,0x70
XOR ESI,ESI
CALL 0x00137300
LAB_00151591:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x1
MOV byte ptr [RBP + -0x1],0x0
LAB_001515a0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 mthd_stmt_read_prepare_response(long param_1)
{
char *pcVar1;
char cVar2;
long lVar3;
uint uVar4;
int1 local_9;
lVar3 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar3 == 0xffffffff) {
local_9 = 1;
}
else {
pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar1 == -1) {
local_9 = 1;
}
else {
*(ulong *)(param_1 + 0x40) =
(ulong)((uint)(byte)pcVar1[1] + (uint)(byte)pcVar1[2] * 0x100 +
(uint)(byte)pcVar1[3] * 0x10000 + (uint)(byte)pcVar1[4] * 0x1000000);
*(uint *)(param_1 + 0x60) = (uint)(byte)pcVar1[5] + (uint)(byte)pcVar1[6] * 0x100 & 0xffff;
*(uint *)(param_1 + 100) = (uint)(byte)pcVar1[7] + (uint)(byte)pcVar1[8] * 0x100 & 0xffff;
uVar4 = (uint)(byte)pcVar1[10] + (uint)(byte)pcVar1[0xb] * 0x100 & 0xffff;
*(uint *)(param_1 + 0xf0) = uVar4;
*(uint *)(*(long *)(param_1 + 0x38) + 0x388) = uVar4;
if ((*(int *)(param_1 + 100) == 0) ||
(cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x58))(param_1),
cVar2 == '\0')) {
if ((*(int *)(param_1 + 0x60) == 0) ||
(cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x50))(param_1),
cVar2 == '\0')) {
if (*(int *)(param_1 + 100) != 0) {
if (*(int *)(param_1 + 0x378) == 0) {
lVar3 = ma_alloc_root(param_1);
*(long *)(param_1 + 0x70) = lVar3;
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_003377a0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
memset(*(void **)(param_1 + 0x70),0,(ulong)*(uint *)(param_1 + 100) * 0x70);
}
else if (*(int *)(param_1 + 0x378) != *(int *)(param_1 + 100)) {
*(int4 *)(param_1 + 0x108) = 0x7f2;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_00337870,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
*(int4 *)(param_1 + 100) = *(int4 *)(param_1 + 0x378);
return 1;
}
}
if (*(int *)(param_1 + 0x60) != 0) {
lVar3 = ma_alloc_root(*(int8 *)(param_1 + 0x340));
*(long *)(param_1 + 0x78) = lVar3;
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_003377a0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
memset(*(void **)(param_1 + 0x78),0,(ulong)*(uint *)(param_1 + 0x60) * 0x70);
}
*(int4 *)(param_1 + 0x50) = 1;
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
}
}
return local_9;
}
| |
23,884 | void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x91af8
leaq 0x5fe43(%rip), %rcx # 0xf1914
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x91aed
movzbl 0x8(%r14), %eax
jmp 0x91aed
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f2f6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x61134(%rip), %rsi # 0xf2c50
leaq 0x10(%rsp), %rdi
callq 0x87881
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x876b2
xorl %ebp, %ebp
leaq 0x9b3d1(%rip), %rsi # 0x12cf18
leaq -0x36716(%rip), %rdx # 0x5b438
movq %rbx, %rdi
callq 0x1bf30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x91b7c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0x91b7c
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x91b89
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bfd0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_91AD8; jumptable 0000000000091AD8 default case
lea rcx, jpt_91AD8
movsxd rax, ds:(jpt_91AD8 - 0F1914h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_91ADA:
mov eax, [r14+8]; jumptable 0000000000091AD8 cases 5,6
jmp short loc_91AED
loc_91AE0:
movzx eax, byte ptr [r14+8]; jumptable 0000000000091AD8 case 4
jmp short loc_91AED
loc_91AE7:
cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000091AD8 case 7
loc_91AED:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_91AD8:
mov edi, 20h ; ' '; jumptable 0000000000091AD8 default case
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, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; 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_91B7C
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_91B7C
mov r14, rax
mov bpl, 1
loc_91B7C:
test bpl, bpl
jz short loc_91B89
mov rdi, rbx; void *
call ___cxa_free_exception
loc_91B89:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = 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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__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);
}
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x00191af8
LEA RCX,[0x1f1914]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x00191aed
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x00191aed
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_00191aed:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f2f6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00191b15:
LEA RSI,[0x1f2c50]
LEA RDI,[RSP + 0x10]
CALL 0x00187881
MOV BPL,0x1
LAB_00191b29:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001876b2
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15b438]
MOV RDI,RBX
CALL 0x0011bf30
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (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>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (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>
)0x5:
case (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>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (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>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00191b15 to 00191b25 has its CatchHandler @ 00191b76 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00191b29 to 00191b55 has its CatchHandler @ 00191b56 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
| |
23,885 | real_open_cached_file | eloqsql/mysys/mf_cache.c | my_bool real_open_cached_file(IO_CACHE *cache)
{
char name_buff[FN_REFLEN];
int error=1;
DBUG_ENTER("real_open_cached_file");
if ((cache->file= create_temp_file(name_buff, cache->dir,
cache->prefix[0] ? cache->prefix : 0,
O_BINARY, MYF(MY_WME | MY_TEMPORARY))) >= 0)
{
error=0;
}
DBUG_RETURN(error);
} | O3 | c | real_open_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq 0xc8(%rdi), %rsi
leaq 0xd0(%rdi), %rax
xorl %edx, %edx
cmpb $0x0, 0xd0(%rdi)
cmovneq %rax, %rdx
leaq -0x210(%rbp), %rdi
movl $0x50, %r8d
xorl %ecx, %ecx
callq 0xa8990
movl %eax, 0xd4(%rbx)
movq %fs:0x28, %rcx
cmpq -0x10(%rbp), %rcx
jne 0xa8793
shrl $0x1f, %eax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %rbp
retq
callq 0x29270
| real_open_cached_file:
push rbp
mov rbp, rsp
push rbx
sub rsp, 208h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_10], rax
mov rsi, [rdi+0C8h]
lea rax, [rdi+0D0h]
xor edx, edx
cmp byte ptr [rdi+0D0h], 0
cmovnz rdx, rax
lea rdi, [rbp+var_210]
mov r8d, 50h ; 'P'
xor ecx, ecx
call create_temp_file
mov [rbx+0D4h], eax
mov rcx, fs:28h
cmp rcx, [rbp+var_10]
jnz short loc_A8793
shr eax, 1Fh
add rsp, 208h
pop rbx
pop rbp
retn
loc_A8793:
call ___stack_chk_fail
| long long real_open_cached_file(long long a1)
{
long long v1; // rdx
unsigned int temp_file; // eax
_BYTE v4[512]; // [rsp+0h] [rbp-210h] BYREF
unsigned long long v5; // [rsp+200h] [rbp-10h]
v5 = __readfsqword(0x28u);
v1 = 0LL;
if ( *(_BYTE *)(a1 + 208) )
v1 = a1 + 208;
temp_file = create_temp_file(v4, *(_QWORD *)(a1 + 200), v1, 0LL, 80LL);
*(_DWORD *)(a1 + 212) = temp_file;
return temp_file >> 31;
}
| real_open_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x208
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV RSI,qword ptr [RDI + 0xc8]
LEA RAX,[RDI + 0xd0]
XOR EDX,EDX
CMP byte ptr [RDI + 0xd0],0x0
CMOVNZ RDX,RAX
LEA RDI,[RBP + -0x210]
MOV R8D,0x50
XOR ECX,ECX
CALL 0x001a8990
MOV dword ptr [RBX + 0xd4],EAX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x10]
JNZ 0x001a8793
SHR EAX,0x1f
ADD RSP,0x208
POP RBX
POP RBP
RET
LAB_001a8793:
CALL 0x00129270
|
uint real_open_cached_file(long param_1)
{
uint uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_218 [512];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = 0;
if (*(char *)(param_1 + 0xd0) != '\0') {
lVar2 = param_1 + 0xd0;
}
uVar1 = create_temp_file(local_218,*(int8 *)(param_1 + 200),lVar2,0,0x50);
*(uint *)(param_1 + 0xd4) = uVar1;
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return uVar1 >> 0x1f;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,886 | Cache::printInfo(bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printInfo(bool verbose) {
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n", this->policy.cacheSize);
printf("Block Size: %d bytes\n", this->policy.blockSize);
printf("Block Num: %d\n", this->policy.blockNum);
printf("Associativiy: %d\n", this->policy.associativity);
printf("Hit Latency: %d\n", this->policy.hitLatency);
printf("Miss Latency: %d\n", this->policy.missLatency);
if (verbose) {
for (int j = 0; j < this->blocks.size(); ++j) {
const Block &b = this->blocks[j];
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n", j, b.tag, b.id,
b.valid ? "valid" : "invalid",
b.modified ? "modified" : "unmodified", b.lastReference);
// printf("Data: ");
// for (uint8_t d : b.data)
// printf("%d ", d);
// printf("\n");
}
}
} | O0 | cpp | Cache::printInfo(bool):
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x3a57(%rip), %rdi # 0x2a45a
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x30(%rax), %esi
leaq 0x3a64(%rip), %rdi # 0x2a47d
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x34(%rax), %esi
leaq 0x3a64(%rip), %rdi # 0x2a493
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x38(%rax), %esi
leaq 0x3a64(%rip), %rdi # 0x2a4a9
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x3c(%rax), %esi
leaq 0x3a5d(%rip), %rdi # 0x2a4b8
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x40(%rax), %esi
leaq 0x3a59(%rip), %rdi # 0x2a4ca
movb $0x0, %al
callq 0x15050
movq 0x18(%rsp), %rax
movl 0x44(%rax), %esi
leaq 0x3a54(%rip), %rdi # 0x2a4db
movb $0x0, %al
callq 0x15050
testb $0x1, 0x2f(%rsp)
je 0x26b5e
movl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rdi
movslq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x48, %rdi
callq 0x26e90
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x26b5c
movq 0x18(%rsp), %rdi
addq $0x48, %rdi
movslq 0x28(%rsp), %rsi
callq 0x26e50
movq %rax, 0x20(%rsp)
movl 0x28(%rsp), %esi
movq 0x20(%rsp), %rax
movl 0x4(%rax), %edx
movq 0x20(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0x20(%rsp), %rax
movb (%rax), %dil
leaq 0x3a16(%rip), %r8 # 0x2a51b
leaq 0x3a11(%rip), %rax # 0x2a51d
testb $0x1, %dil
cmovneq %rax, %r8
movq 0x20(%rsp), %rax
movb 0x1(%rax), %dil
leaq 0x39ff(%rip), %r9 # 0x2a523
leaq 0x39fa(%rip), %rax # 0x2a525
testb $0x1, %dil
cmovneq %rax, %r9
movq 0x20(%rsp), %rax
movl 0x10(%rax), %eax
leaq 0x39ab(%rip), %rdi # 0x2a4ed
movl %eax, (%rsp)
movb $0x0, %al
callq 0x15050
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x26aa1
jmp 0x26b5e
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN5Cache9printInfoEb:
sub rsp, 38h
mov al, sil
mov [rsp+38h+var_8], rdi
and al, 1
mov [rsp+38h+var_9], al
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_20], rax
lea rdi, aCacheInfo; "---------- Cache Info -----------\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+30h]
lea rdi, aCacheSizeDByte; "Cache Size: %d bytes\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+34h]
lea rdi, aBlockSizeDByte; "Block Size: %d bytes\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+38h]
lea rdi, aBlockNumD; "Block Num: %d\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+3Ch]
lea rdi, aAssociativiyD; "Associativiy: %d\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+40h]
lea rdi, aHitLatencyD; "Hit Latency: %d\n"
mov al, 0
call _printf
mov rax, [rsp+38h+var_20]
mov esi, [rax+44h]
lea rdi, aMissLatencyD; "Miss Latency: %d\n"
mov al, 0
call _printf
test [rsp+38h+var_9], 1
jz loc_26B5E
mov [rsp+38h+var_10], 0
loc_26AA1:
mov rdi, [rsp+38h+var_20]
movsxd rax, [rsp+38h+var_10]
mov [rsp+38h+var_28], rax
add rdi, 48h ; 'H'
call _ZNKSt6vectorIN5Cache5BlockESaIS1_EE4sizeEv; std::vector<Cache::Block>::size(void)
mov rcx, rax
mov rax, [rsp+38h+var_28]
cmp rax, rcx
jnb loc_26B5C
mov rdi, [rsp+38h+var_20]
add rdi, 48h ; 'H'
movsxd rsi, [rsp+38h+var_10]
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov [rsp+38h+var_18], rax
mov esi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov edx, [rax+4]
mov rax, [rsp+38h+var_18]
mov ecx, [rax+8]
mov rax, [rsp+38h+var_18]
mov dil, [rax]
lea r8, aInvalid; "invalid"
lea rax, aInvalid+2; "valid"
test dil, 1
cmovnz r8, rax
mov rax, [rsp+38h+var_18]
mov dil, [rax+1]
lea r9, aUnmodified; "unmodified"
lea rax, aUnmodified+2; "modified"
test dil, 1
cmovnz r9, rax
mov rax, [rsp+38h+var_18]
mov eax, [rax+10h]
lea rdi, aBlockDTag0xXId; "Block %d: tag 0x%x id %d %s %s (last re"...
mov [rsp+38h+var_38], eax
mov al, 0
call _printf
mov eax, [rsp+38h+var_10]
add eax, 1
mov [rsp+38h+var_10], eax
jmp loc_26AA1
loc_26B5C:
jmp short $+2
loc_26B5E:
add rsp, 38h
retn
| void Cache::printInfo(Cache *this, char a2)
{
const char *v2; // r8
const char *v3; // r9
long long v4; // [rsp+20h] [rbp-18h]
int i; // [rsp+28h] [rbp-10h]
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n", *((_DWORD *)this + 12));
printf("Block Size: %d bytes\n", *((_DWORD *)this + 13));
printf("Block Num: %d\n", *((_DWORD *)this + 14));
printf("Associativiy: %d\n", *((_DWORD *)this + 15));
printf("Hit Latency: %d\n", *((_DWORD *)this + 16));
printf("Miss Latency: %d\n", *((_DWORD *)this + 17));
if ( (a2 & 1) != 0 )
{
for ( i = 0; i < (unsigned long long)std::vector<Cache::Block>::size((char *)this + 72); ++i )
{
v4 = std::vector<Cache::Block>::operator[]((char *)this + 72, i);
v2 = "invalid";
if ( (*(_BYTE *)v4 & 1) != 0 )
v2 = "valid";
v3 = "unmodified";
if ( (*(_BYTE *)(v4 + 1) & 1) != 0 )
v3 = "modified";
printf(
"Block %d: tag 0x%x id %d %s %s (last ref %d)\n",
i,
*(_DWORD *)(v4 + 4),
*(_DWORD *)(v4 + 8),
v2,
v3,
*(_DWORD *)(v4 + 16));
}
}
}
| printInfo:
SUB RSP,0x38
MOV AL,SIL
MOV qword ptr [RSP + 0x30],RDI
AND AL,0x1
MOV byte ptr [RSP + 0x2f],AL
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[0x12a45a]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x30]
LEA RDI,[0x12a47d]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x34]
LEA RDI,[0x12a493]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x38]
LEA RDI,[0x12a4a9]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x3c]
LEA RDI,[0x12a4b8]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x40]
LEA RDI,[0x12a4ca]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x44]
LEA RDI,[0x12a4db]
MOV AL,0x0
CALL 0x00115050
TEST byte ptr [RSP + 0x2f],0x1
JZ 0x00126b5e
MOV dword ptr [RSP + 0x28],0x0
LAB_00126aa1:
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
ADD RDI,0x48
CALL 0x00126e90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JNC 0x00126b5c
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x48
MOVSXD RSI,dword ptr [RSP + 0x28]
CALL 0x00126e50
MOV qword ptr [RSP + 0x20],RAX
MOV ESI,dword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV EDX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV DIL,byte ptr [RAX]
LEA R8,[0x12a51b]
LEA RAX,[0x12a51d]
TEST DIL,0x1
CMOVNZ R8,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV DIL,byte ptr [RAX + 0x1]
LEA R9,[0x12a523]
LEA RAX,[0x12a525]
TEST DIL,0x1
CMOVNZ R9,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0x10]
LEA RDI,[0x12a4ed]
MOV dword ptr [RSP],EAX
MOV AL,0x0
CALL 0x00115050
MOV EAX,dword ptr [RSP + 0x28]
ADD EAX,0x1
MOV dword ptr [RSP + 0x28],EAX
JMP 0x00126aa1
LAB_00126b5c:
JMP 0x00126b5e
LAB_00126b5e:
ADD RSP,0x38
RET
|
/* Cache::printInfo(bool) */
void __thiscall Cache::printInfo(Cache *this,bool param_1)
{
ulong uVar1;
byte *pbVar2;
char *pcVar3;
char *pcVar4;
uint local_10;
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n",(ulong)*(uint *)(this + 0x30));
printf("Block Size: %d bytes\n",(ulong)*(uint *)(this + 0x34));
printf("Block Num: %d\n",(ulong)*(uint *)(this + 0x38));
printf("Associativiy: %d\n",(ulong)*(uint *)(this + 0x3c));
printf("Hit Latency: %d\n",(ulong)*(uint *)(this + 0x40));
printf("Miss Latency: %d\n",(ulong)*(uint *)(this + 0x44));
if (param_1) {
for (local_10 = 0;
uVar1 = std::vector<Cache::Block,std::allocator<Cache::Block>>::size
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48)),
(ulong)(long)(int)local_10 < uVar1; local_10 = local_10 + 1) {
pbVar2 = (byte *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48)
,(long)(int)local_10);
pcVar3 = "invalid";
if ((*pbVar2 & 1) != 0) {
pcVar3 = "valid";
}
pcVar4 = "unmodified";
if ((pbVar2[1] & 1) != 0) {
pcVar4 = "modified";
}
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",(ulong)local_10,
(ulong)*(uint *)(pbVar2 + 4),(ulong)*(uint *)(pbVar2 + 8),pcVar3,pcVar4,
*(int4 *)(pbVar2 + 0x10));
}
}
return;
}
| |
23,887 | Cache::printInfo(bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printInfo(bool verbose) {
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n", this->policy.cacheSize);
printf("Block Size: %d bytes\n", this->policy.blockSize);
printf("Block Num: %d\n", this->policy.blockNum);
printf("Associativiy: %d\n", this->policy.associativity);
printf("Hit Latency: %d\n", this->policy.hitLatency);
printf("Miss Latency: %d\n", this->policy.missLatency);
if (verbose) {
for (int j = 0; j < this->blocks.size(); ++j) {
const Block &b = this->blocks[j];
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n", j, b.tag, b.id,
b.valid ? "valid" : "invalid",
b.modified ? "modified" : "unmodified", b.lastReference);
// printf("Data: ");
// for (uint8_t d : b.data)
// printf("%d ", d);
// printf("\n");
}
}
} | O1 | cpp | Cache::printInfo(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x2786(%rip), %rdi # 0x164cf
callq 0xb320
movl 0x30(%rbx), %esi
leaq 0x25bb(%rip), %rdi # 0x16313
xorl %eax, %eax
callq 0xb050
movl 0x34(%rbx), %esi
leaq 0x25c0(%rip), %rdi # 0x16329
xorl %eax, %eax
callq 0xb050
movl 0x38(%rbx), %esi
leaq 0x25c5(%rip), %rdi # 0x1633f
xorl %eax, %eax
callq 0xb050
movl 0x3c(%rbx), %esi
leaq 0x25c3(%rip), %rdi # 0x1634e
xorl %eax, %eax
callq 0xb050
movl 0x40(%rbx), %esi
leaq 0x25c4(%rip), %rdi # 0x16360
xorl %eax, %eax
callq 0xb050
movl 0x44(%rbx), %esi
leaq 0x25c4(%rip), %rdi # 0x16371
xorl %eax, %eax
callq 0xb050
testl %ebp, %ebp
je 0x13e4b
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x13e4b
leaq 0x25e8(%rip), %r12 # 0x163b9
leaq 0x25ab(%rip), %r14 # 0x16383
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
xorl %ebp, %ebp
xorl %r15d, %r15d
movl 0x4(%rax,%rbp), %edx
movl 0x8(%rax,%rbp), %ecx
cmpb $0x0, (%rax,%rbp)
leaq 0x25b7(%rip), %r8 # 0x163b1
leaq 0x1363(%rip), %rsi # 0x15164
cmovneq %rsi, %r8
cmpb $0x0, 0x1(%rax,%rbp)
movq %r12, %r9
leaq 0x25a7(%rip), %rsi # 0x163bb
cmovneq %rsi, %r9
movl 0x10(%rax,%rbp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0xb050
incq %r15
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
imulq %r13, %rcx
addq $0x30, %rbp
cmpq %r15, %rcx
ja 0x13de7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5Cache9printInfoEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
lea rdi, aCacheInfo; "---------- Cache Info -----------"
call _puts
mov esi, [rbx+30h]
lea rdi, aCacheSizeDByte; "Cache Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+34h]
lea rdi, aBlockSizeDByte; "Block Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+38h]
lea rdi, aBlockNumD; "Block Num: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+3Ch]
lea rdi, aAssociativiyD; "Associativiy: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+40h]
lea rdi, aHitLatencyD; "Hit Latency: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+44h]
lea rdi, aMissLatencyD; "Miss Latency: %d\n"
xor eax, eax
call _printf
test ebp, ebp
jz loc_13E4B
mov rax, [rbx+48h]
cmp [rbx+50h], rax
jz loc_13E4B
lea r12, aUnmodified; "unmodified"
lea r14, aBlockDTag0xXId; "Block %d: tag 0x%x id %d %s %s (last re"...
mov r13, 0AAAAAAAAAAAAAAABh
xor ebp, ebp
xor r15d, r15d
loc_13DE7:
mov edx, [rax+rbp+4]
mov ecx, [rax+rbp+8]
cmp byte ptr [rax+rbp], 0
lea r8, aInvalid; "invalid"
lea rsi, aBasicStringMCo+24h; "valid"
cmovnz r8, rsi
cmp byte ptr [rax+rbp+1], 0
mov r9, r12
lea rsi, aUnmodified+2; "modified"
cmovnz r9, rsi
mov eax, [rax+rbp+10h]
mov [rsp+38h+var_38], eax
mov rdi, r14
mov esi, r15d
xor eax, eax
call _printf
inc r15
mov rax, [rbx+48h]
mov rcx, [rbx+50h]
sub rcx, rax
sar rcx, 4
imul rcx, r13
add rbp, 30h ; '0'
cmp rcx, r15
ja short loc_13DE7
loc_13E4B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Cache::printInfo(Cache *this, int a2)
{
long long result; // rax
long long v3; // rbp
unsigned long long v4; // r15
const char *v5; // r8
const char *v6; // r9
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n", *((_DWORD *)this + 12));
printf("Block Size: %d bytes\n", *((_DWORD *)this + 13));
printf("Block Num: %d\n", *((_DWORD *)this + 14));
printf("Associativiy: %d\n", *((_DWORD *)this + 15));
printf("Hit Latency: %d\n", *((_DWORD *)this + 16));
result = printf("Miss Latency: %d\n", *((_DWORD *)this + 17));
if ( a2 )
{
result = *((_QWORD *)this + 9);
if ( *((_QWORD *)this + 10) != result )
{
v3 = 0LL;
v4 = 0LL;
do
{
v5 = "invalid";
if ( *(_BYTE *)(result + v3) )
v5 = "valid";
v6 = "unmodified";
if ( *(_BYTE *)(result + v3 + 1) )
v6 = "modified";
printf(
"Block %d: tag 0x%x id %d %s %s (last ref %d)\n",
v4++,
*(_DWORD *)(result + v3 + 4),
*(_DWORD *)(result + v3 + 8),
v5,
v6,
*(_DWORD *)(result + v3 + 16));
result = *((_QWORD *)this + 9);
v3 += 48LL;
}
while ( 0xAAAAAAAAAAAAAAABLL * ((*((_QWORD *)this + 10) - result) >> 4) > v4 );
}
}
return result;
}
| printInfo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[0x1164cf]
CALL 0x0010b320
MOV ESI,dword ptr [RBX + 0x30]
LEA RDI,[0x116313]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x34]
LEA RDI,[0x116329]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x38]
LEA RDI,[0x11633f]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x3c]
LEA RDI,[0x11634e]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x40]
LEA RDI,[0x116360]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x44]
LEA RDI,[0x116371]
XOR EAX,EAX
CALL 0x0010b050
TEST EBP,EBP
JZ 0x00113e4b
MOV RAX,qword ptr [RBX + 0x48]
CMP qword ptr [RBX + 0x50],RAX
JZ 0x00113e4b
LEA R12,[0x1163b9]
LEA R14,[0x116383]
MOV R13,-0x5555555555555555
XOR EBP,EBP
XOR R15D,R15D
LAB_00113de7:
MOV EDX,dword ptr [RAX + RBP*0x1 + 0x4]
MOV ECX,dword ptr [RAX + RBP*0x1 + 0x8]
CMP byte ptr [RAX + RBP*0x1],0x0
LEA R8,[0x1163b1]
LEA RSI,[0x115164]
CMOVNZ R8,RSI
CMP byte ptr [RAX + RBP*0x1 + 0x1],0x0
MOV R9,R12
LEA RSI,[0x1163bb]
CMOVNZ R9,RSI
MOV EAX,dword ptr [RAX + RBP*0x1 + 0x10]
MOV dword ptr [RSP],EAX
MOV RDI,R14
MOV ESI,R15D
XOR EAX,EAX
CALL 0x0010b050
INC R15
MOV RAX,qword ptr [RBX + 0x48]
MOV RCX,qword ptr [RBX + 0x50]
SUB RCX,RAX
SAR RCX,0x4
IMUL RCX,R13
ADD RBP,0x30
CMP RCX,R15
JA 0x00113de7
LAB_00113e4b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Cache::printInfo(bool) */
void __thiscall Cache::printInfo(Cache *this,bool param_1)
{
int8 in_RAX;
long lVar1;
ulong uVar2;
long lVar3;
int7 in_register_00000031;
char *pcVar4;
char *pcVar5;
ulong uVar6;
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n",(ulong)*(uint *)(this + 0x30));
printf("Block Size: %d bytes\n",(ulong)*(uint *)(this + 0x34));
printf("Block Num: %d\n",(ulong)*(uint *)(this + 0x38));
printf("Associativiy: %d\n",(ulong)*(uint *)(this + 0x3c));
printf("Hit Latency: %d\n",(ulong)*(uint *)(this + 0x40));
printf("Miss Latency: %d\n",(ulong)*(uint *)(this + 0x44));
if (((int)CONCAT71(in_register_00000031,param_1) != 0) &&
(lVar1 = *(long *)(this + 0x48), *(long *)(this + 0x50) != lVar1)) {
lVar3 = 0;
uVar6 = 0;
do {
pcVar4 = "invalid";
if (*(char *)(lVar1 + lVar3) != '\0') {
pcVar4 = "valid";
}
pcVar5 = "unmodified";
if (*(char *)(lVar1 + 1 + lVar3) != '\0') {
pcVar5 = "modified";
}
in_RAX = CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(lVar1 + 0x10 + lVar3));
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",uVar6 & 0xffffffff,
(ulong)*(uint *)(lVar1 + 4 + lVar3),(ulong)*(uint *)(lVar1 + 8 + lVar3),pcVar4,pcVar5,
in_RAX);
uVar6 = uVar6 + 1;
lVar1 = *(long *)(this + 0x48);
uVar2 = (*(long *)(this + 0x50) - lVar1 >> 4) * -0x5555555555555555;
lVar3 = lVar3 + 0x30;
} while (uVar6 <= uVar2 && uVar2 - uVar6 != 0);
}
return;
}
| |
23,888 | Cache::printInfo(bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printInfo(bool verbose) {
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n", this->policy.cacheSize);
printf("Block Size: %d bytes\n", this->policy.blockSize);
printf("Block Num: %d\n", this->policy.blockNum);
printf("Associativiy: %d\n", this->policy.associativity);
printf("Hit Latency: %d\n", this->policy.hitLatency);
printf("Miss Latency: %d\n", this->policy.missLatency);
if (verbose) {
for (int j = 0; j < this->blocks.size(); ++j) {
const Block &b = this->blocks[j];
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n", j, b.tag, b.id,
b.valid ? "valid" : "invalid",
b.modified ? "modified" : "unmodified", b.lastReference);
// printf("Data: ");
// for (uint8_t d : b.data)
// printf("%d ", d);
// printf("\n");
}
}
} | O2 | cpp | Cache::printInfo(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x2a9b(%rip), %rdi # 0x16486
callq 0xc300
movl 0x30(%rbx), %esi
leaq 0x28d0(%rip), %rdi # 0x162ca
xorl %eax, %eax
callq 0xc040
movl 0x34(%rbx), %esi
leaq 0x28d5(%rip), %rdi # 0x162e0
xorl %eax, %eax
callq 0xc040
movl 0x38(%rbx), %esi
leaq 0x28da(%rip), %rdi # 0x162f6
xorl %eax, %eax
callq 0xc040
movl 0x3c(%rbx), %esi
leaq 0x28d8(%rip), %rdi # 0x16305
xorl %eax, %eax
callq 0xc040
movl 0x40(%rbx), %esi
leaq 0x28d9(%rip), %rdi # 0x16317
xorl %eax, %eax
callq 0xc040
movl 0x44(%rbx), %esi
leaq 0x28d9(%rip), %rdi # 0x16328
xorl %eax, %eax
callq 0xc040
testl %ebp, %ebp
je 0x13ad3
leaq 0x2911(%rip), %r13 # 0x16372
leaq 0x2908(%rip), %r12 # 0x16370
leaq 0x28cb(%rip), %r14 # 0x1633a
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rax
subq %rsi, %rax
cqto
pushq $0x30
popq %rcx
idivq %rcx
cmpq %r15, %rax
jbe 0x13ad3
movl 0x4(%rsi,%rbp), %edx
movl 0x8(%rsi,%rbp), %ecx
cmpb $0x0, (%rsi,%rbp)
leaq 0x28c9(%rip), %r8 # 0x16368
leaq 0x28c4(%rip), %rax # 0x1636a
cmovneq %rax, %r8
cmpb $0x0, 0x1(%rsi,%rbp)
movq %r12, %r9
cmovneq %r13, %r9
movl 0x10(%rsi,%rbp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0xc040
incq %r15
addq $0x30, %rbp
jmp 0x13a74
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5Cache9printInfoEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
lea rdi, aCacheInfo; "---------- Cache Info -----------"
call _puts
mov esi, [rbx+30h]
lea rdi, aCacheSizeDByte; "Cache Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+34h]
lea rdi, aBlockSizeDByte; "Block Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+38h]
lea rdi, aBlockNumD; "Block Num: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+3Ch]
lea rdi, aAssociativiyD; "Associativiy: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+40h]
lea rdi, aHitLatencyD; "Hit Latency: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+44h]
lea rdi, aMissLatencyD; "Miss Latency: %d\n"
xor eax, eax
call _printf
test ebp, ebp
jz short loc_13AD3
lea r13, aUnmodified+2; "modified"
lea r12, aUnmodified; "unmodified"
lea r14, aBlockDTag0xXId; "Block %d: tag 0x%x id %d %s %s (last re"...
xor ebp, ebp
xor r15d, r15d
loc_13A74:
mov rsi, [rbx+48h]
mov rax, [rbx+50h]
sub rax, rsi
cqo
push 30h ; '0'
pop rcx
idiv rcx
cmp rax, r15
jbe short loc_13AD3
mov edx, [rsi+rbp+4]
mov ecx, [rsi+rbp+8]
cmp byte ptr [rsi+rbp], 0
lea r8, aInvalid; "invalid"
lea rax, aInvalid+2; "valid"
cmovnz r8, rax
cmp byte ptr [rsi+rbp+1], 0
mov r9, r12
cmovnz r9, r13
mov eax, [rsi+rbp+10h]
mov [rsp+38h+var_38], eax
mov rdi, r14
mov esi, r15d
xor eax, eax
call _printf
inc r15
add rbp, 30h ; '0'
jmp short loc_13A74
loc_13AD3:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long Cache::printInfo(Cache *this, int a2)
{
unsigned long long result; // rax
long long v3; // rbp
unsigned long long i; // r15
long long v5; // rsi
const char *v6; // r8
const char *v7; // r9
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n", *((_DWORD *)this + 12));
printf("Block Size: %d bytes\n", *((_DWORD *)this + 13));
printf("Block Num: %d\n", *((_DWORD *)this + 14));
printf("Associativiy: %d\n", *((_DWORD *)this + 15));
printf("Hit Latency: %d\n", *((_DWORD *)this + 16));
result = printf("Miss Latency: %d\n", *((_DWORD *)this + 17));
if ( a2 )
{
v3 = 0LL;
for ( i = 0LL; ; ++i )
{
v5 = *((_QWORD *)this + 9);
result = (*((_QWORD *)this + 10) - v5) / 48;
if ( result <= i )
break;
v6 = "invalid";
if ( *(_BYTE *)(v5 + v3) )
v6 = "valid";
v7 = "unmodified";
if ( *(_BYTE *)(v5 + v3 + 1) )
v7 = "modified";
printf(
"Block %d: tag 0x%x id %d %s %s (last ref %d)\n",
i,
*(_DWORD *)(v5 + v3 + 4),
*(_DWORD *)(v5 + v3 + 8),
v6,
v7,
*(_DWORD *)(v5 + v3 + 16));
v3 += 48LL;
}
}
return result;
}
| printInfo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[0x116486]
CALL 0x0010c300
MOV ESI,dword ptr [RBX + 0x30]
LEA RDI,[0x1162ca]
XOR EAX,EAX
CALL 0x0010c040
MOV ESI,dword ptr [RBX + 0x34]
LEA RDI,[0x1162e0]
XOR EAX,EAX
CALL 0x0010c040
MOV ESI,dword ptr [RBX + 0x38]
LEA RDI,[0x1162f6]
XOR EAX,EAX
CALL 0x0010c040
MOV ESI,dword ptr [RBX + 0x3c]
LEA RDI,[0x116305]
XOR EAX,EAX
CALL 0x0010c040
MOV ESI,dword ptr [RBX + 0x40]
LEA RDI,[0x116317]
XOR EAX,EAX
CALL 0x0010c040
MOV ESI,dword ptr [RBX + 0x44]
LEA RDI,[0x116328]
XOR EAX,EAX
CALL 0x0010c040
TEST EBP,EBP
JZ 0x00113ad3
LEA R13,[0x116372]
LEA R12,[0x116370]
LEA R14,[0x11633a]
XOR EBP,EBP
XOR R15D,R15D
LAB_00113a74:
MOV RSI,qword ptr [RBX + 0x48]
MOV RAX,qword ptr [RBX + 0x50]
SUB RAX,RSI
CQO
PUSH 0x30
POP RCX
IDIV RCX
CMP RAX,R15
JBE 0x00113ad3
MOV EDX,dword ptr [RSI + RBP*0x1 + 0x4]
MOV ECX,dword ptr [RSI + RBP*0x1 + 0x8]
CMP byte ptr [RSI + RBP*0x1],0x0
LEA R8,[0x116368]
LEA RAX,[0x11636a]
CMOVNZ R8,RAX
CMP byte ptr [RSI + RBP*0x1 + 0x1],0x0
MOV R9,R12
CMOVNZ R9,R13
MOV EAX,dword ptr [RSI + RBP*0x1 + 0x10]
MOV dword ptr [RSP],EAX
MOV RDI,R14
MOV ESI,R15D
XOR EAX,EAX
CALL 0x0010c040
INC R15
ADD RBP,0x30
JMP 0x00113a74
LAB_00113ad3:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Cache::printInfo(bool) */
void __thiscall Cache::printInfo(Cache *this,bool param_1)
{
long lVar1;
int8 in_RAX;
long lVar2;
int7 in_register_00000031;
char *pcVar3;
char *pcVar4;
ulong uVar5;
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n",(ulong)*(uint *)(this + 0x30));
printf("Block Size: %d bytes\n",(ulong)*(uint *)(this + 0x34));
printf("Block Num: %d\n",(ulong)*(uint *)(this + 0x38));
printf("Associativiy: %d\n",(ulong)*(uint *)(this + 0x3c));
printf("Hit Latency: %d\n",(ulong)*(uint *)(this + 0x40));
printf("Miss Latency: %d\n",(ulong)*(uint *)(this + 0x44));
if ((int)CONCAT71(in_register_00000031,param_1) != 0) {
lVar2 = 0;
uVar5 = 0;
while( true ) {
lVar1 = *(long *)(this + 0x48);
if ((ulong)((*(long *)(this + 0x50) - lVar1) / 0x30) <= uVar5) break;
pcVar3 = "invalid";
if (*(char *)(lVar1 + lVar2) != '\0') {
pcVar3 = "valid";
}
pcVar4 = "unmodified";
if (*(char *)(lVar1 + 1 + lVar2) != '\0') {
pcVar4 = "modified";
}
in_RAX = CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(lVar1 + 0x10 + lVar2));
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",uVar5 & 0xffffffff,
(ulong)*(uint *)(lVar1 + 4 + lVar2),(ulong)*(uint *)(lVar1 + 8 + lVar2),pcVar3,pcVar4,
in_RAX);
uVar5 = uVar5 + 1;
lVar2 = lVar2 + 0x30;
}
}
return;
}
| |
23,889 | Cache::printInfo(bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printInfo(bool verbose) {
printf("---------- Cache Info -----------\n");
printf("Cache Size: %d bytes\n", this->policy.cacheSize);
printf("Block Size: %d bytes\n", this->policy.blockSize);
printf("Block Num: %d\n", this->policy.blockNum);
printf("Associativiy: %d\n", this->policy.associativity);
printf("Hit Latency: %d\n", this->policy.hitLatency);
printf("Miss Latency: %d\n", this->policy.missLatency);
if (verbose) {
for (int j = 0; j < this->blocks.size(); ++j) {
const Block &b = this->blocks[j];
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n", j, b.tag, b.id,
b.valid ? "valid" : "invalid",
b.modified ? "modified" : "unmodified", b.lastReference);
// printf("Data: ");
// for (uint8_t d : b.data)
// printf("%d ", d);
// printf("\n");
}
}
} | O3 | cpp | Cache::printInfo(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x2904(%rip), %rdi # 0x164cf
callq 0xb320
movl 0x30(%rbx), %esi
leaq 0x2739(%rip), %rdi # 0x16313
xorl %eax, %eax
callq 0xb050
movl 0x34(%rbx), %esi
leaq 0x273e(%rip), %rdi # 0x16329
xorl %eax, %eax
callq 0xb050
movl 0x38(%rbx), %esi
leaq 0x2743(%rip), %rdi # 0x1633f
xorl %eax, %eax
callq 0xb050
movl 0x3c(%rbx), %esi
leaq 0x2741(%rip), %rdi # 0x1634e
xorl %eax, %eax
callq 0xb050
movl 0x40(%rbx), %esi
leaq 0x2742(%rip), %rdi # 0x16360
xorl %eax, %eax
callq 0xb050
movl 0x44(%rbx), %esi
leaq 0x2742(%rip), %rdi # 0x16371
xorl %eax, %eax
callq 0xb050
testl %ebp, %ebp
je 0x13ccd
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x13ccd
leaq 0x2766(%rip), %r12 # 0x163b9
leaq 0x2729(%rip), %r14 # 0x16383
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
xorl %ebp, %ebp
xorl %r15d, %r15d
movl 0x4(%rax,%rbp), %edx
movl 0x8(%rax,%rbp), %ecx
cmpb $0x0, (%rax,%rbp)
leaq 0x2735(%rip), %r8 # 0x163b1
leaq 0x14e1(%rip), %rsi # 0x15164
cmovneq %rsi, %r8
cmpb $0x0, 0x1(%rax,%rbp)
movq %r12, %r9
leaq 0x2725(%rip), %rsi # 0x163bb
cmovneq %rsi, %r9
movl 0x10(%rax,%rbp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0xb050
incq %r15
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
imulq %r13, %rcx
addq $0x30, %rbp
cmpq %r15, %rcx
ja 0x13c69
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5Cache9printInfoEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
lea rdi, aCacheInfo; "---------- Cache Info -----------"
call _puts
mov esi, [rbx+30h]
lea rdi, aCacheSizeDByte; "Cache Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+34h]
lea rdi, aBlockSizeDByte; "Block Size: %d bytes\n"
xor eax, eax
call _printf
mov esi, [rbx+38h]
lea rdi, aBlockNumD; "Block Num: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+3Ch]
lea rdi, aAssociativiyD; "Associativiy: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+40h]
lea rdi, aHitLatencyD; "Hit Latency: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+44h]
lea rdi, aMissLatencyD; "Miss Latency: %d\n"
xor eax, eax
call _printf
test ebp, ebp
jz loc_13CCD
mov rax, [rbx+48h]
cmp [rbx+50h], rax
jz loc_13CCD
lea r12, aUnmodified; "unmodified"
lea r14, aBlockDTag0xXId; "Block %d: tag 0x%x id %d %s %s (last re"...
mov r13, 0AAAAAAAAAAAAAAABh
xor ebp, ebp
xor r15d, r15d
loc_13C69:
mov edx, [rax+rbp+4]
mov ecx, [rax+rbp+8]
cmp byte ptr [rax+rbp], 0
lea r8, aInvalid; "invalid"
lea rsi, aBasicStringMCo+24h; "valid"
cmovnz r8, rsi
cmp byte ptr [rax+rbp+1], 0
mov r9, r12
lea rsi, aUnmodified+2; "modified"
cmovnz r9, rsi
mov eax, [rax+rbp+10h]
mov [rsp+38h+var_38], eax
mov rdi, r14
mov esi, r15d
xor eax, eax
call _printf
inc r15
mov rax, [rbx+48h]
mov rcx, [rbx+50h]
sub rcx, rax
sar rcx, 4
imul rcx, r13
add rbp, 30h ; '0'
cmp rcx, r15
ja short loc_13C69
loc_13CCD:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Cache::printInfo(Cache *this, int a2)
{
long long result; // rax
long long v3; // rbp
unsigned long long v4; // r15
const char *v5; // r8
const char *v6; // r9
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n", *((_DWORD *)this + 12));
printf("Block Size: %d bytes\n", *((_DWORD *)this + 13));
printf("Block Num: %d\n", *((_DWORD *)this + 14));
printf("Associativiy: %d\n", *((_DWORD *)this + 15));
printf("Hit Latency: %d\n", *((_DWORD *)this + 16));
result = printf("Miss Latency: %d\n", *((_DWORD *)this + 17));
if ( a2 )
{
result = *((_QWORD *)this + 9);
if ( *((_QWORD *)this + 10) != result )
{
v3 = 0LL;
v4 = 0LL;
do
{
v5 = "invalid";
if ( *(_BYTE *)(result + v3) )
v5 = "valid";
v6 = "unmodified";
if ( *(_BYTE *)(result + v3 + 1) )
v6 = "modified";
printf(
"Block %d: tag 0x%x id %d %s %s (last ref %d)\n",
v4++,
*(_DWORD *)(result + v3 + 4),
*(_DWORD *)(result + v3 + 8),
v5,
v6,
*(_DWORD *)(result + v3 + 16));
result = *((_QWORD *)this + 9);
v3 += 48LL;
}
while ( 0xAAAAAAAAAAAAAAABLL * ((*((_QWORD *)this + 10) - result) >> 4) > v4 );
}
}
return result;
}
| printInfo:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[0x1164cf]
CALL 0x0010b320
MOV ESI,dword ptr [RBX + 0x30]
LEA RDI,[0x116313]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x34]
LEA RDI,[0x116329]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x38]
LEA RDI,[0x11633f]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x3c]
LEA RDI,[0x11634e]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x40]
LEA RDI,[0x116360]
XOR EAX,EAX
CALL 0x0010b050
MOV ESI,dword ptr [RBX + 0x44]
LEA RDI,[0x116371]
XOR EAX,EAX
CALL 0x0010b050
TEST EBP,EBP
JZ 0x00113ccd
MOV RAX,qword ptr [RBX + 0x48]
CMP qword ptr [RBX + 0x50],RAX
JZ 0x00113ccd
LEA R12,[0x1163b9]
LEA R14,[0x116383]
MOV R13,-0x5555555555555555
XOR EBP,EBP
XOR R15D,R15D
LAB_00113c69:
MOV EDX,dword ptr [RAX + RBP*0x1 + 0x4]
MOV ECX,dword ptr [RAX + RBP*0x1 + 0x8]
CMP byte ptr [RAX + RBP*0x1],0x0
LEA R8,[0x1163b1]
LEA RSI,[0x115164]
CMOVNZ R8,RSI
CMP byte ptr [RAX + RBP*0x1 + 0x1],0x0
MOV R9,R12
LEA RSI,[0x1163bb]
CMOVNZ R9,RSI
MOV EAX,dword ptr [RAX + RBP*0x1 + 0x10]
MOV dword ptr [RSP],EAX
MOV RDI,R14
MOV ESI,R15D
XOR EAX,EAX
CALL 0x0010b050
INC R15
MOV RAX,qword ptr [RBX + 0x48]
MOV RCX,qword ptr [RBX + 0x50]
SUB RCX,RAX
SAR RCX,0x4
IMUL RCX,R13
ADD RBP,0x30
CMP RCX,R15
JA 0x00113c69
LAB_00113ccd:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Cache::printInfo(bool) */
void __thiscall Cache::printInfo(Cache *this,bool param_1)
{
int8 in_RAX;
long lVar1;
ulong uVar2;
long lVar3;
int7 in_register_00000031;
char *pcVar4;
char *pcVar5;
ulong uVar6;
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n",(ulong)*(uint *)(this + 0x30));
printf("Block Size: %d bytes\n",(ulong)*(uint *)(this + 0x34));
printf("Block Num: %d\n",(ulong)*(uint *)(this + 0x38));
printf("Associativiy: %d\n",(ulong)*(uint *)(this + 0x3c));
printf("Hit Latency: %d\n",(ulong)*(uint *)(this + 0x40));
printf("Miss Latency: %d\n",(ulong)*(uint *)(this + 0x44));
if (((int)CONCAT71(in_register_00000031,param_1) != 0) &&
(lVar1 = *(long *)(this + 0x48), *(long *)(this + 0x50) != lVar1)) {
lVar3 = 0;
uVar6 = 0;
do {
pcVar4 = "invalid";
if (*(char *)(lVar1 + lVar3) != '\0') {
pcVar4 = "valid";
}
pcVar5 = "unmodified";
if (*(char *)(lVar1 + 1 + lVar3) != '\0') {
pcVar5 = "modified";
}
in_RAX = CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(lVar1 + 0x10 + lVar3));
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",uVar6 & 0xffffffff,
(ulong)*(uint *)(lVar1 + 4 + lVar3),(ulong)*(uint *)(lVar1 + 8 + lVar3),pcVar4,pcVar5,
in_RAX);
uVar6 = uVar6 + 1;
lVar1 = *(long *)(this + 0x48);
uVar2 = (*(long *)(this + 0x50) - lVar1 >> 4) * -0x5555555555555555;
lVar3 = lVar3 + 0x30;
} while (uVar6 <= uVar2 && uVar2 - uVar6 != 0);
}
return;
}
| |
23,890 | translog_variable_record_1group_decode_len | eloqsql/storage/maria/ma_loghandler.c | static translog_size_t translog_variable_record_1group_decode_len(uchar **src)
{
uint8 first= (uint8) (**src);
switch (first) {
case 251:
(*src)+= 3;
return (uint2korr((*src) - 2));
case 252:
(*src)+= 4;
return (uint3korr((*src) - 3));
case 253:
(*src)+= 5;
return (uint4korr((*src) - 4));
case 254:
case 255:
DBUG_ASSERT(0); /* reserved for future use */
return (0);
default:
(*src)++;
return (first);
}
} | O0 | c | translog_variable_record_1group_decode_len:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
addl $0xffffff05, %eax # imm = 0xFFFFFF05
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x58a36
movq -0x20(%rbp), %rax
leaq 0xff2f9(%rip), %rcx # 0x157ca0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x3, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzwl -0x2(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x58a4b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl -0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movzbl -0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x58a4b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x5, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x58a4b
jmp 0x58a2b
jmp 0x58a2d
movl $0x0, -0x4(%rbp)
jmp 0x58a4b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movzbl -0x11(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
| translog_variable_record_1group_decode_len:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_11], al
movzx eax, [rbp+var_11]
add eax, 0FFFFFF05h; switch 5 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 4
ja def_589AE; jumptable 00000000000589AE default case
mov rax, [rbp+var_20]
lea rcx, jpt_589AE
movsxd rax, ds:(jpt_589AE - 157CA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_589B0:
mov rax, [rbp+var_10]; jumptable 00000000000589AE case 251
mov rcx, [rax]
add rcx, 3
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
movzx eax, word ptr [rax-2]
mov [rbp+var_4], eax
jmp short loc_58A4B
loc_589CE:
mov rax, [rbp+var_10]; jumptable 00000000000589AE case 252
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
movzx eax, byte ptr [rax-3]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx-2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_10]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx-1]
shl ecx, 10h
or eax, ecx
mov [rbp+var_4], eax
jmp short loc_58A4B
loc_58A0C:
mov rax, [rbp+var_10]; jumptable 00000000000589AE case 253
mov rcx, [rax]
add rcx, 5
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax-4]
mov [rbp+var_4], eax
jmp short loc_58A4B
loc_58A29:
jmp short $+2; jumptable 00000000000589AE cases 254,255
loc_58A2B:
jmp short $+2
loc_58A2D:
mov [rbp+var_4], 0
jmp short loc_58A4B
def_589AE:
mov rax, [rbp+var_10]; jumptable 00000000000589AE default case
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
movzx eax, [rbp+var_11]
mov [rbp+var_4], eax
loc_58A4B:
mov eax, [rbp+var_4]
pop rbp
retn
| long long translog_variable_record_1group_decode_len(unsigned __int8 **a1)
{
unsigned __int8 v2; // [rsp+Fh] [rbp-11h]
unsigned int v3; // [rsp+1Ch] [rbp-4h]
v2 = **a1;
switch ( v2 )
{
case 0xFBu:
*a1 += 3;
v3 = *((unsigned __int16 *)*a1 - 1);
break;
case 0xFCu:
*a1 += 4;
v3 = (*(*a1 - 1) << 16) | *(unsigned __int16 *)(*a1 - 3);
break;
case 0xFDu:
*a1 += 5;
v3 = *((_DWORD *)*a1 - 1);
break;
case 0xFEu:
case 0xFFu:
v3 = 0;
break;
default:
++*a1;
v3 = v2;
break;
}
return v3;
}
| translog_variable_record_1group_decode_len:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
MOVZX EAX,byte ptr [RBP + -0x11]
ADD EAX,0xffffff05
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x4
JA 0x00158a36
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x257ca0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_fb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x3
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EAX,word ptr [RAX + -0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00158a4b
caseD_fc:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX + -0x3]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + -0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + -0x1]
SHL ECX,0x10
OR EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00158a4b
caseD_fd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x5
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + -0x4]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00158a4b
caseD_fe:
JMP 0x00158a2b
LAB_00158a2b:
JMP 0x00158a2d
LAB_00158a2d:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00158a4b
default:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOVZX EAX,byte ptr [RBP + -0x11]
MOV dword ptr [RBP + -0x4],EAX
LAB_00158a4b:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint translog_variable_record_1group_decode_len(long *param_1)
{
byte bVar1;
uint local_c;
bVar1 = *(byte *)*param_1;
switch(bVar1) {
case 0xfb:
*param_1 = *param_1 + 3;
local_c = (uint)*(ushort *)(*param_1 + -2);
break;
case 0xfc:
*param_1 = *param_1 + 4;
local_c = (uint)CONCAT12(*(int1 *)(*param_1 + -1),
CONCAT11(*(int1 *)(*param_1 + -2),*(int1 *)(*param_1 + -3))
);
break;
case 0xfd:
*param_1 = *param_1 + 5;
local_c = *(uint *)(*param_1 + -4);
break;
case 0xfe:
case 0xff:
local_c = 0;
break;
default:
*param_1 = *param_1 + 1;
local_c = (uint)bVar1;
}
return local_c;
}
| |
23,891 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O0 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5a9f0
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0xee164
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0xee119
movq 0x28(%rsp), %rax
addq $0x1, %rax
cmpq 0x38(%rsp), %rax
jae 0xee119
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
incq %rsi
movq %rsi, 0x28(%rsp)
callq 0x5b3e0
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x22, %eax
je 0xedfbf
jmp 0xedee2
movl 0xc(%rsp), %eax
subl $0x27, %eax
je 0xedf9c
jmp 0xedef1
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0xedfe2
jmp 0xedf00
movl 0xc(%rsp), %eax
subl $0x6e, %eax
je 0xedf33
jmp 0xedf0b
movl 0xc(%rsp), %eax
subl $0x72, %eax
je 0xedf56
jmp 0xedf16
movl 0xc(%rsp), %eax
subl $0x74, %eax
je 0xedf79
jmp 0xedf21
movl 0xc(%rsp), %eax
subl $0x78, %eax
je 0xee005
jmp 0xee0c3
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0xa, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0xd, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x9, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x27, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x22, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x5c, (%rax)
jmp 0xee117
movq 0x28(%rsp), %rax
addq $0x2, %rax
cmpq 0x38(%rsp), %rax
jae 0xee0c1
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x25(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x2, %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x26(%rsp)
movb $0x0, 0x27(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x25(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl $0x10, %edx
callq 0x5b5a8
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
leaq 0x25(%rsp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0xee0bf
movq 0x28(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movb %al, 0xb(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0xb(%rsp), %cl
movb %cl, (%rax)
jmp 0xee117
jmp 0xee0c1
jmp 0xee0c3
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x5c, (%rax)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0xa(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0xa(%rsp), %cl
movb %cl, (%rax)
jmp 0xee14f
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x9(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0x9(%rsp), %cl
movb %cl, (%rax)
jmp 0xee151
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0xede7a
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x5a6e0
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_18], 0
mov [rsp+48h+var_20], 0
loc_EDE7A:
mov rax, [rsp+48h+var_20]
cmp rax, [rsp+48h+var_10]
jnb loc_EE164
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_EE119
mov rax, [rsp+48h+var_20]
add rax, 1
cmp rax, [rsp+48h+var_10]
jnb loc_EE119
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
inc rsi
mov [rsp+48h+var_20], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
mov [rsp+48h+var_3C], eax
sub eax, 22h ; '"'
jz loc_EDFBF
jmp short $+2
loc_EDEE2:
mov eax, [rsp+48h+var_3C]
sub eax, 27h ; '''
jz loc_EDF9C
jmp short $+2
loc_EDEF1:
mov eax, [rsp+48h+var_3C]
sub eax, 5Ch ; '\'
jz loc_EDFE2
jmp short $+2
loc_EDF00:
mov eax, [rsp+48h+var_3C]
sub eax, 6Eh ; 'n'
jz short loc_EDF33
jmp short $+2
loc_EDF0B:
mov eax, [rsp+48h+var_3C]
sub eax, 72h ; 'r'
jz short loc_EDF56
jmp short $+2
loc_EDF16:
mov eax, [rsp+48h+var_3C]
sub eax, 74h ; 't'
jz short loc_EDF79
jmp short $+2
loc_EDF21:
mov eax, [rsp+48h+var_3C]
sub eax, 78h ; 'x'
jz loc_EE005
jmp loc_EE0C3
loc_EDF33:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Ah
jmp loc_EE117
loc_EDF56:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Dh
jmp loc_EE117
loc_EDF79:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 9
jmp loc_EE117
loc_EDF9C:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 27h ; '''
jmp loc_EE117
loc_EDFBF:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 22h ; '"'
jmp loc_EE117
loc_EDFE2:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
jmp loc_EE117
loc_EE005:
mov rax, [rsp+48h+var_20]
add rax, 2
cmp rax, [rsp+48h+var_10]
jnb loc_EE0C1
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_23], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 2
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_22], al
mov [rsp+48h+var_21], 0
mov [rsp+48h+var_30], 0
lea rdi, [rsp+48h+var_23]
lea rsi, [rsp+48h+var_30]
mov edx, 10h
call strtol
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_30]
lea rcx, [rsp+48h+var_23]
add rcx, 2
cmp rax, rcx
jnz short loc_EE0BF
mov rax, [rsp+48h+var_20]
add rax, 2
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_3D], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3D]
mov [rax], cl
jmp short loc_EE117
loc_EE0BF:
jmp short $+2
loc_EE0C1:
jmp short $+2
loc_EE0C3:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3E], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3E]
mov [rax], cl
loc_EE117:
jmp short loc_EE14F
loc_EE119:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3F], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3F]
mov [rax], cl
loc_EE14F:
jmp short $+2
loc_EE151:
mov rax, [rsp+48h+var_20]
add rax, 1
mov [rsp+48h+var_20], rax
jmp loc_EDE7A
loc_EE164:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
add rsp, 48h
retn
| long long string_process_escapes(long long a1)
{
long long v1; // rsi
long long v2; // rsi
long long v3; // rsi
long long v4; // rsi
long long v5; // rsi
long long v6; // rsi
long long v7; // rsi
long long v8; // rsi
long long v9; // rsi
long long v10; // rsi
char v12; // [rsp+9h] [rbp-3Fh]
char v13; // [rsp+Ah] [rbp-3Eh]
int v14; // [rsp+Ch] [rbp-3Ch]
char v15; // [rsp+10h] [rbp-38h]
char *v16; // [rsp+18h] [rbp-30h] BYREF
_BYTE v17[2]; // [rsp+25h] [rbp-23h] BYREF
char v18; // [rsp+27h] [rbp-21h] BYREF
unsigned long long i; // [rsp+28h] [rbp-20h]
long long v20; // [rsp+30h] [rbp-18h]
unsigned long long v21; // [rsp+38h] [rbp-10h]
long long v22; // [rsp+40h] [rbp-8h]
v22 = a1;
v21 = std::string::length(a1);
v20 = 0LL;
for ( i = 0LL; i < v21; ++i )
{
if ( *(_BYTE *)std::string::operator[](v22, i) == 92 && i + 1 < v21 )
{
v14 = *(char *)std::string::operator[](v22, ++i);
switch ( v14 )
{
case '"':
v5 = v20++;
*(_BYTE *)std::string::operator[](v22, v5) = 34;
break;
case '\'':
v4 = v20++;
*(_BYTE *)std::string::operator[](v22, v4) = 39;
break;
case '\\':
v6 = v20++;
*(_BYTE *)std::string::operator[](v22, v6) = 92;
break;
case 'n':
v1 = v20++;
*(_BYTE *)std::string::operator[](v22, v1) = 10;
break;
case 'r':
v2 = v20++;
*(_BYTE *)std::string::operator[](v22, v2) = 13;
break;
case 't':
v3 = v20++;
*(_BYTE *)std::string::operator[](v22, v3) = 9;
break;
default:
if ( v14 == 120
&& i + 2 < v21
&& (v17[0] = *(_BYTE *)std::string::operator[](v22, i + 1),
v17[1] = *(_BYTE *)std::string::operator[](v22, i + 2),
v18 = 0,
v16 = 0LL,
v15 = strtol(v17, &v16, 16LL),
v16 == &v18) )
{
i += 2LL;
v7 = v20++;
*(_BYTE *)std::string::operator[](v22, v7) = v15;
}
else
{
v8 = v20++;
*(_BYTE *)std::string::operator[](v22, v8) = 92;
v13 = *(_BYTE *)std::string::operator[](v22, i);
v9 = v20++;
*(_BYTE *)std::string::operator[](v22, v9) = v13;
}
break;
}
}
else
{
v12 = *(_BYTE *)std::string::operator[](v22, i);
v10 = v20++;
*(_BYTE *)std::string::operator[](v22, v10) = v12;
}
}
return std::string::resize(v22, v20);
}
| string_process_escapes:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0015a9f0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x28],0x0
LAB_001ede7a:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee164
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x001ee119
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee119
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
MOV qword ptr [RSP + 0x28],RSI
CALL 0x0015b3e0
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x22
JZ 0x001edfbf
JMP 0x001edee2
LAB_001edee2:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x27
JZ 0x001edf9c
JMP 0x001edef1
LAB_001edef1:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x001edfe2
JMP 0x001edf00
LAB_001edf00:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x6e
JZ 0x001edf33
JMP 0x001edf0b
LAB_001edf0b:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x72
JZ 0x001edf56
JMP 0x001edf16
LAB_001edf16:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x74
JZ 0x001edf79
JMP 0x001edf21
LAB_001edf21:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x78
JZ 0x001ee005
JMP 0x001ee0c3
LAB_001edf33:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0xa
JMP 0x001ee117
LAB_001edf56:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0xd
JMP 0x001ee117
LAB_001edf79:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x9
JMP 0x001ee117
LAB_001edf9c:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x27
JMP 0x001ee117
LAB_001edfbf:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x22
JMP 0x001ee117
LAB_001edfe2:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x5c
JMP 0x001ee117
LAB_001ee005:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee0c1
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x1
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x25],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x2
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x26],AL
MOV byte ptr [RSP + 0x27],0x0
MOV qword ptr [RSP + 0x18],0x0
LEA RDI,[RSP + 0x25]
LEA RSI,[RSP + 0x18]
MOV EDX,0x10
CALL 0x0015b5a8
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x25]
ADD RCX,0x2
CMP RAX,RCX
JNZ 0x001ee0bf
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0xb],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0xb]
MOV byte ptr [RAX],CL
JMP 0x001ee117
LAB_001ee0bf:
JMP 0x001ee0c1
LAB_001ee0c1:
JMP 0x001ee0c3
LAB_001ee0c3:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x5c
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0xa],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0xa]
MOV byte ptr [RAX],CL
LAB_001ee117:
JMP 0x001ee14f
LAB_001ee119:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x9],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0x9]
MOV byte ptr [RAX],CL
LAB_001ee14f:
JMP 0x001ee151
LAB_001ee151:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001ede7a
LAB_001ee164:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0015a6e0
ADD RSP,0x48
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
int1 uVar1;
char cVar2;
char *pcVar3;
long lVar4;
int1 *puVar5;
char *local_30;
char local_23;
int1 local_22;
char local_21;
ulong local_20;
long local_18;
ulong local_10;
string *local_8;
local_8 = param_1;
local_10 = std::__cxx11::string::length();
local_18 = 0;
local_20 = 0;
do {
if (local_10 <= local_20) {
std::__cxx11::string::resize((ulong)local_8);
return;
}
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
if ((*pcVar3 == '\\') && (local_20 + 1 < local_10)) {
local_20 = local_20 + 1;
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
cVar2 = *pcVar3;
if (cVar2 == '\"') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x22;
}
else if (cVar2 == '\'') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x27;
}
else if (cVar2 == '\\') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
}
else if (cVar2 == 'n') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 10;
}
else if (cVar2 == 'r') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0xd;
}
else if (cVar2 == 't') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 9;
}
else {
if ((cVar2 == 'x') && (local_20 + 2 < local_10)) {
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
local_23 = *pcVar3;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
local_22 = *puVar5;
local_21 = '\0';
local_30 = (char *)0x0;
lVar4 = strtol(&local_23,&local_30,0x10);
if (local_30 == &local_21) {
local_20 = local_20 + 2;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = (char)lVar4;
goto LAB_001ee14f;
}
}
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
}
else {
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
LAB_001ee14f:
local_20 = local_20 + 1;
} while( true );
}
| |
23,892 | fill_uint16 | eloqsql/strings/ctype.c | static int fill_uint16(uint16 *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uint16) strtol(b,NULL,16);
}
return 0;
} | O0 | c | fill_uint16:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xbdb28
jmp 0xbda52
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0xbda7e
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x13320(%rip), %rdi # 0xd0d8f
callq 0x364c0
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xbda87
jmp 0xbda97
jmp 0xbda89
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xbda52
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0xbdacd
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x132d3(%rip), %rdi # 0xd0d8f
callq 0x364c0
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0xbdad6
jmp 0xbdae6
jmp 0xbdad8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xbda9f
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xbdaf8
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0xbdafa
jmp 0xbdb28
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x368e0
movw %ax, %dx
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xbda42
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
| fill_uint16:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_BDA42:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_BDB28
jmp short $+2
loc_BDA52:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_BDA7E
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_D0D8F; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_BDA7E:
mov al, [rbp+var_41]
test al, 1
jnz short loc_BDA87
jmp short loc_BDA97
loc_BDA87:
jmp short $+2
loc_BDA89:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_BDA52
loc_BDA97:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_BDA9F:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_BDACD
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_D0D8F; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_BDACD:
mov al, [rbp+var_42]
test al, 1
jnz short loc_BDAD6
jmp short loc_BDAE6
loc_BDAD6:
jmp short $+2
loc_BDAD8:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_BDA9F
loc_BDAE6:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_BDAF8
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_BDAFA
loc_BDAF8:
jmp short loc_BDB28
loc_BDAFA:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtol
mov dx, ax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx*2], dx
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_BDA42
loc_BDB28:
xor eax, eax
add rsp, 50h
pop rbp
retn
| long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL);
}
return 0LL;
}
| fill_uint16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001bda42:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001bdb28
JMP 0x001bda52
LAB_001bda52:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x001bda7e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x1d0d8f]
CALL 0x001364c0
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001bda7e:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001bda87
JMP 0x001bda97
LAB_001bda87:
JMP 0x001bda89
LAB_001bda89:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001bda52
LAB_001bda97:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_001bda9f:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x001bdacd
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x1d0d8f]
CALL 0x001364c0
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_001bdacd:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x001bdad6
JMP 0x001bdae6
LAB_001bdad6:
JMP 0x001bdad8
LAB_001bdad8:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001bda9f
LAB_001bdae6:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001bdaf8
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x001bdafa
LAB_001bdaf8:
JMP 0x001bdb28
LAB_001bdafa:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x001368e0
MOV DX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001bda42
LAB_001bdb28:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int2 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtol(pcVar1,0,0x10);
*(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
| |
23,893 | pagecache_wait_lock | eloqsql/storage/maria/ma_pagecache.c | static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
PAGECACHE_FILE file,
pgcache_page_no_t pageno,
uint lock_type)
{
/* Lock failed we will wait */
struct st_my_thread_var *thread= my_thread_var;
DBUG_ENTER("pagecache_wait_lock");
DBUG_PRINT("info", ("fail to lock, waiting... %p", block));
thread->lock_type= lock_type;
wqueue_add_to_queue(&block->wqueue[COND_FOR_WRLOCK], thread);
dec_counter_for_resize_op(pagecache);
do
{
DBUG_PRINT("wait",
("suspend thread %s %ld", thread->name, (ulong) thread->id));
pagecache_pthread_cond_wait(&thread->suspend,
&pagecache->cache_lock);
}
while(thread->next);
inc_counter_for_resize_op(pagecache);
PCBLOCK_INFO(block);
if ((block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH)) ||
!block->hash_link ||
file.file != block->hash_link->file.file ||
pageno != block->hash_link->pageno)
{
DBUG_PRINT("info", ("the block %p changed => need retry "
"status: %x files %d != %d or pages %lu != %lu",
block, block->status, file.file,
block->hash_link ? block->hash_link->file.file : -1,
(ulong) pageno,
(ulong) (block->hash_link ? block->hash_link->pageno : 0)));
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O0 | c | pagecache_wait_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
callq 0xf7b30
movq %rax, -0x30(%rbp)
jmp 0x9979a
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rsi
callq 0x100ff0
movq -0x10(%rbp), %rdi
callq 0x95990
jmp 0x997c7
jmp 0x997c9
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0xc8, %rsi
leaq 0xb9f8f(%rip), %rdx # 0x153772
movl $0x982, %ecx # imm = 0x982
callq 0x98830
movq -0x30(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0x997c5
movq -0x10(%rbp), %rdi
callq 0x94c60
jmp 0x99806
movq -0x18(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
jne 0x99847
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x99847
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpl 0x28(%rcx), %eax
jne 0x99847
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x60(%rcx), %rax
je 0x99853
jmp 0x99849
jmp 0x9984b
jmp 0x9984d
movb $0x1, -0x1(%rbp)
jmp 0x99859
jmp 0x99855
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pagecache_wait_lock:
push rbp
mov rbp, rsp
sub rsp, 40h
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
call _my_thread_var
mov [rbp+var_30], rax
jmp short $+2
loc_9979A:
mov ecx, [rbp+var_24]
mov rax, [rbp+var_30]
mov [rax+0E4h], ecx
mov rdi, [rbp+var_18]
add rdi, 48h ; 'H'
add rdi, 10h
mov rsi, [rbp+var_30]
call wqueue_add_to_queue
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
loc_997C5:
jmp short $+2
loc_997C7:
jmp short $+2
loc_997C9:
mov rdi, [rbp+var_30]
add rdi, 8
mov rsi, [rbp+var_10]
add rsi, 0C8h
lea rdx, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 982h
call inline_mysql_cond_wait_2
mov rax, [rbp+var_30]
cmp qword ptr [rax+88h], 0
jnz short loc_997C5
mov rdi, [rbp+var_10]
call inc_counter_for_resize_op
jmp short $+2
loc_99806:
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+74h]
and eax, 0Ch
cmp eax, 0
jnz short loc_99847
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_99847
mov rax, [rbp+var_38]
mov eax, [rax+10h]
mov rcx, [rbp+var_18]
mov rcx, [rcx+20h]
cmp eax, [rcx+28h]
jnz short loc_99847
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rcx, [rcx+20h]
cmp rax, [rcx+60h]
jz short loc_99853
loc_99847:
jmp short $+2
loc_99849:
jmp short $+2
loc_9984B:
jmp short $+2
loc_9984D:
mov [rbp+var_1], 1
jmp short loc_99859
loc_99853:
jmp short $+2
loc_99855:
mov [rbp+var_1], 0
loc_99859:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| bool pagecache_wait_lock(
long long a1,
long long a2,
long long a3,
int a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
int a9)
{
long long v10; // [rsp+10h] [rbp-30h]
v10 = my_thread_var(a1, (const char *)a2);
*(_DWORD *)(v10 + 228) = a4;
wqueue_add_to_queue(a2 + 88, v10);
dec_counter_for_resize_op(a1);
do
inline_mysql_cond_wait_2(
v10 + 8,
a1 + 200,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x982u);
while ( *(_QWORD *)(v10 + 136) );
inc_counter_for_resize_op(a1);
return (*(_WORD *)(a2 + 116) & 0xC) != 0
|| !*(_QWORD *)(a2 + 32)
|| a9 != *(_DWORD *)(*(_QWORD *)(a2 + 32) + 40LL)
|| a3 != *(_QWORD *)(*(_QWORD *)(a2 + 32) + 96LL);
}
| pagecache_wait_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
CALL 0x001f7b30
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0019979a
LAB_0019979a:
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0xe4],ECX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x48
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00200ff0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00195990
LAB_001997c5:
JMP 0x001997c7
LAB_001997c7:
JMP 0x001997c9
LAB_001997c9:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc8
LEA RDX,[0x253772]
MOV ECX,0x982
CALL 0x00198830
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x88],0x0
JNZ 0x001997c5
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00194c60
JMP 0x00199806
LAB_00199806:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0xc
CMP EAX,0x0
JNZ 0x00199847
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00199847
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x20]
CMP EAX,dword ptr [RCX + 0x28]
JNZ 0x00199847
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x20]
CMP RAX,qword ptr [RCX + 0x60]
JZ 0x00199853
LAB_00199847:
JMP 0x00199849
LAB_00199849:
JMP 0x0019984b
LAB_0019984b:
JMP 0x0019984d
LAB_0019984d:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00199859
LAB_00199853:
JMP 0x00199855
LAB_00199855:
MOV byte ptr [RBP + -0x1],0x0
LAB_00199859:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pagecache_wait_lock(long param_1,long param_2,long param_3,int4 param_4)
{
long lVar1;
int in_stack_00000018;
int1 local_9;
lVar1 = _my_thread_var();
*(int4 *)(lVar1 + 0xe4) = param_4;
wqueue_add_to_queue(param_2 + 0x58,lVar1);
dec_counter_for_resize_op(param_1);
do {
inline_mysql_cond_wait
(lVar1 + 8,param_1 + 200,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x982);
} while (*(long *)(lVar1 + 0x88) != 0);
inc_counter_for_resize_op(param_1);
if (((((*(ushort *)(param_2 + 0x74) & 0xc) == 0) && (*(long *)(param_2 + 0x20) != 0)) &&
(in_stack_00000018 == *(int *)(*(long *)(param_2 + 0x20) + 0x28))) &&
(param_3 == *(long *)(*(long *)(param_2 + 0x20) + 0x60))) {
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
23,894 | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp | void PushBack(Point2ndDerivWeight<REAL> weight) {
_tbl->_weights.push_back(weight.p);
_tbl->_duWeights.push_back(weight.du);
_tbl->_dvWeights.push_back(weight.dv);
_tbl->_duuWeights.push_back(weight.duu);
_tbl->_duvWeights.push_back(weight.duv);
_tbl->_dvvWeights.push_back(weight.dvv);
} | O0 | cpp | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rsi
movq %rsi, -0x10(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rdi
addq $0x30, %rdi
callq 0xcdcb0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rdi
addq $0x48, %rdi
addq $0x8, %rsi
callq 0xcdcb0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rdi
addq $0x60, %rdi
addq $0x10, %rsi
callq 0xcdcb0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rdi
addq $0x78, %rdi
addq $0x18, %rsi
callq 0xcdcb0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rdi
addq $0x90, %rdi
addq $0x20, %rsi
callq 0xcdcb0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rdi
addq $0xa8, %rdi
addq $0x28, %rsi
callq 0xcdcb0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIdE24Point2ndDerivAccumulator8PushBackENS2_19Point2ndDerivWeightIdEE:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rsi, [rbp+arg_0]
mov [rbp+var_10], rsi
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rdi, [rax]
add rdi, 30h ; '0'
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rax, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdi, [rax]
add rdi, 48h ; 'H'
add rsi, 8
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rax, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdi, [rax]
add rdi, 60h ; '`'
add rsi, 10h
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rax, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdi, [rax]
add rdi, 78h ; 'x'
add rsi, 18h
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rax, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdi, [rax]
add rdi, 90h
add rsi, 20h ; ' '
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rax, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdi, [rax]
add rdi, 0A8h
add rsi, 28h ; '('
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12)
{
std::vector<double>::push_back(*a1 + 48LL, &a7);
std::vector<double>::push_back(*a1 + 72LL, &a8);
std::vector<double>::push_back(*a1 + 96LL, &a9);
std::vector<double>::push_back(*a1 + 120LL, &a10);
std::vector<double>::push_back(*a1 + 144LL, &a11);
return std::vector<double>::push_back(*a1 + 168LL, &a12);
}
| |||
23,895 | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp | void PushBack(Point2ndDerivWeight<REAL> weight) {
_tbl->_weights.push_back(weight.p);
_tbl->_duWeights.push_back(weight.du);
_tbl->_dvWeights.push_back(weight.dv);
_tbl->_duuWeights.push_back(weight.duu);
_tbl->_duvWeights.push_back(weight.duv);
_tbl->_dvvWeights.push_back(weight.dvv);
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>):
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x30, %rdi
leaq 0x10(%rsp), %rsi
callq 0x52b50
movq (%rbx), %rdi
addq $0x48, %rdi
leaq 0x18(%rsp), %rsi
callq 0x52b50
movq (%rbx), %rdi
addq $0x60, %rdi
leaq 0x20(%rsp), %rsi
callq 0x52b50
movq (%rbx), %rdi
addq $0x78, %rdi
leaq 0x28(%rsp), %rsi
callq 0x52b50
movl $0x90, %edi
addq (%rbx), %rdi
leaq 0x30(%rsp), %rsi
callq 0x52b50
movl $0xa8, %edi
addq (%rbx), %rdi
leaq 0x38(%rsp), %rsi
callq 0x52b50
popq %rbx
retq
nop
| _ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIdE24Point2ndDerivAccumulator8PushBackENS2_19Point2ndDerivWeightIdEE:
push rbx
mov rbx, rdi
mov rdi, [rdi]
add rdi, 30h ; '0'
lea rsi, [rsp+8+arg_0]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rdi, [rbx]
add rdi, 48h ; 'H'
lea rsi, [rsp+8+arg_8]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rdi, [rbx]
add rdi, 60h ; '`'
lea rsi, [rsp+8+arg_10]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov rdi, [rbx]
add rdi, 78h ; 'x'
lea rsi, [rsp+8+arg_18]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov edi, 90h
add rdi, [rbx]
lea rsi, [rsp+8+arg_20]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
mov edi, 0A8h
add rdi, [rbx]
lea rsi, [rsp+8+arg_28]
call __ZNSt6vectorIdSaIdEE9push_backERKd; std::vector<double>::push_back(double const&)
pop rbx
retn
| long long OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
char a8,
char a9,
char a10,
char a11,
char a12)
{
std::vector<double>::push_back(*a1 + 48LL, &a7);
std::vector<double>::push_back(*a1 + 72LL, &a8);
std::vector<double>::push_back(*a1 + 96LL, &a9);
std::vector<double>::push_back(*a1 + 120LL, &a10);
std::vector<double>::push_back(*a1 + 144LL, &a11);
return std::vector<double>::push_back(*a1 + 168LL, &a12);
}
| PushBack:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x30
LEA RSI,[RSP + 0x10]
CALL 0x00152b50
MOV RDI,qword ptr [RBX]
ADD RDI,0x48
LEA RSI,[RSP + 0x18]
CALL 0x00152b50
MOV RDI,qword ptr [RBX]
ADD RDI,0x60
LEA RSI,[RSP + 0x20]
CALL 0x00152b50
MOV RDI,qword ptr [RBX]
ADD RDI,0x78
LEA RSI,[RSP + 0x28]
CALL 0x00152b50
MOV EDI,0x90
ADD RDI,qword ptr [RBX]
LEA RSI,[RSP + 0x30]
CALL 0x00152b50
MOV EDI,0xa8
ADD RDI,qword ptr [RBX]
LEA RSI,[RSP + 0x38]
CALL 0x00152b50
POP RBX
RET
|
/* OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<double>)
*/
void OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack
(long *param_1)
{
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0x30),(double *)&stack0x00000008);
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0x48),(double *)&stack0x00000010);
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0x60),(double *)&stack0x00000018);
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0x78),(double *)&stack0x00000020);
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0x90),(double *)&stack0x00000028);
std::vector<double,std::allocator<double>>::push_back
((vector<double,std::allocator<double>> *)(*param_1 + 0xa8),(double *)&stack0x00000030);
return;
}
| |
23,896 | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp | void PushBack(Point2ndDerivWeight<REAL> weight) {
_tbl->_weights.push_back(weight.p);
_tbl->_duWeights.push_back(weight.du);
_tbl->_dvWeights.push_back(weight.dv);
_tbl->_duuWeights.push_back(weight.duu);
_tbl->_duvWeights.push_back(weight.duv);
_tbl->_dvvWeights.push_back(weight.dvv);
} | O3 | cpp | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<float>):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x20(%rsp), %rbx
movq (%rdi), %rdi
movq 0x38(%rdi), %rsi
cmpq 0x40(%rdi), %rsi
je 0x85a57
movsd (%rbx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rdi)
jmp 0x85a66
addq $0x30, %rdi
movq %rbx, %rdx
callq 0x3ad90
movq (%r14), %rdi
leaq 0x8(%rbx), %rdx
movq 0x50(%rdi), %rsi
cmpq 0x58(%rdi), %rsi
je 0x85a86
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x50(%rdi)
jmp 0x85a92
addq $0x48, %rdi
callq 0x3ad90
movq (%r14), %rdi
leaq 0x10(%rbx), %rdx
movq 0x68(%rdi), %rsi
cmpq 0x70(%rdi), %rsi
je 0x85ab2
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x68(%rdi)
jmp 0x85abe
addq $0x60, %rdi
callq 0x3ad90
movq (%r14), %rdi
leaq 0x18(%rbx), %rdx
movq 0x80(%rdi), %rsi
cmpq 0x88(%rdi), %rsi
je 0x85ae7
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x80(%rdi)
jmp 0x85af3
addq $0x78, %rdi
callq 0x3ad90
movq (%r14), %rdi
leaq 0x20(%rbx), %rdx
movq 0x98(%rdi), %rsi
cmpq 0xa0(%rdi), %rsi
je 0x85b1c
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%rdi)
jmp 0x85b2b
addq $0x90, %rdi
callq 0x3ad90
movq (%r14), %rdi
addq $0x28, %rbx
movq 0xb0(%rdi), %rsi
cmpq 0xb8(%rdi), %rsi
je 0x85b54
movsd (%rbx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xb0(%rdi)
jmp 0x85b63
addq $0xa8, %rdi
movq %rbx, %rdx
callq 0x3ad90
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIdE24Point2ndDerivAccumulator8PushBackENS2_19Point2ndDerivWeightIdEE:
push r14
push rbx
push rax
mov r14, rdi
lea rbx, [rsp+18h+arg_0]
mov rdi, [rdi]
mov rsi, [rdi+38h]
cmp rsi, [rdi+40h]
jz short loc_85A57
movsd xmm0, qword ptr [rbx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+38h], rsi
jmp short loc_85A66
loc_85A57:
add rdi, 30h ; '0'
mov rdx, rbx
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
mov rdi, [r14]
loc_85A66:
lea rdx, [rbx+8]
mov rsi, [rdi+50h]
cmp rsi, [rdi+58h]
jz short loc_85A86
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+50h], rsi
jmp short loc_85A92
loc_85A86:
add rdi, 48h ; 'H'
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
mov rdi, [r14]
loc_85A92:
lea rdx, [rbx+10h]
mov rsi, [rdi+68h]
cmp rsi, [rdi+70h]
jz short loc_85AB2
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+68h], rsi
jmp short loc_85ABE
loc_85AB2:
add rdi, 60h ; '`'
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
mov rdi, [r14]
loc_85ABE:
lea rdx, [rbx+18h]
mov rsi, [rdi+80h]
cmp rsi, [rdi+88h]
jz short loc_85AE7
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+80h], rsi
jmp short loc_85AF3
loc_85AE7:
add rdi, 78h ; 'x'
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
mov rdi, [r14]
loc_85AF3:
lea rdx, [rbx+20h]
mov rsi, [rdi+98h]
cmp rsi, [rdi+0A0h]
jz short loc_85B1C
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+98h], rsi
jmp short loc_85B2B
loc_85B1C:
add rdi, 90h
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
mov rdi, [r14]
loc_85B2B:
add rbx, 28h ; '('
mov rsi, [rdi+0B0h]
cmp rsi, [rdi+0B8h]
jz short loc_85B54
movsd xmm0, qword ptr [rbx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+0B0h], rsi
jmp short loc_85B63
loc_85B54:
add rdi, 0A8h
mov rdx, rbx
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_85B63:
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12)
{
_QWORD *v13; // rdi
_QWORD *v14; // rsi
long long result; // rax
_QWORD *v16; // rsi
_QWORD *v17; // rsi
_QWORD *v18; // rsi
_QWORD *v19; // rsi
_QWORD *v20; // rsi
v13 = (_QWORD *)*a1;
v14 = (_QWORD *)v13[7];
if ( v14 == (_QWORD *)v13[8] )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 6, v14, &a7);
v13 = (_QWORD *)*a1;
}
else
{
*v14 = a7;
v13[7] = v14 + 1;
}
v16 = (_QWORD *)v13[10];
if ( v16 == (_QWORD *)v13[11] )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 9, v16, &a8);
v13 = (_QWORD *)*a1;
}
else
{
*v16 = a8;
v13[10] = v16 + 1;
}
v17 = (_QWORD *)v13[13];
if ( v17 == (_QWORD *)v13[14] )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 12, v17, &a9);
v13 = (_QWORD *)*a1;
}
else
{
*v17 = a9;
v13[13] = v17 + 1;
}
v18 = (_QWORD *)v13[16];
if ( v18 == (_QWORD *)v13[17] )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 15, v18, &a10);
v13 = (_QWORD *)*a1;
}
else
{
*v18 = a10;
v13[16] = v18 + 1;
}
v19 = (_QWORD *)v13[19];
if ( v19 == (_QWORD *)v13[20] )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 18, v19, &a11);
v13 = (_QWORD *)*a1;
}
else
{
*v19 = a11;
v13[19] = v19 + 1;
}
v20 = (_QWORD *)v13[22];
if ( v20 == (_QWORD *)v13[23] )
return std::vector<double>::_M_realloc_insert<double const&>(v13 + 21, v20, &a12);
*v20 = a12;
v13[22] = v20 + 1;
return result;
}
| PushBack:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
LEA RBX,[RSP + 0x20]
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x38]
CMP RSI,qword ptr [RDI + 0x40]
JZ 0x00185a57
MOVSD XMM0,qword ptr [RBX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x38],RSI
JMP 0x00185a66
LAB_00185a57:
ADD RDI,0x30
MOV RDX,RBX
CALL 0x0013ad90
MOV RDI,qword ptr [R14]
LAB_00185a66:
LEA RDX,[RBX + 0x8]
MOV RSI,qword ptr [RDI + 0x50]
CMP RSI,qword ptr [RDI + 0x58]
JZ 0x00185a86
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x50],RSI
JMP 0x00185a92
LAB_00185a86:
ADD RDI,0x48
CALL 0x0013ad90
MOV RDI,qword ptr [R14]
LAB_00185a92:
LEA RDX,[RBX + 0x10]
MOV RSI,qword ptr [RDI + 0x68]
CMP RSI,qword ptr [RDI + 0x70]
JZ 0x00185ab2
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x68],RSI
JMP 0x00185abe
LAB_00185ab2:
ADD RDI,0x60
CALL 0x0013ad90
MOV RDI,qword ptr [R14]
LAB_00185abe:
LEA RDX,[RBX + 0x18]
MOV RSI,qword ptr [RDI + 0x80]
CMP RSI,qword ptr [RDI + 0x88]
JZ 0x00185ae7
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x80],RSI
JMP 0x00185af3
LAB_00185ae7:
ADD RDI,0x78
CALL 0x0013ad90
MOV RDI,qword ptr [R14]
LAB_00185af3:
LEA RDX,[RBX + 0x20]
MOV RSI,qword ptr [RDI + 0x98]
CMP RSI,qword ptr [RDI + 0xa0]
JZ 0x00185b1c
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x98],RSI
JMP 0x00185b2b
LAB_00185b1c:
ADD RDI,0x90
CALL 0x0013ad90
MOV RDI,qword ptr [R14]
LAB_00185b2b:
ADD RBX,0x28
MOV RSI,qword ptr [RDI + 0xb0]
CMP RSI,qword ptr [RDI + 0xb8]
JZ 0x00185b54
MOVSD XMM0,qword ptr [RBX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0xb0],RSI
JMP 0x00185b63
LAB_00185b54:
ADD RDI,0xa8
MOV RDX,RBX
CALL 0x0013ad90
LAB_00185b63:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point2ndDerivWeight<double>)
*/
void OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point2ndDerivAccumulator::PushBack
(long *param_1)
{
int8 *puVar1;
long lVar2;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
int8 in_stack_00000020;
int8 in_stack_00000028;
int8 in_stack_00000030;
lVar2 = *param_1;
puVar1 = *(int8 **)(lVar2 + 0x38);
if (puVar1 == *(int8 **)(lVar2 + 0x40)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0x30),puVar1,&stack0x00000008);
lVar2 = *param_1;
}
else {
*puVar1 = in_stack_00000008;
*(int8 **)(lVar2 + 0x38) = puVar1 + 1;
}
puVar1 = *(int8 **)(lVar2 + 0x50);
if (puVar1 == *(int8 **)(lVar2 + 0x58)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0x48));
lVar2 = *param_1;
}
else {
*puVar1 = in_stack_00000010;
*(int8 **)(lVar2 + 0x50) = puVar1 + 1;
}
puVar1 = *(int8 **)(lVar2 + 0x68);
if (puVar1 == *(int8 **)(lVar2 + 0x70)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0x60));
lVar2 = *param_1;
}
else {
*puVar1 = in_stack_00000018;
*(int8 **)(lVar2 + 0x68) = puVar1 + 1;
}
puVar1 = *(int8 **)(lVar2 + 0x80);
if (puVar1 == *(int8 **)(lVar2 + 0x88)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0x78));
lVar2 = *param_1;
}
else {
*puVar1 = in_stack_00000020;
*(int8 **)(lVar2 + 0x80) = puVar1 + 1;
}
puVar1 = *(int8 **)(lVar2 + 0x98);
if (puVar1 == *(int8 **)(lVar2 + 0xa0)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0x90));
lVar2 = *param_1;
}
else {
*puVar1 = in_stack_00000028;
*(int8 **)(lVar2 + 0x98) = puVar1 + 1;
}
puVar1 = *(int8 **)(lVar2 + 0xb0);
if (puVar1 == *(int8 **)(lVar2 + 0xb8)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar2 + 0xa8),puVar1,&stack0x00000030);
}
else {
*puVar1 = in_stack_00000030;
*(int8 **)(lVar2 + 0xb0) = puVar1 + 1;
}
return;
}
| |
23,897 | check_skipped_lsn | eloqsql/storage/maria/ma_loghandler.c | void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file,
pgcache_page_no_t page)
{
if (lsn <= log_descriptor.horizon)
{
DBUG_PRINT("info", ("Page is up to date, skipping redo"));
}
else
{
/* Give error, but don't flood the log */
if (skipped_lsn_err_count++ < MAX_LSN_ERRORS &&
! info->s->redo_error_given++)
{
eprint(tracef, "Table %s has wrong LSN: " LSN_FMT " on page: %llu",
(index_file ? info->s->data_file_name.str :
info->s->index_file_name.str),
LSN_IN_PARTS(lsn), (ulonglong) page);
recovery_found_crashed_tables++;
}
}
} | O0 | c | check_skipped_lsn:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq 0xc4e6e4(%rip), %rax # 0xc809d8
jg 0x322ff
jmp 0x322f8
jmp 0x322fa
jmp 0x323cb
leaq 0xc4eada(%rip), %rax # 0xc80de0
movl (%rax), %eax
movl %eax, %edx
addl $0x1, %edx
leaq 0xc4eacc(%rip), %rcx # 0xc80de0
movl %edx, (%rcx)
cmpl $0xa, %eax
jae 0x323c9
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movb 0x7eb(%rcx), %al
movb %al, %dl
addb $0x1, %dl
movb %dl, 0x7eb(%rcx)
cmpb $0x0, %al
jne 0x323c9
leaq 0xc4ea8a(%rip), %rax # 0xc80dd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x3236a
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5c0(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x3237c
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5d0(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movl %eax, %ecx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl %eax, %r8d
movq -0x20(%rbp), %r9
leaq 0x1250da(%rip), %rsi # 0x157484
movb $0x0, %al
callq 0x3fbc0
leaq 0xc4ea20(%rip), %rax # 0xc80dd8
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0xc4ea12(%rip), %rax # 0xc80dd8
movq %rcx, (%rax)
jmp 0x323cb
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_skipped_lsn:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp rax, cs:qword_C809D8
jg short loc_322FF
jmp short $+2
loc_322F8:
jmp short $+2
loc_322FA:
jmp loc_323CB
loc_322FF:
lea rax, skipped_lsn_err_count
mov eax, [rax]
mov edx, eax
add edx, 1
lea rcx, skipped_lsn_err_count
mov [rcx], edx
cmp eax, 0Ah
jnb loc_323C9
mov rax, [rbp+var_8]
mov rcx, [rax]
mov al, [rcx+7EBh]
mov dl, al
add dl, 1
mov [rcx+7EBh], dl
cmp al, 0
jnz loc_323C9
lea rax, tracef
mov rax, [rax]
mov [rbp+var_28], rax
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_3236A
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5C0h]
mov [rbp+var_30], rax
jmp short loc_3237C
loc_3236A:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5D0h]
mov [rbp+var_30], rax
loc_3237C:
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
sar rax, 20h
mov ecx, eax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov r8d, eax
mov r9, [rbp+var_20]
lea rsi, aTableSHasWrong; "Table %s has wrong LSN: (%u,0x%x) on pa"...
mov al, 0
call eprint
lea rax, recovery_found_crashed_tables
mov rcx, [rax]
add rcx, 1
lea rax, recovery_found_crashed_tables
mov [rax], rcx
loc_323C9:
jmp short $+2
loc_323CB:
add rsp, 30h
pop rbp
retn
| char check_skipped_lsn(long long a1, long long a2, char a3, int a4)
{
_QWORD *v4; // rax
LOBYTE(v4) = a2;
if ( a2 > qword_C809D8 )
{
LODWORD(v4) = skipped_lsn_err_count++;
if ( (unsigned int)v4 < 0xA )
{
LOBYTE(v4) = *(_BYTE *)(*(_QWORD *)a1 + 2027LL);
*(_BYTE *)(*(_QWORD *)a1 + 2027LL) = (_BYTE)v4 + 1;
if ( !(_BYTE)v4 )
{
if ( a3 )
eprint(
tracef,
(unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu",
*(_QWORD *)(*(_QWORD *)a1 + 1472LL),
HIDWORD(a2),
a2,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 1472LL));
else
eprint(
tracef,
(unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu",
*(_QWORD *)(*(_QWORD *)a1 + 1488LL),
HIDWORD(a2),
a2,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 1488LL));
v4 = &recovery_found_crashed_tables;
++recovery_found_crashed_tables;
}
}
}
return (char)v4;
}
| check_skipped_lsn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [0x00d809d8]
JG 0x001322ff
JMP 0x001322f8
LAB_001322f8:
JMP 0x001322fa
LAB_001322fa:
JMP 0x001323cb
LAB_001322ff:
LEA RAX,[0xd80de0]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
ADD EDX,0x1
LEA RCX,[0xd80de0]
MOV dword ptr [RCX],EDX
CMP EAX,0xa
JNC 0x001323c9
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV AL,byte ptr [RCX + 0x7eb]
MOV DL,AL
ADD DL,0x1
MOV byte ptr [RCX + 0x7eb],DL
CMP AL,0x0
JNZ 0x001323c9
LEA RAX,[0xd80dd0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x0013236a
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5c0]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013237c
LAB_0013236a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5d0]
MOV qword ptr [RBP + -0x30],RAX
LAB_0013237c:
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV ECX,EAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x20]
LEA RSI,[0x257484]
MOV AL,0x0
CALL 0x0013fbc0
LEA RAX,[0xd80dd8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0xd80dd8]
MOV qword ptr [RAX],RCX
LAB_001323c9:
JMP 0x001323cb
LAB_001323cb:
ADD RSP,0x30
POP RBP
RET
|
void check_skipped_lsn(long *param_1,ulong param_2,char param_3,int8 param_4)
{
char cVar1;
uint uVar2;
bool bVar3;
int8 local_38;
if (((DAT_00d809d8 < (long)param_2) &&
(uVar2 = skipped_lsn_err_count + 1, bVar3 = skipped_lsn_err_count < 10,
skipped_lsn_err_count = uVar2, bVar3)) &&
(cVar1 = *(char *)(*param_1 + 0x7eb), *(char *)(*param_1 + 0x7eb) = cVar1 + '\x01',
cVar1 == '\0')) {
if (param_3 == '\0') {
local_38 = *(int8 *)(*param_1 + 0x5d0);
}
else {
local_38 = *(int8 *)(*param_1 + 0x5c0);
}
eprint(tracef,"Table %s has wrong LSN: (%u,0x%x) on page: %llu",local_38,
(long)param_2 >> 0x20 & 0xffffffff,param_2 & 0xffffffff,param_4);
recovery_found_crashed_tables = recovery_found_crashed_tables + 1;
}
return;
}
| |
23,898 | create_tmpdir | eloqsql/storage/maria/unittest/ma_maria_log_cleanup.c | char *create_tmpdir(const char *progname)
{
static char test_dirname[FN_REFLEN];
char tmp_name[FN_REFLEN];
size_t length;
/* Create a temporary directory of name TMP-'executable', but without the -t extension */
fn_format(tmp_name, progname, "", "", MY_REPLACE_DIR | MY_REPLACE_EXT);
length= strlen(tmp_name);
if (length > 2 && tmp_name[length-2] == '-' && tmp_name[length-1] == 't')
tmp_name[length-2]= 0;
strxmov(test_dirname, "TMP-", tmp_name, NullS);
/*
Don't give an error if we can't create dir, as it may already exist from a previously aborted
run
*/
(void) my_mkdir(test_dirname, 0777, MYF(0));
return test_dirname;
} | O0 | c | create_tmpdir:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rsi
leaq 0x12c093(%rip), %rcx # 0x157a27
movl $0x3, %r8d
movq %rcx, %rdx
callq 0xdf700
leaq -0x210(%rbp), %rdi
callq 0x2a340
movq %rax, -0x220(%rbp)
cmpq $0x2, -0x220(%rbp)
jbe 0x2ba02
movq -0x220(%rbp), %rax
subq $0x2, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x2d, %eax
jne 0x2ba02
movq -0x220(%rbp), %rax
subq $0x1, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x74, %eax
jne 0x2ba02
movq -0x220(%rbp), %rax
subq $0x2, %rax
movb $0x0, -0x210(%rbp,%rax)
leaq 0x44b727(%rip), %rdi # 0x477130
movq %rdi, -0x230(%rbp)
leaq 0x125719(%rip), %rsi # 0x151130
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, -0x228(%rbp)
leaq -0x210(%rbp), %rdx
callq 0x14e060
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rdx
movl $0x1ff, %esi # imm = 0x1FF
callq 0xf4060
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ba68
leaq 0x44b6d1(%rip), %rax # 0x477130
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a250
nopl (%rax)
| create_tmpdir:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_218]
lea rcx, asc_157A23+4; ""
mov r8d, 3
mov rdx, rcx
call fn_format
lea rdi, [rbp+var_210]
call _strlen
mov [rbp+var_220], rax
cmp [rbp+var_220], 2
jbe short loc_2BA02
mov rax, [rbp+var_220]
sub rax, 2
movsx eax, [rbp+rax+var_210]
cmp eax, 2Dh ; '-'
jnz short loc_2BA02
mov rax, [rbp+var_220]
sub rax, 1
movsx eax, [rbp+rax+var_210]
cmp eax, 74h ; 't'
jnz short loc_2BA02
mov rax, [rbp+var_220]
sub rax, 2
mov [rbp+rax+var_210], 0
loc_2BA02:
lea rdi, create_tmpdir_test_dirname
mov [rbp+var_230], rdi
lea rsi, aTmp; "TMP-"
xor eax, eax
mov ecx, eax
mov [rbp+var_228], rcx
lea rdx, [rbp+var_210]
call strxmov
mov rdi, [rbp+var_230]
mov rdx, [rbp+var_228]
mov esi, 1FFh
call my_mkdir
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2BA68
lea rax, create_tmpdir_test_dirname
add rsp, 230h
pop rbp
retn
loc_2BA68:
call ___stack_chk_fail
| void * create_tmpdir(long long a1)
{
int v1; // r8d
int v2; // r9d
long long v4; // [rsp+0h] [rbp-230h]
long long v5; // [rsp+8h] [rbp-228h]
unsigned long long v6; // [rsp+10h] [rbp-220h]
long long v7; // [rsp+18h] [rbp-218h]
_BYTE v8[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v9; // [rsp+228h] [rbp-8h]
v9 = __readfsqword(0x28u);
HIWORD(v7) = HIWORD(a1);
fn_format(v8, a1, "", "", 3LL);
v6 = strlen(v8);
if ( v6 > 2 && v8[v6 - 2] == 45 && v8[v6 - 1] == 116 )
v8[v6 - 2] = 0;
strxmov(
(unsigned int)&create_tmpdir_test_dirname,
(unsigned int)"TMP-",
(unsigned int)v8,
0,
v1,
v2,
&create_tmpdir_test_dirname,
0LL);
my_mkdir(v4, 511LL, v5);
return &create_tmpdir_test_dirname;
}
| create_tmpdir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x218]
LEA RCX,[0x257a27]
MOV R8D,0x3
MOV RDX,RCX
CALL 0x001df700
LEA RDI,[RBP + -0x210]
CALL 0x0012a340
MOV qword ptr [RBP + -0x220],RAX
CMP qword ptr [RBP + -0x220],0x2
JBE 0x0012ba02
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x2
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x2d
JNZ 0x0012ba02
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x1
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x74
JNZ 0x0012ba02
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x2
MOV byte ptr [RBP + RAX*0x1 + -0x210],0x0
LAB_0012ba02:
LEA RDI,[0x577130]
MOV qword ptr [RBP + -0x230],RDI
LEA RSI,[0x251130]
XOR EAX,EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x228],RCX
LEA RDX,[RBP + -0x210]
CALL 0x0024e060
MOV RDI,qword ptr [RBP + -0x230]
MOV RDX,qword ptr [RBP + -0x228]
MOV ESI,0x1ff
CALL 0x001f4060
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012ba68
LEA RAX,[0x577130]
ADD RSP,0x230
POP RBP
RET
LAB_0012ba68:
CALL 0x0012a250
|
int1 * create_tmpdir(int8 param_1)
{
size_t sVar1;
long in_FS_OFFSET;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_220 = param_1;
fn_format(local_218,param_1,&DAT_00257a27,&DAT_00257a27,3);
sVar1 = strlen(local_218);
if (((2 < sVar1) && (local_218[sVar1 - 2] == '-')) && (local_218[sVar1 - 1] == 't')) {
local_218[sVar1 - 2] = '\0';
}
strxmov(create_tmpdir_test_dirname,&DAT_00251130,local_218);
my_mkdir(create_tmpdir_test_dirname,0x1ff,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return create_tmpdir_test_dirname;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,899 | my_pwrite | eloqsql/mysys/my_pread.c | size_t my_pwrite(int Filedes, const uchar *Buffer, size_t Count,
my_off_t offset, myf MyFlags)
{
size_t writtenbytes, written;
uint errors;
DBUG_ENTER("my_pwrite");
DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu",
Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags));
errors= 0;
written= 0;
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
#ifdef _WIN32
writtenbytes= my_win_pwrite(Filedes, Buffer, Count,offset);
#else
writtenbytes= pwrite(Filedes, Buffer, Count, offset);
#endif
if (writtenbytes == Count)
break;
my_errno= errno;
if (writtenbytes != (size_t) -1)
{ /* Safegueard */
written+=writtenbytes;
Buffer+=writtenbytes;
Count-=writtenbytes;
offset+=writtenbytes;
}
DBUG_PRINT("error",("Write only %u bytes", (uint) writtenbytes));
#ifndef NO_BACKGROUND
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((my_errno == ENOSPC || my_errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space(my_filename(Filedes), errors);
errors++;
continue;
}
if ((writtenbytes && writtenbytes != (size_t) -1) || my_errno == EINTR)
continue; /* Retry */
#endif
/* Don't give a warning if it's ok that we only write part of the data */
if (MyFlags & (MY_NABP | MY_FNABP))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
DBUG_RETURN(MY_FILE_ERROR); /* Error on write */
}
break; /* Return bytes written */
}
DBUG_EXECUTE_IF("check", my_seek(Filedes, -1, SEEK_SET, MYF(0)););
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Want only errors */
DBUG_RETURN(writtenbytes+written); /* purecov: inspected */
} | O0 | c | my_pwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
jmp 0xf487d
movl $0x0, -0x44(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
jne 0xf48ac
leaq 0xb8e527(%rip), %rax # 0xc82dc8
movq (%rax), %rax
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xf48ae
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2a7c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xf48d5
jmp 0xf4a0c
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x48(%rbp)
callq 0xf6090
movl -0x48(%rbp), %ecx
movl %ecx, (%rax)
cmpq $-0x1, -0x38(%rbp)
je 0xf4923
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xf4925
jmp 0xf4927
callq 0xf6090
movl 0xe0(%rax), %eax
cmpl $0x0, %eax
je 0xf4949
movabsq $0xffffffdf, %rax # imm = 0xFFFFFFDF
andq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xf6090
cmpl $0x1c, (%rax)
je 0xf495d
callq 0xf6090
cmpl $0x7a, (%rax)
jne 0xf498c
movq -0x30(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0xf498c
movl -0xc(%rbp), %edi
callq 0x103580
movq %rax, %rdi
movl -0x44(%rbp), %esi
callq 0x102cd0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xf48ae
cmpq $0x0, -0x38(%rbp)
je 0xf499a
cmpq $-0x1, -0x38(%rbp)
jne 0xf49a4
callq 0xf6090
cmpl $0x4, (%rax)
jne 0xf49a9
jmp 0xf48ae
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf4a0a
movq -0x30(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0xf49fe
movq -0x30(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x58(%rbp)
movl -0xc(%rbp), %edi
callq 0x103580
movq %rax, -0x50(%rbp)
callq 0xf6090
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl (%rax), %ecx
movl $0x3, %edi
movb $0x0, %al
callq 0xefb40
jmp 0xf4a00
movq $-0x1, -0x8(%rbp)
jmp 0xf4a38
jmp 0xf4a0c
jmp 0xf4a0e
jmp 0xf4a10
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xf4a2a
jmp 0xf4a20
movq $0x0, -0x8(%rbp)
jmp 0xf4a38
jmp 0xf4a2c
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_pwrite:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
jmp short $+2
loc_F487D:
mov [rbp+var_44], 0
mov [rbp+var_40], 0
mov rax, [rbp+var_30]
and rax, 1Ah
cmp rax, 0
jnz short loc_F48AC
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_F48AC:
jmp short $+2
loc_F48AE:
mov edi, [rbp+var_C]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call _pwrite64
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnz short loc_F48D5
jmp loc_F4A0C
loc_F48D5:
call ___errno_location
mov eax, [rax]
mov [rbp+var_48], eax
call _my_thread_var
mov ecx, [rbp+var_48]
mov [rax], ecx
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_F4923
mov rax, [rbp+var_38]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_F4923:
jmp short $+2
loc_F4925:
jmp short $+2
loc_F4927:
call _my_thread_var
mov eax, [rax+0E0h]
cmp eax, 0
jz short loc_F4949
mov rax, 0FFFFFFDFh
and rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_F4949:
call _my_thread_var
cmp dword ptr [rax], 1Ch
jz short loc_F495D
call _my_thread_var
cmp dword ptr [rax], 7Ah ; 'z'
jnz short loc_F498C
loc_F495D:
mov rax, [rbp+var_30]
and rax, 20h
cmp rax, 0
jz short loc_F498C
mov edi, [rbp+var_C]
call my_filename
mov rdi, rax
mov esi, [rbp+var_44]
call wait_for_free_space
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_F48AE
loc_F498C:
cmp [rbp+var_38], 0
jz short loc_F499A
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jnz short loc_F49A4
loc_F499A:
call _my_thread_var
cmp dword ptr [rax], 4
jnz short loc_F49A9
loc_F49A4:
jmp loc_F48AE
loc_F49A9:
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_F4A0A
mov rax, [rbp+var_30]
and rax, 1Ah
cmp rax, 0
jz short loc_F49FE
mov rax, [rbp+var_30]
and rax, 440h
or rax, 4
mov [rbp+var_58], rax
mov edi, [rbp+var_C]
call my_filename
mov [rbp+var_50], rax
call _my_thread_var
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_50]
mov ecx, [rax]
mov edi, 3
mov al, 0
call my_error
loc_F49FE:
jmp short $+2
loc_F4A00:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_F4A38
loc_F4A0A:
jmp short $+2
loc_F4A0C:
jmp short $+2
loc_F4A0E:
jmp short $+2
loc_F4A10:
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_F4A2A
jmp short $+2
loc_F4A20:
mov [rbp+var_8], 0
jmp short loc_F4A38
loc_F4A2A:
jmp short $+2
loc_F4A2C:
mov rax, [rbp+var_38]
add rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_F4A38:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long my_pwrite(unsigned int a1, const char *a2, long long a3, long long a4, __int16 a5)
{
const char *v5; // rsi
long long v6; // rax
unsigned int *v7; // rax
long long v9; // [rsp+10h] [rbp-50h]
int v10; // [rsp+18h] [rbp-48h]
unsigned int v11; // [rsp+1Ch] [rbp-44h]
long long v12; // [rsp+20h] [rbp-40h]
long long v13; // [rsp+28h] [rbp-38h]
__int16 v14; // [rsp+30h] [rbp-30h]
v14 = a5;
v11 = 0;
v12 = 0LL;
if ( (a5 & 0x1A) == 0 )
v14 = a5 | my_global_flags;
do
{
while ( 1 )
{
v5 = a2;
v13 = pwrite64(a1, a2, a3, a4);
if ( v13 == a3 )
goto LABEL_20;
v10 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v10;
if ( v13 != -1 )
{
v12 += v13;
a2 += v13;
a3 -= v13;
a4 += v13;
}
if ( *(_DWORD *)(my_thread_var(a1, v5) + 224) )
v14 &= ~0x20u;
if ( *(_DWORD *)my_thread_var(a1, v5) != 28 && *(_DWORD *)my_thread_var(a1, v5) != 122 || (v14 & 0x20) == 0 )
break;
v6 = my_filename(a1);
wait_for_free_space(v6, v11++);
}
}
while ( v13 && v13 != -1 || *(_DWORD *)my_thread_var(a1, v5) == 4 );
if ( (v14 & 6) == 0 )
{
LABEL_20:
if ( (v14 & 6) != 0 )
return 0LL;
else
return v12 + v13;
}
if ( (v14 & 0x1A) != 0 )
{
v9 = my_filename(a1);
v7 = (unsigned int *)my_thread_var(a1, v5);
my_error(3u, v14 & 0x440 | 4LL, v9, *v7);
}
return -1LL;
}
| my_pwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
JMP 0x001f487d
LAB_001f487d:
MOV dword ptr [RBP + -0x44],0x0
MOV qword ptr [RBP + -0x40],0x0
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x1a
CMP RAX,0x0
JNZ 0x001f48ac
LEA RAX,[0xd82dc8]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_001f48ac:
JMP 0x001f48ae
LAB_001f48ae:
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x0012a7c0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001f48d5
JMP 0x001f4a0c
LAB_001f48d5:
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x48],EAX
CALL 0x001f6090
MOV ECX,dword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001f4923
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f4923:
JMP 0x001f4925
LAB_001f4925:
JMP 0x001f4927
LAB_001f4927:
CALL 0x001f6090
MOV EAX,dword ptr [RAX + 0xe0]
CMP EAX,0x0
JZ 0x001f4949
MOV RAX,0xffffffdf
AND RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_001f4949:
CALL 0x001f6090
CMP dword ptr [RAX],0x1c
JZ 0x001f495d
CALL 0x001f6090
CMP dword ptr [RAX],0x7a
JNZ 0x001f498c
LAB_001f495d:
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x20
CMP RAX,0x0
JZ 0x001f498c
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00203580
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x44]
CALL 0x00202cd0
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001f48ae
LAB_001f498c:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001f499a
CMP qword ptr [RBP + -0x38],-0x1
JNZ 0x001f49a4
LAB_001f499a:
CALL 0x001f6090
CMP dword ptr [RAX],0x4
JNZ 0x001f49a9
LAB_001f49a4:
JMP 0x001f48ae
LAB_001f49a9:
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f4a0a
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x001f49fe
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x58],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00203580
MOV qword ptr [RBP + -0x50],RAX
CALL 0x001f6090
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX]
MOV EDI,0x3
MOV AL,0x0
CALL 0x001efb40
LAB_001f49fe:
JMP 0x001f4a00
LAB_001f4a00:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001f4a38
LAB_001f4a0a:
JMP 0x001f4a0c
LAB_001f4a0c:
JMP 0x001f4a0e
LAB_001f4a0e:
JMP 0x001f4a10
LAB_001f4a10:
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001f4a2a
JMP 0x001f4a20
LAB_001f4a20:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001f4a38
LAB_001f4a2a:
JMP 0x001f4a2c
LAB_001f4a2c:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f4a38:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
long my_pwrite(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5)
{
int iVar1;
size_t sVar2;
int *piVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
int local_4c;
long local_48;
ulong local_38;
long local_30;
size_t local_28;
void *local_20;
long local_10;
local_4c = 0;
local_48 = 0;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
if ((param_5 & 0x1a) == 0) {
local_38 = my_global_flags | param_5;
}
do {
while( true ) {
sVar2 = pwrite64(param_1,local_20,local_28,local_30);
if (sVar2 == local_28) goto LAB_001f4a0c;
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if (sVar2 != 0xffffffffffffffff) {
local_48 = sVar2 + local_48;
local_20 = (void *)(sVar2 + (long)local_20);
local_28 = local_28 - sVar2;
local_30 = sVar2 + local_30;
}
lVar4 = _my_thread_var();
if (*(int *)(lVar4 + 0xe0) != 0) {
local_38 = local_38 & 0xffffffdf;
}
piVar3 = (int *)_my_thread_var();
if (((*piVar3 != 0x1c) && (piVar3 = (int *)_my_thread_var(), *piVar3 != 0x7a)) ||
((local_38 & 0x20) == 0)) break;
uVar5 = my_filename(param_1);
wait_for_free_space(uVar5,local_4c);
local_4c = local_4c + 1;
}
} while (((sVar2 != 0) && (sVar2 != 0xffffffffffffffff)) ||
(piVar3 = (int *)_my_thread_var(), *piVar3 == 4));
if ((local_38 & 6) == 0) {
LAB_001f4a0c:
if ((local_38 & 6) == 0) {
local_10 = sVar2 + local_48;
}
else {
local_10 = 0;
}
}
else {
if ((local_38 & 0x1a) != 0) {
uVar5 = my_filename(param_1);
puVar6 = (int4 *)_my_thread_var();
my_error(3,local_38 & 0x440 | 4,uVar5,*puVar6);
}
local_10 = -1;
}
return local_10;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.